
char * make_new_name_generic(char *filename,char *expected_ext)

{
  char *pcVar1;
  int iVar2;
  
  pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e);
  if (pcVar1 != (char *)0x0) {
    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);
    if (iVar2 != 0) {
      return (char *)0x0;
    }
    *pcVar1 = '\0';
    pcVar1 = filename;
  }
  return pcVar1;
}



undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)

{
  undefined1 *puVar1;
  int iVar2;
  
  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);
  if (puVar1 != (undefined1 *)0x0) {
    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);
    if (iVar2 != 0) {
      return (undefined1 *)0x0;
    }
    *puVar1 = 0;
    puVar1 = param_1;
  }
  return puVar1;
}


lui gp,0xa
addiu gp,gp,-0x5f78
addu gp,gp,t9
addiu sp,sp,-0x28
lw t9,-0x7394(gp)
sw s2,0x20(sp)
or s2,a1,zero
li a1,0x2e
sw gp,0x10(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw ra,0x24(sp)
jalr t9
_or s1,a0,zero
lw gp,0x10(sp)
beq v0,zero,0x0009812c
_or s0,v0,zero
lw t9,-0x6f88(gp)
addiu a0,v0,0x1
jalr t9
_or a1,s2,zero
bne v0,zero,0x00098148
_lw ra,0x24(sp)
sb zero,0x0(s0)
or s0,s1,zero
lw ra,0x24(sp)
or v0,s0,zero
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
or s0,zero,zero
lw s2,0x20(sp)
or v0,s0,zero
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x28
(translation_unit "undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}\n\n" (function_definition "undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_000980c8(undefined1 *param_1,undefined4 param_2)" * (function_declarator "FUN_000980c8(undefined1 *param_1,undefined4 param_2)" identifier (parameter_list "(undefined1 *param_1,undefined4 param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" (parenthesized_expression "(*(code *)PTR_strrchr_0012adbc)" ( (pointer_expression "*(code *)PTR_strrchr_0012adbc" * (cast_expression "(code *)PTR_strrchr_0012adbc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0x2e)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" if (parenthesized_expression "(puVar1 != (undefined1 *)0x0)" ( (binary_expression "puVar1 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" { (expression_statement "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1 + 1,param_2)" ( (binary_expression "puVar1 + 1" identifier + number_literal) , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return (undefined1 *)0x0;\n    }" { (return_statement "return (undefined1 *)0x0;" return (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "char * make_new_name_generic(char *filename,char *expected_ext)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e);\n  if (pcVar1 != (char *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);\n    if (iVar2 != 0) {\n      return (char *)0x0;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = filename;\n  }\n  return pcVar1;\n}\n\n" (function_definition "char * make_new_name_generic(char *filename,char *expected_ext)\n\n{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e);\n  if (pcVar1 != (char *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);\n    if (iVar2 != 0) {\n      return (char *)0x0;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = filename;\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* make_new_name_generic(char *filename,char *expected_ext)" * (function_declarator "make_new_name_generic(char *filename,char *expected_ext)" identifier (parameter_list "(char *filename,char *expected_ext)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) , (parameter_declaration "char *expected_ext" primitive_type (pointer_declarator "*expected_ext" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  \n  pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e);\n  if (pcVar1 != (char *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);\n    if (iVar2 != 0) {\n      return (char *)0x0;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = filename;\n  }\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e);" (assignment_expression "pcVar1 = (char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e)" identifier = (cast_expression "(char *)(*(code *)PTR_strrchr_0012adbc)(filename,0x2e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_0012adbc)(filename,0x2e)" (parenthesized_expression "(*(code *)PTR_strrchr_0012adbc)" ( (pointer_expression "*(code *)PTR_strrchr_0012adbc" * (cast_expression "(code *)PTR_strrchr_0012adbc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(filename,0x2e)" ( identifier , number_literal ))))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);\n    if (iVar2 != 0) {\n      return (char *)0x0;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = filename;\n  }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);\n    if (iVar2 != 0) {\n      return (char *)0x0;\n    }\n    *pcVar1 = '\0';\n    pcVar1 = filename;\n  }" { (expression_statement "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext);" (assignment_expression "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)(pcVar1 + 1,expected_ext)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar1 + 1,expected_ext)" ( (binary_expression "pcVar1 + 1" identifier + number_literal) , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      return (char *)0x0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return (char *)0x0;\n    }" { (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*pcVar1 = '\0';" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar1 = filename;" (assignment_expression "pcVar1 = filename" identifier = identifier) ;) })) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}\n\n" (function_definition "undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_000980c8(undefined1 *param_1,undefined4 param_2)" * (function_declarator "FUN_000980c8(undefined1 *param_1,undefined4 param_2)" identifier (parameter_list "(undefined1 *param_1,undefined4 param_2)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" identifier = (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" (parenthesized_expression "(*(code *)PTR_strrchr_0012adbc)" ( (pointer_expression "*(code *)PTR_strrchr_0012adbc" * (cast_expression "(code *)PTR_strrchr_0012adbc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0x2e)" ( identifier , number_literal ))))) ;) (if_statement "if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" if (parenthesized_expression "(puVar1 != (undefined1 *)0x0)" ( (binary_expression "puVar1 != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" { (expression_statement "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1 + 1,param_2)" ( (binary_expression "puVar1 + 1" identifier + number_literal) , identifier )))) ;) (if_statement "if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return (undefined1 *)0x0;\n    }" { (return_statement "return (undefined1 *)0x0;" return (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE 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 IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined1 * FUN_000980c8(undefined1 *param_1,undefined4 param_2)\n\n{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" (type_identifier "undefined1") (pointer_declarator "* FUN_000980c8(undefined1 *param_1,undefined4 param_2)" (* "*") (function_declarator "FUN_000980c8(undefined1 *param_1,undefined4 param_2)" (identifier "FUN_000980c8") (parameter_list "(undefined1 *param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")")))) (compound_statement "{\n  undefined1 *puVar1;\n  int iVar2;\n  \n  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);\n  if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }\n  return puVar1;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);" (assignment_expression "puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e)" (parenthesized_expression "(*(code *)PTR_strrchr_0012adbc)" (( "(") (pointer_expression "*(code *)PTR_strrchr_0012adbc" (* "*") (cast_expression "(code *)PTR_strrchr_0012adbc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strrchr_0012adbc"))) () ")")) (argument_list "(param_1,0x2e)" (( "(") (identifier "param_1") (, ",") (number_literal "0x2e") () ")"))))) (; ";")) (if_statement "if (puVar1 != (undefined1 *)0x0) {\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" (if "if") (parenthesized_expression "(puVar1 != (undefined1 *)0x0)" (( "(") (binary_expression "puVar1 != (undefined1 *)0x0" (identifier "puVar1") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);\n    if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }\n    *puVar1 = 0;\n    puVar1 = param_1;\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);" (assignment_expression "iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" (( "(") (pointer_expression "*(code *)PTR_strcmp_0012b1c8" (* "*") (cast_expression "(code *)PTR_strcmp_0012b1c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcmp_0012b1c8"))) () ")")) (argument_list "(puVar1 + 1,param_2)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      return (undefined1 *)0x0;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return (undefined1 *)0x0;\n    }" ({ "{") (return_statement "return (undefined1 *)0x0;" (return "return") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "*puVar1 = 0;" (assignment_expression "*puVar1 = 0" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" (identifier "puVar1") (= "=") (identifier "param_1")) (; ";")) (} "}"))) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (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: (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: (identifier) right: (number_literal)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))))

undefined1 * MASKED(undefined1 *param_1,undefined4 param_2)

{
  undefined1 *puVar1;
  int iVar2;
  
  puVar1 = (undefined1 *)(*(code *)PTR_strrchr_0012adbc)(param_1,0x2e);
  if (puVar1 != (undefined1 *)0x0) {
    iVar2 = (*(code *)PTR_strcmp_0012b1c8)(puVar1 + 1,param_2);
    if (iVar2 != 0) {
      return (undefined1 *)0x0;
    }
    *puVar1 = 0;
    puVar1 = param_1;
  }
  return puVar1;
}

