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

int try_ata_identity(char *file_namep,int ata_fd,_Bool do_inq)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  ata_identify_device ata_ident;
  char model [64];
  char serial [64];
  char firm [64];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident);
  if (iVar2 == 0) {
    __printf_chk(1,"%s: ATA device\n",file_namep);
    if (do_inq) {
      __printf_chk(1,&DAT_000130ca,file_namep);
      printswap(model,(char *)ata_ident.model,0x28);
      printswap(serial,(char *)ata_ident.serial_no,0x14);
      printswap(firm,(char *)ata_ident.fw_rev,8);
      putchar(10);
    }
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_2e0 [20];
  undefined1 local_2cc [26];
  undefined1 local_2b2 [8];
  undefined1 local_2aa [458];
  undefined1 local_e0 [64];
  undefined1 local_a0 [64];
  undefined1 local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x123d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_00012330(param_2,local_2e0);
  if (iVar1 == 0) {
    __printf_chk(1,"%s: ATA device\n",param_1);
    if (param_3 != '\0') {
      __printf_chk(1,&DAT_000130ca,param_1);
      FUN_000122d0(local_e0,local_2aa,0x28);
      FUN_000122d0(local_a0,local_2cc,0x14);
      FUN_000122d0(local_60,local_2b2,8);
      putchar(10);
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00012540();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00011ab0
ADD EBX,0x2ba7
SUB ESP,0x2e4
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2d4],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x14]
MOV EBP,dword ptr [ESP + 0x2f8]
MOV EDI,dword ptr [ESP + 0x300]
PUSH EAX
PUSH dword ptr [ESP + 0x300]
CALL 0x00012330
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00012440
MOV EDX,dword ptr [ESP + 0x2cc]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x000124c5
ADD ESP,0x2dc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xffffe13a]
PUSH EBP
PUSH EAX
PUSH 0x1
CALL 0x00011140
MOV EAX,EDI
ADD ESP,0x10
TEST AL,AL
JZ 0x0001241c
SUB ESP,0x8
LEA EAX,[EBX + 0xffffe14a]
PUSH EAX
PUSH 0x1
CALL 0x00011140
ADD ESP,0xc
PUSH 0x28
LEA EAX,[ESP + 0x4a]
PUSH EAX
LEA EAX,[ESP + 0x218]
PUSH EAX
CALL 0x000122d0
ADD ESP,0xc
PUSH 0x14
LEA EAX,[ESP + 0x28]
PUSH EAX
LEA EAX,[ESP + 0x258]
PUSH EAX
CALL 0x000122d0
ADD ESP,0xc
PUSH 0x8
LEA EAX,[ESP + 0x42]
PUSH EAX
LEA EAX,[ESP + 0x298]
PUSH EAX
CALL 0x000122d0
MOV dword ptr [ESP],0xa
CALL 0x00011120
ADD ESP,0x10
JMP 0x0001241c
CALL 0x00012540
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012540();\n}\n\n" comment (function_definition "int FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012540();\n}" primitive_type (function_declarator "FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012540();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2e0 [20];" type_identifier (array_declarator "local_2e0 [20]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2cc [26];" type_identifier (array_declarator "local_2cc [26]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2b2 [8];" type_identifier (array_declarator "local_2b2 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2aa [458];" type_identifier (array_declarator "local_2aa [458]" identifier [ number_literal ]) ;) (declaration "undefined1 local_e0 [64];" type_identifier (array_declarator "local_e0 [64]" identifier [ number_literal ]) ;) (declaration "undefined1 local_a0 [64];" type_identifier (array_declarator "local_a0 [64]" identifier [ number_literal ]) ;) (declaration "undefined1 local_60 [64];" type_identifier (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x123d9;" (assignment_expression "uStack_14 = 0x123d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_00012330(param_2,local_2e0);" (assignment_expression "iVar1 = FUN_00012330(param_2,local_2e0)" identifier = (call_expression "FUN_00012330(param_2,local_2e0)" identifier (argument_list "(param_2,local_2e0)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" { (expression_statement "__printf_chk(1,"%s: ATA device\n",param_1);" (call_expression "__printf_chk(1,"%s: ATA device\n",param_1)" identifier (argument_list "(1,"%s: ATA device\n",param_1)" ( number_literal , (string_literal ""%s: ATA device\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" if (parenthesized_expression "(param_3 != '\0')" ( (binary_expression "param_3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" { (expression_statement "__printf_chk(1,&DAT_000130ca,param_1);" (call_expression "__printf_chk(1,&DAT_000130ca,param_1)" identifier (argument_list "(1,&DAT_000130ca,param_1)" ( number_literal , (pointer_expression "&DAT_000130ca" & identifier) , identifier ))) ;) (expression_statement "FUN_000122d0(local_e0,local_2aa,0x28);" (call_expression "FUN_000122d0(local_e0,local_2aa,0x28)" identifier (argument_list "(local_e0,local_2aa,0x28)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_000122d0(local_a0,local_2cc,0x14);" (call_expression "FUN_000122d0(local_a0,local_2cc,0x14)" identifier (argument_list "(local_a0,local_2cc,0x14)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_000122d0(local_60,local_2b2,8);" (call_expression "FUN_000122d0(local_60,local_2b2,8)" identifier (argument_list "(local_60,local_2b2,8)" ( identifier , identifier , number_literal ))) ;) (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) })) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "FUN_00012540();" (call_expression "FUN_00012540()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint try_ata_identity(char *file_namep,int ata_fd,_Bool do_inq)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  ata_identify_device ata_ident;\n  char model [64];\n  char serial [64];\n  char firm [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident);\n  if (iVar2 == 0) {\n    __printf_chk(1,"%s: ATA device\n",file_namep);\n    if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int try_ata_identity(char *file_namep,int ata_fd,_Bool do_inq)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  ata_identify_device ata_ident;\n  char model [64];\n  char serial [64];\n  char firm [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident);\n  if (iVar2 == 0) {\n    __printf_chk(1,"%s: ATA device\n",file_namep);\n    if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "try_ata_identity(char *file_namep,int ata_fd,_Bool do_inq)" identifier (parameter_list "(char *file_namep,int ata_fd,_Bool do_inq)" ( (parameter_declaration "char *file_namep" primitive_type (pointer_declarator "*file_namep" * identifier)) , (parameter_declaration "int ata_fd" primitive_type identifier) , (parameter_declaration "_Bool do_inq" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  ata_identify_device ata_ident;\n  char model [64];\n  char serial [64];\n  char firm [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident);\n  if (iVar2 == 0) {\n    __printf_chk(1,"%s: ATA device\n",file_namep);\n    if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "ata_identify_device ata_ident;" type_identifier identifier ;) (declaration "char model [64];" primitive_type (array_declarator "model [64]" identifier [ number_literal ]) ;) (declaration "char serial [64];" primitive_type (array_declarator "serial [64]" identifier [ number_literal ]) ;) (declaration "char firm [64];" primitive_type (array_declarator "firm [64]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident);" (assignment_expression "iVar2 = ata_command_interface(ata_fd,(char *)&ata_ident)" identifier = (call_expression "ata_command_interface(ata_fd,(char *)&ata_ident)" identifier (argument_list "(ata_fd,(char *)&ata_ident)" ( identifier , (cast_expression "(char *)&ata_ident" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&ata_ident" & identifier)) )))) ;) (if_statement "if (iVar2 == 0) {\n    __printf_chk(1,"%s: ATA device\n",file_namep);\n    if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    __printf_chk(1,"%s: ATA device\n",file_namep);\n    if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }\n  }" { (expression_statement "__printf_chk(1,"%s: ATA device\n",file_namep);" (call_expression "__printf_chk(1,"%s: ATA device\n",file_namep)" identifier (argument_list "(1,"%s: ATA device\n",file_namep)" ( number_literal , (string_literal ""%s: ATA device\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (do_inq) {\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }" if (parenthesized_expression "(do_inq)" ( identifier )) (compound_statement "{\n      __printf_chk(1,&DAT_000130ca,file_namep);\n      printswap(model,(char *)ata_ident.model,0x28);\n      printswap(serial,(char *)ata_ident.serial_no,0x14);\n      printswap(firm,(char *)ata_ident.fw_rev,8);\n      putchar(10);\n    }" { (expression_statement "__printf_chk(1,&DAT_000130ca,file_namep);" (call_expression "__printf_chk(1,&DAT_000130ca,file_namep)" identifier (argument_list "(1,&DAT_000130ca,file_namep)" ( number_literal , (pointer_expression "&DAT_000130ca" & identifier) , identifier ))) ;) (expression_statement "printswap(model,(char *)ata_ident.model,0x28);" (call_expression "printswap(model,(char *)ata_ident.model,0x28)" identifier (argument_list "(model,(char *)ata_ident.model,0x28)" ( identifier , (cast_expression "(char *)ata_ident.model" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "ata_ident.model" identifier . field_identifier)) , number_literal ))) ;) (expression_statement "printswap(serial,(char *)ata_ident.serial_no,0x14);" (call_expression "printswap(serial,(char *)ata_ident.serial_no,0x14)" identifier (argument_list "(serial,(char *)ata_ident.serial_no,0x14)" ( identifier , (cast_expression "(char *)ata_ident.serial_no" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "ata_ident.serial_no" identifier . field_identifier)) , number_literal ))) ;) (expression_statement "printswap(firm,(char *)ata_ident.fw_rev,8);" (call_expression "printswap(firm,(char *)ata_ident.fw_rev,8)" identifier (argument_list "(firm,(char *)ata_ident.fw_rev,8)" ( identifier , (cast_expression "(char *)ata_ident.fw_rev" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "ata_ident.fw_rev" identifier . field_identifier)) , number_literal ))) ;) (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) })) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00012540();\n}\n\n" (function_definition "int FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00012540();\n}" primitive_type (function_declarator "FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,char param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00012540();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2e0 [20];" type_identifier (array_declarator "local_2e0 [20]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2cc [26];" type_identifier (array_declarator "local_2cc [26]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2b2 [8];" type_identifier (array_declarator "local_2b2 [8]" identifier [ number_literal ]) ;) (declaration "undefined1 local_2aa [458];" type_identifier (array_declarator "local_2aa [458]" identifier [ number_literal ]) ;) (declaration "undefined1 local_e0 [64];" type_identifier (array_declarator "local_e0 [64]" identifier [ number_literal ]) ;) (declaration "undefined1 local_a0 [64];" type_identifier (array_declarator "local_a0 [64]" identifier [ number_literal ]) ;) (declaration "undefined1 local_60 [64];" type_identifier (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x123d9;" (assignment_expression "uStack_14 = 0x123d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = FUN_00012330(param_2,local_2e0);" (assignment_expression "iVar1 = FUN_00012330(param_2,local_2e0)" identifier = (call_expression "FUN_00012330(param_2,local_2e0)" identifier (argument_list "(param_2,local_2e0)" ( identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" { (expression_statement "__printf_chk(1,"%s: ATA device\n",param_1);" (call_expression "__printf_chk(1,"%s: ATA device\n",param_1)" identifier (argument_list "(1,"%s: ATA device\n",param_1)" ( number_literal , (string_literal ""%s: ATA device\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" if (parenthesized_expression "(param_3 != '\0')" ( (binary_expression "param_3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" { (expression_statement "__printf_chk(1,&DAT_000130ca,param_1);" (call_expression "__printf_chk(1,&DAT_000130ca,param_1)" identifier (argument_list "(1,&DAT_000130ca,param_1)" ( number_literal , (pointer_expression "&DAT_000130ca" & identifier) , identifier ))) ;) (expression_statement "FUN_000122d0(local_e0,local_2aa,0x28);" (call_expression "FUN_000122d0(local_e0,local_2aa,0x28)" identifier (argument_list "(local_e0,local_2aa,0x28)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_000122d0(local_a0,local_2cc,0x14);" (call_expression "FUN_000122d0(local_a0,local_2cc,0x14)" identifier (argument_list "(local_a0,local_2cc,0x14)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_000122d0(local_60,local_2b2,8);" (call_expression "FUN_000122d0(local_60,local_2b2,8)" identifier (argument_list "(local_60,local_2b2,8)" ( identifier , identifier , number_literal ))) ;) (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) })) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "FUN_00012540();" (call_expression "FUN_00012540()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00012540();\n}" (primitive_type "int") (function_declarator "FUN_000123d0(undefined4 param_1,undefined4 param_2,char param_3)" (identifier "FUN_000123d0") (parameter_list "(undefined4 param_1,undefined4 param_2,char param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "char param_3" (primitive_type "char") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  undefined1 local_2e0 [20];\n  undefined1 local_2cc [26];\n  undefined1 local_2b2 [8];\n  undefined1 local_2aa [458];\n  undefined1 local_e0 [64];\n  undefined1 local_a0 [64];\n  undefined1 local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x123d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = FUN_00012330(param_2,local_2e0);\n  if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_00012540();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_2e0 [20];" (type_identifier "undefined1") (array_declarator "local_2e0 [20]" (identifier "local_2e0") ([ "[") (number_literal "20") (] "]")) (; ";")) (declaration "undefined1 local_2cc [26];" (type_identifier "undefined1") (array_declarator "local_2cc [26]" (identifier "local_2cc") ([ "[") (number_literal "26") (] "]")) (; ";")) (declaration "undefined1 local_2b2 [8];" (type_identifier "undefined1") (array_declarator "local_2b2 [8]" (identifier "local_2b2") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "undefined1 local_2aa [458];" (type_identifier "undefined1") (array_declarator "local_2aa [458]" (identifier "local_2aa") ([ "[") (number_literal "458") (] "]")) (; ";")) (declaration "undefined1 local_e0 [64];" (type_identifier "undefined1") (array_declarator "local_e0 [64]" (identifier "local_e0") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "undefined1 local_a0 [64];" (type_identifier "undefined1") (array_declarator "local_a0 [64]" (identifier "local_a0") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "undefined1 local_60 [64];" (type_identifier "undefined1") (array_declarator "local_60 [64]" (identifier "local_60") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x123d9;" (assignment_expression "uStack_14 = 0x123d9" (identifier "uStack_14") (= "=") (number_literal "0x123d9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = FUN_00012330(param_2,local_2e0);" (assignment_expression "iVar1 = FUN_00012330(param_2,local_2e0)" (identifier "iVar1") (= "=") (call_expression "FUN_00012330(param_2,local_2e0)" (identifier "FUN_00012330") (argument_list "(param_2,local_2e0)" (( "(") (identifier "param_2") (, ",") (identifier "local_2e0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    __printf_chk(1,"%s: ATA device\n",param_1);\n    if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }\n  }" ({ "{") (expression_statement "__printf_chk(1,"%s: ATA device\n",param_1);" (call_expression "__printf_chk(1,"%s: ATA device\n",param_1)" (identifier "__printf_chk") (argument_list "(1,"%s: ATA device\n",param_1)" (( "(") (number_literal "1") (, ",") (string_literal ""%s: ATA device\n"" (" """) (string_content "%s: ATA device") (escape_sequence "\n") (" """)) (, ",") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (param_3 != '\0') {\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" (if "if") (parenthesized_expression "(param_3 != '\0')" (( "(") (binary_expression "param_3 != '\0'" (identifier "param_3") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      __printf_chk(1,&DAT_000130ca,param_1);\n      FUN_000122d0(local_e0,local_2aa,0x28);\n      FUN_000122d0(local_a0,local_2cc,0x14);\n      FUN_000122d0(local_60,local_2b2,8);\n      putchar(10);\n    }" ({ "{") (expression_statement "__printf_chk(1,&DAT_000130ca,param_1);" (call_expression "__printf_chk(1,&DAT_000130ca,param_1)" (identifier "__printf_chk") (argument_list "(1,&DAT_000130ca,param_1)" (( "(") (number_literal "1") (, ",") (pointer_expression "&DAT_000130ca" (& "&") (identifier "DAT_000130ca")) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_000122d0(local_e0,local_2aa,0x28);" (call_expression "FUN_000122d0(local_e0,local_2aa,0x28)" (identifier "FUN_000122d0") (argument_list "(local_e0,local_2aa,0x28)" (( "(") (identifier "local_e0") (, ",") (identifier "local_2aa") (, ",") (number_literal "0x28") () ")"))) (; ";")) (expression_statement "FUN_000122d0(local_a0,local_2cc,0x14);" (call_expression "FUN_000122d0(local_a0,local_2cc,0x14)" (identifier "FUN_000122d0") (argument_list "(local_a0,local_2cc,0x14)" (( "(") (identifier "local_a0") (, ",") (identifier "local_2cc") (, ",") (number_literal "0x14") () ")"))) (; ";")) (expression_statement "FUN_000122d0(local_60,local_2b2,8);" (call_expression "FUN_000122d0(local_60,local_2b2,8)" (identifier "FUN_000122d0") (argument_list "(local_60,local_2b2,8)" (( "(") (identifier "local_60") (, ",") (identifier "local_2b2") (, ",") (number_literal "8") () ")"))) (; ";")) (expression_statement "putchar(10);" (call_expression "putchar(10)" (identifier "putchar") (argument_list "(10)" (( "(") (number_literal "10") () ")"))) (; ";")) (} "}"))) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "FUN_00012540();" (call_expression "FUN_00012540()" (identifier "FUN_00012540") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(char *file_namep,int ata_fd,type_1 do_inq)

{
  int var_7;
  int var_3;
  int var_1;
  type_2 ata_ident;
  char model [64];
  char serial [64];
  char firm [64];
  
  var_7 = *(int *)(var_1 + 0x14);
  var_3 = var_2(ata_fd,(char *)&ata_ident);
  if (var_3 == 0) {
    var_4(1,"%s: ATA device\n",file_namep);
    if (do_inq) {
      var_4(1,&DAT_000130ca,file_namep);
      var_5(model,(char *)ata_ident.model,0x28);
      var_5(serial,(char *)ata_ident.serial_no,0x14);
      var_5(firm,(char *)ata_ident.fw_rev,8);
      var_6(10);
    }
  }
  if (var_7 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_8();
}


(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

int MASKED(undefined4 param_1,undefined4 param_2,char param_3)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined1 local_2e0 [20];
  undefined1 local_2cc [26];
  undefined1 local_2b2 [8];
  undefined1 local_2aa [458];
  undefined1 local_e0 [64];
  undefined1 local_a0 [64];
  undefined1 local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x123d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = FUN_00012330(param_2,local_2e0);
  if (iVar1 == 0) {
    __printf_chk(1,"%s: ATA device\n",param_1);
    if (param_3 != '\0') {
      __printf_chk(1,&DAT_000130ca,param_1);
      FUN_000122d0(local_e0,local_2aa,0x28);
      FUN_000122d0(local_a0,local_2cc,0x14);
      FUN_000122d0(local_60,local_2b2,8);
      putchar(10);
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00012540();
}

