
char * sub_append_string(char *source,char *target,int *indx,size_t *size)

{
  undefined *puVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (source != (char *)0x0) {
    if (*source == '\0') {
      uVar4 = 0;
    }
    else {
      uVar4 = 1;
      if (source[1] != '\0') {
        if (source[2] == '\0') {
          uVar4 = 2;
        }
        else {
          uVar4 = (*(code *)PTR_strlen_00146390)();
        }
      }
    }
    puVar1 = PTR_xrealloc_0014473c;
    iVar2 = *indx;
    if (*size - iVar2 <= uVar4) {
      uVar3 = iVar2 + uVar4 & 0x8000007f;
      if ((int)uVar3 < 0) {
        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;
      }
      *size = (iVar2 + uVar4 + 0x80) - uVar3;
      target = (char *)(*(code *)puVar1)(target);
      iVar2 = *indx;
    }
    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);
    puVar1 = PTR_free_001464fc;
    iVar2 = *indx;
    *indx = uVar4 + iVar2;
    target[uVar4 + iVar2] = '\0';
    (*(code *)puVar1)(source);
  }
  return target;
}



int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)

{
  undefined *puVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_1 != (char *)0x0) {
    if (*param_1 == '\0') {
      uVar4 = 0;
    }
    else {
      uVar4 = 1;
      if (param_1[1] != '\0') {
        if (param_1[2] == '\0') {
          uVar4 = 2;
        }
        else {
          uVar4 = (*(code *)PTR_strlen_00146390)();
        }
      }
    }
    puVar1 = PTR_xrealloc_0014473c;
    iVar2 = *param_3;
    if ((uint)(*param_4 - iVar2) <= uVar4) {
      uVar3 = iVar2 + uVar4 & 0x8000007f;
      if ((int)uVar3 < 0) {
        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;
      }
      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;
      param_2 = (*(code *)puVar1)(param_2);
      iVar2 = *param_3;
    }
    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);
    puVar1 = PTR_free_001464fc;
    iVar2 = *param_3;
    *param_3 = uVar4 + iVar2;
    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;
    (*(code *)puVar1)(param_1);
  }
  return param_2;
}


lui gp,0xe
addiu gp,gp,-0x3280
addu gp,gp,t9
addiu sp,sp,-0x30
sw gp,0x10(sp)
sw s2,0x24(sp)
or s2,a1,zero
sw ra,0x2c(sp)
sw s3,0x28(sp)
sw s1,0x20(sp)
beq a0,zero,0x0006f854
_sw s0,0x1c(sp)
lb v0,0x0(a0)
or s1,a0,zero
bne v0,zero,0x0006f874
_or s3,a2,zero
or s0,zero,zero
lw a0,0x0(s3)
lw v0,0x0(a3)
subu v0,v0,a0
sltu v0,s0,v0
beq v0,zero,0x0006f8a4
_lui v0,0x8000
lw t9,-0x605c(gp)
addu a0,s2,a0
or a2,s0,zero
jalr t9
_or a1,s1,zero
or a0,s1,zero
lw v0,0x0(s3)
lw gp,0x10(sp)
addu s0,s0,v0
addu v0,s2,s0
lw t9,-0x6044(gp)
sw s0,0x0(s3)
jalr t9
_sb zero,0x0(v0)
lw ra,0x2c(sp)
or v0,s2,zero
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lb v0,0x1(a0)
beq v0,zero,0x0006f804
_li s0,0x1
lb v0,0x2(a0)
beq v0,zero,0x0006f8f0
_lw t9,-0x61b0(gp)
jalr t9
_sw a3,0x3c(sp)
lw gp,0x10(sp)
or s0,v0,zero
b 0x0006f804
_lw a3,0x3c(sp)
addu a0,a0,s0
addiu v0,v0,0x7f
addiu a1,a0,0x80
and a0,a0,v0
bltz a0,0x0006f8e0
_li v0,-0x80
subu a1,a1,a0
lw t9,-0x7e04(gp)
or a0,s2,zero
jalr t9
_sw a1,0x0(a3)
lw gp,0x10(sp)
or s2,v0,zero
b 0x0006f81c
_lw a0,0x0(s3)
addiu a0,a0,-0x1
or a0,a0,v0
b 0x0006f8bc
_addiu a0,a0,0x1
b 0x0006f804
_li s0,0x2
(translation_unit "int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}\n\n" (function_definition "int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" primitive_type (function_declarator "sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)" identifier (parameter_list "(char *param_1,int param_2,int *param_3,int *param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" if (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" { (if_statement "if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" else (compound_statement "{\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" if (parenthesized_expression "(param_1[1] != '\0')" ( (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" { (if_statement "if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" if (parenthesized_expression "(param_1[2] == '\0')" ( (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          uVar4 = 2;\n        }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }) (else_clause "else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" else (compound_statement "{\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" { (expression_statement "uVar4 = (*(code *)PTR_strlen_00146390)();" (assignment_expression "uVar4 = (*(code *)PTR_strlen_00146390)()" identifier = (call_expression "(*(code *)PTR_strlen_00146390)()" (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 "()" ( )))) ;) }))) })) }))) (expression_statement "puVar1 = PTR_xrealloc_0014473c;" (assignment_expression "puVar1 = PTR_xrealloc_0014473c" identifier = identifier) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" if (parenthesized_expression "((uint)(*param_4 - iVar2) <= uVar4)" ( (binary_expression "(uint)(*param_4 - iVar2) <= uVar4" (call_expression "(uint)(*param_4 - iVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_4 - iVar2)" ( (binary_expression "*param_4 - iVar2" (pointer_expression "*param_4" * identifier) - identifier) ))) <= identifier) )) (compound_statement "{\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" { (expression_statement "uVar3 = iVar2 + uVar4 & 0x8000007f;" (assignment_expression "uVar3 = iVar2 + uVar4 & 0x8000007f" identifier = (binary_expression "iVar2 + uVar4 & 0x8000007f" (binary_expression "iVar2 + uVar4" identifier + identifier) & number_literal)) ;) (if_statement "if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" { (expression_statement "uVar3 = (uVar3 - 1 | 0xffffff80) + 1;" (assignment_expression "uVar3 = (uVar3 - 1 | 0xffffff80) + 1" identifier = (binary_expression "(uVar3 - 1 | 0xffffff80) + 1" (parenthesized_expression "(uVar3 - 1 | 0xffffff80)" ( (binary_expression "uVar3 - 1 | 0xffffff80" (binary_expression "uVar3 - 1" identifier - number_literal) | number_literal) )) + number_literal)) ;) })) (expression_statement "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3;" (assignment_expression "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3" (pointer_expression "*param_4" * identifier) = (binary_expression "(iVar2 + uVar4 + 0x80) - uVar3" (parenthesized_expression "(iVar2 + uVar4 + 0x80)" ( (binary_expression "iVar2 + uVar4 + 0x80" (binary_expression "iVar2 + uVar4" identifier + identifier) + number_literal) )) - identifier)) ;) (expression_statement "param_2 = (*(code *)puVar1)(param_2);" (assignment_expression "param_2 = (*(code *)puVar1)(param_2)" identifier = (call_expression "(*(code *)puVar1)(param_2)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) (expression_statement "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);" (call_expression "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_memcpy_001464e4)" ( (pointer_expression "*(code *)PTR_memcpy_001464e4" * (cast_expression "(code *)PTR_memcpy_001464e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2 + iVar2,param_1,uVar4)" ( (binary_expression "param_2 + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "puVar1 = PTR_free_001464fc;" (assignment_expression "puVar1 = PTR_free_001464fc" identifier = identifier) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*param_3 = uVar4 + iVar2;" (assignment_expression "*param_3 = uVar4 + iVar2" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + iVar2" identifier + identifier)) ;) (expression_statement "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0" (pointer_expression "*(undefined1 *)(param_2 + uVar4 + iVar2)" * (cast_expression "(undefined1 *)(param_2 + uVar4 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar4 + iVar2)" ( (binary_expression "param_2 + uVar4 + iVar2" (binary_expression "param_2 + uVar4" identifier + identifier) + identifier) )))) = number_literal) ;) (expression_statement "(*(code *)puVar1)(param_1);" (call_expression "(*(code *)puVar1)(param_1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "char * sub_append_string(char *source,char *target,int *indx,size_t *size)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (source != (char *)0x0) {\n    if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *indx;\n    if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }\n    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *indx;\n    *indx = uVar4 + iVar2;\n    target[uVar4 + iVar2] = '\0';\n    (*(code *)puVar1)(source);\n  }\n  return target;\n}\n\n" (function_definition "char * sub_append_string(char *source,char *target,int *indx,size_t *size)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (source != (char *)0x0) {\n    if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *indx;\n    if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }\n    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *indx;\n    *indx = uVar4 + iVar2;\n    target[uVar4 + iVar2] = '\0';\n    (*(code *)puVar1)(source);\n  }\n  return target;\n}" primitive_type (pointer_declarator "* sub_append_string(char *source,char *target,int *indx,size_t *size)" * (function_declarator "sub_append_string(char *source,char *target,int *indx,size_t *size)" identifier (parameter_list "(char *source,char *target,int *indx,size_t *size)" ( (parameter_declaration "char *source" primitive_type (pointer_declarator "*source" * identifier)) , (parameter_declaration "char *target" primitive_type (pointer_declarator "*target" * identifier)) , (parameter_declaration "int *indx" primitive_type (pointer_declarator "*indx" * identifier)) , (parameter_declaration "size_t *size" primitive_type (pointer_declarator "*size" * identifier)) )))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (source != (char *)0x0) {\n    if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *indx;\n    if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }\n    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *indx;\n    *indx = uVar4 + iVar2;\n    target[uVar4 + iVar2] = '\0';\n    (*(code *)puVar1)(source);\n  }\n  return target;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (source != (char *)0x0) {\n    if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *indx;\n    if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }\n    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *indx;\n    *indx = uVar4 + iVar2;\n    target[uVar4 + iVar2] = '\0';\n    (*(code *)puVar1)(source);\n  }" if (parenthesized_expression "(source != (char *)0x0)" ( (binary_expression "source != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *indx;\n    if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }\n    (*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *indx;\n    *indx = uVar4 + iVar2;\n    target[uVar4 + iVar2] = '\0';\n    (*(code *)puVar1)(source);\n  }" { (if_statement "if (*source == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" if (parenthesized_expression "(*source == '\0')" ( (binary_expression "*source == '\0'" (pointer_expression "*source" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" else (compound_statement "{\n      uVar4 = 1;\n      if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (source[1] != '\0') {\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" if (parenthesized_expression "(source[1] != '\0')" ( (binary_expression "source[1] != '\0'" (subscript_expression "source[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" { (if_statement "if (source[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" if (parenthesized_expression "(source[2] == '\0')" ( (binary_expression "source[2] == '\0'" (subscript_expression "source[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          uVar4 = 2;\n        }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }) (else_clause "else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" else (compound_statement "{\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" { (expression_statement "uVar4 = (*(code *)PTR_strlen_00146390)();" (assignment_expression "uVar4 = (*(code *)PTR_strlen_00146390)()" identifier = (call_expression "(*(code *)PTR_strlen_00146390)()" (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 "()" ( )))) ;) }))) })) }))) (expression_statement "puVar1 = PTR_xrealloc_0014473c;" (assignment_expression "puVar1 = PTR_xrealloc_0014473c" identifier = identifier) ;) (expression_statement "iVar2 = *indx;" (assignment_expression "iVar2 = *indx" identifier = (pointer_expression "*indx" * identifier)) ;) (if_statement "if (*size - iVar2 <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }" if (parenthesized_expression "(*size - iVar2 <= uVar4)" ( (binary_expression "*size - iVar2 <= uVar4" (binary_expression "*size - iVar2" (pointer_expression "*size" * identifier) - identifier) <= identifier) )) (compound_statement "{\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *size = (iVar2 + uVar4 + 0x80) - uVar3;\n      target = (char *)(*(code *)puVar1)(target);\n      iVar2 = *indx;\n    }" { (expression_statement "uVar3 = iVar2 + uVar4 & 0x8000007f;" (assignment_expression "uVar3 = iVar2 + uVar4 & 0x8000007f" identifier = (binary_expression "iVar2 + uVar4 & 0x8000007f" (binary_expression "iVar2 + uVar4" identifier + identifier) & number_literal)) ;) (if_statement "if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" { (expression_statement "uVar3 = (uVar3 - 1 | 0xffffff80) + 1;" (assignment_expression "uVar3 = (uVar3 - 1 | 0xffffff80) + 1" identifier = (binary_expression "(uVar3 - 1 | 0xffffff80) + 1" (parenthesized_expression "(uVar3 - 1 | 0xffffff80)" ( (binary_expression "uVar3 - 1 | 0xffffff80" (binary_expression "uVar3 - 1" identifier - number_literal) | number_literal) )) + number_literal)) ;) })) (expression_statement "*size = (iVar2 + uVar4 + 0x80) - uVar3;" (assignment_expression "*size = (iVar2 + uVar4 + 0x80) - uVar3" (pointer_expression "*size" * identifier) = (binary_expression "(iVar2 + uVar4 + 0x80) - uVar3" (parenthesized_expression "(iVar2 + uVar4 + 0x80)" ( (binary_expression "iVar2 + uVar4 + 0x80" (binary_expression "iVar2 + uVar4" identifier + identifier) + number_literal) )) - identifier)) ;) (expression_statement "target = (char *)(*(code *)puVar1)(target);" (assignment_expression "target = (char *)(*(code *)puVar1)(target)" identifier = (cast_expression "(char *)(*(code *)puVar1)(target)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)puVar1)(target)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(target)" ( identifier ))))) ;) (expression_statement "iVar2 = *indx;" (assignment_expression "iVar2 = *indx" identifier = (pointer_expression "*indx" * identifier)) ;) })) (expression_statement "(*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4);" (call_expression "(*(code *)PTR_memcpy_001464e4)(target + iVar2,source,uVar4)" (parenthesized_expression "(*(code *)PTR_memcpy_001464e4)" ( (pointer_expression "*(code *)PTR_memcpy_001464e4" * (cast_expression "(code *)PTR_memcpy_001464e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(target + iVar2,source,uVar4)" ( (binary_expression "target + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "puVar1 = PTR_free_001464fc;" (assignment_expression "puVar1 = PTR_free_001464fc" identifier = identifier) ;) (expression_statement "iVar2 = *indx;" (assignment_expression "iVar2 = *indx" identifier = (pointer_expression "*indx" * identifier)) ;) (expression_statement "*indx = uVar4 + iVar2;" (assignment_expression "*indx = uVar4 + iVar2" (pointer_expression "*indx" * identifier) = (binary_expression "uVar4 + iVar2" identifier + identifier)) ;) (expression_statement "target[uVar4 + iVar2] = '\0';" (assignment_expression "target[uVar4 + iVar2] = '\0'" (subscript_expression "target[uVar4 + iVar2]" identifier [ (binary_expression "uVar4 + iVar2" identifier + identifier) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "(*(code *)puVar1)(source);" (call_expression "(*(code *)puVar1)(source)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(source)" ( identifier ))) ;) })) (return_statement "return target;" return identifier ;) })))
(translation_unit "int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}\n\n" (function_definition "int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" primitive_type (function_declarator "sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)" identifier (parameter_list "(char *param_1,int param_2,int *param_3,int *param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (if_statement "if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" if (parenthesized_expression "(param_1 != (char *)0x0)" ( (binary_expression "param_1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" { (if_statement "if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" else (compound_statement "{\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) (if_statement "if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" if (parenthesized_expression "(param_1[1] != '\0')" ( (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" { (if_statement "if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" if (parenthesized_expression "(param_1[2] == '\0')" ( (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          uVar4 = 2;\n        }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) }) (else_clause "else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" else (compound_statement "{\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" { (expression_statement "uVar4 = (*(code *)PTR_strlen_00146390)();" (assignment_expression "uVar4 = (*(code *)PTR_strlen_00146390)()" identifier = (call_expression "(*(code *)PTR_strlen_00146390)()" (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 "()" ( )))) ;) }))) })) }))) (expression_statement "puVar1 = PTR_xrealloc_0014473c;" (assignment_expression "puVar1 = PTR_xrealloc_0014473c" identifier = identifier) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" if (parenthesized_expression "((uint)(*param_4 - iVar2) <= uVar4)" ( (binary_expression "(uint)(*param_4 - iVar2) <= uVar4" (call_expression "(uint)(*param_4 - iVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*param_4 - iVar2)" ( (binary_expression "*param_4 - iVar2" (pointer_expression "*param_4" * identifier) - identifier) ))) <= identifier) )) (compound_statement "{\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" { (expression_statement "uVar3 = iVar2 + uVar4 & 0x8000007f;" (assignment_expression "uVar3 = iVar2 + uVar4 & 0x8000007f" identifier = (binary_expression "iVar2 + uVar4 & 0x8000007f" (binary_expression "iVar2 + uVar4" identifier + identifier) & number_literal)) ;) (if_statement "if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" if (parenthesized_expression "((int)uVar3 < 0)" ( (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" { (expression_statement "uVar3 = (uVar3 - 1 | 0xffffff80) + 1;" (assignment_expression "uVar3 = (uVar3 - 1 | 0xffffff80) + 1" identifier = (binary_expression "(uVar3 - 1 | 0xffffff80) + 1" (parenthesized_expression "(uVar3 - 1 | 0xffffff80)" ( (binary_expression "uVar3 - 1 | 0xffffff80" (binary_expression "uVar3 - 1" identifier - number_literal) | number_literal) )) + number_literal)) ;) })) (expression_statement "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3;" (assignment_expression "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3" (pointer_expression "*param_4" * identifier) = (binary_expression "(iVar2 + uVar4 + 0x80) - uVar3" (parenthesized_expression "(iVar2 + uVar4 + 0x80)" ( (binary_expression "iVar2 + uVar4 + 0x80" (binary_expression "iVar2 + uVar4" identifier + identifier) + number_literal) )) - identifier)) ;) (expression_statement "param_2 = (*(code *)puVar1)(param_2);" (assignment_expression "param_2 = (*(code *)puVar1)(param_2)" identifier = (call_expression "(*(code *)puVar1)(param_2)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) (expression_statement "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);" (call_expression "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_memcpy_001464e4)" ( (pointer_expression "*(code *)PTR_memcpy_001464e4" * (cast_expression "(code *)PTR_memcpy_001464e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2 + iVar2,param_1,uVar4)" ( (binary_expression "param_2 + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "puVar1 = PTR_free_001464fc;" (assignment_expression "puVar1 = PTR_free_001464fc" identifier = identifier) ;) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*param_3 = uVar4 + iVar2;" (assignment_expression "*param_3 = uVar4 + iVar2" (pointer_expression "*param_3" * identifier) = (binary_expression "uVar4 + iVar2" identifier + identifier)) ;) (expression_statement "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0" (pointer_expression "*(undefined1 *)(param_2 + uVar4 + iVar2)" * (cast_expression "(undefined1 *)(param_2 + uVar4 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + uVar4 + iVar2)" ( (binary_expression "param_2 + uVar4 + iVar2" (binary_expression "param_2 + uVar4" identifier + identifier) + identifier) )))) = number_literal) ;) (expression_statement "(*(code *)puVar1)(param_1);" (call_expression "(*(code *)puVar1)(param_1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = 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 ( )))) ;) }))) })) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) - IDENT) ))) <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) | LIT) )) + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )) - 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 = (pointer_expression * IDENT)) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + IDENT) )))) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "int sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" (primitive_type "int") (function_declarator "sub_append_string(char *param_1,int param_2,int *param_3,int *param_4)" (identifier "sub_append_string") (parameter_list "(char *param_1,int param_2,int *param_3,int *param_4)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (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") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }\n  return param_2;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (if_statement "if (param_1 != (char *)0x0) {\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" (if "if") (parenthesized_expression "(param_1 != (char *)0x0)" (( "(") (binary_expression "param_1 != (char *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }\n    puVar1 = PTR_xrealloc_0014473c;\n    iVar2 = *param_3;\n    if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }\n    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);\n    puVar1 = PTR_free_001464fc;\n    iVar2 = *param_3;\n    *param_3 = uVar4 + iVar2;\n    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;\n    (*(code *)puVar1)(param_1);\n  }" ({ "{") (if_statement "if (*param_1 == '\0') {\n      uVar4 = 0;\n    }\n    else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" (else "else") (compound_statement "{\n      uVar4 = 1;\n      if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }\n    }" ({ "{") (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";")) (if_statement "if (param_1[1] != '\0') {\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" (if "if") (parenthesized_expression "(param_1[1] != '\0')" (( "(") (binary_expression "param_1[1] != '\0'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }\n      }" ({ "{") (if_statement "if (param_1[2] == '\0') {\n          uVar4 = 2;\n        }\n        else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" (if "if") (parenthesized_expression "(param_1[2] == '\0')" (( "(") (binary_expression "param_1[2] == '\0'" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          uVar4 = 2;\n        }" ({ "{") (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" (identifier "uVar4") (= "=") (number_literal "2")) (; ";")) (} "}")) (else_clause "else {\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" (else "else") (compound_statement "{\n          uVar4 = (*(code *)PTR_strlen_00146390)();\n        }" ({ "{") (expression_statement "uVar4 = (*(code *)PTR_strlen_00146390)();" (assignment_expression "uVar4 = (*(code *)PTR_strlen_00146390)()" (identifier "uVar4") (= "=") (call_expression "(*(code *)PTR_strlen_00146390)()" (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 "()" (( "(") () ")")))) (; ";")) (} "}")))) (} "}"))) (} "}")))) (expression_statement "puVar1 = PTR_xrealloc_0014473c;" (assignment_expression "puVar1 = PTR_xrealloc_0014473c" (identifier "puVar1") (= "=") (identifier "PTR_xrealloc_0014473c")) (; ";")) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" (identifier "iVar2") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (if_statement "if ((uint)(*param_4 - iVar2) <= uVar4) {\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" (if "if") (parenthesized_expression "((uint)(*param_4 - iVar2) <= uVar4)" (( "(") (binary_expression "(uint)(*param_4 - iVar2) <= uVar4" (call_expression "(uint)(*param_4 - iVar2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*param_4 - iVar2)" (( "(") (binary_expression "*param_4 - iVar2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (- "-") (identifier "iVar2")) () ")"))) (<= "<=") (identifier "uVar4")) () ")")) (compound_statement "{\n      uVar3 = iVar2 + uVar4 & 0x8000007f;\n      if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }\n      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;\n      param_2 = (*(code *)puVar1)(param_2);\n      iVar2 = *param_3;\n    }" ({ "{") (expression_statement "uVar3 = iVar2 + uVar4 & 0x8000007f;" (assignment_expression "uVar3 = iVar2 + uVar4 & 0x8000007f" (identifier "uVar3") (= "=") (binary_expression "iVar2 + uVar4 & 0x8000007f" (binary_expression "iVar2 + uVar4" (identifier "iVar2") (+ "+") (identifier "uVar4")) (& "&") (number_literal "0x8000007f"))) (; ";")) (if_statement "if ((int)uVar3 < 0) {\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" (if "if") (parenthesized_expression "((int)uVar3 < 0)" (( "(") (binary_expression "(int)uVar3 < 0" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;\n      }" ({ "{") (expression_statement "uVar3 = (uVar3 - 1 | 0xffffff80) + 1;" (assignment_expression "uVar3 = (uVar3 - 1 | 0xffffff80) + 1" (identifier "uVar3") (= "=") (binary_expression "(uVar3 - 1 | 0xffffff80) + 1" (parenthesized_expression "(uVar3 - 1 | 0xffffff80)" (( "(") (binary_expression "uVar3 - 1 | 0xffffff80" (binary_expression "uVar3 - 1" (identifier "uVar3") (- "-") (number_literal "1")) (| "|") (number_literal "0xffffff80")) () ")")) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3;" (assignment_expression "*param_4 = (iVar2 + uVar4 + 0x80) - uVar3" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (binary_expression "(iVar2 + uVar4 + 0x80) - uVar3" (parenthesized_expression "(iVar2 + uVar4 + 0x80)" (( "(") (binary_expression "iVar2 + uVar4 + 0x80" (binary_expression "iVar2 + uVar4" (identifier "iVar2") (+ "+") (identifier "uVar4")) (+ "+") (number_literal "0x80")) () ")")) (- "-") (identifier "uVar3"))) (; ";")) (expression_statement "param_2 = (*(code *)puVar1)(param_2);" (assignment_expression "param_2 = (*(code *)puVar1)(param_2)" (identifier "param_2") (= "=") (call_expression "(*(code *)puVar1)(param_2)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" (identifier "iVar2") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);" (call_expression "(*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_memcpy_001464e4)" (( "(") (pointer_expression "*(code *)PTR_memcpy_001464e4" (* "*") (cast_expression "(code *)PTR_memcpy_001464e4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_001464e4"))) () ")")) (argument_list "(param_2 + iVar2,param_1,uVar4)" (( "(") (binary_expression "param_2 + iVar2" (identifier "param_2") (+ "+") (identifier "iVar2")) (, ",") (identifier "param_1") (, ",") (identifier "uVar4") () ")"))) (; ";")) (expression_statement "puVar1 = PTR_free_001464fc;" (assignment_expression "puVar1 = PTR_free_001464fc" (identifier "puVar1") (= "=") (identifier "PTR_free_001464fc")) (; ";")) (expression_statement "iVar2 = *param_3;" (assignment_expression "iVar2 = *param_3" (identifier "iVar2") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "*param_3 = uVar4 + iVar2;" (assignment_expression "*param_3 = uVar4 + iVar2" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "uVar4 + iVar2" (identifier "uVar4") (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(param_2 + uVar4 + iVar2) = 0" (pointer_expression "*(undefined1 *)(param_2 + uVar4 + iVar2)" (* "*") (cast_expression "(undefined1 *)(param_2 + uVar4 + iVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + uVar4 + iVar2)" (( "(") (binary_expression "param_2 + uVar4 + iVar2" (binary_expression "param_2 + uVar4" (identifier "param_2") (+ "+") (identifier "uVar4")) (+ "+") (identifier "iVar2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "(*(code *)puVar1)(param_1);" (call_expression "(*(code *)puVar1)(param_1)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) 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)))))))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))) right: (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: (pointer_expression argument: (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 (binary_expression left: (identifier) right: (identifier)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (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: (binary_expression left: (identifier) right: (identifier)) right: (identifier))))) right: (number_literal))) (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)))))) (return_statement (identifier)))))

int MASKED(char *param_1,int param_2,int *param_3,int *param_4)

{
  undefined *puVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  if (param_1 != (char *)0x0) {
    if (*param_1 == '\0') {
      uVar4 = 0;
    }
    else {
      uVar4 = 1;
      if (param_1[1] != '\0') {
        if (param_1[2] == '\0') {
          uVar4 = 2;
        }
        else {
          uVar4 = (*(code *)PTR_strlen_00146390)();
        }
      }
    }
    puVar1 = PTR_xrealloc_0014473c;
    iVar2 = *param_3;
    if ((uint)(*param_4 - iVar2) <= uVar4) {
      uVar3 = iVar2 + uVar4 & 0x8000007f;
      if ((int)uVar3 < 0) {
        uVar3 = (uVar3 - 1 | 0xffffff80) + 1;
      }
      *param_4 = (iVar2 + uVar4 + 0x80) - uVar3;
      param_2 = (*(code *)puVar1)(param_2);
      iVar2 = *param_3;
    }
    (*(code *)PTR_memcpy_001464e4)(param_2 + iVar2,param_1,uVar4);
    puVar1 = PTR_free_001464fc;
    iVar2 = *param_3;
    *param_3 = uVar4 + iVar2;
    *(undefined1 *)(param_2 + uVar4 + iVar2) = 0;
    (*(code *)puVar1)(param_1);
  }
  return param_2;
}

