
_Bool re_node_set_insert(re_node_set *set,Idx elem)

{
  undefined *puVar1;
  undefined *puVar2;
  _Bool _Var5;
  Idx *pIVar3;
  int *piVar4;
  int iVar6;
  int *piVar7;
  int iVar8;
  int *piVar9;
  
  puVar2 = PTR_realloc_0003e298;
  puVar1 = PTR_malloc_0003e294;
  if (set->alloc == 0) {
    set->alloc = 1;
    set->nelem = 1;
    pIVar3 = (Idx *)(*(code *)puVar1)(4);
    set->elems = pIVar3;
    if (pIVar3 != (Idx *)0x0) {
      *pIVar3 = elem;
      return true;
    }
    set->nelem = 0;
    set->alloc = 0;
    _Var5 = false;
  }
  else {
    iVar8 = set->nelem;
    piVar7 = set->elems;
    if (iVar8 == 0) {
      *piVar7 = elem;
      _Var5 = true;
      set->nelem = set->nelem + 1;
    }
    else {
      if (set->alloc == iVar8) {
        set->alloc = iVar8 << 1;
        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);
        if (piVar7 == (int *)0x0) {
          return false;
        }
        iVar8 = set->nelem;
        set->elems = piVar7;
      }
      if (elem < *piVar7) {
        if (0 < iVar8) {
          piVar4 = piVar7 + iVar8;
          do {
            piVar9 = piVar4 + -1;
            *piVar4 = piVar4[-1];
            piVar4 = piVar9;
          } while (piVar7 != piVar9);
          iVar8 = 0;
        }
      }
      else {
        iVar6 = piVar7[iVar8 + -1];
        if (elem < iVar6) {
          piVar4 = piVar7 + iVar8;
          do {
            *piVar4 = iVar6;
            iVar6 = piVar4[-2];
            iVar8 = iVar8 + -1;
            piVar4 = piVar4 + -1;
          } while (elem < iVar6);
        }
      }
      _Var5 = true;
      piVar7[iVar8] = elem;
      set->nelem = set->nelem + 1;
    }
  }
  return _Var5;
}



undefined4 FUN_00019d18(int *param_1,int param_2)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  int *piVar6;
  int iVar7;
  int *piVar8;
  
  puVar2 = PTR_realloc_0003e298;
  puVar1 = PTR_malloc_0003e294;
  if (*param_1 == 0) {
    *param_1 = 1;
    param_1[1] = 1;
    piVar6 = (int *)(*(code *)puVar1)(4);
    param_1[2] = (int)piVar6;
    if (piVar6 != (int *)0x0) {
      *piVar6 = param_2;
      return 1;
    }
    param_1[1] = 0;
    *param_1 = 0;
    uVar3 = 0;
  }
  else {
    iVar7 = param_1[1];
    piVar6 = (int *)param_1[2];
    if (iVar7 == 0) {
      *piVar6 = param_2;
      uVar3 = 1;
      param_1[1] = param_1[1] + 1;
    }
    else {
      if (*param_1 == iVar7) {
        *param_1 = iVar7 << 1;
        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);
        if (piVar6 == (int *)0x0) {
          return 0;
        }
        iVar7 = param_1[1];
        param_1[2] = (int)piVar6;
      }
      if (param_2 < *piVar6) {
        if (0 < iVar7) {
          piVar4 = piVar6 + iVar7;
          do {
            piVar8 = piVar4 + -1;
            *piVar4 = piVar4[-1];
            piVar4 = piVar8;
          } while (piVar6 != piVar8);
          iVar7 = 0;
        }
      }
      else {
        iVar5 = piVar6[iVar7 + -1];
        if (param_2 < iVar5) {
          piVar4 = piVar6 + iVar7;
          do {
            *piVar4 = iVar5;
            iVar5 = piVar4[-2];
            iVar7 = iVar7 + -1;
            piVar4 = piVar4 + -1;
          } while (param_2 < iVar5);
        }
      }
      uVar3 = 1;
      piVar6[iVar7] = param_2;
      param_1[1] = param_1[1] + 1;
    }
  }
  return uVar3;
}


lui gp,0x3
addiu gp,gp,-0x3c58
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0x0(a0)
sw gp,0x10(sp)
sw s1,0x20(sp)
or s1,a1,zero
sw s0,0x1c(sp)
or s0,a0,zero
beq v0,zero,0x00019d7c
_sw ra,0x24(sp)
lw a1,0x4(a0)
bne a1,zero,0x00019db8
_lw a0,0x8(a0)
sw s1,0x0(a0)
li v0,0x1
lw v1,0x4(s0)
addiu v1,v1,0x1
sw v1,0x4(s0)
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
li v0,0x1
lw t9,-0x7e2c(gp)
li a0,0x4
sw v0,0x0(s0)
jalr t9
_sw v0,0x4(s0)
beq v0,zero,0x00019e5c
_sw v0,0x8(s0)
lw ra,0x24(sp)
lw s0,0x1c(sp)
sw s1,0x0(v0)
li v0,0x1
lw s1,0x20(sp)
jr ra
_addiu sp,sp,0x28
beq v0,a1,0x00019e68
_sll v0,a1,0x1
lw v0,0x0(a0)
slt v0,s1,v0
beq v0,zero,0x00019e14
_or a2,a1,zero
blez a1,0x00019df4
_nop
sll a1,a1,0x2
addu a1,a0,a1
lw v0,-0x4(a1)
addiu a1,a1,-0x4
bne a0,a1,0x00019de0
_sw v0,0x4(a1)
or a2,zero,zero
sll a2,a2,0x2
li v0,0x1
addu a0,a0,a2
sw s1,0x0(a0)
lw v1,0x4(s0)
addiu v1,v1,0x1
b 0x00019d68
_sw v1,0x4(s0)
sll v0,a1,0x2
addiu v0,v0,-0x4
addu v1,a0,v0
lw v1,0x0(v1)
slt a3,s1,v1
beq a3,zero,0x00019df4
_nop
addiu v0,v0,0x4
addu v0,a0,v0
sw v1,0x0(v0)
addiu v0,v0,-0x4
lw v1,-0x4(v0)
addiu a1,a1,-0x1
slt a3,s1,v1
bne a3,zero,0x00019e38
_or a2,a1,zero
b 0x00019df8
_sll a2,a2,0x2
sw zero,0x4(s0)
b 0x00019d68
_sw zero,0x0(s0)
lw t9,-0x7e28(gp)
sll a1,a1,0x3
jalr t9
_sw v0,0x0(s0)
beq v0,zero,0x00019e8c
_or a0,v0,zero
lw a1,0x4(s0)
b 0x00019dc0
_sw v0,0x8(s0)
b 0x00019d68
_or v0,zero,zero
(translation_unit "undefined4 FUN_00019d18(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_00019d18(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00019d18(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 identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (expression_statement "puVar2 = PTR_realloc_0003e298;" (assignment_expression "puVar2 = PTR_realloc_0003e298" identifier = identifier) ;) (expression_statement "puVar1 = PTR_malloc_0003e294;" (assignment_expression "puVar1 = PTR_malloc_0003e294" identifier = identifier) ;) (if_statement "if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar6 = (int *)(*(code *)puVar1)(4);" (assignment_expression "piVar6 = (int *)(*(code *)puVar1)(4)" identifier = (cast_expression "(int *)(*(code *)puVar1)(4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }" if (parenthesized_expression "(piVar6 != (int *)0x0)" ( (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *piVar6 = param_2;\n      return 1;\n    }" { (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" else (compound_statement "{\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" { (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar6 = (int *)param_1[2];" (assignment_expression "piVar6 = (int *)param_1[2]" identifier = (cast_expression "(int *)param_1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }" { (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" * identifier) = identifier) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" else (compound_statement "{\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" { (if_statement "if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" if (parenthesized_expression "(*param_1 == iVar7)" ( (binary_expression "*param_1 == iVar7" (pointer_expression "*param_1" * identifier) == identifier) )) (compound_statement "{\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" { (expression_statement "*param_1 = iVar7 << 1;" (assignment_expression "*param_1 = iVar7 << 1" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar7 << 1" identifier << number_literal)) ;) (expression_statement "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);" (assignment_expression "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" identifier = (cast_expression "(int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar2)(piVar6,iVar7 << 3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar6,iVar7 << 3)" ( identifier , (binary_expression "iVar7 << 3" identifier << number_literal) ))))) ;) (if_statement "if (piVar6 == (int *)0x0) {\n          return 0;\n        }" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (if_statement "if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" if (parenthesized_expression "(param_2 < *piVar6)" ( (binary_expression "param_2 < *piVar6" identifier < (pointer_expression "*piVar6" * identifier)) )) (compound_statement "{\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }" { (if_statement "if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" if (parenthesized_expression "(0 < iVar7)" ( (binary_expression "0 < iVar7" number_literal < identifier) )) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" { (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" identifier = (binary_expression "piVar6 + iVar7" identifier + identifier)) ;) (do_statement "do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);" do (compound_statement "{\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          }" { (expression_statement "piVar8 = piVar4 + -1;" (assignment_expression "piVar8 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) (expression_statement "*piVar4 = piVar4[-1];" (assignment_expression "*piVar4 = piVar4[-1]" (pointer_expression "*piVar4" * identifier) = (subscript_expression "piVar4[-1]" identifier [ number_literal ])) ;) (expression_statement "piVar4 = piVar8;" (assignment_expression "piVar4 = piVar8" identifier = identifier) ;) }) while (parenthesized_expression "(piVar6 != piVar8)" ( (binary_expression "piVar6 != piVar8" identifier != identifier) )) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) })) }) (else_clause "else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" else (compound_statement "{\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" { (expression_statement "iVar5 = piVar6[iVar7 + -1];" (assignment_expression "iVar5 = piVar6[iVar7 + -1]" identifier = (subscript_expression "piVar6[iVar7 + -1]" identifier [ (binary_expression "iVar7 + -1" identifier + number_literal) ])) ;) (if_statement "if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" if (parenthesized_expression "(param_2 < iVar5)" ( (binary_expression "param_2 < iVar5" identifier < identifier) )) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" { (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" identifier = (binary_expression "piVar6 + iVar7" identifier + identifier)) ;) (do_statement "do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);" do (compound_statement "{\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          }" { (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[-2];" (assignment_expression "iVar5 = piVar4[-2]" identifier = (subscript_expression "piVar4[-2]" identifier [ number_literal ])) ;) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "piVar4 = piVar4 + -1;" (assignment_expression "piVar4 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 < iVar5)" ( (binary_expression "param_2 < iVar5" identifier < identifier) )) ;) })) }))) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "piVar6[iVar7] = param_2;" (assignment_expression "piVar6[iVar7] = param_2" (subscript_expression "piVar6[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) }))) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "_Bool re_node_set_insert(re_node_set *set,Idx elem)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  _Bool _Var5;\n  Idx *pIVar3;\n  int *piVar4;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (set->alloc == 0) {\n    set->alloc = 1;\n    set->nelem = 1;\n    pIVar3 = (Idx *)(*(code *)puVar1)(4);\n    set->elems = pIVar3;\n    if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }\n    set->nelem = 0;\n    set->alloc = 0;\n    _Var5 = false;\n  }\n  else {\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }\n  return _Var5;\n}\n\n" (function_definition "_Bool re_node_set_insert(re_node_set *set,Idx elem)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  _Bool _Var5;\n  Idx *pIVar3;\n  int *piVar4;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (set->alloc == 0) {\n    set->alloc = 1;\n    set->nelem = 1;\n    pIVar3 = (Idx *)(*(code *)puVar1)(4);\n    set->elems = pIVar3;\n    if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }\n    set->nelem = 0;\n    set->alloc = 0;\n    _Var5 = false;\n  }\n  else {\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }\n  return _Var5;\n}" type_identifier (function_declarator "re_node_set_insert(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  undefined *puVar1;\n  undefined *puVar2;\n  _Bool _Var5;\n  Idx *pIVar3;\n  int *piVar4;\n  int iVar6;\n  int *piVar7;\n  int iVar8;\n  int *piVar9;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (set->alloc == 0) {\n    set->alloc = 1;\n    set->nelem = 1;\n    pIVar3 = (Idx *)(*(code *)puVar1)(4);\n    set->elems = pIVar3;\n    if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }\n    set->nelem = 0;\n    set->alloc = 0;\n    _Var5 = false;\n  }\n  else {\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }\n  return _Var5;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "_Bool _Var5;" type_identifier identifier ;) (declaration "Idx *pIVar3;" type_identifier (pointer_declarator "*pIVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int *piVar9;" primitive_type (pointer_declarator "*piVar9" * identifier) ;) (expression_statement "puVar2 = PTR_realloc_0003e298;" (assignment_expression "puVar2 = PTR_realloc_0003e298" identifier = identifier) ;) (expression_statement "puVar1 = PTR_malloc_0003e294;" (assignment_expression "puVar1 = PTR_malloc_0003e294" identifier = identifier) ;) (if_statement "if (set->alloc == 0) {\n    set->alloc = 1;\n    set->nelem = 1;\n    pIVar3 = (Idx *)(*(code *)puVar1)(4);\n    set->elems = pIVar3;\n    if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }\n    set->nelem = 0;\n    set->alloc = 0;\n    _Var5 = false;\n  }\n  else {\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }" if (parenthesized_expression "(set->alloc == 0)" ( (binary_expression "set->alloc == 0" (field_expression "set->alloc" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    set->alloc = 1;\n    set->nelem = 1;\n    pIVar3 = (Idx *)(*(code *)puVar1)(4);\n    set->elems = pIVar3;\n    if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }\n    set->nelem = 0;\n    set->alloc = 0;\n    _Var5 = false;\n  }" { (expression_statement "set->alloc = 1;" (assignment_expression "set->alloc = 1" (field_expression "set->alloc" identifier -> field_identifier) = number_literal) ;) (expression_statement "set->nelem = 1;" (assignment_expression "set->nelem = 1" (field_expression "set->nelem" identifier -> field_identifier) = number_literal) ;) (expression_statement "pIVar3 = (Idx *)(*(code *)puVar1)(4);" (assignment_expression "pIVar3 = (Idx *)(*(code *)puVar1)(4)" identifier = (cast_expression "(Idx *)(*(code *)puVar1)(4)" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "set->elems = pIVar3;" (assignment_expression "set->elems = pIVar3" (field_expression "set->elems" identifier -> field_identifier) = identifier) ;) (if_statement "if (pIVar3 != (Idx *)0x0) {\n      *pIVar3 = elem;\n      return true;\n    }" if (parenthesized_expression "(pIVar3 != (Idx *)0x0)" ( (binary_expression "pIVar3 != (Idx *)0x0" identifier != (cast_expression "(Idx *)0x0" ( (type_descriptor "Idx *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *pIVar3 = elem;\n      return true;\n    }" { (expression_statement "*pIVar3 = elem;" (assignment_expression "*pIVar3 = elem" (pointer_expression "*pIVar3" * identifier) = identifier) ;) (return_statement "return true;" return true ;) })) (expression_statement "set->nelem = 0;" (assignment_expression "set->nelem = 0" (field_expression "set->nelem" identifier -> field_identifier) = number_literal) ;) (expression_statement "set->alloc = 0;" (assignment_expression "set->alloc = 0" (field_expression "set->alloc" identifier -> field_identifier) = number_literal) ;) (expression_statement "_Var5 = false;" (assignment_expression "_Var5 = false" identifier = false) ;) }) (else_clause "else {\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }" else (compound_statement "{\n    iVar8 = set->nelem;\n    piVar7 = set->elems;\n    if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }\n  }" { (expression_statement "iVar8 = set->nelem;" (assignment_expression "iVar8 = set->nelem" identifier = (field_expression "set->nelem" identifier -> field_identifier)) ;) (expression_statement "piVar7 = set->elems;" (assignment_expression "piVar7 = set->elems" identifier = (field_expression "set->elems" identifier -> field_identifier)) ;) (if_statement "if (iVar8 == 0) {\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }\n    else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n      *piVar7 = elem;\n      _Var5 = true;\n      set->nelem = set->nelem + 1;\n    }" { (expression_statement "*piVar7 = elem;" (assignment_expression "*piVar7 = elem" (pointer_expression "*piVar7" * identifier) = identifier) ;) (expression_statement "_Var5 = true;" (assignment_expression "_Var5 = true" identifier = true) ;) (expression_statement "set->nelem = set->nelem + 1;" (assignment_expression "set->nelem = set->nelem + 1" (field_expression "set->nelem" identifier -> field_identifier) = (binary_expression "set->nelem + 1" (field_expression "set->nelem" identifier -> field_identifier) + number_literal)) ;) }) (else_clause "else {\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }" else (compound_statement "{\n      if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }\n      if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }\n      _Var5 = true;\n      piVar7[iVar8] = elem;\n      set->nelem = set->nelem + 1;\n    }" { (if_statement "if (set->alloc == iVar8) {\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }" if (parenthesized_expression "(set->alloc == iVar8)" ( (binary_expression "set->alloc == iVar8" (field_expression "set->alloc" identifier -> field_identifier) == identifier) )) (compound_statement "{\n        set->alloc = iVar8 << 1;\n        piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);\n        if (piVar7 == (int *)0x0) {\n          return false;\n        }\n        iVar8 = set->nelem;\n        set->elems = piVar7;\n      }" { (expression_statement "set->alloc = iVar8 << 1;" (assignment_expression "set->alloc = iVar8 << 1" (field_expression "set->alloc" identifier -> field_identifier) = (binary_expression "iVar8 << 1" identifier << number_literal)) ;) (expression_statement "piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3);" (assignment_expression "piVar7 = (int *)(*(code *)puVar2)(piVar7,iVar8 << 3)" identifier = (cast_expression "(int *)(*(code *)puVar2)(piVar7,iVar8 << 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar2)(piVar7,iVar8 << 3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar7,iVar8 << 3)" ( identifier , (binary_expression "iVar8 << 3" identifier << number_literal) ))))) ;) (if_statement "if (piVar7 == (int *)0x0) {\n          return false;\n        }" if (parenthesized_expression "(piVar7 == (int *)0x0)" ( (binary_expression "piVar7 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return false;\n        }" { (return_statement "return false;" return false ;) })) (expression_statement "iVar8 = set->nelem;" (assignment_expression "iVar8 = set->nelem" identifier = (field_expression "set->nelem" identifier -> field_identifier)) ;) (expression_statement "set->elems = piVar7;" (assignment_expression "set->elems = piVar7" (field_expression "set->elems" identifier -> field_identifier) = identifier) ;) })) (if_statement "if (elem < *piVar7) {\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }\n      else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }" if (parenthesized_expression "(elem < *piVar7)" ( (binary_expression "elem < *piVar7" identifier < (pointer_expression "*piVar7" * identifier)) )) (compound_statement "{\n        if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }\n      }" { (if_statement "if (0 < iVar8) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }" if (parenthesized_expression "(0 < iVar8)" ( (binary_expression "0 < iVar8" number_literal < identifier) )) (compound_statement "{\n          piVar4 = piVar7 + iVar8;\n          do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);\n          iVar8 = 0;\n        }" { (expression_statement "piVar4 = piVar7 + iVar8;" (assignment_expression "piVar4 = piVar7 + iVar8" identifier = (binary_expression "piVar7 + iVar8" identifier + identifier)) ;) (do_statement "do {\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          } while (piVar7 != piVar9);" do (compound_statement "{\n            piVar9 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar9;\n          }" { (expression_statement "piVar9 = piVar4 + -1;" (assignment_expression "piVar9 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) (expression_statement "*piVar4 = piVar4[-1];" (assignment_expression "*piVar4 = piVar4[-1]" (pointer_expression "*piVar4" * identifier) = (subscript_expression "piVar4[-1]" identifier [ number_literal ])) ;) (expression_statement "piVar4 = piVar9;" (assignment_expression "piVar4 = piVar9" identifier = identifier) ;) }) while (parenthesized_expression "(piVar7 != piVar9)" ( (binary_expression "piVar7 != piVar9" identifier != identifier) )) ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) })) }) (else_clause "else {\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }" else (compound_statement "{\n        iVar6 = piVar7[iVar8 + -1];\n        if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }\n      }" { (expression_statement "iVar6 = piVar7[iVar8 + -1];" (assignment_expression "iVar6 = piVar7[iVar8 + -1]" identifier = (subscript_expression "piVar7[iVar8 + -1]" identifier [ (binary_expression "iVar8 + -1" identifier + number_literal) ])) ;) (if_statement "if (elem < iVar6) {\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }" if (parenthesized_expression "(elem < iVar6)" ( (binary_expression "elem < iVar6" identifier < identifier) )) (compound_statement "{\n          piVar4 = piVar7 + iVar8;\n          do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);\n        }" { (expression_statement "piVar4 = piVar7 + iVar8;" (assignment_expression "piVar4 = piVar7 + iVar8" identifier = (binary_expression "piVar7 + iVar8" identifier + identifier)) ;) (do_statement "do {\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          } while (elem < iVar6);" do (compound_statement "{\n            *piVar4 = iVar6;\n            iVar6 = piVar4[-2];\n            iVar8 = iVar8 + -1;\n            piVar4 = piVar4 + -1;\n          }" { (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar6 = piVar4[-2];" (assignment_expression "iVar6 = piVar4[-2]" identifier = (subscript_expression "piVar4[-2]" identifier [ number_literal ])) ;) (expression_statement "iVar8 = iVar8 + -1;" (assignment_expression "iVar8 = iVar8 + -1" identifier = (binary_expression "iVar8 + -1" identifier + number_literal)) ;) (expression_statement "piVar4 = piVar4 + -1;" (assignment_expression "piVar4 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(elem < iVar6)" ( (binary_expression "elem < iVar6" identifier < identifier) )) ;) })) }))) (expression_statement "_Var5 = true;" (assignment_expression "_Var5 = true" identifier = true) ;) (expression_statement "piVar7[iVar8] = elem;" (assignment_expression "piVar7[iVar8] = elem" (subscript_expression "piVar7[iVar8]" identifier [ identifier ]) = identifier) ;) (expression_statement "set->nelem = set->nelem + 1;" (assignment_expression "set->nelem = set->nelem + 1" (field_expression "set->nelem" identifier -> field_identifier) = (binary_expression "set->nelem + 1" (field_expression "set->nelem" identifier -> field_identifier) + number_literal)) ;) }))) }))) (return_statement "return _Var5;" return identifier ;) })))
(translation_unit "undefined4 FUN_00019d18(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_00019d18(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00019d18(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 identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (expression_statement "puVar2 = PTR_realloc_0003e298;" (assignment_expression "puVar2 = PTR_realloc_0003e298" identifier = identifier) ;) (expression_statement "puVar1 = PTR_malloc_0003e294;" (assignment_expression "puVar1 = PTR_malloc_0003e294" identifier = identifier) ;) (if_statement "if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar6 = (int *)(*(code *)puVar1)(4);" (assignment_expression "piVar6 = (int *)(*(code *)puVar1)(4)" identifier = (cast_expression "(int *)(*(code *)puVar1)(4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(4)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(4)" ( number_literal ))))) ;) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }" if (parenthesized_expression "(piVar6 != (int *)0x0)" ( (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *piVar6 = param_2;\n      return 1;\n    }" { (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" else (compound_statement "{\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" { (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar6 = (int *)param_1[2];" (assignment_expression "piVar6 = (int *)param_1[2]" identifier = (cast_expression "(int *)param_1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (if_statement "if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }" { (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" * identifier) = identifier) ;) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" else (compound_statement "{\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" { (if_statement "if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" if (parenthesized_expression "(*param_1 == iVar7)" ( (binary_expression "*param_1 == iVar7" (pointer_expression "*param_1" * identifier) == identifier) )) (compound_statement "{\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" { (expression_statement "*param_1 = iVar7 << 1;" (assignment_expression "*param_1 = iVar7 << 1" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar7 << 1" identifier << number_literal)) ;) (expression_statement "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);" (assignment_expression "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" identifier = (cast_expression "(int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar2)(piVar6,iVar7 << 3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar6,iVar7 << 3)" ( identifier , (binary_expression "iVar7 << 3" identifier << number_literal) ))))) ;) (if_statement "if (piVar6 == (int *)0x0) {\n          return 0;\n        }" if (parenthesized_expression "(piVar6 == (int *)0x0)" ( (binary_expression "piVar6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (if_statement "if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" if (parenthesized_expression "(param_2 < *piVar6)" ( (binary_expression "param_2 < *piVar6" identifier < (pointer_expression "*piVar6" * identifier)) )) (compound_statement "{\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }" { (if_statement "if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" if (parenthesized_expression "(0 < iVar7)" ( (binary_expression "0 < iVar7" number_literal < identifier) )) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" { (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" identifier = (binary_expression "piVar6 + iVar7" identifier + identifier)) ;) (do_statement "do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);" do (compound_statement "{\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          }" { (expression_statement "piVar8 = piVar4 + -1;" (assignment_expression "piVar8 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) (expression_statement "*piVar4 = piVar4[-1];" (assignment_expression "*piVar4 = piVar4[-1]" (pointer_expression "*piVar4" * identifier) = (subscript_expression "piVar4[-1]" identifier [ number_literal ])) ;) (expression_statement "piVar4 = piVar8;" (assignment_expression "piVar4 = piVar8" identifier = identifier) ;) }) while (parenthesized_expression "(piVar6 != piVar8)" ( (binary_expression "piVar6 != piVar8" identifier != identifier) )) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) })) }) (else_clause "else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" else (compound_statement "{\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" { (expression_statement "iVar5 = piVar6[iVar7 + -1];" (assignment_expression "iVar5 = piVar6[iVar7 + -1]" identifier = (subscript_expression "piVar6[iVar7 + -1]" identifier [ (binary_expression "iVar7 + -1" identifier + number_literal) ])) ;) (if_statement "if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" if (parenthesized_expression "(param_2 < iVar5)" ( (binary_expression "param_2 < iVar5" identifier < identifier) )) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" { (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" identifier = (binary_expression "piVar6 + iVar7" identifier + identifier)) ;) (do_statement "do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);" do (compound_statement "{\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          }" { (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[-2];" (assignment_expression "iVar5 = piVar4[-2]" identifier = (subscript_expression "piVar4[-2]" identifier [ number_literal ])) ;) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" identifier = (binary_expression "iVar7 + -1" identifier + number_literal)) ;) (expression_statement "piVar4 = piVar4 + -1;" (assignment_expression "piVar4 = piVar4 + -1" identifier = (binary_expression "piVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_2 < iVar5)" ( (binary_expression "param_2 < iVar5" identifier < identifier) )) ;) })) }))) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "piVar6[iVar7] = param_2;" (assignment_expression "piVar6[iVar7] = param_2" (subscript_expression "piVar6[iVar7]" identifier [ identifier ]) = identifier) ;) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) }))) }))) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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 * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (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 IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT << LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT << 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 IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT + LIT) ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) }))) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00019d18(int *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (function_declarator "FUN_00019d18(int *param_1,int param_2)" (identifier "FUN_00019d18") (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") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  int *piVar6;\n  int iVar7;\n  int *piVar8;\n  \n  puVar2 = PTR_realloc_0003e298;\n  puVar1 = PTR_malloc_0003e294;\n  if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }\n  return uVar3;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (expression_statement "puVar2 = PTR_realloc_0003e298;" (assignment_expression "puVar2 = PTR_realloc_0003e298" (identifier "puVar2") (= "=") (identifier "PTR_realloc_0003e298")) (; ";")) (expression_statement "puVar1 = PTR_malloc_0003e294;" (assignment_expression "puVar1 = PTR_malloc_0003e294" (identifier "puVar1") (= "=") (identifier "PTR_malloc_0003e294")) (; ";")) (if_statement "if (*param_1 == 0) {\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }\n  else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" (if "if") (parenthesized_expression "(*param_1 == 0)" (( "(") (binary_expression "*param_1 == 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *param_1 = 1;\n    param_1[1] = 1;\n    piVar6 = (int *)(*(code *)puVar1)(4);\n    param_1[2] = (int)piVar6;\n    if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }\n    param_1[1] = 0;\n    *param_1 = 0;\n    uVar3 = 0;\n  }" ({ "{") (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (expression_statement "param_1[1] = 1;" (assignment_expression "param_1[1] = 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "piVar6 = (int *)(*(code *)puVar1)(4);" (assignment_expression "piVar6 = (int *)(*(code *)puVar1)(4)" (identifier "piVar6") (= "=") (cast_expression "(int *)(*(code *)puVar1)(4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)puVar1)(4)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(4)" (( "(") (number_literal "4") () ")"))))) (; ";")) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)piVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar6"))) (; ";")) (if_statement "if (piVar6 != (int *)0x0) {\n      *piVar6 = param_2;\n      return 1;\n    }" (if "if") (parenthesized_expression "(piVar6 != (int *)0x0)" (( "(") (binary_expression "piVar6 != (int *)0x0" (identifier "piVar6") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *piVar6 = param_2;\n      return 1;\n    }" ({ "{") (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) (= "=") (identifier "param_2")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "param_1[1] = 0;" (assignment_expression "param_1[1] = 0" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" (else "else") (compound_statement "{\n    iVar7 = param_1[1];\n    piVar6 = (int *)param_1[2];\n    if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }\n  }" ({ "{") (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" (identifier "iVar7") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar6 = (int *)param_1[2];" (assignment_expression "piVar6 = (int *)param_1[2]" (identifier "piVar6") (= "=") (cast_expression "(int *)param_1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if (iVar7 == 0) {\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }\n    else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" (if "if") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *piVar6 = param_2;\n      uVar3 = 1;\n      param_1[1] = param_1[1] + 1;\n    }" ({ "{") (expression_statement "*piVar6 = param_2;" (assignment_expression "*piVar6 = param_2" (pointer_expression "*piVar6" (* "*") (identifier "piVar6")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" (else "else") (compound_statement "{\n      if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }\n      if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }\n      uVar3 = 1;\n      piVar6[iVar7] = param_2;\n      param_1[1] = param_1[1] + 1;\n    }" ({ "{") (if_statement "if (*param_1 == iVar7) {\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" (if "if") (parenthesized_expression "(*param_1 == iVar7)" (( "(") (binary_expression "*param_1 == iVar7" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (identifier "iVar7")) () ")")) (compound_statement "{\n        *param_1 = iVar7 << 1;\n        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);\n        if (piVar6 == (int *)0x0) {\n          return 0;\n        }\n        iVar7 = param_1[1];\n        param_1[2] = (int)piVar6;\n      }" ({ "{") (expression_statement "*param_1 = iVar7 << 1;" (assignment_expression "*param_1 = iVar7 << 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "iVar7 << 1" (identifier "iVar7") (<< "<<") (number_literal "1"))) (; ";")) (expression_statement "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);" (assignment_expression "piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" (identifier "piVar6") (= "=") (cast_expression "(int *)(*(code *)puVar2)(piVar6,iVar7 << 3)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)puVar2)(piVar6,iVar7 << 3)" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(piVar6,iVar7 << 3)" (( "(") (identifier "piVar6") (, ",") (binary_expression "iVar7 << 3" (identifier "iVar7") (<< "<<") (number_literal "3")) () ")"))))) (; ";")) (if_statement "if (piVar6 == (int *)0x0) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(piVar6 == (int *)0x0)" (( "(") (binary_expression "piVar6 == (int *)0x0" (identifier "piVar6") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar7 = param_1[1];" (assignment_expression "iVar7 = param_1[1]" (identifier "iVar7") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "param_1[2] = (int)piVar6;" (assignment_expression "param_1[2] = (int)piVar6" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)piVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar6"))) (; ";")) (} "}"))) (if_statement "if (param_2 < *piVar6) {\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }\n      else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" (if "if") (parenthesized_expression "(param_2 < *piVar6)" (( "(") (binary_expression "param_2 < *piVar6" (identifier "param_2") (< "<") (pointer_expression "*piVar6" (* "*") (identifier "piVar6"))) () ")")) (compound_statement "{\n        if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }\n      }" ({ "{") (if_statement "if (0 < iVar7) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" (if "if") (parenthesized_expression "(0 < iVar7)" (( "(") (binary_expression "0 < iVar7" (number_literal "0") (< "<") (identifier "iVar7")) () ")")) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);\n          iVar7 = 0;\n        }" ({ "{") (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" (identifier "piVar4") (= "=") (binary_expression "piVar6 + iVar7" (identifier "piVar6") (+ "+") (identifier "iVar7"))) (; ";")) (do_statement "do {\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          } while (piVar6 != piVar8);" (do "do") (compound_statement "{\n            piVar8 = piVar4 + -1;\n            *piVar4 = piVar4[-1];\n            piVar4 = piVar8;\n          }" ({ "{") (expression_statement "piVar8 = piVar4 + -1;" (assignment_expression "piVar8 = piVar4 + -1" (identifier "piVar8") (= "=") (binary_expression "piVar4 + -1" (identifier "piVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*piVar4 = piVar4[-1];" (assignment_expression "*piVar4 = piVar4[-1]" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (subscript_expression "piVar4[-1]" (identifier "piVar4") ([ "[") (number_literal "-1") (] "]"))) (; ";")) (expression_statement "piVar4 = piVar8;" (assignment_expression "piVar4 = piVar8" (identifier "piVar4") (= "=") (identifier "piVar8")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar6 != piVar8)" (( "(") (binary_expression "piVar6 != piVar8" (identifier "piVar6") (!= "!=") (identifier "piVar8")) () ")")) (; ";")) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" (else "else") (compound_statement "{\n        iVar5 = piVar6[iVar7 + -1];\n        if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }\n      }" ({ "{") (expression_statement "iVar5 = piVar6[iVar7 + -1];" (assignment_expression "iVar5 = piVar6[iVar7 + -1]" (identifier "iVar5") (= "=") (subscript_expression "piVar6[iVar7 + -1]" (identifier "piVar6") ([ "[") (binary_expression "iVar7 + -1" (identifier "iVar7") (+ "+") (number_literal "-1")) (] "]"))) (; ";")) (if_statement "if (param_2 < iVar5) {\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" (if "if") (parenthesized_expression "(param_2 < iVar5)" (( "(") (binary_expression "param_2 < iVar5" (identifier "param_2") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n          piVar4 = piVar6 + iVar7;\n          do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);\n        }" ({ "{") (expression_statement "piVar4 = piVar6 + iVar7;" (assignment_expression "piVar4 = piVar6 + iVar7" (identifier "piVar4") (= "=") (binary_expression "piVar6 + iVar7" (identifier "piVar6") (+ "+") (identifier "iVar7"))) (; ";")) (do_statement "do {\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          } while (param_2 < iVar5);" (do "do") (compound_statement "{\n            *piVar4 = iVar5;\n            iVar5 = piVar4[-2];\n            iVar7 = iVar7 + -1;\n            piVar4 = piVar4 + -1;\n          }" ({ "{") (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "iVar5 = piVar4[-2];" (assignment_expression "iVar5 = piVar4[-2]" (identifier "iVar5") (= "=") (subscript_expression "piVar4[-2]" (identifier "piVar4") ([ "[") (number_literal "-2") (] "]"))) (; ";")) (expression_statement "iVar7 = iVar7 + -1;" (assignment_expression "iVar7 = iVar7 + -1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + -1" (identifier "iVar7") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "piVar4 = piVar4 + -1;" (assignment_expression "piVar4 = piVar4 + -1" (identifier "piVar4") (= "=") (binary_expression "piVar4 + -1" (identifier "piVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_2 < iVar5)" (( "(") (binary_expression "param_2 < iVar5" (identifier "param_2") (< "<") (identifier "iVar5")) () ")")) (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "piVar6[iVar7] = param_2;" (assignment_expression "piVar6[iVar7] = param_2" (subscript_expression "piVar6[iVar7]" (identifier "piVar6") ([ "[") (identifier "iVar7") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_1[1] = param_1[1] + 1;" (assignment_expression "param_1[1] = param_1[1] + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}")))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

type_1 function_1(type_2 *set,type_3 var_4)

{
  type_4 *puVar1;
  type_4 *puVar2;
  type_1 _Var5;
  type_3 *var_1;
  int *var_5;
  int var_7;
  int *var_3;
  int var_2;
  int *var_6;
  
  puVar2 = PTR_realloc_0003e298;
  puVar1 = PTR_malloc_0003e294;
  if (set->alloc == 0) {
    set->alloc = 1;
    set->nelem = 1;
    var_1 = (type_3 *)(*(type_5 *)puVar1)(4);
    set->elems = var_1;
    if (var_1 != (type_3 *)0x0) {
      *var_1 = var_4;
      return true;
    }
    set->nelem = 0;
    set->alloc = 0;
    _Var5 = false;
  }
  else {
    var_2 = set->nelem;
    var_3 = set->elems;
    if (var_2 == 0) {
      *var_3 = var_4;
      _Var5 = true;
      set->nelem = set->nelem + 1;
    }
    else {
      if (set->alloc == var_2) {
        set->alloc = var_2 << 1;
        var_3 = (int *)(*(type_5 *)puVar2)(var_3,var_2 << 3);
        if (var_3 == (int *)0x0) {
          return false;
        }
        var_2 = set->nelem;
        set->elems = var_3;
      }
      if (var_4 < *var_3) {
        if (0 < var_2) {
          var_5 = var_3 + var_2;
          do {
            var_6 = var_5 + -1;
            *var_5 = var_5[-1];
            var_5 = var_6;
          } while (var_3 != var_6);
          var_2 = 0;
        }
      }
      else {
        var_7 = var_3[var_2 + -1];
        if (var_4 < var_7) {
          var_5 = var_3 + var_2;
          do {
            *var_5 = var_7;
            var_7 = var_5[-2];
            var_2 = var_2 + -1;
            var_5 = var_5 + -1;
          } while (var_4 < var_7);
        }
      }
      _Var5 = true;
      var_3[var_2] = var_4;
      set->nelem = set->nelem + 1;
    }
  }
  return _Var5;
}


(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (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)))) (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 (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (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: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) alternative: (else_clause (compound_statement (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: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) 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: (identifier) right: (subscript_expression argument: (identifier) index: (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)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))))))) (return_statement (identifier)))))

undefined4 MASKED(int *param_1,int param_2)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  int *piVar6;
  int iVar7;
  int *piVar8;
  
  puVar2 = PTR_realloc_0003e298;
  puVar1 = PTR_malloc_0003e294;
  if (*param_1 == 0) {
    *param_1 = 1;
    param_1[1] = 1;
    piVar6 = (int *)(*(code *)puVar1)(4);
    param_1[2] = (int)piVar6;
    if (piVar6 != (int *)0x0) {
      *piVar6 = param_2;
      return 1;
    }
    param_1[1] = 0;
    *param_1 = 0;
    uVar3 = 0;
  }
  else {
    iVar7 = param_1[1];
    piVar6 = (int *)param_1[2];
    if (iVar7 == 0) {
      *piVar6 = param_2;
      uVar3 = 1;
      param_1[1] = param_1[1] + 1;
    }
    else {
      if (*param_1 == iVar7) {
        *param_1 = iVar7 << 1;
        piVar6 = (int *)(*(code *)puVar2)(piVar6,iVar7 << 3);
        if (piVar6 == (int *)0x0) {
          return 0;
        }
        iVar7 = param_1[1];
        param_1[2] = (int)piVar6;
      }
      if (param_2 < *piVar6) {
        if (0 < iVar7) {
          piVar4 = piVar6 + iVar7;
          do {
            piVar8 = piVar4 + -1;
            *piVar4 = piVar4[-1];
            piVar4 = piVar8;
          } while (piVar6 != piVar8);
          iVar7 = 0;
        }
      }
      else {
        iVar5 = piVar6[iVar7 + -1];
        if (param_2 < iVar5) {
          piVar4 = piVar6 + iVar7;
          do {
            *piVar4 = iVar5;
            iVar5 = piVar4[-2];
            iVar7 = iVar7 + -1;
            piVar4 = piVar4 + -1;
          } while (param_2 < iVar5);
        }
      }
      uVar3 = 1;
      piVar6[iVar7] = param_2;
      param_1[1] = param_1[1] + 1;
    }
  }
  return uVar3;
}

