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

int __regparm3 scsi_read_capacity(int sg_fd,int64_t *num_sect,int *sect_sz)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  int in_GS_OFFSET;
  uint8_t rcBuff [32];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0);
  if (iVar2 == 0) {
    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {
      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);
      if (iVar2 == 0) {
        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |
                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;
        *(uint *)num_sect = uVar3 + 1;
        *(uint *)((int)num_sect + 4) =
             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |
              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);
        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |
                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;
      }
    }
    else {
      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |
              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;
      *(uint *)num_sect = uVar3 + 1;
      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);
      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |
                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;
    }
  }
  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 */

void __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  undefined4 local_40;
  uint local_3c;
  uint local_38;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1464d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);
  if (iVar1 == 0) {
    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {
      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);
      if (iVar1 == 0) {
        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |
                local_3c << 0x18;
        *param_2 = uVar2 + 1;
        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |
                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);
        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |
                   local_38 << 0x18;
      }
    }
    else {
      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |
              local_40 << 0x18;
      *param_2 = uVar2 + 1;
      param_2[1] = (uint)(0xfffffffe < uVar2);
      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |
                 local_3c << 0x18;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000162f0();
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00013920
ADD EBX,0x68b7
SUB ESP,0x50
MOV dword ptr [ESP + 0x10],ECX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x40],EAX
XOR EAX,EAX
PUSH 0x0
PUSH 0x0
PUSH 0x8
LEA EBP,[ESP + 0x2c]
PUSH EBP
PUSH 0x0
PUSH 0x0
PUSH EDI
CALL 0x00011070
ADD ESP,0x20
TEST EAX,EAX
JNZ 0x000146b7
MOVZX EDX,byte ptr [ESP + 0x1c]
AND DL,byte ptr [ESP + 0x1d]
AND DL,byte ptr [ESP + 0x1e]
AND DL,byte ptr [ESP + 0x1f]
ADD DL,0x1
JZ 0x000146cc
MOV ECX,dword ptr [ESP + 0x1c]
XOR EBX,EBX
MOV EDX,dword ptr [ESP + 0x20]
BSWAP ECX
ADD ECX,0x1
BSWAP EDX
ADC EBX,0x0
MOV dword ptr [ESI],ECX
MOV dword ptr [ESI + 0x4],EBX
MOV ESI,dword ptr [ESP + 0xc]
MOV dword ptr [ESI],EDX
MOV EDI,dword ptr [ESP + 0x3c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x0001470f
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
PUSH 0x0
PUSH 0x0
PUSH 0x20
PUSH EBP
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH EDI
CALL 0x00011080
ADD ESP,0x20
TEST EAX,EAX
JNZ 0x000146b7
MOV EDX,dword ptr [ESP + 0x20]
BSWAP EDX
MOV ECX,EDX
MOV EDX,dword ptr [ESP + 0x1c]
ADD ECX,0x1
BSWAP EDX
MOV EBX,EDX
MOV dword ptr [ESI],ECX
MOV EDX,dword ptr [ESP + 0x24]
ADC EBX,0x0
MOV dword ptr [ESI + 0x4],EBX
MOV ESI,dword ptr [ESP + 0xc]
BSWAP EDX
MOV dword ptr [ESI],EDX
JMP 0x000146b7
CALL 0x000162f0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000162f0();\n}\n\n" comment (function_definition "void __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000162f0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,uint *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000162f0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "uint local_3c;" type_identifier identifier ;) (declaration "uint local_38;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1464d;" (assignment_expression "uStack_14 = 0x1464d" 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 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" identifier = (call_expression "sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" identifier (argument_list "(param_1,0,0,&local_40,8,0,0)" ( identifier , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" { (if_statement "if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" if (parenthesized_expression "(((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff)" ( (binary_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff" (parenthesized_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_)" ( (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_" (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_" (binary_expression "(byte)local_40 & local_40._1_1_" (cast_expression "(byte)local_40" ( (type_descriptor "byte" type_identifier) ) identifier) & (field_expression "local_40._1_1_" identifier . field_identifier)) & (field_expression "local_40._2_1_" identifier . field_identifier)) & (field_expression "local_40._3_1_" identifier . field_identifier)) )) == number_literal) )) (compound_statement "{\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }" { (expression_statement "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" identifier = (call_expression "sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" identifier (argument_list "(param_1,0,0,0,&local_40,0x20,0,0)" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" { (expression_statement "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;" (assignment_expression "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" identifier = (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" identifier >> number_literal) | (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" ( (binary_expression "local_3c & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" ( (binary_expression "local_3c & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_3c << 0x18" identifier << number_literal))) ;) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (parenthesized_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18)" ( (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" identifier >> number_literal) | (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" ( (binary_expression "local_40 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" ( (binary_expression "local_40 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_40 << 0x18" identifier << number_literal)) )) + (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) ))))) ;) (expression_statement "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;" (assignment_expression "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (pointer_expression "*param_3" * identifier) = (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8" (binary_expression "local_38 >> 0x18" identifier >> number_literal) | (binary_expression "(local_38 & 0xff0000) >> 8" (parenthesized_expression "(local_38 & 0xff0000)" ( (binary_expression "local_38 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_38 & 0xff00) << 8" (parenthesized_expression "(local_38 & 0xff00)" ( (binary_expression "local_38 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_38 << 0x18" identifier << number_literal))) ;) })) }) (else_clause "else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" else (compound_statement "{\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" { (expression_statement "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;" (assignment_expression "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" identifier = (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" identifier >> number_literal) | (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" ( (binary_expression "local_40 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" ( (binary_expression "local_40 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_40 << 0x18" identifier << number_literal))) ;) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_2[1] = (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) )))) ;) (expression_statement "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;" (assignment_expression "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (pointer_expression "*param_3" * identifier) = (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" identifier >> number_literal) | (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" ( (binary_expression "local_3c & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" ( (binary_expression "local_3c & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_3c << 0x18" identifier << number_literal))) ;) }))) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000162f0();" (call_expression "FUN_000162f0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 scsi_read_capacity(int sg_fd,int64_t *num_sect,int *sect_sz)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint8_t rcBuff [32];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0);\n  if (iVar2 == 0) {\n    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\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 (function_definition "int __regparm3 scsi_read_capacity(int sg_fd,int64_t *num_sect,int *sect_sz)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint8_t rcBuff [32];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0);\n  if (iVar2 == 0) {\n    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\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 (ERROR "__regparm3" identifier) (function_declarator "scsi_read_capacity(int sg_fd,int64_t *num_sect,int *sect_sz)" identifier (parameter_list "(int sg_fd,int64_t *num_sect,int *sect_sz)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "int64_t *num_sect" primitive_type (pointer_declarator "*num_sect" * identifier)) , (parameter_declaration "int *sect_sz" primitive_type (pointer_declarator "*sect_sz" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint8_t rcBuff [32];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0);\n  if (iVar2 == 0) {\n    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\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 "uint uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint8_t rcBuff [32];" primitive_type (array_declarator "rcBuff [32]" 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 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0);" (assignment_expression "iVar2 = sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0)" identifier = (call_expression "sg_ll_readcap_10(sg_fd,0,0,rcBuff,8,0,0)" identifier (argument_list "(sg_fd,0,0,rcBuff,8,0,0)" ( identifier , number_literal , number_literal , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n    }\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n    }\n  }" { (if_statement "if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }\n    else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n    }" if (parenthesized_expression "((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff)" ( (binary_expression "(rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff" (parenthesized_expression "(rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3])" ( (binary_expression "rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]" (binary_expression "rcBuff[0] & rcBuff[1] & rcBuff[2]" (binary_expression "rcBuff[0] & rcBuff[1]" (subscript_expression "rcBuff[0]" identifier [ number_literal ]) & (subscript_expression "rcBuff[1]" identifier [ number_literal ])) & (subscript_expression "rcBuff[2]" identifier [ number_literal ])) & (subscript_expression "rcBuff[3]" identifier [ number_literal ])) )) == number_literal) )) (compound_statement "{\n      iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);\n      if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }\n    }" { (expression_statement "iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0);" (assignment_expression "iVar2 = sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0)" identifier = (call_expression "sg_ll_readcap_16(sg_fd,0,0,0,rcBuff,0x20,0,0)" identifier (argument_list "(sg_fd,0,0,0,rcBuff,0x20,0,0)" ( identifier , number_literal , number_literal , number_literal , identifier , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n        *(uint *)num_sect = uVar3 + 1;\n        *(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);\n        *sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;\n      }" { (expression_statement "uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;" (assignment_expression "uVar3 = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18" identifier = (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18" (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                (rcBuff._4_4_ & 0xff00) << 8" (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8" (binary_expression "(uint)rcBuff._4_4_ >> 0x18" (cast_expression "(uint)rcBuff._4_4_" ( (type_descriptor "uint" type_identifier) ) (field_expression "rcBuff._4_4_" identifier . field_identifier)) >> number_literal) | (binary_expression "(rcBuff._4_4_ & 0xff0000) >> 8" (parenthesized_expression "(rcBuff._4_4_ & 0xff0000)" ( (binary_expression "rcBuff._4_4_ & 0xff0000" (field_expression "rcBuff._4_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(rcBuff._4_4_ & 0xff00) << 8" (parenthesized_expression "(rcBuff._4_4_ & 0xff00)" ( (binary_expression "rcBuff._4_4_ & 0xff00" (field_expression "rcBuff._4_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "rcBuff._4_4_ << 0x18" (field_expression "rcBuff._4_4_" identifier . field_identifier) << number_literal))) ;) (expression_statement "*(uint *)num_sect = uVar3 + 1;" (assignment_expression "*(uint *)num_sect = uVar3 + 1" (pointer_expression "*(uint *)num_sect" * (cast_expression "(uint *)num_sect" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3);" (assignment_expression "*(uint *)((int)num_sect + 4) =\n             ((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3)" (pointer_expression "*(uint *)((int)num_sect + 4)" * (cast_expression "(uint *)((int)num_sect + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)num_sect + 4)" ( (binary_expression "(int)num_sect + 4" (cast_expression "(int)num_sect" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (uint)(0xfffffffe < uVar3)" (parenthesized_expression "((uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18)" ( (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18" (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8" (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8" (binary_expression "(uint)rcBuff._0_4_ >> 0x18" (cast_expression "(uint)rcBuff._0_4_" ( (type_descriptor "uint" type_identifier) ) (field_expression "rcBuff._0_4_" identifier . field_identifier)) >> number_literal) | (binary_expression "(rcBuff._0_4_ & 0xff0000) >> 8" (parenthesized_expression "(rcBuff._0_4_ & 0xff0000)" ( (binary_expression "rcBuff._0_4_ & 0xff0000" (field_expression "rcBuff._0_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(rcBuff._0_4_ & 0xff00) << 8" (parenthesized_expression "(rcBuff._0_4_ & 0xff00)" ( (binary_expression "rcBuff._0_4_ & 0xff00" (field_expression "rcBuff._0_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "rcBuff._0_4_ << 0x18" (field_expression "rcBuff._0_4_" identifier . field_identifier) << number_literal)) )) + (call_expression "(uint)(0xfffffffe < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar3)" ( (binary_expression "0xfffffffe < uVar3" number_literal < identifier) ))))) ;) (expression_statement "*sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;" (assignment_expression "*sect_sz = (uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18" (pointer_expression "*sect_sz" * identifier) = (binary_expression "(uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18" (binary_expression "(uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |\n                   (rcBuff._8_4_ & 0xff00) << 8" (binary_expression "(uint)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8" (binary_expression "(uint)rcBuff._8_4_ >> 0x18" (cast_expression "(uint)rcBuff._8_4_" ( (type_descriptor "uint" type_identifier) ) (field_expression "rcBuff._8_4_" identifier . field_identifier)) >> number_literal) | (binary_expression "(rcBuff._8_4_ & 0xff0000) >> 8" (parenthesized_expression "(rcBuff._8_4_ & 0xff0000)" ( (binary_expression "rcBuff._8_4_ & 0xff0000" (field_expression "rcBuff._8_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(rcBuff._8_4_ & 0xff00) << 8" (parenthesized_expression "(rcBuff._8_4_ & 0xff00)" ( (binary_expression "rcBuff._8_4_ & 0xff00" (field_expression "rcBuff._8_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "rcBuff._8_4_ << 0x18" (field_expression "rcBuff._8_4_" identifier . field_identifier) << number_literal))) ;) })) }) (else_clause "else {\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n    }" else (compound_statement "{\n      uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;\n      *(uint *)num_sect = uVar3 + 1;\n      *(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);\n      *sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;\n    }" { (expression_statement "uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;" (assignment_expression "uVar3 = (uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18" identifier = (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18" (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |\n              (rcBuff._0_4_ & 0xff00) << 8" (binary_expression "(uint)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8" (binary_expression "(uint)rcBuff._0_4_ >> 0x18" (cast_expression "(uint)rcBuff._0_4_" ( (type_descriptor "uint" type_identifier) ) (field_expression "rcBuff._0_4_" identifier . field_identifier)) >> number_literal) | (binary_expression "(rcBuff._0_4_ & 0xff0000) >> 8" (parenthesized_expression "(rcBuff._0_4_ & 0xff0000)" ( (binary_expression "rcBuff._0_4_ & 0xff0000" (field_expression "rcBuff._0_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(rcBuff._0_4_ & 0xff00) << 8" (parenthesized_expression "(rcBuff._0_4_ & 0xff00)" ( (binary_expression "rcBuff._0_4_ & 0xff00" (field_expression "rcBuff._0_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "rcBuff._0_4_ << 0x18" (field_expression "rcBuff._0_4_" identifier . field_identifier) << number_literal))) ;) (expression_statement "*(uint *)num_sect = uVar3 + 1;" (assignment_expression "*(uint *)num_sect = uVar3 + 1" (pointer_expression "*(uint *)num_sect" * (cast_expression "(uint *)num_sect" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "uVar3 + 1" identifier + number_literal)) ;) (expression_statement "*(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3);" (assignment_expression "*(uint *)((int)num_sect + 4) = (uint)(0xfffffffe < uVar3)" (pointer_expression "*(uint *)((int)num_sect + 4)" * (cast_expression "(uint *)((int)num_sect + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)num_sect + 4)" ( (binary_expression "(int)num_sect + 4" (cast_expression "(int)num_sect" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (call_expression "(uint)(0xfffffffe < uVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar3)" ( (binary_expression "0xfffffffe < uVar3" number_literal < identifier) )))) ;) (expression_statement "*sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;" (assignment_expression "*sect_sz = (uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18" (pointer_expression "*sect_sz" * identifier) = (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18" (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |\n                 (rcBuff._4_4_ & 0xff00) << 8" (binary_expression "(uint)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8" (binary_expression "(uint)rcBuff._4_4_ >> 0x18" (cast_expression "(uint)rcBuff._4_4_" ( (type_descriptor "uint" type_identifier) ) (field_expression "rcBuff._4_4_" identifier . field_identifier)) >> number_literal) | (binary_expression "(rcBuff._4_4_ & 0xff0000) >> 8" (parenthesized_expression "(rcBuff._4_4_ & 0xff0000)" ( (binary_expression "rcBuff._4_4_ & 0xff0000" (field_expression "rcBuff._4_4_" identifier . field_identifier) & number_literal) )) >> number_literal)) | (binary_expression "(rcBuff._4_4_ & 0xff00) << 8" (parenthesized_expression "(rcBuff._4_4_ & 0xff00)" ( (binary_expression "rcBuff._4_4_ & 0xff00" (field_expression "rcBuff._4_4_" identifier . field_identifier) & number_literal) )) << number_literal)) | (binary_expression "rcBuff._4_4_ << 0x18" (field_expression "rcBuff._4_4_" identifier . field_identifier) << 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 "void __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000162f0();\n}\n\n" (function_definition "void __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000162f0();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,uint *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000162f0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_40;" type_identifier identifier ;) (declaration "uint local_3c;" type_identifier identifier ;) (declaration "uint local_38;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1464d;" (assignment_expression "uStack_14 = 0x1464d" 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 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" identifier = (call_expression "sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" identifier (argument_list "(param_1,0,0,&local_40,8,0,0)" ( identifier , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" { (if_statement "if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" if (parenthesized_expression "(((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff)" ( (binary_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff" (parenthesized_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_)" ( (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_" (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_" (binary_expression "(byte)local_40 & local_40._1_1_" (cast_expression "(byte)local_40" ( (type_descriptor "byte" type_identifier) ) identifier) & (field_expression "local_40._1_1_" identifier . field_identifier)) & (field_expression "local_40._2_1_" identifier . field_identifier)) & (field_expression "local_40._3_1_" identifier . field_identifier)) )) == number_literal) )) (compound_statement "{\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }" { (expression_statement "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" identifier = (call_expression "sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" identifier (argument_list "(param_1,0,0,0,&local_40,0x20,0,0)" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" { (expression_statement "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;" (assignment_expression "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" identifier = (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" identifier >> number_literal) | (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" ( (binary_expression "local_3c & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" ( (binary_expression "local_3c & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_3c << 0x18" identifier << number_literal))) ;) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (parenthesized_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18)" ( (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" identifier >> number_literal) | (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" ( (binary_expression "local_40 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" ( (binary_expression "local_40 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_40 << 0x18" identifier << number_literal)) )) + (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) ))))) ;) (expression_statement "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;" (assignment_expression "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (pointer_expression "*param_3" * identifier) = (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8" (binary_expression "local_38 >> 0x18" identifier >> number_literal) | (binary_expression "(local_38 & 0xff0000) >> 8" (parenthesized_expression "(local_38 & 0xff0000)" ( (binary_expression "local_38 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_38 & 0xff00) << 8" (parenthesized_expression "(local_38 & 0xff00)" ( (binary_expression "local_38 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_38 << 0x18" identifier << number_literal))) ;) })) }) (else_clause "else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" else (compound_statement "{\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" { (expression_statement "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;" (assignment_expression "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" identifier = (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" identifier >> number_literal) | (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" ( (binary_expression "local_40 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" ( (binary_expression "local_40 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_40 << 0x18" identifier << number_literal))) ;) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" * identifier) = (binary_expression "uVar2 + 1" identifier + number_literal)) ;) (expression_statement "param_2[1] = (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0xfffffffe < uVar2)" ( (binary_expression "0xfffffffe < uVar2" number_literal < identifier) )))) ;) (expression_statement "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;" (assignment_expression "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (pointer_expression "*param_3" * identifier) = (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" identifier >> number_literal) | (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" ( (binary_expression "local_3c & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" ( (binary_expression "local_3c & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_3c << 0x18" identifier << number_literal))) ;) }))) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000162f0();" (call_expression "FUN_000162f0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (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 ;) (declaration TYPE IDENT ;) (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 , LIT , LIT , (pointer_expression & IDENT) , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & (field_expression IDENT . field_identifier)) & (field_expression IDENT . field_identifier)) & (field_expression IDENT . field_identifier)) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (pointer_expression & IDENT) , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT)) )) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT < IDENT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT < IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << 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 ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)\n\n{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000162f0();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00014640(undefined4 param_1,int *param_2,uint *param_3)" (identifier "FUN_00014640") (parameter_list "(undefined4 param_1,int *param_2,uint *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  undefined4 local_40;\n  uint local_3c;\n  uint local_38;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1464d;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);\n  if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000162f0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_40;" (type_identifier "undefined4") (identifier "local_40") (; ";")) (declaration "uint local_3c;" (type_identifier "uint") (identifier "local_3c") (; ";")) (declaration "uint local_38;" (type_identifier "uint") (identifier "local_38") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1464d;" (assignment_expression "uStack_14 = 0x1464d" (identifier "uStack_14") (= "=") (number_literal "0x1464d")) (; ";")) (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 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" (identifier "iVar1") (= "=") (call_expression "sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0)" (identifier "sg_ll_readcap_10") (argument_list "(param_1,0,0,&local_40,8,0,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_40" (& "&") (identifier "local_40")) (, ",") (number_literal "8") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }\n  }" ({ "{") (if_statement "if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }\n    else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" (if "if") (parenthesized_expression "(((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff)" (( "(") (binary_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff" (parenthesized_expression "((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_)" (( "(") (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_" (binary_expression "(byte)local_40 & local_40._1_1_ & local_40._2_1_" (binary_expression "(byte)local_40 & local_40._1_1_" (cast_expression "(byte)local_40" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_40")) (& "&") (field_expression "local_40._1_1_" (identifier "local_40") (. ".") (field_identifier "_1_1_"))) (& "&") (field_expression "local_40._2_1_" (identifier "local_40") (. ".") (field_identifier "_2_1_"))) (& "&") (field_expression "local_40._3_1_" (identifier "local_40") (. ".") (field_identifier "_3_1_"))) () ")")) (== "==") (number_literal "0xff")) () ")")) (compound_statement "{\n      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);\n      if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }\n    }" ({ "{") (expression_statement "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);" (assignment_expression "iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" (identifier "iVar1") (= "=") (call_expression "sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0)" (identifier "sg_ll_readcap_16") (argument_list "(param_1,0,0,0,&local_40,0x20,0,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_40" (& "&") (identifier "local_40")) (, ",") (number_literal "0x20") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;\n        *param_2 = uVar2 + 1;\n        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);\n        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;\n      }" ({ "{") (expression_statement "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18;" (assignment_expression "uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" (identifier "uVar2") (= "=") (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" (identifier "local_3c") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" (( "(") (binary_expression "local_3c & 0xff0000" (identifier "local_3c") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" (( "(") (binary_expression "local_3c & 0xff00" (identifier "local_3c") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_3c << 0x18" (identifier "local_3c") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2)" (parenthesized_expression "(local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18)" (( "(") (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n                     local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" (identifier "local_40") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" (( "(") (binary_expression "local_40 & 0xff0000" (identifier "local_40") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" (( "(") (binary_expression "local_40 & 0xff00" (identifier "local_40") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_40 << 0x18" (identifier "local_40") (<< "<<") (number_literal "0x18"))) () ")")) (+ "+") (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xfffffffe < uVar2)" (( "(") (binary_expression "0xfffffffe < uVar2" (number_literal "0xfffffffe") (< "<") (identifier "uVar2")) () ")"))))) (; ";")) (expression_statement "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18;" (assignment_expression "*param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |\n                   local_38 << 0x18" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8" (binary_expression "local_38 >> 0x18 | (local_38 & 0xff0000) >> 8" (binary_expression "local_38 >> 0x18" (identifier "local_38") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_38 & 0xff0000) >> 8" (parenthesized_expression "(local_38 & 0xff0000)" (( "(") (binary_expression "local_38 & 0xff0000" (identifier "local_38") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_38 & 0xff00) << 8" (parenthesized_expression "(local_38 & 0xff00)" (( "(") (binary_expression "local_38 & 0xff00" (identifier "local_38") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_38 << 0x18" (identifier "local_38") (<< "<<") (number_literal "0x18")))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" (else "else") (compound_statement "{\n      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;\n      *param_2 = uVar2 + 1;\n      param_2[1] = (uint)(0xfffffffe < uVar2);\n      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;\n    }" ({ "{") (expression_statement "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18;" (assignment_expression "uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" (identifier "uVar2") (= "=") (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |\n              local_40 << 0x18" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8" (binary_expression "local_40 >> 0x18 | (local_40 & 0xff0000) >> 8" (binary_expression "local_40 >> 0x18" (identifier "local_40") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_40 & 0xff0000) >> 8" (parenthesized_expression "(local_40 & 0xff0000)" (( "(") (binary_expression "local_40 & 0xff0000" (identifier "local_40") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_40 & 0xff00) << 8" (parenthesized_expression "(local_40 & 0xff00)" (( "(") (binary_expression "local_40 & 0xff00" (identifier "local_40") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_40 << 0x18" (identifier "local_40") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "*param_2 = uVar2 + 1;" (assignment_expression "*param_2 = uVar2 + 1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2[1] = (uint)(0xfffffffe < uVar2);" (assignment_expression "param_2[1] = (uint)(0xfffffffe < uVar2)" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (call_expression "(uint)(0xfffffffe < uVar2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0xfffffffe < uVar2)" (( "(") (binary_expression "0xfffffffe < uVar2" (number_literal "0xfffffffe") (< "<") (identifier "uVar2")) () ")")))) (; ";")) (expression_statement "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18;" (assignment_expression "*param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |\n                 local_3c << 0x18" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8" (binary_expression "local_3c >> 0x18 | (local_3c & 0xff0000) >> 8" (binary_expression "local_3c >> 0x18" (identifier "local_3c") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_3c & 0xff0000) >> 8" (parenthesized_expression "(local_3c & 0xff0000)" (( "(") (binary_expression "local_3c & 0xff0000" (identifier "local_3c") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_3c & 0xff00) << 8" (parenthesized_expression "(local_3c & 0xff00)" (( "(") (binary_expression "local_3c & 0xff00" (identifier "local_3c") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_3c << 0x18" (identifier "local_3c") (<< "<<") (number_literal "0x18")))) (; ";")) (} "}")))) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\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;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000162f0();" (call_expression "FUN_000162f0()" (identifier "FUN_000162f0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int __regparm3 function_1(int sg_fd,int64_t *num_sect,int *sect_sz)

{
  int var_6;
  int var_3;
  type_1 var_5;
  int var_1;
  uint8_t rcBuff [32];
  
  var_6 = *(int *)(var_1 + 0x14);
  var_3 = var_2(sg_fd,0,0,rcBuff,8,0,0);
  if (var_3 == 0) {
    if ((rcBuff[0] & rcBuff[1] & rcBuff[2] & rcBuff[3]) == 0xff) {
      var_3 = var_4(sg_fd,0,0,0,rcBuff,0x20,0,0);
      if (var_3 == 0) {
        var_5 = (type_1)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |
                (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;
        *(type_1 *)num_sect = var_5 + 1;
        *(type_1 *)((int)num_sect + 4) =
             ((type_1)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |
              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18) + (type_1)(0xfffffffe < var_5);
        *sect_sz = (type_1)rcBuff._8_4_ >> 0x18 | (rcBuff._8_4_ & 0xff0000) >> 8 |
                   (rcBuff._8_4_ & 0xff00) << 8 | rcBuff._8_4_ << 0x18;
      }
    }
    else {
      var_5 = (type_1)rcBuff._0_4_ >> 0x18 | (rcBuff._0_4_ & 0xff0000) >> 8 |
              (rcBuff._0_4_ & 0xff00) << 8 | rcBuff._0_4_ << 0x18;
      *(type_1 *)num_sect = var_5 + 1;
      *(type_1 *)((int)num_sect + 4) = (type_1)(0xfffffffe < var_5);
      *sect_sz = (type_1)rcBuff._4_4_ >> 0x18 | (rcBuff._4_4_ & 0xff0000) >> 8 |
                 (rcBuff._4_4_ & 0xff00) << 8 | rcBuff._4_4_ << 0x18;
    }
  }
  if (var_6 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_7();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (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) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (number_literal) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (field_expression argument: (identifier) field: (field_identifier))) right: (field_expression argument: (identifier) field: (field_identifier))) right: (field_expression argument: (identifier) field: (field_identifier)))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (number_literal) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void __regparm3 MASKED(undefined4 param_1,int *param_2,uint *param_3)

{
  int iVar1;
  uint uVar2;
  int in_GS_OFFSET;
  undefined4 local_40;
  uint local_3c;
  uint local_38;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1464d;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = sg_ll_readcap_10(param_1,0,0,&local_40,8,0,0);
  if (iVar1 == 0) {
    if (((byte)local_40 & local_40._1_1_ & local_40._2_1_ & local_40._3_1_) == 0xff) {
      iVar1 = sg_ll_readcap_16(param_1,0,0,0,&local_40,0x20,0,0);
      if (iVar1 == 0) {
        uVar2 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |
                local_3c << 0x18;
        *param_2 = uVar2 + 1;
        param_2[1] = (local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |
                     local_40 << 0x18) + (uint)(0xfffffffe < uVar2);
        *param_3 = local_38 >> 0x18 | (local_38 & 0xff0000) >> 8 | (local_38 & 0xff00) << 8 |
                   local_38 << 0x18;
      }
    }
    else {
      uVar2 = local_40 >> 0x18 | (local_40 & 0xff0000) >> 8 | (local_40 & 0xff00) << 8 |
              local_40 << 0x18;
      *param_2 = uVar2 + 1;
      param_2[1] = (uint)(0xfffffffe < uVar2);
      *param_3 = local_3c >> 0x18 | (local_3c & 0xff0000) >> 8 | (local_3c & 0xff00) << 8 |
                 local_3c << 0x18;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000162f0();
}

