
char * strip_last_component(char *path)

{
  char *pcVar1;
  undefined1 *puVar2;
  
  pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path);
  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f);
  if (puVar2 != (undefined1 *)0x0) {
    *puVar2 = 0;
  }
  return pcVar1;
}



undefined4 strip_last_component(undefined4 param_1)

{
  undefined4 uVar1;
  undefined1 *puVar2;
  
  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);
  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);
  if (puVar2 != (undefined1 *)0x0) {
    *puVar2 = 0;
  }
  return uVar1;
}


lui gp,0x6
addiu gp,gp,0x5144
addu gp,gp,t9
addiu sp,sp,-0x20
lw t9,-0x7fb8(gp)
or a1,a0,zero
or a0,zero,zero
sw gp,0x10(sp)
sw ra,0x1c(sp)
jalr t9
_sw s0,0x18(sp)
li a1,0x2f
lw gp,0x10(sp)
or a0,v0,zero
lw t9,-0x75dc(gp)
jalr t9
_or s0,v0,zero
beq v0,zero,0x0001a430
_lw ra,0x1c(sp)
sb zero,0x0(v0)
lw ra,0x1c(sp)
or v0,s0,zero
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "undefined4 strip_last_component(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 strip_last_component(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "strip_last_component(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);" (assignment_expression "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" identifier = (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,param_1)" ( number_literal , identifier )))) ;) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" (parenthesized_expression "(*(code *)PTR_strrchr_00077f44)" ( (pointer_expression "*(code *)PTR_strrchr_00077f44" * (cast_expression "(code *)PTR_strrchr_00077f44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1,0x2f)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 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    *puVar2 = 0;\n  }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "char * strip_last_component(char *path)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return pcVar1;\n}\n\n" (function_definition "char * strip_last_component(char *path)\n\n{\n  char *pcVar1;\n  undefined1 *puVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* strip_last_component(char *path)" * (function_declarator "strip_last_component(char *path)" identifier (parameter_list "(char *path)" ( (parameter_declaration "char *path" primitive_type (pointer_declarator "*path" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  undefined1 *puVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path)" identifier = (cast_expression "(char *)(*(code *)PTR_mallocstrcpy_00077568)(0,path)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,path)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,path)" ( number_literal , identifier ))))) ;) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_00077f44)(pcVar1,0x2f)" (parenthesized_expression "(*(code *)PTR_strrchr_00077f44)" ( (pointer_expression "*(code *)PTR_strrchr_00077f44" * (cast_expression "(code *)PTR_strrchr_00077f44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1,0x2f)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 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    *puVar2 = 0;\n  }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) })) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined4 strip_last_component(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 strip_last_component(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "strip_last_component(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);" (assignment_expression "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" identifier = (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" ( (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" * (cast_expression "(code *)PTR_mallocstrcpy_00077568" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,param_1)" ( number_literal , identifier )))) ;) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" (parenthesized_expression "(*(code *)PTR_strrchr_00077f44)" ( (pointer_expression "*(code *)PTR_strrchr_00077f44" * (cast_expression "(code *)PTR_strrchr_00077f44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1,0x2f)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 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    *puVar2 = 0;\n  }" { (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" * identifier) = number_literal) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (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 (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , 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 ( IDENT , LIT ))))) ;) (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) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 strip_last_component(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "strip_last_component(undefined4 param_1)" (identifier "strip_last_component") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined1 *puVar2;\n  \n  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);\n  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);\n  if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 0;\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);" (assignment_expression "uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" (identifier "uVar1") (= "=") (call_expression "(*(code *)PTR_mallocstrcpy_00077568)(0,param_1)" (parenthesized_expression "(*(code *)PTR_mallocstrcpy_00077568)" (( "(") (pointer_expression "*(code *)PTR_mallocstrcpy_00077568" (* "*") (cast_expression "(code *)PTR_mallocstrcpy_00077568" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_mallocstrcpy_00077568"))) () ")")) (argument_list "(0,param_1)" (( "(") (number_literal "0") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);" (assignment_expression "puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f)" (parenthesized_expression "(*(code *)PTR_strrchr_00077f44)" (( "(") (pointer_expression "*(code *)PTR_strrchr_00077f44" (* "*") (cast_expression "(code *)PTR_strrchr_00077f44" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strrchr_00077f44"))) () ")")) (argument_list "(uVar1,0x2f)" (( "(") (identifier "uVar1") (, ",") (number_literal "0x2f") () ")"))))) (; ";")) (if_statement "if (puVar2 != (undefined1 *)0x0) {\n    *puVar2 = 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    *puVar2 = 0;\n  }" ({ "{") (expression_statement "*puVar2 = 0;" (assignment_expression "*puVar2 = 0" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

char * function_1(char *path)

{
  char *pcVar1;
  type_1 *var_1;
  
  pcVar1 = (char *)(*(type_2 *)PTR_mallocstrcpy_00077568)(0,path);
  var_1 = (type_1 *)(*(type_2 *)PTR_strrchr_00077f44)(pcVar1,0x2f);
  if (var_1 != (type_1 *)0x0) {
    *var_1 = 0;
  }
  return pcVar1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (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 (number_literal) (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 (identifier) (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 (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) (return_statement (identifier)))))

undefined4 MASKED(undefined4 param_1)

{
  undefined4 uVar1;
  undefined1 *puVar2;
  
  uVar1 = (*(code *)PTR_mallocstrcpy_00077568)(0,param_1);
  puVar2 = (undefined1 *)(*(code *)PTR_strrchr_00077f44)(uVar1,0x2f);
  if (puVar2 != (undefined1 *)0x0) {
    *puVar2 = 0;
  }
  return uVar1;
}

