
void set_dirstack_element(intmax_t ind,int sign,char *value)

{
  int iVar1;
  undefined4 in_a3;
  int iVar2;
  undefined4 in_stack_ffffffec;
  
  iVar2 = 0x14c540;
  iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value);
  if (((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&
     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))) {
    (**(code **)(iVar2 + -0x6044))
              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));
    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);
                    /* WARNING: Subroutine does not return */
    xmalloc(iVar1 + 1);
  }
  return;
}



void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  iVar2 = FUN_000bd284();
  puVar1 = PTR___environ_00145154;
  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&
     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {
    (*(code *)PTR_free_001464fc)
              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));
    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);
    uVar4 = xmalloc(iVar3 + 1);
    iVar3 = *(int *)(puVar1 + -0x67e8);
    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);
    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;
  }
  return;
}


lui gp,0x9
addiu gp,gp,-0x2018
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x6bac(gp)
addiu t9,t9,-0x2d7c
sw s1,0x1c(sp)
or s1,a3,zero
sw gp,0x10(sp)
or a3,zero,zero
sw ra,0x24(sp)
sw s2,0x20(sp)
bal 0x000bd284
_sw s0,0x18(sp)
or t1,a0,a1
beq t1,zero,0x000be610
_lw gp,0x10(sp)
bltz v0,0x000be610
_lw v1,-0x73ec(gp)
lw v1,-0x67f0(v1)
slt v1,v1,v0
bne v1,zero,0x000be614
_lw ra,0x24(sp)
lw s2,-0x73ec(gp)
sll s0,v0,0x2
lw t9,-0x6044(gp)
lw v0,-0x67e8(s2)
addu v0,v0,s0
jalr t9
_lw a0,0x0(v0)
lw gp,0x10(sp)
lw t9,-0x61b0(gp)
jalr t9
_or a0,s1,zero
lw gp,0x10(sp)
lw t9,-0x7f90(gp)
bal 0x000ad290
_addiu a0,v0,0x1
or a1,s1,zero
lw gp,0x10(sp)
or a0,v0,zero
lw v1,-0x67e8(s2)
lw t9,-0x6128(gp)
jalr t9
_addu s0,v1,s0
sw v0,0x0(s0)
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}\n\n" (function_definition "void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" primitive_type (function_declarator "set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_000bd284();" (assignment_expression "iVar2 = FUN_000bd284()" identifier = (call_expression "FUN_000bd284()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1 = PTR___environ_00145154;" (assignment_expression "puVar1 = PTR___environ_00145154" identifier = identifier) ;) (if_statement "if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" if (parenthesized_expression "(((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)))" ( (binary_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" (parenthesized_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2))" ( (binary_expression "(param_1 != 0 || param_2 != 0) && (-1 < iVar2)" (parenthesized_expression "(param_1 != 0 || param_2 != 0)" ( (binary_expression "param_1 != 0 || param_2 != 0" (binary_expression "param_1 != 0" identifier != number_literal) || (binary_expression "param_2 != 0" identifier != number_literal)) )) && (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) ))) )) && (parenthesized_expression "(iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" ( (binary_expression "iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)" identifier <= (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67f0)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x67f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x67f0)" ( (binary_expression "PTR___environ_00145154 + -0x67f0" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));" (call_expression "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" ( (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" * (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67e8)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x67e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x67e8)" ( (binary_expression "PTR___environ_00145154 + -0x67e8" identifier + number_literal) )))) + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) ))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_00146390)(param_4);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00146390)(param_4)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_4)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "uVar4 = xmalloc(iVar3 + 1);" (assignment_expression "uVar4 = xmalloc(iVar3 + 1)" identifier = (call_expression "xmalloc(iVar3 + 1)" identifier (argument_list "(iVar3 + 1)" ( (binary_expression "iVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(puVar1 + -0x67e8);" (assignment_expression "iVar3 = *(int *)(puVar1 + -0x67e8)" identifier = (pointer_expression "*(int *)(puVar1 + -0x67e8)" * (cast_expression "(int *)(puVar1 + -0x67e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x67e8)" ( (binary_expression "puVar1 + -0x67e8" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);" (assignment_expression "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4)" identifier = (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,param_4)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,param_4)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;" (assignment_expression "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4" (pointer_expression "*(undefined4 *)(iVar3 + iVar2 * 4)" * (cast_expression "(undefined4 *)(iVar3 + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + iVar2 * 4)" ( (binary_expression "iVar3 + iVar2 * 4" identifier + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void set_dirstack_element(intmax_t ind,int sign,char *value)\n\n{\n  int iVar1;\n  undefined4 in_a3;\n  int iVar2;\n  undefined4 in_stack_ffffffec;\n  \n  iVar2 = 0x14c540;\n  iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value);\n  if (((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))) {\n    (**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));\n    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);\n                    /* WARNING: Subroutine does not return */\n    xmalloc(iVar1 + 1);\n  }\n  return;\n}\n\n" (function_definition "void set_dirstack_element(intmax_t ind,int sign,char *value)\n\n{\n  int iVar1;\n  undefined4 in_a3;\n  int iVar2;\n  undefined4 in_stack_ffffffec;\n  \n  iVar2 = 0x14c540;\n  iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value);\n  if (((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))) {\n    (**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));\n    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);\n                    /* WARNING: Subroutine does not return */\n    xmalloc(iVar1 + 1);\n  }\n  return;\n}" primitive_type (function_declarator "set_dirstack_element(intmax_t ind,int sign,char *value)" identifier (parameter_list "(intmax_t ind,int sign,char *value)" ( (parameter_declaration "intmax_t ind" type_identifier identifier) , (parameter_declaration "int sign" primitive_type identifier) , (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 in_a3;\n  int iVar2;\n  undefined4 in_stack_ffffffec;\n  \n  iVar2 = 0x14c540;\n  iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value);\n  if (((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))) {\n    (**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));\n    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);\n                    /* WARNING: Subroutine does not return */\n    xmalloc(iVar1 + 1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 in_a3;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 in_stack_ffffffec;" type_identifier identifier ;) (expression_statement "iVar2 = 0x14c540;" (assignment_expression "iVar2 = 0x14c540" identifier = number_literal) ;) (expression_statement "iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value);" (assignment_expression "iVar1 = get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value)" identifier = (call_expression "get_dirstack_index(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value)" identifier (argument_list "(CONCAT44(0x14c540,in_stack_ffffffec),sign,(int *)value)" ( (call_expression "CONCAT44(0x14c540,in_stack_ffffffec)" identifier (argument_list "(0x14c540,in_stack_ffffffec)" ( number_literal , identifier ))) , identifier , (cast_expression "(int *)value" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))) {\n    (**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));\n    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);\n                    /* WARNING: Subroutine does not return */\n    xmalloc(iVar1 + 1);\n  }" if (parenthesized_expression "(((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0)))" ( (binary_expression "((sign != 0 || value != (char *)0x0) && (-1 < iVar1)) &&\n     (iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))" (parenthesized_expression "((sign != 0 || value != (char *)0x0) && (-1 < iVar1))" ( (binary_expression "(sign != 0 || value != (char *)0x0) && (-1 < iVar1)" (parenthesized_expression "(sign != 0 || value != (char *)0x0)" ( (binary_expression "sign != 0 || value != (char *)0x0" (binary_expression "sign != 0" identifier != number_literal) || (binary_expression "value != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) && (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) ))) )) && (parenthesized_expression "(iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0))" ( (binary_expression "iVar1 <= *(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0)" identifier <= (pointer_expression "*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0)" * (cast_expression "(int *)(*(int *)(iVar2 + -0x73ec) + -0x67f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + -0x73ec) + -0x67f0)" ( (binary_expression "*(int *)(iVar2 + -0x73ec) + -0x67f0" (pointer_expression "*(int *)(iVar2 + -0x73ec)" * (cast_expression "(int *)(iVar2 + -0x73ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0x73ec)" ( (binary_expression "iVar2 + -0x73ec" identifier + number_literal) )))) + number_literal) ))))) ))) )) (compound_statement "{\n    (**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));\n    iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);\n                    /* WARNING: Subroutine does not return */\n    xmalloc(iVar1 + 1);\n  }" { (expression_statement "(**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4));" (call_expression "(**(code **)(iVar2 + -0x6044))\n              (*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4))" (parenthesized_expression "(**(code **)(iVar2 + -0x6044))" ( (pointer_expression "**(code **)(iVar2 + -0x6044)" * (pointer_expression "*(code **)(iVar2 + -0x6044)" * (cast_expression "(code **)(iVar2 + -0x6044)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + -0x6044)" ( (binary_expression "iVar2 + -0x6044" identifier + number_literal) ))))) )) (argument_list "(*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4))" ( (pointer_expression "*(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4)" * (cast_expression "(undefined4 *)(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4)" ( (binary_expression "*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8) + iVar1 * 4" (pointer_expression "*(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8)" * (cast_expression "(int *)(*(int *)(iVar2 + -0x73ec) + -0x67e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar2 + -0x73ec) + -0x67e8)" ( (binary_expression "*(int *)(iVar2 + -0x73ec) + -0x67e8" (pointer_expression "*(int *)(iVar2 + -0x73ec)" * (cast_expression "(int *)(iVar2 + -0x73ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -0x73ec)" ( (binary_expression "iVar2 + -0x73ec" identifier + number_literal) )))) + number_literal) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) ))) ;) (expression_statement "iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3);" (assignment_expression "iVar1 = (**(code **)(iVar2 + -0x61b0))(in_a3)" identifier = (call_expression "(**(code **)(iVar2 + -0x61b0))(in_a3)" (parenthesized_expression "(**(code **)(iVar2 + -0x61b0))" ( (pointer_expression "**(code **)(iVar2 + -0x61b0)" * (pointer_expression "*(code **)(iVar2 + -0x61b0)" * (cast_expression "(code **)(iVar2 + -0x61b0)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + -0x61b0)" ( (binary_expression "iVar2 + -0x61b0" identifier + number_literal) ))))) )) (argument_list "(in_a3)" ( identifier )))) ;) comment (expression_statement "xmalloc(iVar1 + 1);" (call_expression "xmalloc(iVar1 + 1)" identifier (argument_list "(iVar1 + 1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}\n\n" (function_definition "void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" primitive_type (function_declarator "set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (expression_statement "iVar2 = FUN_000bd284();" (assignment_expression "iVar2 = FUN_000bd284()" identifier = (call_expression "FUN_000bd284()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1 = PTR___environ_00145154;" (assignment_expression "puVar1 = PTR___environ_00145154" identifier = identifier) ;) (if_statement "if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" if (parenthesized_expression "(((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)))" ( (binary_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" (parenthesized_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2))" ( (binary_expression "(param_1 != 0 || param_2 != 0) && (-1 < iVar2)" (parenthesized_expression "(param_1 != 0 || param_2 != 0)" ( (binary_expression "param_1 != 0 || param_2 != 0" (binary_expression "param_1 != 0" identifier != number_literal) || (binary_expression "param_2 != 0" identifier != number_literal)) )) && (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) ))) )) && (parenthesized_expression "(iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" ( (binary_expression "iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)" identifier <= (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67f0)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x67f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x67f0)" ( (binary_expression "PTR___environ_00145154 + -0x67f0" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" { (expression_statement "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));" (call_expression "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" (parenthesized_expression "(*(code *)PTR_free_001464fc)" ( (pointer_expression "*(code *)PTR_free_001464fc" * (cast_expression "(code *)PTR_free_001464fc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" ( (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" * (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67e8)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x67e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x67e8)" ( (binary_expression "PTR___environ_00145154 + -0x67e8" identifier + number_literal) )))) + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) ))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_00146390)(param_4);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00146390)(param_4)" identifier = (call_expression "(*(code *)PTR_strlen_00146390)(param_4)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" ( (pointer_expression "*(code *)PTR_strlen_00146390" * (cast_expression "(code *)PTR_strlen_00146390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_4)" ( identifier )))) ;) (expression_statement "uVar4 = xmalloc(iVar3 + 1);" (assignment_expression "uVar4 = xmalloc(iVar3 + 1)" identifier = (call_expression "xmalloc(iVar3 + 1)" identifier (argument_list "(iVar3 + 1)" ( (binary_expression "iVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "iVar3 = *(int *)(puVar1 + -0x67e8);" (assignment_expression "iVar3 = *(int *)(puVar1 + -0x67e8)" identifier = (pointer_expression "*(int *)(puVar1 + -0x67e8)" * (cast_expression "(int *)(puVar1 + -0x67e8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x67e8)" ( (binary_expression "puVar1 + -0x67e8" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);" (assignment_expression "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4)" identifier = (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,param_4)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" ( (pointer_expression "*(code *)PTR_strcpy_00146418" * (cast_expression "(code *)PTR_strcpy_00146418" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4,param_4)" ( identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;" (assignment_expression "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4" (pointer_expression "*(undefined4 *)(iVar3 + iVar2 * 4)" * (cast_expression "(undefined4 *)(iVar3 + iVar2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + iVar2 * 4)" ( (binary_expression "iVar3 + iVar2 * 4" identifier + (binary_expression "iVar2 * 4" identifier * number_literal)) )))) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) || (binary_expression IDENT != LIT)) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) && (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "set_dirstack_element(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" (identifier "set_dirstack_element") (parameter_list "(int param_1,int param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  iVar2 = FUN_000bd284();\n  puVar1 = PTR___environ_00145154;\n  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (expression_statement "iVar2 = FUN_000bd284();" (assignment_expression "iVar2 = FUN_000bd284()" (identifier "iVar2") (= "=") (call_expression "FUN_000bd284()" (identifier "FUN_000bd284") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar1 = PTR___environ_00145154;" (assignment_expression "puVar1 = PTR___environ_00145154" (identifier "puVar1") (= "=") (identifier "PTR___environ_00145154")) (; ";")) (if_statement "if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" (if "if") (parenthesized_expression "(((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)))" (( "(") (binary_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&\n     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" (parenthesized_expression "((param_1 != 0 || param_2 != 0) && (-1 < iVar2))" (( "(") (binary_expression "(param_1 != 0 || param_2 != 0) && (-1 < iVar2)" (parenthesized_expression "(param_1 != 0 || param_2 != 0)" (( "(") (binary_expression "param_1 != 0 || param_2 != 0" (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) (|| "||") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0"))) () ")")) (&& "&&") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))" (( "(") (binary_expression "iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0)" (identifier "iVar2") (<= "<=") (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67f0)" (* "*") (cast_expression "(int *)(PTR___environ_00145154 + -0x67f0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR___environ_00145154 + -0x67f0)" (( "(") (binary_expression "PTR___environ_00145154 + -0x67f0" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x67f0")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n    (*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));\n    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);\n    uVar4 = xmalloc(iVar3 + 1);\n    iVar3 = *(int *)(puVar1 + -0x67e8);\n    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);\n    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;\n  }" ({ "{") (expression_statement "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));" (call_expression "(*(code *)PTR_free_001464fc)\n              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" (parenthesized_expression "(*(code *)PTR_free_001464fc)" (( "(") (pointer_expression "*(code *)PTR_free_001464fc" (* "*") (cast_expression "(code *)PTR_free_001464fc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_001464fc"))) () ")")) (argument_list "(*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4))" (( "(") (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4)" (( "(") (binary_expression "*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x67e8)" (* "*") (cast_expression "(int *)(PTR___environ_00145154 + -0x67e8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR___environ_00145154 + -0x67e8)" (( "(") (binary_expression "PTR___environ_00145154 + -0x67e8" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x67e8")) () ")")))) (+ "+") (binary_expression "iVar2 * 4" (identifier "iVar2") (* "*") (number_literal "4"))) () ")")))) () ")"))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_strlen_00146390)(param_4);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_00146390)(param_4)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)(param_4)" (parenthesized_expression "(*(code *)PTR_strlen_00146390)" (( "(") (pointer_expression "*(code *)PTR_strlen_00146390" (* "*") (cast_expression "(code *)PTR_strlen_00146390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_00146390"))) () ")")) (argument_list "(param_4)" (( "(") (identifier "param_4") () ")")))) (; ";")) (expression_statement "uVar4 = xmalloc(iVar3 + 1);" (assignment_expression "uVar4 = xmalloc(iVar3 + 1)" (identifier "uVar4") (= "=") (call_expression "xmalloc(iVar3 + 1)" (identifier "xmalloc") (argument_list "(iVar3 + 1)" (( "(") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "iVar3 = *(int *)(puVar1 + -0x67e8);" (assignment_expression "iVar3 = *(int *)(puVar1 + -0x67e8)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(puVar1 + -0x67e8)" (* "*") (cast_expression "(int *)(puVar1 + -0x67e8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x67e8)" (( "(") (binary_expression "puVar1 + -0x67e8" (identifier "puVar1") (+ "+") (number_literal "-0x67e8")) () ")"))))) (; ";")) (expression_statement "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);" (assignment_expression "uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4)" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_strcpy_00146418)(uVar4,param_4)" (parenthesized_expression "(*(code *)PTR_strcpy_00146418)" (( "(") (pointer_expression "*(code *)PTR_strcpy_00146418" (* "*") (cast_expression "(code *)PTR_strcpy_00146418" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcpy_00146418"))) () ")")) (argument_list "(uVar4,param_4)" (( "(") (identifier "uVar4") (, ",") (identifier "param_4") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;" (assignment_expression "*(undefined4 *)(iVar3 + iVar2 * 4) = uVar4" (pointer_expression "*(undefined4 *)(iVar3 + iVar2 * 4)" (* "*") (cast_expression "(undefined4 *)(iVar3 + iVar2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + iVar2 * 4)" (( "(") (binary_expression "iVar3 + iVar2 * 4" (identifier "iVar3") (+ "+") (binary_expression "iVar2 * 4" (identifier "iVar2") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 ind,int var_3,char *var_4)

{
  int var_5;
  type_2 in_a3;
  int var_6;
  type_2 in_stack_ffffffec;
  
  var_6 = 0x14c540;
  var_5 = var_1(var_2(0x14c540,in_stack_ffffffec),var_3,(int *)var_4);
  if (((var_3 != 0 || var_4 != (char *)0x0) && (-1 < var_5)) &&
     (var_5 <= *(int *)(*(int *)(var_6 + -0x73ec) + -0x67f0))) {
    (**(type_3 **)(var_6 + -0x6044))
              (*(type_2 *)(*(int *)(*(int *)(var_6 + -0x73ec) + -0x67e8) + var_5 * 4));
    var_5 = (**(type_3 **)(var_6 + -0x61b0))(in_a3);
                    /* WARNING: Subroutine does not return */
    var_7(var_5 + 1);
  }
  return;
}


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

void MASKED(int param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  iVar2 = FUN_000bd284();
  puVar1 = PTR___environ_00145154;
  if (((param_1 != 0 || param_2 != 0) && (-1 < iVar2)) &&
     (iVar2 <= *(int *)(PTR___environ_00145154 + -0x67f0))) {
    (*(code *)PTR_free_001464fc)
              (*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x67e8) + iVar2 * 4));
    iVar3 = (*(code *)PTR_strlen_00146390)(param_4);
    uVar4 = xmalloc(iVar3 + 1);
    iVar3 = *(int *)(puVar1 + -0x67e8);
    uVar4 = (*(code *)PTR_strcpy_00146418)(uVar4,param_4);
    *(undefined4 *)(iVar3 + iVar2 * 4) = uVar4;
  }
  return;
}

