
int sg_ll_extended_copy(int sg_fd,void *paramp,int param_len,_Bool noisy,int verbose)

{
  long lVar1;
  int iVar2;
  int iVar3;
  sg_pt_base *vp;
  byte *pbVar4;
  long in_FS_OFFSET;
  int sense_cat;
  uint8_t xcopy_cdb [16];
  uint8_t sense_b [64];
  
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  xcopy_cdb[0] = 0x83;
  xcopy_cdb[1] = '\0';
  xcopy_cdb[2] = '\0';
  xcopy_cdb[3] = '\0';
  xcopy_cdb[4] = '\0';
  xcopy_cdb[5] = '\0';
  xcopy_cdb[6] = '\0';
  xcopy_cdb[7] = '\0';
  xcopy_cdb._8_8_ =
       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |
              param_len << 0x18) << 0x10;
  if (verbose != 0) {
    pr2ws("    %s cdb: ","Extended copy (LID1)");
    pbVar4 = xcopy_cdb;
    do {
      pr2ws("%02x ",(ulong)*pbVar4);
      pbVar4 = pbVar4 + 1;
    } while (pbVar4 != sense_b);
    pr2ws("\n");
    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {
      pr2ws("    %s parameter list:\n","Extended copy (LID1)");
      hex2stderr((uint8_t *)paramp,param_len,-1);
    }
  }
  vp = create_pt_obj("Extended copy (LID1)");
  if (vp == (sg_pt_base *)0x0) {
    iVar2 = -1;
  }
  else {
    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);
    set_scsi_pt_sense(vp,sense_b,0x40);
    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);
    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);
    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)
    ;
    if (iVar3 == -1) {
      iVar2 = get_scsi_pt_os_err(vp);
      iVar2 = sg_convert_errno(iVar2);
    }
    else {
      iVar2 = 0;
      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {
        iVar2 = 0;
      }
    }
    destruct_scsi_pt_obj(vp);
  }
  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar2;
}



int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  long lVar4;
  undefined8 *puVar5;
  long in_FS_OFFSET;
  int local_9c;
  undefined8 local_98;
  long local_90;
  undefined8 local_88 [9];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_98 = 0x83;
  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |
                    param_3 << 0x18) << 0x10;
  if (param_5 != 0) {
    pr2ws("    %s cdb: ","Extended copy (LID1)");
    puVar5 = &local_98;
    do {
      pr2ws("%02x ",*(undefined1 *)puVar5);
      puVar5 = (undefined8 *)((long)puVar5 + 1);
    } while (puVar5 != local_88);
    pr2ws(&DAT_001256cf);
    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {
      pr2ws("    %s parameter list:\n","Extended copy (LID1)");
      hex2stderr(param_2,param_3,0xffffffff);
    }
  }
  lVar4 = FUN_0011a2e9("Extended copy (LID1)");
  if (lVar4 == 0) {
    iVar3 = -1;
  }
  else {
    set_scsi_pt_cdb(lVar4,&local_98,0x10);
    set_scsi_pt_sense(lVar4,local_88,0x40);
    set_scsi_pt_data_out(lVar4,param_2,param_3);
    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);
    iVar2 = sg_cmds_process_resp
                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);
    if (iVar2 == -1) {
      uVar1 = get_scsi_pt_os_err(lVar4);
      iVar3 = sg_convert_errno(uVar1);
    }
    else {
      iVar3 = 0;
      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {
        iVar3 = 0;
      }
    }
    destruct_scsi_pt_obj(lVar4);
  }
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar3;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x88
MOV dword ptr [RSP + 0x8],EDI
MOV R15,RSI
MOV R14D,EDX
MOV dword ptr [RSP + 0xc],ECX
MOV R13D,R8D
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x78],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x0
MOV byte ptr [RSP + 0x20],0x83
MOV EAX,EDX
BSWAP EAX
MOV dword ptr [RSP + 0x2a],EAX
TEST R8D,R8D
JNZ 0x0011f1d4
LEA RDI,[0x132117]
CALL 0x0011a2e9
MOV RBX,RAX
TEST RAX,RAX
JZ 0x0011f29f
LEA RSI,[RSP + 0x20]
MOV EDX,0x10
MOV RDI,RAX
CALL 0x0010e7d0
LEA RBP,[RSP + 0x30]
MOV EDX,0x40
MOV RSI,RBP
MOV RDI,RBX
CALL 0x0010e600
MOV EDX,R14D
MOV RSI,R15
MOV RDI,RBX
CALL 0x0010e110
MOV ECX,R13D
MOV EDX,0x3c
MOV ESI,dword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0010e460
LEA RDX,[RSP + 0x1c]
PUSH RDX
PUSH R13
MOVZX R9D,byte ptr [RSP + 0x1c]
MOV R8,RBP
MOV ECX,0x0
MOV EDX,EAX
LEA RSI,[0x132117]
MOV RDI,RBX
CALL 0x0010e680
ADD RSP,0x10
CMP EAX,-0x1
JZ 0x0011f272
MOV EBP,0x0
CMP EAX,-0x2
JZ 0x0011f288
MOV RDI,RBX
CALL 0x0010e4b0
MOV EAX,EBP
MOV RCX,qword ptr [RSP + 0x78]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0011f2a9
ADD RSP,0x88
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LEA RSI,[0x132117]
LEA RDI,[0x131793]
MOV EAX,0x0
CALL 0x0010e610
LEA RBX,[RSP + 0x20]
LEA R12,[RSP + 0x30]
LEA RBP,[0x132c03]
MOVZX ESI,byte ptr [RBX]
MOV RDI,RBP
MOV EAX,0x0
CALL 0x0010e610
ADD RBX,0x1
CMP RBX,R12
JNZ 0x0011f1fd
LEA RDI,[0x1256cf]
MOV EAX,0x0
CALL 0x0010e610
CMP R13D,0x1
SETG DL
TEST R15,R15
SETNZ AL
TEST DL,AL
JZ 0x0011f101
TEST R14D,R14D
JZ 0x0011f101
LEA RSI,[0x132117]
LEA RDI,[0x131efc]
MOV EAX,0x0
CALL 0x0010e610
MOV EDX,0xffffffff
MOV ESI,R14D
MOV RDI,R15
CALL 0x0010e700
JMP 0x0011f101
MOV RDI,RBX
CALL 0x0010e0a0
MOV EDI,EAX
CALL 0x0010e550
MOV EBP,EAX
JMP 0x0011f1a4
MOV EBP,dword ptr [RSP + 0x1c]
LEA EAX,[RBP + -0x14]
CMP EAX,0x1
MOV EAX,0x0
CMOVBE EBP,EAX
JMP 0x0011f1a4
MOV EBP,0xffffffff
JMP 0x0011f1ac
CALL 0x0010e210
(translation_unit "int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar3;\n}\n\n" (function_definition "int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar3;\n}" primitive_type (function_declarator "sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined1 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_9c;" primitive_type identifier ;) (declaration "undefined8 local_98;" type_identifier identifier ;) (declaration "long local_90;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_88 [9];" type_identifier (array_declarator "local_88 [9]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_98 = 0x83;" (assignment_expression "local_98 = 0x83" identifier = number_literal) ;) (expression_statement "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;" (assignment_expression "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" identifier = (binary_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" (call_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" ( (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8" (binary_expression "param_3 >> 0x18" identifier >> number_literal) | (binary_expression "(param_3 & 0xff0000) >> 8" (parenthesized_expression "(param_3 & 0xff0000)" ( (binary_expression "param_3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_3 & 0xff00) << 8" (parenthesized_expression "(param_3 & 0xff00)" ( (binary_expression "param_3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_3 << 0x18" identifier << number_literal)) ))) << number_literal)) ;) (if_statement "if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" { (expression_statement "pr2ws("    %s cdb: ","Extended copy (LID1)");" (call_expression "pr2ws("    %s cdb: ","Extended copy (LID1)")" identifier (argument_list "("    %s cdb: ","Extended copy (LID1)")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "puVar5 = &local_98;" (assignment_expression "puVar5 = &local_98" identifier = (pointer_expression "&local_98" & identifier)) ;) (do_statement "do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);" do (compound_statement "{\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    }" { (expression_statement "pr2ws("%02x ",*(undefined1 *)puVar5);" (call_expression "pr2ws("%02x ",*(undefined1 *)puVar5)" identifier (argument_list "("%02x ",*(undefined1 *)puVar5)" ( (string_literal ""%02x "" " string_content ") , (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "puVar5 = (undefined8 *)((long)puVar5 + 1);" (assignment_expression "puVar5 = (undefined8 *)((long)puVar5 + 1)" identifier = (cast_expression "(undefined8 *)((long)puVar5 + 1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar5 + 1)" ( (binary_expression "(long)puVar5 + 1" (cast_expression "(long)puVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) }) while (parenthesized_expression "(puVar5 != local_88)" ( (binary_expression "puVar5 != local_88" identifier != identifier) )) ;) (expression_statement "pr2ws(&DAT_001256cf);" (call_expression "pr2ws(&DAT_001256cf)" identifier (argument_list "(&DAT_001256cf)" ( (pointer_expression "&DAT_001256cf" & identifier) ))) ;) (if_statement "if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" if (parenthesized_expression "((1 < param_5 && param_2 != 0) && (param_3 != 0))" ( (binary_expression "(1 < param_5 && param_2 != 0) && (param_3 != 0)" (parenthesized_expression "(1 < param_5 && param_2 != 0)" ( (binary_expression "1 < param_5 && param_2 != 0" (binary_expression "1 < param_5" number_literal < identifier) && (binary_expression "param_2 != 0" identifier != number_literal)) )) && (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" { (expression_statement "pr2ws("    %s parameter list:\n","Extended copy (LID1)");" (call_expression "pr2ws("    %s parameter list:\n","Extended copy (LID1)")" identifier (argument_list "("    %s parameter list:\n","Extended copy (LID1)")" ( (string_literal ""    %s parameter list:\n"" " string_content escape_sequence ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "hex2stderr(param_2,param_3,0xffffffff);" (call_expression "hex2stderr(param_2,param_3,0xffffffff)" identifier (argument_list "(param_2,param_3,0xffffffff)" ( identifier , identifier , number_literal ))) ;) })) })) (expression_statement "lVar4 = FUN_0011a2e9("Extended copy (LID1)");" (assignment_expression "lVar4 = FUN_0011a2e9("Extended copy (LID1)")" identifier = (call_expression "FUN_0011a2e9("Extended copy (LID1)")" identifier (argument_list "("Extended copy (LID1)")" ( (string_literal ""Extended copy (LID1)"" " string_content ") )))) ;) (if_statement "if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = -1;\n  }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" { (expression_statement "set_scsi_pt_cdb(lVar4,&local_98,0x10);" (call_expression "set_scsi_pt_cdb(lVar4,&local_98,0x10)" identifier (argument_list "(lVar4,&local_98,0x10)" ( identifier , (pointer_expression "&local_98" & identifier) , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(lVar4,local_88,0x40);" (call_expression "set_scsi_pt_sense(lVar4,local_88,0x40)" identifier (argument_list "(lVar4,local_88,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_out(lVar4,param_2,param_3);" (call_expression "set_scsi_pt_data_out(lVar4,param_2,param_3)" identifier (argument_list "(lVar4,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);" (assignment_expression "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5)" identifier = (call_expression "do_scsi_pt(lVar4,param_1,0x3c,param_5)" identifier (argument_list "(lVar4,param_1,0x3c,param_5)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);" (assignment_expression "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" identifier = (call_expression "sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" identifier (argument_list "(lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" ( identifier , (string_literal ""Extended copy (LID1)"" " string_content ") , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&local_9c" & identifier) )))) ;) (if_statement "if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }" { (expression_statement "uVar1 = get_scsi_pt_os_err(lVar4);" (assignment_expression "uVar1 = get_scsi_pt_os_err(lVar4)" identifier = (call_expression "get_scsi_pt_os_err(lVar4)" identifier (argument_list "(lVar4)" ( identifier )))) ;) (expression_statement "iVar3 = sg_convert_errno(uVar1);" (assignment_expression "iVar3 = sg_convert_errno(uVar1)" identifier = (call_expression "sg_convert_errno(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) }) (else_clause "else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" else (compound_statement "{\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }" if (parenthesized_expression "((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2))" ( (binary_expression "(iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)" (parenthesized_expression "(iVar2 == -2)" ( (binary_expression "iVar2 == -2" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = local_9c, local_9c - 0x14U < 2)" ( (comma_expression "iVar3 = local_9c, local_9c - 0x14U < 2" (assignment_expression "iVar3 = local_9c" identifier = identifier) , (binary_expression "local_9c - 0x14U < 2" (binary_expression "local_9c - 0x14U" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        iVar3 = 0;\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) })) }))) (expression_statement "destruct_scsi_pt_obj(lVar4);" (call_expression "destruct_scsi_pt_obj(lVar4)" identifier (argument_list "(lVar4)" ( identifier ))) ;) }))) (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "int sg_ll_extended_copy(int sg_fd,void *paramp,int param_len,_Bool noisy,int verbose)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  sg_pt_base *vp;\n  byte *pbVar4;\n  long in_FS_OFFSET;\n  int sense_cat;\n  uint8_t xcopy_cdb [16];\n  uint8_t sense_b [64];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  xcopy_cdb[0] = 0x83;\n  xcopy_cdb[1] = '\0';\n  xcopy_cdb[2] = '\0';\n  xcopy_cdb[3] = '\0';\n  xcopy_cdb[4] = '\0';\n  xcopy_cdb[5] = '\0';\n  xcopy_cdb[6] = '\0';\n  xcopy_cdb[7] = '\0';\n  xcopy_cdb._8_8_ =\n       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10;\n  if (verbose != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    pbVar4 = xcopy_cdb;\n    do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);\n    pr2ws("\n");\n    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }\n  }\n  vp = create_pt_obj("Extended copy (LID1)");\n  if (vp == (sg_pt_base *)0x0) {\n    iVar2 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar2;\n}\n\n" (function_definition "int sg_ll_extended_copy(int sg_fd,void *paramp,int param_len,_Bool noisy,int verbose)\n\n{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  sg_pt_base *vp;\n  byte *pbVar4;\n  long in_FS_OFFSET;\n  int sense_cat;\n  uint8_t xcopy_cdb [16];\n  uint8_t sense_b [64];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  xcopy_cdb[0] = 0x83;\n  xcopy_cdb[1] = '\0';\n  xcopy_cdb[2] = '\0';\n  xcopy_cdb[3] = '\0';\n  xcopy_cdb[4] = '\0';\n  xcopy_cdb[5] = '\0';\n  xcopy_cdb[6] = '\0';\n  xcopy_cdb[7] = '\0';\n  xcopy_cdb._8_8_ =\n       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10;\n  if (verbose != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    pbVar4 = xcopy_cdb;\n    do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);\n    pr2ws("\n");\n    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }\n  }\n  vp = create_pt_obj("Extended copy (LID1)");\n  if (vp == (sg_pt_base *)0x0) {\n    iVar2 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar2;\n}" primitive_type (function_declarator "sg_ll_extended_copy(int sg_fd,void *paramp,int param_len,_Bool noisy,int verbose)" identifier (parameter_list "(int sg_fd,void *paramp,int param_len,_Bool noisy,int verbose)" ( (parameter_declaration "int sg_fd" primitive_type identifier) , (parameter_declaration "void *paramp" primitive_type (pointer_declarator "*paramp" * identifier)) , (parameter_declaration "int param_len" primitive_type identifier) , (parameter_declaration "_Bool noisy" type_identifier identifier) , (parameter_declaration "int verbose" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  int iVar3;\n  sg_pt_base *vp;\n  byte *pbVar4;\n  long in_FS_OFFSET;\n  int sense_cat;\n  uint8_t xcopy_cdb [16];\n  uint8_t sense_b [64];\n  \n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  xcopy_cdb[0] = 0x83;\n  xcopy_cdb[1] = '\0';\n  xcopy_cdb[2] = '\0';\n  xcopy_cdb[3] = '\0';\n  xcopy_cdb[4] = '\0';\n  xcopy_cdb[5] = '\0';\n  xcopy_cdb[6] = '\0';\n  xcopy_cdb[7] = '\0';\n  xcopy_cdb._8_8_ =\n       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10;\n  if (verbose != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    pbVar4 = xcopy_cdb;\n    do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);\n    pr2ws("\n");\n    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }\n  }\n  vp = create_pt_obj("Extended copy (LID1)");\n  if (vp == (sg_pt_base *)0x0) {\n    iVar2 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }\n  if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return iVar2;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "sg_pt_base *vp;" type_identifier (pointer_declarator "*vp" * identifier) ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int sense_cat;" primitive_type identifier ;) (declaration "uint8_t xcopy_cdb [16];" primitive_type (array_declarator "xcopy_cdb [16]" identifier [ number_literal ]) ;) (declaration "uint8_t sense_b [64];" primitive_type (array_declarator "sense_b [64]" identifier [ number_literal ]) ;) (expression_statement "lVar1 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "lVar1 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "xcopy_cdb[0] = 0x83;" (assignment_expression "xcopy_cdb[0] = 0x83" (subscript_expression "xcopy_cdb[0]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "xcopy_cdb[1] = '\0';" (assignment_expression "xcopy_cdb[1] = '\0'" (subscript_expression "xcopy_cdb[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[2] = '\0';" (assignment_expression "xcopy_cdb[2] = '\0'" (subscript_expression "xcopy_cdb[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[3] = '\0';" (assignment_expression "xcopy_cdb[3] = '\0'" (subscript_expression "xcopy_cdb[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[4] = '\0';" (assignment_expression "xcopy_cdb[4] = '\0'" (subscript_expression "xcopy_cdb[4]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[5] = '\0';" (assignment_expression "xcopy_cdb[5] = '\0'" (subscript_expression "xcopy_cdb[5]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[6] = '\0';" (assignment_expression "xcopy_cdb[6] = '\0'" (subscript_expression "xcopy_cdb[6]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb[7] = '\0';" (assignment_expression "xcopy_cdb[7] = '\0'" (subscript_expression "xcopy_cdb[7]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "xcopy_cdb._8_8_ =\n       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10;" (assignment_expression "xcopy_cdb._8_8_ =\n       (ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10" (field_expression "xcopy_cdb._8_8_" identifier . field_identifier) = (binary_expression "(ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18) << 0x10" (call_expression "(ulong)((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18)" ( (binary_expression "(uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8 |\n              param_len << 0x18" (binary_expression "(uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8 | (param_len & 0xff00U) << 8" (binary_expression "(uint)param_len >> 0x18 | (param_len & 0xff0000U) >> 8" (binary_expression "(uint)param_len >> 0x18" (cast_expression "(uint)param_len" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) | (binary_expression "(param_len & 0xff0000U) >> 8" (parenthesized_expression "(param_len & 0xff0000U)" ( (binary_expression "param_len & 0xff0000U" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_len & 0xff00U) << 8" (parenthesized_expression "(param_len & 0xff00U)" ( (binary_expression "param_len & 0xff00U" identifier & number_literal) )) << number_literal)) | (binary_expression "param_len << 0x18" identifier << number_literal)) ))) << number_literal)) ;) (if_statement "if (verbose != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    pbVar4 = xcopy_cdb;\n    do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);\n    pr2ws("\n");\n    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }\n  }" if (parenthesized_expression "(verbose != 0)" ( (binary_expression "verbose != 0" identifier != number_literal) )) (compound_statement "{\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    pbVar4 = xcopy_cdb;\n    do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);\n    pr2ws("\n");\n    if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }\n  }" { (expression_statement "pr2ws("    %s cdb: ","Extended copy (LID1)");" (call_expression "pr2ws("    %s cdb: ","Extended copy (LID1)")" identifier (argument_list "("    %s cdb: ","Extended copy (LID1)")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "pbVar4 = xcopy_cdb;" (assignment_expression "pbVar4 = xcopy_cdb" identifier = identifier) ;) (do_statement "do {\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    } while (pbVar4 != sense_b);" do (compound_statement "{\n      pr2ws("%02x ",(ulong)*pbVar4);\n      pbVar4 = pbVar4 + 1;\n    }" { (expression_statement "pr2ws("%02x ",(ulong)*pbVar4);" (call_expression "pr2ws("%02x ",(ulong)*pbVar4)" identifier (argument_list "("%02x ",(ulong)*pbVar4)" ( (string_literal ""%02x "" " string_content ") , (binary_expression "(ulong)*pbVar4" (parenthesized_expression "(ulong)" ( identifier )) * identifier) ))) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pbVar4 != sense_b)" ( (binary_expression "pbVar4 != sense_b" identifier != identifier) )) ;) (expression_statement "pr2ws("\n");" (call_expression "pr2ws("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (if_statement "if ((1 < verbose && paramp != (void *)0x0) && (param_len != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }" if (parenthesized_expression "((1 < verbose && paramp != (void *)0x0) && (param_len != 0))" ( (binary_expression "(1 < verbose && paramp != (void *)0x0) && (param_len != 0)" (parenthesized_expression "(1 < verbose && paramp != (void *)0x0)" ( (binary_expression "1 < verbose && paramp != (void *)0x0" (binary_expression "1 < verbose" number_literal < identifier) && (binary_expression "paramp != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) && (parenthesized_expression "(param_len != 0)" ( (binary_expression "param_len != 0" identifier != number_literal) ))) )) (compound_statement "{\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr((uint8_t *)paramp,param_len,-1);\n    }" { (expression_statement "pr2ws("    %s parameter list:\n","Extended copy (LID1)");" (call_expression "pr2ws("    %s parameter list:\n","Extended copy (LID1)")" identifier (argument_list "("    %s parameter list:\n","Extended copy (LID1)")" ( (string_literal ""    %s parameter list:\n"" " string_content escape_sequence ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "hex2stderr((uint8_t *)paramp,param_len,-1);" (call_expression "hex2stderr((uint8_t *)paramp,param_len,-1)" identifier (argument_list "((uint8_t *)paramp,param_len,-1)" ( (cast_expression "(uint8_t *)paramp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , number_literal ))) ;) })) })) (expression_statement "vp = create_pt_obj("Extended copy (LID1)");" (assignment_expression "vp = create_pt_obj("Extended copy (LID1)")" identifier = (call_expression "create_pt_obj("Extended copy (LID1)")" identifier (argument_list "("Extended copy (LID1)")" ( (string_literal ""Extended copy (LID1)"" " string_content ") )))) ;) (if_statement "if (vp == (sg_pt_base *)0x0) {\n    iVar2 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }" if (parenthesized_expression "(vp == (sg_pt_base *)0x0)" ( (binary_expression "vp == (sg_pt_base *)0x0" identifier == (cast_expression "(sg_pt_base *)0x0" ( (type_descriptor "sg_pt_base *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = -1;\n  }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(vp,xcopy_cdb,0x10);\n    set_scsi_pt_sense(vp,sense_b,0x40);\n    set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);\n    iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);\n    iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;\n    if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(vp);\n  }" { (expression_statement "set_scsi_pt_cdb(vp,xcopy_cdb,0x10);" (call_expression "set_scsi_pt_cdb(vp,xcopy_cdb,0x10)" identifier (argument_list "(vp,xcopy_cdb,0x10)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(vp,sense_b,0x40);" (call_expression "set_scsi_pt_sense(vp,sense_b,0x40)" identifier (argument_list "(vp,sense_b,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len);" (call_expression "set_scsi_pt_data_out(vp,(uint8_t *)paramp,param_len)" identifier (argument_list "(vp,(uint8_t *)paramp,param_len)" ( identifier , (cast_expression "(uint8_t *)paramp" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose);" (assignment_expression "iVar2 = do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier = (call_expression "do_scsi_pt(vp,sg_fd,0x3c,verbose)" identifier (argument_list "(vp,sg_fd,0x3c,verbose)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)\n    ;" (assignment_expression "iVar3 = sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)" identifier = (call_expression "sg_cmds_process_resp(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)" identifier (argument_list "(vp,"Extended copy (LID1)",iVar2,0,sense_b,noisy,verbose,&sense_cat)" ( identifier , (string_literal ""Extended copy (LID1)"" " string_content ") , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&sense_cat" & identifier) )))) ;) (if_statement "if (iVar3 == -1) {\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }\n    else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      iVar2 = get_scsi_pt_os_err(vp);\n      iVar2 = sg_convert_errno(iVar2);\n    }" { (expression_statement "iVar2 = get_scsi_pt_os_err(vp);" (assignment_expression "iVar2 = get_scsi_pt_os_err(vp)" identifier = (call_expression "get_scsi_pt_os_err(vp)" identifier (argument_list "(vp)" ( identifier )))) ;) (expression_statement "iVar2 = sg_convert_errno(iVar2);" (assignment_expression "iVar2 = sg_convert_errno(iVar2)" identifier = (call_expression "sg_convert_errno(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) }) (else_clause "else {\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }" else (compound_statement "{\n      iVar2 = 0;\n      if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if ((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)) {\n        iVar2 = 0;\n      }" if (parenthesized_expression "((iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2))" ( (binary_expression "(iVar3 == -2) && (iVar2 = sense_cat, sense_cat - 0x14U < 2)" (parenthesized_expression "(iVar3 == -2)" ( (binary_expression "iVar3 == -2" identifier == number_literal) )) && (parenthesized_expression "(iVar2 = sense_cat, sense_cat - 0x14U < 2)" ( (comma_expression "iVar2 = sense_cat, sense_cat - 0x14U < 2" (assignment_expression "iVar2 = sense_cat" identifier = identifier) , (binary_expression "sense_cat - 0x14U < 2" (binary_expression "sense_cat - 0x14U" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        iVar2 = 0;\n      }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) })) }))) (expression_statement "destruct_scsi_pt_obj(vp);" (call_expression "destruct_scsi_pt_obj(vp)" identifier (argument_list "(vp)" ( identifier ))) ;) }))) (if_statement "if (lVar1 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(lVar1 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "lVar1 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar3;\n}\n\n" (function_definition "int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar3;\n}" primitive_type (function_declarator "sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined1 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "int local_9c;" primitive_type identifier ;) (declaration "undefined8 local_98;" type_identifier identifier ;) (declaration "long local_90;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_88 [9];" type_identifier (array_declarator "local_88 [9]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_98 = 0x83;" (assignment_expression "local_98 = 0x83" identifier = number_literal) ;) (expression_statement "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;" (assignment_expression "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" identifier = (binary_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" (call_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" ( (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8" (binary_expression "param_3 >> 0x18" identifier >> number_literal) | (binary_expression "(param_3 & 0xff0000) >> 8" (parenthesized_expression "(param_3 & 0xff0000)" ( (binary_expression "param_3 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(param_3 & 0xff00) << 8" (parenthesized_expression "(param_3 & 0xff00)" ( (binary_expression "param_3 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "param_3 << 0x18" identifier << number_literal)) ))) << number_literal)) ;) (if_statement "if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" { (expression_statement "pr2ws("    %s cdb: ","Extended copy (LID1)");" (call_expression "pr2ws("    %s cdb: ","Extended copy (LID1)")" identifier (argument_list "("    %s cdb: ","Extended copy (LID1)")" ( (string_literal ""    %s cdb: "" " string_content ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "puVar5 = &local_98;" (assignment_expression "puVar5 = &local_98" identifier = (pointer_expression "&local_98" & identifier)) ;) (do_statement "do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);" do (compound_statement "{\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    }" { (expression_statement "pr2ws("%02x ",*(undefined1 *)puVar5);" (call_expression "pr2ws("%02x ",*(undefined1 *)puVar5)" identifier (argument_list "("%02x ",*(undefined1 *)puVar5)" ( (string_literal ""%02x "" " string_content ") , (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (expression_statement "puVar5 = (undefined8 *)((long)puVar5 + 1);" (assignment_expression "puVar5 = (undefined8 *)((long)puVar5 + 1)" identifier = (cast_expression "(undefined8 *)((long)puVar5 + 1)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar5 + 1)" ( (binary_expression "(long)puVar5 + 1" (cast_expression "(long)puVar5" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) }) while (parenthesized_expression "(puVar5 != local_88)" ( (binary_expression "puVar5 != local_88" identifier != identifier) )) ;) (expression_statement "pr2ws(&DAT_001256cf);" (call_expression "pr2ws(&DAT_001256cf)" identifier (argument_list "(&DAT_001256cf)" ( (pointer_expression "&DAT_001256cf" & identifier) ))) ;) (if_statement "if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" if (parenthesized_expression "((1 < param_5 && param_2 != 0) && (param_3 != 0))" ( (binary_expression "(1 < param_5 && param_2 != 0) && (param_3 != 0)" (parenthesized_expression "(1 < param_5 && param_2 != 0)" ( (binary_expression "1 < param_5 && param_2 != 0" (binary_expression "1 < param_5" number_literal < identifier) && (binary_expression "param_2 != 0" identifier != number_literal)) )) && (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" { (expression_statement "pr2ws("    %s parameter list:\n","Extended copy (LID1)");" (call_expression "pr2ws("    %s parameter list:\n","Extended copy (LID1)")" identifier (argument_list "("    %s parameter list:\n","Extended copy (LID1)")" ( (string_literal ""    %s parameter list:\n"" " string_content escape_sequence ") , (string_literal ""Extended copy (LID1)"" " string_content ") ))) ;) (expression_statement "hex2stderr(param_2,param_3,0xffffffff);" (call_expression "hex2stderr(param_2,param_3,0xffffffff)" identifier (argument_list "(param_2,param_3,0xffffffff)" ( identifier , identifier , number_literal ))) ;) })) })) (expression_statement "lVar4 = FUN_0011a2e9("Extended copy (LID1)");" (assignment_expression "lVar4 = FUN_0011a2e9("Extended copy (LID1)")" identifier = (call_expression "FUN_0011a2e9("Extended copy (LID1)")" identifier (argument_list "("Extended copy (LID1)")" ( (string_literal ""Extended copy (LID1)"" " string_content ") )))) ;) (if_statement "if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" if (parenthesized_expression "(lVar4 == 0)" ( (binary_expression "lVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = -1;\n  }" { (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" identifier = number_literal) ;) }) (else_clause "else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" else (compound_statement "{\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" { (expression_statement "set_scsi_pt_cdb(lVar4,&local_98,0x10);" (call_expression "set_scsi_pt_cdb(lVar4,&local_98,0x10)" identifier (argument_list "(lVar4,&local_98,0x10)" ( identifier , (pointer_expression "&local_98" & identifier) , number_literal ))) ;) (expression_statement "set_scsi_pt_sense(lVar4,local_88,0x40);" (call_expression "set_scsi_pt_sense(lVar4,local_88,0x40)" identifier (argument_list "(lVar4,local_88,0x40)" ( identifier , identifier , number_literal ))) ;) (expression_statement "set_scsi_pt_data_out(lVar4,param_2,param_3);" (call_expression "set_scsi_pt_data_out(lVar4,param_2,param_3)" identifier (argument_list "(lVar4,param_2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);" (assignment_expression "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5)" identifier = (call_expression "do_scsi_pt(lVar4,param_1,0x3c,param_5)" identifier (argument_list "(lVar4,param_1,0x3c,param_5)" ( identifier , identifier , number_literal , identifier )))) ;) (expression_statement "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);" (assignment_expression "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" identifier = (call_expression "sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" identifier (argument_list "(lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" ( identifier , (string_literal ""Extended copy (LID1)"" " string_content ") , identifier , number_literal , identifier , identifier , identifier , (pointer_expression "&local_9c" & identifier) )))) ;) (if_statement "if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" if (parenthesized_expression "(iVar2 == -1)" ( (binary_expression "iVar2 == -1" identifier == number_literal) )) (compound_statement "{\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }" { (expression_statement "uVar1 = get_scsi_pt_os_err(lVar4);" (assignment_expression "uVar1 = get_scsi_pt_os_err(lVar4)" identifier = (call_expression "get_scsi_pt_os_err(lVar4)" identifier (argument_list "(lVar4)" ( identifier )))) ;) (expression_statement "iVar3 = sg_convert_errno(uVar1);" (assignment_expression "iVar3 = sg_convert_errno(uVar1)" identifier = (call_expression "sg_convert_errno(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) }) (else_clause "else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" else (compound_statement "{\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }" if (parenthesized_expression "((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2))" ( (binary_expression "(iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)" (parenthesized_expression "(iVar2 == -2)" ( (binary_expression "iVar2 == -2" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = local_9c, local_9c - 0x14U < 2)" ( (comma_expression "iVar3 = local_9c, local_9c - 0x14U < 2" (assignment_expression "iVar3 = local_9c" identifier = identifier) , (binary_expression "local_9c - 0x14U < 2" (binary_expression "local_9c - 0x14U" identifier - number_literal) < number_literal)) ))) )) (compound_statement "{\n        iVar3 = 0;\n      }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) })) }))) (expression_statement "destruct_scsi_pt_obj(lVar4);" (call_expression "destruct_scsi_pt_obj(lVar4)" identifier (argument_list "(lVar4)" ( identifier ))) ;) }))) (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT)) ))) << LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression LIT < IDENT) && (binary_expression IDENT != LIT)) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (string_literal " string_content ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , LIT , IDENT , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (binary_expression IDENT - LIT) < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "int sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "sg_ll_extended_copy(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" (identifier "sg_ll_extended_copy") (parameter_list "(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined1 param_4" (type_identifier "undefined1") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  undefined8 *puVar5;\n  long in_FS_OFFSET;\n  int local_9c;\n  undefined8 local_98;\n  long local_90;\n  undefined8 local_88 [9];\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_98 = 0x83;\n  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;\n  if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }\n  lVar4 = FUN_0011a2e9("Extended copy (LID1)");\n  if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }\n  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return iVar3;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "undefined8 *puVar5;" (type_identifier "undefined8") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "int local_9c;" (primitive_type "int") (identifier "local_9c") (; ";")) (declaration "undefined8 local_98;" (type_identifier "undefined8") (identifier "local_98") (; ";")) (declaration "long local_90;" (sized_type_specifier "long" (long "long")) (identifier "local_90") (; ";")) (declaration "undefined8 local_88 [9];" (type_identifier "undefined8") (array_declarator "local_88 [9]" (identifier "local_88") ([ "[") (number_literal "9") (] "]")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "local_98 = 0x83;" (assignment_expression "local_98 = 0x83" (identifier "local_98") (= "=") (number_literal "0x83")) (; ";")) (expression_statement "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10;" (assignment_expression "local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" (identifier "local_90") (= "=") (binary_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18) << 0x10" (call_expression "(ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18)" (( "(") (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |\n                    param_3 << 0x18" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8" (binary_expression "param_3 >> 0x18 | (param_3 & 0xff0000) >> 8" (binary_expression "param_3 >> 0x18" (identifier "param_3") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(param_3 & 0xff0000) >> 8" (parenthesized_expression "(param_3 & 0xff0000)" (( "(") (binary_expression "param_3 & 0xff0000" (identifier "param_3") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(param_3 & 0xff00) << 8" (parenthesized_expression "(param_3 & 0xff00)" (( "(") (binary_expression "param_3 & 0xff00" (identifier "param_3") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "param_3 << 0x18" (identifier "param_3") (<< "<<") (number_literal "0x18"))) () ")"))) (<< "<<") (number_literal "0x10"))) (; ";")) (if_statement "if (param_5 != 0) {\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" (if "if") (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pr2ws("    %s cdb: ","Extended copy (LID1)");\n    puVar5 = &local_98;\n    do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);\n    pr2ws(&DAT_001256cf);\n    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }\n  }" ({ "{") (expression_statement "pr2ws("    %s cdb: ","Extended copy (LID1)");" (call_expression "pr2ws("    %s cdb: ","Extended copy (LID1)")" (identifier "pr2ws") (argument_list "("    %s cdb: ","Extended copy (LID1)")" (( "(") (string_literal ""    %s cdb: "" (" """) (string_content "    %s cdb: ") (" """)) (, ",") (string_literal ""Extended copy (LID1)"" (" """) (string_content "Extended copy (LID1)") (" """)) () ")"))) (; ";")) (expression_statement "puVar5 = &local_98;" (assignment_expression "puVar5 = &local_98" (identifier "puVar5") (= "=") (pointer_expression "&local_98" (& "&") (identifier "local_98"))) (; ";")) (do_statement "do {\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    } while (puVar5 != local_88);" (do "do") (compound_statement "{\n      pr2ws("%02x ",*(undefined1 *)puVar5);\n      puVar5 = (undefined8 *)((long)puVar5 + 1);\n    }" ({ "{") (expression_statement "pr2ws("%02x ",*(undefined1 *)puVar5);" (call_expression "pr2ws("%02x ",*(undefined1 *)puVar5)" (identifier "pr2ws") (argument_list "("%02x ",*(undefined1 *)puVar5)" (( "(") (string_literal ""%02x "" (" """) (string_content "%02x ") (" """)) (, ",") (pointer_expression "*(undefined1 *)puVar5" (* "*") (cast_expression "(undefined1 *)puVar5" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar5"))) () ")"))) (; ";")) (expression_statement "puVar5 = (undefined8 *)((long)puVar5 + 1);" (assignment_expression "puVar5 = (undefined8 *)((long)puVar5 + 1)" (identifier "puVar5") (= "=") (cast_expression "(undefined8 *)((long)puVar5 + 1)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar5 + 1)" (( "(") (binary_expression "(long)puVar5 + 1" (cast_expression "(long)puVar5" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar5")) (+ "+") (number_literal "1")) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar5 != local_88)" (( "(") (binary_expression "puVar5 != local_88" (identifier "puVar5") (!= "!=") (identifier "local_88")) () ")")) (; ";")) (expression_statement "pr2ws(&DAT_001256cf);" (call_expression "pr2ws(&DAT_001256cf)" (identifier "pr2ws") (argument_list "(&DAT_001256cf)" (( "(") (pointer_expression "&DAT_001256cf" (& "&") (identifier "DAT_001256cf")) () ")"))) (; ";")) (if_statement "if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" (if "if") (parenthesized_expression "((1 < param_5 && param_2 != 0) && (param_3 != 0))" (( "(") (binary_expression "(1 < param_5 && param_2 != 0) && (param_3 != 0)" (parenthesized_expression "(1 < param_5 && param_2 != 0)" (( "(") (binary_expression "1 < param_5 && param_2 != 0" (binary_expression "1 < param_5" (number_literal "1") (< "<") (identifier "param_5")) (&& "&&") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      pr2ws("    %s parameter list:\n","Extended copy (LID1)");\n      hex2stderr(param_2,param_3,0xffffffff);\n    }" ({ "{") (expression_statement "pr2ws("    %s parameter list:\n","Extended copy (LID1)");" (call_expression "pr2ws("    %s parameter list:\n","Extended copy (LID1)")" (identifier "pr2ws") (argument_list "("    %s parameter list:\n","Extended copy (LID1)")" (( "(") (string_literal ""    %s parameter list:\n"" (" """) (string_content "    %s parameter list:") (escape_sequence "\n") (" """)) (, ",") (string_literal ""Extended copy (LID1)"" (" """) (string_content "Extended copy (LID1)") (" """)) () ")"))) (; ";")) (expression_statement "hex2stderr(param_2,param_3,0xffffffff);" (call_expression "hex2stderr(param_2,param_3,0xffffffff)" (identifier "hex2stderr") (argument_list "(param_2,param_3,0xffffffff)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "0xffffffff") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "lVar4 = FUN_0011a2e9("Extended copy (LID1)");" (assignment_expression "lVar4 = FUN_0011a2e9("Extended copy (LID1)")" (identifier "lVar4") (= "=") (call_expression "FUN_0011a2e9("Extended copy (LID1)")" (identifier "FUN_0011a2e9") (argument_list "("Extended copy (LID1)")" (( "(") (string_literal ""Extended copy (LID1)"" (" """) (string_content "Extended copy (LID1)") (" """)) () ")")))) (; ";")) (if_statement "if (lVar4 == 0) {\n    iVar3 = -1;\n  }\n  else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" (if "if") (parenthesized_expression "(lVar4 == 0)" (( "(") (binary_expression "lVar4 == 0" (identifier "lVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = -1;\n  }" ({ "{") (expression_statement "iVar3 = -1;" (assignment_expression "iVar3 = -1" (identifier "iVar3") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" (else "else") (compound_statement "{\n    set_scsi_pt_cdb(lVar4,&local_98,0x10);\n    set_scsi_pt_sense(lVar4,local_88,0x40);\n    set_scsi_pt_data_out(lVar4,param_2,param_3);\n    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);\n    iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);\n    if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }\n    destruct_scsi_pt_obj(lVar4);\n  }" ({ "{") (expression_statement "set_scsi_pt_cdb(lVar4,&local_98,0x10);" (call_expression "set_scsi_pt_cdb(lVar4,&local_98,0x10)" (identifier "set_scsi_pt_cdb") (argument_list "(lVar4,&local_98,0x10)" (( "(") (identifier "lVar4") (, ",") (pointer_expression "&local_98" (& "&") (identifier "local_98")) (, ",") (number_literal "0x10") () ")"))) (; ";")) (expression_statement "set_scsi_pt_sense(lVar4,local_88,0x40);" (call_expression "set_scsi_pt_sense(lVar4,local_88,0x40)" (identifier "set_scsi_pt_sense") (argument_list "(lVar4,local_88,0x40)" (( "(") (identifier "lVar4") (, ",") (identifier "local_88") (, ",") (number_literal "0x40") () ")"))) (; ";")) (expression_statement "set_scsi_pt_data_out(lVar4,param_2,param_3);" (call_expression "set_scsi_pt_data_out(lVar4,param_2,param_3)" (identifier "set_scsi_pt_data_out") (argument_list "(lVar4,param_2,param_3)" (( "(") (identifier "lVar4") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);" (assignment_expression "uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5)" (identifier "uVar1") (= "=") (call_expression "do_scsi_pt(lVar4,param_1,0x3c,param_5)" (identifier "do_scsi_pt") (argument_list "(lVar4,param_1,0x3c,param_5)" (( "(") (identifier "lVar4") (, ",") (identifier "param_1") (, ",") (number_literal "0x3c") (, ",") (identifier "param_5") () ")")))) (; ";")) (expression_statement "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);" (assignment_expression "iVar2 = sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" (identifier "iVar2") (= "=") (call_expression "sg_cmds_process_resp\n                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" (identifier "sg_cmds_process_resp") (argument_list "(lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c)" (( "(") (identifier "lVar4") (, ",") (string_literal ""Extended copy (LID1)"" (" """) (string_content "Extended copy (LID1)") (" """)) (, ",") (identifier "uVar1") (, ",") (number_literal "0") (, ",") (identifier "local_88") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (pointer_expression "&local_9c" (& "&") (identifier "local_9c")) () ")")))) (; ";")) (if_statement "if (iVar2 == -1) {\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }\n    else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 == -1)" (( "(") (binary_expression "iVar2 == -1" (identifier "iVar2") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      uVar1 = get_scsi_pt_os_err(lVar4);\n      iVar3 = sg_convert_errno(uVar1);\n    }" ({ "{") (expression_statement "uVar1 = get_scsi_pt_os_err(lVar4);" (assignment_expression "uVar1 = get_scsi_pt_os_err(lVar4)" (identifier "uVar1") (= "=") (call_expression "get_scsi_pt_os_err(lVar4)" (identifier "get_scsi_pt_os_err") (argument_list "(lVar4)" (( "(") (identifier "lVar4") () ")")))) (; ";")) (expression_statement "iVar3 = sg_convert_errno(uVar1);" (assignment_expression "iVar3 = sg_convert_errno(uVar1)" (identifier "iVar3") (= "=") (call_expression "sg_convert_errno(uVar1)" (identifier "sg_convert_errno") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" (else "else") (compound_statement "{\n      iVar3 = 0;\n      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }\n    }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {\n        iVar3 = 0;\n      }" (if "if") (parenthesized_expression "((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2))" (( "(") (binary_expression "(iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)" (parenthesized_expression "(iVar2 == -2)" (( "(") (binary_expression "iVar2 == -2" (identifier "iVar2") (== "==") (number_literal "-2")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = local_9c, local_9c - 0x14U < 2)" (( "(") (comma_expression "iVar3 = local_9c, local_9c - 0x14U < 2" (assignment_expression "iVar3 = local_9c" (identifier "iVar3") (= "=") (identifier "local_9c")) (, ",") (binary_expression "local_9c - 0x14U < 2" (binary_expression "local_9c - 0x14U" (identifier "local_9c") (- "-") (number_literal "0x14U")) (< "<") (number_literal "2"))) () ")"))) () ")")) (compound_statement "{\n        iVar3 = 0;\n      }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")))) (expression_statement "destruct_scsi_pt_obj(lVar4);" (call_expression "destruct_scsi_pt_obj(lVar4)" (identifier "destruct_scsi_pt_obj") (argument_list "(lVar4)" (( "(") (identifier "lVar4") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_40 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

int function_1(int sg_fd,void *var_7,int var_2,type_1 noisy,int var_3)

{
  long var_21;
  int iVar2;
  int var_16;
  type_2 *var_10;
  type_3 *var_5;
  long var_1;
  int var_19;
  uint8_t xcopy_cdb [16];
  uint8_t var_6 [64];
  
  var_21 = *(long *)(var_1 + 0x28);
  xcopy_cdb[0] = 0x83;
  xcopy_cdb[1] = '\0';
  xcopy_cdb[2] = '\0';
  xcopy_cdb[3] = '\0';
  xcopy_cdb[4] = '\0';
  xcopy_cdb[5] = '\0';
  xcopy_cdb[6] = '\0';
  xcopy_cdb[7] = '\0';
  xcopy_cdb._8_8_ =
       (ulong)((type_4)var_2 >> 0x18 | (var_2 & 0xff0000U) >> 8 | (var_2 & 0xff00U) << 8 |
              var_2 << 0x18) << 0x10;
  if (var_3 != 0) {
    var_4("    %s cdb: ","Extended copy (LID1)");
    var_5 = xcopy_cdb;
    do {
      var_4("%02x ",(ulong)*var_5);
      var_5 = var_5 + 1;
    } while (var_5 != var_6);
    var_4("\n");
    if ((1 < var_3 && var_7 != (void *)0x0) && (var_2 != 0)) {
      var_4("    %s parameter list:\n","Extended copy (LID1)");
      var_8((uint8_t *)var_7,var_2,-1);
    }
  }
  var_10 = var_9("Extended copy (LID1)");
  if (var_10 == (type_2 *)0x0) {
    iVar2 = -1;
  }
  else {
    var_11(var_10,xcopy_cdb,0x10);
    var_12(var_10,var_6,0x40);
    var_13(var_10,(uint8_t *)var_7,var_2);
    iVar2 = var_14(var_10,sg_fd,0x3c,var_3);
    var_16 = var_15(var_10,"Extended copy (LID1)",iVar2,0,var_6,noisy,var_3,&var_19)
    ;
    if (var_16 == -1) {
      iVar2 = var_17(var_10);
      iVar2 = var_18(iVar2);
    }
    else {
      iVar2 = 0;
      if ((var_16 == -2) && (iVar2 = var_19, var_19 - 0x14U < 2)) {
        iVar2 = 0;
      }
    }
    var_20(var_10);
  }
  if (var_21 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_22();
  }
  return iVar2;
}


(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: (sized_type_specifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (do_statement body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (string_literal (string_content))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier) (number_literal) (identifier) (identifier) (identifier) (pointer_expression argument: (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: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

int MASKED(undefined4 param_1,long param_2,uint param_3,undefined1 param_4,int param_5)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  long lVar4;
  undefined8 *puVar5;
  long in_FS_OFFSET;
  int local_9c;
  undefined8 local_98;
  long local_90;
  undefined8 local_88 [9];
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_98 = 0x83;
  local_90 = (ulong)(param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 |
                    param_3 << 0x18) << 0x10;
  if (param_5 != 0) {
    pr2ws("    %s cdb: ","Extended copy (LID1)");
    puVar5 = &local_98;
    do {
      pr2ws("%02x ",*(undefined1 *)puVar5);
      puVar5 = (undefined8 *)((long)puVar5 + 1);
    } while (puVar5 != local_88);
    pr2ws(&DAT_001256cf);
    if ((1 < param_5 && param_2 != 0) && (param_3 != 0)) {
      pr2ws("    %s parameter list:\n","Extended copy (LID1)");
      hex2stderr(param_2,param_3,0xffffffff);
    }
  }
  lVar4 = FUN_0011a2e9("Extended copy (LID1)");
  if (lVar4 == 0) {
    iVar3 = -1;
  }
  else {
    set_scsi_pt_cdb(lVar4,&local_98,0x10);
    set_scsi_pt_sense(lVar4,local_88,0x40);
    set_scsi_pt_data_out(lVar4,param_2,param_3);
    uVar1 = do_scsi_pt(lVar4,param_1,0x3c,param_5);
    iVar2 = sg_cmds_process_resp
                      (lVar4,"Extended copy (LID1)",uVar1,0,local_88,param_4,param_5,&local_9c);
    if (iVar2 == -1) {
      uVar1 = get_scsi_pt_os_err(lVar4);
      iVar3 = sg_convert_errno(uVar1);
    }
    else {
      iVar3 = 0;
      if ((iVar2 == -2) && (iVar3 = local_9c, local_9c - 0x14U < 2)) {
        iVar3 = 0;
      }
    }
    destruct_scsi_pt_obj(lVar4);
  }
  if (local_40 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return iVar3;
}

