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

_Bool re_node_set_insert_last(re_node_set *set,Idx elem)

{
  Idx *__ptr;
  int iVar1;
  
  iVar1 = set->nelem;
  __ptr = set->elems;
  if (set->alloc == iVar1) {
    set->alloc = (iVar1 + 1) * 2;
    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);
    if (__ptr == (Idx *)0x0) {
      return false;
    }
    set->elems = __ptr;
    iVar1 = set->nelem;
  }
  set->nelem = iVar1 + 1;
  __ptr[iVar1] = elem;
  return true;
}



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

undefined4 FUN_0007a100(int *param_1,undefined4 param_2)

{
  void *__ptr;
  int iVar1;
  
  iVar1 = param_1[1];
  __ptr = (void *)param_1[2];
  if (*param_1 == iVar1) {
    *param_1 = (iVar1 + 1) * 2;
    __ptr = realloc(__ptr,(iVar1 + 1) * 8);
    if (__ptr == (void *)0x0) {
      return 0;
    }
    param_1[2] = (int)__ptr;
    iVar1 = param_1[1];
  }
  param_1[1] = iVar1 + 1;
  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;
  return 1;
}


PUSH ESI
PUSH EBX
CALL 0x00016f50
ADD EBX,0x44bdd
SUB ESP,0x4
MOV ESI,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESI + 0x4]
CMP dword ptr [ESI],EDX
MOV EAX,dword ptr [ESI + 0x8]
JZ 0x0007a140
LEA ECX,[EDX + 0x1]
MOV dword ptr [ESI + 0x4],ECX
MOV ECX,dword ptr [ESP + 0x14]
MOV dword ptr [EAX + EDX*0x4],ECX
MOV EAX,0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
ADD EDX,0x1
SUB ESP,0x8
LEA ECX,[EDX + EDX*0x1]
SHL EDX,0x3
MOV dword ptr [ESI],ECX
PUSH EDX
PUSH EAX
CALL 0x00014130
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0007a168
MOV dword ptr [ESI + 0x8],EAX
MOV EDX,dword ptr [ESI + 0x4]
JMP 0x0007a11e
XOR EAX,EAX
JMP 0x0007a130
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0007a100(int *param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_0007a100(int *param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" type_identifier (function_declarator "FUN_0007a100(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "__ptr = (void *)param_1[2];" (assignment_expression "__ptr = (void *)param_1[2]" identifier = (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" if (parenthesized_expression "(*param_1 == iVar1)" ( (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" * identifier) == identifier) )) (compound_statement "{\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" { (expression_statement "*param_1 = (iVar1 + 1) * 2;" (assignment_expression "*param_1 = (iVar1 + 1) * 2" (pointer_expression "*param_1" * identifier) = (binary_expression "(iVar1 + 1) * 2" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "__ptr = realloc(__ptr,(iVar1 + 1) * 8);" (assignment_expression "__ptr = realloc(__ptr,(iVar1 + 1) * 8)" identifier = (call_expression "realloc(__ptr,(iVar1 + 1) * 8)" identifier (argument_list "(__ptr,(iVar1 + 1) * 8)" ( identifier , (binary_expression "(iVar1 + 1) * 8" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal) )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[2] = (int)__ptr;" (assignment_expression "param_1[2] = (int)__ptr" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) })) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)__ptr + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)__ptr + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__ptr + iVar1 * 4)" ( (binary_expression "(int)__ptr + iVar1 * 4" (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\n_Bool re_node_set_insert_last(re_node_set *set,Idx elem)\n\n{\n  Idx *__ptr;\n  int iVar1;\n  \n  iVar1 = set->nelem;\n  __ptr = set->elems;\n  if (set->alloc == iVar1) {\n    set->alloc = (iVar1 + 1) * 2;\n    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (Idx *)0x0) {\n      return false;\n    }\n    set->elems = __ptr;\n    iVar1 = set->nelem;\n  }\n  set->nelem = iVar1 + 1;\n  __ptr[iVar1] = elem;\n  return true;\n}\n\n" comment comment (function_definition "_Bool re_node_set_insert_last(re_node_set *set,Idx elem)\n\n{\n  Idx *__ptr;\n  int iVar1;\n  \n  iVar1 = set->nelem;\n  __ptr = set->elems;\n  if (set->alloc == iVar1) {\n    set->alloc = (iVar1 + 1) * 2;\n    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (Idx *)0x0) {\n      return false;\n    }\n    set->elems = __ptr;\n    iVar1 = set->nelem;\n  }\n  set->nelem = iVar1 + 1;\n  __ptr[iVar1] = elem;\n  return true;\n}" type_identifier (function_declarator "re_node_set_insert_last(re_node_set *set,Idx elem)" identifier (parameter_list "(re_node_set *set,Idx elem)" ( (parameter_declaration "re_node_set *set" type_identifier (pointer_declarator "*set" * identifier)) , (parameter_declaration "Idx elem" type_identifier identifier) ))) (compound_statement "{\n  Idx *__ptr;\n  int iVar1;\n  \n  iVar1 = set->nelem;\n  __ptr = set->elems;\n  if (set->alloc == iVar1) {\n    set->alloc = (iVar1 + 1) * 2;\n    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (Idx *)0x0) {\n      return false;\n    }\n    set->elems = __ptr;\n    iVar1 = set->nelem;\n  }\n  set->nelem = iVar1 + 1;\n  __ptr[iVar1] = elem;\n  return true;\n}" { (declaration "Idx *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = set->nelem;" (assignment_expression "iVar1 = set->nelem" identifier = (field_expression "set->nelem" identifier -> field_identifier)) ;) (expression_statement "__ptr = set->elems;" (assignment_expression "__ptr = set->elems" identifier = (field_expression "set->elems" identifier -> field_identifier)) ;) (if_statement "if (set->alloc == iVar1) {\n    set->alloc = (iVar1 + 1) * 2;\n    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (Idx *)0x0) {\n      return false;\n    }\n    set->elems = __ptr;\n    iVar1 = set->nelem;\n  }" if (parenthesized_expression "(set->alloc == iVar1)" ( (binary_expression "set->alloc == iVar1" (field_expression "set->alloc" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    set->alloc = (iVar1 + 1) * 2;\n    __ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (Idx *)0x0) {\n      return false;\n    }\n    set->elems = __ptr;\n    iVar1 = set->nelem;\n  }" { (expression_statement "set->alloc = (iVar1 + 1) * 2;" (assignment_expression "set->alloc = (iVar1 + 1) * 2" (field_expression "set->alloc" identifier -> field_identifier) = (binary_expression "(iVar1 + 1) * 2" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "__ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8);" (assignment_expression "__ptr = (Idx *)realloc(__ptr,(iVar1 + 1) * 8)" identifier = (cast_expression "(Idx *)realloc(__ptr,(iVar1 + 1) * 8)" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "realloc(__ptr,(iVar1 + 1) * 8)" identifier (argument_list "(__ptr,(iVar1 + 1) * 8)" ( identifier , (binary_expression "(iVar1 + 1) * 8" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal) ))))) ;) (if_statement "if (__ptr == (Idx *)0x0) {\n      return false;\n    }" if (parenthesized_expression "(__ptr == (Idx *)0x0)" ( (binary_expression "__ptr == (Idx *)0x0" identifier == (cast_expression "(Idx *)0x0" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return false;\n    }" { (return_statement "return false;" return false ;) })) (expression_statement "set->elems = __ptr;" (assignment_expression "set->elems = __ptr" (field_expression "set->elems" identifier -> field_identifier) = identifier) ;) (expression_statement "iVar1 = set->nelem;" (assignment_expression "iVar1 = set->nelem" identifier = (field_expression "set->nelem" identifier -> field_identifier)) ;) })) (expression_statement "set->nelem = iVar1 + 1;" (assignment_expression "set->nelem = iVar1 + 1" (field_expression "set->nelem" identifier -> field_identifier) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "__ptr[iVar1] = elem;" (assignment_expression "__ptr[iVar1] = elem" (subscript_expression "__ptr[iVar1]" identifier [ identifier ]) = identifier) ;) (return_statement "return true;" return true ;) })))
(translation_unit "undefined4 FUN_0007a100(int *param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_0007a100(int *param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" type_identifier (function_declarator "FUN_0007a100(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "__ptr = (void *)param_1[2];" (assignment_expression "__ptr = (void *)param_1[2]" identifier = (cast_expression "(void *)param_1[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" if (parenthesized_expression "(*param_1 == iVar1)" ( (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" * identifier) == identifier) )) (compound_statement "{\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" { (expression_statement "*param_1 = (iVar1 + 1) * 2;" (assignment_expression "*param_1 = (iVar1 + 1) * 2" (pointer_expression "*param_1" * identifier) = (binary_expression "(iVar1 + 1) * 2" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal)) ;) (expression_statement "__ptr = realloc(__ptr,(iVar1 + 1) * 8);" (assignment_expression "__ptr = realloc(__ptr,(iVar1 + 1) * 8)" identifier = (call_expression "realloc(__ptr,(iVar1 + 1) * 8)" identifier (argument_list "(__ptr,(iVar1 + 1) * 8)" ( identifier , (binary_expression "(iVar1 + 1) * 8" (parenthesized_expression "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) )) * number_literal) )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "param_1[2] = (int)__ptr;" (assignment_expression "param_1[2] = (int)__ptr" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) })) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)__ptr + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)__ptr + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__ptr + iVar1 * 4)" ( (binary_expression "(int)__ptr + iVar1 * 4" (cast_expression "(int)__ptr" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0007a100(int *param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_0007a100(int *param_1,undefined4 param_2)" (identifier "FUN_0007a100") (parameter_list "(int *param_1,undefined4 param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  iVar1 = param_1[1];\n  __ptr = (void *)param_1[2];\n  if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }\n  param_1[1] = iVar1 + 1;\n  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;\n  return 1;\n}" ({ "{") (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" (identifier "iVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "__ptr = (void *)param_1[2];" (assignment_expression "__ptr = (void *)param_1[2]" (identifier "__ptr") (= "=") (cast_expression "(void *)param_1[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if (*param_1 == iVar1) {\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" (if "if") (parenthesized_expression "(*param_1 == iVar1)" (( "(") (binary_expression "*param_1 == iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (identifier "iVar1")) () ")")) (compound_statement "{\n    *param_1 = (iVar1 + 1) * 2;\n    __ptr = realloc(__ptr,(iVar1 + 1) * 8);\n    if (__ptr == (void *)0x0) {\n      return 0;\n    }\n    param_1[2] = (int)__ptr;\n    iVar1 = param_1[1];\n  }" ({ "{") (expression_statement "*param_1 = (iVar1 + 1) * 2;" (assignment_expression "*param_1 = (iVar1 + 1) * 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "(iVar1 + 1) * 2" (parenthesized_expression "(iVar1 + 1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "2"))) (; ";")) (expression_statement "__ptr = realloc(__ptr,(iVar1 + 1) * 8);" (assignment_expression "__ptr = realloc(__ptr,(iVar1 + 1) * 8)" (identifier "__ptr") (= "=") (call_expression "realloc(__ptr,(iVar1 + 1) * 8)" (identifier "realloc") (argument_list "(__ptr,(iVar1 + 1) * 8)" (( "(") (identifier "__ptr") (, ",") (binary_expression "(iVar1 + 1) * 8" (parenthesized_expression "(iVar1 + 1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "8")) () ")")))) (; ";")) (if_statement "if (__ptr == (void *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(__ptr == (void *)0x0)" (( "(") (binary_expression "__ptr == (void *)0x0" (identifier "__ptr") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "param_1[2] = (int)__ptr;" (assignment_expression "param_1[2] = (int)__ptr" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)__ptr" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__ptr"))) (; ";")) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" (identifier "iVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (} "}"))) (expression_statement "param_1[1] = iVar1 + 1;" (assignment_expression "param_1[1] = iVar1 + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)__ptr + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)__ptr + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)((int)__ptr + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__ptr + iVar1 * 4)" (( "(") (binary_expression "(int)__ptr + iVar1 * 4" (cast_expression "(int)__ptr" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__ptr")) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

type_1 function_1(type_2 *set,type_3 elem)

{
  type_3 *var_3;
  int var_1;
  
  var_1 = set->nelem;
  var_3 = set->elems;
  if (set->alloc == var_1) {
    set->alloc = (var_1 + 1) * 2;
    var_3 = (type_3 *)var_2(var_3,(var_1 + 1) * 8);
    if (var_3 == (type_3 *)0x0) {
      return false;
    }
    set->elems = var_3;
    var_1 = set->nelem;
  }
  set->nelem = var_1 + 1;
  var_3[var_1] = elem;
  return true;
}


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

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

undefined4 MASKED(int *param_1,undefined4 param_2)

{
  void *__ptr;
  int iVar1;
  
  iVar1 = param_1[1];
  __ptr = (void *)param_1[2];
  if (*param_1 == iVar1) {
    *param_1 = (iVar1 + 1) * 2;
    __ptr = realloc(__ptr,(iVar1 + 1) * 8);
    if (__ptr == (void *)0x0) {
      return 0;
    }
    param_1[2] = (int)__ptr;
    iVar1 = param_1[1];
  }
  param_1[1] = iVar1 + 1;
  *(undefined4 *)((int)__ptr + iVar1 * 4) = param_2;
  return 1;
}

