
void gz_error(gz_statep state,int err,char *msg)

{
  int iVar1;
  int iVar2;
  char *pcVar3;
  char *pcVar4;
  
  if (state->msg != (char *)0x0) {
    if (state->err == -4) {
      state->msg = (char *)0x0;
    }
    else {
      (*(code *)PTR_free_00037104)();
      state->msg = (char *)0x0;
    }
  }
  if ((err == 0) || (err == -5)) {
    state->err = err;
    if (msg == (char *)0x0) {
      return;
    }
  }
  else {
    (state->x).have = 0;
    state->err = err;
    if (msg == (char *)0x0) {
      return;
    }
    if (err == -4) {
      return;
    }
  }
  pcVar4 = state->path;
  iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);
  iVar2 = (*(code *)PTR_strlen_000370b4)(msg);
  pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);
  state->msg = pcVar3;
  if (pcVar3 == (char *)0x0) {
    state->err = -4;
  }
  else {
    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);
    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);
    (*(code *)PTR__MIPS_STUBS__00037120)
              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,
               PTR_LAB_0003701c + 0x5d38,msg);
  }
  return;
}



void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  if (param_1[0x18] != 0) {
    if (param_1[0x17] == -4) {
      param_1[0x18] = 0;
    }
    else {
      (*(code *)PTR_free_00037104)();
      param_1[0x18] = 0;
    }
  }
  if ((param_2 == 0) || (param_2 == -5)) {
    param_1[0x17] = param_2;
    if (param_3 == 0) {
      return;
    }
  }
  else {
    *param_1 = 0;
    param_1[0x17] = param_2;
    if (param_3 == 0) {
      return;
    }
    if (param_2 == -4) {
      return;
    }
  }
  uVar4 = param_1[6];
  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);
  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);
  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);
  param_1[0x18] = iVar1;
  if (iVar1 == 0) {
    param_1[0x17] = 0xfffffffc;
  }
  else {
    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);
    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);
    (*(code *)PTR___snprintf_chk_00037120)
              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,
               PTR_LAB_0003701c + 0x5d38,param_3);
  }
  return;
}


lui gp,0x2
addiu gp,gp,0xbc0
addu gp,gp,t9
addiu sp,sp,-0x40
sw ra,0x3c(sp)
sw s3,0x38(sp)
sw s2,0x34(sp)
sw s1,0x30(sp)
sw s0,0x2c(sp)
sw gp,0x20(sp)
or s0,a0,zero
or s1,a1,zero
lw a0,0x60(a0)
beq a0,zero,0x0001e480
_or s2,a2,zero
lw v1,0x5c(s0)
li v0,-0x4
bne v1,v0,0x0001e4c4
_lw t9,-0x7eec(gp)
sw zero,0x60(s0)
beq s1,zero,0x0001e4e4
_li v0,-0x5
beq s1,v0,0x0001e4e4
_nop
sw zero,0x0(s0)
beq s2,zero,0x0001e4a8
_sw s1,0x5c(s0)
li v0,-0x4
bne s1,v0,0x0001e4ec
_nop
lw ra,0x3c(sp)
lw s3,0x38(sp)
lw s2,0x34(sp)
lw s1,0x30(sp)
lw s0,0x2c(sp)
jr ra
_addiu sp,sp,0x40
jalr t9
_nop
lw gp,0x20(sp)
b 0x0001e480
_sw zero,0x60(s0)
li v0,-0x4
b 0x0001e4a8
_sw v0,0x5c(s0)
beq s2,zero,0x0001e4a8
_sw s1,0x5c(s0)
lw s3,0x18(s0)
or a0,s3,zero
lw t9,-0x7f3c(gp)
jalr t9
_nop
lw gp,0x20(sp)
or s1,v0,zero
or a0,s2,zero
lw t9,-0x7f3c(gp)
jalr t9
_nop
lw gp,0x20(sp)
addu v0,s1,v0
addiu a0,v0,0x3
lw t9,-0x7f20(gp)
jalr t9
_nop
lw gp,0x20(sp)
or s1,v0,zero
beq v0,zero,0x0001e4d8
_sw v0,0x60(s0)
or a0,s3,zero
lw t9,-0x7f3c(gp)
jalr t9
_nop
lw gp,0x20(sp)
or s0,v0,zero
or a0,s2,zero
lw t9,-0x7f3c(gp)
jalr t9
_nop
lw gp,0x20(sp)
addu v0,s0,v0
sw s2,0x1c(sp)
lw v1,-0x7fd4(gp)
addiu v1,v1,0x5d38
sw v1,0x18(sp)
sw s3,0x14(sp)
lw v1,-0x7fd4(gp)
addiu v1,v1,0x5d3c
sw v1,0x10(sp)
li a3,-0x1
li a2,0x1
addiu a1,v0,0x3
or a0,s1,zero
lw t9,-0x7ed0(gp)
jalr t9
_nop
lw gp,0x20(sp)
b 0x0001e4ac
_lw ra,0x3c(sp)
(translation_unit "void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0001e430(undefined4 *param_1,int param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" if (parenthesized_expression "(param_1[0x18] != 0)" ( (binary_expression "param_1[0x18] != 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" { (if_statement "if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" if (parenthesized_expression "(param_1[0x17] == -4)" ( (binary_expression "param_1[0x17] == -4" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      param_1[0x18] = 0;\n    }" { (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" else (compound_statement "{\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" { (expression_statement "(*(code *)PTR_free_00037104)();" (call_expression "(*(code *)PTR_free_00037104)()" (parenthesized_expression "(*(code *)PTR_free_00037104)" ( (pointer_expression "*(code *)PTR_free_00037104" * (cast_expression "(code *)PTR_free_00037104" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = number_literal) ;) }))) })) (if_statement "if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" if (parenthesized_expression "((param_2 == 0) || (param_2 == -5))" ( (binary_expression "(param_2 == 0) || (param_2 == -5)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_2 == -5)" ( (binary_expression "param_2 == -5" identifier == number_literal) ))) )) (compound_statement "{\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }" { (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_3 == 0) {\n      return;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }) (else_clause "else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" else (compound_statement "{\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_3 == 0) {\n      return;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (param_2 == -4) {\n      return;\n    }" if (parenthesized_expression "(param_2 == -4)" ( (binary_expression "param_2 == -4" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "uVar4 = param_1[6];" (assignment_expression "uVar4 = param_1[6]" identifier = (subscript_expression "param_1[6]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4)" ( identifier )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" identifier = (call_expression "(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" (parenthesized_expression "(*(code *)PTR_malloc_000370d0)" ( (pointer_expression "*(code *)PTR_malloc_000370d0" * (cast_expression "(code *)PTR_malloc_000370d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + iVar2 + 3)" ( (binary_expression "iVar1 + iVar2 + 3" (binary_expression "iVar1 + iVar2" identifier + identifier) + number_literal) )))) ;) (expression_statement "param_1[0x18] = iVar1;" (assignment_expression "param_1[0x18] = iVar1" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1[0x17] = 0xfffffffc;\n  }" { (expression_statement "param_1[0x17] = 0xfffffffc;" (assignment_expression "param_1[0x17] = 0xfffffffc" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);" (call_expression "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" (parenthesized_expression "(*(code *)PTR___snprintf_chk_00037120)" ( (pointer_expression "*(code *)PTR___snprintf_chk_00037120" * (cast_expression "(code *)PTR___snprintf_chk_00037120" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" ( identifier , (binary_expression "iVar2 + iVar3 + 3" (binary_expression "iVar2 + iVar3" identifier + identifier) + number_literal) , number_literal , number_literal , (binary_expression "PTR_LAB_0003701c + 0x5d3c" identifier + number_literal) , identifier , (binary_expression "PTR_LAB_0003701c + 0x5d38" identifier + number_literal) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void gz_error(gz_statep state,int err,char *msg)\n\n{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  \n  if (state->msg != (char *)0x0) {\n    if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }\n  }\n  if ((err == 0) || (err == -5)) {\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n  }\n  else {\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }\n  pcVar4 = state->path;\n  iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n  pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  state->msg = pcVar3;\n  if (pcVar3 == (char *)0x0) {\n    state->err = -4;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }\n  return;\n}\n\n" (function_definition "void gz_error(gz_statep state,int err,char *msg)\n\n{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  \n  if (state->msg != (char *)0x0) {\n    if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }\n  }\n  if ((err == 0) || (err == -5)) {\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n  }\n  else {\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }\n  pcVar4 = state->path;\n  iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n  pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  state->msg = pcVar3;\n  if (pcVar3 == (char *)0x0) {\n    state->err = -4;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }\n  return;\n}" primitive_type (function_declarator "gz_error(gz_statep state,int err,char *msg)" identifier (parameter_list "(gz_statep state,int err,char *msg)" ( (parameter_declaration "gz_statep state" type_identifier identifier) , (parameter_declaration "int err" primitive_type identifier) , (parameter_declaration "char *msg" primitive_type (pointer_declarator "*msg" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  char *pcVar4;\n  \n  if (state->msg != (char *)0x0) {\n    if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }\n  }\n  if ((err == 0) || (err == -5)) {\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n  }\n  else {\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }\n  pcVar4 = state->path;\n  iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n  pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  state->msg = pcVar3;\n  if (pcVar3 == (char *)0x0) {\n    state->err = -4;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (if_statement "if (state->msg != (char *)0x0) {\n    if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }\n  }" if (parenthesized_expression "(state->msg != (char *)0x0)" ( (binary_expression "state->msg != (char *)0x0" (field_expression "state->msg" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }\n  }" { (if_statement "if (state->err == -4) {\n      state->msg = (char *)0x0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }" if (parenthesized_expression "(state->err == -4)" ( (binary_expression "state->err == -4" (field_expression "state->err" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      state->msg = (char *)0x0;\n    }" { (expression_statement "state->msg = (char *)0x0;" (assignment_expression "state->msg = (char *)0x0" (field_expression "state->msg" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }" else (compound_statement "{\n      (*(code *)PTR_free_00037104)();\n      state->msg = (char *)0x0;\n    }" { (expression_statement "(*(code *)PTR_free_00037104)();" (call_expression "(*(code *)PTR_free_00037104)()" (parenthesized_expression "(*(code *)PTR_free_00037104)" ( (pointer_expression "*(code *)PTR_free_00037104" * (cast_expression "(code *)PTR_free_00037104" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "state->msg = (char *)0x0;" (assignment_expression "state->msg = (char *)0x0" (field_expression "state->msg" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) })) (if_statement "if ((err == 0) || (err == -5)) {\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n  }\n  else {\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }" if (parenthesized_expression "((err == 0) || (err == -5))" ( (binary_expression "(err == 0) || (err == -5)" (parenthesized_expression "(err == 0)" ( (binary_expression "err == 0" identifier == number_literal) )) || (parenthesized_expression "(err == -5)" ( (binary_expression "err == -5" identifier == number_literal) ))) )) (compound_statement "{\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n  }" { (expression_statement "state->err = err;" (assignment_expression "state->err = err" (field_expression "state->err" identifier -> field_identifier) = identifier) ;) (if_statement "if (msg == (char *)0x0) {\n      return;\n    }" if (parenthesized_expression "(msg == (char *)0x0)" ( (binary_expression "msg == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }) (else_clause "else {\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }" else (compound_statement "{\n    (state->x).have = 0;\n    state->err = err;\n    if (msg == (char *)0x0) {\n      return;\n    }\n    if (err == -4) {\n      return;\n    }\n  }" { (expression_statement "(state->x).have = 0;" (assignment_expression "(state->x).have = 0" (field_expression "(state->x).have" (parenthesized_expression "(state->x)" ( (field_expression "state->x" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "state->err = err;" (assignment_expression "state->err = err" (field_expression "state->err" identifier -> field_identifier) = identifier) ;) (if_statement "if (msg == (char *)0x0) {\n      return;\n    }" if (parenthesized_expression "(msg == (char *)0x0)" ( (binary_expression "msg == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (err == -4) {\n      return;\n    }" if (parenthesized_expression "(err == -4)" ( (binary_expression "err == -4" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "pcVar4 = state->path;" (assignment_expression "pcVar4 = state->path" identifier = (field_expression "state->path" identifier -> field_identifier)) ;) (expression_statement "iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(pcVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(msg);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(msg)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(msg)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(msg)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);" (assignment_expression "pcVar3 = (char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" identifier = (cast_expression "(char *)(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" (parenthesized_expression "(*(code *)PTR_malloc_000370d0)" ( (pointer_expression "*(code *)PTR_malloc_000370d0" * (cast_expression "(code *)PTR_malloc_000370d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + iVar2 + 3)" ( (binary_expression "iVar1 + iVar2 + 3" (binary_expression "iVar1 + iVar2" identifier + identifier) + number_literal) ))))) ;) (expression_statement "state->msg = pcVar3;" (assignment_expression "state->msg = pcVar3" (field_expression "state->msg" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n    state->err = -4;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    state->err = -4;\n  }" { (expression_statement "state->err = -4;" (assignment_expression "state->err = -4" (field_expression "state->err" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }" else (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);\n    iVar2 = (*(code *)PTR_strlen_000370b4)(msg);\n    (*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000370b4)(pcVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(pcVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(msg);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(msg)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(msg)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(msg)" ( identifier )))) ;) (expression_statement "(*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg);" (call_expression "(*(code *)PTR__MIPS_STUBS__00037120)\n              (pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg)" (parenthesized_expression "(*(code *)PTR__MIPS_STUBS__00037120)" ( (pointer_expression "*(code *)PTR__MIPS_STUBS__00037120" * (cast_expression "(code *)PTR__MIPS_STUBS__00037120" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3,iVar1 + iVar2 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,pcVar4,\n               PTR_LAB_0003701c + 0x5d38,msg)" ( identifier , (binary_expression "iVar1 + iVar2 + 3" (binary_expression "iVar1 + iVar2" identifier + identifier) + number_literal) , number_literal , number_literal , (binary_expression "PTR_LAB_0003701c + 0x5d3c" identifier + number_literal) , identifier , (binary_expression "PTR_LAB_0003701c + 0x5d38" identifier + number_literal) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}\n\n" (function_definition "void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0001e430(undefined4 *param_1,int param_2,int param_3)" identifier (parameter_list "(undefined4 *param_1,int param_2,int param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" if (parenthesized_expression "(param_1[0x18] != 0)" ( (binary_expression "param_1[0x18] != 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" { (if_statement "if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" if (parenthesized_expression "(param_1[0x17] == -4)" ( (binary_expression "param_1[0x17] == -4" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      param_1[0x18] = 0;\n    }" { (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" else (compound_statement "{\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" { (expression_statement "(*(code *)PTR_free_00037104)();" (call_expression "(*(code *)PTR_free_00037104)()" (parenthesized_expression "(*(code *)PTR_free_00037104)" ( (pointer_expression "*(code *)PTR_free_00037104" * (cast_expression "(code *)PTR_free_00037104" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = number_literal) ;) }))) })) (if_statement "if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" if (parenthesized_expression "((param_2 == 0) || (param_2 == -5))" ( (binary_expression "(param_2 == 0) || (param_2 == -5)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_2 == -5)" ( (binary_expression "param_2 == -5" identifier == number_literal) ))) )) (compound_statement "{\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }" { (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_3 == 0) {\n      return;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }) (else_clause "else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" else (compound_statement "{\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (param_3 == 0) {\n      return;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (if_statement "if (param_2 == -4) {\n      return;\n    }" if (parenthesized_expression "(param_2 == -4)" ( (binary_expression "param_2 == -4" identifier == number_literal) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "uVar4 = param_1[6];" (assignment_expression "uVar4 = param_1[6]" identifier = (subscript_expression "param_1[6]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4)" ( identifier )))) ;) (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" identifier = (call_expression "(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" (parenthesized_expression "(*(code *)PTR_malloc_000370d0)" ( (pointer_expression "*(code *)PTR_malloc_000370d0" * (cast_expression "(code *)PTR_malloc_000370d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + iVar2 + 3)" ( (binary_expression "iVar1 + iVar2 + 3" (binary_expression "iVar1 + iVar2" identifier + identifier) + number_literal) )))) ;) (expression_statement "param_1[0x18] = iVar1;" (assignment_expression "param_1[0x18] = iVar1" (subscript_expression "param_1[0x18]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    param_1[0x17] = 0xfffffffc;\n  }" { (expression_statement "param_1[0x17] = 0xfffffffc;" (assignment_expression "param_1[0x17] = 0xfffffffc" (subscript_expression "param_1[0x17]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" else (compound_statement "{\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" { (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar4)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3)" identifier = (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" ( (pointer_expression "*(code *)PTR_strlen_000370b4" * (cast_expression "(code *)PTR_strlen_000370b4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);" (call_expression "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" (parenthesized_expression "(*(code *)PTR___snprintf_chk_00037120)" ( (pointer_expression "*(code *)PTR___snprintf_chk_00037120" * (cast_expression "(code *)PTR___snprintf_chk_00037120" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" ( identifier , (binary_expression "iVar2 + iVar3 + 3" (binary_expression "iVar2 + iVar3" identifier + identifier) + number_literal) , number_literal , number_literal , (binary_expression "PTR_LAB_0003701c + 0x5d3c" identifier + number_literal) , identifier , (binary_expression "PTR_LAB_0003701c + 0x5d38" identifier + number_literal) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }))) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) }))) (expression_statement (assignment_expression IDENT = (subscript_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 (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }) (else_clause else (compound_statement { (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 (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression (binary_expression IDENT + IDENT) + LIT) , LIT , LIT , (binary_expression IDENT + LIT) , IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) }))) (return_statement return ;) })))
(function_definition "void FUN_0001e430(undefined4 *param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0001e430(undefined4 *param_1,int param_2,int param_3)" (identifier "FUN_0001e430") (parameter_list "(undefined4 *param_1,int param_2,int param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 uVar4;\n  \n  if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }\n  if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }\n  uVar4 = param_1[6];\n  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);\n  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);\n  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);\n  param_1[0x18] = iVar1;\n  if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (if_statement "if (param_1[0x18] != 0) {\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" (if "if") (parenthesized_expression "(param_1[0x18] != 0)" (( "(") (binary_expression "param_1[0x18] != 0" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }\n  }" ({ "{") (if_statement "if (param_1[0x17] == -4) {\n      param_1[0x18] = 0;\n    }\n    else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" (if "if") (parenthesized_expression "(param_1[0x17] == -4)" (( "(") (binary_expression "param_1[0x17] == -4" (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]")) (== "==") (number_literal "-4")) () ")")) (compound_statement "{\n      param_1[0x18] = 0;\n    }" ({ "{") (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" (else "else") (compound_statement "{\n      (*(code *)PTR_free_00037104)();\n      param_1[0x18] = 0;\n    }" ({ "{") (expression_statement "(*(code *)PTR_free_00037104)();" (call_expression "(*(code *)PTR_free_00037104)()" (parenthesized_expression "(*(code *)PTR_free_00037104)" (( "(") (pointer_expression "*(code *)PTR_free_00037104" (* "*") (cast_expression "(code *)PTR_free_00037104" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_00037104"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "param_1[0x18] = 0;" (assignment_expression "param_1[0x18] = 0" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}"))) (if_statement "if ((param_2 == 0) || (param_2 == -5)) {\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }\n  else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" (if "if") (parenthesized_expression "((param_2 == 0) || (param_2 == -5))" (( "(") (binary_expression "(param_2 == 0) || (param_2 == -5)" (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_2 == -5)" (( "(") (binary_expression "param_2 == -5" (identifier "param_2") (== "==") (number_literal "-5")) () ")"))) () ")")) (compound_statement "{\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n  }" ({ "{") (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]")) (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_3 == 0) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" (else "else") (compound_statement "{\n    *param_1 = 0;\n    param_1[0x17] = param_2;\n    if (param_3 == 0) {\n      return;\n    }\n    if (param_2 == -4) {\n      return;\n    }\n  }" ({ "{") (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_1[0x17] = param_2;" (assignment_expression "param_1[0x17] = param_2" (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]")) (= "=") (identifier "param_2")) (; ";")) (if_statement "if (param_3 == 0) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (param_2 == -4) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_2 == -4)" (( "(") (binary_expression "param_2 == -4" (identifier "param_2") (== "==") (number_literal "-4")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (expression_statement "uVar4 = param_1[6];" (assignment_expression "uVar4 = param_1[6]" (identifier "uVar4") (= "=") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" (( "(") (pointer_expression "*(code *)PTR_strlen_000370b4" (* "*") (cast_expression "(code *)PTR_strlen_000370b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_000370b4"))) () ")")) (argument_list "(uVar4)" (( "(") (identifier "uVar4") () ")")))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(param_3)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" (( "(") (pointer_expression "*(code *)PTR_strlen_000370b4" (* "*") (cast_expression "(code *)PTR_strlen_000370b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_000370b4"))) () ")")) (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);" (assignment_expression "iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3)" (parenthesized_expression "(*(code *)PTR_malloc_000370d0)" (( "(") (pointer_expression "*(code *)PTR_malloc_000370d0" (* "*") (cast_expression "(code *)PTR_malloc_000370d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_000370d0"))) () ")")) (argument_list "(iVar1 + iVar2 + 3)" (( "(") (binary_expression "iVar1 + iVar2 + 3" (binary_expression "iVar1 + iVar2" (identifier "iVar1") (+ "+") (identifier "iVar2")) (+ "+") (number_literal "3")) () ")")))) (; ";")) (expression_statement "param_1[0x18] = iVar1;" (assignment_expression "param_1[0x18] = iVar1" (subscript_expression "param_1[0x18]" (identifier "param_1") ([ "[") (number_literal "0x18") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar1 == 0) {\n    param_1[0x17] = 0xfffffffc;\n  }\n  else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    param_1[0x17] = 0xfffffffc;\n  }" ({ "{") (expression_statement "param_1[0x17] = 0xfffffffc;" (assignment_expression "param_1[0x17] = 0xfffffffc" (subscript_expression "param_1[0x17]" (identifier "param_1") ([ "[") (number_literal "0x17") (] "]")) (= "=") (number_literal "0xfffffffc")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" (else "else") (compound_statement "{\n    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);\n    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);\n    (*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);" (assignment_expression "iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strlen_000370b4)(uVar4)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" (( "(") (pointer_expression "*(code *)PTR_strlen_000370b4" (* "*") (cast_expression "(code *)PTR_strlen_000370b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_000370b4"))) () ")")) (argument_list "(uVar4)" (( "(") (identifier "uVar4") () ")")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_000370b4)(param_3)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strlen_000370b4)(param_3)" (parenthesized_expression "(*(code *)PTR_strlen_000370b4)" (( "(") (pointer_expression "*(code *)PTR_strlen_000370b4" (* "*") (cast_expression "(code *)PTR_strlen_000370b4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_000370b4"))) () ")")) (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3);" (call_expression "(*(code *)PTR___snprintf_chk_00037120)\n              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" (parenthesized_expression "(*(code *)PTR___snprintf_chk_00037120)" (( "(") (pointer_expression "*(code *)PTR___snprintf_chk_00037120" (* "*") (cast_expression "(code *)PTR___snprintf_chk_00037120" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___snprintf_chk_00037120"))) () ")")) (argument_list "(iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,\n               PTR_LAB_0003701c + 0x5d38,param_3)" (( "(") (identifier "iVar1") (, ",") (binary_expression "iVar2 + iVar3 + 3" (binary_expression "iVar2 + iVar3" (identifier "iVar2") (+ "+") (identifier "iVar3")) (+ "+") (number_literal "3")) (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (binary_expression "PTR_LAB_0003701c + 0x5d3c" (identifier "PTR_LAB_0003701c") (+ "+") (number_literal "0x5d3c")) (, ",") (identifier "uVar4") (, ",") (binary_expression "PTR_LAB_0003701c + 0x5d38" (identifier "PTR_LAB_0003701c") (+ "+") (number_literal "0x5d38")) (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 state,int var_1,char *var_2)

{
  int var_3;
  int var_4;
  char *var_5;
  char *pcVar4;
  
  if (state->var_2 != (char *)0x0) {
    if (state->var_1 == -4) {
      state->var_2 = (char *)0x0;
    }
    else {
      (*(type_2 *)PTR_free_00037104)();
      state->var_2 = (char *)0x0;
    }
  }
  if ((var_1 == 0) || (var_1 == -5)) {
    state->var_1 = var_1;
    if (var_2 == (char *)0x0) {
      return;
    }
  }
  else {
    (state->x).have = 0;
    state->var_1 = var_1;
    if (var_2 == (char *)0x0) {
      return;
    }
    if (var_1 == -4) {
      return;
    }
  }
  pcVar4 = state->path;
  var_3 = (*(type_2 *)PTR_strlen_000370b4)(pcVar4);
  var_4 = (*(type_2 *)PTR_strlen_000370b4)(var_2);
  var_5 = (char *)(*(type_2 *)PTR_malloc_000370d0)(var_3 + var_4 + 3);
  state->var_2 = var_5;
  if (var_5 == (char *)0x0) {
    state->var_1 = -4;
  }
  else {
    var_3 = (*(type_2 *)PTR_strlen_000370b4)(pcVar4);
    var_4 = (*(type_2 *)PTR_strlen_000370b4)(var_2);
    (*(type_2 *)PTR__MIPS_STUBS__00037120)
              (var_5,var_3 + var_4 + 3,1,0xffffffff,var_6 + 0x5d3c,pcVar4,
               var_6 + 0x5d38,var_2);
  }
  return;
}


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

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

{
  int iVar1;
  int iVar2;
  int iVar3;
  undefined4 uVar4;
  
  if (param_1[0x18] != 0) {
    if (param_1[0x17] == -4) {
      param_1[0x18] = 0;
    }
    else {
      (*(code *)PTR_free_00037104)();
      param_1[0x18] = 0;
    }
  }
  if ((param_2 == 0) || (param_2 == -5)) {
    param_1[0x17] = param_2;
    if (param_3 == 0) {
      return;
    }
  }
  else {
    *param_1 = 0;
    param_1[0x17] = param_2;
    if (param_3 == 0) {
      return;
    }
    if (param_2 == -4) {
      return;
    }
  }
  uVar4 = param_1[6];
  iVar1 = (*(code *)PTR_strlen_000370b4)(uVar4);
  iVar2 = (*(code *)PTR_strlen_000370b4)(param_3);
  iVar1 = (*(code *)PTR_malloc_000370d0)(iVar1 + iVar2 + 3);
  param_1[0x18] = iVar1;
  if (iVar1 == 0) {
    param_1[0x17] = 0xfffffffc;
  }
  else {
    iVar2 = (*(code *)PTR_strlen_000370b4)(uVar4);
    iVar3 = (*(code *)PTR_strlen_000370b4)(param_3);
    (*(code *)PTR___snprintf_chk_00037120)
              (iVar1,iVar2 + iVar3 + 3,1,0xffffffff,PTR_LAB_0003701c + 0x5d3c,uVar4,
               PTR_LAB_0003701c + 0x5d38,param_3);
  }
  return;
}

