
void * x2realloc(void *p,size_t *pn)

{
  size_t n;
  void *pvVar1;
  
  n = *pn;
  if (p == (void *)0x0) {
    if (n == 0) {
      *pn = 0x40;
      pvVar1 = xrealloc((void *)0x0,0x40);
      return pvVar1;
    }
    if ((int)n < 0) goto LAB_000165ec;
  }
  else {
    if (0x55555553 < n) {
LAB_000165ec:
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
    n = n + 1 + (n >> 1);
  }
  *pn = n;
  pvVar1 = xrealloc(p,n);
  return pvVar1;
}



void x2realloc(int param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  undefined *puVar4;
  
  puVar1 = (undefined4 *)*param_2;
  if (param_1 == 0) {
    if (puVar1 == (undefined4 *)0x0) {
      *param_2 = 0x40;
      xrealloc(0,0x40);
      return;
    }
    puVar3 = puVar1;
    if ((int)puVar1 < 0) goto LAB_000165ec;
  }
  else {
    puVar3 = param_2;
    if ((undefined4 *)0x55555553 < puVar1) {
LAB_000165ec:
      puVar4 = PTR_xalloc_die_0003d1c4;
      xalloc_die(param_1,puVar3);
      uVar2 = xmalloc();
                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);
      return;
    }
    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);
  }
  *param_2 = puVar1;
  xrealloc(param_1,puVar1);
  return;
}


lui gp,0x3
addiu gp,gp,-0x145c
addu gp,gp,t9
addiu sp,sp,-0x20
lw v0,0x0(a1)
sw gp,0x10(sp)
sw ra,0x1c(sp)
beq a0,zero,0x000165c4
_or a2,a1,zero
lui v1,0x5555
addiu v1,v1,0x5554
sltu v1,v0,v1
beq v1,zero,0x000165ec
_srl v1,v0,0x1
addiu v0,v0,0x1
addu v0,v0,v1
lw ra,0x1c(sp)
or a1,v0,zero
lw t9,-0x7f50(gp)
sw v0,0x0(a2)
b 0x000163ec
_addiu sp,sp,0x20
bne v0,zero,0x000165e4
_lw ra,0x1c(sp)
li v0,0x40
lw t9,-0x7f50(gp)
sw v0,0x0(a2)
addiu sp,sp,0x20
b 0x000163ec
_or a1,v0,zero
bgez v0,0x000165b4
_or a1,v0,zero
lw t9,-0x7f4c(gp)
bal 0x00016750
_nop
lui gp,0x3
addiu gp,gp,-0x14e8
addu gp,gp,t9
addiu sp,sp,-0x20
lw t9,-0x7f78(gp)
sw s0,0x18(sp)
sw ra,0x1c(sp)
sw gp,0x10(sp)
bal 0x00016330
_or s0,a0,zero
or a2,s0,zero
lw gp,0x10(sp)
or a1,zero,zero
lw ra,0x1c(sp)
or a0,v0,zero
lw s0,0x18(sp)
lw t9,-0x7e3c(gp)
jr t9
_addiu sp,sp,0x20
(translation_unit "void x2realloc(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}\n\n" (function_definition "void x2realloc(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" primitive_type (function_declarator "x2realloc(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar1 = (undefined4 *)*param_2;" (assignment_expression "puVar1 = (undefined4 *)*param_2" identifier = (cast_expression "(undefined4 *)*param_2" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }" { (if_statement "if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" { (expression_statement "*param_2 = 0x40;" (assignment_expression "*param_2 = 0x40" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "xrealloc(0,0x40);" (call_expression "xrealloc(0,0x40)" identifier (argument_list "(0,0x40)" ( number_literal , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (if_statement "if ((int)puVar1 < 0) goto LAB_000165ec;" if (parenthesized_expression "((int)puVar1 < 0)" ( (binary_expression "(int)puVar1 < 0" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_000165ec;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" else (compound_statement "{\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" { (expression_statement "puVar3 = param_2;" (assignment_expression "puVar3 = param_2" identifier = identifier) ;) (if_statement "if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" if (parenthesized_expression "((undefined4 *)0x55555553 < puVar1)" ( (binary_expression "(undefined4 *)0x55555553 < puVar1" (cast_expression "(undefined4 *)0x55555553" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) < identifier) )) (compound_statement "{\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" { (labeled_statement "LAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;" statement_identifier : (expression_statement "puVar4 = PTR_xalloc_die_0003d1c4;" (assignment_expression "puVar4 = PTR_xalloc_die_0003d1c4" identifier = identifier) ;)) (expression_statement "xalloc_die(param_1,puVar3);" (call_expression "xalloc_die(param_1,puVar3)" identifier (argument_list "(param_1,puVar3)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = xmalloc();" (assignment_expression "uVar2 = xmalloc()" identifier = (call_expression "xmalloc()" identifier (argument_list "()" ( )))) ;) comment comment (expression_statement "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);" (call_expression "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1)" (parenthesized_expression "(**(code **)(puVar4 + 0x26cdc))" ( (pointer_expression "**(code **)(puVar4 + 0x26cdc)" * (pointer_expression "*(code **)(puVar4 + 0x26cdc)" * (cast_expression "(code **)(puVar4 + 0x26cdc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x26cdc)" ( (binary_expression "puVar4 + 0x26cdc" identifier + number_literal) ))))) )) (argument_list "(uVar2,0,param_1)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);" (assignment_expression "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" identifier = (cast_expression "(undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + ((uint)puVar1 >> 1) + 1)" ( (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1) + 1" (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1)" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((uint)puVar1 >> 1)" ( (binary_expression "(uint)puVar1 >> 1" (cast_expression "(uint)puVar1" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) + number_literal) )))) ;) }))) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "xrealloc(param_1,puVar1);" (call_expression "xrealloc(param_1,puVar1)" identifier (argument_list "(param_1,puVar1)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void * x2realloc(void *p,size_t *pn)\n\n{\n  size_t n;\n  void *pvVar1;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }\n    if ((int)n < 0) goto LAB_000165ec;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}\n\n" (function_definition "void * x2realloc(void *p,size_t *pn)\n\n{\n  size_t n;\n  void *pvVar1;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }\n    if ((int)n < 0) goto LAB_000165ec;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}" primitive_type (pointer_declarator "* x2realloc(void *p,size_t *pn)" * (function_declarator "x2realloc(void *p,size_t *pn)" identifier (parameter_list "(void *p,size_t *pn)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "size_t *pn" primitive_type (pointer_declarator "*pn" * identifier)) )))) (compound_statement "{\n  size_t n;\n  void *pvVar1;\n  \n  n = *pn;\n  if (p == (void *)0x0) {\n    if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }\n    if ((int)n < 0) goto LAB_000165ec;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }\n  *pn = n;\n  pvVar1 = xrealloc(p,n);\n  return pvVar1;\n}" { (declaration "size_t n;" primitive_type identifier ;) (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (expression_statement "n = *pn;" (assignment_expression "n = *pn" identifier = (pointer_expression "*pn" * identifier)) ;) (if_statement "if (p == (void *)0x0) {\n    if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }\n    if ((int)n < 0) goto LAB_000165ec;\n  }\n  else {\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }" if (parenthesized_expression "(p == (void *)0x0)" ( (binary_expression "p == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }\n    if ((int)n < 0) goto LAB_000165ec;\n  }" { (if_statement "if (n == 0) {\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }" if (parenthesized_expression "(n == 0)" ( (binary_expression "n == 0" identifier == number_literal) )) (compound_statement "{\n      *pn = 0x40;\n      pvVar1 = xrealloc((void *)0x0,0x40);\n      return pvVar1;\n    }" { (expression_statement "*pn = 0x40;" (assignment_expression "*pn = 0x40" (pointer_expression "*pn" * identifier) = number_literal) ;) (expression_statement "pvVar1 = xrealloc((void *)0x0,0x40);" (assignment_expression "pvVar1 = xrealloc((void *)0x0,0x40)" identifier = (call_expression "xrealloc((void *)0x0,0x40)" identifier (argument_list "((void *)0x0,0x40)" ( (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal )))) ;) (return_statement "return pvVar1;" return identifier ;) })) (if_statement "if ((int)n < 0) goto LAB_000165ec;" if (parenthesized_expression "((int)n < 0)" ( (binary_expression "(int)n < 0" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_000165ec;" goto statement_identifier ;)) }) (else_clause "else {\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }" else (compound_statement "{\n    if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n    n = n + 1 + (n >> 1);\n  }" { (if_statement "if (0x55555553 < n) {\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "(0x55555553 < n)" ( (binary_expression "0x55555553 < n" number_literal < identifier) )) (compound_statement "{\nLAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { (labeled_statement "LAB_000165ec:\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();" statement_identifier : comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;)) })) (expression_statement "n = n + 1 + (n >> 1);" (assignment_expression "n = n + 1 + (n >> 1)" identifier = (binary_expression "n + 1 + (n >> 1)" (binary_expression "n + 1" identifier + number_literal) + (parenthesized_expression "(n >> 1)" ( (binary_expression "n >> 1" identifier >> number_literal) )))) ;) }))) (expression_statement "*pn = n;" (assignment_expression "*pn = n" (pointer_expression "*pn" * identifier) = identifier) ;) (expression_statement "pvVar1 = xrealloc(p,n);" (assignment_expression "pvVar1 = xrealloc(p,n)" identifier = (call_expression "xrealloc(p,n)" identifier (argument_list "(p,n)" ( identifier , identifier )))) ;) (return_statement "return pvVar1;" return identifier ;) })))
(translation_unit "void x2realloc(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}\n\n" (function_definition "void x2realloc(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" primitive_type (function_declarator "x2realloc(int param_1,undefined4 *param_2)" identifier (parameter_list "(int param_1,undefined4 *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "puVar1 = (undefined4 *)*param_2;" (assignment_expression "puVar1 = (undefined4 *)*param_2" identifier = (cast_expression "(undefined4 *)*param_2" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (if_statement "if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }" { (if_statement "if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" if (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" ( (binary_expression "puVar1 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" { (expression_statement "*param_2 = 0x40;" (assignment_expression "*param_2 = 0x40" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "xrealloc(0,0x40);" (call_expression "xrealloc(0,0x40)" identifier (argument_list "(0,0x40)" ( number_literal , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" identifier = identifier) ;) (if_statement "if ((int)puVar1 < 0) goto LAB_000165ec;" if (parenthesized_expression "((int)puVar1 < 0)" ( (binary_expression "(int)puVar1 < 0" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_000165ec;" goto statement_identifier ;)) }) (else_clause "else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" else (compound_statement "{\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" { (expression_statement "puVar3 = param_2;" (assignment_expression "puVar3 = param_2" identifier = identifier) ;) (if_statement "if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" if (parenthesized_expression "((undefined4 *)0x55555553 < puVar1)" ( (binary_expression "(undefined4 *)0x55555553 < puVar1" (cast_expression "(undefined4 *)0x55555553" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) < identifier) )) (compound_statement "{\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" { (labeled_statement "LAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;" statement_identifier : (expression_statement "puVar4 = PTR_xalloc_die_0003d1c4;" (assignment_expression "puVar4 = PTR_xalloc_die_0003d1c4" identifier = identifier) ;)) (expression_statement "xalloc_die(param_1,puVar3);" (call_expression "xalloc_die(param_1,puVar3)" identifier (argument_list "(param_1,puVar3)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = xmalloc();" (assignment_expression "uVar2 = xmalloc()" identifier = (call_expression "xmalloc()" identifier (argument_list "()" ( )))) ;) (expression_statement "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);" (call_expression "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1)" (parenthesized_expression "(**(code **)(puVar4 + 0x26cdc))" ( (pointer_expression "**(code **)(puVar4 + 0x26cdc)" * (pointer_expression "*(code **)(puVar4 + 0x26cdc)" * (cast_expression "(code **)(puVar4 + 0x26cdc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0x26cdc)" ( (binary_expression "puVar4 + 0x26cdc" identifier + number_literal) ))))) )) (argument_list "(uVar2,0,param_1)" ( identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);" (assignment_expression "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" identifier = (cast_expression "(undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar1 + ((uint)puVar1 >> 1) + 1)" ( (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1) + 1" (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1)" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "((uint)puVar1 >> 1)" ( (binary_expression "(uint)puVar1 >> 1" (cast_expression "(uint)puVar1" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) ))) + number_literal) )))) ;) }))) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "xrealloc(param_1,puVar1);" (call_expression "xrealloc(param_1,puVar1)" identifier (argument_list "(param_1,puVar1)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , LIT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , LIT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) + LIT) )))) ;) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void x2realloc(int param_1,undefined4 *param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" (primitive_type "void") (function_declarator "x2realloc(int param_1,undefined4 *param_2)" (identifier "x2realloc") (parameter_list "(int param_1,undefined4 *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  undefined *puVar4;\n  \n  puVar1 = (undefined4 *)*param_2;\n  if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }\n  *param_2 = puVar1;\n  xrealloc(param_1,puVar1);\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "puVar1 = (undefined4 *)*param_2;" (assignment_expression "puVar1 = (undefined4 *)*param_2" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)*param_2" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (if_statement "if (param_1 == 0) {\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }\n  else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }\n    puVar3 = puVar1;\n    if ((int)puVar1 < 0) goto LAB_000165ec;\n  }" ({ "{") (if_statement "if (puVar1 == (undefined4 *)0x0) {\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" (if "if") (parenthesized_expression "(puVar1 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar1 == (undefined4 *)0x0" (identifier "puVar1") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_2 = 0x40;\n      xrealloc(0,0x40);\n      return;\n    }" ({ "{") (expression_statement "*param_2 = 0x40;" (assignment_expression "*param_2 = 0x40" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0x40")) (; ";")) (expression_statement "xrealloc(0,0x40);" (call_expression "xrealloc(0,0x40)" (identifier "xrealloc") (argument_list "(0,0x40)" (( "(") (number_literal "0") (, ",") (number_literal "0x40") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar3 = puVar1;" (assignment_expression "puVar3 = puVar1" (identifier "puVar3") (= "=") (identifier "puVar1")) (; ";")) (if_statement "if ((int)puVar1 < 0) goto LAB_000165ec;" (if "if") (parenthesized_expression "((int)puVar1 < 0)" (( "(") (binary_expression "(int)puVar1 < 0" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_000165ec;" (goto "goto") (statement_identifier "LAB_000165ec") (; ";"))) (} "}")) (else_clause "else {\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" (else "else") (compound_statement "{\n    puVar3 = param_2;\n    if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }\n    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);\n  }" ({ "{") (expression_statement "puVar3 = param_2;" (assignment_expression "puVar3 = param_2" (identifier "puVar3") (= "=") (identifier "param_2")) (; ";")) (if_statement "if ((undefined4 *)0x55555553 < puVar1) {\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" (if "if") (parenthesized_expression "((undefined4 *)0x55555553 < puVar1)" (( "(") (binary_expression "(undefined4 *)0x55555553 < puVar1" (cast_expression "(undefined4 *)0x55555553" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x55555553")) (< "<") (identifier "puVar1")) () ")")) (compound_statement "{\nLAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;\n      xalloc_die(param_1,puVar3);\n      uVar2 = xmalloc();\n                    \n                    \n      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);\n      return;\n    }" ({ "{") (labeled_statement "LAB_000165ec:\n      puVar4 = PTR_xalloc_die_0003d1c4;" (statement_identifier "LAB_000165ec") (: ":") (expression_statement "puVar4 = PTR_xalloc_die_0003d1c4;" (assignment_expression "puVar4 = PTR_xalloc_die_0003d1c4" (identifier "puVar4") (= "=") (identifier "PTR_xalloc_die_0003d1c4")) (; ";"))) (expression_statement "xalloc_die(param_1,puVar3);" (call_expression "xalloc_die(param_1,puVar3)" (identifier "xalloc_die") (argument_list "(param_1,puVar3)" (( "(") (identifier "param_1") (, ",") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "uVar2 = xmalloc();" (assignment_expression "uVar2 = xmalloc()" (identifier "uVar2") (= "=") (call_expression "xmalloc()" (identifier "xmalloc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);" (call_expression "(**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1)" (parenthesized_expression "(**(code **)(puVar4 + 0x26cdc))" (( "(") (pointer_expression "**(code **)(puVar4 + 0x26cdc)" (* "*") (pointer_expression "*(code **)(puVar4 + 0x26cdc)" (* "*") (cast_expression "(code **)(puVar4 + 0x26cdc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar4 + 0x26cdc)" (( "(") (binary_expression "puVar4 + 0x26cdc" (identifier "puVar4") (+ "+") (number_literal "0x26cdc")) () ")"))))) () ")")) (argument_list "(uVar2,0,param_1)" (( "(") (identifier "uVar2") (, ",") (number_literal "0") (, ",") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);" (assignment_expression "puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar1 + ((uint)puVar1 >> 1) + 1)" (( "(") (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1) + 1" (binary_expression "(int)puVar1 + ((uint)puVar1 >> 1)" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (parenthesized_expression "((uint)puVar1 >> 1)" (( "(") (binary_expression "(uint)puVar1 >> 1" (cast_expression "(uint)puVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "puVar1")) (>> ">>") (number_literal "1")) () ")"))) (+ "+") (number_literal "1")) () ")")))) (; ";")) (} "}")))) (expression_statement "*param_2 = puVar1;" (assignment_expression "*param_2 = puVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "puVar1")) (; ";")) (expression_statement "xrealloc(param_1,puVar1);" (call_expression "xrealloc(param_1,puVar1)" (identifier "xrealloc") (argument_list "(param_1,puVar1)" (( "(") (identifier "param_1") (, ",") (identifier "puVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void * function_1(void *var_1,size_t *pn)

{
  size_t var_2;
  void *pvVar1;
  
  var_2 = *pn;
  if (var_1 == (void *)0x0) {
    if (var_2 == 0) {
      *pn = 0x40;
      pvVar1 = var_3((void *)0x0,0x40);
      return pvVar1;
    }
    if ((int)var_2 < 0) goto LAB_000165ec;
  }
  else {
    if (0x55555553 < var_2) {
LAB_000165ec:
                    /* WARNING: Subroutine does not return */
      var_4();
    }
    var_2 = var_2 + 1 + (var_2 >> 1);
  }
  *pn = var_2;
  pvVar1 = var_3(var_1,var_2);
  return pvVar1;
}


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

void MASKED(int param_1,undefined4 *param_2)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  undefined *puVar4;
  
  puVar1 = (undefined4 *)*param_2;
  if (param_1 == 0) {
    if (puVar1 == (undefined4 *)0x0) {
      *param_2 = 0x40;
      xrealloc(0,0x40);
      return;
    }
    puVar3 = puVar1;
    if ((int)puVar1 < 0) goto LAB_000165ec;
  }
  else {
    puVar3 = param_2;
    if ((undefined4 *)0x55555553 < puVar1) {
LAB_000165ec:
      puVar4 = PTR_xalloc_die_0003d1c4;
      xalloc_die(param_1,puVar3);
      uVar2 = xmalloc();
                    /* WARNING: Could not recover jumptable at 0x0001663c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(puVar4 + 0x26cdc))(uVar2,0,param_1);
      return;
    }
    puVar1 = (undefined4 *)((int)puVar1 + ((uint)puVar1 >> 1) + 1);
  }
  *param_2 = puVar1;
  xrealloc(param_1,puVar1);
  return;
}

