
char ** dupargv(char **argv)

{
  char **ppcVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  undefined4 *puVar6;
  char **ppcVar7;
  
  if (argv == (char **)0x0) {
    ppcVar1 = (char **)0x0;
  }
  else {
    if (*argv == (char *)0x0) {
      iVar4 = 4;
    }
    else {
      ppcVar1 = argv + 1;
      iVar4 = 0;
      do {
        iVar3 = iVar4;
        pcVar5 = *ppcVar1;
        ppcVar1 = ppcVar1 + 1;
        iVar4 = iVar3 + 1;
      } while (pcVar5 != (char *)0x0);
      iVar4 = (iVar3 + 2) * 4;
    }
    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);
    ppcVar7 = ppcVar1;
    if (*argv != (char *)0x0) {
      iVar4 = 0;
      do {
        uVar2 = (*(code *)PTR_xstrdup_0002f340)();
        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);
        iVar4 = iVar4 + 4;
        *puVar6 = uVar2;
      } while (*(int *)((int)argv + iVar4) != 0);
      ppcVar7 = (char **)((int)ppcVar1 + iVar4);
    }
    *ppcVar7 = (char *)0x0;
  }
  return ppcVar1;
}



undefined4 * dupargv(int *param_1)

{
  int *piVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 *puVar7;
  
  if (param_1 == (int *)0x0) {
    puVar2 = (undefined4 *)0x0;
  }
  else {
    if (*param_1 == 0) {
      iVar5 = 4;
    }
    else {
      piVar1 = param_1 + 1;
      iVar5 = 0;
      do {
        iVar4 = iVar5;
        iVar6 = *piVar1;
        piVar1 = piVar1 + 1;
        iVar5 = iVar4 + 1;
      } while (iVar6 != 0);
      iVar5 = (iVar4 + 2) * 4;
    }
    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);
    puVar7 = puVar2;
    if (*param_1 != 0) {
      iVar5 = 0;
      do {
        uVar3 = (*(code *)PTR_xstrdup_0002f340)();
        puVar7 = (undefined4 *)((int)puVar2 + iVar5);
        iVar5 = iVar5 + 4;
        *puVar7 = uVar3;
      } while (*(int *)((int)param_1 + iVar5) != 0);
      puVar7 = (undefined4 *)((int)puVar2 + iVar5);
    }
    *puVar7 = 0;
  }
  return puVar2;
}


lui gp,0x2
addiu gp,gp,-0x32e0
addu gp,gp,t9
addiu sp,sp,-0x28
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
beq a0,zero,0x0001a45c
_sw s0,0x18(sp)
lw v0,0x0(a0)
beq v0,zero,0x0001a44c
_addiu v0,a0,0x4
b 0x0001a3c0
_or v1,zero,zero
or v1,a2,zero
addiu v0,v0,0x4
lw a1,-0x4(v0)
bne a1,zero,0x0001a3bc
_addiu a2,v1,0x1
addiu v1,v1,0x2
sll v1,v1,0x2
lw t9,-0x7d54(gp)
or s1,a0,zero
jalr t9
_or a0,v1,zero
lw a0,0x0(s1)
or s2,v0,zero
beq a0,zero,0x0001a454
_lw gp,0x10(sp)
or s0,zero,zero
lw t9,-0x7d60(gp)
jalr t9
_nop
addu a1,s2,s0
addiu s0,s0,0x4
lw gp,0x10(sp)
addu v1,s1,s0
sw v0,0x0(a1)
lw a0,0x0(v1)
bne a0,zero,0x0001a400
_lw t9,-0x7d60(gp)
addu s0,s2,s0
sw zero,0x0(s0)
lw ra,0x24(sp)
or v0,s2,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
b 0x0001a3d8
_li v1,0x4
b 0x0001a42c
_or s0,v0,zero
b 0x0001a430
_or s2,zero,zero
(translation_unit "undefined4 * dupargv(int *param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}\n\n" (function_definition "undefined4 * dupargv(int *param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* dupargv(int *param_1)" * (function_declarator "dupargv(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (if_statement "if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)0x0;\n  }" { (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" else (compound_statement "{\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" { (if_statement "if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n      iVar5 = 4;\n    }" { (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" identifier = number_literal) ;) }) (else_clause "else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" else (compound_statement "{\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" { (expression_statement "piVar1 = param_1 + 1;" (assignment_expression "piVar1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);" do (compound_statement "{\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      }" { (expression_statement "iVar4 = iVar5;" (assignment_expression "iVar4 = iVar5" identifier = identifier) ;) (expression_statement "iVar6 = *piVar1;" (assignment_expression "iVar6 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "piVar1 = piVar1 + 1;" (assignment_expression "piVar1 = piVar1 + 1" identifier = (binary_expression "piVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) ;) (expression_statement "iVar5 = (iVar4 + 2) * 4;" (assignment_expression "iVar5 = (iVar4 + 2) * 4" identifier = (binary_expression "(iVar4 + 2) * 4" (parenthesized_expression "(iVar4 + 2)" ( (binary_expression "iVar4 + 2" identifier + number_literal) )) * number_literal)) ;) }))) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_0002f34c)(iVar5)" (parenthesized_expression "(*(code *)PTR_xmalloc_0002f34c)" ( (pointer_expression "*(code *)PTR_xmalloc_0002f34c" * (cast_expression "(code *)PTR_xmalloc_0002f34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar5)" ( identifier ))))) ;) (expression_statement "puVar7 = puVar2;" (assignment_expression "puVar7 = puVar2" identifier = identifier) ;) (if_statement "if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);" do (compound_statement "{\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      }" { (expression_statement "uVar3 = (*(code *)PTR_xstrdup_0002f340)();" (assignment_expression "uVar3 = (*(code *)PTR_xstrdup_0002f340)()" identifier = (call_expression "(*(code *)PTR_xstrdup_0002f340)()" (parenthesized_expression "(*(code *)PTR_xstrdup_0002f340)" ( (pointer_expression "*(code *)PTR_xstrdup_0002f340" * (cast_expression "(code *)PTR_xstrdup_0002f340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" identifier = (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + iVar5)" ( (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" identifier = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (expression_statement "*puVar7 = uVar3;" (assignment_expression "*puVar7 = uVar3" (pointer_expression "*puVar7" * identifier) = identifier) ;) }) while (parenthesized_expression "(*(int *)((int)param_1 + iVar5) != 0)" ( (binary_expression "*(int *)((int)param_1 + iVar5) != 0" (pointer_expression "*(int *)((int)param_1 + iVar5)" * (cast_expression "(int *)((int)param_1 + iVar5)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar5)" ( (binary_expression "(int)param_1 + iVar5" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) != number_literal) )) ;) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" identifier = (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + iVar5)" ( (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) })) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) }))) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "char ** dupargv(char **argv)\n\n{\n  char **ppcVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  undefined4 *puVar6;\n  char **ppcVar7;\n  \n  if (argv == (char **)0x0) {\n    ppcVar1 = (char **)0x0;\n  }\n  else {\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }\n  return ppcVar1;\n}\n\n" (function_definition "char ** dupargv(char **argv)\n\n{\n  char **ppcVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  undefined4 *puVar6;\n  char **ppcVar7;\n  \n  if (argv == (char **)0x0) {\n    ppcVar1 = (char **)0x0;\n  }\n  else {\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }\n  return ppcVar1;\n}" primitive_type (pointer_declarator "** dupargv(char **argv)" * (pointer_declarator "* dupargv(char **argv)" * (function_declarator "dupargv(char **argv)" identifier (parameter_list "(char **argv)" ( (parameter_declaration "char **argv" primitive_type (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))))) (compound_statement "{\n  char **ppcVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  char *pcVar5;\n  undefined4 *puVar6;\n  char **ppcVar7;\n  \n  if (argv == (char **)0x0) {\n    ppcVar1 = (char **)0x0;\n  }\n  else {\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }\n  return ppcVar1;\n}" { (declaration "char **ppcVar1;" primitive_type (pointer_declarator "**ppcVar1" * (pointer_declarator "*ppcVar1" * identifier)) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "char **ppcVar7;" primitive_type (pointer_declarator "**ppcVar7" * (pointer_declarator "*ppcVar7" * identifier)) ;) (if_statement "if (argv == (char **)0x0) {\n    ppcVar1 = (char **)0x0;\n  }\n  else {\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }" if (parenthesized_expression "(argv == (char **)0x0)" ( (binary_expression "argv == (char **)0x0" identifier == (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    ppcVar1 = (char **)0x0;\n  }" { (expression_statement "ppcVar1 = (char **)0x0;" (assignment_expression "ppcVar1 = (char **)0x0" identifier = (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) ;) }) (else_clause "else {\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }" else (compound_statement "{\n    if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }\n    ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);\n    ppcVar7 = ppcVar1;\n    if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }\n    *ppcVar7 = (char *)0x0;\n  }" { (if_statement "if (*argv == (char *)0x0) {\n      iVar4 = 4;\n    }\n    else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }" if (parenthesized_expression "(*argv == (char *)0x0)" ( (binary_expression "*argv == (char *)0x0" (pointer_expression "*argv" * identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = 4;\n    }" { (expression_statement "iVar4 = 4;" (assignment_expression "iVar4 = 4" identifier = number_literal) ;) }) (else_clause "else {\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }" else (compound_statement "{\n      ppcVar1 = argv + 1;\n      iVar4 = 0;\n      do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);\n      iVar4 = (iVar3 + 2) * 4;\n    }" { (expression_statement "ppcVar1 = argv + 1;" (assignment_expression "ppcVar1 = argv + 1" identifier = (binary_expression "argv + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      } while (pcVar5 != (char *)0x0);" do (compound_statement "{\n        iVar3 = iVar4;\n        pcVar5 = *ppcVar1;\n        ppcVar1 = ppcVar1 + 1;\n        iVar4 = iVar3 + 1;\n      }" { (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) (expression_statement "pcVar5 = *ppcVar1;" (assignment_expression "pcVar5 = *ppcVar1" identifier = (pointer_expression "*ppcVar1" * identifier)) ;) (expression_statement "ppcVar1 = ppcVar1 + 1;" (assignment_expression "ppcVar1 = ppcVar1 + 1" identifier = (binary_expression "ppcVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar5 != (char *)0x0)" ( (binary_expression "pcVar5 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "iVar4 = (iVar3 + 2) * 4;" (assignment_expression "iVar4 = (iVar3 + 2) * 4" identifier = (binary_expression "(iVar3 + 2) * 4" (parenthesized_expression "(iVar3 + 2)" ( (binary_expression "iVar3 + 2" identifier + number_literal) )) * number_literal)) ;) }))) (expression_statement "ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4);" (assignment_expression "ppcVar1 = (char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4)" identifier = (cast_expression "(char **)(*(code *)PTR_xmalloc_0002f34c)(iVar4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "(*(code *)PTR_xmalloc_0002f34c)(iVar4)" (parenthesized_expression "(*(code *)PTR_xmalloc_0002f34c)" ( (pointer_expression "*(code *)PTR_xmalloc_0002f34c" * (cast_expression "(code *)PTR_xmalloc_0002f34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar4)" ( identifier ))))) ;) (expression_statement "ppcVar7 = ppcVar1;" (assignment_expression "ppcVar7 = ppcVar1" identifier = identifier) ;) (if_statement "if (*argv != (char *)0x0) {\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }" if (parenthesized_expression "(*argv != (char *)0x0)" ( (binary_expression "*argv != (char *)0x0" (pointer_expression "*argv" * identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);\n      ppcVar7 = (char **)((int)ppcVar1 + iVar4);\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      } while (*(int *)((int)argv + iVar4) != 0);" do (compound_statement "{\n        uVar2 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);\n        iVar4 = iVar4 + 4;\n        *puVar6 = uVar2;\n      }" { (expression_statement "uVar2 = (*(code *)PTR_xstrdup_0002f340)();" (assignment_expression "uVar2 = (*(code *)PTR_xstrdup_0002f340)()" identifier = (call_expression "(*(code *)PTR_xstrdup_0002f340)()" (parenthesized_expression "(*(code *)PTR_xstrdup_0002f340)" ( (pointer_expression "*(code *)PTR_xstrdup_0002f340" * (cast_expression "(code *)PTR_xstrdup_0002f340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "puVar6 = (undefined4 *)((int)ppcVar1 + iVar4);" (assignment_expression "puVar6 = (undefined4 *)((int)ppcVar1 + iVar4)" identifier = (cast_expression "(undefined4 *)((int)ppcVar1 + iVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)ppcVar1 + iVar4)" ( (binary_expression "(int)ppcVar1 + iVar4" (cast_expression "(int)ppcVar1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar4 = iVar4 + 4;" (assignment_expression "iVar4 = iVar4 + 4" identifier = (binary_expression "iVar4 + 4" identifier + number_literal)) ;) (expression_statement "*puVar6 = uVar2;" (assignment_expression "*puVar6 = uVar2" (pointer_expression "*puVar6" * identifier) = identifier) ;) }) while (parenthesized_expression "(*(int *)((int)argv + iVar4) != 0)" ( (binary_expression "*(int *)((int)argv + iVar4) != 0" (pointer_expression "*(int *)((int)argv + iVar4)" * (cast_expression "(int *)((int)argv + iVar4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)argv + iVar4)" ( (binary_expression "(int)argv + iVar4" (cast_expression "(int)argv" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) != number_literal) )) ;) (expression_statement "ppcVar7 = (char **)((int)ppcVar1 + iVar4);" (assignment_expression "ppcVar7 = (char **)((int)ppcVar1 + iVar4)" identifier = (cast_expression "(char **)((int)ppcVar1 + iVar4)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)ppcVar1 + iVar4)" ( (binary_expression "(int)ppcVar1 + iVar4" (cast_expression "(int)ppcVar1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) })) (expression_statement "*ppcVar7 = (char *)0x0;" (assignment_expression "*ppcVar7 = (char *)0x0" (pointer_expression "*ppcVar7" * identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (return_statement "return ppcVar1;" return identifier ;) })))
(translation_unit "undefined4 * dupargv(int *param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}\n\n" (function_definition "undefined4 * dupargv(int *param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* dupargv(int *param_1)" * (function_declarator "dupargv(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (if_statement "if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" if (parenthesized_expression "(param_1 == (int *)0x0)" ( (binary_expression "param_1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar2 = (undefined4 *)0x0;\n  }" { (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" else (compound_statement "{\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" { (if_statement "if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" if (parenthesized_expression "(*param_1 == 0)" ( (binary_expression "*param_1 == 0" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n      iVar5 = 4;\n    }" { (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" identifier = number_literal) ;) }) (else_clause "else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" else (compound_statement "{\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" { (expression_statement "piVar1 = param_1 + 1;" (assignment_expression "piVar1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);" do (compound_statement "{\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      }" { (expression_statement "iVar4 = iVar5;" (assignment_expression "iVar4 = iVar5" identifier = identifier) ;) (expression_statement "iVar6 = *piVar1;" (assignment_expression "iVar6 = *piVar1" identifier = (pointer_expression "*piVar1" * identifier)) ;) (expression_statement "piVar1 = piVar1 + 1;" (assignment_expression "piVar1 = piVar1 + 1" identifier = (binary_expression "piVar1 + 1" identifier + number_literal)) ;) (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) ;) (expression_statement "iVar5 = (iVar4 + 2) * 4;" (assignment_expression "iVar5 = (iVar4 + 2) * 4" identifier = (binary_expression "(iVar4 + 2) * 4" (parenthesized_expression "(iVar4 + 2)" ( (binary_expression "iVar4 + 2" identifier + number_literal) )) * number_literal)) ;) }))) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" identifier = (cast_expression "(undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xmalloc_0002f34c)(iVar5)" (parenthesized_expression "(*(code *)PTR_xmalloc_0002f34c)" ( (pointer_expression "*(code *)PTR_xmalloc_0002f34c" * (cast_expression "(code *)PTR_xmalloc_0002f34c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar5)" ( identifier ))))) ;) (expression_statement "puVar7 = puVar2;" (assignment_expression "puVar7 = puVar2" identifier = identifier) ;) (if_statement "if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }" if (parenthesized_expression "(*param_1 != 0)" ( (binary_expression "*param_1 != 0" (pointer_expression "*param_1" * identifier) != number_literal) )) (compound_statement "{\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }" { (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);" do (compound_statement "{\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      }" { (expression_statement "uVar3 = (*(code *)PTR_xstrdup_0002f340)();" (assignment_expression "uVar3 = (*(code *)PTR_xstrdup_0002f340)()" identifier = (call_expression "(*(code *)PTR_xstrdup_0002f340)()" (parenthesized_expression "(*(code *)PTR_xstrdup_0002f340)" ( (pointer_expression "*(code *)PTR_xstrdup_0002f340" * (cast_expression "(code *)PTR_xstrdup_0002f340" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" identifier = (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + iVar5)" ( (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" identifier = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (expression_statement "*puVar7 = uVar3;" (assignment_expression "*puVar7 = uVar3" (pointer_expression "*puVar7" * identifier) = identifier) ;) }) while (parenthesized_expression "(*(int *)((int)param_1 + iVar5) != 0)" ( (binary_expression "*(int *)((int)param_1 + iVar5) != 0" (pointer_expression "*(int *)((int)param_1 + iVar5)" * (cast_expression "(int *)((int)param_1 + iVar5)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + iVar5)" ( (binary_expression "(int)param_1 + iVar5" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) != number_literal) )) ;) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" identifier = (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar2 + iVar5)" ( (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) })) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) }))) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_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 ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) != LIT) )) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 * dupargv(int *param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" (type_identifier "undefined4") (pointer_declarator "* dupargv(int *param_1)" (* "*") (function_declarator "dupargv(int *param_1)" (identifier "dupargv") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int iVar5;\n  int iVar6;\n  undefined4 *puVar7;\n  \n  if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }\n  return puVar2;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 *puVar7;" (type_identifier "undefined4") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (if_statement "if (param_1 == (int *)0x0) {\n    puVar2 = (undefined4 *)0x0;\n  }\n  else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" (if "if") (parenthesized_expression "(param_1 == (int *)0x0)" (( "(") (binary_expression "param_1 == (int *)0x0" (identifier "param_1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar2 = (undefined4 *)0x0;\n  }" ({ "{") (expression_statement "puVar2 = (undefined4 *)0x0;" (assignment_expression "puVar2 = (undefined4 *)0x0" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" (else "else") (compound_statement "{\n    if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }\n    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);\n    puVar7 = puVar2;\n    if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }\n    *puVar7 = 0;\n  }" ({ "{") (if_statement "if (*param_1 == 0) {\n      iVar5 = 4;\n    }\n    else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\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      iVar5 = 4;\n    }" ({ "{") (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" (identifier "iVar5") (= "=") (number_literal "4")) (; ";")) (} "}")) (else_clause "else {\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" (else "else") (compound_statement "{\n      piVar1 = param_1 + 1;\n      iVar5 = 0;\n      do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);\n      iVar5 = (iVar4 + 2) * 4;\n    }" ({ "{") (expression_statement "piVar1 = param_1 + 1;" (assignment_expression "piVar1 = param_1 + 1" (identifier "piVar1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      } while (iVar6 != 0);" (do "do") (compound_statement "{\n        iVar4 = iVar5;\n        iVar6 = *piVar1;\n        piVar1 = piVar1 + 1;\n        iVar5 = iVar4 + 1;\n      }" ({ "{") (expression_statement "iVar4 = iVar5;" (assignment_expression "iVar4 = iVar5" (identifier "iVar4") (= "=") (identifier "iVar5")) (; ";")) (expression_statement "iVar6 = *piVar1;" (assignment_expression "iVar6 = *piVar1" (identifier "iVar6") (= "=") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (; ";")) (expression_statement "piVar1 = piVar1 + 1;" (assignment_expression "piVar1 = piVar1 + 1" (identifier "piVar1") (= "=") (binary_expression "piVar1 + 1" (identifier "piVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "iVar5 = (iVar4 + 2) * 4;" (assignment_expression "iVar5 = (iVar4 + 2) * 4" (identifier "iVar5") (= "=") (binary_expression "(iVar4 + 2) * 4" (parenthesized_expression "(iVar4 + 2)" (( "(") (binary_expression "iVar4 + 2" (identifier "iVar4") (+ "+") (number_literal "2")) () ")")) (* "*") (number_literal "4"))) (; ";")) (} "}")))) (expression_statement "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);" (assignment_expression "puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_xmalloc_0002f34c)(iVar5)" (parenthesized_expression "(*(code *)PTR_xmalloc_0002f34c)" (( "(") (pointer_expression "*(code *)PTR_xmalloc_0002f34c" (* "*") (cast_expression "(code *)PTR_xmalloc_0002f34c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xmalloc_0002f34c"))) () ")")) (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")"))))) (; ";")) (expression_statement "puVar7 = puVar2;" (assignment_expression "puVar7 = puVar2" (identifier "puVar7") (= "=") (identifier "puVar2")) (; ";")) (if_statement "if (*param_1 != 0) {\n      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\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      iVar5 = 0;\n      do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);\n      puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n    }" ({ "{") (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      } while (*(int *)((int)param_1 + iVar5) != 0);" (do "do") (compound_statement "{\n        uVar3 = (*(code *)PTR_xstrdup_0002f340)();\n        puVar7 = (undefined4 *)((int)puVar2 + iVar5);\n        iVar5 = iVar5 + 4;\n        *puVar7 = uVar3;\n      }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR_xstrdup_0002f340)();" (assignment_expression "uVar3 = (*(code *)PTR_xstrdup_0002f340)()" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR_xstrdup_0002f340)()" (parenthesized_expression "(*(code *)PTR_xstrdup_0002f340)" (( "(") (pointer_expression "*(code *)PTR_xstrdup_0002f340" (* "*") (cast_expression "(code *)PTR_xstrdup_0002f340" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_xstrdup_0002f340"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" (identifier "puVar7") (= "=") (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar2 + iVar5)" (( "(") (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")) (+ "+") (identifier "iVar5")) () ")")))) (; ";")) (expression_statement "iVar5 = iVar5 + 4;" (assignment_expression "iVar5 = iVar5 + 4" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "*puVar7 = uVar3;" (assignment_expression "*puVar7 = uVar3" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (identifier "uVar3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*(int *)((int)param_1 + iVar5) != 0)" (( "(") (binary_expression "*(int *)((int)param_1 + iVar5) != 0" (pointer_expression "*(int *)((int)param_1 + iVar5)" (* "*") (cast_expression "(int *)((int)param_1 + iVar5)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + iVar5)" (( "(") (binary_expression "(int)param_1 + iVar5" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "iVar5")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "puVar7 = (undefined4 *)((int)puVar2 + iVar5);" (assignment_expression "puVar7 = (undefined4 *)((int)puVar2 + iVar5)" (identifier "puVar7") (= "=") (cast_expression "(undefined4 *)((int)puVar2 + iVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar2 + iVar5)" (( "(") (binary_expression "(int)puVar2 + iVar5" (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")) (+ "+") (identifier "iVar5")) () ")")))) (; ";")) (} "}"))) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))

char ** function_1(char **var_1)

{
  char **var_2;
  type_1 uVar2;
  int var_3;
  int var_5;
  char *var_4;
  type_1 *puVar6;
  char **ppcVar7;
  
  if (var_1 == (char **)0x0) {
    var_2 = (char **)0x0;
  }
  else {
    if (*var_1 == (char *)0x0) {
      var_5 = 4;
    }
    else {
      var_2 = var_1 + 1;
      var_5 = 0;
      do {
        var_3 = var_5;
        var_4 = *var_2;
        var_2 = var_2 + 1;
        var_5 = var_3 + 1;
      } while (var_4 != (char *)0x0);
      var_5 = (var_3 + 2) * 4;
    }
    var_2 = (char **)(*(type_2 *)PTR_xmalloc_0002f34c)(var_5);
    ppcVar7 = var_2;
    if (*var_1 != (char *)0x0) {
      var_5 = 0;
      do {
        uVar2 = (*(type_2 *)PTR_xstrdup_0002f340)();
        puVar6 = (type_1 *)((int)var_2 + var_5);
        var_5 = var_5 + 4;
        *puVar6 = uVar2;
      } while (*(int *)((int)var_1 + var_5) != 0);
      ppcVar7 = (char **)((int)var_2 + var_5);
    }
    *ppcVar7 = (char *)0x0;
  }
  return var_2;
}


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

undefined4 * MASKED(int *param_1)

{
  int *piVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  int iVar5;
  int iVar6;
  undefined4 *puVar7;
  
  if (param_1 == (int *)0x0) {
    puVar2 = (undefined4 *)0x0;
  }
  else {
    if (*param_1 == 0) {
      iVar5 = 4;
    }
    else {
      piVar1 = param_1 + 1;
      iVar5 = 0;
      do {
        iVar4 = iVar5;
        iVar6 = *piVar1;
        piVar1 = piVar1 + 1;
        iVar5 = iVar4 + 1;
      } while (iVar6 != 0);
      iVar5 = (iVar4 + 2) * 4;
    }
    puVar2 = (undefined4 *)(*(code *)PTR_xmalloc_0002f34c)(iVar5);
    puVar7 = puVar2;
    if (*param_1 != 0) {
      iVar5 = 0;
      do {
        uVar3 = (*(code *)PTR_xstrdup_0002f340)();
        puVar7 = (undefined4 *)((int)puVar2 + iVar5);
        iVar5 = iVar5 + 4;
        *puVar7 = uVar3;
      } while (*(int *)((int)param_1 + iVar5) != 0);
      puVar7 = (undefined4 *)((int)puVar2 + iVar5);
    }
    *puVar7 = 0;
  }
  return puVar2;
}

