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

int sg_get_num_nomult(char *buf)

{
  char cVar1;
  __int32_t *p_Var2;
  char *pcVar3;
  __int32_t **pp_Var4;
  int iVar5;
  size_t sVar6;
  int in_GS_OFFSET;
  int num;
  uint unum;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1e489;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')) {
    pcVar3 = strchr(buf + 1,0x2c);
    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {
      buf = buf + 2;
LAB_0001e54e:
      iVar5 = __isoc99_sscanf(buf,"%x",&unum);
      num = unum;
    }
    else {
      pp_Var4 = __ctype_toupper_loc();
      p_Var2 = *pp_Var4;
      if (pcVar3 == (char *)0x0) {
        sVar6 = strlen(buf);
        iVar5 = p_Var2[buf[sVar6 - 1]];
      }
      else {
        iVar5 = p_Var2[pcVar3[-1]];
      }
      if (iVar5 == 0x48) goto LAB_0001e54e;
      iVar5 = __isoc99_sscanf(buf,"%d",&num);
    }
    if (iVar5 == 1) goto LAB_0001e50e;
  }
  num = -1;
LAB_0001e50e:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return num;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



undefined4 sg_get_num_nomult(void)

{
  char cVar1;
  __int32_t *p_Var2;
  char *pcVar3;
  __int32_t **pp_Var4;
  int iVar5;
  size_t sVar6;
  int unaff_EBX;
  int in_GS_OFFSET;
  char *unaff_retaddr;
  undefined4 local_2c;
  undefined4 local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x1e489;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {
    pcVar3 = strchr(unaff_retaddr + 1,0x2c);
    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {
      unaff_retaddr = unaff_retaddr + 2;
LAB_0001e54e:
      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28
                             );
      local_2c = local_28;
    }
    else {
      pp_Var4 = __ctype_toupper_loc();
      p_Var2 = *pp_Var4;
      if (pcVar3 == (char *)0x0) {
        sVar6 = strlen(unaff_retaddr);
        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];
      }
      else {
        iVar5 = p_Var2[pcVar3[-1]];
      }
      if (iVar5 == 0x48) goto LAB_0001e54e;
      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);
    }
    if (iVar5 == 1) goto LAB_0001e50e;
  }
  local_2c = 0xffffffff;
LAB_0001e50e:
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_2c;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0002f100();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x2a8ff
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x30]
TEST ESI,ESI
JZ 0x0001e590
MOVZX EDI,byte ptr [ESI]
MOV EAX,EDI
TEST AL,AL
JZ 0x0001e590
SUB ESP,0x8
LEA EAX,[ESI + 0x1]
PUSH 0x2c
PUSH EAX
CALL 0x000173c0
ADD ESP,0x10
MOV EBP,EAX
MOV EAX,EDI
CMP AL,0x30
JZ 0x0001e568
CALL 0x00017040
MOV EDI,dword ptr [EAX]
TEST EBP,EBP
JZ 0x0001e528
MOVSX EAX,byte ptr [EBP + -0x1]
CMP dword ptr [EDI + EAX*0x4],0x48
JZ 0x0001e53f
SUB ESP,0x4
LEA EAX,[ESP + 0x8]
PUSH EAX
LEA EAX,[EBX + 0xfffe74e0]
PUSH EAX
PUSH ESI
CALL 0x00017480
ADD ESP,0x10
CMP EAX,0x1
JNZ 0x0001e590
MOV EAX,dword ptr [ESP + 0x4]
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0001e59a
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
CALL 0x000173f0
ADD ESP,0x10
MOVSX EAX,byte ptr [ESI + EAX*0x1 + -0x1]
CMP dword ptr [EDI + EAX*0x4],0x48
JNZ 0x0001e4e9
SUB ESP,0x4
LEA EAX,[ESP + 0xc]
PUSH EAX
LEA EAX,[EBX + 0xfffe7756]
PUSH EAX
PUSH ESI
CALL 0x00017480
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP + 0x14],EDX
ADD ESP,0x10
JMP 0x0001e501
MOVZX EAX,byte ptr [ESI + 0x1]
AND EAX,0xffffffdf
CMP AL,0x58
JNZ 0x0001e4d4
SUB ESP,0x4
ADD ESI,0x2
LEA EAX,[ESP + 0xc]
PUSH EAX
LEA EAX,[EBX + 0xfffe7756]
PUSH EAX
JMP 0x0001e54e
MOV EAX,0xffffffff
JMP 0x0001e50e
CALL 0x0002f100
(translation_unit "undefined4 sg_get_num_nomult(void)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f100();\n}\n\n" (function_definition "undefined4 sg_get_num_nomult(void)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f100();\n}" type_identifier (function_declarator "sg_get_num_nomult(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0002f100();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "__int32_t *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__int32_t **pp_Var4;" type_identifier (pointer_declarator "**pp_Var4" * (pointer_declarator "*pp_Var4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1e489;" (assignment_expression "uStack_14 = 0x1e489" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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) ))))) ;) (if_statement "if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" if (parenthesized_expression "((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0'))" ( (binary_expression "(unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')" (parenthesized_expression "(unaff_retaddr != (char *)0x0)" ( (binary_expression "unaff_retaddr != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(cVar1 = *unaff_retaddr, cVar1 != '\0')" ( (comma_expression "cVar1 = *unaff_retaddr, cVar1 != '\0'" (assignment_expression "cVar1 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" { (expression_statement "pcVar3 = strchr(unaff_retaddr + 1,0x2c);" (assignment_expression "pcVar3 = strchr(unaff_retaddr + 1,0x2c)" identifier = (call_expression "strchr(unaff_retaddr + 1,0x2c)" identifier (argument_list "(unaff_retaddr + 1,0x2c)" ( (binary_expression "unaff_retaddr + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" if (parenthesized_expression "((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58))" ( (binary_expression "(cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)" (parenthesized_expression "(cVar1 == '0')" ( (binary_expression "cVar1 == '0'" identifier == (char_literal "'0'" ' character ')) )) && (parenthesized_expression "((unaff_retaddr[1] & 0xdfU) == 0x58)" ( (binary_expression "(unaff_retaddr[1] & 0xdfU) == 0x58" (parenthesized_expression "(unaff_retaddr[1] & 0xdfU)" ( (binary_expression "unaff_retaddr[1] & 0xdfU" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }" { (expression_statement "unaff_retaddr = unaff_retaddr + 2;" (assignment_expression "unaff_retaddr = unaff_retaddr + 2" identifier = (binary_expression "unaff_retaddr + 2" identifier + number_literal)) ;) (labeled_statement "LAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" statement_identifier : (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" identifier = (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" identifier (argument_list "(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" ( identifier , (binary_expression ""sg_decode_transportid_str" + unaff_EBX + 0x13" (binary_expression ""sg_decode_transportid_str" + unaff_EBX" (string_literal ""sg_decode_transportid_str"" " string_content ") + identifier) + number_literal) , (pointer_expression "&local_28" & identifier) )))) ;)) (expression_statement "local_2c = local_28;" (assignment_expression "local_2c = local_28" identifier = identifier) ;) }) (else_clause "else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" else (compound_statement "{\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" { (expression_statement "pp_Var4 = __ctype_toupper_loc();" (assignment_expression "pp_Var4 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "p_Var2 = *pp_Var4;" (assignment_expression "p_Var2 = *pp_Var4" identifier = (pointer_expression "*pp_Var4" * identifier)) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }" { (expression_statement "sVar6 = strlen(unaff_retaddr);" (assignment_expression "sVar6 = strlen(unaff_retaddr)" identifier = (call_expression "strlen(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) ;) (expression_statement "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];" (assignment_expression "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]]" identifier = (subscript_expression "p_Var2[unaff_retaddr[sVar6 - 1]]" identifier [ (subscript_expression "unaff_retaddr[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ]) ])) ;) }) (else_clause "else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" else (compound_statement "{\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" { (expression_statement "iVar5 = p_Var2[pcVar3[-1]];" (assignment_expression "iVar5 = p_Var2[pcVar3[-1]]" identifier = (subscript_expression "p_Var2[pcVar3[-1]]" identifier [ (subscript_expression "pcVar3[-1]" identifier [ number_literal ]) ])) ;) }))) (if_statement "if (iVar5 == 0x48) goto LAB_0001e54e;" if (parenthesized_expression "(iVar5 == 0x48)" ( (binary_expression "iVar5 == 0x48" identifier == number_literal) )) (goto_statement "goto LAB_0001e54e;" goto statement_identifier ;)) (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" identifier = (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" identifier (argument_list "(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" ( identifier , (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX + 0xe" (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX" (string_literal ""sg_scsi_normalize_sense"" " string_content ") + identifier) + number_literal) , (pointer_expression "&local_2c" & identifier) )))) ;) }))) (if_statement "if (iVar5 == 1) goto LAB_0001e50e;" if (parenthesized_expression "(iVar5 == 1)" ( (binary_expression "iVar5 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0001e50e;" goto statement_identifier ;)) })) (expression_statement "local_2c = 0xffffffff;" (assignment_expression "local_2c = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" statement_identifier : (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(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 local_2c;\n  }" { (return_statement "return local_2c;" return identifier ;) }))) comment (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint sg_get_num_nomult(char *buf)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  int num;\n  uint unum;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')) {\n    pcVar3 = strchr(buf + 1,0x2c);\n    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  num = -1;\nLAB_0001e50e:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return num;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int sg_get_num_nomult(char *buf)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  int num;\n  uint unum;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')) {\n    pcVar3 = strchr(buf + 1,0x2c);\n    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  num = -1;\nLAB_0001e50e:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return num;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "sg_get_num_nomult(char *buf)" identifier (parameter_list "(char *buf)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  int num;\n  uint unum;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')) {\n    pcVar3 = strchr(buf + 1,0x2c);\n    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  num = -1;\nLAB_0001e50e:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return num;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "__int32_t *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__int32_t **pp_Var4;" type_identifier (pointer_declarator "**pp_Var4" * (pointer_declarator "*pp_Var4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int num;" primitive_type identifier ;) (declaration "uint unum;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1e489;" (assignment_expression "uStack_14 = 0x1e489" 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) ))))) ;) (if_statement "if ((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')) {\n    pcVar3 = strchr(buf + 1,0x2c);\n    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" if (parenthesized_expression "((buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0'))" ( (binary_expression "(buf != (char *)0x0) && (cVar1 = *buf, cVar1 != '\0')" (parenthesized_expression "(buf != (char *)0x0)" ( (binary_expression "buf != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(cVar1 = *buf, cVar1 != '\0')" ( (comma_expression "cVar1 = *buf, cVar1 != '\0'" (assignment_expression "cVar1 = *buf" identifier = (pointer_expression "*buf" * identifier)) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    pcVar3 = strchr(buf + 1,0x2c);\n    if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" { (expression_statement "pcVar3 = strchr(buf + 1,0x2c);" (assignment_expression "pcVar3 = strchr(buf + 1,0x2c)" identifier = (call_expression "strchr(buf + 1,0x2c)" identifier (argument_list "(buf + 1,0x2c)" ( (binary_expression "buf + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)) {\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }" if (parenthesized_expression "((cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58))" ( (binary_expression "(cVar1 == '0') && ((buf[1] & 0xdfU) == 0x58)" (parenthesized_expression "(cVar1 == '0')" ( (binary_expression "cVar1 == '0'" identifier == (char_literal "'0'" ' character ')) )) && (parenthesized_expression "((buf[1] & 0xdfU) == 0x58)" ( (binary_expression "(buf[1] & 0xdfU) == 0x58" (parenthesized_expression "(buf[1] & 0xdfU)" ( (binary_expression "buf[1] & 0xdfU" (subscript_expression "buf[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      buf = buf + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);\n      num = unum;\n    }" { (expression_statement "buf = buf + 2;" (assignment_expression "buf = buf + 2" identifier = (binary_expression "buf + 2" identifier + number_literal)) ;) (labeled_statement "LAB_0001e54e:\n      iVar5 = __isoc99_sscanf(buf,"%x",&unum);" statement_identifier : (expression_statement "iVar5 = __isoc99_sscanf(buf,"%x",&unum);" (assignment_expression "iVar5 = __isoc99_sscanf(buf,"%x",&unum)" identifier = (call_expression "__isoc99_sscanf(buf,"%x",&unum)" identifier (argument_list "(buf,"%x",&unum)" ( identifier , (string_literal ""%x"" " string_content ") , (pointer_expression "&unum" & identifier) )))) ;)) (expression_statement "num = unum;" (assignment_expression "num = unum" identifier = identifier) ;) }) (else_clause "else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }" else (compound_statement "{\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(buf,"%d",&num);\n    }" { (expression_statement "pp_Var4 = __ctype_toupper_loc();" (assignment_expression "pp_Var4 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "p_Var2 = *pp_Var4;" (assignment_expression "p_Var2 = *pp_Var4" identifier = (pointer_expression "*pp_Var4" * identifier)) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = strlen(buf);\n        iVar5 = p_Var2[buf[sVar6 - 1]];\n      }" { (expression_statement "sVar6 = strlen(buf);" (assignment_expression "sVar6 = strlen(buf)" identifier = (call_expression "strlen(buf)" identifier (argument_list "(buf)" ( identifier )))) ;) (expression_statement "iVar5 = p_Var2[buf[sVar6 - 1]];" (assignment_expression "iVar5 = p_Var2[buf[sVar6 - 1]]" identifier = (subscript_expression "p_Var2[buf[sVar6 - 1]]" identifier [ (subscript_expression "buf[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ]) ])) ;) }) (else_clause "else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" else (compound_statement "{\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" { (expression_statement "iVar5 = p_Var2[pcVar3[-1]];" (assignment_expression "iVar5 = p_Var2[pcVar3[-1]]" identifier = (subscript_expression "p_Var2[pcVar3[-1]]" identifier [ (subscript_expression "pcVar3[-1]" identifier [ number_literal ]) ])) ;) }))) (if_statement "if (iVar5 == 0x48) goto LAB_0001e54e;" if (parenthesized_expression "(iVar5 == 0x48)" ( (binary_expression "iVar5 == 0x48" identifier == number_literal) )) (goto_statement "goto LAB_0001e54e;" goto statement_identifier ;)) (expression_statement "iVar5 = __isoc99_sscanf(buf,"%d",&num);" (assignment_expression "iVar5 = __isoc99_sscanf(buf,"%d",&num)" identifier = (call_expression "__isoc99_sscanf(buf,"%d",&num)" identifier (argument_list "(buf,"%d",&num)" ( identifier , (string_literal ""%d"" " string_content ") , (pointer_expression "&num" & identifier) )))) ;) }))) (if_statement "if (iVar5 == 1) goto LAB_0001e50e;" if (parenthesized_expression "(iVar5 == 1)" ( (binary_expression "iVar5 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0001e50e;" goto statement_identifier ;)) })) (expression_statement "num = -1;" (assignment_expression "num = -1" identifier = number_literal) ;) (labeled_statement "LAB_0001e50e:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return num;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return num;\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 num;\n  }" { (return_statement "return num;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 sg_get_num_nomult(void)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    \n  FUN_0002f100();\n}\n\n" (function_definition "undefined4 sg_get_num_nomult(void)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    \n  FUN_0002f100();\n}" type_identifier (function_declarator "sg_get_num_nomult(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    \n  FUN_0002f100();\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "__int32_t *p_Var2;" type_identifier (pointer_declarator "*p_Var2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "__int32_t **pp_Var4;" type_identifier (pointer_declarator "**pp_Var4" * (pointer_declarator "*pp_Var4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1e489;" (assignment_expression "uStack_14 = 0x1e489" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(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) ))))) ;) (if_statement "if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" if (parenthesized_expression "((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0'))" ( (binary_expression "(unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')" (parenthesized_expression "(unaff_retaddr != (char *)0x0)" ( (binary_expression "unaff_retaddr != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(cVar1 = *unaff_retaddr, cVar1 != '\0')" ( (comma_expression "cVar1 = *unaff_retaddr, cVar1 != '\0'" (assignment_expression "cVar1 = *unaff_retaddr" identifier = (pointer_expression "*unaff_retaddr" * identifier)) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" { (expression_statement "pcVar3 = strchr(unaff_retaddr + 1,0x2c);" (assignment_expression "pcVar3 = strchr(unaff_retaddr + 1,0x2c)" identifier = (call_expression "strchr(unaff_retaddr + 1,0x2c)" identifier (argument_list "(unaff_retaddr + 1,0x2c)" ( (binary_expression "unaff_retaddr + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" if (parenthesized_expression "((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58))" ( (binary_expression "(cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)" (parenthesized_expression "(cVar1 == '0')" ( (binary_expression "cVar1 == '0'" identifier == (char_literal "'0'" ' character ')) )) && (parenthesized_expression "((unaff_retaddr[1] & 0xdfU) == 0x58)" ( (binary_expression "(unaff_retaddr[1] & 0xdfU) == 0x58" (parenthesized_expression "(unaff_retaddr[1] & 0xdfU)" ( (binary_expression "unaff_retaddr[1] & 0xdfU" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }" { (expression_statement "unaff_retaddr = unaff_retaddr + 2;" (assignment_expression "unaff_retaddr = unaff_retaddr + 2" identifier = (binary_expression "unaff_retaddr + 2" identifier + number_literal)) ;) (labeled_statement "LAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" statement_identifier : (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" identifier = (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" identifier (argument_list "(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" ( identifier , (binary_expression ""sg_decode_transportid_str" + unaff_EBX + 0x13" (binary_expression ""sg_decode_transportid_str" + unaff_EBX" (string_literal ""sg_decode_transportid_str"" " string_content ") + identifier) + number_literal) , (pointer_expression "&local_28" & identifier) )))) ;)) (expression_statement "local_2c = local_28;" (assignment_expression "local_2c = local_28" identifier = identifier) ;) }) (else_clause "else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" else (compound_statement "{\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" { (expression_statement "pp_Var4 = __ctype_toupper_loc();" (assignment_expression "pp_Var4 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "p_Var2 = *pp_Var4;" (assignment_expression "p_Var2 = *pp_Var4" identifier = (pointer_expression "*pp_Var4" * identifier)) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }" { (expression_statement "sVar6 = strlen(unaff_retaddr);" (assignment_expression "sVar6 = strlen(unaff_retaddr)" identifier = (call_expression "strlen(unaff_retaddr)" identifier (argument_list "(unaff_retaddr)" ( identifier )))) ;) (expression_statement "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];" (assignment_expression "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]]" identifier = (subscript_expression "p_Var2[unaff_retaddr[sVar6 - 1]]" identifier [ (subscript_expression "unaff_retaddr[sVar6 - 1]" identifier [ (binary_expression "sVar6 - 1" identifier - number_literal) ]) ])) ;) }) (else_clause "else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" else (compound_statement "{\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" { (expression_statement "iVar5 = p_Var2[pcVar3[-1]];" (assignment_expression "iVar5 = p_Var2[pcVar3[-1]]" identifier = (subscript_expression "p_Var2[pcVar3[-1]]" identifier [ (subscript_expression "pcVar3[-1]" identifier [ number_literal ]) ])) ;) }))) (if_statement "if (iVar5 == 0x48) goto LAB_0001e54e;" if (parenthesized_expression "(iVar5 == 0x48)" ( (binary_expression "iVar5 == 0x48" identifier == number_literal) )) (goto_statement "goto LAB_0001e54e;" goto statement_identifier ;)) (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" identifier = (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" identifier (argument_list "(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" ( identifier , (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX + 0xe" (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX" (string_literal ""sg_scsi_normalize_sense"" " string_content ") + identifier) + number_literal) , (pointer_expression "&local_2c" & identifier) )))) ;) }))) (if_statement "if (iVar5 == 1) goto LAB_0001e50e;" if (parenthesized_expression "(iVar5 == 1)" ( (binary_expression "iVar5 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0001e50e;" goto statement_identifier ;)) })) (expression_statement "local_2c = 0xffffffff;" (assignment_expression "local_2c = 0xffffffff" identifier = number_literal) ;) (labeled_statement "LAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" statement_identifier : (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" if (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 == *(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 local_2c;\n  }" { (return_statement "return local_2c;" return identifier ;) }))) (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * IDENT)) , (binary_expression IDENT != (char_literal ' escape_sequence '))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression (string_literal " string_content ") + IDENT) + LIT) , (pointer_expression & IDENT) )))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) ])) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (subscript_expression IDENT [ LIT ]) ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression (string_literal " string_content ") + IDENT) + LIT) , (pointer_expression & IDENT) )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 sg_get_num_nomult(void)\n\n{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    \n  FUN_0002f100();\n}" (type_identifier "undefined4") (function_declarator "sg_get_num_nomult(void)" (identifier "sg_get_num_nomult") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  char cVar1;\n  __int32_t *p_Var2;\n  char *pcVar3;\n  __int32_t **pp_Var4;\n  int iVar5;\n  size_t sVar6;\n  int unaff_EBX;\n  int in_GS_OFFSET;\n  char *unaff_retaddr;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1e489;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }\n  local_2c = 0xffffffff;\nLAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }\n                    \n  FUN_0002f100();\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "__int32_t *p_Var2;" (type_identifier "__int32_t") (pointer_declarator "*p_Var2" (* "*") (identifier "p_Var2")) (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "__int32_t **pp_Var4;" (type_identifier "__int32_t") (pointer_declarator "**pp_Var4" (* "*") (pointer_declarator "*pp_Var4" (* "*") (identifier "pp_Var4"))) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *unaff_retaddr;" (primitive_type "char") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (declaration "undefined4 local_2c;" (type_identifier "undefined4") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1e489;" (assignment_expression "uStack_14 = 0x1e489" (identifier "uStack_14") (= "=") (number_literal "0x1e489")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" (if "if") (parenthesized_expression "((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0'))" (( "(") (binary_expression "(unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')" (parenthesized_expression "(unaff_retaddr != (char *)0x0)" (( "(") (binary_expression "unaff_retaddr != (char *)0x0" (identifier "unaff_retaddr") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(cVar1 = *unaff_retaddr, cVar1 != '\0')" (( "(") (comma_expression "cVar1 = *unaff_retaddr, cVar1 != '\0'" (assignment_expression "cVar1 = *unaff_retaddr" (identifier "cVar1") (= "=") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr"))) (, ",") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n    pcVar3 = strchr(unaff_retaddr + 1,0x2c);\n    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }\n    if (iVar5 == 1) goto LAB_0001e50e;\n  }" ({ "{") (expression_statement "pcVar3 = strchr(unaff_retaddr + 1,0x2c);" (assignment_expression "pcVar3 = strchr(unaff_retaddr + 1,0x2c)" (identifier "pcVar3") (= "=") (call_expression "strchr(unaff_retaddr + 1,0x2c)" (identifier "strchr") (argument_list "(unaff_retaddr + 1,0x2c)" (( "(") (binary_expression "unaff_retaddr + 1" (identifier "unaff_retaddr") (+ "+") (number_literal "1")) (, ",") (number_literal "0x2c") () ")")))) (; ";")) (if_statement "if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }\n    else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" (if "if") (parenthesized_expression "((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58))" (( "(") (binary_expression "(cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)" (parenthesized_expression "(cVar1 == '0')" (( "(") (binary_expression "cVar1 == '0'" (identifier "cVar1") (== "==") (char_literal "'0'" (' "'") (character "0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "((unaff_retaddr[1] & 0xdfU) == 0x58)" (( "(") (binary_expression "(unaff_retaddr[1] & 0xdfU) == 0x58" (parenthesized_expression "(unaff_retaddr[1] & 0xdfU)" (( "(") (binary_expression "unaff_retaddr[1] & 0xdfU" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0xdfU")) () ")")) (== "==") (number_literal "0x58")) () ")"))) () ")")) (compound_statement "{\n      unaff_retaddr = unaff_retaddr + 2;\nLAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );\n      local_2c = local_28;\n    }" ({ "{") (expression_statement "unaff_retaddr = unaff_retaddr + 2;" (assignment_expression "unaff_retaddr = unaff_retaddr + 2" (identifier "unaff_retaddr") (= "=") (binary_expression "unaff_retaddr + 2" (identifier "unaff_retaddr") (+ "+") (number_literal "2"))) (; ";")) (labeled_statement "LAB_0001e54e:\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" (statement_identifier "LAB_0001e54e") (: ":") (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             );" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" (identifier "iVar5") (= "=") (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" (identifier "__isoc99_sscanf") (argument_list "(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28\n                             )" (( "(") (identifier "unaff_retaddr") (, ",") (binary_expression ""sg_decode_transportid_str" + unaff_EBX + 0x13" (binary_expression ""sg_decode_transportid_str" + unaff_EBX" (string_literal ""sg_decode_transportid_str"" (" """) (string_content "sg_decode_transportid_str") (" """)) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "0x13")) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";"))) (expression_statement "local_2c = local_28;" (assignment_expression "local_2c = local_28" (identifier "local_2c") (= "=") (identifier "local_28")) (; ";")) (} "}")) (else_clause "else {\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" (else "else") (compound_statement "{\n      pp_Var4 = __ctype_toupper_loc();\n      p_Var2 = *pp_Var4;\n      if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }\n      if (iVar5 == 0x48) goto LAB_0001e54e;\n      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);\n    }" ({ "{") (expression_statement "pp_Var4 = __ctype_toupper_loc();" (assignment_expression "pp_Var4 = __ctype_toupper_loc()" (identifier "pp_Var4") (= "=") (call_expression "__ctype_toupper_loc()" (identifier "__ctype_toupper_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "p_Var2 = *pp_Var4;" (assignment_expression "p_Var2 = *pp_Var4" (identifier "p_Var2") (= "=") (pointer_expression "*pp_Var4" (* "*") (identifier "pp_Var4"))) (; ";")) (if_statement "if (pcVar3 == (char *)0x0) {\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }\n      else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" (if "if") (parenthesized_expression "(pcVar3 == (char *)0x0)" (( "(") (binary_expression "pcVar3 == (char *)0x0" (identifier "pcVar3") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        sVar6 = strlen(unaff_retaddr);\n        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];\n      }" ({ "{") (expression_statement "sVar6 = strlen(unaff_retaddr);" (assignment_expression "sVar6 = strlen(unaff_retaddr)" (identifier "sVar6") (= "=") (call_expression "strlen(unaff_retaddr)" (identifier "strlen") (argument_list "(unaff_retaddr)" (( "(") (identifier "unaff_retaddr") () ")")))) (; ";")) (expression_statement "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];" (assignment_expression "iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]]" (identifier "iVar5") (= "=") (subscript_expression "p_Var2[unaff_retaddr[sVar6 - 1]]" (identifier "p_Var2") ([ "[") (subscript_expression "unaff_retaddr[sVar6 - 1]" (identifier "unaff_retaddr") ([ "[") (binary_expression "sVar6 - 1" (identifier "sVar6") (- "-") (number_literal "1")) (] "]")) (] "]"))) (; ";")) (} "}")) (else_clause "else {\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" (else "else") (compound_statement "{\n        iVar5 = p_Var2[pcVar3[-1]];\n      }" ({ "{") (expression_statement "iVar5 = p_Var2[pcVar3[-1]];" (assignment_expression "iVar5 = p_Var2[pcVar3[-1]]" (identifier "iVar5") (= "=") (subscript_expression "p_Var2[pcVar3[-1]]" (identifier "p_Var2") ([ "[") (subscript_expression "pcVar3[-1]" (identifier "pcVar3") ([ "[") (number_literal "-1") (] "]")) (] "]"))) (; ";")) (} "}")))) (if_statement "if (iVar5 == 0x48) goto LAB_0001e54e;" (if "if") (parenthesized_expression "(iVar5 == 0x48)" (( "(") (binary_expression "iVar5 == 0x48" (identifier "iVar5") (== "==") (number_literal "0x48")) () ")")) (goto_statement "goto LAB_0001e54e;" (goto "goto") (statement_identifier "LAB_0001e54e") (; ";"))) (expression_statement "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);" (assignment_expression "iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" (identifier "iVar5") (= "=") (call_expression "__isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" (identifier "__isoc99_sscanf") (argument_list "(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c)" (( "(") (identifier "unaff_retaddr") (, ",") (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX + 0xe" (binary_expression ""sg_scsi_normalize_sense" + unaff_EBX" (string_literal ""sg_scsi_normalize_sense"" (" """) (string_content "sg_scsi_normalize_sense") (" """)) (+ "+") (identifier "unaff_EBX")) (+ "+") (number_literal "0xe")) (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar5 == 1) goto LAB_0001e50e;" (if "if") (parenthesized_expression "(iVar5 == 1)" (( "(") (binary_expression "iVar5 == 1" (identifier "iVar5") (== "==") (number_literal "1")) () ")")) (goto_statement "goto LAB_0001e50e;" (goto "goto") (statement_identifier "LAB_0001e50e") (; ";"))) (} "}"))) (expression_statement "local_2c = 0xffffffff;" (assignment_expression "local_2c = 0xffffffff" (identifier "local_2c") (= "=") (number_literal "0xffffffff")) (; ";")) (labeled_statement "LAB_0001e50e:\n  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" (statement_identifier "LAB_0001e50e") (: ":") (if_statement "if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return local_2c;\n  }" (if "if") (parenthesized_expression "(local_24 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (== "==") (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 local_2c;\n  }" ({ "{") (return_statement "return local_2c;" (return "return") (identifier "local_2c") (; ";")) (} "}")))) (expression_statement "FUN_0002f100();" (call_expression "FUN_0002f100()" (identifier "FUN_0002f100") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(char *var_2)

{
  char var_3;
  type_1 *p_Var2;
  char *var_7;
  type_1 **pp_Var4;
  int var_10;
  size_t var_9;
  int var_1;
  int num;
  type_2 unum;
  int var_11;
  type_3 uStack_14;
  
  uStack_14 = 0x1e489;
  var_11 = *(int *)(var_1 + 0x14);
  if ((var_2 != (char *)0x0) && (var_3 = *var_2, var_3 != '\0')) {
    var_7 = var_4(var_2 + 1,0x2c);
    if ((var_3 == '0') && ((var_2[1] & 0xdfU) == 0x58)) {
      var_2 = var_2 + 2;
LAB_0001e54e:
      var_10 = var_5(var_2,"%x",&unum);
      num = unum;
    }
    else {
      pp_Var4 = var_6();
      p_Var2 = *pp_Var4;
      if (var_7 == (char *)0x0) {
        var_9 = var_8(var_2);
        var_10 = p_Var2[var_2[var_9 - 1]];
      }
      else {
        var_10 = p_Var2[var_7[-1]];
      }
      if (var_10 == 0x48) goto LAB_0001e54e;
      var_10 = var_5(var_2,"%d",&num);
    }
    if (var_10 == 1) goto LAB_0001e50e;
  }
  num = -1;
LAB_0001e50e:
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return num;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


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

undefined4 MASKED(void)

{
  char cVar1;
  __int32_t *p_Var2;
  char *pcVar3;
  __int32_t **pp_Var4;
  int iVar5;
  size_t sVar6;
  int unaff_EBX;
  int in_GS_OFFSET;
  char *unaff_retaddr;
  undefined4 local_2c;
  undefined4 local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x1e489;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  if ((unaff_retaddr != (char *)0x0) && (cVar1 = *unaff_retaddr, cVar1 != '\0')) {
    pcVar3 = strchr(unaff_retaddr + 1,0x2c);
    if ((cVar1 == '0') && ((unaff_retaddr[1] & 0xdfU) == 0x58)) {
      unaff_retaddr = unaff_retaddr + 2;
LAB_0001e54e:
      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_decode_transportid_str" + unaff_EBX + 0x13,&local_28
                             );
      local_2c = local_28;
    }
    else {
      pp_Var4 = __ctype_toupper_loc();
      p_Var2 = *pp_Var4;
      if (pcVar3 == (char *)0x0) {
        sVar6 = strlen(unaff_retaddr);
        iVar5 = p_Var2[unaff_retaddr[sVar6 - 1]];
      }
      else {
        iVar5 = p_Var2[pcVar3[-1]];
      }
      if (iVar5 == 0x48) goto LAB_0001e54e;
      iVar5 = __isoc99_sscanf(unaff_retaddr,"sg_scsi_normalize_sense" + unaff_EBX + 0xe,&local_2c);
    }
    if (iVar5 == 1) goto LAB_0001e50e;
  }
  local_2c = 0xffffffff;
LAB_0001e50e:
  if (local_24 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_2c;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0002f100();
}

