
int key_type(Filename *filename)

{
  int iVar1;
  FILE *__stream;
  
  __stream = (FILE *)f_open(filename,"r",0);
  iVar1 = 0;
  if (__stream != (FILE *)0x0) {
    iVar1 = key_type_fp((FILE *)__stream);
    fclose(__stream);
  }
  return iVar1;
}



undefined4 FUN_00122f28(undefined8 param_1)

{
  undefined4 uVar1;
  FILE *__stream;
  
  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);
  uVar1 = 0;
  if (__stream != (FILE *)0x0) {
    uVar1 = FUN_00120464(__stream);
    fclose(__stream);
  }
  return uVar1;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV EDX,0x0
LEA RSI,[0x12fa23]
CALL 0x0012b2d4
MOV EBP,0x0
TEST RAX,RAX
JZ 0x00122f5e
MOV RBX,RAX
MOV RDI,RAX
CALL 0x00120464
MOV EBP,EAX
MOV RDI,RBX
CALL 0x00104150
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "undefined4 FUN_00122f28(undefined8 param_1)\n\n{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_00122f28(undefined8 param_1)\n\n{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00122f28(undefined8 param_1)" identifier (parameter_list "(undefined8 param_1)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (expression_statement "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0)" identifier = (cast_expression "(FILE *)FUN_0012b2d4(param_1,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012b2d4(param_1,"r",0)" identifier (argument_list "(param_1,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" { (expression_statement "uVar1 = FUN_00120464(__stream);" (assignment_expression "uVar1 = FUN_00120464(__stream)" identifier = (call_expression "FUN_00120464(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "int key_type(Filename *filename)\n\n{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)f_open(filename,"r",0);\n  iVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}\n\n" (function_definition "int key_type(Filename *filename)\n\n{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)f_open(filename,"r",0);\n  iVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "key_type(Filename *filename)" identifier (parameter_list "(Filename *filename)" ( (parameter_declaration "Filename *filename" type_identifier (pointer_declarator "*filename" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)f_open(filename,"r",0);\n  iVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (expression_statement "__stream = (FILE *)f_open(filename,"r",0);" (assignment_expression "__stream = (FILE *)f_open(filename,"r",0)" identifier = (cast_expression "(FILE *)f_open(filename,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "f_open(filename,"r",0)" identifier (argument_list "(filename,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = key_type_fp((FILE *)__stream);\n    fclose(__stream);\n  }" { (expression_statement "iVar1 = key_type_fp((FILE *)__stream);" (assignment_expression "iVar1 = key_type_fp((FILE *)__stream)" identifier = (call_expression "key_type_fp((FILE *)__stream)" identifier (argument_list "((FILE *)__stream)" ( (cast_expression "(FILE *)__stream" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_00122f28(undefined8 param_1)\n\n{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}\n\n" (function_definition "undefined4 FUN_00122f28(undefined8 param_1)\n\n{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_00122f28(undefined8 param_1)" identifier (parameter_list "(undefined8 param_1)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "FILE *__stream;" type_identifier (pointer_declarator "*__stream" * identifier) ;) (expression_statement "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0)" identifier = (cast_expression "(FILE *)FUN_0012b2d4(param_1,"r",0)" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0012b2d4(param_1,"r",0)" identifier (argument_list "(param_1,"r",0)" ( identifier , (string_literal ""r"" " string_content ") , number_literal ))))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" if (parenthesized_expression "(__stream != (FILE *)0x0)" ( (binary_expression "__stream != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" { (expression_statement "uVar1 = FUN_00120464(__stream);" (assignment_expression "uVar1 = FUN_00120464(__stream)" identifier = (call_expression "FUN_00120464(__stream)" identifier (argument_list "(__stream)" ( identifier )))) ;) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" identifier (argument_list "(__stream)" ( identifier ))) ;) })) (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT ))))) ;) (expression_statement (assignment_expression 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 IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00122f28(undefined8 param_1)\n\n{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00122f28(undefined8 param_1)" (identifier "FUN_00122f28") (parameter_list "(undefined8 param_1)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  FILE *__stream;\n  \n  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);\n  uVar1 = 0;\n  if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "FILE *__stream;" (type_identifier "FILE") (pointer_declarator "*__stream" (* "*") (identifier "__stream")) (; ";")) (expression_statement "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0);" (assignment_expression "__stream = (FILE *)FUN_0012b2d4(param_1,"r",0)" (identifier "__stream") (= "=") (cast_expression "(FILE *)FUN_0012b2d4(param_1,"r",0)" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0012b2d4(param_1,"r",0)" (identifier "FUN_0012b2d4") (argument_list "(param_1,"r",0)" (( "(") (identifier "param_1") (, ",") (string_literal ""r"" (" """) (string_content "r") (" """)) (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (__stream != (FILE *)0x0) {\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" (if "if") (parenthesized_expression "(__stream != (FILE *)0x0)" (( "(") (binary_expression "__stream != (FILE *)0x0" (identifier "__stream") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar1 = FUN_00120464(__stream);\n    fclose(__stream);\n  }" ({ "{") (expression_statement "uVar1 = FUN_00120464(__stream);" (assignment_expression "uVar1 = FUN_00120464(__stream)" (identifier "uVar1") (= "=") (call_expression "FUN_00120464(__stream)" (identifier "FUN_00120464") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")")))) (; ";")) (expression_statement "fclose(__stream);" (call_expression "fclose(__stream)" (identifier "fclose") (argument_list "(__stream)" (( "(") (identifier "__stream") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

int function_1(type_1 *filename)

{
  int iVar1;
  type_2 *var_2;
  
  var_2 = (type_2 *)var_1(filename,"r",0);
  iVar1 = 0;
  if (var_2 != (type_2 *)0x0) {
    iVar1 = var_3((type_2 *)var_2);
    var_4(var_2);
  }
  return iVar1;
}


(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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (number_literal)))))) (expression_statement (assignment_expression left: (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 (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement (identifier)))))

undefined4 MASKED(undefined8 param_1)

{
  undefined4 uVar1;
  FILE *__stream;
  
  __stream = (FILE *)FUN_0012b2d4(param_1,"r",0);
  uVar1 = 0;
  if (__stream != (FILE *)0x0) {
    uVar1 = FUN_00120464(__stream);
    fclose(__stream);
  }
  return uVar1;
}

