
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int gen_tempname_len(char *tmpl,int suffixlen,int flags,int kind,size_t x_suffix_len)

{
  code *tryfunc;
  int iVar1;
  
  if (kind == 1) {
    tryfunc = try_dir;
  }
  else if (kind == 2) {
    tryfunc = try_nocreate;
  }
  else {
    if (kind != 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"
                   );
    }
    tryfunc = try_file;
  }
  iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);
  return iVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,
                 undefined4 param_5)

{
  code *pcVar1;
  
  if (param_4 == 1) {
    pcVar1 = FUN_00021400;
  }
  else if (param_4 == 2) {
    pcVar1 = FUN_00021380;
  }
  else {
    if (param_4 != 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"
                   );
    }
    pcVar1 = FUN_00021430;
  }
  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);
  return;
}


PUSH EBX
CALL 0x000132c0
ADD EBX,0x17a1a
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x1c]
CMP EAX,0x1
JZ 0x00021650
CMP EAX,0x2
JZ 0x00021620
TEST EAX,EAX
JZ 0x00021648
LEA EAX,[EBX + 0xffff6140]
PUSH EAX
LEA EAX,[EBX + 0xffff6108]
PUSH 0x147
PUSH EAX
LEA EAX,[EBX + 0xffff6118]
PUSH EAX
CALL 0x00012910
LEA EAX,[EBX + 0xfffe8380]
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
PUSH EAX
LEA EAX,[ESP + 0x2c]
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
PUSH dword ptr [ESP + 0x2c]
CALL 0x00021460
ADD ESP,0x28
POP EBX
RET
LEA EAX,[EBX + 0xfffe8430]
JMP 0x00021626
LEA EAX,[EBX + 0xfffe8400]
JMP 0x00021626
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)\n\n{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}\n\n" comment (function_definition "void FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)\n\n{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" primitive_type (function_declarator "FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = FUN_00021400;\n  }" { (expression_statement "pcVar1 = FUN_00021400;" (assignment_expression "pcVar1 = FUN_00021400" identifier = identifier) ;) }) (else_clause "else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" else (if_statement "if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = FUN_00021380;\n  }" { (expression_statement "pcVar1 = FUN_00021380;" (assignment_expression "pcVar1 = FUN_00021380" identifier = identifier) ;) }) (else_clause "else {\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" else (compound_statement "{\n    if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" { (if_statement "if (param_4 != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" { comment (expression_statement "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );" (call_expression "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" identifier (argument_list "("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" ( (string_literal ""! \"invalid KIND in __gen_tempname\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""lib/tempname.c"" " string_content ") , number_literal , (string_literal ""gen_tempname_len"" " string_content ") ))) ;) })) (expression_statement "pcVar1 = FUN_00021430;" (assignment_expression "pcVar1 = FUN_00021430" identifier = identifier) ;) }))))) (expression_statement "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);" (call_expression "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5)" identifier (argument_list "(param_1,param_2,&param_3,pcVar1,param_5)" ( identifier , identifier , (pointer_expression "&param_3" & identifier) , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint gen_tempname_len(char *tmpl,int suffixlen,int flags,int kind,size_t x_suffix_len)\n\n{\n  code *tryfunc;\n  int iVar1;\n  \n  if (kind == 1) {\n    tryfunc = try_dir;\n  }\n  else if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }\n  iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);\n  return iVar1;\n}\n\n" comment (function_definition "int gen_tempname_len(char *tmpl,int suffixlen,int flags,int kind,size_t x_suffix_len)\n\n{\n  code *tryfunc;\n  int iVar1;\n  \n  if (kind == 1) {\n    tryfunc = try_dir;\n  }\n  else if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }\n  iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);\n  return iVar1;\n}" primitive_type (function_declarator "gen_tempname_len(char *tmpl,int suffixlen,int flags,int kind,size_t x_suffix_len)" identifier (parameter_list "(char *tmpl,int suffixlen,int flags,int kind,size_t x_suffix_len)" ( (parameter_declaration "char *tmpl" primitive_type (pointer_declarator "*tmpl" * identifier)) , (parameter_declaration "int suffixlen" primitive_type identifier) , (parameter_declaration "int flags" primitive_type identifier) , (parameter_declaration "int kind" primitive_type identifier) , (parameter_declaration "size_t x_suffix_len" primitive_type identifier) ))) (compound_statement "{\n  code *tryfunc;\n  int iVar1;\n  \n  if (kind == 1) {\n    tryfunc = try_dir;\n  }\n  else if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }\n  iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);\n  return iVar1;\n}" { (declaration "code *tryfunc;" type_identifier (pointer_declarator "*tryfunc" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (kind == 1) {\n    tryfunc = try_dir;\n  }\n  else if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }" if (parenthesized_expression "(kind == 1)" ( (binary_expression "kind == 1" identifier == number_literal) )) (compound_statement "{\n    tryfunc = try_dir;\n  }" { (expression_statement "tryfunc = try_dir;" (assignment_expression "tryfunc = try_dir" identifier = identifier) ;) }) (else_clause "else if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }" else (if_statement "if (kind == 2) {\n    tryfunc = try_nocreate;\n  }\n  else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }" if (parenthesized_expression "(kind == 2)" ( (binary_expression "kind == 2" identifier == number_literal) )) (compound_statement "{\n    tryfunc = try_nocreate;\n  }" { (expression_statement "tryfunc = try_nocreate;" (assignment_expression "tryfunc = try_nocreate" identifier = identifier) ;) }) (else_clause "else {\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }" else (compound_statement "{\n    if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    tryfunc = try_file;\n  }" { (if_statement "if (kind != 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" if (parenthesized_expression "(kind != 0)" ( (binary_expression "kind != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" { comment (expression_statement "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );" (call_expression "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" identifier (argument_list "("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" ( (string_literal ""! \"invalid KIND in __gen_tempname\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""lib/tempname.c"" " string_content ") , number_literal , (string_literal ""gen_tempname_len"" " string_content ") ))) ;) })) (expression_statement "tryfunc = try_file;" (assignment_expression "tryfunc = try_file" identifier = identifier) ;) }))))) (expression_statement "iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);" (assignment_expression "iVar1 = try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len)" identifier = (call_expression "try_tempname_len(tmpl,suffixlen,&flags,tryfunc,x_suffix_len)" identifier (argument_list "(tmpl,suffixlen,&flags,tryfunc,x_suffix_len)" ( identifier , identifier , (pointer_expression "&flags" & identifier) , identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)\n\n{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}\n\n" (function_definition "void FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)\n\n{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" primitive_type (function_declarator "FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) ))) (compound_statement "{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" { (declaration "code *pcVar1;" type_identifier (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = FUN_00021400;\n  }" { (expression_statement "pcVar1 = FUN_00021400;" (assignment_expression "pcVar1 = FUN_00021400" identifier = identifier) ;) }) (else_clause "else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" else (if_statement "if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" if (parenthesized_expression "(param_4 == 2)" ( (binary_expression "param_4 == 2" identifier == number_literal) )) (compound_statement "{\n    pcVar1 = FUN_00021380;\n  }" { (expression_statement "pcVar1 = FUN_00021380;" (assignment_expression "pcVar1 = FUN_00021380" identifier = identifier) ;) }) (else_clause "else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" else (compound_statement "{\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" { (if_statement "if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" { (expression_statement "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );" (call_expression "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" identifier (argument_list "("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" ( (string_literal ""! \"invalid KIND in __gen_tempname\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""lib/tempname.c"" " string_content ") , number_literal , (string_literal ""gen_tempname_len"" " string_content ") ))) ;) })) (expression_statement "pcVar1 = FUN_00021430;" (assignment_expression "pcVar1 = FUN_00021430" identifier = identifier) ;) }))))) (expression_statement "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);" (call_expression "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5)" identifier (argument_list "(param_1,param_2,&param_3,pcVar1,param_5)" ( identifier , identifier , (pointer_expression "&param_3" & identifier) , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) }))))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)\n\n{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000215e0(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" (identifier "FUN_000215e0") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,\n                 undefined4 param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) () ")"))) (compound_statement "{\n  code *pcVar1;\n  \n  if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }\n  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);\n  return;\n}" ({ "{") (declaration "code *pcVar1;" (type_identifier "code") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (if_statement "if (param_4 == 1) {\n    pcVar1 = FUN_00021400;\n  }\n  else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    pcVar1 = FUN_00021400;\n  }" ({ "{") (expression_statement "pcVar1 = FUN_00021400;" (assignment_expression "pcVar1 = FUN_00021400" (identifier "pcVar1") (= "=") (identifier "FUN_00021400")) (; ";")) (} "}")) (else_clause "else if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" (else "else") (if_statement "if (param_4 == 2) {\n    pcVar1 = FUN_00021380;\n  }\n  else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" (if "if") (parenthesized_expression "(param_4 == 2)" (( "(") (binary_expression "param_4 == 2" (identifier "param_4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    pcVar1 = FUN_00021380;\n  }" ({ "{") (expression_statement "pcVar1 = FUN_00021380;" (assignment_expression "pcVar1 = FUN_00021380" (identifier "pcVar1") (= "=") (identifier "FUN_00021380")) (; ";")) (} "}")) (else_clause "else {\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" (else "else") (compound_statement "{\n    if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }\n    pcVar1 = FUN_00021430;\n  }" ({ "{") (if_statement "if (param_4 != 0) {\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );\n    }" ({ "{") (expression_statement "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   );" (call_expression "__assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" (identifier "__assert_fail") (argument_list "("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"\n                   )" (( "(") (string_literal ""! \"invalid KIND in __gen_tempname\""" (" """) (string_content "! ") (escape_sequence "\"") (string_content "invalid KIND in __gen_tempname") (escape_sequence "\"") (" """)) (, ",") (string_literal ""lib/tempname.c"" (" """) (string_content "lib/tempname.c") (" """)) (, ",") (number_literal "0x147") (, ",") (string_literal ""gen_tempname_len"" (" """) (string_content "gen_tempname_len") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "pcVar1 = FUN_00021430;" (assignment_expression "pcVar1 = FUN_00021430" (identifier "pcVar1") (= "=") (identifier "FUN_00021430")) (; ";")) (} "}")))))) (expression_statement "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);" (call_expression "FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5)" (identifier "FUN_00021460") (argument_list "(param_1,param_2,&param_3,pcVar1,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (pointer_expression "&param_3" (& "&") (identifier "param_3")) (, ",") (identifier "pcVar1") (, ",") (identifier "param_5") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

int function_1(char *tmpl,int suffixlen,int flags,int var_1,size_t x_suffix_len)

{
  type_1 *tryfunc;
  int iVar1;
  
  if (var_1 == 1) {
    tryfunc = try_dir;
  }
  else if (var_1 == 2) {
    tryfunc = try_nocreate;
  }
  else {
    if (var_1 != 0) {
                    /* WARNING: Subroutine does not return */
      var_2("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"
                   );
    }
    tryfunc = try_file;
  }
  iVar1 = var_3(tmpl,suffixlen,&flags,tryfunc,x_suffix_len);
  return iVar1;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (identifier)) (identifier) (identifier)))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,int param_4,
                 undefined4 param_5)

{
  code *pcVar1;
  
  if (param_4 == 1) {
    pcVar1 = FUN_00021400;
  }
  else if (param_4 == 2) {
    pcVar1 = FUN_00021380;
  }
  else {
    if (param_4 != 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("! \"invalid KIND in __gen_tempname\"","lib/tempname.c",0x147,"gen_tempname_len"
                   );
    }
    pcVar1 = FUN_00021430;
  }
  FUN_00021460(param_1,param_2,&param_3,pcVar1,param_5);
  return;
}

