
char * dupstr(char *s)

{
  int iVar1;
  
  if (s != (char *)0x0) {
    iVar1 = (*(code *)PTR_strlen_000808f8)();
                    /* WARNING: Subroutine does not return */
    safemalloc(iVar1 + 1,1);
  }
  return (char *)0x0;
}



undefined4 dupstr(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1 == 0) {
    uVar2 = 0;
  }
  else {
    iVar1 = (*(code *)PTR_strlen_000808f8)();
    uVar2 = safemalloc(iVar1 + 1,1);
    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);
  }
  return uVar2;
}


lui gp,0x7
addiu gp,gp,-0x53b4
addu gp,gp,t9
addiu sp,sp,-0x28
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
beq a0,zero,0x0001d4a8
_or s0,a0,zero
lw t9,-0x7778(gp)
jalr t9
_nop
lw gp,0x10(sp)
li a1,0x1
addiu a0,v0,0x1
lw t9,-0x7f9c(gp)
bal 0x0001d2d8
_nop
lw gp,0x10(sp)
or s1,v0,zero
or a1,s0,zero
or a0,v0,zero
lw t9,-0x7978(gp)
jalr t9
_nop
lw gp,0x10(sp)
or v0,s1,zero
lw ra,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
b 0x0001d490
_or s1,a0,zero
(translation_unit "undefined4 dupstr(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 dupstr(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "dupstr(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" else (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_000808f8)();" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000808f8)()" identifier = (call_expression "(*(code *)PTR_strlen_000808f8)()" (parenthesized_expression "(*(code *)PTR_strlen_000808f8)" ( (pointer_expression "*(code *)PTR_strlen_000808f8" * (cast_expression "(code *)PTR_strlen_000808f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "uVar2 = safemalloc(iVar1 + 1,1);" (assignment_expression "uVar2 = safemalloc(iVar1 + 1,1)" identifier = (call_expression "safemalloc(iVar1 + 1,1)" identifier (argument_list "(iVar1 + 1,1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1);" (call_expression "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_000806f8)" ( (pointer_expression "*(code *)PTR_strcpy_000806f8" * (cast_expression "(code *)PTR_strcpy_000806f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1)" ( identifier , identifier ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "char * dupstr(char *s)\n\n{\n  int iVar1;\n  \n  if (s != (char *)0x0) {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n                    /* WARNING: Subroutine does not return */\n    safemalloc(iVar1 + 1,1);\n  }\n  return (char *)0x0;\n}\n\n" (function_definition "char * dupstr(char *s)\n\n{\n  int iVar1;\n  \n  if (s != (char *)0x0) {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n                    /* WARNING: Subroutine does not return */\n    safemalloc(iVar1 + 1,1);\n  }\n  return (char *)0x0;\n}" primitive_type (pointer_declarator "* dupstr(char *s)" * (function_declarator "dupstr(char *s)" identifier (parameter_list "(char *s)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  \n  if (s != (char *)0x0) {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n                    /* WARNING: Subroutine does not return */\n    safemalloc(iVar1 + 1,1);\n  }\n  return (char *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (s != (char *)0x0) {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n                    /* WARNING: Subroutine does not return */\n    safemalloc(iVar1 + 1,1);\n  }" if (parenthesized_expression "(s != (char *)0x0)" ( (binary_expression "s != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n                    /* WARNING: Subroutine does not return */\n    safemalloc(iVar1 + 1,1);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_000808f8)();" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000808f8)()" identifier = (call_expression "(*(code *)PTR_strlen_000808f8)()" (parenthesized_expression "(*(code *)PTR_strlen_000808f8)" ( (pointer_expression "*(code *)PTR_strlen_000808f8" * (cast_expression "(code *)PTR_strlen_000808f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) comment (expression_statement "safemalloc(iVar1 + 1,1);" (call_expression "safemalloc(iVar1 + 1,1)" identifier (argument_list "(iVar1 + 1,1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) , number_literal ))) ;) })) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined4 dupstr(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 dupstr(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "dupstr(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" else (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" { (expression_statement "iVar1 = (*(code *)PTR_strlen_000808f8)();" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000808f8)()" identifier = (call_expression "(*(code *)PTR_strlen_000808f8)()" (parenthesized_expression "(*(code *)PTR_strlen_000808f8)" ( (pointer_expression "*(code *)PTR_strlen_000808f8" * (cast_expression "(code *)PTR_strlen_000808f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "uVar2 = safemalloc(iVar1 + 1,1);" (assignment_expression "uVar2 = safemalloc(iVar1 + 1,1)" identifier = (call_expression "safemalloc(iVar1 + 1,1)" identifier (argument_list "(iVar1 + 1,1)" ( (binary_expression "iVar1 + 1" identifier + number_literal) , number_literal )))) ;) (expression_statement "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1);" (call_expression "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_000806f8)" ( (pointer_expression "*(code *)PTR_strcpy_000806f8" * (cast_expression "(code *)PTR_strcpy_000806f8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar2,param_1)" ( identifier , identifier ))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 dupstr(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "dupstr(int param_1)" (identifier "dupstr") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (if_statement "if (param_1 == 0) {\n    uVar2 = 0;\n  }\n  else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" (else "else") (compound_statement "{\n    iVar1 = (*(code *)PTR_strlen_000808f8)();\n    uVar2 = safemalloc(iVar1 + 1,1);\n    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_strlen_000808f8)();" (assignment_expression "iVar1 = (*(code *)PTR_strlen_000808f8)()" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_strlen_000808f8)()" (parenthesized_expression "(*(code *)PTR_strlen_000808f8)" (( "(") (pointer_expression "*(code *)PTR_strlen_000808f8" (* "*") (cast_expression "(code *)PTR_strlen_000808f8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_000808f8"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = safemalloc(iVar1 + 1,1);" (assignment_expression "uVar2 = safemalloc(iVar1 + 1,1)" (identifier "uVar2") (= "=") (call_expression "safemalloc(iVar1 + 1,1)" (identifier "safemalloc") (argument_list "(iVar1 + 1,1)" (( "(") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1);" (call_expression "(*(code *)PTR_strcpy_000806f8)(uVar2,param_1)" (parenthesized_expression "(*(code *)PTR_strcpy_000806f8)" (( "(") (pointer_expression "*(code *)PTR_strcpy_000806f8" (* "*") (cast_expression "(code *)PTR_strcpy_000806f8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcpy_000806f8"))) () ")")) (argument_list "(uVar2,param_1)" (( "(") (identifier "uVar2") (, ",") (identifier "param_1") () ")"))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

char * function_1(char *var_1)

{
  int var_3;
  
  if (var_1 != (char *)0x0) {
    var_3 = (*(type_1 *)PTR_strlen_000808f8)();
                    /* WARNING: Subroutine does not return */
    var_2(var_3 + 1,1);
  }
  return (char *)0x0;
}


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

undefined4 MASKED(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  if (param_1 == 0) {
    uVar2 = 0;
  }
  else {
    iVar1 = (*(code *)PTR_strlen_000808f8)();
    uVar2 = safemalloc(iVar1 + 1,1);
    (*(code *)PTR_strcpy_000806f8)(uVar2,param_1);
  }
  return uVar2;
}

