
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::assign(std::wstring const&) */

wstring * __thiscall std::wstring::assign(wstring *this,wstring *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  allocator local_1d [9];
  undefined4 uStack_14;
  
  uStack_14 = 0x281849;
  iVar3 = *(int *)param_1;
  if (*(int *)this != iVar3) {
    if (*(int *)(iVar3 + -4) < 0) {
      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);
    }
    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
      }
      else {
        LOCK();
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
        UNLOCK();
      }
    }
    iVar2 = *(int *)this;
    if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        iVar4 = *(int *)(iVar2 + -4);
        *(int *)(iVar2 + -4) = iVar4 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(iVar2 + -4);
        iVar4 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar4 < 1) {
        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));
        *(int *)this = iVar3;
        return this;
      }
    }
    *(int *)this = iVar3;
  }
  return this;
}



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

int * FUN_00281840(int *param_1,int *param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined1 local_1d [9];
  undefined4 uStack_14;
  
  uStack_14 = 0x281849;
  iVar3 = *param_2;
  if (*param_1 != iVar3) {
    if (*(int *)(iVar3 + -4) < 0) {
      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);
    }
    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
      }
      else {
        LOCK();
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
        UNLOCK();
      }
    }
    iVar2 = *param_1;
    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        iVar4 = *(int *)(iVar2 + -4);
        *(int *)(iVar2 + -4) = iVar4 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(iVar2 + -4);
        iVar4 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar4 < 1) {
        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);
        *param_1 = iVar3;
        return param_1;
      }
    }
    *param_1 = iVar3;
  }
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x1287b7
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x44]
MOV ESI,dword ptr [ESP + 0x40]
MOV EAX,dword ptr [EAX]
CMP dword ptr [ESI],EAX
JZ 0x00281886
MOV EDX,dword ptr [EAX + -0x4]
LEA ECX,[EAX + -0xc]
LEA EDI,[EAX + -0x4]
TEST EDX,EDX
JS 0x00281890
LEA EDX,[EBX + 0x9080]
CMP ECX,EDX
JNZ 0x002818f8
MOV ECX,dword ptr [ESI]
LEA EDI,[ECX + -0xc]
CMP EDI,EDX
JNZ 0x002818b0
MOV dword ptr [ESI],EAX
ADD ESP,0x2c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x0
LEA EAX,[ESP + 0x27]
PUSH EAX
PUSH ECX
CALL 0x00280f90
ADD ESP,0x10
LEA EDX,[EBX + 0x9080]
JMP 0x0028187b
MOV EDX,dword ptr [EBX + 0xffffff3c]
TEST EDX,EDX
JZ 0x002818e8
MOV EDX,0xffffffff
XADD.LOCK dword ptr [ECX + -0x4],EDX
TEST EDX,EDX
JG 0x00281884
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0x8
LEA EDX,[ESP + 0x27]
PUSH EDX
PUSH EDI
CALL 0x0027ff70
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
MOV dword ptr [ESI],EAX
JMP 0x00281886
MOV EDX,dword ptr [ECX + -0x4]
LEA EBP,[EDX + -0x1]
MOV dword ptr [ECX + -0x4],EBP
JMP 0x002818c4
MOV ECX,dword ptr [EBX + 0xffffff3c]
TEST ECX,ECX
JZ 0x00281910
ADD.LOCK dword ptr [EDI],0x1
JMP 0x0028187b
ADD dword ptr [EAX + -0x4],0x1
JMP 0x0028187b
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_00281840(int *param_1,int *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_00281840(int *param_1,int *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_00281840(int *param_1,int *param_2)" * (function_declarator "FUN_00281840(int *param_1,int *param_2)" identifier (parameter_list "(int *param_1,int *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined1 local_1d [9];" type_identifier (array_declarator "local_1d [9]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x281849;" (assignment_expression "uStack_14 = 0x281849" identifier = number_literal) ;) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" if (parenthesized_expression "(*param_1 != iVar3)" ( (binary_expression "*param_1 != iVar3" (pointer_expression "*param_1" * identifier) != identifier) )) (compound_statement "{\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" { (if_statement "if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar3 + -4) < 0)" ( (binary_expression "*(int *)(iVar3 + -4) < 0" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }" { (expression_statement "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);" (assignment_expression "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" identifier = (call_expression "FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" identifier (argument_list "((undefined4 *)(iVar3 + -0xc),local_1d,0)" ( (cast_expression "(undefined4 *)(iVar3 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) , identifier , number_literal )))) ;) }) (else_clause "else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" else (if_statement "if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080)" ( (binary_expression "(undefined4 *)(iVar3 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar3 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) != (pointer_expression "&DAT_003b3080" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }" { (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })))) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" if (parenthesized_expression "((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080)" ( (binary_expression "(undefined4 *)(iVar2 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar2 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (pointer_expression "&DAT_003b3080" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }" { (expression_statement "iVar4 = *(int *)(iVar2 + -4);" (assignment_expression "iVar4 = *(int *)(iVar2 + -4)" identifier = (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(iVar2 + -4) = iVar4 + -1;" (assignment_expression "*(int *)(iVar2 + -4) = iVar4 + -1" (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(iVar2 + -4);" (assignment_expression "piVar1 = (int *)(iVar2 + -4)" identifier = (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" { (expression_statement "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);" (call_expression "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d)" identifier (argument_list "((undefined4 *)(iVar2 + -0xc),local_1d)" ( (cast_expression "(undefined4 *)(iVar2 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) , identifier ))) ;) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return param_1;" return identifier ;) })) })) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::assign(std::wstring const&) */\n\nwstring * __thiscall std::wstring::assign(wstring *this,wstring *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  allocator local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *(int *)param_1;\n  if (*(int *)this != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *(int *)this;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }\n    *(int *)this = iVar3;\n  }\n  return this;\n}\n\n" comment comment (ERROR "wstring * __thiscall std::wstring::assign(wstring *this,wstring *param_1)" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this,wstring *param_1" (binary_expression "wstring * __thiscall std::wstring::assign(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::assign(wstring" identifier : : identifier : : identifier ( identifier) * identifier) (ERROR ",wstring" , identifier) * identifier) )) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  allocator local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *(int *)param_1;\n  if (*(int *)this != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *(int *)this;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }\n    *(int *)this = iVar3;\n  }\n  return this;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "allocator local_1d [9];" type_identifier (array_declarator "local_1d [9]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x281849;" (assignment_expression "uStack_14 = 0x281849" identifier = number_literal) ;) (expression_statement "iVar3 = *(int *)param_1;" (assignment_expression "iVar3 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (*(int *)this != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *(int *)this;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }\n    *(int *)this = iVar3;\n  }" if (parenthesized_expression "(*(int *)this != iVar3)" ( (binary_expression "*(int *)this != iVar3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != identifier) )) (compound_statement "{\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *(int *)this;\n    if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }\n    *(int *)this = iVar3;\n  }" { (if_statement "if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar3 + -4) < 0)" ( (binary_expression "*(int *)(iVar3 + -4) < 0" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      iVar3 = _Rep::_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);\n    }" { (ERROR "iVar3 = _Rep::" (assignment_expression "iVar3 = _Rep" identifier = identifier) : :) (expression_statement "_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0);" (call_expression "_M_clone((_Rep *)(iVar3 + -0xc),local_1d,0)" identifier (argument_list "((_Rep *)(iVar3 + -0xc),local_1d,0)" ( (cast_expression "(_Rep *)(iVar3 + -0xc)" ( (type_descriptor "_Rep *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) , identifier , number_literal ))) ;) }) (else_clause "else if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" else (if_statement "if ((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "((_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep::_S_empty_rep_storage)" ( (binary_expression "(_Rep *)(iVar3 + -0xc) != (_Rep *)&_Rep" (cast_expression "(_Rep *)(iVar3 + -0xc)" ( (type_descriptor "_Rep *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) != (cast_expression "(_Rep *)&_Rep" ( (type_descriptor "_Rep *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&_Rep" & identifier))) (ERROR "::_S_empty_rep_storage" : : identifier) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }" { (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })))) (expression_statement "iVar2 = *(int *)this;" (assignment_expression "iVar2 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if ((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }" if (parenthesized_expression "((allocator *)(iVar2 + -0xc) != (allocator *)&_Rep::_S_empty_rep_storage)" ( (binary_expression "(allocator *)(iVar2 + -0xc) != (allocator *)&_Rep" (cast_expression "(allocator *)(iVar2 + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (cast_expression "(allocator *)&_Rep" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&_Rep" & identifier))) (ERROR "::_S_empty_rep_storage" : : identifier) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }" { (expression_statement "iVar4 = *(int *)(iVar2 + -4);" (assignment_expression "iVar4 = *(int *)(iVar2 + -4)" identifier = (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(iVar2 + -4) = iVar4 + -1;" (assignment_expression "*(int *)(iVar2 + -4) = iVar4 + -1" (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(iVar2 + -4);" (assignment_expression "piVar1 = (int *)(iVar2 + -4)" identifier = (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar4 < 1) {\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n        _Rep::_M_destroy((allocator *)(iVar2 + -0xc));\n        *(int *)this = iVar3;\n        return this;\n      }" { (labeled_statement "_Rep::_M_destroy((allocator *)(iVar2 + -0xc));" statement_identifier : (ERROR ":" :) (expression_statement "_M_destroy((allocator *)(iVar2 + -0xc));" (call_expression "_M_destroy((allocator *)(iVar2 + -0xc))" identifier (argument_list "((allocator *)(iVar2 + -0xc))" ( (cast_expression "(allocator *)(iVar2 + -0xc)" ( (type_descriptor "allocator *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) ))) ;)) (expression_statement "*(int *)this = iVar3;" (assignment_expression "*(int *)this = iVar3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (return_statement "return this;" return identifier ;) })) })) (expression_statement "*(int *)this = iVar3;" (assignment_expression "*(int *)this = iVar3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "int * FUN_00281840(int *param_1,int *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_00281840(int *param_1,int *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_00281840(int *param_1,int *param_2)" * (function_declarator "FUN_00281840(int *param_1,int *param_2)" identifier (parameter_list "(int *param_1,int *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined1 local_1d [9];" type_identifier (array_declarator "local_1d [9]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x281849;" (assignment_expression "uStack_14 = 0x281849" identifier = number_literal) ;) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" if (parenthesized_expression "(*param_1 != iVar3)" ( (binary_expression "*param_1 != iVar3" (pointer_expression "*param_1" * identifier) != identifier) )) (compound_statement "{\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" { (if_statement "if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "(*(int *)(iVar3 + -4) < 0)" ( (binary_expression "*(int *)(iVar3 + -4) < 0" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }" { (expression_statement "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);" (assignment_expression "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" identifier = (call_expression "FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" identifier (argument_list "((undefined4 *)(iVar3 + -0xc),local_1d,0)" ( (cast_expression "(undefined4 *)(iVar3 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) , identifier , number_literal )))) ;) }) (else_clause "else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" else (if_statement "if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" if (parenthesized_expression "((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080)" ( (binary_expression "(undefined4 *)(iVar3 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar3 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -0xc)" ( (binary_expression "iVar3 + -0xc" identifier + number_literal) ))) != (pointer_expression "&DAT_003b3080" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }" { (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" * (cast_expression "(int *)(iVar3 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + -4)" ( (binary_expression "iVar3 + -4" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) })))) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" if (parenthesized_expression "((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080)" ( (binary_expression "(undefined4 *)(iVar2 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar2 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) != (pointer_expression "&DAT_003b3080" & identifier)) )) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" { (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" if (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" ( (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }" { (expression_statement "iVar4 = *(int *)(iVar2 + -4);" (assignment_expression "iVar4 = *(int *)(iVar2 + -4)" identifier = (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(iVar2 + -4) = iVar4 + -1;" (assignment_expression "*(int *)(iVar2 + -4) = iVar4 + -1" (pointer_expression "*(int *)(iVar2 + -4)" * (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" else (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" { (expression_statement "LOCK();" (call_expression "LOCK()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar1 = (int *)(iVar2 + -4);" (assignment_expression "piVar1 = (int *)(iVar2 + -4)" identifier = (cast_expression "(int *)(iVar2 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -4)" ( (binary_expression "iVar2 + -4" identifier + number_literal) )))) ;) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" * identifier) + number_literal)) ;) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" identifier (argument_list "()" ( ))) ;) }))) (if_statement "if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" if (parenthesized_expression "(iVar4 < 1)" ( (binary_expression "iVar4 < 1" identifier < number_literal) )) (compound_statement "{\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" { (expression_statement "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);" (call_expression "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d)" identifier (argument_list "((undefined4 *)(iVar2 + -0xc),local_1d)" ( (cast_expression "(undefined4 *)(iVar2 + -0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0xc)" ( (binary_expression "iVar2 + -0xc" identifier + number_literal) ))) , identifier ))) ;) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return param_1;" return identifier ;) })) })) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , IDENT , LIT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != (pointer_expression & IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_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 ( ))) ;) }))) })))) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) != (pointer_expression & IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (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) )))) = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_00281840(int *param_1,int *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_00281840(int *param_1,int *param_2)" (* "*") (function_declarator "FUN_00281840(int *param_1,int *param_2)" (identifier "FUN_00281840") (parameter_list "(int *param_1,int *param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  int iVar4;\n  undefined1 local_1d [9];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x281849;\n  iVar3 = *param_2;\n  if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }\n  return param_1;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined1 local_1d [9];" (type_identifier "undefined1") (array_declarator "local_1d [9]" (identifier "local_1d") ([ "[") (number_literal "9") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x281849;" (assignment_expression "uStack_14 = 0x281849" (identifier "uStack_14") (= "=") (number_literal "0x281849")) (; ";")) (expression_statement "iVar3 = *param_2;" (assignment_expression "iVar3 = *param_2" (identifier "iVar3") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (*param_1 != iVar3) {\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" (if "if") (parenthesized_expression "(*param_1 != iVar3)" (( "(") (binary_expression "*param_1 != iVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (identifier "iVar3")) () ")")) (compound_statement "{\n    if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }\n    iVar2 = *param_1;\n    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }\n    *param_1 = iVar3;\n  }" ({ "{") (if_statement "if (*(int *)(iVar3 + -4) < 0) {\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }\n    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar3 + -4) < 0)" (( "(") (binary_expression "*(int *)(iVar3 + -4) < 0" (pointer_expression "*(int *)(iVar3 + -4)" (* "*") (cast_expression "(int *)(iVar3 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -4)" (( "(") (binary_expression "iVar3 + -4" (identifier "iVar3") (+ "+") (number_literal "-4")) () ")")))) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);\n    }" ({ "{") (expression_statement "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);" (assignment_expression "iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" (identifier "iVar3") (= "=") (call_expression "FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0)" (identifier "FUN_00280f90") (argument_list "((undefined4 *)(iVar3 + -0xc),local_1d,0)" (( "(") (cast_expression "(undefined4 *)(iVar3 + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -0xc)" (( "(") (binary_expression "iVar3 + -0xc" (identifier "iVar3") (+ "+") (number_literal "-0xc")) () ")"))) (, ",") (identifier "local_1d") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")) (else_clause "else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" (else "else") (if_statement "if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" (if "if") (parenthesized_expression "((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080)" (( "(") (binary_expression "(undefined4 *)(iVar3 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar3 + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -0xc)" (( "(") (binary_expression "iVar3 + -0xc" (identifier "iVar3") (+ "+") (number_literal "-0xc")) () ")"))) (!= "!=") (pointer_expression "&DAT_003b3080" (& "&") (identifier "DAT_003b3080"))) () ")")) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }\n    }" ({ "{") (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }\n      else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" (identifier "PTR___pthread_key_create_003a9f3c") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n      }" ({ "{") (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" (* "*") (cast_expression "(int *)(iVar3 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -4)" (( "(") (binary_expression "iVar3 + -4" (identifier "iVar3") (+ "+") (number_literal "-4")) () ")")))) (= "=") (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" (* "*") (cast_expression "(int *)(iVar3 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -4)" (( "(") (binary_expression "iVar3 + -4" (identifier "iVar3") (+ "+") (number_literal "-4")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" (else "else") (compound_statement "{\n        LOCK();\n        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;\n        UNLOCK();\n      }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;" (assignment_expression "*(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" (* "*") (cast_expression "(int *)(iVar3 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -4)" (( "(") (binary_expression "iVar3 + -4" (identifier "iVar3") (+ "+") (number_literal "-4")) () ")")))) (= "=") (binary_expression "*(int *)(iVar3 + -4) + 1" (pointer_expression "*(int *)(iVar3 + -4)" (* "*") (cast_expression "(int *)(iVar3 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + -4)" (( "(") (binary_expression "iVar3 + -4" (identifier "iVar3") (+ "+") (number_literal "-4")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (} "}"))))) (expression_statement "iVar2 = *param_1;" (assignment_expression "iVar2 = *param_1" (identifier "iVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" (if "if") (parenthesized_expression "((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080)" (( "(") (binary_expression "(undefined4 *)(iVar2 + -0xc) != &DAT_003b3080" (cast_expression "(undefined4 *)(iVar2 + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))) (!= "!=") (pointer_expression "&DAT_003b3080" (& "&") (identifier "DAT_003b3080"))) () ")")) (compound_statement "{\n      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }\n      if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }\n    }" ({ "{") (if_statement "if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }\n      else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (if "if") (parenthesized_expression "(PTR___pthread_key_create_003a9f3c == (undefined *)0x0)" (( "(") (binary_expression "PTR___pthread_key_create_003a9f3c == (undefined *)0x0" (identifier "PTR___pthread_key_create_003a9f3c") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        iVar4 = *(int *)(iVar2 + -4);\n        *(int *)(iVar2 + -4) = iVar4 + -1;\n      }" ({ "{") (expression_statement "iVar4 = *(int *)(iVar2 + -4);" (assignment_expression "iVar4 = *(int *)(iVar2 + -4)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar2 + -4)" (* "*") (cast_expression "(int *)(iVar2 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")"))))) (; ";")) (expression_statement "*(int *)(iVar2 + -4) = iVar4 + -1;" (assignment_expression "*(int *)(iVar2 + -4) = iVar4 + -1" (pointer_expression "*(int *)(iVar2 + -4)" (* "*") (cast_expression "(int *)(iVar2 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" (else "else") (compound_statement "{\n        LOCK();\n        piVar1 = (int *)(iVar2 + -4);\n        iVar4 = *piVar1;\n        *piVar1 = *piVar1 + -1;\n        UNLOCK();\n      }" ({ "{") (expression_statement "LOCK();" (call_expression "LOCK()" (identifier "LOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar1 = (int *)(iVar2 + -4);" (assignment_expression "piVar1 = (int *)(iVar2 + -4)" (identifier "piVar1") (= "=") (cast_expression "(int *)(iVar2 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -4)" (( "(") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4")) () ")")))) (; ";")) (expression_statement "iVar4 = *piVar1;" (assignment_expression "iVar4 = *piVar1" (identifier "iVar4") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "*piVar1 = *piVar1 + -1;" (assignment_expression "*piVar1 = *piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "*piVar1 + -1" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "UNLOCK();" (call_expression "UNLOCK()" (identifier "UNLOCK") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (if_statement "if (iVar4 < 1) {\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" (if "if") (parenthesized_expression "(iVar4 < 1)" (( "(") (binary_expression "iVar4 < 1" (identifier "iVar4") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);\n        *param_1 = iVar3;\n        return param_1;\n      }" ({ "{") (expression_statement "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);" (call_expression "FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d)" (identifier "FUN_0027ff70") (argument_list "((undefined4 *)(iVar2 + -0xc),local_1d)" (( "(") (cast_expression "(undefined4 *)(iVar2 + -0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -0xc)" (( "(") (binary_expression "iVar2 + -0xc" (identifier "iVar2") (+ "+") (number_literal "-0xc")) () ")"))) (, ",") (identifier "local_1d") () ")"))) (; ";")) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar3")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (} "}"))) (expression_statement "*param_1 = iVar3;" (assignment_expression "*param_1 = iVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::assign(std::wstring const&) */

wstring * __thiscall std::wstring::assign(wstring *this,wstring *param_1)

{
  int *piVar1;
  int var_6;
  int var_1;
  int var_7;
  type_1 local_1d [9];
  type_2 uStack_14;
  
  uStack_14 = 0x281849;
  var_1 = *(int *)param_1;
  if (*(int *)this != var_1) {
    if (*(int *)(var_1 + -4) < 0) {
      var_1 = type_3::var_2((type_3 *)(var_1 + -0xc),local_1d,0);
    }
    else if ((type_3 *)(var_1 + -0xc) != (type_3 *)&type_3::_S_empty_rep_storage) {
      if (var_3 == (type_4 *)0x0) {
        *(int *)(var_1 + -4) = *(int *)(var_1 + -4) + 1;
      }
      else {
        var_4();
        *(int *)(var_1 + -4) = *(int *)(var_1 + -4) + 1;
        var_5();
      }
    }
    var_6 = *(int *)this;
    if ((type_1 *)(var_6 + -0xc) != (type_1 *)&type_3::_S_empty_rep_storage) {
      if (var_3 == (type_4 *)0x0) {
        var_7 = *(int *)(var_6 + -4);
        *(int *)(var_6 + -4) = var_7 + -1;
      }
      else {
        var_4();
        piVar1 = (int *)(var_6 + -4);
        var_7 = *piVar1;
        *piVar1 = *piVar1 + -1;
        var_5();
      }
      if (var_7 < 1) {
        _Rep::var_8((type_1 *)(var_6 + -0xc));
        *(int *)this = var_1;
        return this;
      }
    }
    *(int *)this = var_1;
  }
  return this;
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier)))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier))) consequence: (compound_statement (if_statement condition: (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: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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)))) (identifier) (number_literal)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (pointer_expression argument: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_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: (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: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_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: (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: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (pointer_expression argument: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_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: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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)))) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) (return_statement (identifier)))))

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

int * MASKED(int *param_1,int *param_2)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  undefined1 local_1d [9];
  undefined4 uStack_14;
  
  uStack_14 = 0x281849;
  iVar3 = *param_2;
  if (*param_1 != iVar3) {
    if (*(int *)(iVar3 + -4) < 0) {
      iVar3 = FUN_00280f90((undefined4 *)(iVar3 + -0xc),local_1d,0);
    }
    else if ((undefined4 *)(iVar3 + -0xc) != &DAT_003b3080) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
      }
      else {
        LOCK();
        *(int *)(iVar3 + -4) = *(int *)(iVar3 + -4) + 1;
        UNLOCK();
      }
    }
    iVar2 = *param_1;
    if ((undefined4 *)(iVar2 + -0xc) != &DAT_003b3080) {
      if (PTR___pthread_key_create_003a9f3c == (undefined *)0x0) {
        iVar4 = *(int *)(iVar2 + -4);
        *(int *)(iVar2 + -4) = iVar4 + -1;
      }
      else {
        LOCK();
        piVar1 = (int *)(iVar2 + -4);
        iVar4 = *piVar1;
        *piVar1 = *piVar1 + -1;
        UNLOCK();
      }
      if (iVar4 < 1) {
        FUN_0027ff70((undefined4 *)(iVar2 + -0xc),local_1d);
        *param_1 = iVar3;
        return param_1;
      }
    }
    *param_1 = iVar3;
  }
  return param_1;
}

