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

void __regparm3 sntl_check_enclosure_override(sg_pt_linux_scsi *ptp,int vb)

{
  byte bVar1;
  uint8_t *puVar2;
  int iVar3;
  byte bVar4;
  
  puVar2 = ptp->nvme_id_ctlp;
  if (puVar2 != (uint8_t *)0x0) {
    bVar1 = puVar2[0xfd];
    if (3 < vb) {
      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);
    }
    bVar4 = (ptp->dev_stat).enclosure_override;
    (ptp->dev_stat).id_ctl253 = bVar1;
    if (bVar4 == 2) {
LAB_0002dc80:
      (ptp->dev_stat).pdt = '\0';
      (ptp->dev_stat).enc_serv = '\x01';
      return;
    }
    if (bVar4 < 3) {
      if (bVar4 != 0) {
        if (bVar4 == 1) {
LAB_0002dc3c:
          (ptp->dev_stat).pdt = '\r';
          (ptp->dev_stat).enc_serv = '\x01';
          return;
        }
        goto LAB_0002dce8;
      }
      if ((bVar1 & 3) != 0) goto LAB_0002dc80;
      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;
      bVar4 = bVar1 & 1;
      if ((bVar1 & 1) == 0) {
        iVar3 = *(int *)(puVar2 + 0x204);
        (ptp->dev_stat).enc_serv = '\0';
        if (iVar3 == 0) {
          bVar4 = 0x1f;
        }
        (ptp->dev_stat).pdt = bVar4;
        return;
      }
    }
    else {
      if (bVar4 == 3) {
        (ptp->dev_stat).pdt = '\x03';
        (ptp->dev_stat).enc_serv = '\x01';
        return;
      }
      if (bVar4 != 0xff) {
LAB_0002dce8:
        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",
              (uint)bVar4);
        return;
      }
    }
    (ptp->dev_stat).pdt = '\0';
    (ptp->dev_stat).enc_serv = '\0';
  }
  return;
}



void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)

{
  byte bVar1;
  int iVar2;
  int iVar3;
  byte bVar4;
  int unaff_EBX;
  
  iVar3 = entry(param_2,0x2dbd8);
  iVar2 = *(int *)(iVar3 + 0xd0);
  if (iVar2 != 0) {
    bVar1 = *(byte *)(iVar2 + 0xfd);
    if (3 < param_2) {
      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);
    }
    bVar4 = *(byte *)(iVar3 + 0xc5);
    *(byte *)(iVar3 + 200) = bVar1;
    if (bVar4 == 2) {
LAB_0002dc80:
      *(undefined2 *)(iVar3 + 0xc6) = 0x100;
      return;
    }
    if (bVar4 < 3) {
      if (bVar4 != 0) {
        if (bVar4 == 1) {
LAB_0002dc3c:
          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;
          return;
        }
        goto LAB_0002dce8;
      }
      if ((bVar1 & 3) != 0) goto LAB_0002dc80;
      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;
      bVar4 = bVar1 & 1;
      if ((bVar1 & 1) == 0) {
        iVar2 = *(int *)(iVar2 + 0x204);
        *(undefined1 *)(iVar3 + 199) = 0;
        if (iVar2 == 0) {
          bVar4 = 0x1f;
        }
        *(byte *)(iVar3 + 0xc6) = bVar4;
        return;
      }
    }
    else {
      if (bVar4 == 3) {
        *(undefined2 *)(iVar3 + 0xc6) = 0x103;
        return;
      }
      if (bVar4 != 0xff) {
LAB_0002dce8:
        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);
        return;
      }
    }
    *(undefined2 *)(iVar3 + 0xc6) = 0;
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017820
ADD EBX,0x1c1b0
SUB ESP,0x10
MOV EDI,dword ptr [EAX + 0xd0]
TEST EDI,EDI
JZ 0x0002dc25
MOV ESI,EAX
MOVZX ECX,byte ptr [EDI + 0xfd]
CMP EDX,0x3
JG 0x0002dc50
MOVZX EAX,byte ptr [ESI + 0xc5]
MOV byte ptr [ESI + 0xc8],CL
CMP AL,0x2
JZ 0x0002dc80
JBE 0x0002dc30
CMP AL,0x3
JZ 0x0002dcd0
CMP AL,0xff
JNZ 0x0002dce8
XOR EAX,EAX
MOV word ptr [ESI + 0xc6],AX
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
TEST AL,AL
JZ 0x0002dc98
CMP AL,0x1
JNZ 0x0002dce8
MOV EBX,0x10d
MOV word ptr [ESI + 0xc6],BX
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
MOVZX EAX,CL
MOV byte ptr [ESP + 0x13],CL
PUSH EAX
LEA EAX,[EBX + 0xffff4e40]
PUSH EAX
LEA EAX,[EBX + 0xffff47d4]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
MOVZX ECX,byte ptr [ESP + 0xf]
JMP 0x0002dbf9
MOV ECX,0x100
MOV word ptr [ESI + 0xc6],CX
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
TEST CL,0x3
JNZ 0x0002dc80
TEST CL,0x2
JNZ 0x0002dc3c
AND ECX,0x1
JNZ 0x0002dc1c
MOV EDI,dword ptr [EDI + 0x204]
MOV EAX,0x1f
MOV byte ptr [ESI + 0xc7],0x0
TEST EDI,EDI
CMOVZ ECX,EAX
MOV byte ptr [ESI + 0xc6],CL
JMP 0x0002dc25
MOV EDX,0x103
MOV word ptr [ESI + 0xc6],DX
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
PUSH EAX
LEA EAX,[EBX + 0xffff4e40]
PUSH EAX
LEA EAX,[EBX + 0xffff4880]
PUSH EAX
CALL 0x00017630
ADD ESP,0x10
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002dbd0(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "iVar3 = entry(param_2,0x2dbd8);" (assignment_expression "iVar3 = entry(param_2,0x2dbd8)" identifier = (call_expression "entry(param_2,0x2dbd8)" identifier (argument_list "(param_2,0x2dbd8)" ( identifier , number_literal )))) ;) (expression_statement "iVar2 = *(int *)(iVar3 + 0xd0);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0xd0)" identifier = (pointer_expression "*(int *)(iVar3 + 0xd0)" * (cast_expression "(int *)(iVar3 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xd0)" ( (binary_expression "iVar3 + 0xd0" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" { (expression_statement "bVar1 = *(byte *)(iVar2 + 0xfd);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0xfd)" identifier = (pointer_expression "*(byte *)(iVar2 + 0xfd)" * (cast_expression "(byte *)(iVar2 + 0xfd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xfd)" ( (binary_expression "iVar2 + 0xfd" identifier + number_literal) ))))) ;) (if_statement "if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" if (parenthesized_expression "(3 < param_2)" ( (binary_expression "3 < param_2" number_literal < identifier) )) (compound_statement "{\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" { (expression_statement "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);" (call_expression "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" identifier (argument_list "(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" ( (binary_expression "unaff_EBX + 0x10984" identifier + number_literal) , (binary_expression "unaff_EBX + 0x10ff0" identifier + number_literal) , identifier ))) ;) })) (expression_statement "bVar4 = *(byte *)(iVar3 + 0xc5);" (assignment_expression "bVar4 = *(byte *)(iVar3 + 0xc5)" identifier = (pointer_expression "*(byte *)(iVar3 + 0xc5)" * (cast_expression "(byte *)(iVar3 + 0xc5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc5)" ( (binary_expression "iVar3 + 0xc5" identifier + number_literal) ))))) ;) (expression_statement "*(byte *)(iVar3 + 200) = bVar1;" (assignment_expression "*(byte *)(iVar3 + 200) = bVar1" (pointer_expression "*(byte *)(iVar3 + 200)" * (cast_expression "(byte *)(iVar3 + 200)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 200)" ( (binary_expression "iVar3 + 200" identifier + number_literal) )))) = identifier) ;) (if_statement "if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" if (parenthesized_expression "(bVar4 == 2)" ( (binary_expression "bVar4 == 2" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" { (labeled_statement "LAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;" statement_identifier : (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x100;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x100" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;)) (return_statement "return;" return ;) })) (if_statement "if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" if (parenthesized_expression "(bVar4 < 3)" ( (binary_expression "bVar4 < 3" identifier < number_literal) )) (compound_statement "{\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }" { (if_statement "if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" if (parenthesized_expression "(bVar4 != 0)" ( (binary_expression "bVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" { (if_statement "if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" if (parenthesized_expression "(bVar4 == 1)" ( (binary_expression "bVar4 == 1" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" { (labeled_statement "LAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;" statement_identifier : (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x10d;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x10d" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;)) (return_statement "return;" return ;) })) (goto_statement "goto LAB_0002dce8;" goto statement_identifier ;) })) (if_statement "if ((bVar1 & 3) != 0) goto LAB_0002dc80;" if (parenthesized_expression "((bVar1 & 3) != 0)" ( (binary_expression "(bVar1 & 3) != 0" (parenthesized_expression "(bVar1 & 3)" ( (binary_expression "bVar1 & 3" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc80;" goto statement_identifier ;)) (if_statement "if ((bVar1 & 2) != 0) goto LAB_0002dc3c;" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc3c;" goto statement_identifier ;)) (expression_statement "bVar4 = bVar1 & 1;" (assignment_expression "bVar4 = bVar1 & 1" identifier = (binary_expression "bVar1 & 1" identifier & number_literal)) ;) (if_statement "if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" if (parenthesized_expression "((bVar1 & 1) == 0)" ( (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" { (expression_statement "iVar2 = *(int *)(iVar2 + 0x204);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x204)" identifier = (pointer_expression "*(int *)(iVar2 + 0x204)" * (cast_expression "(int *)(iVar2 + 0x204)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x204)" ( (binary_expression "iVar2 + 0x204" identifier + number_literal) ))))) ;) (expression_statement "*(undefined1 *)(iVar3 + 199) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 199) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 199)" * (cast_expression "(undefined1 *)(iVar3 + 199)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 199)" ( (binary_expression "iVar3 + 199" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          bVar4 = 0x1f;\n        }" { (expression_statement "bVar4 = 0x1f;" (assignment_expression "bVar4 = 0x1f" identifier = number_literal) ;) })) (expression_statement "*(byte *)(iVar3 + 0xc6) = bVar4;" (assignment_expression "*(byte *)(iVar3 + 0xc6) = bVar4" (pointer_expression "*(byte *)(iVar3 + 0xc6)" * (cast_expression "(byte *)(iVar3 + 0xc6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" else (compound_statement "{\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" { (if_statement "if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" if (parenthesized_expression "(bVar4 == 3)" ( (binary_expression "bVar4 == 3" identifier == number_literal) )) (compound_statement "{\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" { (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x103;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x103" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (if_statement "if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" if (parenthesized_expression "(bVar4 != 0xff)" ( (binary_expression "bVar4 != 0xff" identifier != number_literal) )) (compound_statement "{\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" { (labeled_statement "LAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" statement_identifier : (expression_statement "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" (call_expression "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" identifier (argument_list "(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" ( (binary_expression "unaff_EBX + 0x10a30" identifier + number_literal) , (binary_expression "unaff_EBX + 0x10ff0" identifier + number_literal) , identifier ))) ;)) (return_statement "return;" return ;) })) }))) (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 sntl_check_enclosure_override(sg_pt_linux_scsi *ptp,int vb)\n\n{\n  byte bVar1;\n  uint8_t *puVar2;\n  int iVar3;\n  byte bVar4;\n  \n  puVar2 = ptp->nvme_id_ctlp;\n  if (puVar2 != (uint8_t *)0x0) {\n    bVar1 = puVar2[0xfd];\n    if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }\n    bVar4 = (ptp->dev_stat).enclosure_override;\n    (ptp->dev_stat).id_ctl253 = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }\n    (ptp->dev_stat).pdt = '\0';\n    (ptp->dev_stat).enc_serv = '\0';\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 sntl_check_enclosure_override(sg_pt_linux_scsi *ptp,int vb)\n\n{\n  byte bVar1;\n  uint8_t *puVar2;\n  int iVar3;\n  byte bVar4;\n  \n  puVar2 = ptp->nvme_id_ctlp;\n  if (puVar2 != (uint8_t *)0x0) {\n    bVar1 = puVar2[0xfd];\n    if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }\n    bVar4 = (ptp->dev_stat).enclosure_override;\n    (ptp->dev_stat).id_ctl253 = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }\n    (ptp->dev_stat).pdt = '\0';\n    (ptp->dev_stat).enc_serv = '\0';\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "sntl_check_enclosure_override(sg_pt_linux_scsi *ptp,int vb)" identifier (parameter_list "(sg_pt_linux_scsi *ptp,int vb)" ( (parameter_declaration "sg_pt_linux_scsi *ptp" type_identifier (pointer_declarator "*ptp" * identifier)) , (parameter_declaration "int vb" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  uint8_t *puVar2;\n  int iVar3;\n  byte bVar4;\n  \n  puVar2 = ptp->nvme_id_ctlp;\n  if (puVar2 != (uint8_t *)0x0) {\n    bVar1 = puVar2[0xfd];\n    if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }\n    bVar4 = (ptp->dev_stat).enclosure_override;\n    (ptp->dev_stat).id_ctl253 = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }\n    (ptp->dev_stat).pdt = '\0';\n    (ptp->dev_stat).enc_serv = '\0';\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint8_t *puVar2;" primitive_type (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (expression_statement "puVar2 = ptp->nvme_id_ctlp;" (assignment_expression "puVar2 = ptp->nvme_id_ctlp" identifier = (field_expression "ptp->nvme_id_ctlp" identifier -> field_identifier)) ;) (if_statement "if (puVar2 != (uint8_t *)0x0) {\n    bVar1 = puVar2[0xfd];\n    if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }\n    bVar4 = (ptp->dev_stat).enclosure_override;\n    (ptp->dev_stat).id_ctl253 = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }\n    (ptp->dev_stat).pdt = '\0';\n    (ptp->dev_stat).enc_serv = '\0';\n  }" if (parenthesized_expression "(puVar2 != (uint8_t *)0x0)" ( (binary_expression "puVar2 != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    bVar1 = puVar2[0xfd];\n    if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }\n    bVar4 = (ptp->dev_stat).enclosure_override;\n    (ptp->dev_stat).id_ctl253 = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }\n    (ptp->dev_stat).pdt = '\0';\n    (ptp->dev_stat).enc_serv = '\0';\n  }" { (expression_statement "bVar1 = puVar2[0xfd];" (assignment_expression "bVar1 = puVar2[0xfd]" identifier = (subscript_expression "puVar2[0xfd]" identifier [ number_literal ])) ;) (if_statement "if (3 < vb) {\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }" if (parenthesized_expression "(3 < vb)" ( (binary_expression "3 < vb" number_literal < identifier) )) (compound_statement "{\n      pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);\n    }" { (expression_statement "pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1);" (call_expression "pr2ws("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1)" identifier (argument_list "("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(uint)bVar1)" ( (string_literal ""%s: enter, nvmsr=%u\n"" " string_content escape_sequence ") , (string_literal ""sntl_check_enclosure_override"" " string_content ") , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;) })) (expression_statement "bVar4 = (ptp->dev_stat).enclosure_override;" (assignment_expression "bVar4 = (ptp->dev_stat).enclosure_override" identifier = (field_expression "(ptp->dev_stat).enclosure_override" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(ptp->dev_stat).id_ctl253 = bVar1;" (assignment_expression "(ptp->dev_stat).id_ctl253 = bVar1" (field_expression "(ptp->dev_stat).id_ctl253" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if (bVar4 == 2) {\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }" if (parenthesized_expression "(bVar4 == 2)" ( (binary_expression "bVar4 == 2" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';\n      (ptp->dev_stat).enc_serv = '\x01';\n      return;\n    }" { (labeled_statement "LAB_0002dc80:\n      (ptp->dev_stat).pdt = '\0';" statement_identifier : (expression_statement "(ptp->dev_stat).pdt = '\0';" (assignment_expression "(ptp->dev_stat).pdt = '\0'" (field_expression "(ptp->dev_stat).pdt" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;)) (expression_statement "(ptp->dev_stat).enc_serv = '\x01';" (assignment_expression "(ptp->dev_stat).enc_serv = '\x01'" (field_expression "(ptp->dev_stat).enc_serv" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) (if_statement "if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }" if (parenthesized_expression "(bVar4 < 3)" ( (binary_expression "bVar4 < 3" identifier < number_literal) )) (compound_statement "{\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }\n    }" { (if_statement "if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }" if (parenthesized_expression "(bVar4 != 0)" ( (binary_expression "bVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }\n        goto LAB_0002dce8;\n      }" { (if_statement "if (bVar4 == 1) {\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }" if (parenthesized_expression "(bVar4 == 1)" ( (binary_expression "bVar4 == 1" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';\n          (ptp->dev_stat).enc_serv = '\x01';\n          return;\n        }" { (labeled_statement "LAB_0002dc3c:\n          (ptp->dev_stat).pdt = '\r';" statement_identifier : (expression_statement "(ptp->dev_stat).pdt = '\r';" (assignment_expression "(ptp->dev_stat).pdt = '\r'" (field_expression "(ptp->dev_stat).pdt" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\r'" ' escape_sequence ')) ;)) (expression_statement "(ptp->dev_stat).enc_serv = '\x01';" (assignment_expression "(ptp->dev_stat).enc_serv = '\x01'" (field_expression "(ptp->dev_stat).enc_serv" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_0002dce8;" goto statement_identifier ;) })) (if_statement "if ((bVar1 & 3) != 0) goto LAB_0002dc80;" if (parenthesized_expression "((bVar1 & 3) != 0)" ( (binary_expression "(bVar1 & 3) != 0" (parenthesized_expression "(bVar1 & 3)" ( (binary_expression "bVar1 & 3" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc80;" goto statement_identifier ;)) (if_statement "if ((bVar1 & 2) != 0) goto LAB_0002dc3c;" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc3c;" goto statement_identifier ;)) (expression_statement "bVar4 = bVar1 & 1;" (assignment_expression "bVar4 = bVar1 & 1" identifier = (binary_expression "bVar1 & 1" identifier & number_literal)) ;) (if_statement "if ((bVar1 & 1) == 0) {\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }" if (parenthesized_expression "((bVar1 & 1) == 0)" ( (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar3 = *(int *)(puVar2 + 0x204);\n        (ptp->dev_stat).enc_serv = '\0';\n        if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }\n        (ptp->dev_stat).pdt = bVar4;\n        return;\n      }" { (expression_statement "iVar3 = *(int *)(puVar2 + 0x204);" (assignment_expression "iVar3 = *(int *)(puVar2 + 0x204)" identifier = (pointer_expression "*(int *)(puVar2 + 0x204)" * (cast_expression "(int *)(puVar2 + 0x204)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 0x204)" ( (binary_expression "puVar2 + 0x204" identifier + number_literal) ))))) ;) (expression_statement "(ptp->dev_stat).enc_serv = '\0';" (assignment_expression "(ptp->dev_stat).enc_serv = '\0'" (field_expression "(ptp->dev_stat).enc_serv" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar3 == 0) {\n          bVar4 = 0x1f;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          bVar4 = 0x1f;\n        }" { (expression_statement "bVar4 = 0x1f;" (assignment_expression "bVar4 = 0x1f" identifier = number_literal) ;) })) (expression_statement "(ptp->dev_stat).pdt = bVar4;" (assignment_expression "(ptp->dev_stat).pdt = bVar4" (field_expression "(ptp->dev_stat).pdt" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }" else (compound_statement "{\n      if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }\n    }" { (if_statement "if (bVar4 == 3) {\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }" if (parenthesized_expression "(bVar4 == 3)" ( (binary_expression "bVar4 == 3" identifier == number_literal) )) (compound_statement "{\n        (ptp->dev_stat).pdt = '\x03';\n        (ptp->dev_stat).enc_serv = '\x01';\n        return;\n      }" { (expression_statement "(ptp->dev_stat).pdt = '\x03';" (assignment_expression "(ptp->dev_stat).pdt = '\x03'" (field_expression "(ptp->dev_stat).pdt" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\x03'" ' escape_sequence ')) ;) (expression_statement "(ptp->dev_stat).enc_serv = '\x01';" (assignment_expression "(ptp->dev_stat).enc_serv = '\x01'" (field_expression "(ptp->dev_stat).enc_serv" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })) (if_statement "if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }" if (parenthesized_expression "(bVar4 != 0xff)" ( (binary_expression "bVar4 != 0xff" identifier != number_literal) )) (compound_statement "{\nLAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);\n        return;\n      }" { (labeled_statement "LAB_0002dce8:\n        pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);" statement_identifier : (expression_statement "pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4);" (call_expression "pr2ws("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4)" identifier (argument_list "("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",\n              (uint)bVar4)" ( (string_literal ""%s: unknown enclosure_override value: %d\n"" " string_content escape_sequence ") , (string_literal ""sntl_check_enclosure_override"" " string_content ") , (cast_expression "(uint)bVar4" ( (type_descriptor "uint" type_identifier) ) identifier) ))) ;)) (return_statement "return;" return ;) })) }))) (expression_statement "(ptp->dev_stat).pdt = '\0';" (assignment_expression "(ptp->dev_stat).pdt = '\0'" (field_expression "(ptp->dev_stat).pdt" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "(ptp->dev_stat).enc_serv = '\0';" (assignment_expression "(ptp->dev_stat).enc_serv = '\0'" (field_expression "(ptp->dev_stat).enc_serv" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002dbd0(undefined4 param_1,int param_2)" identifier (parameter_list "(undefined4 param_1,int param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "byte bVar4;" type_identifier identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (expression_statement "iVar3 = entry(param_2,0x2dbd8);" (assignment_expression "iVar3 = entry(param_2,0x2dbd8)" identifier = (call_expression "entry(param_2,0x2dbd8)" identifier (argument_list "(param_2,0x2dbd8)" ( identifier , number_literal )))) ;) (expression_statement "iVar2 = *(int *)(iVar3 + 0xd0);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0xd0)" identifier = (pointer_expression "*(int *)(iVar3 + 0xd0)" * (cast_expression "(int *)(iVar3 + 0xd0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xd0)" ( (binary_expression "iVar3 + 0xd0" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" { (expression_statement "bVar1 = *(byte *)(iVar2 + 0xfd);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0xfd)" identifier = (pointer_expression "*(byte *)(iVar2 + 0xfd)" * (cast_expression "(byte *)(iVar2 + 0xfd)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xfd)" ( (binary_expression "iVar2 + 0xfd" identifier + number_literal) ))))) ;) (if_statement "if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" if (parenthesized_expression "(3 < param_2)" ( (binary_expression "3 < param_2" number_literal < identifier) )) (compound_statement "{\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" { (expression_statement "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);" (call_expression "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" identifier (argument_list "(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" ( (binary_expression "unaff_EBX + 0x10984" identifier + number_literal) , (binary_expression "unaff_EBX + 0x10ff0" identifier + number_literal) , identifier ))) ;) })) (expression_statement "bVar4 = *(byte *)(iVar3 + 0xc5);" (assignment_expression "bVar4 = *(byte *)(iVar3 + 0xc5)" identifier = (pointer_expression "*(byte *)(iVar3 + 0xc5)" * (cast_expression "(byte *)(iVar3 + 0xc5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc5)" ( (binary_expression "iVar3 + 0xc5" identifier + number_literal) ))))) ;) (expression_statement "*(byte *)(iVar3 + 200) = bVar1;" (assignment_expression "*(byte *)(iVar3 + 200) = bVar1" (pointer_expression "*(byte *)(iVar3 + 200)" * (cast_expression "(byte *)(iVar3 + 200)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 200)" ( (binary_expression "iVar3 + 200" identifier + number_literal) )))) = identifier) ;) (if_statement "if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" if (parenthesized_expression "(bVar4 == 2)" ( (binary_expression "bVar4 == 2" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" { (labeled_statement "LAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;" statement_identifier : (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x100;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x100" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;)) (return_statement "return;" return ;) })) (if_statement "if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" if (parenthesized_expression "(bVar4 < 3)" ( (binary_expression "bVar4 < 3" identifier < number_literal) )) (compound_statement "{\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }" { (if_statement "if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" if (parenthesized_expression "(bVar4 != 0)" ( (binary_expression "bVar4 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" { (if_statement "if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" if (parenthesized_expression "(bVar4 == 1)" ( (binary_expression "bVar4 == 1" identifier == number_literal) )) (compound_statement "{\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" { (labeled_statement "LAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;" statement_identifier : (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x10d;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x10d" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;)) (return_statement "return;" return ;) })) (goto_statement "goto LAB_0002dce8;" goto statement_identifier ;) })) (if_statement "if ((bVar1 & 3) != 0) goto LAB_0002dc80;" if (parenthesized_expression "((bVar1 & 3) != 0)" ( (binary_expression "(bVar1 & 3) != 0" (parenthesized_expression "(bVar1 & 3)" ( (binary_expression "bVar1 & 3" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc80;" goto statement_identifier ;)) (if_statement "if ((bVar1 & 2) != 0) goto LAB_0002dc3c;" if (parenthesized_expression "((bVar1 & 2) != 0)" ( (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" ( (binary_expression "bVar1 & 2" identifier & number_literal) )) != number_literal) )) (goto_statement "goto LAB_0002dc3c;" goto statement_identifier ;)) (expression_statement "bVar4 = bVar1 & 1;" (assignment_expression "bVar4 = bVar1 & 1" identifier = (binary_expression "bVar1 & 1" identifier & number_literal)) ;) (if_statement "if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" if (parenthesized_expression "((bVar1 & 1) == 0)" ( (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" ( (binary_expression "bVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" { (expression_statement "iVar2 = *(int *)(iVar2 + 0x204);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x204)" identifier = (pointer_expression "*(int *)(iVar2 + 0x204)" * (cast_expression "(int *)(iVar2 + 0x204)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x204)" ( (binary_expression "iVar2 + 0x204" identifier + number_literal) ))))) ;) (expression_statement "*(undefined1 *)(iVar3 + 199) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 199) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 199)" * (cast_expression "(undefined1 *)(iVar3 + 199)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 199)" ( (binary_expression "iVar3 + 199" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          bVar4 = 0x1f;\n        }" { (expression_statement "bVar4 = 0x1f;" (assignment_expression "bVar4 = 0x1f" identifier = number_literal) ;) })) (expression_statement "*(byte *)(iVar3 + 0xc6) = bVar4;" (assignment_expression "*(byte *)(iVar3 + 0xc6) = bVar4" (pointer_expression "*(byte *)(iVar3 + 0xc6)" * (cast_expression "(byte *)(iVar3 + 0xc6)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" else (compound_statement "{\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" { (if_statement "if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" if (parenthesized_expression "(bVar4 == 3)" ( (binary_expression "bVar4 == 3" identifier == number_literal) )) (compound_statement "{\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" { (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x103;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x103" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (if_statement "if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" if (parenthesized_expression "(bVar4 != 0xff)" ( (binary_expression "bVar4 != 0xff" identifier != number_literal) )) (compound_statement "{\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" { (labeled_statement "LAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" statement_identifier : (expression_statement "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" (call_expression "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" identifier (argument_list "(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" ( (binary_expression "unaff_EBX + 0x10a30" identifier + number_literal) , (binary_expression "unaff_EBX + 0x10ff0" identifier + number_literal) , identifier ))) ;)) (return_statement "return;" return ;) })) }))) (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" * (cast_expression "(undefined2 *)(iVar3 + 0xc6)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc6)" ( (binary_expression "iVar3 + 0xc6" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (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 IDENT != LIT) )) (compound_statement { (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 LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;)) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;)) (return_statement return ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;)) (return_statement return ;) })) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0002dbd0(undefined4 param_1,int param_2)\n\n{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002dbd0(undefined4 param_1,int param_2)" (identifier "FUN_0002dbd0") (parameter_list "(undefined4 param_1,int param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  byte bVar1;\n  int iVar2;\n  int iVar3;\n  byte bVar4;\n  int unaff_EBX;\n  \n  iVar3 = entry(param_2,0x2dbd8);\n  iVar2 = *(int *)(iVar3 + 0xd0);\n  if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }\n  return;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "byte bVar4;" (type_identifier "byte") (identifier "bVar4") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (expression_statement "iVar3 = entry(param_2,0x2dbd8);" (assignment_expression "iVar3 = entry(param_2,0x2dbd8)" (identifier "iVar3") (= "=") (call_expression "entry(param_2,0x2dbd8)" (identifier "entry") (argument_list "(param_2,0x2dbd8)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2dbd8") () ")")))) (; ";")) (expression_statement "iVar2 = *(int *)(iVar3 + 0xd0);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0xd0)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar3 + 0xd0)" (* "*") (cast_expression "(int *)(iVar3 + 0xd0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xd0)" (( "(") (binary_expression "iVar3 + 0xd0" (identifier "iVar3") (+ "+") (number_literal "0xd0")) () ")"))))) (; ";")) (if_statement "if (iVar2 != 0) {\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    bVar1 = *(byte *)(iVar2 + 0xfd);\n    if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }\n    bVar4 = *(byte *)(iVar3 + 0xc5);\n    *(byte *)(iVar3 + 200) = bVar1;\n    if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }\n    if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }\n    *(undefined2 *)(iVar3 + 0xc6) = 0;\n  }" ({ "{") (expression_statement "bVar1 = *(byte *)(iVar2 + 0xfd);" (assignment_expression "bVar1 = *(byte *)(iVar2 + 0xfd)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(iVar2 + 0xfd)" (* "*") (cast_expression "(byte *)(iVar2 + 0xfd)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xfd)" (( "(") (binary_expression "iVar2 + 0xfd" (identifier "iVar2") (+ "+") (number_literal "0xfd")) () ")"))))) (; ";")) (if_statement "if (3 < param_2) {\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" (if "if") (parenthesized_expression "(3 < param_2)" (( "(") (binary_expression "3 < param_2" (number_literal "3") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);\n    }" ({ "{") (expression_statement "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);" (call_expression "pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1)" (( "(") (binary_expression "unaff_EBX + 0x10984" (identifier "unaff_EBX") (+ "+") (number_literal "0x10984")) (, ",") (binary_expression "unaff_EBX + 0x10ff0" (identifier "unaff_EBX") (+ "+") (number_literal "0x10ff0")) (, ",") (identifier "bVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "bVar4 = *(byte *)(iVar3 + 0xc5);" (assignment_expression "bVar4 = *(byte *)(iVar3 + 0xc5)" (identifier "bVar4") (= "=") (pointer_expression "*(byte *)(iVar3 + 0xc5)" (* "*") (cast_expression "(byte *)(iVar3 + 0xc5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc5)" (( "(") (binary_expression "iVar3 + 0xc5" (identifier "iVar3") (+ "+") (number_literal "0xc5")) () ")"))))) (; ";")) (expression_statement "*(byte *)(iVar3 + 200) = bVar1;" (assignment_expression "*(byte *)(iVar3 + 200) = bVar1" (pointer_expression "*(byte *)(iVar3 + 200)" (* "*") (cast_expression "(byte *)(iVar3 + 200)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 200)" (( "(") (binary_expression "iVar3 + 200" (identifier "iVar3") (+ "+") (number_literal "200")) () ")")))) (= "=") (identifier "bVar1")) (; ";")) (if_statement "if (bVar4 == 2) {\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" (if "if") (parenthesized_expression "(bVar4 == 2)" (( "(") (binary_expression "bVar4 == 2" (identifier "bVar4") (== "==") (number_literal "2")) () ")")) (compound_statement "{\nLAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;\n      return;\n    }" ({ "{") (labeled_statement "LAB_0002dc80:\n      *(undefined2 *)(iVar3 + 0xc6) = 0x100;" (statement_identifier "LAB_0002dc80") (: ":") (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x100;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x100" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" (* "*") (cast_expression "(undefined2 *)(iVar3 + 0xc6)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc6)" (( "(") (binary_expression "iVar3 + 0xc6" (identifier "iVar3") (+ "+") (number_literal "0xc6")) () ")")))) (= "=") (number_literal "0x100")) (; ";"))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (bVar4 < 3) {\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }\n    else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" (if "if") (parenthesized_expression "(bVar4 < 3)" (( "(") (binary_expression "bVar4 < 3" (identifier "bVar4") (< "<") (number_literal "3")) () ")")) (compound_statement "{\n      if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }\n      if ((bVar1 & 3) != 0) goto LAB_0002dc80;\n      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;\n      bVar4 = bVar1 & 1;\n      if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }\n    }" ({ "{") (if_statement "if (bVar4 != 0) {\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" (if "if") (parenthesized_expression "(bVar4 != 0)" (( "(") (binary_expression "bVar4 != 0" (identifier "bVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }\n        goto LAB_0002dce8;\n      }" ({ "{") (if_statement "if (bVar4 == 1) {\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" (if "if") (parenthesized_expression "(bVar4 == 1)" (( "(") (binary_expression "bVar4 == 1" (identifier "bVar4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\nLAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;\n          return;\n        }" ({ "{") (labeled_statement "LAB_0002dc3c:\n          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;" (statement_identifier "LAB_0002dc3c") (: ":") (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x10d;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x10d" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" (* "*") (cast_expression "(undefined2 *)(iVar3 + 0xc6)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc6)" (( "(") (binary_expression "iVar3 + 0xc6" (identifier "iVar3") (+ "+") (number_literal "0xc6")) () ")")))) (= "=") (number_literal "0x10d")) (; ";"))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (goto_statement "goto LAB_0002dce8;" (goto "goto") (statement_identifier "LAB_0002dce8") (; ";")) (} "}"))) (if_statement "if ((bVar1 & 3) != 0) goto LAB_0002dc80;" (if "if") (parenthesized_expression "((bVar1 & 3) != 0)" (( "(") (binary_expression "(bVar1 & 3) != 0" (parenthesized_expression "(bVar1 & 3)" (( "(") (binary_expression "bVar1 & 3" (identifier "bVar1") (& "&") (number_literal "3")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0002dc80;" (goto "goto") (statement_identifier "LAB_0002dc80") (; ";"))) (if_statement "if ((bVar1 & 2) != 0) goto LAB_0002dc3c;" (if "if") (parenthesized_expression "((bVar1 & 2) != 0)" (( "(") (binary_expression "(bVar1 & 2) != 0" (parenthesized_expression "(bVar1 & 2)" (( "(") (binary_expression "bVar1 & 2" (identifier "bVar1") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0002dc3c;" (goto "goto") (statement_identifier "LAB_0002dc3c") (; ";"))) (expression_statement "bVar4 = bVar1 & 1;" (assignment_expression "bVar4 = bVar1 & 1" (identifier "bVar4") (= "=") (binary_expression "bVar1 & 1" (identifier "bVar1") (& "&") (number_literal "1"))) (; ";")) (if_statement "if ((bVar1 & 1) == 0) {\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" (if "if") (parenthesized_expression "((bVar1 & 1) == 0)" (( "(") (binary_expression "(bVar1 & 1) == 0" (parenthesized_expression "(bVar1 & 1)" (( "(") (binary_expression "bVar1 & 1" (identifier "bVar1") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar2 = *(int *)(iVar2 + 0x204);\n        *(undefined1 *)(iVar3 + 199) = 0;\n        if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }\n        *(byte *)(iVar3 + 0xc6) = bVar4;\n        return;\n      }" ({ "{") (expression_statement "iVar2 = *(int *)(iVar2 + 0x204);" (assignment_expression "iVar2 = *(int *)(iVar2 + 0x204)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar2 + 0x204)" (* "*") (cast_expression "(int *)(iVar2 + 0x204)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x204)" (( "(") (binary_expression "iVar2 + 0x204" (identifier "iVar2") (+ "+") (number_literal "0x204")) () ")"))))) (; ";")) (expression_statement "*(undefined1 *)(iVar3 + 199) = 0;" (assignment_expression "*(undefined1 *)(iVar3 + 199) = 0" (pointer_expression "*(undefined1 *)(iVar3 + 199)" (* "*") (cast_expression "(undefined1 *)(iVar3 + 199)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 199)" (( "(") (binary_expression "iVar3 + 199" (identifier "iVar3") (+ "+") (number_literal "199")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar2 == 0) {\n          bVar4 = 0x1f;\n        }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          bVar4 = 0x1f;\n        }" ({ "{") (expression_statement "bVar4 = 0x1f;" (assignment_expression "bVar4 = 0x1f" (identifier "bVar4") (= "=") (number_literal "0x1f")) (; ";")) (} "}"))) (expression_statement "*(byte *)(iVar3 + 0xc6) = bVar4;" (assignment_expression "*(byte *)(iVar3 + 0xc6) = bVar4" (pointer_expression "*(byte *)(iVar3 + 0xc6)" (* "*") (cast_expression "(byte *)(iVar3 + 0xc6)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc6)" (( "(") (binary_expression "iVar3 + 0xc6" (identifier "iVar3") (+ "+") (number_literal "0xc6")) () ")")))) (= "=") (identifier "bVar4")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" (else "else") (compound_statement "{\n      if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }\n      if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }\n    }" ({ "{") (if_statement "if (bVar4 == 3) {\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" (if "if") (parenthesized_expression "(bVar4 == 3)" (( "(") (binary_expression "bVar4 == 3" (identifier "bVar4") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n        *(undefined2 *)(iVar3 + 0xc6) = 0x103;\n        return;\n      }" ({ "{") (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0x103;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0x103" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" (* "*") (cast_expression "(undefined2 *)(iVar3 + 0xc6)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc6)" (( "(") (binary_expression "iVar3 + 0xc6" (identifier "iVar3") (+ "+") (number_literal "0xc6")) () ")")))) (= "=") (number_literal "0x103")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (bVar4 != 0xff) {\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" (if "if") (parenthesized_expression "(bVar4 != 0xff)" (( "(") (binary_expression "bVar4 != 0xff" (identifier "bVar4") (!= "!=") (number_literal "0xff")) () ")")) (compound_statement "{\nLAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);\n        return;\n      }" ({ "{") (labeled_statement "LAB_0002dce8:\n        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" (statement_identifier "LAB_0002dce8") (: ":") (expression_statement "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);" (call_expression "pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" (identifier "pr2ws") (argument_list "(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4)" (( "(") (binary_expression "unaff_EBX + 0x10a30" (identifier "unaff_EBX") (+ "+") (number_literal "0x10a30")) (, ",") (binary_expression "unaff_EBX + 0x10ff0" (identifier "unaff_EBX") (+ "+") (number_literal "0x10ff0")) (, ",") (identifier "bVar4") () ")"))) (; ";"))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (expression_statement "*(undefined2 *)(iVar3 + 0xc6) = 0;" (assignment_expression "*(undefined2 *)(iVar3 + 0xc6) = 0" (pointer_expression "*(undefined2 *)(iVar3 + 0xc6)" (* "*") (cast_expression "(undefined2 *)(iVar3 + 0xc6)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc6)" (( "(") (binary_expression "iVar3 + 0xc6" (identifier "iVar3") (+ "+") (number_literal "0xc6")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *ptp,int var_2)

{
  type_2 var_5;
  uint8_t *var_1;
  int var_6;
  type_2 var_4;
  
  var_1 = ptp->nvme_id_ctlp;
  if (var_1 != (uint8_t *)0x0) {
    var_5 = var_1[0xfd];
    if (3 < var_2) {
      var_3("%s: enter, nvmsr=%u\n","sntl_check_enclosure_override",(type_3)var_5);
    }
    var_4 = (ptp->dev_stat).enclosure_override;
    (ptp->dev_stat).id_ctl253 = var_5;
    if (var_4 == 2) {
LAB_0002dc80:
      (ptp->dev_stat).pdt = '\0';
      (ptp->dev_stat).enc_serv = '\x01';
      return;
    }
    if (var_4 < 3) {
      if (var_4 != 0) {
        if (var_4 == 1) {
LAB_0002dc3c:
          (ptp->dev_stat).pdt = '\r';
          (ptp->dev_stat).enc_serv = '\x01';
          return;
        }
        goto LAB_0002dce8;
      }
      if ((var_5 & 3) != 0) goto LAB_0002dc80;
      if ((var_5 & 2) != 0) goto LAB_0002dc3c;
      var_4 = var_5 & 1;
      if ((var_5 & 1) == 0) {
        var_6 = *(int *)(var_1 + 0x204);
        (ptp->dev_stat).enc_serv = '\0';
        if (var_6 == 0) {
          var_4 = 0x1f;
        }
        (ptp->dev_stat).pdt = var_4;
        return;
      }
    }
    else {
      if (var_4 == 3) {
        (ptp->dev_stat).pdt = '\x03';
        (ptp->dev_stat).enc_serv = '\x01';
        return;
      }
      if (var_4 != 0xff) {
LAB_0002dce8:
        var_3("%s: unknown enclosure_override value: %d\n","sntl_check_enclosure_override",
              (type_3)var_4);
        return;
      }
    }
    (ptp->dev_stat).pdt = '\0';
    (ptp->dev_stat).enc_serv = '\0';
  }
  return;
}


(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: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (return_statement))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (identifier))))) (return_statement)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (return_statement))))

void __regparm3 MASKED(undefined4 param_1,int param_2)

{
  byte bVar1;
  int iVar2;
  int iVar3;
  byte bVar4;
  int unaff_EBX;
  
  iVar3 = entry(param_2,0x2dbd8);
  iVar2 = *(int *)(iVar3 + 0xd0);
  if (iVar2 != 0) {
    bVar1 = *(byte *)(iVar2 + 0xfd);
    if (3 < param_2) {
      pr2ws(unaff_EBX + 0x10984,unaff_EBX + 0x10ff0,bVar1);
    }
    bVar4 = *(byte *)(iVar3 + 0xc5);
    *(byte *)(iVar3 + 200) = bVar1;
    if (bVar4 == 2) {
LAB_0002dc80:
      *(undefined2 *)(iVar3 + 0xc6) = 0x100;
      return;
    }
    if (bVar4 < 3) {
      if (bVar4 != 0) {
        if (bVar4 == 1) {
LAB_0002dc3c:
          *(undefined2 *)(iVar3 + 0xc6) = 0x10d;
          return;
        }
        goto LAB_0002dce8;
      }
      if ((bVar1 & 3) != 0) goto LAB_0002dc80;
      if ((bVar1 & 2) != 0) goto LAB_0002dc3c;
      bVar4 = bVar1 & 1;
      if ((bVar1 & 1) == 0) {
        iVar2 = *(int *)(iVar2 + 0x204);
        *(undefined1 *)(iVar3 + 199) = 0;
        if (iVar2 == 0) {
          bVar4 = 0x1f;
        }
        *(byte *)(iVar3 + 0xc6) = bVar4;
        return;
      }
    }
    else {
      if (bVar4 == 3) {
        *(undefined2 *)(iVar3 + 0xc6) = 0x103;
        return;
      }
      if (bVar4 != 0xff) {
LAB_0002dce8:
        pr2ws(unaff_EBX + 0x10a30,unaff_EBX + 0x10ff0,bVar4);
        return;
      }
    }
    *(undefined2 *)(iVar3 + 0xc6) = 0;
  }
  return;
}

