
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void cleanup_out(void *v_clp)

{
  pr2serr("thread cancelled while out mutex held\n");
  *(undefined1 *)((int)v_clp + 0x8c) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90));
  pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c));
  *(undefined1 *)((int)v_clp + 0x38) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c));
  pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8));
  return;
}



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

void FUN_00013d20(int param_1)

{
  pr2serr("thread cancelled while out mutex held\n");
  *(undefined1 *)(param_1 + 0x8c) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));
  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));
  *(undefined1 *)(param_1 + 0x38) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));
  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00013920
ADD EBX,0x71d8
LEA EDI,[ESI + 0x3c]
SUB ESP,0xc
LEA EAX,[EBX + 0xffffc8f8]
PUSH EAX
CALL 0x00011130
MOV byte ptr [ESI + 0x8c],0x1
LEA EAX,[ESI + 0x90]
ADD ESI,0xa8
MOV dword ptr [ESP],EAX
CALL 0x00011040
MOV dword ptr [ESP],EDI
CALL 0x00011140
MOV byte ptr [ESI + -0x70],0x1
MOV dword ptr [ESP],EDI
CALL 0x00011040
MOV dword ptr [ESP],ESI
CALL 0x000110b0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00013d20(int param_1)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}\n\n" comment (function_definition "void FUN_00013d20(int param_1)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" primitive_type (function_declarator "FUN_00013d20(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" { (expression_statement "pr2serr("thread cancelled while out mutex held\n");" (call_expression "pr2serr("thread cancelled while out mutex held\n")" identifier (argument_list "("thread cancelled while out mutex held\n")" ( (string_literal ""thread cancelled while out mutex held\n"" " string_content escape_sequence ") ))) ;) (expression_statement "*(undefined1 *)(param_1 + 0x8c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x8c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x8c)" * (cast_expression "(undefined1 *)(param_1 + 0x8c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x8c)" ( (binary_expression "param_1 + 0x8c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x90))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x90)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x90)" ( (binary_expression "param_1 + 0x90" identifier + number_literal) ))) ))) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ))) ;) (expression_statement "*(undefined1 *)(param_1 + 0x38) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x38) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x38)" * (cast_expression "(undefined1 *)(param_1 + 0x38)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ))) ;) (expression_statement "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));" (call_expression "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8))" identifier (argument_list "((pthread_cond_t *)(param_1 + 0xa8))" ( (cast_expression "(pthread_cond_t *)(param_1 + 0xa8)" ( (type_descriptor "pthread_cond_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) ))) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid cleanup_out(void *v_clp)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)((int)v_clp + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  *(undefined1 *)((int)v_clp + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8));\n  return;\n}\n\n" comment comment (function_definition "void cleanup_out(void *v_clp)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)((int)v_clp + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  *(undefined1 *)((int)v_clp + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8));\n  return;\n}" primitive_type (function_declarator "cleanup_out(void *v_clp)" identifier (parameter_list "(void *v_clp)" ( (parameter_declaration "void *v_clp" primitive_type (pointer_declarator "*v_clp" * identifier)) ))) (compound_statement "{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)((int)v_clp + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  *(undefined1 *)((int)v_clp + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8));\n  return;\n}" { (expression_statement "pr2serr("thread cancelled while out mutex held\n");" (call_expression "pr2serr("thread cancelled while out mutex held\n")" identifier (argument_list "("thread cancelled while out mutex held\n")" ( (string_literal ""thread cancelled while out mutex held\n"" " string_content escape_sequence ") ))) ;) (expression_statement "*(undefined1 *)((int)v_clp + 0x8c) = 1;" (assignment_expression "*(undefined1 *)((int)v_clp + 0x8c) = 1" (pointer_expression "*(undefined1 *)((int)v_clp + 0x8c)" * (cast_expression "(undefined1 *)((int)v_clp + 0x8c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0x8c)" ( (binary_expression "(int)v_clp + 0x8c" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x90))" identifier (argument_list "((pthread_mutex_t *)((int)v_clp + 0x90))" ( (cast_expression "(pthread_mutex_t *)((int)v_clp + 0x90)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0x90)" ( (binary_expression "(int)v_clp + 0x90" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c));" (call_expression "pthread_mutex_lock((pthread_mutex_t *)((int)v_clp + 0x3c))" identifier (argument_list "((pthread_mutex_t *)((int)v_clp + 0x3c))" ( (cast_expression "(pthread_mutex_t *)((int)v_clp + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0x3c)" ( (binary_expression "(int)v_clp + 0x3c" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) (expression_statement "*(undefined1 *)((int)v_clp + 0x38) = 1;" (assignment_expression "*(undefined1 *)((int)v_clp + 0x38) = 1" (pointer_expression "*(undefined1 *)((int)v_clp + 0x38)" * (cast_expression "(undefined1 *)((int)v_clp + 0x38)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0x38)" ( (binary_expression "(int)v_clp + 0x38" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)((int)v_clp + 0x3c))" identifier (argument_list "((pthread_mutex_t *)((int)v_clp + 0x3c))" ( (cast_expression "(pthread_mutex_t *)((int)v_clp + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0x3c)" ( (binary_expression "(int)v_clp + 0x3c" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) (expression_statement "pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8));" (call_expression "pthread_cond_broadcast((pthread_cond_t *)((int)v_clp + 0xa8))" identifier (argument_list "((pthread_cond_t *)((int)v_clp + 0xa8))" ( (cast_expression "(pthread_cond_t *)((int)v_clp + 0xa8)" ( (type_descriptor "pthread_cond_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)v_clp + 0xa8)" ( (binary_expression "(int)v_clp + 0xa8" (cast_expression "(int)v_clp" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00013d20(int param_1)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}\n\n" (function_definition "void FUN_00013d20(int param_1)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" primitive_type (function_declarator "FUN_00013d20(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" { (expression_statement "pr2serr("thread cancelled while out mutex held\n");" (call_expression "pr2serr("thread cancelled while out mutex held\n")" identifier (argument_list "("thread cancelled while out mutex held\n")" ( (string_literal ""thread cancelled while out mutex held\n"" " string_content escape_sequence ") ))) ;) (expression_statement "*(undefined1 *)(param_1 + 0x8c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x8c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x8c)" * (cast_expression "(undefined1 *)(param_1 + 0x8c)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x8c)" ( (binary_expression "param_1 + 0x8c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x90))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x90)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x90)" ( (binary_expression "param_1 + 0x90" identifier + number_literal) ))) ))) ;) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ))) ;) (expression_statement "*(undefined1 *)(param_1 + 0x38) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x38) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x38)" * (cast_expression "(undefined1 *)(param_1 + 0x38)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x38)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) )))) = number_literal) ;) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c))" identifier (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" ( (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" ( (type_descriptor "pthread_mutex_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) ))) ))) ;) (expression_statement "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));" (call_expression "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8))" identifier (argument_list "((pthread_cond_t *)(param_1 + 0xa8))" ( (cast_expression "(pthread_cond_t *)(param_1 + 0xa8)" ( (type_descriptor "pthread_cond_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa8)" ( (binary_expression "param_1 + 0xa8" identifier + number_literal) ))) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00013d20(int param_1)\n\n{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00013d20(int param_1)" (identifier "FUN_00013d20") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  pr2serr("thread cancelled while out mutex held\n");\n  *(undefined1 *)(param_1 + 0x8c) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));\n  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));\n  *(undefined1 *)(param_1 + 0x38) = 1;\n  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));\n  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));\n  return;\n}" ({ "{") (expression_statement "pr2serr("thread cancelled while out mutex held\n");" (call_expression "pr2serr("thread cancelled while out mutex held\n")" (identifier "pr2serr") (argument_list "("thread cancelled while out mutex held\n")" (( "(") (string_literal ""thread cancelled while out mutex held\n"" (" """) (string_content "thread cancelled while out mutex held") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x8c) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x8c) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x8c)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x8c)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x8c)" (( "(") (binary_expression "param_1 + 0x8c" (identifier "param_1") (+ "+") (number_literal "0x8c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90))" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)(param_1 + 0x90))" (( "(") (cast_expression "(pthread_mutex_t *)(param_1 + 0x90)" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x90)" (( "(") (binary_expression "param_1 + 0x90" (identifier "param_1") (+ "+") (number_literal "0x90")) () ")"))) () ")"))) (; ";")) (expression_statement "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c))" (identifier "pthread_mutex_lock") (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" (( "(") (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))) () ")"))) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x38) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x38) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x38)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x38)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x38)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));" (call_expression "pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c))" (identifier "pthread_mutex_unlock") (argument_list "((pthread_mutex_t *)(param_1 + 0x3c))" (( "(") (cast_expression "(pthread_mutex_t *)(param_1 + 0x3c)" (( "(") (type_descriptor "pthread_mutex_t *" (type_identifier "pthread_mutex_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")"))) () ")"))) (; ";")) (expression_statement "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));" (call_expression "pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8))" (identifier "pthread_cond_broadcast") (argument_list "((pthread_cond_t *)(param_1 + 0xa8))" (( "(") (cast_expression "(pthread_cond_t *)(param_1 + 0xa8)" (( "(") (type_descriptor "pthread_cond_t *" (type_identifier "pthread_cond_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa8)" (( "(") (binary_expression "param_1 + 0xa8" (identifier "param_1") (+ "+") (number_literal "0xa8")) () ")"))) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(void *v_clp)

{
  var_1("thread cancelled while out mutex held\n");
  *(type_1 *)((int)v_clp + 0x8c) = 1;
  var_2((type_2 *)((int)v_clp + 0x90));
  var_3((type_2 *)((int)v_clp + 0x3c));
  *(type_1 *)((int)v_clp + 0x38) = 1;
  var_2((type_2 *)((int)v_clp + 0x3c));
  var_4((type_3 *)((int)v_clp + 0xa8));
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (expression_statement (assignment_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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (return_statement))))

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

void MASKED(int param_1)

{
  pr2serr("thread cancelled while out mutex held\n");
  *(undefined1 *)(param_1 + 0x8c) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x90));
  pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x3c));
  *(undefined1 *)(param_1 + 0x38) = 1;
  pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x3c));
  pthread_cond_broadcast((pthread_cond_t *)(param_1 + 0xa8));
  return;
}

