
int scsi_pt_open_flags(char *device_name,int flags,int verbose)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  
  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {
    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;
    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);
  }
  if (verbose < 2) {
    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
    if (verbose < 2) {
      return iVar1;
    }
  }
  else {
    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);
    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
  }
  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();
  (*(code *)PTR_pr2ws_000578ec)
            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2);
  return iVar1;
}



int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  
  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {
    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;
    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);
  }
  if (param_3 < 2) {
    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
    if (param_3 < 2) {
      return iVar1;
    }
  }
  else {
    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);
    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
  }
  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();
  (*(code *)PTR_pr2ws_000578ec)
            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);
  return iVar1;
}


lui gp,0x3
addiu gp,gp,-0xff0
addu gp,gp,t9
addiu sp,sp,-0x38
sw ra,0x34(sp)
sw s3,0x30(sp)
sw s2,0x2c(sp)
sw s1,0x28(sp)
sw s0,0x24(sp)
sw gp,0x18(sp)
or s2,a0,zero
or s3,a1,zero
lw v0,-0x7fbc(gp)
lbu v0,0x0(v0)
beq v0,zero,0x00030888
_or s1,a2,zero
slti v0,s1,0x2
beq v0,zero,0x000308b0
_or a1,s3,zero
or a0,s2,zero
lw t9,-0x7e9c(gp)
jalr t9
_nop
lw gp,0x18(sp)
bltz v0,0x0003094c
_or s0,v0,zero
or v0,s0,zero
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
lw v0,-0x7fbc(gp)
li v1,0x1
sb v1,0x0(v0)
or a0,a2,zero
lw t9,-0x7d94(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x00030844
_slti v0,s1,0x2
or a2,s3,zero
or a1,s2,zero
lw a0,-0x7fd0(gp)
addiu a0,a0,0x2830
lw t9,-0x7f24(gp)
jalr t9
_nop
lw gp,0x18(sp)
or a1,s3,zero
or a0,s2,zero
lw t9,-0x7e9c(gp)
jalr t9
_nop
lw gp,0x18(sp)
bgez v0,0x00030868
_or s0,v0,zero
lw t9,-0x7eb4(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw a0,0x0(v0)
subu s0,zero,a0
lw t9,-0x7f28(gp)
jalr t9
_nop
lw gp,0x18(sp)
sw v0,0x10(sp)
or a3,s3,zero
or a2,s2,zero
lw a1,-0x7fd0(gp)
addiu a1,a1,0x2c14
lw a0,-0x7fd0(gp)
addiu a0,a0,0x284c
lw t9,-0x7f24(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x0003086c
_or v0,s0,zero
lw t9,-0x7eb4(gp)
jalr t9
_nop
lw gp,0x18(sp)
lw a0,0x0(v0)
slti s1,s1,0x2
bne s1,zero,0x00030868
_subu s0,zero,a0
b 0x0003090c
_lw t9,-0x7f28(gp)
(translation_unit "int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}\n\n" (function_definition "int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" primitive_type (function_declarator "scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (if_statement "if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" if (parenthesized_expression "(*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0')" ( (binary_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0'" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" { (expression_statement "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;" (assignment_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) = number_literal) ;) (expression_statement "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);" (call_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3)" (parenthesized_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)" ( (pointer_expression "*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" * (cast_expression "(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier ))) ;) })) (if_statement "if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" if (parenthesized_expression "(param_3 < 2)" ( (binary_expression "param_3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) (if_statement "if (param_3 < 2) {\n      return iVar1;\n    }" if (parenthesized_expression "(param_3 < 2)" ( (binary_expression "param_3 < 2" identifier < number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x2830,param_1,param_2)" ( (binary_expression "PTR_s__00057840 + 0x2830" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_safe_strerror_000578e8)();" (assignment_expression "uVar2 = (*(code *)PTR_safe_strerror_000578e8)()" identifier = (call_expression "(*(code *)PTR_safe_strerror_000578e8)()" (parenthesized_expression "(*(code *)PTR_safe_strerror_000578e8)" ( (pointer_expression "*(code *)PTR_safe_strerror_000578e8" * (cast_expression "(code *)PTR_safe_strerror_000578e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" ( (binary_expression "PTR_s__00057840 + 0x284c" identifier + number_literal) , (binary_expression "PTR_s__00057840 + 0x2c14" identifier + number_literal) , identifier , identifier , identifier ))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int scsi_pt_open_flags(char *device_name,int flags,int verbose)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);\n  }\n  if (verbose < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (verbose < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2);\n  return iVar1;\n}\n\n" (function_definition "int scsi_pt_open_flags(char *device_name,int flags,int verbose)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);\n  }\n  if (verbose < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (verbose < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2);\n  return iVar1;\n}" primitive_type (function_declarator "scsi_pt_open_flags(char *device_name,int flags,int verbose)" identifier (parameter_list "(char *device_name,int flags,int verbose)" ( (parameter_declaration "char *device_name" primitive_type (pointer_declarator "*device_name" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);\n  }\n  if (verbose < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (verbose < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (if_statement "if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);\n  }" if (parenthesized_expression "(*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0')" ( (binary_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0'" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);\n  }" { (expression_statement "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;" (assignment_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) = number_literal) ;) (expression_statement "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose);" (call_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(verbose)" (parenthesized_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)" ( (pointer_expression "*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" * (cast_expression "(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(verbose)" ( identifier ))) ;) })) (if_statement "if (verbose < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (verbose < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" if (parenthesized_expression "(verbose < 2)" ( (binary_expression "verbose < 2" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (verbose < 2) {\n      return iVar1;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(device_name,flags)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(device_name,flags)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) (if_statement "if (verbose < 2) {\n      return iVar1;\n    }" if (parenthesized_expression "(verbose < 2)" ( (binary_expression "verbose < 2" identifier < number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags);" (call_expression "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,device_name,flags)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x2830,device_name,flags)" ( (binary_expression "PTR_s__00057840 + 0x2830" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(device_name,flags)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(device_name,flags)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(device_name,flags)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_safe_strerror_000578e8)();" (assignment_expression "uVar2 = (*(code *)PTR_safe_strerror_000578e8)()" identifier = (call_expression "(*(code *)PTR_safe_strerror_000578e8)()" (parenthesized_expression "(*(code *)PTR_safe_strerror_000578e8)" ( (pointer_expression "*(code *)PTR_safe_strerror_000578e8" * (cast_expression "(code *)PTR_safe_strerror_000578e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,device_name,flags,uVar2)" ( (binary_expression "PTR_s__00057840 + 0x284c" identifier + number_literal) , (binary_expression "PTR_s__00057840 + 0x2c14" identifier + number_literal) , identifier , identifier , identifier ))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}\n\n" (function_definition "int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" primitive_type (function_declarator "scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (if_statement "if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" if (parenthesized_expression "(*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0')" ( (binary_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0'" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" { (expression_statement "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;" (assignment_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" * identifier) = number_literal) ;) (expression_statement "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);" (call_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3)" (parenthesized_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)" ( (pointer_expression "*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" * (cast_expression "(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_3)" ( identifier ))) ;) })) (if_statement "if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" if (parenthesized_expression "(param_3 < 2)" ( (binary_expression "param_3 < 2" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }" { (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) (if_statement "if (param_3 < 2) {\n      return iVar1;\n    }" if (parenthesized_expression "(param_3 < 2)" ( (binary_expression "param_3 < 2" identifier < number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) }) (else_clause "else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" else (compound_statement "{\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" { (expression_statement "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x2830,param_1,param_2)" ( (binary_expression "PTR_s__00057840 + 0x2830" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" identifier = (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" ( (pointer_expression "*(code *)PTR___open64_2_00057974" * (cast_expression "(code *)PTR___open64_2_00057974" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" identifier = (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" ( (pointer_expression "*(code *)PTR___errno_location_0005795c" * (cast_expression "(code *)PTR___errno_location_0005795c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" identifier = (unary_expression "-*piVar3" - (pointer_expression "*piVar3" * identifier))) ;) }))) (expression_statement "uVar2 = (*(code *)PTR_safe_strerror_000578e8)();" (assignment_expression "uVar2 = (*(code *)PTR_safe_strerror_000578e8)()" identifier = (call_expression "(*(code *)PTR_safe_strerror_000578e8)()" (parenthesized_expression "(*(code *)PTR_safe_strerror_000578e8)" ( (pointer_expression "*(code *)PTR_safe_strerror_000578e8" * (cast_expression "(code *)PTR_safe_strerror_000578e8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (expression_statement "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" ( (pointer_expression "*(code *)PTR_pr2ws_000578ec" * (cast_expression "(code *)PTR_pr2ws_000578ec" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" ( (binary_expression "PTR_s__00057840 + 0x284c" identifier + number_literal) , (binary_expression "PTR_s__00057840 + 0x2c14" identifier + number_literal) , identifier , identifier , identifier ))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (unary_expression - (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return IDENT ;) })) }) (else_clause else (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) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (unary_expression - (pointer_expression * IDENT))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (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 , IDENT , IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" (primitive_type "int") (function_declarator "scsi_pt_open_flags(undefined4 param_1,undefined4 param_2,int param_3)" (identifier "scsi_pt_open_flags") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  \n  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }\n  if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }\n  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();\n  (*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (if_statement "if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" (if "if") (parenthesized_expression "(*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0')" (( "(") (binary_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0'" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" (* "*") (identifier "PTR_sg_bsg_nvme_char_major_checked_00057854")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;\n    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);\n  }" ({ "{") (expression_statement "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;" (assignment_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854 = 1" (pointer_expression "*PTR_sg_bsg_nvme_char_major_checked_00057854" (* "*") (identifier "PTR_sg_bsg_nvme_char_major_checked_00057854")) (= "=") (number_literal "1")) (; ";")) (expression_statement "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);" (call_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3)" (parenthesized_expression "(*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)" (( "(") (pointer_expression "*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" (* "*") (cast_expression "(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sg_find_bsg_nvme_char_major_00057a7c"))) () ")")) (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 < 2) {\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }\n  else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" (if "if") (parenthesized_expression "(param_3 < 2)" (( "(") (binary_expression "param_3 < 2" (identifier "param_3") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n    if (param_3 < 2) {\n      return iVar1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" (( "(") (pointer_expression "*(code *)PTR___open64_2_00057974" (* "*") (cast_expression "(code *)PTR___open64_2_00057974" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___open64_2_00057974"))) () ")")) (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0005795c" (* "*") (cast_expression "(code *)PTR___errno_location_0005795c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0005795c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" (identifier "iVar1") (= "=") (unary_expression "-*piVar3" (- "-") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (; ";")) (if_statement "if (param_3 < 2) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(param_3 < 2)" (( "(") (binary_expression "param_3 < 2" (identifier "param_3") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" (else "else") (compound_statement "{\n    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);\n    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);\n    if (-1 < iVar1) {\n      return iVar1;\n    }\n    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();\n    iVar1 = -*piVar3;\n  }" ({ "{") (expression_statement "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000578ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000578ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000578ec"))) () ")")) (argument_list "(PTR_s__00057840 + 0x2830,param_1,param_2)" (( "(") (binary_expression "PTR_s__00057840 + 0x2830" (identifier "PTR_s__00057840") (+ "+") (number_literal "0x2830")) (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);" (assignment_expression "iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___open64_2_00057974)(param_1,param_2)" (parenthesized_expression "(*(code *)PTR___open64_2_00057974)" (( "(") (pointer_expression "*(code *)PTR___open64_2_00057974" (* "*") (cast_expression "(code *)PTR___open64_2_00057974" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___open64_2_00057974"))) () ")")) (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (-1 < iVar1) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();" (assignment_expression "piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)()" (identifier "piVar3") (= "=") (cast_expression "(int *)(*(code *)PTR___errno_location_0005795c)()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_0005795c)()" (parenthesized_expression "(*(code *)PTR___errno_location_0005795c)" (( "(") (pointer_expression "*(code *)PTR___errno_location_0005795c" (* "*") (cast_expression "(code *)PTR___errno_location_0005795c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_0005795c"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = -*piVar3;" (assignment_expression "iVar1 = -*piVar3" (identifier "iVar1") (= "=") (unary_expression "-*piVar3" (- "-") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (; ";")) (} "}")))) (expression_statement "uVar2 = (*(code *)PTR_safe_strerror_000578e8)();" (assignment_expression "uVar2 = (*(code *)PTR_safe_strerror_000578e8)()" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_safe_strerror_000578e8)()" (parenthesized_expression "(*(code *)PTR_safe_strerror_000578e8)" (( "(") (pointer_expression "*(code *)PTR_safe_strerror_000578e8" (* "*") (cast_expression "(code *)PTR_safe_strerror_000578e8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_safe_strerror_000578e8"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);" (call_expression "(*(code *)PTR_pr2ws_000578ec)\n            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" (parenthesized_expression "(*(code *)PTR_pr2ws_000578ec)" (( "(") (pointer_expression "*(code *)PTR_pr2ws_000578ec" (* "*") (cast_expression "(code *)PTR_pr2ws_000578ec" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_pr2ws_000578ec"))) () ")")) (argument_list "(PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2)" (( "(") (binary_expression "PTR_s__00057840 + 0x284c" (identifier "PTR_s__00057840") (+ "+") (number_literal "0x284c")) (, ",") (binary_expression "PTR_s__00057840 + 0x2c14" (identifier "PTR_s__00057840") (+ "+") (number_literal "0x2c14")) (, ",") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int function_1(char *device_name,int flags,int var_1)

{
  int var_2;
  type_1 uVar2;
  int *piVar3;
  
  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {
    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;
    (*(type_2 *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(var_1);
  }
  if (var_1 < 2) {
    var_2 = (*(type_2 *)PTR___open64_2_00057974)(device_name,flags);
    if (-1 < var_2) {
      return var_2;
    }
    piVar3 = (int *)(*(type_2 *)PTR___errno_location_0005795c)();
    var_2 = -*piVar3;
    if (var_1 < 2) {
      return var_2;
    }
  }
  else {
    (*(type_2 *)PTR_pr2ws_000578ec)(var_3 + 0x2830,device_name,flags);
    var_2 = (*(type_2 *)PTR___open64_2_00057974)(device_name,flags);
    if (-1 < var_2) {
      return var_2;
    }
    piVar3 = (int *)(*(type_2 *)PTR___errno_location_0005795c)();
    var_2 = -*piVar3;
  }
  uVar2 = (*(type_2 *)PTR_safe_strerror_000578e8)();
  (*(type_2 *)PTR_pr2ws_000578ec)
            (var_3 + 0x284c,var_3 + 0x2c14,device_name,flags,uVar2);
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (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: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (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 (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (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 (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier))))) alternative: (else_clause (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)) (identifier) (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 (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (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))))) (expression_statement (assignment_expression left: (identifier) right: (unary_expression argument: (pointer_expression argument: (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)))) (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) (identifier) (identifier)))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  
  if (*PTR_sg_bsg_nvme_char_major_checked_00057854 == '\0') {
    *PTR_sg_bsg_nvme_char_major_checked_00057854 = 1;
    (*(code *)PTR_sg_find_bsg_nvme_char_major_00057a7c)(param_3);
  }
  if (param_3 < 2) {
    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
    if (param_3 < 2) {
      return iVar1;
    }
  }
  else {
    (*(code *)PTR_pr2ws_000578ec)(PTR_s__00057840 + 0x2830,param_1,param_2);
    iVar1 = (*(code *)PTR___open64_2_00057974)(param_1,param_2);
    if (-1 < iVar1) {
      return iVar1;
    }
    piVar3 = (int *)(*(code *)PTR___errno_location_0005795c)();
    iVar1 = -*piVar3;
  }
  uVar2 = (*(code *)PTR_safe_strerror_000578e8)();
  (*(code *)PTR_pr2ws_000578ec)
            (PTR_s__00057840 + 0x284c,PTR_s__00057840 + 0x2c14,param_1,param_2,uVar2);
  return iVar1;
}

