
char * mdir_name(char *file)

{
  size_t sVar1;
  char *pcVar2;
  
  sVar1 = dir_len(file);
  pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1);
  if (pcVar2 != (char *)0x0) {
    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);
    if (sVar1 == 0) {
      *pcVar2 = '.';
      sVar1 = 1;
    }
    pcVar2[sVar1] = '\0';
  }
  return pcVar2;
}



undefined1 * mdir_name(undefined4 param_1)

{
  int iVar1;
  undefined1 *puVar2;
  
  iVar1 = dir_len();
  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);
  if (puVar2 != (undefined1 *)0x0) {
    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);
    if (iVar1 == 0) {
      *puVar2 = 0x2e;
      iVar1 = 1;
    }
    puVar2[iVar1] = 0;
  }
  return puVar2;
}


lui gp,0x2
addiu gp,gp,0x630c
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
or s2,a0,zero
lw t9,-0x7f1c(gp)
bal 0x00014d20
_nop
lw gp,0x10(sp)
or s0,v0,zero
sltiu a0,v0,0x1
addiu v0,v0,0x1
addu a0,a0,v0
lw t9,-0x7d40(gp)
jalr t9
_nop
lw gp,0x10(sp)
beq v0,zero,0x00014e5c
_or s1,v0,zero
or a2,s0,zero
or a1,s2,zero
or a0,v0,zero
lw t9,-0x7cd8(gp)
jalr t9
_nop
lw gp,0x10(sp)
bne s0,zero,0x00014e58
_addu s0,s1,s0
li v0,0x2e
sb v0,0x0(s1)
li s0,0x1
addu s0,s1,s0
sb zero,0x0(s0)
or v0,s1,zero
lw ra,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "undefined1 * mdir_name(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}\n\n" (function_definition "undefined1 * mdir_name(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* mdir_name(undefined4 param_1)" * (function_declarator "mdir_name(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "iVar1 = dir_len();" (assignment_expression "iVar1 = dir_len()" identifier = (call_expression "dir_len()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_malloc_00033390)" ( (pointer_expression "*(code *)PTR_malloc_00033390" * (cast_expression "(code *)PTR_malloc_00033390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((uint)(iVar1 == 0) + iVar1 + 1)" ( (binary_expression "(uint)(iVar1 == 0) + iVar1 + 1" (binary_expression "(uint)(iVar1 == 0) + iVar1" (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))) + identifier) + number_literal) ))))) ;) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" if (parenthesized_expression "(puVar2 != (undefined1 *)0x0)" ( (binary_expression "puVar2 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" { (expression_statement "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000333f8)" ( (pointer_expression "*(code *)PTR_memcpy_000333f8" * (cast_expression "(code *)PTR_memcpy_000333f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar2,param_1,iVar1)" ( identifier , identifier , identifier ))) ;) (if_statement "if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" { (expression_statement "*puVar2 = 0x2e;" (assignment_expression "*puVar2 = 0x2e" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) })) (expression_statement "puVar2[iVar1] = 0;" (assignment_expression "puVar2[iVar1] = 0" (subscript_expression "puVar2[iVar1]" identifier [ identifier ]) = number_literal) ;) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit "char * mdir_name(char *file)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  \n  sVar1 = dir_len(file);\n  pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1);\n  if (pcVar2 != (char *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);\n    if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }\n    pcVar2[sVar1] = '\0';\n  }\n  return pcVar2;\n}\n\n" (function_definition "char * mdir_name(char *file)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  \n  sVar1 = dir_len(file);\n  pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1);\n  if (pcVar2 != (char *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);\n    if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }\n    pcVar2[sVar1] = '\0';\n  }\n  return pcVar2;\n}" primitive_type (pointer_declarator "* mdir_name(char *file)" * (function_declarator "mdir_name(char *file)" identifier (parameter_list "(char *file)" ( (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) )))) (compound_statement "{\n  size_t sVar1;\n  char *pcVar2;\n  \n  sVar1 = dir_len(file);\n  pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1);\n  if (pcVar2 != (char *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);\n    if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }\n    pcVar2[sVar1] = '\0';\n  }\n  return pcVar2;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "sVar1 = dir_len(file);" (assignment_expression "sVar1 = dir_len(file)" identifier = (call_expression "dir_len(file)" identifier (argument_list "(file)" ( identifier )))) ;) (expression_statement "pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1);" (assignment_expression "pcVar2 = (char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1)" identifier = (cast_expression "(char *)(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_00033390)((uint)(sVar1 == 0) + sVar1 + 1)" (parenthesized_expression "(*(code *)PTR_malloc_00033390)" ( (pointer_expression "*(code *)PTR_malloc_00033390" * (cast_expression "(code *)PTR_malloc_00033390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((uint)(sVar1 == 0) + sVar1 + 1)" ( (binary_expression "(uint)(sVar1 == 0) + sVar1 + 1" (binary_expression "(uint)(sVar1 == 0) + sVar1" (call_expression "(uint)(sVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) ))) + identifier) + number_literal) ))))) ;) (if_statement "if (pcVar2 != (char *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);\n    if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }\n    pcVar2[sVar1] = '\0';\n  }" if (parenthesized_expression "(pcVar2 != (char *)0x0)" ( (binary_expression "pcVar2 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);\n    if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }\n    pcVar2[sVar1] = '\0';\n  }" { (expression_statement "(*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1);" (call_expression "(*(code *)PTR_memcpy_000333f8)(pcVar2,file,sVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000333f8)" ( (pointer_expression "*(code *)PTR_memcpy_000333f8" * (cast_expression "(code *)PTR_memcpy_000333f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar2,file,sVar1)" ( identifier , identifier , identifier ))) ;) (if_statement "if (sVar1 == 0) {\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }" if (parenthesized_expression "(sVar1 == 0)" ( (binary_expression "sVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *pcVar2 = '.';\n      sVar1 = 1;\n    }" { (expression_statement "*pcVar2 = '.';" (assignment_expression "*pcVar2 = '.'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'.'" ' character ')) ;) (expression_statement "sVar1 = 1;" (assignment_expression "sVar1 = 1" identifier = number_literal) ;) })) (expression_statement "pcVar2[sVar1] = '\0';" (assignment_expression "pcVar2[sVar1] = '\0'" (subscript_expression "pcVar2[sVar1]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "undefined1 * mdir_name(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}\n\n" (function_definition "undefined1 * mdir_name(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" type_identifier (pointer_declarator "* mdir_name(undefined4 param_1)" * (function_declarator "mdir_name(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "iVar1 = dir_len();" (assignment_expression "iVar1 = dir_len()" identifier = (call_expression "dir_len()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_malloc_00033390)" ( (pointer_expression "*(code *)PTR_malloc_00033390" * (cast_expression "(code *)PTR_malloc_00033390" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((uint)(iVar1 == 0) + iVar1 + 1)" ( (binary_expression "(uint)(iVar1 == 0) + iVar1 + 1" (binary_expression "(uint)(iVar1 == 0) + iVar1" (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))) + identifier) + number_literal) ))))) ;) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" if (parenthesized_expression "(puVar2 != (undefined1 *)0x0)" ( (binary_expression "puVar2 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" { (expression_statement "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000333f8)" ( (pointer_expression "*(code *)PTR_memcpy_000333f8" * (cast_expression "(code *)PTR_memcpy_000333f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar2,param_1,iVar1)" ( identifier , identifier , identifier ))) ;) (if_statement "if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" { (expression_statement "*puVar2 = 0x2e;" (assignment_expression "*puVar2 = 0x2e" (pointer_expression "*puVar2" * identifier) = number_literal) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) })) (expression_statement "puVar2[iVar1] = 0;" (assignment_expression "puVar2[iVar1] = 0" (subscript_expression "puVar2[iVar1]" identifier [ identifier ]) = number_literal) ;) })) (return_statement "return puVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (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 (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) ))) + IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined1 * mdir_name(undefined4 param_1)\n\n{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" (type_identifier "undefined1") (pointer_declarator "* mdir_name(undefined4 param_1)" (* "*") (function_declarator "mdir_name(undefined4 param_1)" (identifier "mdir_name") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")")))) (compound_statement "{\n  int iVar1;\n  undefined1 *puVar2;\n  \n  iVar1 = dir_len();\n  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);\n  if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }\n  return puVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "iVar1 = dir_len();" (assignment_expression "iVar1 = dir_len()" (identifier "iVar1") (= "=") (call_expression "dir_len()" (identifier "dir_len") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1)" (parenthesized_expression "(*(code *)PTR_malloc_00033390)" (( "(") (pointer_expression "*(code *)PTR_malloc_00033390" (* "*") (cast_expression "(code *)PTR_malloc_00033390" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_malloc_00033390"))) () ")")) (argument_list "((uint)(iVar1 == 0) + iVar1 + 1)" (( "(") (binary_expression "(uint)(iVar1 == 0) + iVar1 + 1" (binary_expression "(uint)(iVar1 == 0) + iVar1" (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")"))) (+ "+") (identifier "iVar1")) (+ "+") (number_literal "1")) () ")"))))) (; ";")) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" (if "if") (parenthesized_expression "(puVar2 != (undefined1 *)0x0)" (( "(") (binary_expression "puVar2 != (undefined1 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);\n    if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }\n    puVar2[iVar1] = 0;\n  }" ({ "{") (expression_statement "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);" (call_expression "(*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1)" (parenthesized_expression "(*(code *)PTR_memcpy_000333f8)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000333f8" (* "*") (cast_expression "(code *)PTR_memcpy_000333f8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000333f8"))) () ")")) (argument_list "(puVar2,param_1,iVar1)" (( "(") (identifier "puVar2") (, ",") (identifier "param_1") (, ",") (identifier "iVar1") () ")"))) (; ";")) (if_statement "if (iVar1 == 0) {\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *puVar2 = 0x2e;\n      iVar1 = 1;\n    }" ({ "{") (expression_statement "*puVar2 = 0x2e;" (assignment_expression "*puVar2 = 0x2e" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0x2e")) (; ";")) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "puVar2[iVar1] = 0;" (assignment_expression "puVar2[iVar1] = 0" (subscript_expression "puVar2[iVar1]" (identifier "puVar2") ([ "[") (identifier "iVar1") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return puVar2;" (return "return") (identifier "puVar2") (; ";")) (} "}")))

char * function_1(char *file)

{
  size_t var_2;
  char *var_3;
  
  var_2 = var_1(file);
  var_3 = (char *)(*(type_1 *)PTR_malloc_00033390)((uint)(var_2 == 0) + var_2 + 1);
  if (var_3 != (char *)0x0) {
    (*(type_1 *)PTR_memcpy_000333f8)(var_3,file,var_2);
    if (var_2 == 0) {
      *var_3 = '.';
      var_2 = 1;
    }
    var_3[var_2] = '\0';
  }
  return var_3;
}


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

undefined1 * MASKED(undefined4 param_1)

{
  int iVar1;
  undefined1 *puVar2;
  
  iVar1 = dir_len();
  puVar2 = (undefined1 *)(*(code *)PTR_malloc_00033390)((uint)(iVar1 == 0) + iVar1 + 1);
  if (puVar2 != (undefined1 *)0x0) {
    (*(code *)PTR_memcpy_000333f8)(puVar2,param_1,iVar1);
    if (iVar1 == 0) {
      *puVar2 = 0x2e;
      iVar1 = 1;
    }
    puVar2[iVar1] = 0;
  }
  return puVar2;
}

