
char * mfile_name_concat(char *dir,char *base,char **base_in_result)

{
  char *pcVar1;
  size_t sVar2;
  int iVar3;
  undefined1 uVar6;
  char *pcVar4;
  undefined1 *puVar5;
  uint uVar7;
  
  pcVar1 = last_component(dir);
  sVar2 = base_len(pcVar1);
  pcVar1 = pcVar1 + (sVar2 - (int)dir);
  iVar3 = (*(code *)PTR_strlen_0004953c)(base);
  if (sVar2 == 0) {
    uVar6 = 0x2e;
    if ((byte)(*base ^ 0x2fU) != 0) {
      uVar6 = 0;
    }
    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);
  }
  else {
    uVar6 = 0x2f;
    uVar7 = 0;
    if (dir[(int)(pcVar1 + -1)] == '/') {
      uVar6 = 0;
    }
    else {
      if ((byte)(*base ^ 0x2fU) == 0) {
        uVar6 = 0;
      }
      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);
    }
  }
  pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1);
  if (pcVar4 != (char *)0x0) {
    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);
    *puVar5 = uVar6;
    if (base_in_result != (char **)0x0) {
      *base_in_result = puVar5 + uVar7;
    }
    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);
    *puVar5 = 0;
  }
  return pcVar4;
}



int mfile_name_concat(int param_1,byte *param_2,int *param_3)

{
  int iVar1;
  int iVar2;
  undefined1 uVar4;
  undefined1 *puVar3;
  int iVar5;
  uint uVar6;
  
  iVar1 = last_component();
  iVar2 = base_len(iVar1);
  iVar5 = (iVar1 - param_1) + iVar2;
  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);
  if (iVar2 == 0) {
    uVar4 = 0x2e;
    if ((*param_2 ^ 0x2f) != 0) {
      uVar4 = 0;
    }
    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);
  }
  else {
    uVar4 = 0x2f;
    uVar6 = 0;
    if (*(char *)(param_1 + iVar5 + -1) == '/') {
      uVar4 = 0;
    }
    else {
      if ((*param_2 ^ 0x2f) == 0) {
        uVar4 = 0;
      }
      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);
    }
  }
  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);
  if (iVar2 != 0) {
    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);
    *puVar3 = uVar4;
    if (param_3 != (int *)0x0) {
      *param_3 = (int)(puVar3 + uVar6);
    }
    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);
    *puVar3 = 0;
  }
  return iVar2;
}


lui gp,0x3
addiu gp,gp,0x1810
addu gp,gp,t9
addiu sp,sp,-0x40
lw t9,-0x7fa0(gp)
sw ra,0x3c(sp)
sw gp,0x10(sp)
sw s6,0x34(sp)
or s6,a0,zero
sw s5,0x30(sp)
or s5,a2,zero
sw s4,0x2c(sp)
sw s3,0x28(sp)
or s3,a1,zero
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw s7,0x38(sp)
bal 0x0001f3f0
_sw s2,0x24(sp)
lw gp,0x10(sp)
or a0,v0,zero
or s0,v0,zero
lw t9,-0x7e68(gp)
bal 0x0001f468
_subu s0,s0,s6
or a0,s3,zero
lw gp,0x10(sp)
or s1,v0,zero
lw t9,-0x7ca4(gp)
jalr t9
_addu s0,s0,v0
lw gp,0x10(sp)
beq s1,zero,0x0001fb0c
_or s4,v0,zero
addu v1,s6,s0
li v0,0x2f
lb v1,-0x1(v1)
beq v1,v0,0x0001fb28
_or s1,zero,zero
lb s2,0x0(s3)
xori s2,s2,0x2f
movz v0,zero,s2
sltu s1,zero,s2
or s2,v0,zero
addiu a0,s4,0x1
lw t9,-0x7c80(gp)
addu a0,a0,s0
jalr t9
_addu a0,a0,s1
lw gp,0x10(sp)
beq v0,zero,0x0001fadc
_or s7,v0,zero
lw t9,-0x7bfc(gp)
or a0,v0,zero
or a2,s0,zero
jalr t9
_or a1,s6,zero
lw gp,0x10(sp)
addu a0,v0,s1
beq s5,zero,0x0001fac8
_sb s2,0x0(v0)
sw a0,0x0(s5)
lw t9,-0x7bfc(gp)
or a2,s4,zero
jalr t9
_or a1,s3,zero
sb zero,0x0(v0)
lw ra,0x3c(sp)
or v0,s7,zero
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
lb s2,0x0(s3)
li v0,0x2e
xori s2,s2,0x2f
movn v0,zero,s2
sltiu s1,s2,0x1
b 0x0001fa80
_or s2,v0,zero
b 0x0001fa80
_or s2,zero,zero
(translation_unit "int mfile_name_concat(int param_1,byte *param_2,int *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}\n\n" (function_definition "int mfile_name_concat(int param_1,byte *param_2,int *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "mfile_name_concat(int param_1,byte *param_2,int *param_3)" identifier (parameter_list "(int param_1,byte *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "iVar1 = last_component();" (assignment_expression "iVar1 = last_component()" identifier = (call_expression "last_component()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = base_len(iVar1);" (assignment_expression "iVar2 = base_len(iVar1)" identifier = (call_expression "base_len(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "iVar5 = (iVar1 - param_1) + iVar2;" (assignment_expression "iVar5 = (iVar1 - param_1) + iVar2" identifier = (binary_expression "(iVar1 - param_1) + iVar2" (parenthesized_expression "(iVar1 - param_1)" ( (binary_expression "iVar1 - param_1" identifier - identifier) )) + identifier)) ;) (expression_statement "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2)" identifier = (call_expression "(*(code *)PTR_strlen_0004953c)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_0004953c)" ( (pointer_expression "*(code *)PTR_strlen_0004953c" * (cast_expression "(code *)PTR_strlen_0004953c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }" { (expression_statement "uVar4 = 0x2e;" (assignment_expression "uVar4 = 0x2e" identifier = number_literal) ;) (if_statement "if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }" if (parenthesized_expression "((*param_2 ^ 0x2f) != 0)" ( (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) != number_literal) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) == 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) == 0)" identifier = (call_expression "(uint)((*param_2 ^ 0x2f) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((*param_2 ^ 0x2f) == 0)" ( (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) == number_literal) )))) ;) }) (else_clause "else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" else (compound_statement "{\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" { (expression_statement "uVar4 = 0x2f;" (assignment_expression "uVar4 = 0x2f" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (if_statement "if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" if (parenthesized_expression "(*(char *)(param_1 + iVar5 + -1) == '/')" ( (binary_expression "*(char *)(param_1 + iVar5 + -1) == '/'" (pointer_expression "*(char *)(param_1 + iVar5 + -1)" * (cast_expression "(char *)(param_1 + iVar5 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar5 + -1)" ( (binary_expression "param_1 + iVar5 + -1" (binary_expression "param_1 + iVar5" identifier + identifier) + number_literal) )))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" else (compound_statement "{\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" { (if_statement "if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }" if (parenthesized_expression "((*param_2 ^ 0x2f) == 0)" ( (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) == number_literal) )) (compound_statement "{\n        uVar4 = 0;\n      }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) != 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) != 0)" identifier = (call_expression "(uint)((*param_2 ^ 0x2f) != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((*param_2 ^ 0x2f) != 0)" ( (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) != number_literal) )))) ;) }))) }))) (expression_statement "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);" (assignment_expression "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" identifier = (call_expression "(*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" (parenthesized_expression "(*(code *)PTR_malloc_00049560)" ( (pointer_expression "*(code *)PTR_malloc_00049560" * (cast_expression "(code *)PTR_malloc_00049560" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + 1 + iVar5 + uVar6)" ( (binary_expression "iVar1 + 1 + iVar5 + uVar6" (binary_expression "iVar1 + 1 + iVar5" (binary_expression "iVar1 + 1" identifier + number_literal) + identifier) + identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" { (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,iVar5)" ( identifier , identifier , identifier ))))) ;) (expression_statement "*puVar3 = uVar4;" (assignment_expression "*puVar3 = uVar4" (pointer_expression "*puVar3" * identifier) = identifier) ;) (if_statement "if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = (int)(puVar3 + uVar6);\n    }" { (expression_statement "*param_3 = (int)(puVar3 + uVar6);" (assignment_expression "*param_3 = (int)(puVar3 + uVar6)" (pointer_expression "*param_3" * identifier) = (cast_expression "(int)(puVar3 + uVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puVar3 + uVar6)" ( (binary_expression "puVar3 + uVar6" identifier + identifier) )))) ;) })) (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar3 + uVar6,param_2,iVar1)" ( (binary_expression "puVar3 + uVar6" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "char * mfile_name_concat(char *dir,char *base,char **base_in_result)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined1 uVar6;\n  char *pcVar4;\n  undefined1 *puVar5;\n  uint uVar7;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  iVar3 = (*(code *)PTR_strlen_0004953c)(base);\n  if (sVar2 == 0) {\n    uVar6 = 0x2e;\n    if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }\n    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);\n  }\n  else {\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }\n  pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1);\n  if (pcVar4 != (char *)0x0) {\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);\n    *puVar5 = uVar6;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);\n    *puVar5 = 0;\n  }\n  return pcVar4;\n}\n\n" (function_definition "char * mfile_name_concat(char *dir,char *base,char **base_in_result)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined1 uVar6;\n  char *pcVar4;\n  undefined1 *puVar5;\n  uint uVar7;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  iVar3 = (*(code *)PTR_strlen_0004953c)(base);\n  if (sVar2 == 0) {\n    uVar6 = 0x2e;\n    if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }\n    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);\n  }\n  else {\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }\n  pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1);\n  if (pcVar4 != (char *)0x0) {\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);\n    *puVar5 = uVar6;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);\n    *puVar5 = 0;\n  }\n  return pcVar4;\n}" primitive_type (pointer_declarator "* mfile_name_concat(char *dir,char *base,char **base_in_result)" * (function_declarator "mfile_name_concat(char *dir,char *base,char **base_in_result)" identifier (parameter_list "(char *dir,char *base,char **base_in_result)" ( (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "char *base" primitive_type (pointer_declarator "*base" * identifier)) , (parameter_declaration "char **base_in_result" primitive_type (pointer_declarator "**base_in_result" * (pointer_declarator "*base_in_result" * identifier))) )))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined1 uVar6;\n  char *pcVar4;\n  undefined1 *puVar5;\n  uint uVar7;\n  \n  pcVar1 = last_component(dir);\n  sVar2 = base_len(pcVar1);\n  pcVar1 = pcVar1 + (sVar2 - (int)dir);\n  iVar3 = (*(code *)PTR_strlen_0004953c)(base);\n  if (sVar2 == 0) {\n    uVar6 = 0x2e;\n    if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }\n    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);\n  }\n  else {\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }\n  pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1);\n  if (pcVar4 != (char *)0x0) {\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);\n    *puVar5 = uVar6;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);\n    *puVar5 = 0;\n  }\n  return pcVar4;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 uVar6;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (expression_statement "pcVar1 = last_component(dir);" (assignment_expression "pcVar1 = last_component(dir)" identifier = (call_expression "last_component(dir)" identifier (argument_list "(dir)" ( identifier )))) ;) (expression_statement "sVar2 = base_len(pcVar1);" (assignment_expression "sVar2 = base_len(pcVar1)" identifier = (call_expression "base_len(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "pcVar1 = pcVar1 + (sVar2 - (int)dir);" (assignment_expression "pcVar1 = pcVar1 + (sVar2 - (int)dir)" identifier = (binary_expression "pcVar1 + (sVar2 - (int)dir)" identifier + (parenthesized_expression "(sVar2 - (int)dir)" ( (binary_expression "sVar2 - (int)dir" identifier - (cast_expression "(int)dir" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "iVar3 = (*(code *)PTR_strlen_0004953c)(base);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_0004953c)(base)" identifier = (call_expression "(*(code *)PTR_strlen_0004953c)(base)" (parenthesized_expression "(*(code *)PTR_strlen_0004953c)" ( (pointer_expression "*(code *)PTR_strlen_0004953c" * (cast_expression "(code *)PTR_strlen_0004953c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(base)" ( identifier )))) ;) (if_statement "if (sVar2 == 0) {\n    uVar6 = 0x2e;\n    if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }\n    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);\n  }\n  else {\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar6 = 0x2e;\n    if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }\n    uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);\n  }" { (expression_statement "uVar6 = 0x2e;" (assignment_expression "uVar6 = 0x2e" identifier = number_literal) ;) (if_statement "if ((byte)(*base ^ 0x2fU) != 0) {\n      uVar6 = 0;\n    }" if (parenthesized_expression "((byte)(*base ^ 0x2fU) != 0)" ( (binary_expression "(byte)(*base ^ 0x2fU) != 0" (call_expression "(byte)(*base ^ 0x2fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*base ^ 0x2fU)" ( (binary_expression "*base ^ 0x2fU" (pointer_expression "*base" * identifier) ^ number_literal) ))) != number_literal) )) (compound_statement "{\n      uVar6 = 0;\n    }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) })) (expression_statement "uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0);" (assignment_expression "uVar7 = (uint)((byte)(*base ^ 0x2fU) == 0)" identifier = (call_expression "(uint)((byte)(*base ^ 0x2fU) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((byte)(*base ^ 0x2fU) == 0)" ( (binary_expression "(byte)(*base ^ 0x2fU) == 0" (call_expression "(byte)(*base ^ 0x2fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*base ^ 0x2fU)" ( (binary_expression "*base ^ 0x2fU" (pointer_expression "*base" * identifier) ^ number_literal) ))) == number_literal) )))) ;) }) (else_clause "else {\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }" else (compound_statement "{\n    uVar6 = 0x2f;\n    uVar7 = 0;\n    if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }\n  }" { (expression_statement "uVar6 = 0x2f;" (assignment_expression "uVar6 = 0x2f" identifier = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (if_statement "if (dir[(int)(pcVar1 + -1)] == '/') {\n      uVar6 = 0;\n    }\n    else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }" if (parenthesized_expression "(dir[(int)(pcVar1 + -1)] == '/')" ( (binary_expression "dir[(int)(pcVar1 + -1)] == '/'" (subscript_expression "dir[(int)(pcVar1 + -1)]" identifier [ (cast_expression "(int)(pcVar1 + -1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pcVar1 + -1)" ( (binary_expression "pcVar1 + -1" identifier + number_literal) ))) ]) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      uVar6 = 0;\n    }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }" else (compound_statement "{\n      if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }\n      uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);\n    }" { (if_statement "if ((byte)(*base ^ 0x2fU) == 0) {\n        uVar6 = 0;\n      }" if (parenthesized_expression "((byte)(*base ^ 0x2fU) == 0)" ( (binary_expression "(byte)(*base ^ 0x2fU) == 0" (call_expression "(byte)(*base ^ 0x2fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*base ^ 0x2fU)" ( (binary_expression "*base ^ 0x2fU" (pointer_expression "*base" * identifier) ^ number_literal) ))) == number_literal) )) (compound_statement "{\n        uVar6 = 0;\n      }" { (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) })) (expression_statement "uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0);" (assignment_expression "uVar7 = (uint)((byte)(*base ^ 0x2fU) != 0)" identifier = (call_expression "(uint)((byte)(*base ^ 0x2fU) != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((byte)(*base ^ 0x2fU) != 0)" ( (binary_expression "(byte)(*base ^ 0x2fU) != 0" (call_expression "(byte)(*base ^ 0x2fU)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(*base ^ 0x2fU)" ( (binary_expression "*base ^ 0x2fU" (pointer_expression "*base" * identifier) ^ number_literal) ))) != number_literal) )))) ;) }))) }))) (expression_statement "pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1);" (assignment_expression "pcVar4 = (char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1)" identifier = (cast_expression "(char *)(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_00049560)(pcVar1 + uVar7 + iVar3 + 1)" (parenthesized_expression "(*(code *)PTR_malloc_00049560)" ( (pointer_expression "*(code *)PTR_malloc_00049560" * (cast_expression "(code *)PTR_malloc_00049560" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1 + uVar7 + iVar3 + 1)" ( (binary_expression "pcVar1 + uVar7 + iVar3 + 1" (binary_expression "pcVar1 + uVar7 + iVar3" (binary_expression "pcVar1 + uVar7" identifier + identifier) + identifier) + number_literal) ))))) ;) (if_statement "if (pcVar4 != (char *)0x0) {\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);\n    *puVar5 = uVar6;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);\n    *puVar5 = 0;\n  }" if (parenthesized_expression "(pcVar4 != (char *)0x0)" ( (binary_expression "pcVar4 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);\n    *puVar5 = uVar6;\n    if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }\n    puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);\n    *puVar5 = 0;\n  }" { (expression_statement "puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1);" (assignment_expression "puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(pcVar4,dir,pcVar1)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar4,dir,pcVar1)" ( identifier , identifier , identifier ))))) ;) (expression_statement "*puVar5 = uVar6;" (assignment_expression "*puVar5 = uVar6" (pointer_expression "*puVar5" * identifier) = identifier) ;) (if_statement "if (base_in_result != (char **)0x0) {\n      *base_in_result = puVar5 + uVar7;\n    }" if (parenthesized_expression "(base_in_result != (char **)0x0)" ( (binary_expression "base_in_result != (char **)0x0" identifier != (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n      *base_in_result = puVar5 + uVar7;\n    }" { (expression_statement "*base_in_result = puVar5 + uVar7;" (assignment_expression "*base_in_result = puVar5 + uVar7" (pointer_expression "*base_in_result" * identifier) = (binary_expression "puVar5 + uVar7" identifier + identifier)) ;) })) (expression_statement "puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3);" (assignment_expression "puVar5 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(puVar5 + uVar7,base,iVar3)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar5 + uVar7,base,iVar3)" ( (binary_expression "puVar5 + uVar7" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) })) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "int mfile_name_concat(int param_1,byte *param_2,int *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}\n\n" (function_definition "int mfile_name_concat(int param_1,byte *param_2,int *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" primitive_type (function_declarator "mfile_name_concat(int param_1,byte *param_2,int *param_3)" identifier (parameter_list "(int param_1,byte *param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "iVar1 = last_component();" (assignment_expression "iVar1 = last_component()" identifier = (call_expression "last_component()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = base_len(iVar1);" (assignment_expression "iVar2 = base_len(iVar1)" identifier = (call_expression "base_len(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "iVar5 = (iVar1 - param_1) + iVar2;" (assignment_expression "iVar5 = (iVar1 - param_1) + iVar2" identifier = (binary_expression "(iVar1 - param_1) + iVar2" (parenthesized_expression "(iVar1 - param_1)" ( (binary_expression "iVar1 - param_1" identifier - identifier) )) + identifier)) ;) (expression_statement "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2)" identifier = (call_expression "(*(code *)PTR_strlen_0004953c)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_0004953c)" ( (pointer_expression "*(code *)PTR_strlen_0004953c" * (cast_expression "(code *)PTR_strlen_0004953c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }" { (expression_statement "uVar4 = 0x2e;" (assignment_expression "uVar4 = 0x2e" identifier = number_literal) ;) (if_statement "if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }" if (parenthesized_expression "((*param_2 ^ 0x2f) != 0)" ( (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) != number_literal) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) == 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) == 0)" identifier = (call_expression "(uint)((*param_2 ^ 0x2f) == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((*param_2 ^ 0x2f) == 0)" ( (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) == number_literal) )))) ;) }) (else_clause "else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" else (compound_statement "{\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" { (expression_statement "uVar4 = 0x2f;" (assignment_expression "uVar4 = 0x2f" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (if_statement "if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" if (parenthesized_expression "(*(char *)(param_1 + iVar5 + -1) == '/')" ( (binary_expression "*(char *)(param_1 + iVar5 + -1) == '/'" (pointer_expression "*(char *)(param_1 + iVar5 + -1)" * (cast_expression "(char *)(param_1 + iVar5 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + iVar5 + -1)" ( (binary_expression "param_1 + iVar5 + -1" (binary_expression "param_1 + iVar5" identifier + identifier) + number_literal) )))) == (char_literal "'/'" ' character ')) )) (compound_statement "{\n      uVar4 = 0;\n    }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" else (compound_statement "{\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" { (if_statement "if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }" if (parenthesized_expression "((*param_2 ^ 0x2f) == 0)" ( (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) == number_literal) )) (compound_statement "{\n        uVar4 = 0;\n      }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) })) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) != 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) != 0)" identifier = (call_expression "(uint)((*param_2 ^ 0x2f) != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((*param_2 ^ 0x2f) != 0)" ( (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" ( (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" * identifier) ^ number_literal) )) != number_literal) )))) ;) }))) }))) (expression_statement "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);" (assignment_expression "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" identifier = (call_expression "(*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" (parenthesized_expression "(*(code *)PTR_malloc_00049560)" ( (pointer_expression "*(code *)PTR_malloc_00049560" * (cast_expression "(code *)PTR_malloc_00049560" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1 + 1 + iVar5 + uVar6)" ( (binary_expression "iVar1 + 1 + iVar5 + uVar6" (binary_expression "iVar1 + 1 + iVar5" (binary_expression "iVar1 + 1" identifier + number_literal) + identifier) + identifier) )))) ;) (if_statement "if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" { (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_1,iVar5)" ( identifier , identifier , identifier ))))) ;) (expression_statement "*puVar3 = uVar4;" (assignment_expression "*puVar3 = uVar4" (pointer_expression "*puVar3" * identifier) = identifier) ;) (if_statement "if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *param_3 = (int)(puVar3 + uVar6);\n    }" { (expression_statement "*param_3 = (int)(puVar3 + uVar6);" (assignment_expression "*param_3 = (int)(puVar3 + uVar6)" (pointer_expression "*param_3" * identifier) = (cast_expression "(int)(puVar3 + uVar6)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(puVar3 + uVar6)" ( (binary_expression "puVar3 + uVar6" identifier + identifier) )))) ;) })) (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" ( (pointer_expression "*(code *)PTR_mempcpy_000495e4" * (cast_expression "(code *)PTR_mempcpy_000495e4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar3 + uVar6,param_2,iVar1)" ( (binary_expression "puVar3 + uVar6" identifier + identifier) , identifier , identifier ))))) ;) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - IDENT) )) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) ^ LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) ^ LIT) )) == LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + LIT) )))) == (char_literal ' character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) ^ LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) ^ LIT) )) != LIT) )))) ;) }))) }))) (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 (binary_expression IDENT + LIT) + IDENT) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "int mfile_name_concat(int param_1,byte *param_2,int *param_3)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" (primitive_type "int") (function_declarator "mfile_name_concat(int param_1,byte *param_2,int *param_3)" (identifier "mfile_name_concat") (parameter_list "(int param_1,byte *param_2,int *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined1 uVar4;\n  undefined1 *puVar3;\n  int iVar5;\n  uint uVar6;\n  \n  iVar1 = last_component();\n  iVar2 = base_len(iVar1);\n  iVar5 = (iVar1 - param_1) + iVar2;\n  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);\n  if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }\n  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);\n  if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }\n  return iVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined1 uVar4;" (type_identifier "undefined1") (identifier "uVar4") (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (expression_statement "iVar1 = last_component();" (assignment_expression "iVar1 = last_component()" (identifier "iVar1") (= "=") (call_expression "last_component()" (identifier "last_component") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = base_len(iVar1);" (assignment_expression "iVar2 = base_len(iVar1)" (identifier "iVar2") (= "=") (call_expression "base_len(iVar1)" (identifier "base_len") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "iVar5 = (iVar1 - param_1) + iVar2;" (assignment_expression "iVar5 = (iVar1 - param_1) + iVar2" (identifier "iVar5") (= "=") (binary_expression "(iVar1 - param_1) + iVar2" (parenthesized_expression "(iVar1 - param_1)" (( "(") (binary_expression "iVar1 - param_1" (identifier "iVar1") (- "-") (identifier "param_1")) () ")")) (+ "+") (identifier "iVar2"))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);" (assignment_expression "iVar1 = (*(code *)PTR_strlen_0004953c)(param_2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strlen_0004953c)(param_2)" (parenthesized_expression "(*(code *)PTR_strlen_0004953c)" (( "(") (pointer_expression "*(code *)PTR_strlen_0004953c" (* "*") (cast_expression "(code *)PTR_strlen_0004953c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_0004953c"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }\n  else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar4 = 0x2e;\n    if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }\n    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);\n  }" ({ "{") (expression_statement "uVar4 = 0x2e;" (assignment_expression "uVar4 = 0x2e" (identifier "uVar4") (= "=") (number_literal "0x2e")) (; ";")) (if_statement "if ((*param_2 ^ 0x2f) != 0) {\n      uVar4 = 0;\n    }" (if "if") (parenthesized_expression "((*param_2 ^ 0x2f) != 0)" (( "(") (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" (( "(") (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (^ "^") (number_literal "0x2f")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) == 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) == 0)" (identifier "uVar6") (= "=") (call_expression "(uint)((*param_2 ^ 0x2f) == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((*param_2 ^ 0x2f) == 0)" (( "(") (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" (( "(") (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (^ "^") (number_literal "0x2f")) () ")")) (== "==") (number_literal "0")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" (else "else") (compound_statement "{\n    uVar4 = 0x2f;\n    uVar6 = 0;\n    if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }\n  }" ({ "{") (expression_statement "uVar4 = 0x2f;" (assignment_expression "uVar4 = 0x2f" (identifier "uVar4") (= "=") (number_literal "0x2f")) (; ";")) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" (identifier "uVar6") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(char *)(param_1 + iVar5 + -1) == '/') {\n      uVar4 = 0;\n    }\n    else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" (if "if") (parenthesized_expression "(*(char *)(param_1 + iVar5 + -1) == '/')" (( "(") (binary_expression "*(char *)(param_1 + iVar5 + -1) == '/'" (pointer_expression "*(char *)(param_1 + iVar5 + -1)" (* "*") (cast_expression "(char *)(param_1 + iVar5 + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + iVar5 + -1)" (( "(") (binary_expression "param_1 + iVar5 + -1" (binary_expression "param_1 + iVar5" (identifier "param_1") (+ "+") (identifier "iVar5")) (+ "+") (number_literal "-1")) () ")")))) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n      uVar4 = 0;\n    }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" (else "else") (compound_statement "{\n      if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }\n      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);\n    }" ({ "{") (if_statement "if ((*param_2 ^ 0x2f) == 0) {\n        uVar4 = 0;\n      }" (if "if") (parenthesized_expression "((*param_2 ^ 0x2f) == 0)" (( "(") (binary_expression "(*param_2 ^ 0x2f) == 0" (parenthesized_expression "(*param_2 ^ 0x2f)" (( "(") (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (^ "^") (number_literal "0x2f")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar4 = 0;\n      }" ({ "{") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "uVar6 = (uint)((*param_2 ^ 0x2f) != 0);" (assignment_expression "uVar6 = (uint)((*param_2 ^ 0x2f) != 0)" (identifier "uVar6") (= "=") (call_expression "(uint)((*param_2 ^ 0x2f) != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((*param_2 ^ 0x2f) != 0)" (( "(") (binary_expression "(*param_2 ^ 0x2f) != 0" (parenthesized_expression "(*param_2 ^ 0x2f)" (( "(") (binary_expression "*param_2 ^ 0x2f" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (^ "^") (number_literal "0x2f")) () ")")) (!= "!=") (number_literal "0")) () ")")))) (; ";")) (} "}")))) (} "}")))) (expression_statement "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);" (assignment_expression "iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6)" (parenthesized_expression "(*(code *)PTR_malloc_00049560)" (( "(") (pointer_expression "*(code *)PTR_malloc_00049560" (* "*") (cast_expression "(code *)PTR_malloc_00049560" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_00049560"))) () ")")) (argument_list "(iVar1 + 1 + iVar5 + uVar6)" (( "(") (binary_expression "iVar1 + 1 + iVar5 + uVar6" (binary_expression "iVar1 + 1 + iVar5" (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) (+ "+") (identifier "iVar5")) (+ "+") (identifier "uVar6")) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);\n    *puVar3 = uVar4;\n    if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }\n    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);\n    *puVar3 = 0;\n  }" ({ "{") (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" (identifier "puVar3") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" (( "(") (pointer_expression "*(code *)PTR_mempcpy_000495e4" (* "*") (cast_expression "(code *)PTR_mempcpy_000495e4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mempcpy_000495e4"))) () ")")) (argument_list "(iVar2,param_1,iVar5)" (( "(") (identifier "iVar2") (, ",") (identifier "param_1") (, ",") (identifier "iVar5") () ")"))))) (; ";")) (expression_statement "*puVar3 = uVar4;" (assignment_expression "*puVar3 = uVar4" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "uVar4")) (; ";")) (if_statement "if (param_3 != (int *)0x0) {\n      *param_3 = (int)(puVar3 + uVar6);\n    }" (if "if") (parenthesized_expression "(param_3 != (int *)0x0)" (( "(") (binary_expression "param_3 != (int *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      *param_3 = (int)(puVar3 + uVar6);\n    }" ({ "{") (expression_statement "*param_3 = (int)(puVar3 + uVar6);" (assignment_expression "*param_3 = (int)(puVar3 + uVar6)" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (cast_expression "(int)(puVar3 + uVar6)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(puVar3 + uVar6)" (( "(") (binary_expression "puVar3 + uVar6" (identifier "puVar3") (+ "+") (identifier "uVar6")) () ")")))) (; ";")) (} "}"))) (expression_statement "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);" (assignment_expression "puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" (identifier "puVar3") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1)" (parenthesized_expression "(*(code *)PTR_mempcpy_000495e4)" (( "(") (pointer_expression "*(code *)PTR_mempcpy_000495e4" (* "*") (cast_expression "(code *)PTR_mempcpy_000495e4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mempcpy_000495e4"))) () ")")) (argument_list "(puVar3 + uVar6,param_2,iVar1)" (( "(") (binary_expression "puVar3 + uVar6" (identifier "puVar3") (+ "+") (identifier "uVar6")) (, ",") (identifier "param_2") (, ",") (identifier "iVar1") () ")"))))) (; ";")) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) 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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (number_literal))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))))) right: (char_literal (character)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) right: (number_literal)))))))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)) right: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (return_statement (identifier)))))

int MASKED(int param_1,byte *param_2,int *param_3)

{
  int iVar1;
  int iVar2;
  undefined1 uVar4;
  undefined1 *puVar3;
  int iVar5;
  uint uVar6;
  
  iVar1 = last_component();
  iVar2 = base_len(iVar1);
  iVar5 = (iVar1 - param_1) + iVar2;
  iVar1 = (*(code *)PTR_strlen_0004953c)(param_2);
  if (iVar2 == 0) {
    uVar4 = 0x2e;
    if ((*param_2 ^ 0x2f) != 0) {
      uVar4 = 0;
    }
    uVar6 = (uint)((*param_2 ^ 0x2f) == 0);
  }
  else {
    uVar4 = 0x2f;
    uVar6 = 0;
    if (*(char *)(param_1 + iVar5 + -1) == '/') {
      uVar4 = 0;
    }
    else {
      if ((*param_2 ^ 0x2f) == 0) {
        uVar4 = 0;
      }
      uVar6 = (uint)((*param_2 ^ 0x2f) != 0);
    }
  }
  iVar2 = (*(code *)PTR_malloc_00049560)(iVar1 + 1 + iVar5 + uVar6);
  if (iVar2 != 0) {
    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(iVar2,param_1,iVar5);
    *puVar3 = uVar4;
    if (param_3 != (int *)0x0) {
      *param_3 = (int)(puVar3 + uVar6);
    }
    puVar3 = (undefined1 *)(*(code *)PTR_mempcpy_000495e4)(puVar3 + uVar6,param_2,iVar1);
    *puVar3 = 0;
  }
  return iVar2;
}

