
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "DT": Some values do not have unique names */
/* DWARF original prototype: void unlock(File_read * this, Task * task) */

void __thiscall gold::File_read::unlock(File_read *this,Task *task)

{
  if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)) {
    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);
  }
  release(this);
  if (((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)) {
    (this->token_).writer_ = (Task *)0x0;
    return;
  }
                    /* WARNING: Subroutine does not return */
  do_gold_unreachable("../../gold/token.h",0x84,"remove_writer");
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_0005cd80(undefined4 *param_1,int param_2)

{
  int iVar1;
  
  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {
    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);
  }
  iVar1 = FUN_0005cbe0(param_1);
  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {
    param_1[0xd] = 0;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);
}


PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x2a5279
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
LEA EAX,[EBX + 0x378]
MOV EAX,dword ptr [EAX]
MOV EDX,dword ptr [EAX + 0x8]
TEST EDX,EDX
JZ 0x0005cda9
TEST byte ptr [EAX + 0x14],0x4
JNZ 0x0005cdd8
SUB ESP,0xc
PUSH ESI
CALL 0x0005cbe0
ADD ESP,0x10
CMP byte ptr [ESI + 0x2c],0x0
JNZ 0x0005cdf0
MOV EAX,dword ptr [ESI + 0x34]
CMP dword ptr [ESP + 0x14],EAX
JNZ 0x0005cdf0
MOV dword ptr [ESI + 0x34],0x0
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0x4
LEA EDX,[EBX + 0xfff1eb8b]
PUSH dword ptr [ESI]
PUSH EDX
PUSH dword ptr [EAX]
CALL 0x0005ac40
ADD ESP,0x10
JMP 0x0005cda9
PUSH EAX
LEA EAX,[EBX + 0xfff1edc4]
PUSH EAX
LEA EAX,[EBX + 0xfff185bd]
PUSH 0x84
PUSH EAX
CALL 0x0005f0b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0005cd80(undefined4 *param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}\n\n" comment (function_definition "void FUN_0005cd80(undefined4 *param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" primitive_type (function_declarator "FUN_0005cd80(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" if (parenthesized_expression "((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0))" ( (binary_expression "(DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)" (parenthesized_expression "(DAT_00302378[2] != 0)" ( (binary_expression "DAT_00302378[2] != 0" (subscript_expression "DAT_00302378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_00302378 + 5) & 4) != 0)" ( (binary_expression "(*(byte *)(DAT_00302378 + 5) & 4) != 0" (parenthesized_expression "(*(byte *)(DAT_00302378 + 5) & 4)" ( (binary_expression "*(byte *)(DAT_00302378 + 5) & 4" (pointer_expression "*(byte *)(DAT_00302378 + 5)" * (cast_expression "(byte *)(DAT_00302378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00302378 + 5)" ( (binary_expression "DAT_00302378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" { (expression_statement "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);" (call_expression "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" identifier (argument_list "(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" ( (pointer_expression "*DAT_00302378" * identifier) , (string_literal ""Unlocking file \"%s\""" " string_content escape_sequence string_content escape_sequence ") , (pointer_expression "*param_1" * identifier) ))) ;) })) (expression_statement "iVar1 = FUN_0005cbe0(param_1);" (assignment_expression "iVar1 = FUN_0005cbe0(param_1)" identifier = (call_expression "FUN_0005cbe0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1))" ( (binary_expression "(*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)" (parenthesized_expression "(*(char *)(param_1 + 0xb) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xb) == '\0'" (pointer_expression "*(char *)(param_1 + 0xb)" * (cast_expression "(char *)(param_1 + 0xb)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb)" ( (binary_expression "param_1 + 0xb" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar1 = param_1[0xd], param_2 == iVar1)" ( (comma_expression "iVar1 = param_1[0xd], param_2 == iVar1" (assignment_expression "iVar1 = param_1[0xd]" identifier = (subscript_expression "param_1[0xd]" identifier [ number_literal ])) , (binary_expression "param_2 == iVar1" identifier == identifier)) ))) )) (compound_statement "{\n    param_1[0xd] = 0;\n    return;\n  }" { (expression_statement "param_1[0xd] = 0;" (assignment_expression "param_1[0xd] = 0" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);" (call_expression "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1)" identifier (argument_list "("../../gold/token.h",0x84,"remove_writer",iVar1)" ( (string_literal ""../../gold/token.h"" " string_content ") , number_literal , (string_literal ""remove_writer"" " string_content ") , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "DT": Some values do not have unique names */\n/* DWARF original prototype: void unlock(File_read * this, Task * task) */\n\nvoid __thiscall gold::File_read::unlock(File_read *this,Task *task)\n\n{\n  if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)) {\n    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);\n  }\n  release(this);\n  if (((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)) {\n    (this->token_).writer_ = (Task *)0x0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/token.h",0x84,"remove_writer");\n}\n\n" comment comment comment (function_definition "void __thiscall gold::File_read::unlock(File_read *this,Task *task)\n\n{\n  if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)) {\n    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);\n  }\n  release(this);\n  if (((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)) {\n    (this->token_).writer_ = (Task *)0x0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/token.h",0x84,"remove_writer");\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::File_read::" identifier : : identifier : :) (function_declarator "unlock(File_read *this,Task *task)" identifier (parameter_list "(File_read *this,Task *task)" ( (parameter_declaration "File_read *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "Task *task" type_identifier (pointer_declarator "*task" * identifier)) ))) (compound_statement "{\n  if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)) {\n    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);\n  }\n  release(this);\n  if (((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)) {\n    (this->token_).writer_ = (Task *)0x0;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  do_gold_unreachable("../../gold/token.h",0x84,"remove_writer");\n}" { (if_statement "if ((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)) {\n    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);\n  }" if (parenthesized_expression "((parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0))" ( (binary_expression "(parameters->options_ != (General_options *)0x0) && ((parameters->debug_ & 4) != 0)" (parenthesized_expression "(parameters->options_ != (General_options *)0x0)" ( (binary_expression "parameters->options_ != (General_options *)0x0" (field_expression "parameters->options_" identifier -> field_identifier) != (cast_expression "(General_options *)0x0" ( (type_descriptor "General_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((parameters->debug_ & 4) != 0)" ( (binary_expression "(parameters->debug_ & 4) != 0" (parenthesized_expression "(parameters->debug_ & 4)" ( (binary_expression "parameters->debug_ & 4" (field_expression "parameters->debug_" identifier -> field_identifier) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);\n  }" { (labeled_statement "Errors::debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);" statement_identifier : (ERROR ":" :) (expression_statement "debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);" (call_expression "debug(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p)" identifier (argument_list "(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p)" ( (field_expression "parameters->errors_" identifier -> field_identifier) , (string_literal ""Unlocking file \"%s\""" " string_content escape_sequence string_content escape_sequence ") , (field_expression "(this->name_)._M_dataplus._M_p" (field_expression "(this->name_)._M_dataplus" (parenthesized_expression "(this->name_)" ( (field_expression "this->name_" identifier -> field_identifier) )) . field_identifier) . field_identifier) ))) ;)) })) (expression_statement "release(this);" (call_expression "release(this)" identifier (argument_list "(this)" ( identifier ))) ;) (if_statement "if (((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)) {\n    (this->token_).writer_ = (Task *)0x0;\n    return;\n  }" if (parenthesized_expression "(((this->token_).is_blocker_ == false) && (task == (this->token_).writer_))" ( (binary_expression "((this->token_).is_blocker_ == false) && (task == (this->token_).writer_)" (parenthesized_expression "((this->token_).is_blocker_ == false)" ( (binary_expression "(this->token_).is_blocker_ == false" (field_expression "(this->token_).is_blocker_" (parenthesized_expression "(this->token_)" ( (field_expression "this->token_" identifier -> field_identifier) )) . field_identifier) == false) )) && (parenthesized_expression "(task == (this->token_).writer_)" ( (binary_expression "task == (this->token_).writer_" identifier == (field_expression "(this->token_).writer_" (parenthesized_expression "(this->token_)" ( (field_expression "this->token_" identifier -> field_identifier) )) . field_identifier)) ))) )) (compound_statement "{\n    (this->token_).writer_ = (Task *)0x0;\n    return;\n  }" { (expression_statement "(this->token_).writer_ = (Task *)0x0;" (assignment_expression "(this->token_).writer_ = (Task *)0x0" (field_expression "(this->token_).writer_" (parenthesized_expression "(this->token_)" ( (field_expression "this->token_" identifier -> field_identifier) )) . field_identifier) = (cast_expression "(Task *)0x0" ( (type_descriptor "Task *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (return_statement "return;" return ;) })) comment (expression_statement "do_gold_unreachable("../../gold/token.h",0x84,"remove_writer");" (call_expression "do_gold_unreachable("../../gold/token.h",0x84,"remove_writer")" identifier (argument_list "("../../gold/token.h",0x84,"remove_writer")" ( (string_literal ""../../gold/token.h"" " string_content ") , number_literal , (string_literal ""remove_writer"" " string_content ") ))) ;) })))
(translation_unit "void FUN_0005cd80(undefined4 *param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    \n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}\n\n" (function_definition "void FUN_0005cd80(undefined4 *param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    \n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" primitive_type (function_declarator "FUN_0005cd80(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    \n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" if (parenthesized_expression "((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0))" ( (binary_expression "(DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)" (parenthesized_expression "(DAT_00302378[2] != 0)" ( (binary_expression "DAT_00302378[2] != 0" (subscript_expression "DAT_00302378[2]" identifier [ number_literal ]) != number_literal) )) && (parenthesized_expression "((*(byte *)(DAT_00302378 + 5) & 4) != 0)" ( (binary_expression "(*(byte *)(DAT_00302378 + 5) & 4) != 0" (parenthesized_expression "(*(byte *)(DAT_00302378 + 5) & 4)" ( (binary_expression "*(byte *)(DAT_00302378 + 5) & 4" (pointer_expression "*(byte *)(DAT_00302378 + 5)" * (cast_expression "(byte *)(DAT_00302378 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00302378 + 5)" ( (binary_expression "DAT_00302378 + 5" identifier + number_literal) )))) & number_literal) )) != number_literal) ))) )) (compound_statement "{\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" { (expression_statement "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);" (call_expression "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" identifier (argument_list "(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" ( (pointer_expression "*DAT_00302378" * identifier) , (string_literal ""Unlocking file \"%s\""" " string_content escape_sequence string_content escape_sequence ") , (pointer_expression "*param_1" * identifier) ))) ;) })) (expression_statement "iVar1 = FUN_0005cbe0(param_1);" (assignment_expression "iVar1 = FUN_0005cbe0(param_1)" identifier = (call_expression "FUN_0005cbe0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }" if (parenthesized_expression "((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1))" ( (binary_expression "(*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)" (parenthesized_expression "(*(char *)(param_1 + 0xb) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xb) == '\0'" (pointer_expression "*(char *)(param_1 + 0xb)" * (cast_expression "(char *)(param_1 + 0xb)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xb)" ( (binary_expression "param_1 + 0xb" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(iVar1 = param_1[0xd], param_2 == iVar1)" ( (comma_expression "iVar1 = param_1[0xd], param_2 == iVar1" (assignment_expression "iVar1 = param_1[0xd]" identifier = (subscript_expression "param_1[0xd]" identifier [ number_literal ])) , (binary_expression "param_2 == iVar1" identifier == identifier)) ))) )) (compound_statement "{\n    param_1[0xd] = 0;\n    return;\n  }" { (expression_statement "param_1[0xd] = 0;" (assignment_expression "param_1[0xd] = 0" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);" (call_expression "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1)" identifier (argument_list "("../../gold/token.h",0x84,"remove_writer",iVar1)" ( (string_literal ""../../gold/token.h"" " string_content ") , number_literal , (string_literal ""remove_writer"" " string_content ") , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (string_literal " string_content escape_sequence string_content escape_sequence ") , (pointer_expression * IDENT) ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) , (binary_expression IDENT == IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT , (string_literal " string_content ") , IDENT ))) ;) })))
(function_definition "void FUN_0005cd80(undefined4 *param_1,int param_2)\n\n{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    \n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" (primitive_type "void") (function_declarator "FUN_0005cd80(undefined4 *param_1,int param_2)" (identifier "FUN_0005cd80") (parameter_list "(undefined4 *param_1,int param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }\n  iVar1 = FUN_0005cbe0(param_1);\n  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }\n                    \n  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" (if "if") (parenthesized_expression "((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0))" (( "(") (binary_expression "(DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)" (parenthesized_expression "(DAT_00302378[2] != 0)" (( "(") (binary_expression "DAT_00302378[2] != 0" (subscript_expression "DAT_00302378[2]" (identifier "DAT_00302378") ([ "[") (number_literal "2") (] "]")) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(DAT_00302378 + 5) & 4) != 0)" (( "(") (binary_expression "(*(byte *)(DAT_00302378 + 5) & 4) != 0" (parenthesized_expression "(*(byte *)(DAT_00302378 + 5) & 4)" (( "(") (binary_expression "*(byte *)(DAT_00302378 + 5) & 4" (pointer_expression "*(byte *)(DAT_00302378 + 5)" (* "*") (cast_expression "(byte *)(DAT_00302378 + 5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_00302378 + 5)" (( "(") (binary_expression "DAT_00302378 + 5" (identifier "DAT_00302378") (+ "+") (number_literal "5")) () ")")))) (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);\n  }" ({ "{") (expression_statement "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);" (call_expression "FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" (identifier "FUN_0005ac40") (argument_list "(*DAT_00302378,"Unlocking file \"%s\"",*param_1)" (( "(") (pointer_expression "*DAT_00302378" (* "*") (identifier "DAT_00302378")) (, ",") (string_literal ""Unlocking file \"%s\""" (" """) (string_content "Unlocking file ") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (" """)) (, ",") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = FUN_0005cbe0(param_1);" (assignment_expression "iVar1 = FUN_0005cbe0(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_0005cbe0(param_1)" (identifier "FUN_0005cbe0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {\n    param_1[0xd] = 0;\n    return;\n  }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1))" (( "(") (binary_expression "(*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)" (parenthesized_expression "(*(char *)(param_1 + 0xb) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xb) == '\0'" (pointer_expression "*(char *)(param_1 + 0xb)" (* "*") (cast_expression "(char *)(param_1 + 0xb)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xb)" (( "(") (binary_expression "param_1 + 0xb" (identifier "param_1") (+ "+") (number_literal "0xb")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = param_1[0xd], param_2 == iVar1)" (( "(") (comma_expression "iVar1 = param_1[0xd], param_2 == iVar1" (assignment_expression "iVar1 = param_1[0xd]" (identifier "iVar1") (= "=") (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]"))) (, ",") (binary_expression "param_2 == iVar1" (identifier "param_2") (== "==") (identifier "iVar1"))) () ")"))) () ")")) (compound_statement "{\n    param_1[0xd] = 0;\n    return;\n  }" ({ "{") (expression_statement "param_1[0xd] = 0;" (assignment_expression "param_1[0xd] = 0" (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);" (call_expression "FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1)" (identifier "FUN_0005f0b0") (argument_list "("../../gold/token.h",0x84,"remove_writer",iVar1)" (( "(") (string_literal ""../../gold/token.h"" (" """) (string_content "../../gold/token.h") (" """)) (, ",") (number_literal "0x84") (, ",") (string_literal ""remove_writer"" (" """) (string_content "remove_writer") (" """)) (, ",") (identifier "iVar1") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "DT": Some values do not have unique names */
/* DWARF original prototype: void unlock(File_read * this, Task * task) */

void __thiscall gold::type_1::function_1(type_1 *this,type_2 *var_3)

{
  if ((parameters->options_ != (type_3 *)0x0) && ((parameters->debug_ & 4) != 0)) {
    Errors::var_1(parameters->errors_,"Unlocking file \"%s\"",(this->name_)._M_dataplus._M_p);
  }
  var_2(this);
  if (((this->token_).is_blocker_ == false) && (var_3 == (this->token_).writer_)) {
    (this->token_).writer_ = (type_2 *)0x0;
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_4("../../gold/token.h",0x84,"remove_writer");
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal))) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (number_literal) (string_literal (string_content)) (identifier)))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(undefined4 *param_1,int param_2)

{
  int iVar1;
  
  if ((DAT_00302378[2] != 0) && ((*(byte *)(DAT_00302378 + 5) & 4) != 0)) {
    FUN_0005ac40(*DAT_00302378,"Unlocking file \"%s\"",*param_1);
  }
  iVar1 = FUN_0005cbe0(param_1);
  if ((*(char *)(param_1 + 0xb) == '\0') && (iVar1 = param_1[0xd], param_2 == iVar1)) {
    param_1[0xd] = 0;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005f0b0("../../gold/token.h",0x84,"remove_writer",iVar1);
}

