
void mk_sense_asc_ascq(sg_pt_linux_scsi *ptp,int sk,int asc,int ascq,int vb)

{
  uint8_t uVar1;
  undefined *puVar2;
  __u32 _Var3;
  undefined4 uVar4;
  __u32 _Var5;
  
  _Var3 = (ptp->io_hdr).max_response_len;
  (ptp->io_hdr).device_status = 2;
  puVar2 = PTR_memset_00054968;
  uVar1 = (ptp->dev_stat).scsi_dsense;
  if ((int)_Var3 < 8) {
LAB_0002fe3c:
    if (ascq != 0) {
                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);
      return;
    }
  }
  else {
    _Var5 = _Var3;
    if (uVar1 == '\0') {
      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;
      _Var5 = 0x12;
      if ((int)_Var3 < 0x13) {
        _Var5 = _Var3;
      }
    }
    (ptp->io_hdr).response_len = _Var5;
    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);
    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);
    if (3 < ascq) {
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);
      return;
    }
  }
  return;
}



void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)

{
  char cVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  
  iVar3 = *(int *)(param_1 + 0x2c);
  *(undefined4 *)(param_1 + 0x74) = 2;
  puVar2 = PTR_memset_00054968;
  cVar1 = *(char *)(param_1 + 0xc4);
  if (iVar3 < 8) {
LAB_0002fe3c:
    if (param_4 != 0) {
                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);
      return;
    }
  }
  else {
    iVar5 = iVar3;
    if (cVar1 == '\0') {
      if (iVar3 < 0xe) goto LAB_0002fe3c;
      iVar5 = 0x12;
      if (iVar3 < 0x13) {
        iVar5 = iVar3;
      }
    }
    *(int *)(param_1 + 0x84) = iVar5;
    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);
    (*(code *)PTR_sg_build_sense_buffer_00054944)
              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);
    if (3 < param_4) {
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);
      return;
    }
  }
  return;
}


lui gp,0x3
addiu gp,gp,-0x3550
addu gp,gp,t9
addiu sp,sp,-0x38
lw v0,0x2c(a0)
li t1,0x2
lw v1,0x34(a0)
sw gp,0x18(sp)
slti t0,v0,0x8
sw ra,0x34(sp)
sw s3,0x30(sp)
sw s2,0x2c(sp)
sw s1,0x28(sp)
sw s0,0x24(sp)
sw t1,0x74(a0)
bne t0,zero,0x0002fe3c
_lbu s3,0xc4(a0)
beq s3,zero,0x0002fe24
_slti t0,v0,0xe
or t0,v0,zero
lw t9,-0x7ea8(gp)
or s2,a1,zero
or a1,zero,zero
sw t0,0x84(a0)
or s1,a2,zero
or a0,v1,zero
or a2,v0,zero
jalr t9
_or s0,a3,zero
lw gp,0x18(sp)
or v1,v0,zero
li a2,0x5
andi v0,s1,0xff
andi a3,s2,0xff
sw v0,0x10(sp)
lw t9,-0x7ecc(gp)
or a1,v1,zero
jalr t9
_sltu a0,zero,s3
slti a3,s0,0x4
beq a3,zero,0x0002fe74
_lw gp,0x18(sp)
lw ra,0x34(sp)
lw s3,0x30(sp)
lw s2,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x38
bne t0,zero,0x0002fe3c
_li t1,0x12
slti t0,v0,0x13
movn t1,v0,t0
b 0x0002fdb0
_or t0,t1,zero
beq a3,zero,0x0002fe0c
_lw ra,0x34(sp)
lw a1,-0x7fd0(gp)
or a2,v0,zero
lw a0,-0x7fd0(gp)
lw s3,0x30(sp)
addiu a1,a1,-0xbc
lw s2,0x2c(sp)
addiu a0,a0,-0x4bc
lw s1,0x28(sp)
lw s0,0x24(sp)
lw t9,-0x7f24(gp)
jr t9
_addiu sp,sp,0x38
lw a1,-0x7fd0(gp)
li a2,0x5
lw a0,-0x7fd0(gp)
or a3,s2,zero
lw t9,-0x7f24(gp)
addiu a1,a1,-0xbc
sw s1,0x10(sp)
jalr t9
_addiu a0,a0,-0x420
lw ra,0x34(sp)
lw s3,0x30(sp)
lw s2,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x38
(translation_unit "void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)" identifier (parameter_list "(int param_1,uint param_2,uint param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x2c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2c)" identifier = (pointer_expression "*(int *)(param_1 + 0x2c)" * (cast_expression "(int *)(param_1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x74) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x74) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = PTR_memset_00054968;" (assignment_expression "puVar2 = PTR_memset_00054968" identifier = identifier) ;) (expression_statement "cVar1 = *(char *)(param_1 + 0xc4);" (assignment_expression "cVar1 = *(char *)(param_1 + 0xc4)" identifier = (pointer_expression "*(char *)(param_1 + 0xc4)" * (cast_expression "(char *)(param_1 + 0xc4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc4)" ( (binary_expression "param_1 + 0xc4" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar3 < 8)" ( (binary_expression "iVar3 < 8" identifier < number_literal) )) (compound_statement "{\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }" { (labeled_statement "LAB_0002fe3c:\n    if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" statement_identifier : (if_statement "if (param_4 != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" { comment comment (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" ( (binary_expression "PTR_s_tatus_00054840 + -0x4bc" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , identifier ))) ;) (return_statement "return;" return ;) }))) }) (else_clause "else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" else (compound_statement "{\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" { (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" identifier = identifier) ;) (if_statement "if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" { (if_statement "if (iVar3 < 0xe) goto LAB_0002fe3c;" if (parenthesized_expression "(iVar3 < 0xe)" ( (binary_expression "iVar3 < 0xe" identifier < number_literal) )) (goto_statement "goto LAB_0002fe3c;" goto statement_identifier ;)) (expression_statement "iVar5 = 0x12;" (assignment_expression "iVar5 = 0x12" identifier = number_literal) ;) (if_statement "if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }" if (parenthesized_expression "(iVar3 < 0x13)" ( (binary_expression "iVar3 < 0x13" identifier < number_literal) )) (compound_statement "{\n        iVar5 = iVar3;\n      }" { (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" identifier = identifier) ;) })) })) (expression_statement "*(int *)(param_1 + 0x84) = iVar5;" (assignment_expression "*(int *)(param_1 + 0x84) = iVar5" (pointer_expression "*(int *)(param_1 + 0x84)" * (cast_expression "(int *)(param_1 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x84)" ( (binary_expression "param_1 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);" (assignment_expression "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" identifier = (call_expression "(*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x34),0,iVar3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x34)" * (cast_expression "(undefined4 *)(param_1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) , number_literal , identifier )))) ;) (expression_statement "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);" (call_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" (parenthesized_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)" ( (pointer_expression "*(code *)PTR_sg_build_sense_buffer_00054944" * (cast_expression "(code *)PTR_sg_build_sense_buffer_00054944" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) , identifier , number_literal , (binary_expression "param_2 & 0xff" identifier & number_literal) , (binary_expression "param_3 & 0xff" identifier & number_literal) ))) ;) (if_statement "if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" if (parenthesized_expression "(3 < param_4)" ( (binary_expression "3 < param_4" number_literal < identifier) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" ( (binary_expression "PTR_s_tatus_00054840 + -0x420" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) }))) (return_statement "return;" return ;) })))
(translation_unit "void mk_sense_asc_ascq(sg_pt_linux_scsi *ptp,int sk,int asc,int ascq,int vb)\n\n{\n  uint8_t uVar1;\n  undefined *puVar2;\n  __u32 _Var3;\n  undefined4 uVar4;\n  __u32 _Var5;\n  \n  _Var3 = (ptp->io_hdr).max_response_len;\n  (ptp->io_hdr).device_status = 2;\n  puVar2 = PTR_memset_00054968;\n  uVar1 = (ptp->dev_stat).scsi_dsense;\n  if ((int)_Var3 < 8) {\nLAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }\n  }\n  else {\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void mk_sense_asc_ascq(sg_pt_linux_scsi *ptp,int sk,int asc,int ascq,int vb)\n\n{\n  uint8_t uVar1;\n  undefined *puVar2;\n  __u32 _Var3;\n  undefined4 uVar4;\n  __u32 _Var5;\n  \n  _Var3 = (ptp->io_hdr).max_response_len;\n  (ptp->io_hdr).device_status = 2;\n  puVar2 = PTR_memset_00054968;\n  uVar1 = (ptp->dev_stat).scsi_dsense;\n  if ((int)_Var3 < 8) {\nLAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }\n  }\n  else {\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "mk_sense_asc_ascq(sg_pt_linux_scsi *ptp,int sk,int asc,int ascq,int vb)" identifier (parameter_list "(sg_pt_linux_scsi *ptp,int sk,int asc,int ascq,int vb)" ( (parameter_declaration "sg_pt_linux_scsi *ptp" type_identifier (pointer_declarator "*ptp" * identifier)) , (parameter_declaration "int sk" primitive_type identifier) , (parameter_declaration "int asc" primitive_type identifier) , (parameter_declaration "int ascq" primitive_type identifier) , (parameter_declaration "int vb" primitive_type identifier) ))) (compound_statement "{\n  uint8_t uVar1;\n  undefined *puVar2;\n  __u32 _Var3;\n  undefined4 uVar4;\n  __u32 _Var5;\n  \n  _Var3 = (ptp->io_hdr).max_response_len;\n  (ptp->io_hdr).device_status = 2;\n  puVar2 = PTR_memset_00054968;\n  uVar1 = (ptp->dev_stat).scsi_dsense;\n  if ((int)_Var3 < 8) {\nLAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }\n  }\n  else {\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }\n  return;\n}" { (declaration "uint8_t uVar1;" primitive_type identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "__u32 _Var3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "__u32 _Var5;" type_identifier identifier ;) (expression_statement "_Var3 = (ptp->io_hdr).max_response_len;" (assignment_expression "_Var3 = (ptp->io_hdr).max_response_len" identifier = (field_expression "(ptp->io_hdr).max_response_len" (parenthesized_expression "(ptp->io_hdr)" ( (field_expression "ptp->io_hdr" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "(ptp->io_hdr).device_status = 2;" (assignment_expression "(ptp->io_hdr).device_status = 2" (field_expression "(ptp->io_hdr).device_status" (parenthesized_expression "(ptp->io_hdr)" ( (field_expression "ptp->io_hdr" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "puVar2 = PTR_memset_00054968;" (assignment_expression "puVar2 = PTR_memset_00054968" identifier = identifier) ;) (expression_statement "uVar1 = (ptp->dev_stat).scsi_dsense;" (assignment_expression "uVar1 = (ptp->dev_stat).scsi_dsense" identifier = (field_expression "(ptp->dev_stat).scsi_dsense" (parenthesized_expression "(ptp->dev_stat)" ( (field_expression "ptp->dev_stat" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if ((int)_Var3 < 8) {\nLAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }\n  }\n  else {\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }" if (parenthesized_expression "((int)_Var3 < 8)" ( (binary_expression "(int)_Var3 < 8" (cast_expression "(int)_Var3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\nLAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }\n  }" { (labeled_statement "LAB_0002fe3c:\n    if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }" statement_identifier : (if_statement "if (ascq != 0) {\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }" if (parenthesized_expression "(ascq != 0)" ( (binary_expression "ascq != 0" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);\n      return;\n    }" { comment comment (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,_Var3)" ( (binary_expression "PTR_s_tatus_00054840 + -0x4bc" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , identifier ))) ;) (return_statement "return;" return ;) }))) }) (else_clause "else {\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }" else (compound_statement "{\n    _Var5 = _Var3;\n    if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }\n    (ptp->io_hdr).response_len = _Var5;\n    uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);\n    if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }\n  }" { (expression_statement "_Var5 = _Var3;" (assignment_expression "_Var5 = _Var3" identifier = identifier) ;) (if_statement "if (uVar1 == '\0') {\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }" if (parenthesized_expression "(uVar1 == '\0')" ( (binary_expression "uVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;\n      _Var5 = 0x12;\n      if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }\n    }" { (if_statement "if ((int)_Var3 < 0xe) goto LAB_0002fe3c;" if (parenthesized_expression "((int)_Var3 < 0xe)" ( (binary_expression "(int)_Var3 < 0xe" (cast_expression "(int)_Var3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (goto_statement "goto LAB_0002fe3c;" goto statement_identifier ;)) (expression_statement "_Var5 = 0x12;" (assignment_expression "_Var5 = 0x12" identifier = number_literal) ;) (if_statement "if ((int)_Var3 < 0x13) {\n        _Var5 = _Var3;\n      }" if (parenthesized_expression "((int)_Var3 < 0x13)" ( (binary_expression "(int)_Var3 < 0x13" (cast_expression "(int)_Var3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        _Var5 = _Var3;\n      }" { (expression_statement "_Var5 = _Var3;" (assignment_expression "_Var5 = _Var3" identifier = identifier) ;) })) })) (expression_statement "(ptp->io_hdr).response_len = _Var5;" (assignment_expression "(ptp->io_hdr).response_len = _Var5" (field_expression "(ptp->io_hdr).response_len" (parenthesized_expression "(ptp->io_hdr)" ( (field_expression "ptp->io_hdr" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (expression_statement "uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);" (assignment_expression "uVar4 = (*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3)" identifier = (call_expression "(*(code *)puVar2)((int)(ptp->io_hdr).response,0,_Var3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((int)(ptp->io_hdr).response,0,_Var3)" ( (cast_expression "(int)(ptp->io_hdr).response" ( (type_descriptor "int" primitive_type) ) (field_expression "(ptp->io_hdr).response" (parenthesized_expression "(ptp->io_hdr)" ( (field_expression "ptp->io_hdr" identifier -> field_identifier) )) . field_identifier)) , number_literal , identifier )))) ;) (expression_statement "(*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff);" (call_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff)" (parenthesized_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)" ( (pointer_expression "*(code *)PTR_sg_build_sense_buffer_00054944" * (cast_expression "(code *)PTR_sg_build_sense_buffer_00054944" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1 != '\0',uVar4,5,sk & 0xff,asc & 0xff)" ( (binary_expression "uVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) , identifier , number_literal , (binary_expression "sk & 0xff" identifier & number_literal) , (binary_expression "asc & 0xff" identifier & number_literal) ))) ;) (if_statement "if (3 < ascq) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }" if (parenthesized_expression "(3 < ascq)" ( (binary_expression "3 < ascq" number_literal < identifier) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);\n      return;\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,sk,asc)" ( (binary_expression "PTR_s_tatus_00054840 + -0x420" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)" identifier (parameter_list "(int param_1,uint param_2,uint param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar3 = *(int *)(param_1 + 0x2c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2c)" identifier = (pointer_expression "*(int *)(param_1 + 0x2c)" * (cast_expression "(int *)(param_1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x74) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x74) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x74)" * (cast_expression "(undefined4 *)(param_1 + 0x74)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar2 = PTR_memset_00054968;" (assignment_expression "puVar2 = PTR_memset_00054968" identifier = identifier) ;) (expression_statement "cVar1 = *(char *)(param_1 + 0xc4);" (assignment_expression "cVar1 = *(char *)(param_1 + 0xc4)" identifier = (pointer_expression "*(char *)(param_1 + 0xc4)" * (cast_expression "(char *)(param_1 + 0xc4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc4)" ( (binary_expression "param_1 + 0xc4" identifier + number_literal) ))))) ;) (if_statement "if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" if (parenthesized_expression "(iVar3 < 8)" ( (binary_expression "iVar3 < 8" identifier < number_literal) )) (compound_statement "{\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }" { (labeled_statement "LAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" statement_identifier : (if_statement "if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" if (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) (compound_statement "{\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" ( (binary_expression "PTR_s_tatus_00054840 + -0x4bc" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , identifier ))) ;) (return_statement "return;" return ;) }))) }) (else_clause "else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" else (compound_statement "{\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" { (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" identifier = identifier) ;) (if_statement "if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" { (if_statement "if (iVar3 < 0xe) goto LAB_0002fe3c;" if (parenthesized_expression "(iVar3 < 0xe)" ( (binary_expression "iVar3 < 0xe" identifier < number_literal) )) (goto_statement "goto LAB_0002fe3c;" goto statement_identifier ;)) (expression_statement "iVar5 = 0x12;" (assignment_expression "iVar5 = 0x12" identifier = number_literal) ;) (if_statement "if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }" if (parenthesized_expression "(iVar3 < 0x13)" ( (binary_expression "iVar3 < 0x13" identifier < number_literal) )) (compound_statement "{\n        iVar5 = iVar3;\n      }" { (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" identifier = identifier) ;) })) })) (expression_statement "*(int *)(param_1 + 0x84) = iVar5;" (assignment_expression "*(int *)(param_1 + 0x84) = iVar5" (pointer_expression "*(int *)(param_1 + 0x84)" * (cast_expression "(int *)(param_1 + 0x84)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x84)" ( (binary_expression "param_1 + 0x84" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);" (assignment_expression "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" identifier = (call_expression "(*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x34),0,iVar3)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x34)" * (cast_expression "(undefined4 *)(param_1 + 0x34)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) , number_literal , identifier )))) ;) (expression_statement "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);" (call_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" (parenthesized_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)" ( (pointer_expression "*(code *)PTR_sg_build_sense_buffer_00054944" * (cast_expression "(code *)PTR_sg_build_sense_buffer_00054944" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) , identifier , number_literal , (binary_expression "param_2 & 0xff" identifier & number_literal) , (binary_expression "param_3 & 0xff" identifier & number_literal) ))) ;) (if_statement "if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" if (parenthesized_expression "(3 < param_4)" ( (binary_expression "3 < param_4" number_literal < identifier) )) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" { (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000548ec" * (cast_expression "(code *)PTR_pr2ws_000548ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" ( (binary_expression "PTR_s_tatus_00054840 + -0x420" identifier + number_literal) , (binary_expression "PTR_s_tatus_00054840 + -0xbc" identifier + number_literal) , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;) (return_statement return ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT != (char_literal ' escape_sequence ')) , IDENT , LIT , (binary_expression IDENT & LIT) , (binary_expression IDENT & LIT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , LIT , IDENT , IDENT ))) ;) (return_statement return ;) })) }))) (return_statement return ;) })))
(function_definition "void FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002fd60(int param_1,uint param_2,uint param_3,int param_4)" (identifier "FUN_0002fd60") (parameter_list "(int param_1,uint param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined *puVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int iVar5;\n  \n  iVar3 = *(int *)(param_1 + 0x2c);\n  *(undefined4 *)(param_1 + 0x74) = 2;\n  puVar2 = PTR_memset_00054968;\n  cVar1 = *(char *)(param_1 + 0xc4);\n  if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "iVar3 = *(int *)(param_1 + 0x2c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x2c)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x2c)" (* "*") (cast_expression "(int *)(param_1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x74) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x74) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x74)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x74)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")")))) (= "=") (number_literal "2")) (; ";")) (expression_statement "puVar2 = PTR_memset_00054968;" (assignment_expression "puVar2 = PTR_memset_00054968" (identifier "puVar2") (= "=") (identifier "PTR_memset_00054968")) (; ";")) (expression_statement "cVar1 = *(char *)(param_1 + 0xc4);" (assignment_expression "cVar1 = *(char *)(param_1 + 0xc4)" (identifier "cVar1") (= "=") (pointer_expression "*(char *)(param_1 + 0xc4)" (* "*") (cast_expression "(char *)(param_1 + 0xc4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc4)" (( "(") (binary_expression "param_1 + 0xc4" (identifier "param_1") (+ "+") (number_literal "0xc4")) () ")"))))) (; ";")) (if_statement "if (iVar3 < 8) {\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }\n  else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 < 8)" (( "(") (binary_expression "iVar3 < 8" (identifier "iVar3") (< "<") (number_literal "8")) () ")")) (compound_statement "{\nLAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }\n  }" ({ "{") (labeled_statement "LAB_0002fe3c:\n    if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" (statement_identifier "LAB_0002fe3c") (: ":") (if_statement "if (param_4 != 0) {\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" (if "if") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n                    \n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);\n      return;\n    }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x4bc" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x4bc")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0xbc" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0xbc")) (, ",") (identifier "iVar3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" (else "else") (compound_statement "{\n    iVar5 = iVar3;\n    if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }\n    *(int *)(param_1 + 0x84) = iVar5;\n    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);\n    (*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);\n    if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }\n  }" ({ "{") (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" (identifier "iVar5") (= "=") (identifier "iVar3")) (; ";")) (if_statement "if (cVar1 == '\0') {\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      if (iVar3 < 0xe) goto LAB_0002fe3c;\n      iVar5 = 0x12;\n      if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }\n    }" ({ "{") (if_statement "if (iVar3 < 0xe) goto LAB_0002fe3c;" (if "if") (parenthesized_expression "(iVar3 < 0xe)" (( "(") (binary_expression "iVar3 < 0xe" (identifier "iVar3") (< "<") (number_literal "0xe")) () ")")) (goto_statement "goto LAB_0002fe3c;" (goto "goto") (statement_identifier "LAB_0002fe3c") (; ";"))) (expression_statement "iVar5 = 0x12;" (assignment_expression "iVar5 = 0x12" (identifier "iVar5") (= "=") (number_literal "0x12")) (; ";")) (if_statement "if (iVar3 < 0x13) {\n        iVar5 = iVar3;\n      }" (if "if") (parenthesized_expression "(iVar3 < 0x13)" (( "(") (binary_expression "iVar3 < 0x13" (identifier "iVar3") (< "<") (number_literal "0x13")) () ")")) (compound_statement "{\n        iVar5 = iVar3;\n      }" ({ "{") (expression_statement "iVar5 = iVar3;" (assignment_expression "iVar5 = iVar3" (identifier "iVar5") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(int *)(param_1 + 0x84) = iVar5;" (assignment_expression "*(int *)(param_1 + 0x84) = iVar5" (pointer_expression "*(int *)(param_1 + 0x84)" (* "*") (cast_expression "(int *)(param_1 + 0x84)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x84)" (( "(") (binary_expression "param_1 + 0x84" (identifier "param_1") (+ "+") (number_literal "0x84")) () ")")))) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);" (assignment_expression "uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" (identifier "uVar4") (= "=") (call_expression "(*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3)" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0x34),0,iVar3)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x34)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x34)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (, ",") (number_literal "0") (, ",") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);" (call_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)\n              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" (parenthesized_expression "(*(code *)PTR_sg_build_sense_buffer_00054944)" (( "(") (pointer_expression "*(code *)PTR_sg_build_sense_buffer_00054944" (* "*") (cast_expression "(code *)PTR_sg_build_sense_buffer_00054944" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_build_sense_buffer_00054944"))) () ")")) (argument_list "(cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff)" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (, ",") (identifier "uVar4") (, ",") (number_literal "5") (, ",") (binary_expression "param_2 & 0xff" (identifier "param_2") (& "&") (number_literal "0xff")) (, ",") (binary_expression "param_3 & 0xff" (identifier "param_3") (& "&") (number_literal "0xff")) () ")"))) (; ";")) (if_statement "if (3 < param_4) {\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" (if "if") (parenthesized_expression "(3 < param_4)" (( "(") (binary_expression "3 < param_4" (number_literal "3") (< "<") (identifier "param_4")) () ")")) (compound_statement "{\n      (*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);\n      return;\n    }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);" (call_expression "(*(code *)PTR_pr2ws_000548ec)\n                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" (parenthesized_expression "(*(code *)PTR_pr2ws_000548ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000548ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000548ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000548ec"))) () ")")) (argument_list "(PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3)" (( "(") (binary_expression "PTR_s_tatus_00054840 + -0x420" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0x420")) (, ",") (binary_expression "PTR_s_tatus_00054840 + -0xbc" (identifier "PTR_s_tatus_00054840") (+ "+") (number_literal "-0xbc")) (, ",") (number_literal "5") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *ptp,int var_4,int var_5,int var_1,int vb)

{
  uint8_t var_3;
  type_2 *puVar2;
  type_3 _Var3;
  type_4 uVar4;
  type_3 _Var5;
  
  _Var3 = (ptp->io_hdr).max_response_len;
  (ptp->io_hdr).device_status = 2;
  puVar2 = PTR_memset_00054968;
  var_3 = (ptp->dev_stat).scsi_dsense;
  if ((int)_Var3 < 8) {
LAB_0002fe3c:
    if (var_1 != 0) {
                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(type_5 *)PTR_pr2ws_000548ec)
                (var_2 + -0x4bc,var_2 + -0xbc,_Var3);
      return;
    }
  }
  else {
    _Var5 = _Var3;
    if (var_3 == '\0') {
      if ((int)_Var3 < 0xe) goto LAB_0002fe3c;
      _Var5 = 0x12;
      if ((int)_Var3 < 0x13) {
        _Var5 = _Var3;
      }
    }
    (ptp->io_hdr).response_len = _Var5;
    uVar4 = (*(type_5 *)puVar2)((int)(ptp->io_hdr).response,0,_Var3);
    (*(type_5 *)PTR_sg_build_sense_buffer_00054944)(var_3 != '\0',uVar4,5,var_4 & 0xff,var_5 & 0xff);
    if (3 < var_1) {
      (*(type_5 *)PTR_pr2ws_000548ec)
                (var_2 + -0x420,var_2 + -0xbc,5,var_4,var_5);
      return;
    }
  }
  return;
}


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

void MASKED(int param_1,uint param_2,uint param_3,int param_4)

{
  char cVar1;
  undefined *puVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  
  iVar3 = *(int *)(param_1 + 0x2c);
  *(undefined4 *)(param_1 + 0x74) = 2;
  puVar2 = PTR_memset_00054968;
  cVar1 = *(char *)(param_1 + 0xc4);
  if (iVar3 < 8) {
LAB_0002fe3c:
    if (param_4 != 0) {
                    /* WARNING: Could not recover jumptable at 0x0002fe6c. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x4bc,PTR_s_tatus_00054840 + -0xbc,iVar3);
      return;
    }
  }
  else {
    iVar5 = iVar3;
    if (cVar1 == '\0') {
      if (iVar3 < 0xe) goto LAB_0002fe3c;
      iVar5 = 0x12;
      if (iVar3 < 0x13) {
        iVar5 = iVar3;
      }
    }
    *(int *)(param_1 + 0x84) = iVar5;
    uVar4 = (*(code *)puVar2)(*(undefined4 *)(param_1 + 0x34),0,iVar3);
    (*(code *)PTR_sg_build_sense_buffer_00054944)
              (cVar1 != '\0',uVar4,5,param_2 & 0xff,param_3 & 0xff);
    if (3 < param_4) {
      (*(code *)PTR_pr2ws_000548ec)
                (PTR_s_tatus_00054840 + -0x420,PTR_s_tatus_00054840 + -0xbc,5,param_2,param_3);
      return;
    }
  }
  return;
}

