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

int disk_error_recovery(mpage_info *mpi,char *prefix)

{
  int iVar1;
  int iVar2;
  char *pcVar3;
  int in_GS_OFFSET;
  uint8_t **in_stack_ffffffd4;
  uint8_t *pagestart;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1805e;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4);
  if (iVar2 != 0) goto LAB_0001824b;
  if (*prefix == '\0') {
    if (x_interface == '\0' && replace == '\0') {
LAB_00018290:
      iVar1 = mpi->page;
      pcVar3 = get_page_name(mpi);
      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);
      puts("-----------------------------------------");
    }
  }
  else {
    __printf_chk(1,&DAT_0001b192,prefix);
    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;
  }
  bitfield(pagestart + 2,"AWRE",1,7);
  bitfield(pagestart + 2,"ARRE",1,6);
  bitfield(pagestart + 2,"TB",1,5);
  bitfield(pagestart + 2,"RC",1,4);
  bitfield(pagestart + 2,"EER",1,3);
  bitfield(pagestart + 2,"PER",1,2);
  bitfield(pagestart + 2,"DTE",1,1);
  bitfield(pagestart + 2,"DCR",1,0);
  intfield(pagestart + 3,1,"Read Retry Count");
  intfield(pagestart + 4,1,"Correction Span");
  intfield(pagestart + 5,1,"Head Offset Count");
  intfield(pagestart + 6,1,"Data Strobe Offset Count");
  intfield(pagestart + 8,1,"Write Retry Count");
  intfield(pagestart + 10,2,"Recovery Time Limit (ms)");
  if ((x_interface == '\0') || (replace == '\0')) {
    putchar(10);
  }
  else {
    iVar2 = put_mode_page(mpi,cbuffer);
  }
LAB_0001824b:
  if (local_20 == *(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_00018050(undefined4 *param_1,char *param_2)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_000158a0();
  if (iVar3 != 0) goto LAB_0001824b;
  if (*param_2 == '\0') {
    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {
LAB_00018290:
      uVar2 = *param_1;
      uVar4 = FUN_000150d0();
      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);
      puts("-----------------------------------------");
    }
  }
  else {
    __printf_chk(1,&DAT_0001b192,param_2);
    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;
  }
  FUN_00013eb0(7);
  FUN_00013eb0(6);
  FUN_00013eb0(5);
  FUN_00013eb0(4);
  FUN_00013eb0(3);
  FUN_00013eb0(2);
  FUN_00013eb0(1);
  FUN_00013eb0(0);
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {
    putchar(10);
  }
  else {
    iVar3 = FUN_00015160();
  }
LAB_0001824b:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0001add0();
}


PUSH EBP
MOV EDX,0xe
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012900
ADD EBX,0x9ede
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x30]
LEA ECX,[ESP + 0x8]
MOV EBP,dword ptr [ESP + 0x34]
MOV EAX,EDI
CALL 0x000158a0
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x0001824b
CMP byte ptr [EBP],0x0
JNZ 0x00018268
MOVZX EAX,byte ptr [EBX + 0x2882f]
OR AL,byte ptr [EBX + 0x28831]
JZ 0x00018290
MOV EAX,dword ptr [ESP + 0x8]
SUB ESP,0xc
MOV ECX,0x1
LEA EDX,[EBX + 0xffff973e]
PUSH 0x7
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff9743]
MOV dword ptr [ESP],0x6
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff9748]
MOV dword ptr [ESP],0x5
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff9b49]
MOV dword ptr [ESP],0x4
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff94df]
MOV dword ptr [ESP],0x3
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff94e3]
MOV dword ptr [ESP],0x2
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff94e7]
MOV dword ptr [ESP],0x1
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
MOV ECX,0x1
LEA EDX,[EBX + 0xffff94eb]
MOV dword ptr [ESP],0x0
ADD EAX,0x2
CALL 0x00013eb0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff974b]
MOV EDX,0x1
ADD EAX,0x3
CALL 0x00013fe0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff9cb4]
MOV EDX,0x1
ADD EAX,0x4
CALL 0x00013fe0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff9cc4]
MOV EDX,0x1
ADD EAX,0x5
CALL 0x00013fe0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff9cd6]
MOV EDX,0x1
ADD EAX,0x6
CALL 0x00013fe0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff9762]
MOV EDX,0x1
ADD EAX,0x8
CALL 0x00013fe0
MOV EAX,dword ptr [ESP + 0x18]
LEA ECX,[EBX + 0xffff9cef]
MOV EDX,0x2
ADD EAX,0xa
CALL 0x00013fe0
ADD ESP,0x10
CMP byte ptr [EBX + 0x2882f],0x0
JZ 0x0001823e
CMP byte ptr [EBX + 0x28831],0x0
JNZ 0x000182c0
SUB ESP,0xc
PUSH 0xa
CALL 0x00011180
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0xc]
XOR EDI,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x000182d4
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xffff9256]
PUSH EBP
PUSH EAX
PUSH 0x1
CALL 0x000111b0
ADD ESP,0x10
MOVZX EAX,byte ptr [EBX + 0x2882f]
OR AL,byte ptr [EBX + 0x28831]
JNZ 0x000180ad
MOV EBP,dword ptr [EDI]
MOV EAX,EDI
CALL 0x000150d0
PUSH EBP
PUSH EAX
LEA EAX,[EBX + 0xffff9312]
PUSH EAX
PUSH 0x1
CALL 0x000111b0
LEA EAX,[EBX + 0xffffc080]
MOV dword ptr [ESP],EAX
CALL 0x000110f0
ADD ESP,0x10
JMP 0x000180ad
LEA EDX,[EBX + 0x30844]
MOV EAX,EDI
CALL 0x00015160
MOV ESI,EAX
JMP 0x0001824b
CALL 0x0001add0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00018050(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0001add0();\n}\n\n" comment (function_definition "int FUN_00018050(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0001add0();\n}" primitive_type (function_declarator "FUN_00018050(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0001add0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (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 "iVar3 = FUN_000158a0();" (assignment_expression "iVar3 = FUN_000158a0()" identifier = (call_expression "FUN_000158a0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) goto LAB_0001824b;" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001824b;" goto statement_identifier ;)) (if_statement "if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" if (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }" { (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" if (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (compound_statement "{\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" { (labeled_statement "LAB_00018290:\n      uVar2 = *param_1;" statement_identifier : (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "uVar4 = FUN_000150d0();" (assignment_expression "uVar4 = FUN_000150d0()" identifier = (call_expression "FUN_000150d0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);" (call_expression "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2)" identifier (argument_list "(1,"%s mode page (0x%x)\n",uVar4,uVar2)" ( number_literal , (string_literal ""%s mode page (0x%x)\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puts("-----------------------------------------");" (call_expression "puts("-----------------------------------------")" identifier (argument_list "("-----------------------------------------")" ( (string_literal ""-----------------------------------------"" " string_content ") ))) ;) })) }) (else_clause "else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" else (compound_statement "{\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" { (expression_statement "__printf_chk(1,&DAT_0001b192,param_2);" (call_expression "__printf_chk(1,&DAT_0001b192,param_2)" identifier (argument_list "(1,&DAT_0001b192,param_2)" ( number_literal , (pointer_expression "&DAT_0001b192" & identifier) , identifier ))) ;) (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;" if (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (goto_statement "goto LAB_00018290;" goto statement_identifier ;)) }))) (expression_statement "FUN_00013eb0(7);" (call_expression "FUN_00013eb0(7)" identifier (argument_list "(7)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(6);" (call_expression "FUN_00013eb0(6)" identifier (argument_list "(6)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(5);" (call_expression "FUN_00013eb0(5)" identifier (argument_list "(5)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(4);" (call_expression "FUN_00013eb0(4)" identifier (argument_list "(4)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(3);" (call_expression "FUN_00013eb0(3)" identifier (argument_list "(3)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(2);" (call_expression "FUN_00013eb0(2)" identifier (argument_list "(2)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(1);" (call_expression "FUN_00013eb0(1)" identifier (argument_list "(1)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(0);" (call_expression "FUN_00013eb0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (if_statement "if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }" if (parenthesized_expression "((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0'))" ( (binary_expression "(DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')" (parenthesized_expression "(DAT_0004a76b == '\0')" ( (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    putchar(10);\n  }" { (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) }) (else_clause "else {\n    iVar3 = FUN_00015160();\n  }" else (compound_statement "{\n    iVar3 = FUN_00015160();\n  }" { (expression_statement "iVar3 = FUN_00015160();" (assignment_expression "iVar3 = FUN_00015160()" identifier = (call_expression "FUN_00015160()" identifier (argument_list "()" ( )))) ;) }))) (labeled_statement "LAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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 iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "FUN_0001add0();" (call_expression "FUN_0001add0()" 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 disk_error_recovery(mpage_info *mpi,char *prefix)\n\n{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  int in_GS_OFFSET;\n  uint8_t **in_stack_ffffffd4;\n  uint8_t *pagestart;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1805e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4);\n  if (iVar2 != 0) goto LAB_0001824b;\n  if (*prefix == '\0') {\n    if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }\n  bitfield(pagestart + 2,"AWRE",1,7);\n  bitfield(pagestart + 2,"ARRE",1,6);\n  bitfield(pagestart + 2,"TB",1,5);\n  bitfield(pagestart + 2,"RC",1,4);\n  bitfield(pagestart + 2,"EER",1,3);\n  bitfield(pagestart + 2,"PER",1,2);\n  bitfield(pagestart + 2,"DTE",1,1);\n  bitfield(pagestart + 2,"DCR",1,0);\n  intfield(pagestart + 3,1,"Read Retry Count");\n  intfield(pagestart + 4,1,"Correction Span");\n  intfield(pagestart + 5,1,"Head Offset Count");\n  intfield(pagestart + 6,1,"Data Strobe Offset Count");\n  intfield(pagestart + 8,1,"Write Retry Count");\n  intfield(pagestart + 10,2,"Recovery Time Limit (ms)");\n  if ((x_interface == '\0') || (replace == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }\nLAB_0001824b:\n  if (local_20 == *(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 disk_error_recovery(mpage_info *mpi,char *prefix)\n\n{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  int in_GS_OFFSET;\n  uint8_t **in_stack_ffffffd4;\n  uint8_t *pagestart;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1805e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4);\n  if (iVar2 != 0) goto LAB_0001824b;\n  if (*prefix == '\0') {\n    if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }\n  bitfield(pagestart + 2,"AWRE",1,7);\n  bitfield(pagestart + 2,"ARRE",1,6);\n  bitfield(pagestart + 2,"TB",1,5);\n  bitfield(pagestart + 2,"RC",1,4);\n  bitfield(pagestart + 2,"EER",1,3);\n  bitfield(pagestart + 2,"PER",1,2);\n  bitfield(pagestart + 2,"DTE",1,1);\n  bitfield(pagestart + 2,"DCR",1,0);\n  intfield(pagestart + 3,1,"Read Retry Count");\n  intfield(pagestart + 4,1,"Correction Span");\n  intfield(pagestart + 5,1,"Head Offset Count");\n  intfield(pagestart + 6,1,"Data Strobe Offset Count");\n  intfield(pagestart + 8,1,"Write Retry Count");\n  intfield(pagestart + 10,2,"Recovery Time Limit (ms)");\n  if ((x_interface == '\0') || (replace == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }\nLAB_0001824b:\n  if (local_20 == *(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 "disk_error_recovery(mpage_info *mpi,char *prefix)" identifier (parameter_list "(mpage_info *mpi,char *prefix)" ( (parameter_declaration "mpage_info *mpi" type_identifier (pointer_declarator "*mpi" * identifier)) , (parameter_declaration "char *prefix" primitive_type (pointer_declarator "*prefix" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  char *pcVar3;\n  int in_GS_OFFSET;\n  uint8_t **in_stack_ffffffd4;\n  uint8_t *pagestart;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1805e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4);\n  if (iVar2 != 0) goto LAB_0001824b;\n  if (*prefix == '\0') {\n    if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }\n  bitfield(pagestart + 2,"AWRE",1,7);\n  bitfield(pagestart + 2,"ARRE",1,6);\n  bitfield(pagestart + 2,"TB",1,5);\n  bitfield(pagestart + 2,"RC",1,4);\n  bitfield(pagestart + 2,"EER",1,3);\n  bitfield(pagestart + 2,"PER",1,2);\n  bitfield(pagestart + 2,"DTE",1,1);\n  bitfield(pagestart + 2,"DCR",1,0);\n  intfield(pagestart + 3,1,"Read Retry Count");\n  intfield(pagestart + 4,1,"Correction Span");\n  intfield(pagestart + 5,1,"Head Offset Count");\n  intfield(pagestart + 6,1,"Data Strobe Offset Count");\n  intfield(pagestart + 8,1,"Write Retry Count");\n  intfield(pagestart + 10,2,"Recovery Time Limit (ms)");\n  if ((x_interface == '\0') || (replace == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }\nLAB_0001824b:\n  if (local_20 == *(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 "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint8_t **in_stack_ffffffd4;" primitive_type (pointer_declarator "**in_stack_ffffffd4" * (pointer_declarator "*in_stack_ffffffd4" * identifier)) ;) (declaration "uint8_t *pagestart;" primitive_type (pointer_declarator "*pagestart" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1805e;" (assignment_expression "uStack_14 = 0x1805e" 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 "iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4);" (assignment_expression "iVar2 = setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4)" identifier = (call_expression "setup_mode_page(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4)" identifier (argument_list "(mpi,0xe,(uint8_t *)&pagestart,in_stack_ffffffd4)" ( identifier , number_literal , (cast_expression "(uint8_t *)&pagestart" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pagestart" & identifier)) , identifier )))) ;) (if_statement "if (iVar2 != 0) goto LAB_0001824b;" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001824b;" goto statement_identifier ;)) (if_statement "if (*prefix == '\0') {\n    if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }" if (parenthesized_expression "(*prefix == '\0')" ( (binary_expression "*prefix == '\0'" (pointer_expression "*prefix" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }\n  }" { (if_statement "if (x_interface == '\0' && replace == '\0') {\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }" if (parenthesized_expression "(x_interface == '\0' && replace == '\0')" ( (binary_expression "x_interface == '\0' && replace == '\0'" (binary_expression "x_interface == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "replace == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (compound_statement "{\nLAB_00018290:\n      iVar1 = mpi->page;\n      pcVar3 = get_page_name(mpi);\n      __printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);\n      puts("-----------------------------------------");\n    }" { (labeled_statement "LAB_00018290:\n      iVar1 = mpi->page;" statement_identifier : (expression_statement "iVar1 = mpi->page;" (assignment_expression "iVar1 = mpi->page" identifier = (field_expression "mpi->page" identifier -> field_identifier)) ;)) (expression_statement "pcVar3 = get_page_name(mpi);" (assignment_expression "pcVar3 = get_page_name(mpi)" identifier = (call_expression "get_page_name(mpi)" identifier (argument_list "(mpi)" ( identifier )))) ;) (expression_statement "__printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1);" (call_expression "__printf_chk(1,"%s mode page (0x%x)\n",pcVar3,iVar1)" identifier (argument_list "(1,"%s mode page (0x%x)\n",pcVar3,iVar1)" ( number_literal , (string_literal ""%s mode page (0x%x)\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puts("-----------------------------------------");" (call_expression "puts("-----------------------------------------")" identifier (argument_list "("-----------------------------------------")" ( (string_literal ""-----------------------------------------"" " string_content ") ))) ;) })) }) (else_clause "else {\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }" else (compound_statement "{\n    __printf_chk(1,&DAT_0001b192,prefix);\n    if (x_interface == '\0' && replace == '\0') goto LAB_00018290;\n  }" { (expression_statement "__printf_chk(1,&DAT_0001b192,prefix);" (call_expression "__printf_chk(1,&DAT_0001b192,prefix)" identifier (argument_list "(1,&DAT_0001b192,prefix)" ( number_literal , (pointer_expression "&DAT_0001b192" & identifier) , identifier ))) ;) (if_statement "if (x_interface == '\0' && replace == '\0') goto LAB_00018290;" if (parenthesized_expression "(x_interface == '\0' && replace == '\0')" ( (binary_expression "x_interface == '\0' && replace == '\0'" (binary_expression "x_interface == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "replace == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (goto_statement "goto LAB_00018290;" goto statement_identifier ;)) }))) (expression_statement "bitfield(pagestart + 2,"AWRE",1,7);" (call_expression "bitfield(pagestart + 2,"AWRE",1,7)" identifier (argument_list "(pagestart + 2,"AWRE",1,7)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""AWRE"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"ARRE",1,6);" (call_expression "bitfield(pagestart + 2,"ARRE",1,6)" identifier (argument_list "(pagestart + 2,"ARRE",1,6)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""ARRE"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"TB",1,5);" (call_expression "bitfield(pagestart + 2,"TB",1,5)" identifier (argument_list "(pagestart + 2,"TB",1,5)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""TB"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"RC",1,4);" (call_expression "bitfield(pagestart + 2,"RC",1,4)" identifier (argument_list "(pagestart + 2,"RC",1,4)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""RC"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"EER",1,3);" (call_expression "bitfield(pagestart + 2,"EER",1,3)" identifier (argument_list "(pagestart + 2,"EER",1,3)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""EER"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"PER",1,2);" (call_expression "bitfield(pagestart + 2,"PER",1,2)" identifier (argument_list "(pagestart + 2,"PER",1,2)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""PER"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"DTE",1,1);" (call_expression "bitfield(pagestart + 2,"DTE",1,1)" identifier (argument_list "(pagestart + 2,"DTE",1,1)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""DTE"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "bitfield(pagestart + 2,"DCR",1,0);" (call_expression "bitfield(pagestart + 2,"DCR",1,0)" identifier (argument_list "(pagestart + 2,"DCR",1,0)" ( (binary_expression "pagestart + 2" identifier + number_literal) , (string_literal ""DCR"" " string_content ") , number_literal , number_literal ))) ;) (expression_statement "intfield(pagestart + 3,1,"Read Retry Count");" (call_expression "intfield(pagestart + 3,1,"Read Retry Count")" identifier (argument_list "(pagestart + 3,1,"Read Retry Count")" ( (binary_expression "pagestart + 3" identifier + number_literal) , number_literal , (string_literal ""Read Retry Count"" " string_content ") ))) ;) (expression_statement "intfield(pagestart + 4,1,"Correction Span");" (call_expression "intfield(pagestart + 4,1,"Correction Span")" identifier (argument_list "(pagestart + 4,1,"Correction Span")" ( (binary_expression "pagestart + 4" identifier + number_literal) , number_literal , (string_literal ""Correction Span"" " string_content ") ))) ;) (expression_statement "intfield(pagestart + 5,1,"Head Offset Count");" (call_expression "intfield(pagestart + 5,1,"Head Offset Count")" identifier (argument_list "(pagestart + 5,1,"Head Offset Count")" ( (binary_expression "pagestart + 5" identifier + number_literal) , number_literal , (string_literal ""Head Offset Count"" " string_content ") ))) ;) (expression_statement "intfield(pagestart + 6,1,"Data Strobe Offset Count");" (call_expression "intfield(pagestart + 6,1,"Data Strobe Offset Count")" identifier (argument_list "(pagestart + 6,1,"Data Strobe Offset Count")" ( (binary_expression "pagestart + 6" identifier + number_literal) , number_literal , (string_literal ""Data Strobe Offset Count"" " string_content ") ))) ;) (expression_statement "intfield(pagestart + 8,1,"Write Retry Count");" (call_expression "intfield(pagestart + 8,1,"Write Retry Count")" identifier (argument_list "(pagestart + 8,1,"Write Retry Count")" ( (binary_expression "pagestart + 8" identifier + number_literal) , number_literal , (string_literal ""Write Retry Count"" " string_content ") ))) ;) (expression_statement "intfield(pagestart + 10,2,"Recovery Time Limit (ms)");" (call_expression "intfield(pagestart + 10,2,"Recovery Time Limit (ms)")" identifier (argument_list "(pagestart + 10,2,"Recovery Time Limit (ms)")" ( (binary_expression "pagestart + 10" identifier + number_literal) , number_literal , (string_literal ""Recovery Time Limit (ms)"" " string_content ") ))) ;) (if_statement "if ((x_interface == '\0') || (replace == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }" if (parenthesized_expression "((x_interface == '\0') || (replace == '\0'))" ( (binary_expression "(x_interface == '\0') || (replace == '\0')" (parenthesized_expression "(x_interface == '\0')" ( (binary_expression "x_interface == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(replace == '\0')" ( (binary_expression "replace == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    putchar(10);\n  }" { (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) }) (else_clause "else {\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }" else (compound_statement "{\n    iVar2 = put_mode_page(mpi,cbuffer);\n  }" { (expression_statement "iVar2 = put_mode_page(mpi,cbuffer);" (assignment_expression "iVar2 = put_mode_page(mpi,cbuffer)" identifier = (call_expression "put_mode_page(mpi,cbuffer)" identifier (argument_list "(mpi,cbuffer)" ( identifier , identifier )))) ;) }))) (labeled_statement "LAB_0001824b:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\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 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_00018050(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0001add0();\n}\n\n" (function_definition "int FUN_00018050(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0001add0();\n}" primitive_type (function_declarator "FUN_00018050(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0001add0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (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 "iVar3 = FUN_000158a0();" (assignment_expression "iVar3 = FUN_000158a0()" identifier = (call_expression "FUN_000158a0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) goto LAB_0001824b;" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0001824b;" goto statement_identifier ;)) (if_statement "if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" if (parenthesized_expression "(*param_2 == '\0')" ( (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }" { (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" if (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (compound_statement "{\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" { (labeled_statement "LAB_00018290:\n      uVar2 = *param_1;" statement_identifier : (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;)) (expression_statement "uVar4 = FUN_000150d0();" (assignment_expression "uVar4 = FUN_000150d0()" identifier = (call_expression "FUN_000150d0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);" (call_expression "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2)" identifier (argument_list "(1,"%s mode page (0x%x)\n",uVar4,uVar2)" ( number_literal , (string_literal ""%s mode page (0x%x)\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "puts("-----------------------------------------");" (call_expression "puts("-----------------------------------------")" identifier (argument_list "("-----------------------------------------")" ( (string_literal ""-----------------------------------------"" " string_content ") ))) ;) })) }) (else_clause "else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" else (compound_statement "{\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" { (expression_statement "__printf_chk(1,&DAT_0001b192,param_2);" (call_expression "__printf_chk(1,&DAT_0001b192,param_2)" identifier (argument_list "(1,&DAT_0001b192,param_2)" ( number_literal , (pointer_expression "&DAT_0001b192" & identifier) , identifier ))) ;) (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;" if (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) && (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) )) (goto_statement "goto LAB_00018290;" goto statement_identifier ;)) }))) (expression_statement "FUN_00013eb0(7);" (call_expression "FUN_00013eb0(7)" identifier (argument_list "(7)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(6);" (call_expression "FUN_00013eb0(6)" identifier (argument_list "(6)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(5);" (call_expression "FUN_00013eb0(5)" identifier (argument_list "(5)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(4);" (call_expression "FUN_00013eb0(4)" identifier (argument_list "(4)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(3);" (call_expression "FUN_00013eb0(3)" identifier (argument_list "(3)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(2);" (call_expression "FUN_00013eb0(2)" identifier (argument_list "(2)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(1);" (call_expression "FUN_00013eb0(1)" identifier (argument_list "(1)" ( number_literal ))) ;) (expression_statement "FUN_00013eb0(0);" (call_expression "FUN_00013eb0(0)" identifier (argument_list "(0)" ( number_literal ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" identifier (argument_list "()" ( ))) ;) (if_statement "if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }" if (parenthesized_expression "((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0'))" ( (binary_expression "(DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')" (parenthesized_expression "(DAT_0004a76b == '\0')" ( (binary_expression "DAT_0004a76b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) || (parenthesized_expression "(DAT_0004a76d == '\0')" ( (binary_expression "DAT_0004a76d == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    putchar(10);\n  }" { (expression_statement "putchar(10);" (call_expression "putchar(10)" identifier (argument_list "(10)" ( number_literal ))) ;) }) (else_clause "else {\n    iVar3 = FUN_00015160();\n  }" else (compound_statement "{\n    iVar3 = FUN_00015160();\n  }" { (expression_statement "iVar3 = FUN_00015160();" (assignment_expression "iVar3 = FUN_00015160()" identifier = (call_expression "FUN_00015160()" identifier (argument_list "()" ( )))) ;) }))) (labeled_statement "LAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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 iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) (expression_statement "FUN_0001add0();" (call_expression "FUN_0001add0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (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 ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT == (char_literal ' escape_sequence ')) && (binary_expression IDENT == (char_literal ' escape_sequence '))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT == (char_literal ' escape_sequence ')) && (binary_expression IDENT == (char_literal ' escape_sequence '))) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) || (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }))) (labeled_statement statement_identifier : (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_00018050(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0001add0();\n}" (primitive_type "int") (function_declarator "FUN_00018050(undefined4 *param_1,char *param_2)" (identifier "FUN_00018050") (parameter_list "(undefined4 *param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158a0();\n  if (iVar3 != 0) goto LAB_0001824b;\n  if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }\n  FUN_00013eb0(7);\n  FUN_00013eb0(6);\n  FUN_00013eb0(5);\n  FUN_00013eb0(4);\n  FUN_00013eb0(3);\n  FUN_00013eb0(2);\n  FUN_00013eb0(1);\n  FUN_00013eb0(0);\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  FUN_00013fe0();\n  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }\nLAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0001add0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (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 "iVar3 = FUN_000158a0();" (assignment_expression "iVar3 = FUN_000158a0()" (identifier "iVar3") (= "=") (call_expression "FUN_000158a0()" (identifier "FUN_000158a0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) goto LAB_0001824b;" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0001824b;" (goto "goto") (statement_identifier "LAB_0001824b") (; ";"))) (if_statement "if (*param_2 == '\0') {\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }\n  else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" (if "if") (parenthesized_expression "(*param_2 == '\0')" (( "(") (binary_expression "*param_2 == '\0'" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }\n  }" ({ "{") (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" (if "if") (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" (( "(") (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" (identifier "DAT_0004a76b") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (&& "&&") (binary_expression "DAT_0004a76d == '\0'" (identifier "DAT_0004a76d") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")")) (compound_statement "{\nLAB_00018290:\n      uVar2 = *param_1;\n      uVar4 = FUN_000150d0();\n      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);\n      puts("-----------------------------------------");\n    }" ({ "{") (labeled_statement "LAB_00018290:\n      uVar2 = *param_1;" (statement_identifier "LAB_00018290") (: ":") (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";"))) (expression_statement "uVar4 = FUN_000150d0();" (assignment_expression "uVar4 = FUN_000150d0()" (identifier "uVar4") (= "=") (call_expression "FUN_000150d0()" (identifier "FUN_000150d0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);" (call_expression "__printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2)" (identifier "__printf_chk") (argument_list "(1,"%s mode page (0x%x)\n",uVar4,uVar2)" (( "(") (number_literal "1") (, ",") (string_literal ""%s mode page (0x%x)\n"" (" """) (string_content "%s mode page (0x%x)") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar4") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "puts("-----------------------------------------");" (call_expression "puts("-----------------------------------------")" (identifier "puts") (argument_list "("-----------------------------------------")" (( "(") (string_literal ""-----------------------------------------"" (" """) (string_content "-----------------------------------------") (" """)) () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" (else "else") (compound_statement "{\n    __printf_chk(1,&DAT_0001b192,param_2);\n    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;\n  }" ({ "{") (expression_statement "__printf_chk(1,&DAT_0001b192,param_2);" (call_expression "__printf_chk(1,&DAT_0001b192,param_2)" (identifier "__printf_chk") (argument_list "(1,&DAT_0001b192,param_2)" (( "(") (number_literal "1") (, ",") (pointer_expression "&DAT_0001b192" (& "&") (identifier "DAT_0001b192")) (, ",") (identifier "param_2") () ")"))) (; ";")) (if_statement "if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;" (if "if") (parenthesized_expression "(DAT_0004a76b == '\0' && DAT_0004a76d == '\0')" (( "(") (binary_expression "DAT_0004a76b == '\0' && DAT_0004a76d == '\0'" (binary_expression "DAT_0004a76b == '\0'" (identifier "DAT_0004a76b") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (&& "&&") (binary_expression "DAT_0004a76d == '\0'" (identifier "DAT_0004a76d") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")")) (goto_statement "goto LAB_00018290;" (goto "goto") (statement_identifier "LAB_00018290") (; ";"))) (} "}")))) (expression_statement "FUN_00013eb0(7);" (call_expression "FUN_00013eb0(7)" (identifier "FUN_00013eb0") (argument_list "(7)" (( "(") (number_literal "7") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(6);" (call_expression "FUN_00013eb0(6)" (identifier "FUN_00013eb0") (argument_list "(6)" (( "(") (number_literal "6") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(5);" (call_expression "FUN_00013eb0(5)" (identifier "FUN_00013eb0") (argument_list "(5)" (( "(") (number_literal "5") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(4);" (call_expression "FUN_00013eb0(4)" (identifier "FUN_00013eb0") (argument_list "(4)" (( "(") (number_literal "4") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(3);" (call_expression "FUN_00013eb0(3)" (identifier "FUN_00013eb0") (argument_list "(3)" (( "(") (number_literal "3") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(2);" (call_expression "FUN_00013eb0(2)" (identifier "FUN_00013eb0") (argument_list "(2)" (( "(") (number_literal "2") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(1);" (call_expression "FUN_00013eb0(1)" (identifier "FUN_00013eb0") (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (expression_statement "FUN_00013eb0(0);" (call_expression "FUN_00013eb0(0)" (identifier "FUN_00013eb0") (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00013fe0();" (call_expression "FUN_00013fe0()" (identifier "FUN_00013fe0") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {\n    putchar(10);\n  }\n  else {\n    iVar3 = FUN_00015160();\n  }" (if "if") (parenthesized_expression "((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0'))" (( "(") (binary_expression "(DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')" (parenthesized_expression "(DAT_0004a76b == '\0')" (( "(") (binary_expression "DAT_0004a76b == '\0'" (identifier "DAT_0004a76b") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (|| "||") (parenthesized_expression "(DAT_0004a76d == '\0')" (( "(") (binary_expression "DAT_0004a76d == '\0'" (identifier "DAT_0004a76d") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    putchar(10);\n  }" ({ "{") (expression_statement "putchar(10);" (call_expression "putchar(10)" (identifier "putchar") (argument_list "(10)" (( "(") (number_literal "10") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    iVar3 = FUN_00015160();\n  }" (else "else") (compound_statement "{\n    iVar3 = FUN_00015160();\n  }" ({ "{") (expression_statement "iVar3 = FUN_00015160();" (assignment_expression "iVar3 = FUN_00015160()" (identifier "iVar3") (= "=") (call_expression "FUN_00015160()" (identifier "FUN_00015160") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (labeled_statement "LAB_0001824b:\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" (statement_identifier "LAB_0001824b") (: ":") (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (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 iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))) (expression_statement "FUN_0001add0();" (call_expression "FUN_0001add0()" (identifier "FUN_0001add0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(type_1 *mpi,char *prefix)

{
  int iVar1;
  int var_3;
  char *pcVar3;
  int var_1;
  uint8_t **in_stack_ffffffd4;
  uint8_t *var_10;
  int var_14;
  type_2 uStack_14;
  
  uStack_14 = 0x1805e;
  var_14 = *(int *)(var_1 + 0x14);
  var_3 = var_2(mpi,0xe,(uint8_t *)&var_10,in_stack_ffffffd4);
  if (var_3 != 0) goto LAB_0001824b;
  if (*prefix == '\0') {
    if (var_4 == '\0' && var_5 == '\0') {
LAB_00018290:
      iVar1 = mpi->page;
      pcVar3 = var_6(mpi);
      var_7(1,"%s mode page (0x%x)\n",pcVar3,iVar1);
      var_8("-----------------------------------------");
    }
  }
  else {
    var_7(1,&DAT_0001b192,prefix);
    if (var_4 == '\0' && var_5 == '\0') goto LAB_00018290;
  }
  var_9(var_10 + 2,"AWRE",1,7);
  var_9(var_10 + 2,"ARRE",1,6);
  var_9(var_10 + 2,"TB",1,5);
  var_9(var_10 + 2,"RC",1,4);
  var_9(var_10 + 2,"EER",1,3);
  var_9(var_10 + 2,"PER",1,2);
  var_9(var_10 + 2,"DTE",1,1);
  var_9(var_10 + 2,"DCR",1,0);
  var_11(var_10 + 3,1,"Read Retry Count");
  var_11(var_10 + 4,1,"Correction Span");
  var_11(var_10 + 5,1,"Head Offset Count");
  var_11(var_10 + 6,1,"Data Strobe Offset Count");
  var_11(var_10 + 8,1,"Write Retry Count");
  var_11(var_10 + 10,2,"Recovery Time Limit (ms)");
  if ((var_4 == '\0') || (var_5 == '\0')) {
    var_12(10);
  }
  else {
    var_3 = var_13(mpi,cbuffer);
  }
LAB_0001824b:
  if (var_14 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_15();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (char_literal (escape_sequence))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (char_literal (escape_sequence))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence))))) consequence: (goto_statement label: (statement_identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) right: (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))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))))))) (labeled_statement label: (statement_identifier) (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,char *param_2)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_000158a0();
  if (iVar3 != 0) goto LAB_0001824b;
  if (*param_2 == '\0') {
    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') {
LAB_00018290:
      uVar2 = *param_1;
      uVar4 = FUN_000150d0();
      __printf_chk(1,"%s mode page (0x%x)\n",uVar4,uVar2);
      puts("-----------------------------------------");
    }
  }
  else {
    __printf_chk(1,&DAT_0001b192,param_2);
    if (DAT_0004a76b == '\0' && DAT_0004a76d == '\0') goto LAB_00018290;
  }
  FUN_00013eb0(7);
  FUN_00013eb0(6);
  FUN_00013eb0(5);
  FUN_00013eb0(4);
  FUN_00013eb0(3);
  FUN_00013eb0(2);
  FUN_00013eb0(1);
  FUN_00013eb0(0);
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  FUN_00013fe0();
  if ((DAT_0004a76b == '\0') || (DAT_0004a76d == '\0')) {
    putchar(10);
  }
  else {
    iVar3 = FUN_00015160();
  }
LAB_0001824b:
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0001add0();
}

