
int main(int argc,char **argv)

{
  long lVar1;
  bool bVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  bool bVar6;
  char cVar7;
  int iVar8;
  uint uVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  int iVar13;
  ushort **ppuVar14;
  ulong uVar15;
  __off64_t _Var16;
  int *piVar17;
  undefined8 uVar18;
  long lVar19;
  char *pcVar20;
  size_t __n;
  char *pcVar21;
  ulong uVar22;
  mode_s *pmVar23;
  long in_FS_OFFSET;
  byte bVar24;
  int local_194;
  char *local_190;
  int local_188;
  uint local_184;
  int local_180;
  uint local_17c;
  void *local_178;
  int local_170;
  int local_16c;
  int local_168;
  int local_164;
  int option_index;
  uint8_t *free_dop;
  char ebuff [256];
  
  bVar24 = 0;
  lVar1 = *(long *)(in_FS_OFFSET + 0x28);
  free_dop = (uint8_t *)0x0;
  local_190 = (char *)0x0;
  local_17c = 0;
  local_168 = 300;
  local_164 = 0;
  local_180 = 0;
  uVar9 = 0;
  local_170 = 0;
  local_184 = 0;
  local_188 = 0;
  local_194 = 0;
  local_16c = 0;
  bVar4 = false;
  bVar6 = false;
  bVar2 = false;
  bVar5 = false;
  bVar3 = false;
LAB_001023de:
  option_index = 0;
  iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);
  if (iVar8 == -1) {
    if (local_194 != 0) {
      if (local_194 < 2) {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 0;
      }
      else {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        pr2serr("\n");
        print_modes();
        local_194 = 0;
      }
      goto LAB_001026b7;
    }
    if (optind < argc) {
      pcVar20 = argv[optind];
      optind = optind + 1;
      if (optind < argc) goto LAB_0010272c;
    }
    else {
      pcVar20 = (char *)0x0;
    }
    if ((bVar2) && (bVar6)) {
      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");
    }
    else if (!bVar6) {
      if (pcVar20 == (char *)0x0) {
        pr2serr("Missing device name!\n\n");
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 1;
        goto LAB_001026b7;
      }
      if ((local_170 < local_16c) && (0 < local_170)) {
        pr2serr("trim chunk size (CS) to be the same as LEN\n");
        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);
        if (iVar8 < 0) goto LAB_001029f5;
        local_16c = local_170;
LAB_00102933:
        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);
        if (local_178 == (void *)0x0) {
          pr2serr("sg_write_buffer: out of memory\n");
          local_194 = sg_convert_errno(0xc);
          goto LAB_00102859;
        }
        __n = (size_t)local_170;
        memset(local_178,0xff,__n);
        if (local_190 == (char *)0x0) {
LAB_001029c2:
          iVar12 = local_170;
          if (local_16c < 1) goto LAB_00102f05;
        }
        else {
          iVar10 = strcmp(local_190,"-");
          if (iVar10 == 0) {
            if (local_164 < 1) {
              uVar15 = read(0,local_178,__n);
              if (-1 < (int)uVar15) {
                if ((int)uVar15 < local_170) {
                  iVar11 = 0;
                  goto LAB_00102c57;
                }
                goto LAB_001029c2;
              }
              piVar17 = __errno_location();
              local_194 = sg_convert_errno(*piVar17);
              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190
                            );
              perror(ebuff);
            }
            else {
              pr2serr("Can\'t skip on stdin\n");
              local_194 = 0xf;
            }
            goto LAB_00102859;
          }
          iVar11 = open64(local_190,0);
          if (iVar11 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",
                           local_190);
            perror(ebuff);
            goto LAB_00102859;
          }
          iVar12 = sg_set_binary_mode(iVar11);
          if (iVar12 < 0) {
            perror("sg_set_binary_mode");
          }
          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(ebuff,0x100,1,0x100,
                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);
            perror(ebuff);
            close(iVar11);
            goto LAB_00102859;
          }
          uVar15 = read(iVar11,local_178,__n);
          if ((int)uVar15 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);
            perror(ebuff);
            close(iVar11);
            goto LAB_00102859;
          }
          iVar12 = local_170;
          if (local_170 <= (int)uVar15) {
LAB_00102b35:
            close(iVar11);
            local_170 = iVar12;
            goto LAB_001029c2;
          }
LAB_00102c57:
          uVar22 = uVar15 & 0xffffffff;
          iVar12 = (int)uVar15;
          if (bVar4) {
            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);
            pr2serr("pad with 0xff bytes and continue\n");
            iVar12 = local_170;
LAB_00102c65:
            local_170 = iVar12;
            if (iVar10 == 0) goto LAB_001029c2;
            goto LAB_00102b35;
          }
          if (local_188 == 0) goto LAB_00102c65;
          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);
          pr2serr("will write %d bytes",uVar22);
          if ((local_16c < 1) || (local_170 <= local_16c)) {
            pr2serr("\n");
            goto LAB_00102c65;
          }
          pr2serr(", %d bytes per WRITE BUFFER command\n");
          if (iVar10 != 0) goto LAB_00102b35;
        }
        iVar10 = 0;
        goto LAB_00102da3;
      }
      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);
      if (iVar8 < 0) {
LAB_001029f5:
        if (local_188 == 0) {
          local_194 = sg_convert_errno(-iVar8);
          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;
          goto LAB_00102867;
        }
        uVar18 = safe_strerror(-iVar8);
        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);
        local_194 = sg_convert_errno(-iVar8);
        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;
        goto LAB_00102880;
      }
      if ((0 < local_170) || (local_190 != (char *)0x0)) {
        if (local_170 == 0) {
          local_170 = 0x800000;
        }
        goto LAB_00102933;
      }
      if (0 < local_16c) goto LAB_0010284e;
      local_178 = (void *)0x0;
LAB_00102f05:
      if (local_188 == 0) {
        local_194 = local_188;
        if (bVar5) goto LAB_00102859;
      }
      else {
        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9
                ,local_17c,local_184,local_180,local_170);
        if (bVar5) {
          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");
          goto LAB_00102859;
        }
      }
      iVar13 = sg_ll_write_buffer_v2
                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,
                          local_188);
      goto LAB_00102f58;
    }
    pr2serr("version: %s\n","1.28 20180628");
    goto LAB_001026b7;
  }
  switch(iVar8) {
  case 0x3f:
  case 0x68:
    local_194 = local_194 + 1;
    goto LAB_001023de;
  default:
    pr2serr("unrecognised option code 0x%x ??\n",iVar8);
    pr2serr(
           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
           );
    goto LAB_001026af;
  case 0x49:
    local_190 = optarg;
    goto LAB_001023de;
  case 0x53:
    local_17c = sg_get_num(optarg);
    if (7 < local_17c) {
      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x56:
    bVar6 = true;
    goto LAB_001023de;
  case 0x62:
    local_16c = sg_get_num(optarg);
    if (local_16c < 0) {
      pr2serr("argument to \'--bpw\' should be in a positive number\n");
      goto LAB_001026af;
    }
    pcVar20 = strchr(optarg,0x2c);
    if (pcVar20 != (char *)0x0) {
      iVar8 = strncmp("act",pcVar20 + 1,3);
      if (iVar8 == 0) {
        bVar3 = true;
      }
    }
    goto LAB_001023de;
  case 100:
    bVar5 = true;
    goto LAB_001023de;
  case 0x69:
    local_184 = sg_get_num(optarg);
    if (0xff < local_184) {
      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x6c:
    local_170 = sg_get_num(optarg);
    if (local_170 < 0) {
      pr2serr("bad argument to \'--length\'\n");
      goto LAB_001026af;
    }
    bVar4 = true;
    goto LAB_001023de;
  case 0x6d:
    ppuVar14 = __ctype_b_loc();
    pcVar20 = optarg;
    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {
      lVar19 = -1;
      pcVar21 = optarg;
      do {
        if (lVar19 == 0) break;
        lVar19 = lVar19 + -1;
        cVar7 = *pcVar21;
        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;
      } while (cVar7 != '\0');
      if (mode_arr[0].mode_string == (char *)0x0) {
LAB_001025b2:
        print_modes();
        goto LAB_001026af;
      }
      pmVar23 = mode_arr;
      pcVar21 = mode_arr[0].mode_string;
      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {
        pmVar23 = pmVar23 + 1;
        pcVar21 = pmVar23->mode_string;
        if (pcVar21 == (char *)0x0) goto LAB_001025b2;
      }
      uVar9 = pmVar23->mode;
    }
    else {
      uVar9 = sg_get_num(optarg);
      if (0x1f < uVar9) {
        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");
        goto LAB_001026af;
      }
    }
    goto LAB_001023de;
  case 0x6f:
    local_180 = sg_get_num(optarg);
    if (local_180 < 0) {
      pr2serr("bad argument to \'--offset\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x72:
    local_190 = "-";
    goto LAB_001023de;
  case 0x73:
    local_164 = sg_get_num(optarg);
    if (local_164 < 0) {
      pr2serr("bad argument to \'--skip\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x74:
    goto switchD_0010241f_caseD_74;
  case 0x76:
    local_188 = local_188 + 1;
    bVar2 = true;
    goto LAB_001023de;
  }
LAB_0010272c:
  do {
    pr2serr("Unexpected extra argument: %s\n",argv[optind]);
    optind = optind + 1;
  } while (optind < argc);
  pr2serr(
         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
         );
  local_194 = 1;
  goto LAB_001026b7;
LAB_00102da3:
  if (iVar12 <= iVar10) goto LAB_0010284e;
  iVar11 = iVar12 - iVar10;
  if (local_16c < iVar12 - iVar10) {
    iVar11 = local_16c;
  }
  if (local_188 == 0) {
    if (!bVar5) {
LAB_00102d61:
      iVar13 = sg_ll_write_buffer_v2
                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,
                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);
      if (iVar13 != 0) {
        if (bVar3) goto LAB_00102ea4;
        goto LAB_00102f66;
      }
    }
  }
  else {
    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c
            ,local_184,iVar10 + local_180,iVar11);
    if (!bVar5) goto LAB_00102d61;
    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");
  }
  iVar10 = iVar10 + iVar11;
  goto LAB_00102da3;
LAB_0010284e:
  if (bVar3) {
LAB_00102ea4:
    if (local_188 == 0) {
      local_194 = local_188;
      if (!bVar5) {
LAB_00102ec2:
        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);
LAB_00102f58:
        local_194 = iVar13;
        if (iVar13 != 0) {
LAB_00102f66:
          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);
          pr2serr("Write buffer failed: %s\n",ebuff);
          local_194 = iVar13;
        }
      }
    }
    else {
      pr2serr("sending Activate deferred microcode [0xf]\n");
      if (!bVar5) goto LAB_00102ec2;
      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");
    }
  }
LAB_00102859:
  if (free_dop == (uint8_t *)0x0) {
LAB_00102e47:
    iVar8 = sg_cmds_close_device(iVar8);
    if (iVar8 < 0) {
      uVar18 = safe_strerror(-iVar8);
      pr2serr("close error: %s\n",uVar18);
      if (local_194 == 0) {
        local_194 = sg_convert_errno(-iVar8);
      }
    }
  }
  else {
LAB_00102867:
    free(free_dop);
    if (-1 < iVar8) goto LAB_00102e47;
  }
  if (local_188 == 0) {
LAB_00102a18:
    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);
    if (cVar7 == '\0') {
      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");
    }
  }
LAB_00102880:
  if (local_194 < 0) {
    local_194 = 99;
  }
  goto LAB_001026b7;
switchD_0010241f_caseD_74:
  local_168 = sg_get_num(optarg);
  if (local_168 < 0) goto code_r0x00102669;
  goto LAB_001023de;
code_r0x00102669:
  pr2serr("Invalid argument to \'--timeout\'\n");
LAB_001026af:
  local_194 = 1;
LAB_001026b7:
  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {
    return local_194;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



int FUN_00102330(int param_1,long param_2)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  char cVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  char *pcVar13;
  ushort **ppuVar14;
  ulong uVar15;
  __off64_t _Var16;
  int *piVar17;
  undefined8 uVar18;
  long lVar19;
  size_t __n;
  char *pcVar20;
  ulong uVar21;
  undefined **ppuVar22;
  long in_FS_OFFSET;
  byte bVar23;
  int local_194;
  char *local_190;
  int local_188;
  uint local_184;
  int local_180;
  uint local_17c;
  void *local_178;
  int local_170;
  int local_16c;
  int local_168;
  int local_164;
  undefined4 local_154;
  void *local_150;
  char local_148 [264];
  long local_40;
  
  bVar23 = 0;
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_150 = (void *)0x0;
  local_190 = (char *)0x0;
  local_17c = 0;
  local_168 = 300;
  local_164 = 0;
  local_180 = 0;
  uVar8 = 0;
  local_170 = 0;
  local_184 = 0;
  local_188 = 0;
  local_194 = 0;
  local_16c = 0;
  bVar3 = false;
  bVar5 = false;
  bVar1 = false;
  bVar4 = false;
  bVar2 = false;
LAB_001023de:
  local_154 = 0;
  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);
  if (iVar7 == -1) {
    if (local_194 != 0) {
      if (local_194 < 2) {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 0;
      }
      else {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        pr2serr("\n");
        FUN_001022c5();
        local_194 = 0;
      }
      goto LAB_001026b7;
    }
    if (optind < param_1) {
      lVar19 = *(long *)(param_2 + (long)optind * 8);
      optind = optind + 1;
      if (optind < param_1) goto LAB_0010272c;
    }
    else {
      lVar19 = 0;
    }
    if ((bVar1) && (bVar5)) {
      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");
    }
    else if (!bVar5) {
      if (lVar19 == 0) {
        pr2serr("Missing device name!\n\n");
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 1;
        goto LAB_001026b7;
      }
      if ((local_170 < local_16c) && (0 < local_170)) {
        pr2serr("trim chunk size (CS) to be the same as LEN\n");
        iVar7 = sg_cmds_open_device(lVar19,0,local_188);
        if (iVar7 < 0) goto LAB_001029f5;
        local_16c = local_170;
LAB_00102933:
        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);
        if (local_178 == (void *)0x0) {
          pr2serr("sg_write_buffer: out of memory\n");
          local_194 = sg_convert_errno(0xc);
          goto LAB_00102859;
        }
        __n = (size_t)local_170;
        memset(local_178,0xff,__n);
        if (local_190 == (char *)0x0) {
LAB_001029c2:
          iVar11 = local_170;
          if (local_16c < 1) goto LAB_00102f05;
        }
        else {
          iVar9 = strcmp(local_190,"-");
          if (iVar9 == 0) {
            if (local_164 < 1) {
              uVar15 = read(0,local_178,__n);
              if (-1 < (int)uVar15) {
                if ((int)uVar15 < local_170) {
                  iVar10 = 0;
                  goto LAB_00102c57;
                }
                goto LAB_001029c2;
              }
              piVar17 = __errno_location();
              local_194 = sg_convert_errno(*piVar17);
              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",
                             local_190);
              perror(local_148);
            }
            else {
              pr2serr("Can\'t skip on stdin\n");
              local_194 = 0xf;
            }
            goto LAB_00102859;
          }
          iVar10 = open64(local_190,0);
          if (iVar10 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",
                           local_190);
            perror(local_148);
            goto LAB_00102859;
          }
          iVar11 = sg_set_binary_mode(iVar10);
          if (iVar11 < 0) {
            perror("sg_set_binary_mode");
          }
          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,
                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);
            perror(local_148);
            close(iVar10);
            goto LAB_00102859;
          }
          uVar15 = read(iVar10,local_178,__n);
          if ((int)uVar15 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",
                           local_190);
            perror(local_148);
            close(iVar10);
            goto LAB_00102859;
          }
          iVar11 = local_170;
          if (local_170 <= (int)uVar15) {
LAB_00102b35:
            close(iVar10);
            local_170 = iVar11;
            goto LAB_001029c2;
          }
LAB_00102c57:
          uVar21 = uVar15 & 0xffffffff;
          iVar11 = (int)uVar15;
          if (bVar3) {
            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);
            pr2serr("pad with 0xff bytes and continue\n");
            iVar11 = local_170;
LAB_00102c65:
            local_170 = iVar11;
            if (iVar9 == 0) goto LAB_001029c2;
            goto LAB_00102b35;
          }
          if (local_188 == 0) goto LAB_00102c65;
          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);
          pr2serr("will write %d bytes",uVar21);
          if ((local_16c < 1) || (local_170 <= local_16c)) {
            pr2serr("\n");
            goto LAB_00102c65;
          }
          pr2serr(", %d bytes per WRITE BUFFER command\n");
          if (iVar9 != 0) goto LAB_00102b35;
        }
        iVar9 = 0;
        goto LAB_00102da3;
      }
      iVar7 = sg_cmds_open_device(lVar19,0,local_188);
      if (iVar7 < 0) {
LAB_001029f5:
        if (local_188 == 0) {
          local_194 = sg_convert_errno(-iVar7);
          if (local_150 == (void *)0x0) goto LAB_00102a18;
          goto LAB_00102867;
        }
        uVar18 = safe_strerror(-iVar7);
        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);
        local_194 = sg_convert_errno(-iVar7);
        if (local_150 != (void *)0x0) goto LAB_00102867;
        goto LAB_00102880;
      }
      if ((0 < local_170) || (local_190 != (char *)0x0)) {
        if (local_170 == 0) {
          local_170 = 0x800000;
        }
        goto LAB_00102933;
      }
      if (0 < local_16c) goto LAB_0010284e;
      local_178 = (void *)0x0;
LAB_00102f05:
      if (local_188 == 0) {
        local_194 = local_188;
        if (bVar4) goto LAB_00102859;
      }
      else {
        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8
                ,local_17c,local_184,local_180,local_170);
        if (bVar4) {
          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");
          goto LAB_00102859;
        }
      }
      iVar12 = sg_ll_write_buffer_v2
                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,
                          local_188);
      goto LAB_00102f58;
    }
    pr2serr("version: %s\n","1.28 20180628");
    goto LAB_001026b7;
  }
  switch(iVar7) {
  case 0x3f:
  case 0x68:
    local_194 = local_194 + 1;
    goto LAB_001023de;
  default:
    pr2serr("unrecognised option code 0x%x ??\n",iVar7);
    pr2serr(
           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
           );
    goto LAB_001026af;
  case 0x49:
    local_190 = optarg;
    goto LAB_001023de;
  case 0x53:
    local_17c = sg_get_num(optarg);
    if (7 < local_17c) {
      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x56:
    bVar5 = true;
    goto LAB_001023de;
  case 0x62:
    local_16c = sg_get_num(optarg);
    if (local_16c < 0) {
      pr2serr("argument to \'--bpw\' should be in a positive number\n");
      goto LAB_001026af;
    }
    pcVar13 = strchr(optarg,0x2c);
    if (pcVar13 != (char *)0x0) {
      iVar7 = strncmp("act",pcVar13 + 1,3);
      if (iVar7 == 0) {
        bVar2 = true;
      }
    }
    goto LAB_001023de;
  case 100:
    bVar4 = true;
    goto LAB_001023de;
  case 0x69:
    local_184 = sg_get_num(optarg);
    if (0xff < local_184) {
      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x6c:
    local_170 = sg_get_num(optarg);
    if (local_170 < 0) {
      pr2serr("bad argument to \'--length\'\n");
      goto LAB_001026af;
    }
    bVar3 = true;
    goto LAB_001023de;
  case 0x6d:
    ppuVar14 = __ctype_b_loc();
    pcVar13 = optarg;
    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {
      lVar19 = -1;
      pcVar20 = optarg;
      do {
        if (lVar19 == 0) break;
        lVar19 = lVar19 + -1;
        cVar6 = *pcVar20;
        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;
      } while (cVar6 != '\0');
      if (PTR_DAT_00107020 == (undefined *)0x0) {
LAB_001025b2:
        FUN_001022c5();
        goto LAB_001026af;
      }
      ppuVar22 = &PTR_DAT_00107020;
      pcVar20 = PTR_DAT_00107020;
      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {
        ppuVar22 = ppuVar22 + 3;
        pcVar20 = *ppuVar22;
        if (pcVar20 == (char *)0x0) goto LAB_001025b2;
      }
      uVar8 = *(uint *)(ppuVar22 + 1);
    }
    else {
      uVar8 = sg_get_num(optarg);
      if (0x1f < uVar8) {
        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");
        goto LAB_001026af;
      }
    }
    goto LAB_001023de;
  case 0x6f:
    local_180 = sg_get_num(optarg);
    if (local_180 < 0) {
      pr2serr("bad argument to \'--offset\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x72:
    local_190 = "-";
    goto LAB_001023de;
  case 0x73:
    local_164 = sg_get_num(optarg);
    if (local_164 < 0) {
      pr2serr("bad argument to \'--skip\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x74:
    goto switchD_0010241f_caseD_74;
  case 0x76:
    local_188 = local_188 + 1;
    bVar1 = true;
    goto LAB_001023de;
  }
LAB_0010272c:
  do {
    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));
    optind = optind + 1;
  } while (optind < param_1);
  pr2serr(
         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
         );
  local_194 = 1;
  goto LAB_001026b7;
LAB_00102da3:
  if (iVar11 <= iVar9) goto LAB_0010284e;
  iVar10 = iVar11 - iVar9;
  if (local_16c < iVar11 - iVar9) {
    iVar10 = local_16c;
  }
  if (local_188 == 0) {
    if (!bVar4) {
LAB_00102d61:
      iVar12 = sg_ll_write_buffer_v2
                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,
                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);
      if (iVar12 != 0) {
        if (bVar2) goto LAB_00102ea4;
        goto LAB_00102f66;
      }
    }
  }
  else {
    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c
            ,local_184,iVar9 + local_180,iVar10);
    if (!bVar4) goto LAB_00102d61;
    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");
  }
  iVar9 = iVar9 + iVar10;
  goto LAB_00102da3;
LAB_0010284e:
  if (bVar2) {
LAB_00102ea4:
    if (local_188 == 0) {
      local_194 = local_188;
      if (!bVar4) {
LAB_00102ec2:
        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);
LAB_00102f58:
        local_194 = iVar12;
        if (iVar12 != 0) {
LAB_00102f66:
          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);
          pr2serr("Write buffer failed: %s\n",local_148);
          local_194 = iVar12;
        }
      }
    }
    else {
      pr2serr("sending Activate deferred microcode [0xf]\n");
      if (!bVar4) goto LAB_00102ec2;
      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");
    }
  }
LAB_00102859:
  if (local_150 == (void *)0x0) {
LAB_00102e47:
    iVar7 = sg_cmds_close_device(iVar7);
    if (iVar7 < 0) {
      uVar18 = safe_strerror(-iVar7);
      pr2serr("close error: %s\n",uVar18);
      if (local_194 == 0) {
        local_194 = sg_convert_errno(-iVar7);
      }
    }
  }
  else {
LAB_00102867:
    free(local_150);
    if (-1 < iVar7) goto LAB_00102e47;
  }
  if (local_188 == 0) {
LAB_00102a18:
    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);
    if (cVar6 == '\0') {
      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");
    }
  }
LAB_00102880:
  if (local_194 < 0) {
    local_194 = 99;
  }
  goto LAB_001026b7;
switchD_0010241f_caseD_74:
  local_168 = sg_get_num(optarg);
  if (local_168 < 0) goto code_r0x00102669;
  goto LAB_001023de;
code_r0x00102669:
  pr2serr("Invalid argument to \'--timeout\'\n");
LAB_001026af:
  local_194 = 1;
LAB_001026b7:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return local_194;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x168
MOV EBP,EDI
MOV R15,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x158],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x30],0x12c
MOV dword ptr [RSP + 0x34],0x0
MOV dword ptr [RSP + 0x18],0x0
MOV R14D,0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0x4],0x0
MOV dword ptr [RSP + 0x2c],0x0
MOV byte ptr [RSP + 0x3b],0x0
MOV byte ptr [RSP + 0x20],0x0
MOV byte ptr [RSP + 0x39],0x0
MOV byte ptr [RSP + 0x3a],0x0
MOV byte ptr [RSP + 0x38],0x0
LEA R12,[RSP + 0x44]
LEA RBX,[0x105050]
MOV dword ptr [RSP + 0x44],0x0
MOV R8,R12
LEA RCX,[0x1071a0]
LEA RDX,[0x104e12]
MOV RSI,R15
MOV EDI,EBP
CALL 0x001020b0
CMP EAX,-0x1
JZ 0x001026f8
LEA EDX,[RAX + -0x3f]
CMP EDX,0x37
JA 0x0010268b
MOV EDX,EDX
MOVSXD RDX,dword ptr [RBX + RDX*0x4]
ADD RDX,RBX
JMP RDX
LEA RAX,[0x104e10]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001023de
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x2c],EAX
TEST EAX,EAX
JS 0x00102486
MOV ESI,0x2c
MOV RDI,qword ptr [0x001073e8]
CALL 0x001020c0
TEST RAX,RAX
JZ 0x001023de
LEA RSI,[RAX + 0x1]
MOV EDX,0x3
LEA RDI,[0x104e2a]
CALL 0x00102070
TEST EAX,EAX
MOV EAX,0x1
MOVZX ECX,byte ptr [RSP + 0x38]
CMOVZ ECX,EAX
MOV byte ptr [RSP + 0x38],CL
JMP 0x001023de
LEA RDI,[0x1040e8]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
ADD dword ptr [RSP + 0x4],0x1
JMP 0x001023de
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x14],EAX
CMP EAX,0xff
JBE 0x001023de
LEA RDI,[0x104120]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
MOV RAX,qword ptr [0x001073e8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001023de
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x28],EAX
TEST EAX,EAX
JS 0x00102506
MOV byte ptr [RSP + 0x3b],0x1
JMP 0x001023de
LEA RDI,[0x104e2e]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
CALL 0x001021c0
MOV R14,qword ptr [0x001073e8]
MOVSX RDX,byte ptr [R14]
MOV RAX,qword ptr [RAX]
TEST byte ptr [RAX + RDX*0x2 + 0x1],0x8
JZ 0x00102560
MOV RDI,R14
CALL 0x00102190
MOV R14D,EAX
CMP EAX,0x1f
JBE 0x001023de
LEA RDI,[0x104158]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
MOV EAX,0x0
MOV RCX,-0x1
MOV RDI,R14
SCASB.REPNE RDI
MOV RAX,RCX
NOT RAX
LEA EAX,[RAX + -0x1]
MOV RDI,qword ptr [0x00107020]
TEST RDI,RDI
JZ 0x001025b2
LEA R13,[0x107020]
CDQE
MOV dword ptr [RSP + 0x3c],EBP
MOV RBP,RAX
MOV RDX,RBP
MOV RSI,R14
CALL 0x00102070
TEST EAX,EAX
JZ 0x001025bc
ADD R13,0x18
MOV RDI,qword ptr [R13]
TEST RDI,RDI
JNZ 0x00102596
CALL 0x001022c5
JMP 0x001026af
MOV EBP,dword ptr [RSP + 0x3c]
MOV R14D,dword ptr [R13 + 0x8]
JMP 0x001023de
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x18],EAX
TEST EAX,EAX
JNS 0x001023de
LEA RDI,[0x104e4a]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x34],EAX
TEST EAX,EAX
JNS 0x001023de
LEA RDI,[0x104e66]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x1c],EAX
CMP EAX,0x7
JBE 0x001023de
LEA RDI,[0x104190]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
MOV RDI,qword ptr [0x001073e8]
CALL 0x00102190
MOV dword ptr [RSP + 0x30],EAX
TEST EAX,EAX
JNS 0x001023de
LEA RDI,[0x1041c0]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026af
ADD dword ptr [RSP + 0x10],0x1
MOV byte ptr [RSP + 0x39],0x1
JMP 0x001023de
MOV ESI,EAX
LEA RDI,[0x1041e8]
MOV EAX,0x0
CALL 0x001020a0
LEA RDI,[0x104210]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],0x1
MOV EAX,dword ptr [RSP + 0x4]
MOV RCX,qword ptr [RSP + 0x158]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00102fee
ADD RSP,0x168
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV byte ptr [RSP + 0x3a],0x1
JMP 0x001023de
MOV byte ptr [RSP + 0x20],0x1
JMP 0x001023de
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00102770
MOV EAX,dword ptr [0x001073e0]
CMP EAX,EBP
JGE 0x001027c9
MOVSXD RDX,EAX
MOV RBX,qword ptr [R15 + RDX*0x8]
ADD EAX,0x1
MOV dword ptr [0x001073e0],EAX
CMP EAX,EBP
JGE 0x001027ce
LEA RBX,[0x104830]
CDQE
MOV RSI,qword ptr [R15 + RAX*0x8]
MOV RDI,RBX
MOV EAX,0x0
CALL 0x001020a0
MOV EAX,dword ptr [0x001073e0]
ADD EAX,0x1
MOV dword ptr [0x001073e0],EAX
CMP EAX,EBP
JL 0x0010272c
LEA RDI,[0x104210]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],0x1
JMP 0x001026b7
CMP dword ptr [RSP + 0x4],0x1
JLE 0x001027ab
LEA RDI,[0x104210]
MOV EAX,0x0
CALL 0x001020a0
LEA RDI,[0x104eb0]
MOV EAX,0x0
CALL 0x001020a0
CALL 0x001022c5
MOV dword ptr [RSP + 0x4],0x0
JMP 0x001026b7
LEA RDI,[0x104210]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],0x0
JMP 0x001026b7
MOV EBX,0x0
CMP byte ptr [RSP + 0x39],0x0
JZ 0x001027e0
CMP byte ptr [RSP + 0x20],0x0
JNZ 0x00102898
CMP byte ptr [RSP + 0x20],0x0
JNZ 0x001028a9
TEST RBX,RBX
JZ 0x001028c6
MOV EAX,dword ptr [RSP + 0x28]
TEST EAX,EAX
SETG BPL
CMP dword ptr [RSP + 0x2c],EAX
JLE 0x0010280d
TEST BPL,BPL
JNZ 0x001028f5
MOV EDX,dword ptr [RSP + 0x10]
MOV ESI,0x0
MOV RDI,RBX
CALL 0x001021a0
MOV R15D,EAX
TEST EAX,EAX
JS 0x001029f5
CMP qword ptr [RSP + 0x8],0x0
SETNZ BL
TEST BPL,BPL
JNZ 0x00102a82
TEST BL,BL
JNZ 0x00102a82
CMP dword ptr [RSP + 0x2c],0x0
JLE 0x00102efc
CMP byte ptr [RSP + 0x38],0x0
JNZ 0x00102ea4
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00102e47
CALL 0x00102040
TEST R15D,R15D
JNS 0x00102e47
CMP dword ptr [RSP + 0x10],0x0
JZ 0x00102a18
CMP dword ptr [RSP + 0x4],0x0
JNS 0x001026b7
MOV dword ptr [RSP + 0x4],0x63
JMP 0x001026b7
LEA RDI,[0x104850]
MOV EAX,0x0
CALL 0x001020a0
LEA RSI,[0x104e80]
LEA RDI,[0x104e8e]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x001026b7
LEA RDI,[0x104e9b]
MOV EAX,0x0
CALL 0x001020a0
LEA RDI,[0x104210]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],0x1
JMP 0x001026b7
LEA RDI,[0x104888]
MOV EAX,0x0
CALL 0x001020a0
MOV EDX,dword ptr [RSP + 0x10]
MOV ESI,0x0
MOV RDI,RBX
CALL 0x001021a0
MOV R15D,EAX
TEST EAX,EAX
JS 0x001029f5
CMP qword ptr [RSP + 0x8],0x0
SETNZ BL
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x2c],EAX
LEA RDX,[RSP + 0x48]
MOV ECX,0x0
MOV ESI,0x0
MOV EDI,dword ptr [RSP + 0x28]
CALL 0x001021b0
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x00102a9a
MOVSXD RBP,dword ptr [RSP + 0x28]
MOV RDX,RBP
MOV ESI,0xff
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001020d0
TEST BL,BL
JZ 0x001029c2
LEA RSI,[0x104e10]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00102100
MOV R13D,EAX
TEST EAX,EAX
JNZ 0x00102ad7
CMP dword ptr [RSP + 0x34],0x0
JG 0x00102ab9
MOV RDX,RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV EDI,0x0
CALL 0x001020f0
MOV R12D,EAX
TEST EAX,EAX
JS 0x00102c0a
CMP dword ptr [RSP + 0x28],EAX
JG 0x00102c54
MOV R12D,dword ptr [RSP + 0x28]
CMP dword ptr [RSP + 0x2c],0x0
JLE 0x00102f05
MOV EBP,dword ptr [RSP + 0x4]
MOVZX R13D,byte ptr [RSP + 0x3a]
MOV dword ptr [RSP + 0x8],R14D
MOV R14D,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x28],R15D
MOV R15D,dword ptr [RSP + 0x10]
JMP 0x00102da3
CMP dword ptr [RSP + 0x10],0x0
JNZ 0x00102a41
MOV EDI,R15D
NEG EDI
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JNZ 0x00102867
MOV ESI,dword ptr [RSP + 0x4]
LEA RDI,[0x104f18]
CALL 0x00102110
TEST AL,AL
JNZ 0x00102880
LEA RDI,[0x104b90]
CALL 0x001020a0
JMP 0x00102880
MOV EBP,R15D
NEG EBP
MOV EDI,EBP
CALL 0x00102140
MOV RDX,RAX
MOV RSI,RBX
LEA RDI,[0x1048b8]
MOV EAX,0x0
CALL 0x001020a0
MOV EDI,EBP
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JNZ 0x00102867
JMP 0x00102880
CMP dword ptr [RSP + 0x28],0x0
JNZ 0x00102933
MOV dword ptr [RSP + 0x28],0x800000
JMP 0x00102933
LEA RDI,[0x1048e0]
CALL 0x001020a0
MOV EDI,0xc
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00102859
LEA RDI,[0x104eb2]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],0xf
JMP 0x00102859
MOV ESI,0x0
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,0x0
CALL 0x00102130
MOV EBX,EAX
TEST EAX,EAX
JS 0x00102b46
MOV EDI,EAX
CALL 0x00102050
TEST EAX,EAX
JS 0x00102b90
MOV EAX,dword ptr [RSP + 0x34]
TEST EAX,EAX
JG 0x00102ba1
MOV RDX,RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV EDI,EBX
CALL 0x001020f0
MOV R12D,EAX
TEST EAX,EAX
JS 0x00102f9d
MOV ECX,dword ptr [RSP + 0x28]
CMP ECX,EAX
JG 0x00102c57
MOV R12D,ECX
MOV EDI,EBX
CALL 0x001020e0
MOV dword ptr [RSP + 0x28],R12D
JMP 0x001029c2
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
LEA RBX,[RSP + 0x50]
MOV R9,qword ptr [RSP + 0x8]
LEA R8,[0x104900]
MOV ECX,0x100
MOV EDX,0x1
MOV ESI,0x100
MOV RDI,RBX
MOV EAX,0x0
CALL 0x00102030
MOV RDI,RBX
CALL 0x00102160
JMP 0x00102859
LEA RDI,[0x104ec7]
CALL 0x00102160
JMP 0x00102b00
MOVSXD RSI,EAX
MOV EDX,0x0
MOV EDI,EBX
CALL 0x00102180
TEST RAX,RAX
JNS 0x00102b0c
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
LEA RBP,[RSP + 0x50]
MOV R9,qword ptr [RSP + 0x8]
LEA R8,[0x104930]
MOV ECX,0x100
MOV EDX,0x1
MOV ESI,0x100
MOV RDI,RBP
MOV EAX,0x0
CALL 0x00102030
MOV RDI,RBP
CALL 0x00102160
MOV EDI,EBX
CALL 0x001020e0
JMP 0x00102859
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
LEA RBX,[RSP + 0x50]
MOV R9,qword ptr [RSP + 0x8]
LEA R8,[0x104970]
MOV ECX,0x100
MOV EDX,0x1
MOV ESI,0x100
MOV RDI,RBX
MOV EAX,0x0
CALL 0x00102030
MOV RDI,RBX
CALL 0x00102160
JMP 0x00102859
MOV EBX,R13D
CMP byte ptr [RSP + 0x3b],0x0
JNZ 0x00102c78
CMP dword ptr [RSP + 0x10],0x0
JNZ 0x00102cac
MOV dword ptr [RSP + 0x28],R12D
TEST R13D,R13D
JZ 0x001029c2
JMP 0x00102b35
MOV ECX,R12D
MOV RDX,qword ptr [RSP + 0x8]
MOV R12D,dword ptr [RSP + 0x28]
MOV ESI,R12D
LEA RDI,[0x104998]
MOV EAX,0x0
CALL 0x001020a0
LEA RDI,[0x1049c8]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x00102c65
MOV ECX,R12D
MOV RDX,qword ptr [RSP + 0x8]
MOV EBP,dword ptr [RSP + 0x28]
MOV ESI,EBP
LEA RDI,[0x104998]
MOV EAX,0x0
CALL 0x001020a0
MOV ESI,R12D
LEA RDI,[0x104eda]
MOV EAX,0x0
CALL 0x001020a0
MOV ESI,dword ptr [RSP + 0x2c]
TEST ESI,ESI
JLE 0x00102d0a
CMP EBP,ESI
JLE 0x00102d0a
LEA RDI,[0x1049f0]
MOV EAX,0x0
CALL 0x001020a0
TEST R13D,R13D
JZ 0x001029d2
JMP 0x00102b35
LEA RDI,[0x104eb0]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x00102c65
MOV R9D,EBX
MOV EAX,dword ptr [RSP + 0x18]
LEA R8D,[RBP + RAX*0x1]
MOV ECX,dword ptr [RSP + 0x14]
MOV EDX,dword ptr [RSP + 0x1c]
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[0x104a18]
MOV EAX,0x0
CALL 0x001020a0
TEST R13B,R13B
JZ 0x00102d61
LEA RDI,[0x104a60]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x00102da1
MOVSXD RAX,EBP
PUSH R15
PUSH 0x1
MOV ECX,dword ptr [RSP + 0x40]
PUSH RCX
PUSH RBX
MOV RCX,qword ptr [RSP + 0x40]
LEA R9,[RCX + RAX*0x1]
MOV EAX,dword ptr [RSP + 0x38]
LEA R8D,[RBP + RAX*0x1]
MOV ECX,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x3c]
MOV ESI,dword ptr [RSP + 0x28]
MOV EDI,dword ptr [RSP + 0x48]
CALL 0x00102150
ADD RSP,0x20
TEST EAX,EAX
JNZ 0x00102e91
ADD EBP,EBX
CMP EBP,R12D
JGE 0x00102dc4
MOV EBX,R12D
SUB EBX,EBP
CMP EBX,R14D
CMOVG EBX,R14D
TEST R15D,R15D
JNZ 0x00102d20
TEST R13B,R13B
JNZ 0x00102da1
JMP 0x00102d61
MOV R15D,dword ptr [RSP + 0x28]
JMP 0x0010284e
LEA RDI,[0x104a90]
MOV EAX,0x0
CALL 0x001020a0
CMP byte ptr [RSP + 0x3a],0x0
JZ 0x00102ec2
LEA RDI,[0x104ac0]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x00102859
MOV R9D,dword ptr [RSP + 0x28]
MOV R8D,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x14]
MOV EDX,dword ptr [RSP + 0x1c]
MOV ESI,R14D
LEA RDI,[0x104b00]
MOV EAX,0x0
CALL 0x001020a0
CMP byte ptr [RSP + 0x3a],0x0
JZ 0x00102f23
LEA RDI,[0x104b50]
MOV EAX,0x0
CALL 0x001020a0
JMP 0x00102859
MOV EDI,R15D
CALL 0x00102080
TEST EAX,EAX
JNS 0x00102875
NEG EAX
MOV EBX,EAX
MOV EDI,EAX
CALL 0x00102140
MOV RSI,RAX
LEA RDI,[0x104f07]
MOV EAX,0x0
CALL 0x001020a0
CMP dword ptr [RSP + 0x4],0x0
JNZ 0x00102875
MOV EDI,EBX
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00102875
MOV R13D,EAX
MOV R15D,dword ptr [RSP + 0x28]
CMP byte ptr [RSP + 0x38],0x0
JZ 0x00102f66
CMP dword ptr [RSP + 0x10],0x0
JNZ 0x00102dce
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4],EAX
CMP byte ptr [RSP + 0x3a],0x0
JNZ 0x00102859
MOV EAX,dword ptr [RSP + 0x10]
PUSH RAX
PUSH 0x1
MOV EAX,dword ptr [RSP + 0x40]
PUSH RAX
PUSH 0x0
MOV R9D,0x0
MOV R8D,0x0
MOV ECX,0x0
MOV EDX,0x0
MOV ESI,0xf
MOV EDI,R15D
CALL 0x00102150
MOV R13D,EAX
ADD RSP,0x20
JMP 0x00102f58
MOV qword ptr [RSP + 0x20],0x0
CMP dword ptr [RSP + 0x10],0x0
JNZ 0x00102e00
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x4],EAX
CMP byte ptr [RSP + 0x3a],0x0
JNZ 0x00102859
MOV EAX,dword ptr [RSP + 0x10]
PUSH RAX
PUSH 0x1
MOV EAX,dword ptr [RSP + 0x40]
PUSH RAX
MOV EAX,dword ptr [RSP + 0x40]
PUSH RAX
MOV R9,qword ptr [RSP + 0x40]
MOV R8D,dword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x34]
MOV EDX,dword ptr [RSP + 0x3c]
MOV ESI,R14D
MOV EDI,R15D
CALL 0x00102150
MOV R13D,EAX
ADD RSP,0x20
MOV dword ptr [RSP + 0x4],R13D
TEST R13D,R13D
JZ 0x00102859
LEA RBX,[RSP + 0x50]
MOV ECX,dword ptr [RSP + 0x10]
MOV RDX,RBX
MOV ESI,0x50
MOV EDI,R13D
CALL 0x00102170
MOV RSI,RBX
LEA RDI,[0x104eee]
MOV EAX,0x0
CALL 0x001020a0
MOV dword ptr [RSP + 0x4],R13D
JMP 0x00102859
CALL 0x00102060
MOV EDI,dword ptr [RAX]
CALL 0x00102120
MOV dword ptr [RSP + 0x4],EAX
LEA RBP,[RSP + 0x50]
MOV R9,qword ptr [RSP + 0x8]
LEA R8,[0x104970]
MOV ECX,0x100
MOV EDX,0x1
MOV ESI,0x100
MOV RDI,RBP
MOV EAX,0x0
CALL 0x00102030
MOV RDI,RBP
CALL 0x00102160
MOV EDI,EBX
CALL 0x001020e0
JMP 0x00102859
CALL 0x00102090
(translation_unit "int FUN_00102330(int param_1,long param_2)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int FUN_00102330(int param_1,long param_2)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00102330(int param_1,long param_2)" identifier (parameter_list "(int param_1,long param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "char cVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "char *pcVar13;" primitive_type (pointer_declarator "*pcVar13" * identifier) ;) (declaration "ushort **ppuVar14;" type_identifier (pointer_declarator "**ppuVar14" * (pointer_declarator "*ppuVar14" * identifier)) ;) (declaration "ulong uVar15;" type_identifier identifier ;) (declaration "__off64_t _Var16;" type_identifier identifier ;) (declaration "int *piVar17;" primitive_type (pointer_declarator "*piVar17" * identifier) ;) (declaration "undefined8 uVar18;" type_identifier identifier ;) (declaration "long lVar19;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *pcVar20;" primitive_type (pointer_declarator "*pcVar20" * identifier) ;) (declaration "ulong uVar21;" type_identifier identifier ;) (declaration "undefined **ppuVar22;" type_identifier (pointer_declarator "**ppuVar22" * (pointer_declarator "*ppuVar22" * identifier)) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar23;" type_identifier identifier ;) (declaration "int local_194;" primitive_type identifier ;) (declaration "char *local_190;" primitive_type (pointer_declarator "*local_190" * identifier) ;) (declaration "int local_188;" primitive_type identifier ;) (declaration "uint local_184;" type_identifier identifier ;) (declaration "int local_180;" primitive_type identifier ;) (declaration "uint local_17c;" type_identifier identifier ;) (declaration "void *local_178;" primitive_type (pointer_declarator "*local_178" * identifier) ;) (declaration "int local_170;" primitive_type identifier ;) (declaration "int local_16c;" primitive_type identifier ;) (declaration "int local_168;" primitive_type identifier ;) (declaration "int local_164;" primitive_type identifier ;) (declaration "undefined4 local_154;" type_identifier identifier ;) (declaration "void *local_150;" primitive_type (pointer_declarator "*local_150" * identifier) ;) (declaration "char local_148 [264];" primitive_type (array_declarator "local_148 [264]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "bVar23 = 0;" (assignment_expression "bVar23 = 0" identifier = number_literal) ;) (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_150 = (void *)0x0;" (assignment_expression "local_150 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_190 = (char *)0x0;" (assignment_expression "local_190 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_17c = 0;" (assignment_expression "local_17c = 0" identifier = number_literal) ;) (expression_statement "local_168 = 300;" (assignment_expression "local_168 = 300" identifier = number_literal) ;) (expression_statement "local_164 = 0;" (assignment_expression "local_164 = 0" identifier = number_literal) ;) (expression_statement "local_180 = 0;" (assignment_expression "local_180 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (expression_statement "local_170 = 0;" (assignment_expression "local_170 = 0" identifier = number_literal) ;) (expression_statement "local_184 = 0;" (assignment_expression "local_184 = 0" identifier = number_literal) ;) (expression_statement "local_188 = 0;" (assignment_expression "local_188 = 0" identifier = number_literal) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) (expression_statement "local_16c = 0;" (assignment_expression "local_16c = 0" identifier = number_literal) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" identifier = false) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (labeled_statement "LAB_001023de:\n  local_154 = 0;" statement_identifier : (expression_statement "local_154 = 0;" (assignment_expression "local_154 = 0" identifier = number_literal) ;)) (expression_statement "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);" (assignment_expression "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" identifier = (call_expression "getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" identifier (argument_list "(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" ( identifier , identifier , (string_literal ""b:dhi:I:l:m:o:rs:S:t:vV"" " string_content ") , (pointer_expression "&PTR_DAT_001071a0" & identifier) , (pointer_expression "&local_154" & identifier) )))) ;) (if_statement "if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" { (if_statement "if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" if (parenthesized_expression "(local_194 != 0)" ( (binary_expression "local_194 != 0" identifier != number_literal) )) (compound_statement "{\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" { (if_statement "if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" if (parenthesized_expression "(local_194 < 2)" ( (binary_expression "local_194 < 2" identifier < number_literal) )) (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" else (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }" if (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) (compound_statement "{\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }" { (expression_statement "lVar19 = *(long *)(param_2 + (long)optind * 8);" (assignment_expression "lVar19 = *(long *)(param_2 + (long)optind * 8)" identifier = (pointer_expression "*(long *)(param_2 + (long)optind * 8)" * (cast_expression "(long *)(param_2 + (long)optind * 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ))))) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) (if_statement "if (optind < param_1) goto LAB_0010272c;" if (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) (goto_statement "goto LAB_0010272c;" goto statement_identifier ;)) }) (else_clause "else {\n      lVar19 = 0;\n    }" else (compound_statement "{\n      lVar19 = 0;\n    }" { (expression_statement "lVar19 = 0;" (assignment_expression "lVar19 = 0" identifier = number_literal) ;) }))) (if_statement "if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "((bVar1) && (bVar5))" ( (binary_expression "(bVar1) && (bVar5)" (parenthesized_expression "(bVar1)" ( identifier )) && (parenthesized_expression "(bVar5)" ( identifier ))) )) (compound_statement "{\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }" { (expression_statement "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");" (call_expression "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n")" identifier (argument_list "("Not in DEBUG mode, so \'-vV\' has no special action\n")" ( (string_literal ""Not in DEBUG mode, so \'-vV\' has no special action\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) }) (else_clause "else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" else (if_statement "if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (compound_statement "{\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" { (if_statement "if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" if (parenthesized_expression "(lVar19 == 0)" ( (binary_expression "lVar19 == 0" identifier == number_literal) )) (compound_statement "{\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" { (expression_statement "pr2serr("Missing device name!\n\n");" (call_expression "pr2serr("Missing device name!\n\n")" identifier (argument_list "("Missing device name!\n\n")" ( (string_literal ""Missing device name!\n\n"" " string_content escape_sequence escape_sequence ") ))) ;) (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" if (parenthesized_expression "((local_170 < local_16c) && (0 < local_170))" ( (binary_expression "(local_170 < local_16c) && (0 < local_170)" (parenthesized_expression "(local_170 < local_16c)" ( (binary_expression "local_170 < local_16c" identifier < identifier) )) && (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) ))) )) (compound_statement "{\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" { (expression_statement "pr2serr("trim chunk size (CS) to be the same as LEN\n");" (call_expression "pr2serr("trim chunk size (CS) to be the same as LEN\n")" identifier (argument_list "("trim chunk size (CS) to be the same as LEN\n")" ( (string_literal ""trim chunk size (CS) to be the same as LEN\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" identifier = (call_expression "sg_cmds_open_device(lVar19,0,local_188)" identifier (argument_list "(lVar19,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar7 < 0) goto LAB_001029f5;" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (goto_statement "goto LAB_001029f5;" goto statement_identifier ;)) (expression_statement "local_16c = local_170;" (assignment_expression "local_16c = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" statement_identifier : (expression_statement "local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" (assignment_expression "local_178 = (void *)sg_memalign(local_170,0,&local_150,0)" identifier = (cast_expression "(void *)sg_memalign(local_170,0,&local_150,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sg_memalign(local_170,0,&local_150,0)" identifier (argument_list "(local_170,0,&local_150,0)" ( identifier , number_literal , (pointer_expression "&local_150" & identifier) , number_literal ))))) ;)) (if_statement "if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(local_178 == (void *)0x0)" ( (binary_expression "local_178 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("sg_write_buffer: out of memory\n");" (call_expression "pr2serr("sg_write_buffer: out of memory\n")" identifier (argument_list "("sg_write_buffer: out of memory\n")" ( (string_literal ""sg_write_buffer: out of memory\n"" " string_content escape_sequence ") ))) ;) (expression_statement "local_194 = sg_convert_errno(0xc);" (assignment_expression "local_194 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "__n = (size_t)local_170;" (assignment_expression "__n = (size_t)local_170" identifier = (cast_expression "(size_t)local_170" ( (type_descriptor "size_t" primitive_type) ) identifier)) ;) (expression_statement "memset(local_178,0xff,__n);" (call_expression "memset(local_178,0xff,__n)" identifier (argument_list "(local_178,0xff,__n)" ( identifier , number_literal , identifier ))) ;) (if_statement "if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" if (parenthesized_expression "(local_190 == (char *)0x0)" ( (binary_expression "local_190 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }" { (labeled_statement "LAB_001029c2:\n          iVar11 = local_170;" statement_identifier : (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;)) (if_statement "if (local_16c < 1) goto LAB_00102f05;" if (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) (goto_statement "goto LAB_00102f05;" goto statement_identifier ;)) }) (else_clause "else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" else (compound_statement "{\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" { (expression_statement "iVar9 = strcmp(local_190,"-");" (assignment_expression "iVar9 = strcmp(local_190,"-")" identifier = (call_expression "strcmp(local_190,"-")" identifier (argument_list "(local_190,"-")" ( identifier , (string_literal ""-"" " string_content ") )))) ;) (if_statement "if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (compound_statement "{\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" { (if_statement "if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" if (parenthesized_expression "(local_164 < 1)" ( (binary_expression "local_164 < 1" identifier < number_literal) )) (compound_statement "{\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }" { (expression_statement "uVar15 = read(0,local_178,__n);" (assignment_expression "uVar15 = read(0,local_178,__n)" identifier = (call_expression "read(0,local_178,__n)" identifier (argument_list "(0,local_178,__n)" ( number_literal , identifier , identifier )))) ;) (if_statement "if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" if (parenthesized_expression "(-1 < (int)uVar15)" ( (binary_expression "-1 < (int)uVar15" number_literal < (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" { (if_statement "if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" if (parenthesized_expression "((int)uVar15 < local_170)" ( (binary_expression "(int)uVar15 < local_170" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102c57;" goto statement_identifier ;) })) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) }) (else_clause "else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" else (compound_statement "{\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" { (expression_statement "pr2serr("Can\'t skip on stdin\n");" (call_expression "pr2serr("Can\'t skip on stdin\n")" identifier (argument_list "("Can\'t skip on stdin\n")" ( (string_literal ""Can\'t skip on stdin\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0xf;" (assignment_expression "local_194 = 0xf" identifier = number_literal) ;) }))) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar10 = open64(local_190,0);" (assignment_expression "iVar10 = open64(local_190,0)" identifier = (call_expression "open64(local_190,0)" identifier (argument_list "(local_190,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar10 < 0)" ( (binary_expression "iVar10 < 0" identifier < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: could not open %s for reading"" " string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar11 = sg_set_binary_mode(iVar10);" (assignment_expression "iVar11 = sg_set_binary_mode(iVar10)" identifier = (call_expression "sg_set_binary_mode(iVar10)" identifier (argument_list "(iVar10)" ( identifier )))) ;) (if_statement "if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }" if (parenthesized_expression "(iVar11 < 0)" ( (binary_expression "iVar11 < 0" identifier < number_literal) )) (compound_statement "{\n            perror("sg_set_binary_mode");\n          }" { (expression_statement "perror("sg_set_binary_mode");" (call_expression "perror("sg_set_binary_mode")" identifier (argument_list "("sg_set_binary_mode")" ( (string_literal ""sg_set_binary_mode"" " string_content ") ))) ;) })) (if_statement "if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0))" ( (binary_expression "(0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" (parenthesized_expression "(0 < local_164)" ( (binary_expression "0 < local_164" number_literal < identifier) )) && (parenthesized_expression "(_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" ( (comma_expression "_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0" (assignment_expression "_Var16 = lseek64(iVar10,(long)local_164,0)" identifier = (call_expression "lseek64(iVar10,(long)local_164,0)" identifier (argument_list "(iVar10,(long)local_164,0)" ( identifier , (cast_expression "(long)local_164" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal )))) , (binary_expression "_Var16 < 0" identifier < number_literal)) ))) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" identifier (argument_list "(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t skip to required position on %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "uVar15 = read(iVar10,local_178,__n);" (assignment_expression "uVar15 = read(iVar10,local_178,__n)" identifier = (call_expression "read(iVar10,local_178,__n)" identifier (argument_list "(iVar10,local_178,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((int)uVar15 < 0)" ( (binary_expression "(int)uVar15 < 0" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;) (if_statement "if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" if (parenthesized_expression "(local_170 <= (int)uVar15)" ( (binary_expression "local_170 <= (int)uVar15" identifier <= (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" { (labeled_statement "LAB_00102b35:\n            close(iVar10);" statement_identifier : (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;)) (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" identifier = identifier) ;) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (labeled_statement "LAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;" statement_identifier : (expression_statement "uVar21 = uVar15 & 0xffffffff;" (assignment_expression "uVar21 = uVar15 & 0xffffffff" identifier = (binary_expression "uVar15 & 0xffffffff" identifier & number_literal)) ;)) (expression_statement "iVar11 = (int)uVar15;" (assignment_expression "iVar11 = (int)uVar15" identifier = (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" { (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("pad with 0xff bytes and continue\n");" (call_expression "pr2serr("pad with 0xff bytes and continue\n")" identifier (argument_list "("pad with 0xff bytes and continue\n")" ( (string_literal ""pad with 0xff bytes and continue\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102c65:\n            local_170 = iVar11;" statement_identifier : (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" identifier = identifier) ;)) (if_statement "if (iVar9 == 0) goto LAB_001029c2;" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;)) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;) })) (if_statement "if (local_188 == 0) goto LAB_00102c65;" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;)) (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("will write %d bytes",uVar21);" (call_expression "pr2serr("will write %d bytes",uVar21)" identifier (argument_list "("will write %d bytes",uVar21)" ( (string_literal ""will write %d bytes"" " string_content ") , identifier ))) ;) (if_statement "if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" if (parenthesized_expression "((local_16c < 1) || (local_170 <= local_16c))" ( (binary_expression "(local_16c < 1) || (local_170 <= local_16c)" (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) || (parenthesized_expression "(local_170 <= local_16c)" ( (binary_expression "local_170 <= local_16c" identifier <= identifier) ))) )) (compound_statement "{\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" { (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;) })) (expression_statement "pr2serr(", %d bytes per WRITE BUFFER command\n");" (call_expression "pr2serr(", %d bytes per WRITE BUFFER command\n")" identifier (argument_list "(", %d bytes per WRITE BUFFER command\n")" ( (string_literal "", %d bytes per WRITE BUFFER command\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (iVar9 != 0) goto LAB_00102b35;" if (parenthesized_expression "(iVar9 != 0)" ( (binary_expression "iVar9 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;)) }))) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) })) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" identifier = (call_expression "sg_cmds_open_device(lVar19,0,local_188)" identifier (argument_list "(lVar19,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" { (labeled_statement "LAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" statement_identifier : (if_statement "if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" { (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (if_statement "if (local_150 == (void *)0x0) goto LAB_00102a18;" if (parenthesized_expression "(local_150 == (void *)0x0)" ( (binary_expression "local_150 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102a18;" goto statement_identifier ;)) (goto_statement "goto LAB_00102867;" goto statement_identifier ;) }))) (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" identifier = (call_expression "safe_strerror(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (expression_statement "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);" (call_expression "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" identifier (argument_list "("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" ( (string_literal ""sg_write_buffer: open error: %s: %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (if_statement "if (local_150 != (void *)0x0) goto LAB_00102867;" if (parenthesized_expression "(local_150 != (void *)0x0)" ( (binary_expression "local_150 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102867;" goto statement_identifier ;)) (goto_statement "goto LAB_00102880;" goto statement_identifier ;) })) (if_statement "if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" if (parenthesized_expression "((0 < local_170) || (local_190 != (char *)0x0))" ( (binary_expression "(0 < local_170) || (local_190 != (char *)0x0)" (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) )) || (parenthesized_expression "(local_190 != (char *)0x0)" ( (binary_expression "local_190 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" { (if_statement "if (local_170 == 0) {\n          local_170 = 0x800000;\n        }" if (parenthesized_expression "(local_170 == 0)" ( (binary_expression "local_170 == 0" identifier == number_literal) )) (compound_statement "{\n          local_170 = 0x800000;\n        }" { (expression_statement "local_170 = 0x800000;" (assignment_expression "local_170 = 0x800000" identifier = number_literal) ;) })) (goto_statement "goto LAB_00102933;" goto statement_identifier ;) })) (if_statement "if (0 < local_16c) goto LAB_0010284e;" if (parenthesized_expression "(0 < local_16c)" ( (binary_expression "0 < local_16c" number_literal < identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;)) (expression_statement "local_178 = (void *)0x0;" (assignment_expression "local_178 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" statement_identifier : (if_statement "if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (bVar4) goto LAB_00102859;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_00102859;" goto statement_identifier ;)) }) (else_clause "else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" else (compound_statement "{\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" { (expression_statement "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);" (call_expression "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" identifier (argument_list "("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" ( (string_literal ""sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(all in one) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) })))) (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier (argument_list "(iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , number_literal , identifier )))) ;) (goto_statement "goto LAB_00102f58;" goto statement_identifier ;) })))) (expression_statement "pr2serr("version: %s\n","1.28 20180628");" (call_expression "pr2serr("version: %s\n","1.28 20180628")" identifier (argument_list "("version: %s\n","1.28 20180628")" ( (string_literal ""version: %s\n"" " string_content escape_sequence ") , (string_literal ""1.28 20180628"" " string_content ") ))) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (switch_statement "switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" switch (parenthesized_expression "(iVar7)" ( identifier )) (compound_statement "{\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" { (case_statement "case 0x3f:" case number_literal :) (case_statement "case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_194 = local_194 + 1;" (assignment_expression "local_194 = local_194 + 1" identifier = (binary_expression "local_194 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;" default : (expression_statement "pr2serr("unrecognised option code 0x%x ??\n",iVar7);" (call_expression "pr2serr("unrecognised option code 0x%x ??\n",iVar7)" identifier (argument_list "("unrecognised option code 0x%x ??\n",iVar7)" ( (string_literal ""unrecognised option code 0x%x ??\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );" (call_expression "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" identifier (argument_list "(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;)) (case_statement "case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = optarg;" (assignment_expression "local_190 = optarg" identifier = identifier) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_17c = sg_get_num(optarg);" (assignment_expression "local_17c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(7 < local_17c)" ( (binary_expression "7 < local_17c" number_literal < identifier) )) (compound_statement "{\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("expected argument to \'--specific\' to be 0 to 7\n");" (call_expression "pr2serr("expected argument to \'--specific\' to be 0 to 7\n")" identifier (argument_list "("expected argument to \'--specific\' to be 0 to 7\n")" ( (string_literal ""expected argument to \'--specific\' to be 0 to 7\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_16c = sg_get_num(optarg);" (assignment_expression "local_16c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_16c < 0)" ( (binary_expression "local_16c < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--bpw\' should be in a positive number\n");" (call_expression "pr2serr("argument to \'--bpw\' should be in a positive number\n")" identifier (argument_list "("argument to \'--bpw\' should be in a positive number\n")" ( (string_literal ""argument to \'--bpw\' should be in a positive number\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "pcVar13 = strchr(optarg,0x2c);" (assignment_expression "pcVar13 = strchr(optarg,0x2c)" identifier = (call_expression "strchr(optarg,0x2c)" identifier (argument_list "(optarg,0x2c)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" if (parenthesized_expression "(pcVar13 != (char *)0x0)" ( (binary_expression "pcVar13 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" { (expression_statement "iVar7 = strncmp("act",pcVar13 + 1,3);" (assignment_expression "iVar7 = strncmp("act",pcVar13 + 1,3)" identifier = (call_expression "strncmp("act",pcVar13 + 1,3)" identifier (argument_list "("act",pcVar13 + 1,3)" ( (string_literal ""act"" " string_content ") , (binary_expression "pcVar13 + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar7 == 0) {\n        bVar2 = true;\n      }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n        bVar2 = true;\n      }" { (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) })) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 100:\n    bVar4 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_184 = sg_get_num(optarg);" (assignment_expression "local_184 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(0xff < local_184)" ( (binary_expression "0xff < local_184" number_literal < identifier) )) (compound_statement "{\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--id\' should be in the range 0 to 255\n");" (call_expression "pr2serr("argument to \'--id\' should be in the range 0 to 255\n")" identifier (argument_list "("argument to \'--id\' should be in the range 0 to 255\n")" ( (string_literal ""argument to \'--id\' should be in the range 0 to 255\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_170 = sg_get_num(optarg);" (assignment_expression "local_170 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_170 < 0)" ( (binary_expression "local_170 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--length\'\n");" (call_expression "pr2serr("bad argument to \'--length\'\n")" identifier (argument_list "("bad argument to \'--length\'\n")" ( (string_literal ""bad argument to \'--length\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "ppuVar14 = __ctype_b_loc();" (assignment_expression "ppuVar14 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar13 = optarg;" (assignment_expression "pcVar13 = optarg" identifier = identifier) ;) (if_statement "if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" if (parenthesized_expression "((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0)" ( (binary_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0" (parenthesized_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8)" ( (binary_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8" (pointer_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" * (cast_expression "(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (binary_expression "(long)*ppuVar14 + (long)*optarg * 2 + 1" (binary_expression "(long)*ppuVar14 + (long)*optarg * 2" (cast_expression "(long)*ppuVar14" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*ppuVar14" * identifier)) + (binary_expression "(long)*optarg * 2" (cast_expression "(long)*optarg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*optarg" * identifier)) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }" { (expression_statement "lVar19 = -1;" (assignment_expression "lVar19 = -1" identifier = number_literal) ;) (expression_statement "pcVar20 = optarg;" (assignment_expression "pcVar20 = optarg" identifier = identifier) ;) (do_statement "do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');" do (compound_statement "{\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      }" { (if_statement "if (lVar19 == 0) break;" if (parenthesized_expression "(lVar19 == 0)" ( (binary_expression "lVar19 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar19 = lVar19 + -1;" (assignment_expression "lVar19 = lVar19 + -1" identifier = (binary_expression "lVar19 + -1" identifier + number_literal)) ;) (expression_statement "cVar6 = *pcVar20;" (assignment_expression "cVar6 = *pcVar20" identifier = (pointer_expression "*pcVar20" * identifier)) ;) (expression_statement "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;" (assignment_expression "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1" identifier = (binary_expression "pcVar20 + (ulong)bVar23 * -2 + 1" (binary_expression "pcVar20 + (ulong)bVar23 * -2" identifier + (binary_expression "(ulong)bVar23 * -2" (cast_expression "(ulong)bVar23" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(cVar6 != '\0')" ( (binary_expression "cVar6 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(PTR_DAT_00107020 == (undefined *)0x0)" ( (binary_expression "PTR_DAT_00107020 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" { (labeled_statement "LAB_001025b2:\n        FUN_001022c5();" statement_identifier : (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" identifier (argument_list "()" ( ))) ;)) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "ppuVar22 = &PTR_DAT_00107020;" (assignment_expression "ppuVar22 = &PTR_DAT_00107020" identifier = (pointer_expression "&PTR_DAT_00107020" & identifier)) ;) (expression_statement "pcVar20 = PTR_DAT_00107020;" (assignment_expression "pcVar20 = PTR_DAT_00107020" identifier = identifier) ;) (while_statement "while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" while (parenthesized_expression "(iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0)" ( (comma_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0" (assignment_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" identifier = (call_expression "strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" identifier (argument_list "(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" ( identifier , identifier , (cast_expression "(long)(int)(~(uint)lVar19 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(~(uint)lVar19 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(~(uint)lVar19 - 1)" ( (binary_expression "~(uint)lVar19 - 1" (unary_expression "~(uint)lVar19" ~ (cast_expression "(uint)lVar19" ( (type_descriptor "uint" type_identifier) ) identifier)) - number_literal) )))) )))) , (binary_expression "iVar7 != 0" identifier != number_literal)) )) (compound_statement "{\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" { (expression_statement "ppuVar22 = ppuVar22 + 3;" (assignment_expression "ppuVar22 = ppuVar22 + 3" identifier = (binary_expression "ppuVar22 + 3" identifier + number_literal)) ;) (expression_statement "pcVar20 = *ppuVar22;" (assignment_expression "pcVar20 = *ppuVar22" identifier = (pointer_expression "*ppuVar22" * identifier)) ;) (if_statement "if (pcVar20 == (char *)0x0) goto LAB_001025b2;" if (parenthesized_expression "(pcVar20 == (char *)0x0)" ( (binary_expression "pcVar20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_001025b2;" goto statement_identifier ;)) })) (expression_statement "uVar8 = *(uint *)(ppuVar22 + 1);" (assignment_expression "uVar8 = *(uint *)(ppuVar22 + 1)" identifier = (pointer_expression "*(uint *)(ppuVar22 + 1)" * (cast_expression "(uint *)(ppuVar22 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ppuVar22 + 1)" ( (binary_expression "ppuVar22 + 1" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" else (compound_statement "{\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" { (expression_statement "uVar8 = sg_get_num(optarg);" (assignment_expression "uVar8 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(0x1f < uVar8)" ( (binary_expression "0x1f < uVar8" number_literal < identifier) )) (compound_statement "{\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" { (expression_statement "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");" (call_expression "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n")" identifier (argument_list "("argument to \'--mode\' should be in the range 0 to 31\n")" ( (string_literal ""argument to \'--mode\' should be in the range 0 to 31\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) }))) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_180 = sg_get_num(optarg);" (assignment_expression "local_180 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_180 < 0)" ( (binary_expression "local_180 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--offset\'\n");" (call_expression "pr2serr("bad argument to \'--offset\'\n")" identifier (argument_list "("bad argument to \'--offset\'\n")" ( (string_literal ""bad argument to \'--offset\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = "-";" (assignment_expression "local_190 = "-"" identifier = (string_literal ""-"" " string_content ")) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_164 = sg_get_num(optarg);" (assignment_expression "local_164 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_164 < 0)" ( (binary_expression "local_164 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--skip\'\n");" (call_expression "pr2serr("bad argument to \'--skip\'\n")" identifier (argument_list "("bad argument to \'--skip\'\n")" ( (string_literal ""bad argument to \'--skip\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x74:\n    goto switchD_0010241f_caseD_74;" case number_literal : (goto_statement "goto switchD_0010241f_caseD_74;" goto statement_identifier ;)) (case_statement "case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_188 = local_188 + 1;" (assignment_expression "local_188 = local_188 + 1" identifier = (binary_expression "local_188 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) })) (labeled_statement "LAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" statement_identifier : (do_statement "do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" do (compound_statement "{\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  }" { (expression_statement "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));" (call_expression "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" identifier (argument_list "("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" ( (string_literal ""Unexpected extra argument: %s\n"" " string_content escape_sequence ") , (pointer_expression "*(undefined8 *)(param_2 + (long)optind * 8)" * (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ))) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) ;)) (expression_statement "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );" (call_expression "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" identifier (argument_list "(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "LAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;" statement_identifier : (if_statement "if (iVar11 <= iVar9) goto LAB_0010284e;" if (parenthesized_expression "(iVar11 <= iVar9)" ( (binary_expression "iVar11 <= iVar9" identifier <= identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;))) (expression_statement "iVar10 = iVar11 - iVar9;" (assignment_expression "iVar10 = iVar11 - iVar9" identifier = (binary_expression "iVar11 - iVar9" identifier - identifier)) ;) (if_statement "if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }" if (parenthesized_expression "(local_16c < iVar11 - iVar9)" ( (binary_expression "local_16c < iVar11 - iVar9" identifier < (binary_expression "iVar11 - iVar9" identifier - identifier)) )) (compound_statement "{\n    iVar10 = local_16c;\n  }" { (expression_statement "iVar10 = local_16c;" (assignment_expression "iVar10 = local_16c" identifier = identifier) ;) })) (if_statement "if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }" { (if_statement "if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (compound_statement "{\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" { (labeled_statement "LAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" statement_identifier : (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" identifier (argument_list "(iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" ( identifier , identifier , identifier , identifier , (binary_expression "iVar9 + local_180" identifier + identifier) , (binary_expression "(long)local_178 + (long)iVar9" (cast_expression "(long)local_178" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)iVar9" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier , identifier , number_literal , identifier )))) ;)) (if_statement "if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" if (parenthesized_expression "(iVar12 != 0)" ( (binary_expression "iVar12 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" { (if_statement "if (bVar2) goto LAB_00102ea4;" if (parenthesized_expression "(bVar2)" ( identifier )) (goto_statement "goto LAB_00102ea4;" goto statement_identifier ;)) (goto_statement "goto LAB_00102f66;" goto statement_identifier ;) })) })) }) (else_clause "else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" else (compound_statement "{\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" { (expression_statement "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);" (call_expression "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" identifier (argument_list "("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" ( (string_literal ""sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , (binary_expression "iVar9 + local_180" identifier + identifier) , identifier ))) ;) (if_statement "if (!bVar4) goto LAB_00102d61;" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (goto_statement "goto LAB_00102d61;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) }))) (expression_statement "iVar9 = iVar9 + iVar10;" (assignment_expression "iVar9 = iVar9 + iVar10" identifier = (binary_expression "iVar9 + iVar10" identifier + identifier)) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) (labeled_statement "LAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" statement_identifier : (if_statement "if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" { (labeled_statement "LAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" statement_identifier : (if_statement "if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (compound_statement "{\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" { (labeled_statement "LAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" statement_identifier : (expression_statement "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" identifier (argument_list "(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" ( identifier , number_literal , number_literal , number_literal , number_literal , number_literal , number_literal , identifier , number_literal , identifier )))) ;)) (labeled_statement "LAB_00102f58:\n        local_194 = iVar12;" statement_identifier : (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" identifier = identifier) ;)) (if_statement "if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" if (parenthesized_expression "(iVar12 != 0)" ( (binary_expression "iVar12 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" { (labeled_statement "LAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" statement_identifier : (expression_statement "sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" (call_expression "sg_get_category_sense_str(iVar12,0x50,local_148,local_188)" identifier (argument_list "(iVar12,0x50,local_148,local_188)" ( identifier , number_literal , identifier , identifier ))) ;)) (expression_statement "pr2serr("Write buffer failed: %s\n",local_148);" (call_expression "pr2serr("Write buffer failed: %s\n",local_148)" identifier (argument_list "("Write buffer failed: %s\n",local_148)" ( (string_literal ""Write buffer failed: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" identifier = identifier) ;) })) })) }) (else_clause "else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" else (compound_statement "{\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" { (expression_statement "pr2serr("sending Activate deferred microcode [0xf]\n");" (call_expression "pr2serr("sending Activate deferred microcode [0xf]\n")" identifier (argument_list "("sending Activate deferred microcode [0xf]\n")" ( (string_literal ""sending Activate deferred microcode [0xf]\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (!bVar4) goto LAB_00102ec2;" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (goto_statement "goto LAB_00102ec2;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) })))) }))) (labeled_statement "LAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" statement_identifier : (if_statement "if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" if (parenthesized_expression "(local_150 == (void *)0x0)" ( (binary_expression "local_150 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }" { (labeled_statement "LAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);" statement_identifier : (expression_statement "iVar7 = sg_cmds_close_device(iVar7);" (assignment_expression "iVar7 = sg_cmds_close_device(iVar7)" identifier = (call_expression "sg_cmds_close_device(iVar7)" identifier (argument_list "(iVar7)" ( identifier )))) ;)) (if_statement "if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" { (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" identifier = (call_expression "safe_strerror(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (expression_statement "pr2serr("close error: %s\n",uVar18);" (call_expression "pr2serr("close error: %s\n",uVar18)" identifier (argument_list "("close error: %s\n",uVar18)" ( (string_literal ""close error: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }" if (parenthesized_expression "(local_194 == 0)" ( (binary_expression "local_194 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = sg_convert_errno(-iVar7);\n      }" { (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) })) })) }) (else_clause "else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" else (compound_statement "{\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" { (labeled_statement "LAB_00102867:\n    free(local_150);" statement_identifier : (expression_statement "free(local_150);" (call_expression "free(local_150)" identifier (argument_list "(local_150)" ( identifier ))) ;)) (if_statement "if (-1 < iVar7) goto LAB_00102e47;" if (parenthesized_expression "(-1 < iVar7)" ( (binary_expression "-1 < iVar7" number_literal < identifier) )) (goto_statement "goto LAB_00102e47;" goto statement_identifier ;)) })))) (if_statement "if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" { (labeled_statement "LAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" statement_identifier : (expression_statement "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" (assignment_expression "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier = (call_expression "sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier (argument_list "("sg_write_buffer failed: ",local_194)" ( (string_literal ""sg_write_buffer failed: "" " string_content ") , identifier )))) ;)) (if_statement "if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" if (parenthesized_expression "(cVar6 == '\0')" ( (binary_expression "cVar6 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" { (expression_statement "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");" (call_expression "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" identifier (argument_list "("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" ( (string_literal ""Some error occurred, try again with \'-v\' or \'-vv\' for more information\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) })) })) (labeled_statement "LAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }" statement_identifier : (if_statement "if (local_194 < 0) {\n    local_194 = 99;\n  }" if (parenthesized_expression "(local_194 < 0)" ( (binary_expression "local_194 < 0" identifier < number_literal) )) (compound_statement "{\n    local_194 = 99;\n  }" { (expression_statement "local_194 = 99;" (assignment_expression "local_194 = 99" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "switchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);" statement_identifier : (expression_statement "local_168 = sg_get_num(optarg);" (assignment_expression "local_168 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;)) (if_statement "if (local_168 < 0) goto code_r0x00102669;" if (parenthesized_expression "(local_168 < 0)" ( (binary_expression "local_168 < 0" identifier < number_literal) )) (goto_statement "goto code_r0x00102669;" goto statement_identifier ;)) (goto_statement "goto LAB_001023de;" goto statement_identifier ;) (labeled_statement "code_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");" statement_identifier : (expression_statement "pr2serr("Invalid argument to \'--timeout\'\n");" (call_expression "pr2serr("Invalid argument to \'--timeout\'\n")" identifier (argument_list "("Invalid argument to \'--timeout\'\n")" ( (string_literal ""Invalid argument to \'--timeout\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;)) (labeled_statement "LAB_001026af:\n  local_194 = 1;" statement_identifier : (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\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    return local_194;\n  }" { (return_statement "return local_194;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int main(int argc,char **argv)\n\n{\n  long lVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  bool bVar6;\n  char cVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  int iVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  char *pcVar20;\n  size_t __n;\n  char *pcVar21;\n  ulong uVar22;\n  mode_s *pmVar23;\n  long in_FS_OFFSET;\n  byte bVar24;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  int option_index;\n  uint8_t *free_dop;\n  char ebuff [256];\n  \n  bVar24 = 0;\n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  free_dop = (uint8_t *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar9 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar4 = false;\n  bVar6 = false;\n  bVar2 = false;\n  bVar5 = false;\n  bVar3 = false;\nLAB_001023de:\n  option_index = 0;\n  iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);\n  if (iVar8 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }\n    if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar8) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  } while (optind < argc);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar12 <= iVar10) goto LAB_0010284e;\n  iVar11 = iVar12 - iVar10;\n  if (local_16c < iVar12 - iVar10) {\n    iVar11 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar10 = iVar10 + iVar11;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar3) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (free_dop == (uint8_t *)0x0) {\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int main(int argc,char **argv)\n\n{\n  long lVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  bool bVar6;\n  char cVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  int iVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  char *pcVar20;\n  size_t __n;\n  char *pcVar21;\n  ulong uVar22;\n  mode_s *pmVar23;\n  long in_FS_OFFSET;\n  byte bVar24;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  int option_index;\n  uint8_t *free_dop;\n  char ebuff [256];\n  \n  bVar24 = 0;\n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  free_dop = (uint8_t *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar9 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar4 = false;\n  bVar6 = false;\n  bVar2 = false;\n  bVar5 = false;\n  bVar3 = false;\nLAB_001023de:\n  option_index = 0;\n  iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);\n  if (iVar8 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }\n    if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar8) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  } while (optind < argc);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar12 <= iVar10) goto LAB_0010284e;\n  iVar11 = iVar12 - iVar10;\n  if (local_16c < iVar12 - iVar10) {\n    iVar11 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar10 = iVar10 + iVar11;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar3) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (free_dop == (uint8_t *)0x0) {\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "main(int argc,char **argv)" identifier (parameter_list "(int argc,char **argv)" ( (parameter_declaration "int argc" primitive_type identifier) , (parameter_declaration "char **argv" primitive_type (pointer_declarator "**argv" * (pointer_declarator "*argv" * identifier))) ))) (compound_statement "{\n  long lVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  bool bVar6;\n  char cVar7;\n  int iVar8;\n  uint uVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  int iVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  char *pcVar20;\n  size_t __n;\n  char *pcVar21;\n  ulong uVar22;\n  mode_s *pmVar23;\n  long in_FS_OFFSET;\n  byte bVar24;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  int option_index;\n  uint8_t *free_dop;\n  char ebuff [256];\n  \n  bVar24 = 0;\n  lVar1 = *(long *)(in_FS_OFFSET + 0x28);\n  free_dop = (uint8_t *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar9 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar4 = false;\n  bVar6 = false;\n  bVar2 = false;\n  bVar5 = false;\n  bVar3 = false;\nLAB_001023de:\n  option_index = 0;\n  iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);\n  if (iVar8 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }\n    if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar8) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  } while (optind < argc);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar12 <= iVar10) goto LAB_0010284e;\n  iVar11 = iVar12 - iVar10;\n  if (local_16c < iVar12 - iVar10) {\n    iVar11 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar10 = iVar10 + iVar11;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar3) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (free_dop == (uint8_t *)0x0) {\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "bool bVar6;" primitive_type identifier ;) (declaration "char cVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "int iVar13;" primitive_type identifier ;) (declaration "ushort **ppuVar14;" type_identifier (pointer_declarator "**ppuVar14" * (pointer_declarator "*ppuVar14" * identifier)) ;) (declaration "ulong uVar15;" type_identifier identifier ;) (declaration "__off64_t _Var16;" type_identifier identifier ;) (declaration "int *piVar17;" primitive_type (pointer_declarator "*piVar17" * identifier) ;) (declaration "undefined8 uVar18;" type_identifier identifier ;) (declaration "long lVar19;" (sized_type_specifier "long" long) identifier ;) (declaration "char *pcVar20;" primitive_type (pointer_declarator "*pcVar20" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *pcVar21;" primitive_type (pointer_declarator "*pcVar21" * identifier) ;) (declaration "ulong uVar22;" type_identifier identifier ;) (declaration "mode_s *pmVar23;" type_identifier (pointer_declarator "*pmVar23" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar24;" type_identifier identifier ;) (declaration "int local_194;" primitive_type identifier ;) (declaration "char *local_190;" primitive_type (pointer_declarator "*local_190" * identifier) ;) (declaration "int local_188;" primitive_type identifier ;) (declaration "uint local_184;" type_identifier identifier ;) (declaration "int local_180;" primitive_type identifier ;) (declaration "uint local_17c;" type_identifier identifier ;) (declaration "void *local_178;" primitive_type (pointer_declarator "*local_178" * identifier) ;) (declaration "int local_170;" primitive_type identifier ;) (declaration "int local_16c;" primitive_type identifier ;) (declaration "int local_168;" primitive_type identifier ;) (declaration "int local_164;" primitive_type identifier ;) (declaration "int option_index;" primitive_type identifier ;) (declaration "uint8_t *free_dop;" primitive_type (pointer_declarator "*free_dop" * identifier) ;) (declaration "char ebuff [256];" primitive_type (array_declarator "ebuff [256]" identifier [ number_literal ]) ;) (expression_statement "bVar24 = 0;" (assignment_expression "bVar24 = 0" 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 "free_dop = (uint8_t *)0x0;" (assignment_expression "free_dop = (uint8_t *)0x0" identifier = (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_190 = (char *)0x0;" (assignment_expression "local_190 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_17c = 0;" (assignment_expression "local_17c = 0" identifier = number_literal) ;) (expression_statement "local_168 = 300;" (assignment_expression "local_168 = 300" identifier = number_literal) ;) (expression_statement "local_164 = 0;" (assignment_expression "local_164 = 0" identifier = number_literal) ;) (expression_statement "local_180 = 0;" (assignment_expression "local_180 = 0" identifier = number_literal) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (expression_statement "local_170 = 0;" (assignment_expression "local_170 = 0" identifier = number_literal) ;) (expression_statement "local_184 = 0;" (assignment_expression "local_184 = 0" identifier = number_literal) ;) (expression_statement "local_188 = 0;" (assignment_expression "local_188 = 0" identifier = number_literal) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) (expression_statement "local_16c = 0;" (assignment_expression "local_16c = 0" identifier = number_literal) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "bVar6 = false;" (assignment_expression "bVar6 = false" identifier = false) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (labeled_statement "LAB_001023de:\n  option_index = 0;" statement_identifier : (expression_statement "option_index = 0;" (assignment_expression "option_index = 0" identifier = number_literal) ;)) (expression_statement "iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);" (assignment_expression "iVar8 = getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index)" identifier = (call_expression "getopt_long(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index)" identifier (argument_list "(argc,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index)" ( identifier , identifier , (string_literal ""b:dhi:I:l:m:o:rs:S:t:vV"" " string_content ") , identifier , (pointer_expression "&option_index" & identifier) )))) ;) (if_statement "if (iVar8 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }\n    if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" if (parenthesized_expression "(iVar8 == -1)" ( (binary_expression "iVar8 == -1" identifier == number_literal) )) (compound_statement "{\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }\n    if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" { (if_statement "if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" if (parenthesized_expression "(local_194 != 0)" ( (binary_expression "local_194 != 0" identifier != number_literal) )) (compound_statement "{\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" { (if_statement "if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }" if (parenthesized_expression "(local_194 < 2)" ( (binary_expression "local_194 < 2" identifier < number_literal) )) (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }" else (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        print_modes();\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (expression_statement "print_modes();" (call_expression "print_modes()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if (optind < argc) {\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }\n    else {\n      pcVar20 = (char *)0x0;\n    }" if (parenthesized_expression "(optind < argc)" ( (binary_expression "optind < argc" identifier < identifier) )) (compound_statement "{\n      pcVar20 = argv[optind];\n      optind = optind + 1;\n      if (optind < argc) goto LAB_0010272c;\n    }" { (expression_statement "pcVar20 = argv[optind];" (assignment_expression "pcVar20 = argv[optind]" identifier = (subscript_expression "argv[optind]" identifier [ identifier ])) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) (if_statement "if (optind < argc) goto LAB_0010272c;" if (parenthesized_expression "(optind < argc)" ( (binary_expression "optind < argc" identifier < identifier) )) (goto_statement "goto LAB_0010272c;" goto statement_identifier ;)) }) (else_clause "else {\n      pcVar20 = (char *)0x0;\n    }" else (compound_statement "{\n      pcVar20 = (char *)0x0;\n    }" { (expression_statement "pcVar20 = (char *)0x0;" (assignment_expression "pcVar20 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) (if_statement "if ((bVar2) && (bVar6)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "((bVar2) && (bVar6))" ( (binary_expression "(bVar2) && (bVar6)" (parenthesized_expression "(bVar2)" ( identifier )) && (parenthesized_expression "(bVar6)" ( identifier ))) )) (compound_statement "{\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }" { (expression_statement "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");" (call_expression "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n")" identifier (argument_list "("Not in DEBUG mode, so \'-vV\' has no special action\n")" ( (string_literal ""Not in DEBUG mode, so \'-vV\' has no special action\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) }) (else_clause "else if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" else (if_statement "if (!bVar6) {\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "(!bVar6)" ( (unary_expression "!bVar6" ! identifier) )) (compound_statement "{\n      if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }\n      iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n      if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" { (if_statement "if (pcVar20 == (char *)0x0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" if (parenthesized_expression "(pcVar20 == (char *)0x0)" ( (binary_expression "pcVar20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" { (expression_statement "pr2serr("Missing device name!\n\n");" (call_expression "pr2serr("Missing device name!\n\n")" identifier (argument_list "("Missing device name!\n\n")" ( (string_literal ""Missing device name!\n\n"" " string_content escape_sequence escape_sequence ") ))) ;) (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }" if (parenthesized_expression "((local_170 < local_16c) && (0 < local_170))" ( (binary_expression "(local_170 < local_16c) && (0 < local_170)" (parenthesized_expression "(local_170 < local_16c)" ( (binary_expression "local_170 < local_16c" identifier < identifier) )) && (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) ))) )) (compound_statement "{\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar8 = sg_cmds_open_device(pcVar20,0,local_188);\n        if (iVar8 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }\n        iVar10 = 0;\n        goto LAB_00102da3;\n      }" { (expression_statement "pr2serr("trim chunk size (CS) to be the same as LEN\n");" (call_expression "pr2serr("trim chunk size (CS) to be the same as LEN\n")" identifier (argument_list "("trim chunk size (CS) to be the same as LEN\n")" ( (string_literal ""trim chunk size (CS) to be the same as LEN\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar8 = sg_cmds_open_device(pcVar20,0,local_188);" (assignment_expression "iVar8 = sg_cmds_open_device(pcVar20,0,local_188)" identifier = (call_expression "sg_cmds_open_device(pcVar20,0,local_188)" identifier (argument_list "(pcVar20,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar8 < 0) goto LAB_001029f5;" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (goto_statement "goto LAB_001029f5;" goto statement_identifier ;)) (expression_statement "local_16c = local_170;" (assignment_expression "local_16c = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);" statement_identifier : (expression_statement "local_178 = (void *)sg_memalign(local_170,0,&free_dop,0);" (assignment_expression "local_178 = (void *)sg_memalign(local_170,0,&free_dop,0)" identifier = (cast_expression "(void *)sg_memalign(local_170,0,&free_dop,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sg_memalign(local_170,0,&free_dop,0)" identifier (argument_list "(local_170,0,&free_dop,0)" ( identifier , number_literal , (pointer_expression "&free_dop" & identifier) , number_literal ))))) ;)) (if_statement "if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(local_178 == (void *)0x0)" ( (binary_expression "local_178 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("sg_write_buffer: out of memory\n");" (call_expression "pr2serr("sg_write_buffer: out of memory\n")" identifier (argument_list "("sg_write_buffer: out of memory\n")" ( (string_literal ""sg_write_buffer: out of memory\n"" " string_content escape_sequence ") ))) ;) (expression_statement "local_194 = sg_convert_errno(0xc);" (assignment_expression "local_194 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "__n = (size_t)local_170;" (assignment_expression "__n = (size_t)local_170" identifier = (cast_expression "(size_t)local_170" ( (type_descriptor "size_t" primitive_type) ) identifier)) ;) (expression_statement "memset(local_178,0xff,__n);" (call_expression "memset(local_178,0xff,__n)" identifier (argument_list "(local_178,0xff,__n)" ( identifier , number_literal , identifier ))) ;) (if_statement "if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }" if (parenthesized_expression "(local_190 == (char *)0x0)" ( (binary_expression "local_190 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001029c2:\n          iVar12 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }" { (labeled_statement "LAB_001029c2:\n          iVar12 = local_170;" statement_identifier : (expression_statement "iVar12 = local_170;" (assignment_expression "iVar12 = local_170" identifier = identifier) ;)) (if_statement "if (local_16c < 1) goto LAB_00102f05;" if (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) (goto_statement "goto LAB_00102f05;" goto statement_identifier ;)) }) (else_clause "else {\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }" else (compound_statement "{\n          iVar10 = strcmp(local_190,"-");\n          if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar11 = open64(local_190,0);\n          if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }\n          iVar12 = sg_set_binary_mode(iVar11);\n          if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar11,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }\n          iVar12 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;\n          iVar12 = (int)uVar15;\n          if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n          pr2serr("will write %d bytes",uVar22);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar10 != 0) goto LAB_00102b35;\n        }" { (expression_statement "iVar10 = strcmp(local_190,"-");" (assignment_expression "iVar10 = strcmp(local_190,"-")" identifier = (call_expression "strcmp(local_190,"-")" identifier (argument_list "(local_190,"-")" ( identifier , (string_literal ""-"" " string_content ") )))) ;) (if_statement "if (iVar10 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar10 == 0)" ( (binary_expression "iVar10 == 0" identifier == number_literal) )) (compound_statement "{\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" { (if_statement "if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" if (parenthesized_expression "(local_164 < 1)" ( (binary_expression "local_164 < 1" identifier < number_literal) )) (compound_statement "{\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );\n              perror(ebuff);\n            }" { (expression_statement "uVar15 = read(0,local_178,__n);" (assignment_expression "uVar15 = read(0,local_178,__n)" identifier = (call_expression "read(0,local_178,__n)" identifier (argument_list "(0,local_178,__n)" ( number_literal , identifier , identifier )))) ;) (if_statement "if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" if (parenthesized_expression "(-1 < (int)uVar15)" ( (binary_expression "-1 < (int)uVar15" number_literal < (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" { (if_statement "if ((int)uVar15 < local_170) {\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }" if (parenthesized_expression "((int)uVar15 < local_170)" ( (binary_expression "(int)uVar15 < local_170" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n                  iVar11 = 0;\n                  goto LAB_00102c57;\n                }" { (expression_statement "iVar11 = 0;" (assignment_expression "iVar11 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102c57;" goto statement_identifier ;) })) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            );" (call_expression "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            )" identifier (argument_list "(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190\n                            )" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(ebuff);" (call_expression "perror(ebuff)" identifier (argument_list "(ebuff)" ( identifier ))) ;) }) (else_clause "else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" else (compound_statement "{\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" { (expression_statement "pr2serr("Can\'t skip on stdin\n");" (call_expression "pr2serr("Can\'t skip on stdin\n")" identifier (argument_list "("Can\'t skip on stdin\n")" ( (string_literal ""Can\'t skip on stdin\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0xf;" (assignment_expression "local_194 = 0xf" identifier = number_literal) ;) }))) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar11 = open64(local_190,0);" (assignment_expression "iVar11 = open64(local_190,0)" identifier = (call_expression "open64(local_190,0)" identifier (argument_list "(local_190,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar11 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar11 < 0)" ( (binary_expression "iVar11 < 0" identifier < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(ebuff);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);" (call_expression "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" identifier (argument_list "(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: could not open %s for reading"" " string_content ") , identifier ))) ;) (expression_statement "perror(ebuff);" (call_expression "perror(ebuff)" identifier (argument_list "(ebuff)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar12 = sg_set_binary_mode(iVar11);" (assignment_expression "iVar12 = sg_set_binary_mode(iVar11)" identifier = (call_expression "sg_set_binary_mode(iVar11)" identifier (argument_list "(iVar11)" ( identifier )))) ;) (if_statement "if (iVar12 < 0) {\n            perror("sg_set_binary_mode");\n          }" if (parenthesized_expression "(iVar12 < 0)" ( (binary_expression "iVar12 < 0" identifier < number_literal) )) (compound_statement "{\n            perror("sg_set_binary_mode");\n          }" { (expression_statement "perror("sg_set_binary_mode");" (call_expression "perror("sg_set_binary_mode")" identifier (argument_list "("sg_set_binary_mode")" ( (string_literal ""sg_set_binary_mode"" " string_content ") ))) ;) })) (if_statement "if ((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0))" ( (binary_expression "(0 < local_164) && (_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)" (parenthesized_expression "(0 < local_164)" ( (binary_expression "0 < local_164" number_literal < identifier) )) && (parenthesized_expression "(_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0)" ( (comma_expression "_Var16 = lseek64(iVar11,(long)local_164,0), _Var16 < 0" (assignment_expression "_Var16 = lseek64(iVar11,(long)local_164,0)" identifier = (call_expression "lseek64(iVar11,(long)local_164,0)" identifier (argument_list "(iVar11,(long)local_164,0)" ( identifier , (cast_expression "(long)local_164" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal )))) , (binary_expression "_Var16 < 0" identifier < number_literal)) ))) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);" (call_expression "__snprintf_chk(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" identifier (argument_list "(ebuff,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t skip to required position on %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(ebuff);" (call_expression "perror(ebuff)" identifier (argument_list "(ebuff)" ( identifier ))) ;) (expression_statement "close(iVar11);" (call_expression "close(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "uVar15 = read(iVar11,local_178,__n);" (assignment_expression "uVar15 = read(iVar11,local_178,__n)" identifier = (call_expression "read(iVar11,local_178,__n)" identifier (argument_list "(iVar11,local_178,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((int)uVar15 < 0)" ( (binary_expression "(int)uVar15 < 0" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);\n            perror(ebuff);\n            close(iVar11);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190);" (call_expression "__snprintf_chk(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190)" identifier (argument_list "(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(ebuff);" (call_expression "perror(ebuff)" identifier (argument_list "(ebuff)" ( identifier ))) ;) (expression_statement "close(iVar11);" (call_expression "close(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar12 = local_170;" (assignment_expression "iVar12 = local_170" identifier = identifier) ;) (if_statement "if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }" if (parenthesized_expression "(local_170 <= (int)uVar15)" ( (binary_expression "local_170 <= (int)uVar15" identifier <= (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\nLAB_00102b35:\n            close(iVar11);\n            local_170 = iVar12;\n            goto LAB_001029c2;\n          }" { (labeled_statement "LAB_00102b35:\n            close(iVar11);" statement_identifier : (expression_statement "close(iVar11);" (call_expression "close(iVar11)" identifier (argument_list "(iVar11)" ( identifier ))) ;)) (expression_statement "local_170 = iVar12;" (assignment_expression "local_170 = iVar12" identifier = identifier) ;) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (labeled_statement "LAB_00102c57:\n          uVar22 = uVar15 & 0xffffffff;" statement_identifier : (expression_statement "uVar22 = uVar15 & 0xffffffff;" (assignment_expression "uVar22 = uVar15 & 0xffffffff" identifier = (binary_expression "uVar15 & 0xffffffff" identifier & number_literal)) ;)) (expression_statement "iVar12 = (int)uVar15;" (assignment_expression "iVar12 = (int)uVar15" identifier = (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (bVar4) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar12 = local_170;\nLAB_00102c65:\n            local_170 = iVar12;\n            if (iVar10 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" { (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("pad with 0xff bytes and continue\n");" (call_expression "pr2serr("pad with 0xff bytes and continue\n")" identifier (argument_list "("pad with 0xff bytes and continue\n")" ( (string_literal ""pad with 0xff bytes and continue\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar12 = local_170;" (assignment_expression "iVar12 = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102c65:\n            local_170 = iVar12;" statement_identifier : (expression_statement "local_170 = iVar12;" (assignment_expression "local_170 = iVar12" identifier = identifier) ;)) (if_statement "if (iVar10 == 0) goto LAB_001029c2;" if (parenthesized_expression "(iVar10 == 0)" ( (binary_expression "iVar10 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;)) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;) })) (if_statement "if (local_188 == 0) goto LAB_00102c65;" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;)) (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar22)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("will write %d bytes",uVar22);" (call_expression "pr2serr("will write %d bytes",uVar22)" identifier (argument_list "("will write %d bytes",uVar22)" ( (string_literal ""will write %d bytes"" " string_content ") , identifier ))) ;) (if_statement "if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" if (parenthesized_expression "((local_16c < 1) || (local_170 <= local_16c))" ( (binary_expression "(local_16c < 1) || (local_170 <= local_16c)" (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) || (parenthesized_expression "(local_170 <= local_16c)" ( (binary_expression "local_170 <= local_16c" identifier <= identifier) ))) )) (compound_statement "{\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" { (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;) })) (expression_statement "pr2serr(", %d bytes per WRITE BUFFER command\n");" (call_expression "pr2serr(", %d bytes per WRITE BUFFER command\n")" identifier (argument_list "(", %d bytes per WRITE BUFFER command\n")" ( (string_literal "", %d bytes per WRITE BUFFER command\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (iVar10 != 0) goto LAB_00102b35;" if (parenthesized_expression "(iVar10 != 0)" ( (binary_expression "iVar10 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;)) }))) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) })) (expression_statement "iVar8 = sg_cmds_open_device(pcVar20,0,local_188);" (assignment_expression "iVar8 = sg_cmds_open_device(pcVar20,0,local_188)" identifier = (call_expression "sg_cmds_open_device(pcVar20,0,local_188)" identifier (argument_list "(pcVar20,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar8 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar8);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);\n        local_194 = sg_convert_errno(-iVar8);\n        if (free_dop != (uint8_t *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" { (labeled_statement "LAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" statement_identifier : (if_statement "if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n          local_194 = sg_convert_errno(-iVar8);\n          if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" { (expression_statement "local_194 = sg_convert_errno(-iVar8);" (assignment_expression "local_194 = sg_convert_errno(-iVar8)" identifier = (call_expression "sg_convert_errno(-iVar8)" identifier (argument_list "(-iVar8)" ( (unary_expression "-iVar8" - identifier) )))) ;) (if_statement "if (free_dop == (uint8_t *)0x0) goto LAB_00102a18;" if (parenthesized_expression "(free_dop == (uint8_t *)0x0)" ( (binary_expression "free_dop == (uint8_t *)0x0" identifier == (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102a18;" goto statement_identifier ;)) (goto_statement "goto LAB_00102867;" goto statement_identifier ;) }))) (expression_statement "uVar18 = safe_strerror(-iVar8);" (assignment_expression "uVar18 = safe_strerror(-iVar8)" identifier = (call_expression "safe_strerror(-iVar8)" identifier (argument_list "(-iVar8)" ( (unary_expression "-iVar8" - identifier) )))) ;) (expression_statement "pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18);" (call_expression "pr2serr("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18)" identifier (argument_list "("sg_write_buffer: open error: %s: %s\n",pcVar20,uVar18)" ( (string_literal ""sg_write_buffer: open error: %s: %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "local_194 = sg_convert_errno(-iVar8);" (assignment_expression "local_194 = sg_convert_errno(-iVar8)" identifier = (call_expression "sg_convert_errno(-iVar8)" identifier (argument_list "(-iVar8)" ( (unary_expression "-iVar8" - identifier) )))) ;) (if_statement "if (free_dop != (uint8_t *)0x0) goto LAB_00102867;" if (parenthesized_expression "(free_dop != (uint8_t *)0x0)" ( (binary_expression "free_dop != (uint8_t *)0x0" identifier != (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102867;" goto statement_identifier ;)) (goto_statement "goto LAB_00102880;" goto statement_identifier ;) })) (if_statement "if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" if (parenthesized_expression "((0 < local_170) || (local_190 != (char *)0x0))" ( (binary_expression "(0 < local_170) || (local_190 != (char *)0x0)" (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) )) || (parenthesized_expression "(local_190 != (char *)0x0)" ( (binary_expression "local_190 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" { (if_statement "if (local_170 == 0) {\n          local_170 = 0x800000;\n        }" if (parenthesized_expression "(local_170 == 0)" ( (binary_expression "local_170 == 0" identifier == number_literal) )) (compound_statement "{\n          local_170 = 0x800000;\n        }" { (expression_statement "local_170 = 0x800000;" (assignment_expression "local_170 = 0x800000" identifier = number_literal) ;) })) (goto_statement "goto LAB_00102933;" goto statement_identifier ;) })) (if_statement "if (0 < local_16c) goto LAB_0010284e;" if (parenthesized_expression "(0 < local_16c)" ( (binary_expression "0 < local_16c" number_literal < identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;)) (expression_statement "local_178 = (void *)0x0;" (assignment_expression "local_178 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" statement_identifier : (if_statement "if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = local_188;\n        if (bVar5) goto LAB_00102859;\n      }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (bVar5) goto LAB_00102859;" if (parenthesized_expression "(bVar5)" ( identifier )) (goto_statement "goto LAB_00102859;" goto statement_identifier ;)) }) (else_clause "else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" else (compound_statement "{\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" { (expression_statement "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170);" (call_expression "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170)" identifier (argument_list "("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar9\n                ,local_17c,local_184,local_180,local_170)" ( (string_literal ""sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (bVar5) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(bVar5)" ( identifier )) (compound_statement "{\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(all in one) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) })))) (expression_statement "iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);" (assignment_expression "iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier (argument_list "(iVar8,uVar9,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , number_literal , identifier )))) ;) (goto_statement "goto LAB_00102f58;" goto statement_identifier ;) })))) (expression_statement "pr2serr("version: %s\n","1.28 20180628");" (call_expression "pr2serr("version: %s\n","1.28 20180628")" identifier (argument_list "("version: %s\n","1.28 20180628")" ( (string_literal ""version: %s\n"" " string_content escape_sequence ") , (string_literal ""1.28 20180628"" " string_content ") ))) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (switch_statement "switch(iVar8) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;\n  }" switch (parenthesized_expression "(iVar8)" ( identifier )) (compound_statement "{\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;\n  }" { (case_statement "case 0x3f:" case number_literal :) (case_statement "case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_194 = local_194 + 1;" (assignment_expression "local_194 = local_194 + 1" identifier = (binary_expression "local_194 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar8);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;" default : (expression_statement "pr2serr("unrecognised option code 0x%x ??\n",iVar8);" (call_expression "pr2serr("unrecognised option code 0x%x ??\n",iVar8)" identifier (argument_list "("unrecognised option code 0x%x ??\n",iVar8)" ( (string_literal ""unrecognised option code 0x%x ??\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );" (call_expression "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" identifier (argument_list "(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;)) (case_statement "case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = optarg;" (assignment_expression "local_190 = optarg" identifier = identifier) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_17c = sg_get_num(optarg);" (assignment_expression "local_17c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(7 < local_17c)" ( (binary_expression "7 < local_17c" number_literal < identifier) )) (compound_statement "{\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("expected argument to \'--specific\' to be 0 to 7\n");" (call_expression "pr2serr("expected argument to \'--specific\' to be 0 to 7\n")" identifier (argument_list "("expected argument to \'--specific\' to be 0 to 7\n")" ( (string_literal ""expected argument to \'--specific\' to be 0 to 7\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x56:\n    bVar6 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar6 = true;" (assignment_expression "bVar6 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar20 = strchr(optarg,0x2c);\n    if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_16c = sg_get_num(optarg);" (assignment_expression "local_16c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_16c < 0)" ( (binary_expression "local_16c < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--bpw\' should be in a positive number\n");" (call_expression "pr2serr("argument to \'--bpw\' should be in a positive number\n")" identifier (argument_list "("argument to \'--bpw\' should be in a positive number\n")" ( (string_literal ""argument to \'--bpw\' should be in a positive number\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "pcVar20 = strchr(optarg,0x2c);" (assignment_expression "pcVar20 = strchr(optarg,0x2c)" identifier = (call_expression "strchr(optarg,0x2c)" identifier (argument_list "(optarg,0x2c)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar20 != (char *)0x0) {\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }" if (parenthesized_expression "(pcVar20 != (char *)0x0)" ( (binary_expression "pcVar20 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar8 = strncmp("act",pcVar20 + 1,3);\n      if (iVar8 == 0) {\n        bVar3 = true;\n      }\n    }" { (expression_statement "iVar8 = strncmp("act",pcVar20 + 1,3);" (assignment_expression "iVar8 = strncmp("act",pcVar20 + 1,3)" identifier = (call_expression "strncmp("act",pcVar20 + 1,3)" identifier (argument_list "("act",pcVar20 + 1,3)" ( (string_literal ""act"" " string_content ") , (binary_expression "pcVar20 + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar8 == 0) {\n        bVar3 = true;\n      }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n        bVar3 = true;\n      }" { (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) })) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 100:\n    bVar5 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_184 = sg_get_num(optarg);" (assignment_expression "local_184 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(0xff < local_184)" ( (binary_expression "0xff < local_184" number_literal < identifier) )) (compound_statement "{\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--id\' should be in the range 0 to 255\n");" (call_expression "pr2serr("argument to \'--id\' should be in the range 0 to 255\n")" identifier (argument_list "("argument to \'--id\' should be in the range 0 to 255\n")" ( (string_literal ""argument to \'--id\' should be in the range 0 to 255\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar4 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_170 = sg_get_num(optarg);" (assignment_expression "local_170 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_170 < 0)" ( (binary_expression "local_170 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--length\'\n");" (call_expression "pr2serr("bad argument to \'--length\'\n")" identifier (argument_list "("bad argument to \'--length\'\n")" ( (string_literal ""bad argument to \'--length\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar20 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "ppuVar14 = __ctype_b_loc();" (assignment_expression "ppuVar14 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar20 = optarg;" (assignment_expression "pcVar20 = optarg" identifier = identifier) ;) (if_statement "if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }\n    else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" if (parenthesized_expression "((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0)" ( (binary_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0" (parenthesized_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8)" ( (binary_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8" (pointer_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" * (cast_expression "(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (binary_expression "(long)*ppuVar14 + (long)*optarg * 2 + 1" (binary_expression "(long)*ppuVar14 + (long)*optarg * 2" (cast_expression "(long)*ppuVar14" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*ppuVar14" * identifier)) + (binary_expression "(long)*optarg * 2" (cast_expression "(long)*optarg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*optarg" * identifier)) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      lVar19 = -1;\n      pcVar21 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');\n      if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }\n      pmVar23 = mode_arr;\n      pcVar21 = mode_arr[0].mode_string;\n      while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar9 = pmVar23->mode;\n    }" { (expression_statement "lVar19 = -1;" (assignment_expression "lVar19 = -1" identifier = number_literal) ;) (expression_statement "pcVar21 = optarg;" (assignment_expression "pcVar21 = optarg" identifier = identifier) ;) (do_statement "do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      } while (cVar7 != '\0');" do (compound_statement "{\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar7 = *pcVar21;\n        pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;\n      }" { (if_statement "if (lVar19 == 0) break;" if (parenthesized_expression "(lVar19 == 0)" ( (binary_expression "lVar19 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar19 = lVar19 + -1;" (assignment_expression "lVar19 = lVar19 + -1" identifier = (binary_expression "lVar19 + -1" identifier + number_literal)) ;) (expression_statement "cVar7 = *pcVar21;" (assignment_expression "cVar7 = *pcVar21" identifier = (pointer_expression "*pcVar21" * identifier)) ;) (expression_statement "pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1;" (assignment_expression "pcVar21 = pcVar21 + (ulong)bVar24 * -2 + 1" identifier = (binary_expression "pcVar21 + (ulong)bVar24 * -2 + 1" (binary_expression "pcVar21 + (ulong)bVar24 * -2" identifier + (binary_expression "(ulong)bVar24 * -2" (cast_expression "(ulong)bVar24" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(cVar7 != '\0')" ( (binary_expression "cVar7 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (mode_arr[0].mode_string == (char *)0x0) {\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(mode_arr[0].mode_string == (char *)0x0)" ( (binary_expression "mode_arr[0].mode_string == (char *)0x0" (field_expression "mode_arr[0].mode_string" (subscript_expression "mode_arr[0]" identifier [ number_literal ]) . field_identifier) == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001025b2:\n        print_modes();\n        goto LAB_001026af;\n      }" { (labeled_statement "LAB_001025b2:\n        print_modes();" statement_identifier : (expression_statement "print_modes();" (call_expression "print_modes()" identifier (argument_list "()" ( ))) ;)) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "pmVar23 = mode_arr;" (assignment_expression "pmVar23 = mode_arr" identifier = identifier) ;) (expression_statement "pcVar21 = mode_arr[0].mode_string;" (assignment_expression "pcVar21 = mode_arr[0].mode_string" identifier = (field_expression "mode_arr[0].mode_string" (subscript_expression "mode_arr[0]" identifier [ number_literal ]) . field_identifier)) ;) (while_statement "while (iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0) {\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }" while (parenthesized_expression "(iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0)" ( (comma_expression "iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1)), iVar8 != 0" (assignment_expression "iVar8 = strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1))" identifier = (call_expression "strncmp(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1))" identifier (argument_list "(pcVar21,pcVar20,(long)(int)(~(uint)lVar19 - 1))" ( identifier , identifier , (cast_expression "(long)(int)(~(uint)lVar19 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(~(uint)lVar19 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(~(uint)lVar19 - 1)" ( (binary_expression "~(uint)lVar19 - 1" (unary_expression "~(uint)lVar19" ~ (cast_expression "(uint)lVar19" ( (type_descriptor "uint" type_identifier) ) identifier)) - number_literal) )))) )))) , (binary_expression "iVar8 != 0" identifier != number_literal)) )) (compound_statement "{\n        pmVar23 = pmVar23 + 1;\n        pcVar21 = pmVar23->mode_string;\n        if (pcVar21 == (char *)0x0) goto LAB_001025b2;\n      }" { (expression_statement "pmVar23 = pmVar23 + 1;" (assignment_expression "pmVar23 = pmVar23 + 1" identifier = (binary_expression "pmVar23 + 1" identifier + number_literal)) ;) (expression_statement "pcVar21 = pmVar23->mode_string;" (assignment_expression "pcVar21 = pmVar23->mode_string" identifier = (field_expression "pmVar23->mode_string" identifier -> field_identifier)) ;) (if_statement "if (pcVar21 == (char *)0x0) goto LAB_001025b2;" if (parenthesized_expression "(pcVar21 == (char *)0x0)" ( (binary_expression "pcVar21 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_001025b2;" goto statement_identifier ;)) })) (expression_statement "uVar9 = pmVar23->mode;" (assignment_expression "uVar9 = pmVar23->mode" identifier = (field_expression "pmVar23->mode" identifier -> field_identifier)) ;) }) (else_clause "else {\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" else (compound_statement "{\n      uVar9 = sg_get_num(optarg);\n      if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" { (expression_statement "uVar9 = sg_get_num(optarg);" (assignment_expression "uVar9 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0x1f < uVar9) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(0x1f < uVar9)" ( (binary_expression "0x1f < uVar9" number_literal < identifier) )) (compound_statement "{\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" { (expression_statement "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");" (call_expression "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n")" identifier (argument_list "("argument to \'--mode\' should be in the range 0 to 31\n")" ( (string_literal ""argument to \'--mode\' should be in the range 0 to 31\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) }))) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_180 = sg_get_num(optarg);" (assignment_expression "local_180 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_180 < 0)" ( (binary_expression "local_180 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--offset\'\n");" (call_expression "pr2serr("bad argument to \'--offset\'\n")" identifier (argument_list "("bad argument to \'--offset\'\n")" ( (string_literal ""bad argument to \'--offset\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = "-";" (assignment_expression "local_190 = "-"" identifier = (string_literal ""-"" " string_content ")) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_164 = sg_get_num(optarg);" (assignment_expression "local_164 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_164 < 0)" ( (binary_expression "local_164 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--skip\'\n");" (call_expression "pr2serr("bad argument to \'--skip\'\n")" identifier (argument_list "("bad argument to \'--skip\'\n")" ( (string_literal ""bad argument to \'--skip\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x74:\n    goto switchD_0010241f_caseD_74;" case number_literal : (goto_statement "goto switchD_0010241f_caseD_74;" goto statement_identifier ;)) (case_statement "case 0x76:\n    local_188 = local_188 + 1;\n    bVar2 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_188 = local_188 + 1;" (assignment_expression "local_188 = local_188 + 1" identifier = (binary_expression "local_188 + 1" identifier + number_literal)) ;) (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) })) (labeled_statement "LAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  } while (optind < argc);" statement_identifier : (do_statement "do {\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  } while (optind < argc);" do (compound_statement "{\n    pr2serr("Unexpected extra argument: %s\n",argv[optind]);\n    optind = optind + 1;\n  }" { (expression_statement "pr2serr("Unexpected extra argument: %s\n",argv[optind]);" (call_expression "pr2serr("Unexpected extra argument: %s\n",argv[optind])" identifier (argument_list "("Unexpected extra argument: %s\n",argv[optind])" ( (string_literal ""Unexpected extra argument: %s\n"" " string_content escape_sequence ") , (subscript_expression "argv[optind]" identifier [ identifier ]) ))) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(optind < argc)" ( (binary_expression "optind < argc" identifier < identifier) )) ;)) (expression_statement "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );" (call_expression "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" identifier (argument_list "(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "LAB_00102da3:\n  if (iVar12 <= iVar10) goto LAB_0010284e;" statement_identifier : (if_statement "if (iVar12 <= iVar10) goto LAB_0010284e;" if (parenthesized_expression "(iVar12 <= iVar10)" ( (binary_expression "iVar12 <= iVar10" identifier <= identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;))) (expression_statement "iVar11 = iVar12 - iVar10;" (assignment_expression "iVar11 = iVar12 - iVar10" identifier = (binary_expression "iVar12 - iVar10" identifier - identifier)) ;) (if_statement "if (local_16c < iVar12 - iVar10) {\n    iVar11 = local_16c;\n  }" if (parenthesized_expression "(local_16c < iVar12 - iVar10)" ( (binary_expression "local_16c < iVar12 - iVar10" identifier < (binary_expression "iVar12 - iVar10" identifier - identifier)) )) (compound_statement "{\n    iVar11 = local_16c;\n  }" { (expression_statement "iVar11 = local_16c;" (assignment_expression "iVar11 = local_16c" identifier = identifier) ;) })) (if_statement "if (local_188 == 0) {\n    if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n    if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }" { (if_statement "if (!bVar5) {\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (compound_statement "{\nLAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);\n      if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" { (labeled_statement "LAB_00102d61:\n      iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);" statement_identifier : (expression_statement "iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188);" (assignment_expression "iVar13 = sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188)" identifier (argument_list "(iVar8,uVar9,local_17c,local_184,iVar10 + local_180,\n                          (long)local_178 + (long)iVar10,iVar11,local_168,1,local_188)" ( identifier , identifier , identifier , identifier , (binary_expression "iVar10 + local_180" identifier + identifier) , (binary_expression "(long)local_178 + (long)iVar10" (cast_expression "(long)local_178" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)iVar10" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier , identifier , number_literal , identifier )))) ;)) (if_statement "if (iVar13 != 0) {\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" if (parenthesized_expression "(iVar13 != 0)" ( (binary_expression "iVar13 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar3) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" { (if_statement "if (bVar3) goto LAB_00102ea4;" if (parenthesized_expression "(bVar3)" ( identifier )) (goto_statement "goto LAB_00102ea4;" goto statement_identifier ;)) (goto_statement "goto LAB_00102f66;" goto statement_identifier ;) })) })) }) (else_clause "else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" else (compound_statement "{\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);\n    if (!bVar5) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" { (expression_statement "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11);" (call_expression "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11)" identifier (argument_list "("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar9,local_17c\n            ,local_184,iVar10 + local_180,iVar11)" ( (string_literal ""sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , (binary_expression "iVar10 + local_180" identifier + identifier) , identifier ))) ;) (if_statement "if (!bVar5) goto LAB_00102d61;" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (goto_statement "goto LAB_00102d61;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) }))) (expression_statement "iVar10 = iVar10 + iVar11;" (assignment_expression "iVar10 = iVar10 + iVar11" identifier = (binary_expression "iVar10 + iVar11" identifier + identifier)) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) (labeled_statement "LAB_0010284e:\n  if (bVar3) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" statement_identifier : (if_statement "if (bVar3) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" { (labeled_statement "LAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" statement_identifier : (if_statement "if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n      local_194 = local_188;\n      if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }\n    }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (!bVar5) {\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (compound_statement "{\nLAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar13;\n        if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }\n      }" { (labeled_statement "LAB_00102ec2:\n        iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);" statement_identifier : (expression_statement "iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188);" (assignment_expression "iVar13 = sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2(iVar8,0xf,0,0,0,0,0,local_168,1,local_188)" identifier (argument_list "(iVar8,0xf,0,0,0,0,0,local_168,1,local_188)" ( identifier , number_literal , number_literal , number_literal , number_literal , number_literal , number_literal , identifier , number_literal , identifier )))) ;)) (labeled_statement "LAB_00102f58:\n        local_194 = iVar13;" statement_identifier : (expression_statement "local_194 = iVar13;" (assignment_expression "local_194 = iVar13" identifier = identifier) ;)) (if_statement "if (iVar13 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }" if (parenthesized_expression "(iVar13 != 0)" ( (binary_expression "iVar13 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);\n          pr2serr("Write buffer failed: %s\n",ebuff);\n          local_194 = iVar13;\n        }" { (labeled_statement "LAB_00102f66:\n          sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);" statement_identifier : (expression_statement "sg_get_category_sense_str(iVar13,0x50,ebuff,local_188);" (call_expression "sg_get_category_sense_str(iVar13,0x50,ebuff,local_188)" identifier (argument_list "(iVar13,0x50,ebuff,local_188)" ( identifier , number_literal , identifier , identifier ))) ;)) (expression_statement "pr2serr("Write buffer failed: %s\n",ebuff);" (call_expression "pr2serr("Write buffer failed: %s\n",ebuff)" identifier (argument_list "("Write buffer failed: %s\n",ebuff)" ( (string_literal ""Write buffer failed: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "local_194 = iVar13;" (assignment_expression "local_194 = iVar13" identifier = identifier) ;) })) })) }) (else_clause "else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" else (compound_statement "{\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar5) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" { (expression_statement "pr2serr("sending Activate deferred microcode [0xf]\n");" (call_expression "pr2serr("sending Activate deferred microcode [0xf]\n")" identifier (argument_list "("sending Activate deferred microcode [0xf]\n")" ( (string_literal ""sending Activate deferred microcode [0xf]\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (!bVar5) goto LAB_00102ec2;" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (goto_statement "goto LAB_00102ec2;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) })))) }))) (labeled_statement "LAB_00102859:\n  if (free_dop == (uint8_t *)0x0) {\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }" statement_identifier : (if_statement "if (free_dop == (uint8_t *)0x0) {\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }" if (parenthesized_expression "(free_dop == (uint8_t *)0x0)" ( (binary_expression "free_dop == (uint8_t *)0x0" identifier == (cast_expression "(uint8_t *)0x0" ( (type_descriptor "uint8_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);\n    if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }\n  }" { (labeled_statement "LAB_00102e47:\n    iVar8 = sg_cmds_close_device(iVar8);" statement_identifier : (expression_statement "iVar8 = sg_cmds_close_device(iVar8);" (assignment_expression "iVar8 = sg_cmds_close_device(iVar8)" identifier = (call_expression "sg_cmds_close_device(iVar8)" identifier (argument_list "(iVar8)" ( identifier )))) ;)) (if_statement "if (iVar8 < 0) {\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }" if (parenthesized_expression "(iVar8 < 0)" ( (binary_expression "iVar8 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar18 = safe_strerror(-iVar8);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }\n    }" { (expression_statement "uVar18 = safe_strerror(-iVar8);" (assignment_expression "uVar18 = safe_strerror(-iVar8)" identifier = (call_expression "safe_strerror(-iVar8)" identifier (argument_list "(-iVar8)" ( (unary_expression "-iVar8" - identifier) )))) ;) (expression_statement "pr2serr("close error: %s\n",uVar18);" (call_expression "pr2serr("close error: %s\n",uVar18)" identifier (argument_list "("close error: %s\n",uVar18)" ( (string_literal ""close error: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar8);\n      }" if (parenthesized_expression "(local_194 == 0)" ( (binary_expression "local_194 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = sg_convert_errno(-iVar8);\n      }" { (expression_statement "local_194 = sg_convert_errno(-iVar8);" (assignment_expression "local_194 = sg_convert_errno(-iVar8)" identifier = (call_expression "sg_convert_errno(-iVar8)" identifier (argument_list "(-iVar8)" ( (unary_expression "-iVar8" - identifier) )))) ;) })) })) }) (else_clause "else {\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }" else (compound_statement "{\nLAB_00102867:\n    free(free_dop);\n    if (-1 < iVar8) goto LAB_00102e47;\n  }" { (labeled_statement "LAB_00102867:\n    free(free_dop);" statement_identifier : (expression_statement "free(free_dop);" (call_expression "free(free_dop)" identifier (argument_list "(free_dop)" ( identifier ))) ;)) (if_statement "if (-1 < iVar8) goto LAB_00102e47;" if (parenthesized_expression "(-1 < iVar8)" ( (binary_expression "-1 < iVar8" number_literal < identifier) )) (goto_statement "goto LAB_00102e47;" goto statement_identifier ;)) })))) (if_statement "if (local_188 == 0) {\nLAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" { (labeled_statement "LAB_00102a18:\n    cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" statement_identifier : (expression_statement "cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" (assignment_expression "cVar7 = sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier = (call_expression "sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier (argument_list "("sg_write_buffer failed: ",local_194)" ( (string_literal ""sg_write_buffer failed: "" " string_content ") , identifier )))) ;)) (if_statement "if (cVar7 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" if (parenthesized_expression "(cVar7 == '\0')" ( (binary_expression "cVar7 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" { (expression_statement "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");" (call_expression "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" identifier (argument_list "("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" ( (string_literal ""Some error occurred, try again with \'-v\' or \'-vv\' for more information\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) })) })) (labeled_statement "LAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }" statement_identifier : (if_statement "if (local_194 < 0) {\n    local_194 = 99;\n  }" if (parenthesized_expression "(local_194 < 0)" ( (binary_expression "local_194 < 0" identifier < number_literal) )) (compound_statement "{\n    local_194 = 99;\n  }" { (expression_statement "local_194 = 99;" (assignment_expression "local_194 = 99" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "switchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);" statement_identifier : (expression_statement "local_168 = sg_get_num(optarg);" (assignment_expression "local_168 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;)) (if_statement "if (local_168 < 0) goto code_r0x00102669;" if (parenthesized_expression "(local_168 < 0)" ( (binary_expression "local_168 < 0" identifier < number_literal) )) (goto_statement "goto code_r0x00102669;" goto statement_identifier ;)) (goto_statement "goto LAB_001023de;" goto statement_identifier ;) (labeled_statement "code_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");" statement_identifier : (expression_statement "pr2serr("Invalid argument to \'--timeout\'\n");" (call_expression "pr2serr("Invalid argument to \'--timeout\'\n")" identifier (argument_list "("Invalid argument to \'--timeout\'\n")" ( (string_literal ""Invalid argument to \'--timeout\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;)) (labeled_statement "LAB_001026af:\n  local_194 = 1;" statement_identifier : (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_001026b7:\n  if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }" statement_identifier : (if_statement "if (lVar1 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\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    return local_194;\n  }" { (return_statement "return local_194;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00102330(int param_1,long param_2)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "int FUN_00102330(int param_1,long param_2)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_00102330(int param_1,long param_2)" identifier (parameter_list "(int param_1,long param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "bool bVar5;" primitive_type identifier ;) (declaration "char cVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "int iVar11;" primitive_type identifier ;) (declaration "int iVar12;" primitive_type identifier ;) (declaration "char *pcVar13;" primitive_type (pointer_declarator "*pcVar13" * identifier) ;) (declaration "ushort **ppuVar14;" type_identifier (pointer_declarator "**ppuVar14" * (pointer_declarator "*ppuVar14" * identifier)) ;) (declaration "ulong uVar15;" type_identifier identifier ;) (declaration "__off64_t _Var16;" type_identifier identifier ;) (declaration "int *piVar17;" primitive_type (pointer_declarator "*piVar17" * identifier) ;) (declaration "undefined8 uVar18;" type_identifier identifier ;) (declaration "long lVar19;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *pcVar20;" primitive_type (pointer_declarator "*pcVar20" * identifier) ;) (declaration "ulong uVar21;" type_identifier identifier ;) (declaration "undefined **ppuVar22;" type_identifier (pointer_declarator "**ppuVar22" * (pointer_declarator "*ppuVar22" * identifier)) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte bVar23;" type_identifier identifier ;) (declaration "int local_194;" primitive_type identifier ;) (declaration "char *local_190;" primitive_type (pointer_declarator "*local_190" * identifier) ;) (declaration "int local_188;" primitive_type identifier ;) (declaration "uint local_184;" type_identifier identifier ;) (declaration "int local_180;" primitive_type identifier ;) (declaration "uint local_17c;" type_identifier identifier ;) (declaration "void *local_178;" primitive_type (pointer_declarator "*local_178" * identifier) ;) (declaration "int local_170;" primitive_type identifier ;) (declaration "int local_16c;" primitive_type identifier ;) (declaration "int local_168;" primitive_type identifier ;) (declaration "int local_164;" primitive_type identifier ;) (declaration "undefined4 local_154;" type_identifier identifier ;) (declaration "void *local_150;" primitive_type (pointer_declarator "*local_150" * identifier) ;) (declaration "char local_148 [264];" primitive_type (array_declarator "local_148 [264]" identifier [ number_literal ]) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "bVar23 = 0;" (assignment_expression "bVar23 = 0" identifier = number_literal) ;) (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_150 = (void *)0x0;" (assignment_expression "local_150 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_190 = (char *)0x0;" (assignment_expression "local_190 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_17c = 0;" (assignment_expression "local_17c = 0" identifier = number_literal) ;) (expression_statement "local_168 = 300;" (assignment_expression "local_168 = 300" identifier = number_literal) ;) (expression_statement "local_164 = 0;" (assignment_expression "local_164 = 0" identifier = number_literal) ;) (expression_statement "local_180 = 0;" (assignment_expression "local_180 = 0" identifier = number_literal) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (expression_statement "local_170 = 0;" (assignment_expression "local_170 = 0" identifier = number_literal) ;) (expression_statement "local_184 = 0;" (assignment_expression "local_184 = 0" identifier = number_literal) ;) (expression_statement "local_188 = 0;" (assignment_expression "local_188 = 0" identifier = number_literal) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) (expression_statement "local_16c = 0;" (assignment_expression "local_16c = 0" identifier = number_literal) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" identifier = false) ;) (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" identifier = false) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (labeled_statement "LAB_001023de:\n  local_154 = 0;" statement_identifier : (expression_statement "local_154 = 0;" (assignment_expression "local_154 = 0" identifier = number_literal) ;)) (expression_statement "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);" (assignment_expression "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" identifier = (call_expression "getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" identifier (argument_list "(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" ( identifier , identifier , (string_literal ""b:dhi:I:l:m:o:rs:S:t:vV"" " string_content ") , (pointer_expression "&PTR_DAT_001071a0" & identifier) , (pointer_expression "&local_154" & identifier) )))) ;) (if_statement "if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" if (parenthesized_expression "(iVar7 == -1)" ( (binary_expression "iVar7 == -1" identifier == number_literal) )) (compound_statement "{\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" { (if_statement "if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" if (parenthesized_expression "(local_194 != 0)" ( (binary_expression "local_194 != 0" identifier != number_literal) )) (compound_statement "{\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" { (if_statement "if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" if (parenthesized_expression "(local_194 < 2)" ( (binary_expression "local_194 < 2" identifier < number_literal) )) (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" else (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" { (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }" if (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) (compound_statement "{\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }" { (expression_statement "lVar19 = *(long *)(param_2 + (long)optind * 8);" (assignment_expression "lVar19 = *(long *)(param_2 + (long)optind * 8)" identifier = (pointer_expression "*(long *)(param_2 + (long)optind * 8)" * (cast_expression "(long *)(param_2 + (long)optind * 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) ))))) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) (if_statement "if (optind < param_1) goto LAB_0010272c;" if (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) (goto_statement "goto LAB_0010272c;" goto statement_identifier ;)) }) (else_clause "else {\n      lVar19 = 0;\n    }" else (compound_statement "{\n      lVar19 = 0;\n    }" { (expression_statement "lVar19 = 0;" (assignment_expression "lVar19 = 0" identifier = number_literal) ;) }))) (if_statement "if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "((bVar1) && (bVar5))" ( (binary_expression "(bVar1) && (bVar5)" (parenthesized_expression "(bVar1)" ( identifier )) && (parenthesized_expression "(bVar5)" ( identifier ))) )) (compound_statement "{\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }" { (expression_statement "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");" (call_expression "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n")" identifier (argument_list "("Not in DEBUG mode, so \'-vV\' has no special action\n")" ( (string_literal ""Not in DEBUG mode, so \'-vV\' has no special action\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) }) (else_clause "else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" else (if_statement "if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" if (parenthesized_expression "(!bVar5)" ( (unary_expression "!bVar5" ! identifier) )) (compound_statement "{\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" { (if_statement "if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" if (parenthesized_expression "(lVar19 == 0)" ( (binary_expression "lVar19 == 0" identifier == number_literal) )) (compound_statement "{\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" { (expression_statement "pr2serr("Missing device name!\n\n");" (call_expression "pr2serr("Missing device name!\n\n")" identifier (argument_list "("Missing device name!\n\n")" ( (string_literal ""Missing device name!\n\n"" " string_content escape_sequence escape_sequence ") ))) ;) (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" identifier (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (if_statement "if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" if (parenthesized_expression "((local_170 < local_16c) && (0 < local_170))" ( (binary_expression "(local_170 < local_16c) && (0 < local_170)" (parenthesized_expression "(local_170 < local_16c)" ( (binary_expression "local_170 < local_16c" identifier < identifier) )) && (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) ))) )) (compound_statement "{\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" { (expression_statement "pr2serr("trim chunk size (CS) to be the same as LEN\n");" (call_expression "pr2serr("trim chunk size (CS) to be the same as LEN\n")" identifier (argument_list "("trim chunk size (CS) to be the same as LEN\n")" ( (string_literal ""trim chunk size (CS) to be the same as LEN\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" identifier = (call_expression "sg_cmds_open_device(lVar19,0,local_188)" identifier (argument_list "(lVar19,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar7 < 0) goto LAB_001029f5;" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (goto_statement "goto LAB_001029f5;" goto statement_identifier ;)) (expression_statement "local_16c = local_170;" (assignment_expression "local_16c = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" statement_identifier : (expression_statement "local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" (assignment_expression "local_178 = (void *)sg_memalign(local_170,0,&local_150,0)" identifier = (cast_expression "(void *)sg_memalign(local_170,0,&local_150,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "sg_memalign(local_170,0,&local_150,0)" identifier (argument_list "(local_170,0,&local_150,0)" ( identifier , number_literal , (pointer_expression "&local_150" & identifier) , number_literal ))))) ;)) (if_statement "if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(local_178 == (void *)0x0)" ( (binary_expression "local_178 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("sg_write_buffer: out of memory\n");" (call_expression "pr2serr("sg_write_buffer: out of memory\n")" identifier (argument_list "("sg_write_buffer: out of memory\n")" ( (string_literal ""sg_write_buffer: out of memory\n"" " string_content escape_sequence ") ))) ;) (expression_statement "local_194 = sg_convert_errno(0xc);" (assignment_expression "local_194 = sg_convert_errno(0xc)" identifier = (call_expression "sg_convert_errno(0xc)" identifier (argument_list "(0xc)" ( number_literal )))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "__n = (size_t)local_170;" (assignment_expression "__n = (size_t)local_170" identifier = (cast_expression "(size_t)local_170" ( (type_descriptor "size_t" primitive_type) ) identifier)) ;) (expression_statement "memset(local_178,0xff,__n);" (call_expression "memset(local_178,0xff,__n)" identifier (argument_list "(local_178,0xff,__n)" ( identifier , number_literal , identifier ))) ;) (if_statement "if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" if (parenthesized_expression "(local_190 == (char *)0x0)" ( (binary_expression "local_190 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }" { (labeled_statement "LAB_001029c2:\n          iVar11 = local_170;" statement_identifier : (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;)) (if_statement "if (local_16c < 1) goto LAB_00102f05;" if (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) (goto_statement "goto LAB_00102f05;" goto statement_identifier ;)) }) (else_clause "else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" else (compound_statement "{\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" { (expression_statement "iVar9 = strcmp(local_190,"-");" (assignment_expression "iVar9 = strcmp(local_190,"-")" identifier = (call_expression "strcmp(local_190,"-")" identifier (argument_list "(local_190,"-")" ( identifier , (string_literal ""-"" " string_content ") )))) ;) (if_statement "if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (compound_statement "{\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" { (if_statement "if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" if (parenthesized_expression "(local_164 < 1)" ( (binary_expression "local_164 < 1" identifier < number_literal) )) (compound_statement "{\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }" { (expression_statement "uVar15 = read(0,local_178,__n);" (assignment_expression "uVar15 = read(0,local_178,__n)" identifier = (call_expression "read(0,local_178,__n)" identifier (argument_list "(0,local_178,__n)" ( number_literal , identifier , identifier )))) ;) (if_statement "if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" if (parenthesized_expression "(-1 < (int)uVar15)" ( (binary_expression "-1 < (int)uVar15" number_literal < (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" { (if_statement "if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" if (parenthesized_expression "((int)uVar15 < local_170)" ( (binary_expression "(int)uVar15 < local_170" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102c57;" goto statement_identifier ;) })) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) }) (else_clause "else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" else (compound_statement "{\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" { (expression_statement "pr2serr("Can\'t skip on stdin\n");" (call_expression "pr2serr("Can\'t skip on stdin\n")" identifier (argument_list "("Can\'t skip on stdin\n")" ( (string_literal ""Can\'t skip on stdin\n"" " string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 0xf;" (assignment_expression "local_194 = 0xf" identifier = number_literal) ;) }))) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar10 = open64(local_190,0);" (assignment_expression "iVar10 = open64(local_190,0)" identifier = (call_expression "open64(local_190,0)" identifier (argument_list "(local_190,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "(iVar10 < 0)" ( (binary_expression "iVar10 < 0" identifier < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: could not open %s for reading"" " string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar11 = sg_set_binary_mode(iVar10);" (assignment_expression "iVar11 = sg_set_binary_mode(iVar10)" identifier = (call_expression "sg_set_binary_mode(iVar10)" identifier (argument_list "(iVar10)" ( identifier )))) ;) (if_statement "if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }" if (parenthesized_expression "(iVar11 < 0)" ( (binary_expression "iVar11 < 0" identifier < number_literal) )) (compound_statement "{\n            perror("sg_set_binary_mode");\n          }" { (expression_statement "perror("sg_set_binary_mode");" (call_expression "perror("sg_set_binary_mode")" identifier (argument_list "("sg_set_binary_mode")" ( (string_literal ""sg_set_binary_mode"" " string_content ") ))) ;) })) (if_statement "if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0))" ( (binary_expression "(0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" (parenthesized_expression "(0 < local_164)" ( (binary_expression "0 < local_164" number_literal < identifier) )) && (parenthesized_expression "(_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" ( (comma_expression "_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0" (assignment_expression "_Var16 = lseek64(iVar10,(long)local_164,0)" identifier = (call_expression "lseek64(iVar10,(long)local_164,0)" identifier (argument_list "(iVar10,(long)local_164,0)" ( identifier , (cast_expression "(long)local_164" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) , number_literal )))) , (binary_expression "_Var16 < 0" identifier < number_literal)) ))) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" identifier (argument_list "(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t skip to required position on %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "uVar15 = read(iVar10,local_178,__n);" (assignment_expression "uVar15 = read(iVar10,local_178,__n)" identifier = (call_expression "read(iVar10,local_178,__n)" identifier (argument_list "(iVar10,local_178,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" if (parenthesized_expression "((int)uVar15 < 0)" ( (binary_expression "(int)uVar15 < 0" (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" { (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" identifier = (call_expression "sg_convert_errno(*piVar17)" identifier (argument_list "(*piVar17)" ( (pointer_expression "*piVar17" * identifier) )))) ;) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" identifier (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""sg_write_buffer: couldn\'t read from %s"" " string_content escape_sequence string_content ") , identifier ))) ;) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" identifier (argument_list "(local_148)" ( identifier ))) ;) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;) (if_statement "if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" if (parenthesized_expression "(local_170 <= (int)uVar15)" ( (binary_expression "local_170 <= (int)uVar15" identifier <= (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" { (labeled_statement "LAB_00102b35:\n            close(iVar10);" statement_identifier : (expression_statement "close(iVar10);" (call_expression "close(iVar10)" identifier (argument_list "(iVar10)" ( identifier ))) ;)) (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" identifier = identifier) ;) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;) })) (labeled_statement "LAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;" statement_identifier : (expression_statement "uVar21 = uVar15 & 0xffffffff;" (assignment_expression "uVar21 = uVar15 & 0xffffffff" identifier = (binary_expression "uVar15 & 0xffffffff" identifier & number_literal)) ;)) (expression_statement "iVar11 = (int)uVar15;" (assignment_expression "iVar11 = (int)uVar15" identifier = (cast_expression "(int)uVar15" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" { (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("pad with 0xff bytes and continue\n");" (call_expression "pr2serr("pad with 0xff bytes and continue\n")" identifier (argument_list "("pad with 0xff bytes and continue\n")" ( (string_literal ""pad with 0xff bytes and continue\n"" " string_content escape_sequence ") ))) ;) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" identifier = identifier) ;) (labeled_statement "LAB_00102c65:\n            local_170 = iVar11;" statement_identifier : (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" identifier = identifier) ;)) (if_statement "if (iVar9 == 0) goto LAB_001029c2;" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (goto_statement "goto LAB_001029c2;" goto statement_identifier ;)) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;) })) (if_statement "if (local_188 == 0) goto LAB_00102c65;" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;)) (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" identifier (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" ( (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" " string_content escape_sequence ") , identifier , identifier , identifier ))) ;) (expression_statement "pr2serr("will write %d bytes",uVar21);" (call_expression "pr2serr("will write %d bytes",uVar21)" identifier (argument_list "("will write %d bytes",uVar21)" ( (string_literal ""will write %d bytes"" " string_content ") , identifier ))) ;) (if_statement "if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" if (parenthesized_expression "((local_16c < 1) || (local_170 <= local_16c))" ( (binary_expression "(local_16c < 1) || (local_170 <= local_16c)" (parenthesized_expression "(local_16c < 1)" ( (binary_expression "local_16c < 1" identifier < number_literal) )) || (parenthesized_expression "(local_170 <= local_16c)" ( (binary_expression "local_170 <= local_16c" identifier <= identifier) ))) )) (compound_statement "{\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" { (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" identifier (argument_list "("\n")" ( (string_literal ""\n"" " escape_sequence ") ))) ;) (goto_statement "goto LAB_00102c65;" goto statement_identifier ;) })) (expression_statement "pr2serr(", %d bytes per WRITE BUFFER command\n");" (call_expression "pr2serr(", %d bytes per WRITE BUFFER command\n")" identifier (argument_list "(", %d bytes per WRITE BUFFER command\n")" ( (string_literal "", %d bytes per WRITE BUFFER command\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (iVar9 != 0) goto LAB_00102b35;" if (parenthesized_expression "(iVar9 != 0)" ( (binary_expression "iVar9 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00102b35;" goto statement_identifier ;)) }))) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) })) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" identifier = (call_expression "sg_cmds_open_device(lVar19,0,local_188)" identifier (argument_list "(lVar19,0,local_188)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" { (labeled_statement "LAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" statement_identifier : (if_statement "if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" { (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (if_statement "if (local_150 == (void *)0x0) goto LAB_00102a18;" if (parenthesized_expression "(local_150 == (void *)0x0)" ( (binary_expression "local_150 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102a18;" goto statement_identifier ;)) (goto_statement "goto LAB_00102867;" goto statement_identifier ;) }))) (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" identifier = (call_expression "safe_strerror(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (expression_statement "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);" (call_expression "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" identifier (argument_list "("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" ( (string_literal ""sg_write_buffer: open error: %s: %s\n"" " string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (if_statement "if (local_150 != (void *)0x0) goto LAB_00102867;" if (parenthesized_expression "(local_150 != (void *)0x0)" ( (binary_expression "local_150 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00102867;" goto statement_identifier ;)) (goto_statement "goto LAB_00102880;" goto statement_identifier ;) })) (if_statement "if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" if (parenthesized_expression "((0 < local_170) || (local_190 != (char *)0x0))" ( (binary_expression "(0 < local_170) || (local_190 != (char *)0x0)" (parenthesized_expression "(0 < local_170)" ( (binary_expression "0 < local_170" number_literal < identifier) )) || (parenthesized_expression "(local_190 != (char *)0x0)" ( (binary_expression "local_190 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" { (if_statement "if (local_170 == 0) {\n          local_170 = 0x800000;\n        }" if (parenthesized_expression "(local_170 == 0)" ( (binary_expression "local_170 == 0" identifier == number_literal) )) (compound_statement "{\n          local_170 = 0x800000;\n        }" { (expression_statement "local_170 = 0x800000;" (assignment_expression "local_170 = 0x800000" identifier = number_literal) ;) })) (goto_statement "goto LAB_00102933;" goto statement_identifier ;) })) (if_statement "if (0 < local_16c) goto LAB_0010284e;" if (parenthesized_expression "(0 < local_16c)" ( (binary_expression "0 < local_16c" number_literal < identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;)) (expression_statement "local_178 = (void *)0x0;" (assignment_expression "local_178 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" statement_identifier : (if_statement "if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (bVar4) goto LAB_00102859;" if (parenthesized_expression "(bVar4)" ( identifier )) (goto_statement "goto LAB_00102859;" goto statement_identifier ;)) }) (else_clause "else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" else (compound_statement "{\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" { (expression_statement "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);" (call_expression "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" identifier (argument_list "("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" ( (string_literal ""sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" { (expression_statement "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(all in one) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_00102859;" goto statement_identifier ;) })) })))) (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" identifier (argument_list "(iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier , identifier , number_literal , identifier )))) ;) (goto_statement "goto LAB_00102f58;" goto statement_identifier ;) })))) (expression_statement "pr2serr("version: %s\n","1.28 20180628");" (call_expression "pr2serr("version: %s\n","1.28 20180628")" identifier (argument_list "("version: %s\n","1.28 20180628")" ( (string_literal ""version: %s\n"" " string_content escape_sequence ") , (string_literal ""1.28 20180628"" " string_content ") ))) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) })) (switch_statement "switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" switch (parenthesized_expression "(iVar7)" ( identifier )) (compound_statement "{\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" { (case_statement "case 0x3f:" case number_literal :) (case_statement "case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_194 = local_194 + 1;" (assignment_expression "local_194 = local_194 + 1" identifier = (binary_expression "local_194 + 1" identifier + number_literal)) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;" default : (expression_statement "pr2serr("unrecognised option code 0x%x ??\n",iVar7);" (call_expression "pr2serr("unrecognised option code 0x%x ??\n",iVar7)" identifier (argument_list "("unrecognised option code 0x%x ??\n",iVar7)" ( (string_literal ""unrecognised option code 0x%x ??\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );" (call_expression "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" identifier (argument_list "(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;)) (case_statement "case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = optarg;" (assignment_expression "local_190 = optarg" identifier = identifier) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_17c = sg_get_num(optarg);" (assignment_expression "local_17c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(7 < local_17c)" ( (binary_expression "7 < local_17c" number_literal < identifier) )) (compound_statement "{\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("expected argument to \'--specific\' to be 0 to 7\n");" (call_expression "pr2serr("expected argument to \'--specific\' to be 0 to 7\n")" identifier (argument_list "("expected argument to \'--specific\' to be 0 to 7\n")" ( (string_literal ""expected argument to \'--specific\' to be 0 to 7\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_16c = sg_get_num(optarg);" (assignment_expression "local_16c = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_16c < 0)" ( (binary_expression "local_16c < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--bpw\' should be in a positive number\n");" (call_expression "pr2serr("argument to \'--bpw\' should be in a positive number\n")" identifier (argument_list "("argument to \'--bpw\' should be in a positive number\n")" ( (string_literal ""argument to \'--bpw\' should be in a positive number\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "pcVar13 = strchr(optarg,0x2c);" (assignment_expression "pcVar13 = strchr(optarg,0x2c)" identifier = (call_expression "strchr(optarg,0x2c)" identifier (argument_list "(optarg,0x2c)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" if (parenthesized_expression "(pcVar13 != (char *)0x0)" ( (binary_expression "pcVar13 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" { (expression_statement "iVar7 = strncmp("act",pcVar13 + 1,3);" (assignment_expression "iVar7 = strncmp("act",pcVar13 + 1,3)" identifier = (call_expression "strncmp("act",pcVar13 + 1,3)" identifier (argument_list "("act",pcVar13 + 1,3)" ( (string_literal ""act"" " string_content ") , (binary_expression "pcVar13 + 1" identifier + number_literal) , number_literal )))) ;) (if_statement "if (iVar7 == 0) {\n        bVar2 = true;\n      }" if (parenthesized_expression "(iVar7 == 0)" ( (binary_expression "iVar7 == 0" identifier == number_literal) )) (compound_statement "{\n        bVar2 = true;\n      }" { (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) })) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 100:\n    bVar4 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_184 = sg_get_num(optarg);" (assignment_expression "local_184 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(0xff < local_184)" ( (binary_expression "0xff < local_184" number_literal < identifier) )) (compound_statement "{\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("argument to \'--id\' should be in the range 0 to 255\n");" (call_expression "pr2serr("argument to \'--id\' should be in the range 0 to 255\n")" identifier (argument_list "("argument to \'--id\' should be in the range 0 to 255\n")" ( (string_literal ""argument to \'--id\' should be in the range 0 to 255\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_170 = sg_get_num(optarg);" (assignment_expression "local_170 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_170 < 0)" ( (binary_expression "local_170 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--length\'\n");" (call_expression "pr2serr("bad argument to \'--length\'\n")" identifier (argument_list "("bad argument to \'--length\'\n")" ( (string_literal ""bad argument to \'--length\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "ppuVar14 = __ctype_b_loc();" (assignment_expression "ppuVar14 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar13 = optarg;" (assignment_expression "pcVar13 = optarg" identifier = identifier) ;) (if_statement "if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" if (parenthesized_expression "((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0)" ( (binary_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0" (parenthesized_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8)" ( (binary_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8" (pointer_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" * (cast_expression "(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)*ppuVar14 + (long)*optarg * 2 + 1)" ( (binary_expression "(long)*ppuVar14 + (long)*optarg * 2 + 1" (binary_expression "(long)*ppuVar14 + (long)*optarg * 2" (cast_expression "(long)*ppuVar14" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*ppuVar14" * identifier)) + (binary_expression "(long)*optarg * 2" (cast_expression "(long)*optarg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*optarg" * identifier)) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }" { (expression_statement "lVar19 = -1;" (assignment_expression "lVar19 = -1" identifier = number_literal) ;) (expression_statement "pcVar20 = optarg;" (assignment_expression "pcVar20 = optarg" identifier = identifier) ;) (do_statement "do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');" do (compound_statement "{\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      }" { (if_statement "if (lVar19 == 0) break;" if (parenthesized_expression "(lVar19 == 0)" ( (binary_expression "lVar19 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "lVar19 = lVar19 + -1;" (assignment_expression "lVar19 = lVar19 + -1" identifier = (binary_expression "lVar19 + -1" identifier + number_literal)) ;) (expression_statement "cVar6 = *pcVar20;" (assignment_expression "cVar6 = *pcVar20" identifier = (pointer_expression "*pcVar20" * identifier)) ;) (expression_statement "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;" (assignment_expression "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1" identifier = (binary_expression "pcVar20 + (ulong)bVar23 * -2 + 1" (binary_expression "pcVar20 + (ulong)bVar23 * -2" identifier + (binary_expression "(ulong)bVar23 * -2" (cast_expression "(ulong)bVar23" ( (type_descriptor "ulong" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) }) while (parenthesized_expression "(cVar6 != '\0')" ( (binary_expression "cVar6 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) ;) (if_statement "if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(PTR_DAT_00107020 == (undefined *)0x0)" ( (binary_expression "PTR_DAT_00107020 == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" { (labeled_statement "LAB_001025b2:\n        FUN_001022c5();" statement_identifier : (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" identifier (argument_list "()" ( ))) ;)) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (expression_statement "ppuVar22 = &PTR_DAT_00107020;" (assignment_expression "ppuVar22 = &PTR_DAT_00107020" identifier = (pointer_expression "&PTR_DAT_00107020" & identifier)) ;) (expression_statement "pcVar20 = PTR_DAT_00107020;" (assignment_expression "pcVar20 = PTR_DAT_00107020" identifier = identifier) ;) (while_statement "while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" while (parenthesized_expression "(iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0)" ( (comma_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0" (assignment_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" identifier = (call_expression "strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" identifier (argument_list "(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" ( identifier , identifier , (cast_expression "(long)(int)(~(uint)lVar19 - 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)(~(uint)lVar19 - 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(~(uint)lVar19 - 1)" ( (binary_expression "~(uint)lVar19 - 1" (unary_expression "~(uint)lVar19" ~ (cast_expression "(uint)lVar19" ( (type_descriptor "uint" type_identifier) ) identifier)) - number_literal) )))) )))) , (binary_expression "iVar7 != 0" identifier != number_literal)) )) (compound_statement "{\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" { (expression_statement "ppuVar22 = ppuVar22 + 3;" (assignment_expression "ppuVar22 = ppuVar22 + 3" identifier = (binary_expression "ppuVar22 + 3" identifier + number_literal)) ;) (expression_statement "pcVar20 = *ppuVar22;" (assignment_expression "pcVar20 = *ppuVar22" identifier = (pointer_expression "*ppuVar22" * identifier)) ;) (if_statement "if (pcVar20 == (char *)0x0) goto LAB_001025b2;" if (parenthesized_expression "(pcVar20 == (char *)0x0)" ( (binary_expression "pcVar20 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_001025b2;" goto statement_identifier ;)) })) (expression_statement "uVar8 = *(uint *)(ppuVar22 + 1);" (assignment_expression "uVar8 = *(uint *)(ppuVar22 + 1)" identifier = (pointer_expression "*(uint *)(ppuVar22 + 1)" * (cast_expression "(uint *)(ppuVar22 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ppuVar22 + 1)" ( (binary_expression "ppuVar22 + 1" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" else (compound_statement "{\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" { (expression_statement "uVar8 = sg_get_num(optarg);" (assignment_expression "uVar8 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" if (parenthesized_expression "(0x1f < uVar8)" ( (binary_expression "0x1f < uVar8" number_literal < identifier) )) (compound_statement "{\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" { (expression_statement "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");" (call_expression "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n")" identifier (argument_list "("argument to \'--mode\' should be in the range 0 to 31\n")" ( (string_literal ""argument to \'--mode\' should be in the range 0 to 31\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) }))) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_180 = sg_get_num(optarg);" (assignment_expression "local_180 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_180 < 0)" ( (binary_expression "local_180 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--offset\'\n");" (call_expression "pr2serr("bad argument to \'--offset\'\n")" identifier (argument_list "("bad argument to \'--offset\'\n")" ( (string_literal ""bad argument to \'--offset\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;" case number_literal : (expression_statement "local_190 = "-";" (assignment_expression "local_190 = "-"" identifier = (string_literal ""-"" " string_content ")) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" case number_literal : (expression_statement "local_164 = sg_get_num(optarg);" (assignment_expression "local_164 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;) (if_statement "if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" if (parenthesized_expression "(local_164 < 0)" ( (binary_expression "local_164 < 0" identifier < number_literal) )) (compound_statement "{\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" { (expression_statement "pr2serr("bad argument to \'--skip\'\n");" (call_expression "pr2serr("bad argument to \'--skip\'\n")" identifier (argument_list "("bad argument to \'--skip\'\n")" ( (string_literal ""bad argument to \'--skip\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement "goto LAB_001026af;" goto statement_identifier ;) })) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) (case_statement "case 0x74:\n    goto switchD_0010241f_caseD_74;" case number_literal : (goto_statement "goto switchD_0010241f_caseD_74;" goto statement_identifier ;)) (case_statement "case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;" case number_literal : (expression_statement "local_188 = local_188 + 1;" (assignment_expression "local_188 = local_188 + 1" identifier = (binary_expression "local_188 + 1" identifier + number_literal)) ;) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" identifier = true) ;) (goto_statement "goto LAB_001023de;" goto statement_identifier ;)) })) (labeled_statement "LAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" statement_identifier : (do_statement "do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" do (compound_statement "{\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  }" { (expression_statement "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));" (call_expression "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" identifier (argument_list "("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" ( (string_literal ""Unexpected extra argument: %s\n"" " string_content escape_sequence ") , (pointer_expression "*(undefined8 *)(param_2 + (long)optind * 8)" * (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + (long)optind * 8)" ( (binary_expression "param_2 + (long)optind * 8" identifier + (binary_expression "(long)optind * 8" (cast_expression "(long)optind" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) )))) ))) ;) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" identifier = (binary_expression "optind + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(optind < param_1)" ( (binary_expression "optind < param_1" identifier < identifier) )) ;)) (expression_statement "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );" (call_expression "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" identifier (argument_list "(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" ( (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "LAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;" statement_identifier : (if_statement "if (iVar11 <= iVar9) goto LAB_0010284e;" if (parenthesized_expression "(iVar11 <= iVar9)" ( (binary_expression "iVar11 <= iVar9" identifier <= identifier) )) (goto_statement "goto LAB_0010284e;" goto statement_identifier ;))) (expression_statement "iVar10 = iVar11 - iVar9;" (assignment_expression "iVar10 = iVar11 - iVar9" identifier = (binary_expression "iVar11 - iVar9" identifier - identifier)) ;) (if_statement "if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }" if (parenthesized_expression "(local_16c < iVar11 - iVar9)" ( (binary_expression "local_16c < iVar11 - iVar9" identifier < (binary_expression "iVar11 - iVar9" identifier - identifier)) )) (compound_statement "{\n    iVar10 = local_16c;\n  }" { (expression_statement "iVar10 = local_16c;" (assignment_expression "iVar10 = local_16c" identifier = identifier) ;) })) (if_statement "if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }" { (if_statement "if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (compound_statement "{\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" { (labeled_statement "LAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" statement_identifier : (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" identifier (argument_list "(iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" ( identifier , identifier , identifier , identifier , (binary_expression "iVar9 + local_180" identifier + identifier) , (binary_expression "(long)local_178 + (long)iVar9" (cast_expression "(long)local_178" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (cast_expression "(long)iVar9" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) , identifier , identifier , number_literal , identifier )))) ;)) (if_statement "if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" if (parenthesized_expression "(iVar12 != 0)" ( (binary_expression "iVar12 != 0" identifier != number_literal) )) (compound_statement "{\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" { (if_statement "if (bVar2) goto LAB_00102ea4;" if (parenthesized_expression "(bVar2)" ( identifier )) (goto_statement "goto LAB_00102ea4;" goto statement_identifier ;)) (goto_statement "goto LAB_00102f66;" goto statement_identifier ;) })) })) }) (else_clause "else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" else (compound_statement "{\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" { (expression_statement "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);" (call_expression "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" identifier (argument_list "("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" ( (string_literal ""sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n"" " string_content escape_sequence ") , identifier , identifier , identifier , (binary_expression "iVar9 + local_180" identifier + identifier) , identifier ))) ;) (if_statement "if (!bVar4) goto LAB_00102d61;" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (goto_statement "goto LAB_00102d61;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) }))) (expression_statement "iVar9 = iVar9 + iVar10;" (assignment_expression "iVar9 = iVar9 + iVar10" identifier = (binary_expression "iVar9 + iVar10" identifier + identifier)) ;) (goto_statement "goto LAB_00102da3;" goto statement_identifier ;) (labeled_statement "LAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" statement_identifier : (if_statement "if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" { (labeled_statement "LAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" statement_identifier : (if_statement "if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }" { (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" identifier = identifier) ;) (if_statement "if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (compound_statement "{\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" { (labeled_statement "LAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" statement_identifier : (expression_statement "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" identifier = (call_expression "sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" identifier (argument_list "(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" ( identifier , number_literal , number_literal , number_literal , number_literal , number_literal , number_literal , identifier , number_literal , identifier )))) ;)) (labeled_statement "LAB_00102f58:\n        local_194 = iVar12;" statement_identifier : (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" identifier = identifier) ;)) (if_statement "if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" if (parenthesized_expression "(iVar12 != 0)" ( (binary_expression "iVar12 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" { (labeled_statement "LAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" statement_identifier : (expression_statement "sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" (call_expression "sg_get_category_sense_str(iVar12,0x50,local_148,local_188)" identifier (argument_list "(iVar12,0x50,local_148,local_188)" ( identifier , number_literal , identifier , identifier ))) ;)) (expression_statement "pr2serr("Write buffer failed: %s\n",local_148);" (call_expression "pr2serr("Write buffer failed: %s\n",local_148)" identifier (argument_list "("Write buffer failed: %s\n",local_148)" ( (string_literal ""Write buffer failed: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" identifier = identifier) ;) })) })) }) (else_clause "else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" else (compound_statement "{\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" { (expression_statement "pr2serr("sending Activate deferred microcode [0xf]\n");" (call_expression "pr2serr("sending Activate deferred microcode [0xf]\n")" identifier (argument_list "("sending Activate deferred microcode [0xf]\n")" ( (string_literal ""sending Activate deferred microcode [0xf]\n"" " string_content escape_sequence ") ))) ;) (if_statement "if (!bVar4) goto LAB_00102ec2;" if (parenthesized_expression "(!bVar4)" ( (unary_expression "!bVar4" ! identifier) )) (goto_statement "goto LAB_00102ec2;" goto statement_identifier ;)) (expression_statement "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" identifier (argument_list "("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" ( (string_literal ""skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n"" " string_content escape_sequence ") ))) ;) })))) }))) (labeled_statement "LAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" statement_identifier : (if_statement "if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" if (parenthesized_expression "(local_150 == (void *)0x0)" ( (binary_expression "local_150 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }" { (labeled_statement "LAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);" statement_identifier : (expression_statement "iVar7 = sg_cmds_close_device(iVar7);" (assignment_expression "iVar7 = sg_cmds_close_device(iVar7)" identifier = (call_expression "sg_cmds_close_device(iVar7)" identifier (argument_list "(iVar7)" ( identifier )))) ;)) (if_statement "if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" if (parenthesized_expression "(iVar7 < 0)" ( (binary_expression "iVar7 < 0" identifier < number_literal) )) (compound_statement "{\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" { (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" identifier = (call_expression "safe_strerror(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) (expression_statement "pr2serr("close error: %s\n",uVar18);" (call_expression "pr2serr("close error: %s\n",uVar18)" identifier (argument_list "("close error: %s\n",uVar18)" ( (string_literal ""close error: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (if_statement "if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }" if (parenthesized_expression "(local_194 == 0)" ( (binary_expression "local_194 == 0" identifier == number_literal) )) (compound_statement "{\n        local_194 = sg_convert_errno(-iVar7);\n      }" { (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" identifier = (call_expression "sg_convert_errno(-iVar7)" identifier (argument_list "(-iVar7)" ( (unary_expression "-iVar7" - identifier) )))) ;) })) })) }) (else_clause "else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" else (compound_statement "{\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" { (labeled_statement "LAB_00102867:\n    free(local_150);" statement_identifier : (expression_statement "free(local_150);" (call_expression "free(local_150)" identifier (argument_list "(local_150)" ( identifier ))) ;)) (if_statement "if (-1 < iVar7) goto LAB_00102e47;" if (parenthesized_expression "(-1 < iVar7)" ( (binary_expression "-1 < iVar7" number_literal < identifier) )) (goto_statement "goto LAB_00102e47;" goto statement_identifier ;)) })))) (if_statement "if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" if (parenthesized_expression "(local_188 == 0)" ( (binary_expression "local_188 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" { (labeled_statement "LAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" statement_identifier : (expression_statement "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" (assignment_expression "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier = (call_expression "sg_if_can2stderr("sg_write_buffer failed: ",local_194)" identifier (argument_list "("sg_write_buffer failed: ",local_194)" ( (string_literal ""sg_write_buffer failed: "" " string_content ") , identifier )))) ;)) (if_statement "if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" if (parenthesized_expression "(cVar6 == '\0')" ( (binary_expression "cVar6 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" { (expression_statement "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");" (call_expression "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" identifier (argument_list "("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" ( (string_literal ""Some error occurred, try again with \'-v\' or \'-vv\' for more information\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) })) })) (labeled_statement "LAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }" statement_identifier : (if_statement "if (local_194 < 0) {\n    local_194 = 99;\n  }" if (parenthesized_expression "(local_194 < 0)" ( (binary_expression "local_194 < 0" identifier < number_literal) )) (compound_statement "{\n    local_194 = 99;\n  }" { (expression_statement "local_194 = 99;" (assignment_expression "local_194 = 99" identifier = number_literal) ;) }))) (goto_statement "goto LAB_001026b7;" goto statement_identifier ;) (labeled_statement "switchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);" statement_identifier : (expression_statement "local_168 = sg_get_num(optarg);" (assignment_expression "local_168 = sg_get_num(optarg)" identifier = (call_expression "sg_get_num(optarg)" identifier (argument_list "(optarg)" ( identifier )))) ;)) (if_statement "if (local_168 < 0) goto code_r0x00102669;" if (parenthesized_expression "(local_168 < 0)" ( (binary_expression "local_168 < 0" identifier < number_literal) )) (goto_statement "goto code_r0x00102669;" goto statement_identifier ;)) (goto_statement "goto LAB_001023de;" goto statement_identifier ;) (labeled_statement "code_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");" statement_identifier : (expression_statement "pr2serr("Invalid argument to \'--timeout\'\n");" (call_expression "pr2serr("Invalid argument to \'--timeout\'\n")" identifier (argument_list "("Invalid argument to \'--timeout\'\n")" ( (string_literal ""Invalid argument to \'--timeout\'\n"" " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;)) (labeled_statement "LAB_001026af:\n  local_194 = 1;" statement_identifier : (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }" statement_identifier : (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\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    return local_194;\n  }" { (return_statement "return local_194;" return identifier ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (string_literal " string_content ") , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " escape_sequence ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( IDENT )) && (parenthesized_expression ( IDENT ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence escape_sequence ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) , LIT ))))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content escape_sequence string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) , LIT )))) , (binary_expression IDENT < LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content escape_sequence string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content escape_sequence string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT <= IDENT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) || (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( IDENT )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , LIT , IDENT )))) ;) (goto_statement goto statement_identifier ;) })))) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (string_literal " string_content ") ))) ;) (goto_statement goto statement_identifier ;) })) (switch_statement switch (parenthesized_expression ( IDENT )) (compound_statement { (case_statement case LIT :) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (goto_statement goto statement_identifier ;)) (case_statement default : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = BOOL) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , (binary_expression IDENT + LIT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) })) })) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = BOOL) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = BOOL) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * IDENT)) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * IDENT)) * LIT)) + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( ))) ;)) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (unary_expression ~ (cast_expression ( (type_descriptor TYPE) ) IDENT)) - LIT) )))) )))) , (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) }))) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;) (goto_statement goto statement_identifier ;) })) (goto_statement goto statement_identifier ;)) (case_statement case LIT : (goto_statement goto statement_identifier ;)) (case_statement case LIT : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (goto_statement goto statement_identifier ;)) })) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) )))) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;)) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT - IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , (binary_expression IDENT + IDENT) , (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) , IDENT , IDENT , LIT , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( IDENT )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) })) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT , IDENT , IDENT , (binary_expression IDENT + IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , LIT , LIT , LIT , IDENT , LIT , IDENT )))) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT , IDENT ))) ;)) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") ))) ;) })))) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (unary_expression - IDENT) )))) ;) })) })) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (goto_statement goto statement_identifier ;)) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") ))) ;) })) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (goto_statement goto statement_identifier ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence escape_sequence ") ))) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00102330(int param_1,long param_2)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "int") (function_declarator "FUN_00102330(int param_1,long param_2)" (identifier "FUN_00102330") (parameter_list "(int param_1,long param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  bool bVar4;\n  bool bVar5;\n  char cVar6;\n  int iVar7;\n  uint uVar8;\n  int iVar9;\n  int iVar10;\n  int iVar11;\n  int iVar12;\n  char *pcVar13;\n  ushort **ppuVar14;\n  ulong uVar15;\n  __off64_t _Var16;\n  int *piVar17;\n  undefined8 uVar18;\n  long lVar19;\n  size_t __n;\n  char *pcVar20;\n  ulong uVar21;\n  undefined **ppuVar22;\n  long in_FS_OFFSET;\n  byte bVar23;\n  int local_194;\n  char *local_190;\n  int local_188;\n  uint local_184;\n  int local_180;\n  uint local_17c;\n  void *local_178;\n  int local_170;\n  int local_16c;\n  int local_168;\n  int local_164;\n  undefined4 local_154;\n  void *local_150;\n  char local_148 [264];\n  long local_40;\n  \n  bVar23 = 0;\n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  local_150 = (void *)0x0;\n  local_190 = (char *)0x0;\n  local_17c = 0;\n  local_168 = 300;\n  local_164 = 0;\n  local_180 = 0;\n  uVar8 = 0;\n  local_170 = 0;\n  local_184 = 0;\n  local_188 = 0;\n  local_194 = 0;\n  local_16c = 0;\n  bVar3 = false;\n  bVar5 = false;\n  bVar1 = false;\n  bVar4 = false;\n  bVar2 = false;\nLAB_001023de:\n  local_154 = 0;\n  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);\n  if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }\n  switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }\nLAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);\n  pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );\n  local_194 = 1;\n  goto LAB_001026b7;\nLAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;\n  iVar10 = iVar11 - iVar9;\n  if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }\n  if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }\n  iVar9 = iVar9 + iVar10;\n  goto LAB_00102da3;\nLAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }\nLAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }\n  if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }\nLAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }\n  goto LAB_001026b7;\nswitchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);\n  if (local_168 < 0) goto code_r0x00102669;\n  goto LAB_001023de;\ncode_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");\nLAB_001026af:\n  local_194 = 1;\nLAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "bool bVar4;" (primitive_type "bool") (identifier "bVar4") (; ";")) (declaration "bool bVar5;" (primitive_type "bool") (identifier "bVar5") (; ";")) (declaration "char cVar6;" (primitive_type "char") (identifier "cVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "uint uVar8;" (type_identifier "uint") (identifier "uVar8") (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (declaration "int iVar11;" (primitive_type "int") (identifier "iVar11") (; ";")) (declaration "int iVar12;" (primitive_type "int") (identifier "iVar12") (; ";")) (declaration "char *pcVar13;" (primitive_type "char") (pointer_declarator "*pcVar13" (* "*") (identifier "pcVar13")) (; ";")) (declaration "ushort **ppuVar14;" (type_identifier "ushort") (pointer_declarator "**ppuVar14" (* "*") (pointer_declarator "*ppuVar14" (* "*") (identifier "ppuVar14"))) (; ";")) (declaration "ulong uVar15;" (type_identifier "ulong") (identifier "uVar15") (; ";")) (declaration "__off64_t _Var16;" (type_identifier "__off64_t") (identifier "_Var16") (; ";")) (declaration "int *piVar17;" (primitive_type "int") (pointer_declarator "*piVar17" (* "*") (identifier "piVar17")) (; ";")) (declaration "undefined8 uVar18;" (type_identifier "undefined8") (identifier "uVar18") (; ";")) (declaration "long lVar19;" (sized_type_specifier "long" (long "long")) (identifier "lVar19") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "char *pcVar20;" (primitive_type "char") (pointer_declarator "*pcVar20" (* "*") (identifier "pcVar20")) (; ";")) (declaration "ulong uVar21;" (type_identifier "ulong") (identifier "uVar21") (; ";")) (declaration "undefined **ppuVar22;" (type_identifier "undefined") (pointer_declarator "**ppuVar22" (* "*") (pointer_declarator "*ppuVar22" (* "*") (identifier "ppuVar22"))) (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "byte bVar23;" (type_identifier "byte") (identifier "bVar23") (; ";")) (declaration "int local_194;" (primitive_type "int") (identifier "local_194") (; ";")) (declaration "char *local_190;" (primitive_type "char") (pointer_declarator "*local_190" (* "*") (identifier "local_190")) (; ";")) (declaration "int local_188;" (primitive_type "int") (identifier "local_188") (; ";")) (declaration "uint local_184;" (type_identifier "uint") (identifier "local_184") (; ";")) (declaration "int local_180;" (primitive_type "int") (identifier "local_180") (; ";")) (declaration "uint local_17c;" (type_identifier "uint") (identifier "local_17c") (; ";")) (declaration "void *local_178;" (primitive_type "void") (pointer_declarator "*local_178" (* "*") (identifier "local_178")) (; ";")) (declaration "int local_170;" (primitive_type "int") (identifier "local_170") (; ";")) (declaration "int local_16c;" (primitive_type "int") (identifier "local_16c") (; ";")) (declaration "int local_168;" (primitive_type "int") (identifier "local_168") (; ";")) (declaration "int local_164;" (primitive_type "int") (identifier "local_164") (; ";")) (declaration "undefined4 local_154;" (type_identifier "undefined4") (identifier "local_154") (; ";")) (declaration "void *local_150;" (primitive_type "void") (pointer_declarator "*local_150" (* "*") (identifier "local_150")) (; ";")) (declaration "char local_148 [264];" (primitive_type "char") (array_declarator "local_148 [264]" (identifier "local_148") ([ "[") (number_literal "264") (] "]")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "bVar23 = 0;" (assignment_expression "bVar23 = 0" (identifier "bVar23") (= "=") (number_literal "0")) (; ";")) (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_150 = (void *)0x0;" (assignment_expression "local_150 = (void *)0x0" (identifier "local_150") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_190 = (char *)0x0;" (assignment_expression "local_190 = (char *)0x0" (identifier "local_190") (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_17c = 0;" (assignment_expression "local_17c = 0" (identifier "local_17c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_168 = 300;" (assignment_expression "local_168 = 300" (identifier "local_168") (= "=") (number_literal "300")) (; ";")) (expression_statement "local_164 = 0;" (assignment_expression "local_164 = 0" (identifier "local_164") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_180 = 0;" (assignment_expression "local_180 = 0" (identifier "local_180") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" (identifier "uVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_170 = 0;" (assignment_expression "local_170 = 0" (identifier "local_170") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_184 = 0;" (assignment_expression "local_184 = 0" (identifier "local_184") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_188 = 0;" (assignment_expression "local_188 = 0" (identifier "local_188") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" (identifier "local_194") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_16c = 0;" (assignment_expression "local_16c = 0" (identifier "local_16c") (= "=") (number_literal "0")) (; ";")) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (expression_statement "bVar5 = false;" (assignment_expression "bVar5 = false" (identifier "bVar5") (= "=") (false "false")) (; ";")) (expression_statement "bVar1 = false;" (assignment_expression "bVar1 = false" (identifier "bVar1") (= "=") (false "false")) (; ";")) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" (identifier "bVar4") (= "=") (false "false")) (; ";")) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (labeled_statement "LAB_001023de:\n  local_154 = 0;" (statement_identifier "LAB_001023de") (: ":") (expression_statement "local_154 = 0;" (assignment_expression "local_154 = 0" (identifier "local_154") (= "=") (number_literal "0")) (; ";"))) (expression_statement "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);" (assignment_expression "iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" (identifier "iVar7") (= "=") (call_expression "getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" (identifier "getopt_long") (argument_list "(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (string_literal ""b:dhi:I:l:m:o:rs:S:t:vV"" (" """) (string_content "b:dhi:I:l:m:o:rs:S:t:vV") (" """)) (, ",") (pointer_expression "&PTR_DAT_001071a0" (& "&") (identifier "PTR_DAT_001071a0")) (, ",") (pointer_expression "&local_154" (& "&") (identifier "local_154")) () ")")))) (; ";")) (if_statement "if (iVar7 == -1) {\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" (if "if") (parenthesized_expression "(iVar7 == -1)" (( "(") (binary_expression "iVar7 == -1" (identifier "iVar7") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }\n    if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }\n    if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }\n    pr2serr("version: %s\n","1.28 20180628");\n    goto LAB_001026b7;\n  }" ({ "{") (if_statement "if (local_194 != 0) {\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" (if "if") (parenthesized_expression "(local_194 != 0)" (( "(") (binary_expression "local_194 != 0" (identifier "local_194") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }\n      goto LAB_001026b7;\n    }" ({ "{") (if_statement "if (local_194 < 2) {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }\n      else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" (if "if") (parenthesized_expression "(local_194 < 2)" (( "(") (binary_expression "local_194 < 2" (identifier "local_194") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 0;\n      }" ({ "{") (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (identifier "pr2serr") (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (( "(") (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" (" """) (string_content "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]") (escape_sequence "\n") (string_content "                       [--length=LEN] [--mode=MO] [--offset=OFF]") (escape_sequence "\n") (string_content "                       [--read-stdin] [--skip=SKIP] [--specific=MS]") (escape_sequence "\n") (string_content "                       [--timeout=TO] [--verbose] [--version] DEVICE") (escape_sequence "\n") (string_content "  where:") (escape_sequence "\n") (string_content "    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer") (escape_sequence "\n") (string_content "                           command (def: 0 -> as many as possible)") (escape_sequence "\n") (string_content "    --dry-run|-d           skip WRITE BUFFER commands, do everything else") (escape_sequence "\n") (string_content "    --help|-h              print out usage message then exit") (escape_sequence "\n") (string_content "    --id=ID|-i ID          buffer identifier (0 (default) to 255)") (escape_sequence "\n") (string_content "    --in=FILE|-I FILE      read from FILE (") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content " read from stdin)") (escape_sequence "\n") (string_content "    --length=LEN|-l LEN    length in bytes to write; may be deduced from") (escape_sequence "\n") (string_content "                           FILE") (escape_sequence "\n") (string_content "    --mode=MO|-m MO        write buffer mode, MO is number or acronym") (escape_sequence "\n") (string_content "                           (def: 0 -> ") (escape_sequence "\'") (string_content "combined header and data") (escape_sequence "\'") (string_content " (obs))") (escape_sequence "\n") (string_content "    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)") (escape_sequence "\n") (string_content "    --read-stdin|-r        read from stdin (same as ") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content ")") (escape_sequence "\n") (string_content "    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading") (escape_sequence "\n") (string_content "    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)") (escape_sequence "\n") (string_content "    --timeout=TO|-t TO     command timeout in seconds (def: 300)") (escape_sequence "\n") (string_content "    --verbose|-v           increase verbosity") (escape_sequence "\n") (string_content "    --version|-V           print version string and exit") (escape_sequence "\n") (escape_sequence "\n") (string_content "Performs one or more SCSI WRITE BUFFER commands. Use ") (escape_sequence "\'") (string_content "-m xxx") (escape_sequence "\'") (string_content " to list") (escape_sequence "\n") (string_content "available modes. A chunk size of 4 KB (") (escape_sequence "\'") (string_content "--bpw=4k") (escape_sequence "\'") (string_content ") seems to work well.") (escape_sequence "\n") (string_content "Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" (identifier "local_194") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" (else "else") (compound_statement "{\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        pr2serr("\n");\n        FUN_001022c5();\n        local_194 = 0;\n      }" ({ "{") (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (identifier "pr2serr") (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (( "(") (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" (" """) (string_content "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]") (escape_sequence "\n") (string_content "                       [--length=LEN] [--mode=MO] [--offset=OFF]") (escape_sequence "\n") (string_content "                       [--read-stdin] [--skip=SKIP] [--specific=MS]") (escape_sequence "\n") (string_content "                       [--timeout=TO] [--verbose] [--version] DEVICE") (escape_sequence "\n") (string_content "  where:") (escape_sequence "\n") (string_content "    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer") (escape_sequence "\n") (string_content "                           command (def: 0 -> as many as possible)") (escape_sequence "\n") (string_content "    --dry-run|-d           skip WRITE BUFFER commands, do everything else") (escape_sequence "\n") (string_content "    --help|-h              print out usage message then exit") (escape_sequence "\n") (string_content "    --id=ID|-i ID          buffer identifier (0 (default) to 255)") (escape_sequence "\n") (string_content "    --in=FILE|-I FILE      read from FILE (") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content " read from stdin)") (escape_sequence "\n") (string_content "    --length=LEN|-l LEN    length in bytes to write; may be deduced from") (escape_sequence "\n") (string_content "                           FILE") (escape_sequence "\n") (string_content "    --mode=MO|-m MO        write buffer mode, MO is number or acronym") (escape_sequence "\n") (string_content "                           (def: 0 -> ") (escape_sequence "\'") (string_content "combined header and data") (escape_sequence "\'") (string_content " (obs))") (escape_sequence "\n") (string_content "    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)") (escape_sequence "\n") (string_content "    --read-stdin|-r        read from stdin (same as ") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content ")") (escape_sequence "\n") (string_content "    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading") (escape_sequence "\n") (string_content "    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)") (escape_sequence "\n") (string_content "    --timeout=TO|-t TO     command timeout in seconds (def: 300)") (escape_sequence "\n") (string_content "    --verbose|-v           increase verbosity") (escape_sequence "\n") (string_content "    --version|-V           print version string and exit") (escape_sequence "\n") (escape_sequence "\n") (string_content "Performs one or more SCSI WRITE BUFFER commands. Use ") (escape_sequence "\'") (string_content "-m xxx") (escape_sequence "\'") (string_content " to list") (escape_sequence "\n") (string_content "available modes. A chunk size of 4 KB (") (escape_sequence "\'") (string_content "--bpw=4k") (escape_sequence "\'") (string_content ") seems to work well.") (escape_sequence "\n") (string_content "Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" (identifier "pr2serr") (argument_list "("\n")" (( "(") (string_literal ""\n"" (" """) (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" (identifier "FUN_001022c5") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_194 = 0;" (assignment_expression "local_194 = 0" (identifier "local_194") (= "=") (number_literal "0")) (; ";")) (} "}")))) (goto_statement "goto LAB_001026b7;" (goto "goto") (statement_identifier "LAB_001026b7") (; ";")) (} "}"))) (if_statement "if (optind < param_1) {\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }\n    else {\n      lVar19 = 0;\n    }" (if "if") (parenthesized_expression "(optind < param_1)" (( "(") (binary_expression "optind < param_1" (identifier "optind") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n      lVar19 = *(long *)(param_2 + (long)optind * 8);\n      optind = optind + 1;\n      if (optind < param_1) goto LAB_0010272c;\n    }" ({ "{") (expression_statement "lVar19 = *(long *)(param_2 + (long)optind * 8);" (assignment_expression "lVar19 = *(long *)(param_2 + (long)optind * 8)" (identifier "lVar19") (= "=") (pointer_expression "*(long *)(param_2 + (long)optind * 8)" (* "*") (cast_expression "(long *)(param_2 + (long)optind * 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (long)optind * 8)" (( "(") (binary_expression "param_2 + (long)optind * 8" (identifier "param_2") (+ "+") (binary_expression "(long)optind * 8" (cast_expression "(long)optind" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "optind")) (* "*") (number_literal "8"))) () ")"))))) (; ";")) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" (identifier "optind") (= "=") (binary_expression "optind + 1" (identifier "optind") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (optind < param_1) goto LAB_0010272c;" (if "if") (parenthesized_expression "(optind < param_1)" (( "(") (binary_expression "optind < param_1" (identifier "optind") (< "<") (identifier "param_1")) () ")")) (goto_statement "goto LAB_0010272c;" (goto "goto") (statement_identifier "LAB_0010272c") (; ";"))) (} "}")) (else_clause "else {\n      lVar19 = 0;\n    }" (else "else") (compound_statement "{\n      lVar19 = 0;\n    }" ({ "{") (expression_statement "lVar19 = 0;" (assignment_expression "lVar19 = 0" (identifier "lVar19") (= "=") (number_literal "0")) (; ";")) (} "}")))) (if_statement "if ((bVar1) && (bVar5)) {\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }\n    else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" (if "if") (parenthesized_expression "((bVar1) && (bVar5))" (( "(") (binary_expression "(bVar1) && (bVar5)" (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (&& "&&") (parenthesized_expression "(bVar5)" (( "(") (identifier "bVar5") () ")"))) () ")")) (compound_statement "{\n      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");\n    }" ({ "{") (expression_statement "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");" (call_expression "pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n")" (identifier "pr2serr") (argument_list "("Not in DEBUG mode, so \'-vV\' has no special action\n")" (( "(") (string_literal ""Not in DEBUG mode, so \'-vV\' has no special action\n"" (" """) (string_content "Not in DEBUG mode, so ") (escape_sequence "\'") (string_content "-vV") (escape_sequence "\'") (string_content " has no special action") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}")) (else_clause "else if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" (else "else") (if_statement "if (!bVar5) {\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" (if "if") (parenthesized_expression "(!bVar5)" (( "(") (unary_expression "!bVar5" (! "!") (identifier "bVar5")) () ")")) (compound_statement "{\n      if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }\n      if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }\n      iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n      if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }\n      if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }\n      if (0 < local_16c) goto LAB_0010284e;\n      local_178 = (void *)0x0;\nLAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);\n      goto LAB_00102f58;\n    }" ({ "{") (if_statement "if (lVar19 == 0) {\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" (if "if") (parenthesized_expression "(lVar19 == 0)" (( "(") (binary_expression "lVar19 == 0" (identifier "lVar19") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        pr2serr("Missing device name!\n\n");\n        pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );\n        local_194 = 1;\n        goto LAB_001026b7;\n      }" ({ "{") (expression_statement "pr2serr("Missing device name!\n\n");" (call_expression "pr2serr("Missing device name!\n\n")" (identifier "pr2serr") (argument_list "("Missing device name!\n\n")" (( "(") (string_literal ""Missing device name!\n\n"" (" """) (string_content "Missing device name!") (escape_sequence "\n") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               );" (call_expression "pr2serr(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (identifier "pr2serr") (argument_list "(\n               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n               )" (( "(") (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" (" """) (string_content "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]") (escape_sequence "\n") (string_content "                       [--length=LEN] [--mode=MO] [--offset=OFF]") (escape_sequence "\n") (string_content "                       [--read-stdin] [--skip=SKIP] [--specific=MS]") (escape_sequence "\n") (string_content "                       [--timeout=TO] [--verbose] [--version] DEVICE") (escape_sequence "\n") (string_content "  where:") (escape_sequence "\n") (string_content "    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer") (escape_sequence "\n") (string_content "                           command (def: 0 -> as many as possible)") (escape_sequence "\n") (string_content "    --dry-run|-d           skip WRITE BUFFER commands, do everything else") (escape_sequence "\n") (string_content "    --help|-h              print out usage message then exit") (escape_sequence "\n") (string_content "    --id=ID|-i ID          buffer identifier (0 (default) to 255)") (escape_sequence "\n") (string_content "    --in=FILE|-I FILE      read from FILE (") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content " read from stdin)") (escape_sequence "\n") (string_content "    --length=LEN|-l LEN    length in bytes to write; may be deduced from") (escape_sequence "\n") (string_content "                           FILE") (escape_sequence "\n") (string_content "    --mode=MO|-m MO        write buffer mode, MO is number or acronym") (escape_sequence "\n") (string_content "                           (def: 0 -> ") (escape_sequence "\'") (string_content "combined header and data") (escape_sequence "\'") (string_content " (obs))") (escape_sequence "\n") (string_content "    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)") (escape_sequence "\n") (string_content "    --read-stdin|-r        read from stdin (same as ") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content ")") (escape_sequence "\n") (string_content "    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading") (escape_sequence "\n") (string_content "    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)") (escape_sequence "\n") (string_content "    --timeout=TO|-t TO     command timeout in seconds (def: 300)") (escape_sequence "\n") (string_content "    --verbose|-v           increase verbosity") (escape_sequence "\n") (string_content "    --version|-V           print version string and exit") (escape_sequence "\n") (escape_sequence "\n") (string_content "Performs one or more SCSI WRITE BUFFER commands. Use ") (escape_sequence "\'") (string_content "-m xxx") (escape_sequence "\'") (string_content " to list") (escape_sequence "\n") (string_content "available modes. A chunk size of 4 KB (") (escape_sequence "\'") (string_content "--bpw=4k") (escape_sequence "\'") (string_content ") seems to work well.") (escape_sequence "\n") (string_content "Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" (identifier "local_194") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_001026b7;" (goto "goto") (statement_identifier "LAB_001026b7") (; ";")) (} "}"))) (if_statement "if ((local_170 < local_16c) && (0 < local_170)) {\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" (if "if") (parenthesized_expression "((local_170 < local_16c) && (0 < local_170))" (( "(") (binary_expression "(local_170 < local_16c) && (0 < local_170)" (parenthesized_expression "(local_170 < local_16c)" (( "(") (binary_expression "local_170 < local_16c" (identifier "local_170") (< "<") (identifier "local_16c")) () ")")) (&& "&&") (parenthesized_expression "(0 < local_170)" (( "(") (binary_expression "0 < local_170" (number_literal "0") (< "<") (identifier "local_170")) () ")"))) () ")")) (compound_statement "{\n        pr2serr("trim chunk size (CS) to be the same as LEN\n");\n        iVar7 = sg_cmds_open_device(lVar19,0,local_188);\n        if (iVar7 < 0) goto LAB_001029f5;\n        local_16c = local_170;\nLAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);\n        if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }\n        __n = (size_t)local_170;\n        memset(local_178,0xff,__n);\n        if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }\n        iVar9 = 0;\n        goto LAB_00102da3;\n      }" ({ "{") (expression_statement "pr2serr("trim chunk size (CS) to be the same as LEN\n");" (call_expression "pr2serr("trim chunk size (CS) to be the same as LEN\n")" (identifier "pr2serr") (argument_list "("trim chunk size (CS) to be the same as LEN\n")" (( "(") (string_literal ""trim chunk size (CS) to be the same as LEN\n"" (" """) (string_content "trim chunk size (CS) to be the same as LEN") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" (identifier "iVar7") (= "=") (call_expression "sg_cmds_open_device(lVar19,0,local_188)" (identifier "sg_cmds_open_device") (argument_list "(lVar19,0,local_188)" (( "(") (identifier "lVar19") (, ",") (number_literal "0") (, ",") (identifier "local_188") () ")")))) (; ";")) (if_statement "if (iVar7 < 0) goto LAB_001029f5;" (if "if") (parenthesized_expression "(iVar7 < 0)" (( "(") (binary_expression "iVar7 < 0" (identifier "iVar7") (< "<") (number_literal "0")) () ")")) (goto_statement "goto LAB_001029f5;" (goto "goto") (statement_identifier "LAB_001029f5") (; ";"))) (expression_statement "local_16c = local_170;" (assignment_expression "local_16c = local_170" (identifier "local_16c") (= "=") (identifier "local_170")) (; ";")) (labeled_statement "LAB_00102933:\n        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" (statement_identifier "LAB_00102933") (: ":") (expression_statement "local_178 = (void *)sg_memalign(local_170,0,&local_150,0);" (assignment_expression "local_178 = (void *)sg_memalign(local_170,0,&local_150,0)" (identifier "local_178") (= "=") (cast_expression "(void *)sg_memalign(local_170,0,&local_150,0)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "sg_memalign(local_170,0,&local_150,0)" (identifier "sg_memalign") (argument_list "(local_170,0,&local_150,0)" (( "(") (identifier "local_170") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_150" (& "&") (identifier "local_150")) (, ",") (number_literal "0") () ")"))))) (; ";"))) (if_statement "if (local_178 == (void *)0x0) {\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" (if "if") (parenthesized_expression "(local_178 == (void *)0x0)" (( "(") (binary_expression "local_178 == (void *)0x0" (identifier "local_178") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          pr2serr("sg_write_buffer: out of memory\n");\n          local_194 = sg_convert_errno(0xc);\n          goto LAB_00102859;\n        }" ({ "{") (expression_statement "pr2serr("sg_write_buffer: out of memory\n");" (call_expression "pr2serr("sg_write_buffer: out of memory\n")" (identifier "pr2serr") (argument_list "("sg_write_buffer: out of memory\n")" (( "(") (string_literal ""sg_write_buffer: out of memory\n"" (" """) (string_content "sg_write_buffer: out of memory") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "local_194 = sg_convert_errno(0xc);" (assignment_expression "local_194 = sg_convert_errno(0xc)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(0xc)" (identifier "sg_convert_errno") (argument_list "(0xc)" (( "(") (number_literal "0xc") () ")")))) (; ";")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (expression_statement "__n = (size_t)local_170;" (assignment_expression "__n = (size_t)local_170" (identifier "__n") (= "=") (cast_expression "(size_t)local_170" (( "(") (type_descriptor "size_t" (primitive_type "size_t")) () ")") (identifier "local_170"))) (; ";")) (expression_statement "memset(local_178,0xff,__n);" (call_expression "memset(local_178,0xff,__n)" (identifier "memset") (argument_list "(local_178,0xff,__n)" (( "(") (identifier "local_178") (, ",") (number_literal "0xff") (, ",") (identifier "__n") () ")"))) (; ";")) (if_statement "if (local_190 == (char *)0x0) {\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }\n        else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" (if "if") (parenthesized_expression "(local_190 == (char *)0x0)" (( "(") (binary_expression "local_190 == (char *)0x0" (identifier "local_190") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_001029c2:\n          iVar11 = local_170;\n          if (local_16c < 1) goto LAB_00102f05;\n        }" ({ "{") (labeled_statement "LAB_001029c2:\n          iVar11 = local_170;" (statement_identifier "LAB_001029c2") (: ":") (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" (identifier "iVar11") (= "=") (identifier "local_170")) (; ";"))) (if_statement "if (local_16c < 1) goto LAB_00102f05;" (if "if") (parenthesized_expression "(local_16c < 1)" (( "(") (binary_expression "local_16c < 1" (identifier "local_16c") (< "<") (number_literal "1")) () ")")) (goto_statement "goto LAB_00102f05;" (goto "goto") (statement_identifier "LAB_00102f05") (; ";"))) (} "}")) (else_clause "else {\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" (else "else") (compound_statement "{\n          iVar9 = strcmp(local_190,"-");\n          if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }\n          iVar10 = open64(local_190,0);\n          if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }\n          iVar11 = sg_set_binary_mode(iVar10);\n          if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }\n          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          uVar15 = read(iVar10,local_178,__n);\n          if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }\n          iVar11 = local_170;\n          if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }\nLAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;\n          iVar11 = (int)uVar15;\n          if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }\n          if (local_188 == 0) goto LAB_00102c65;\n          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n          pr2serr("will write %d bytes",uVar21);\n          if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }\n          pr2serr(", %d bytes per WRITE BUFFER command\n");\n          if (iVar9 != 0) goto LAB_00102b35;\n        }" ({ "{") (expression_statement "iVar9 = strcmp(local_190,"-");" (assignment_expression "iVar9 = strcmp(local_190,"-")" (identifier "iVar9") (= "=") (call_expression "strcmp(local_190,"-")" (identifier "strcmp") (argument_list "(local_190,"-")" (( "(") (identifier "local_190") (, ",") (string_literal ""-"" (" """) (string_content "-") (" """)) () ")")))) (; ";")) (if_statement "if (iVar9 == 0) {\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" (if "if") (parenthesized_expression "(iVar9 == 0)" (( "(") (binary_expression "iVar9 == 0" (identifier "iVar9") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }\n            goto LAB_00102859;\n          }" ({ "{") (if_statement "if (local_164 < 1) {\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }\n            else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" (if "if") (parenthesized_expression "(local_164 < 1)" (( "(") (binary_expression "local_164 < 1" (identifier "local_164") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n              uVar15 = read(0,local_178,__n);\n              if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }\n              piVar17 = __errno_location();\n              local_194 = sg_convert_errno(*piVar17);\n              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);\n              perror(local_148);\n            }" ({ "{") (expression_statement "uVar15 = read(0,local_178,__n);" (assignment_expression "uVar15 = read(0,local_178,__n)" (identifier "uVar15") (= "=") (call_expression "read(0,local_178,__n)" (identifier "read") (argument_list "(0,local_178,__n)" (( "(") (number_literal "0") (, ",") (identifier "local_178") (, ",") (identifier "__n") () ")")))) (; ";")) (if_statement "if (-1 < (int)uVar15) {\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" (if "if") (parenthesized_expression "(-1 < (int)uVar15)" (( "(") (binary_expression "-1 < (int)uVar15" (number_literal "-1") (< "<") (cast_expression "(int)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar15"))) () ")")) (compound_statement "{\n                if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }\n                goto LAB_001029c2;\n              }" ({ "{") (if_statement "if ((int)uVar15 < local_170) {\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" (if "if") (parenthesized_expression "((int)uVar15 < local_170)" (( "(") (binary_expression "(int)uVar15 < local_170" (cast_expression "(int)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar15")) (< "<") (identifier "local_170")) () ")")) (compound_statement "{\n                  iVar10 = 0;\n                  goto LAB_00102c57;\n                }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_00102c57;" (goto "goto") (statement_identifier "LAB_00102c57") (; ";")) (} "}"))) (goto_statement "goto LAB_001029c2;" (goto "goto") (statement_identifier "LAB_001029c2") (; ";")) (} "}"))) (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" (identifier "piVar17") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(*piVar17)" (identifier "sg_convert_errno") (argument_list "(*piVar17)" (( "(") (pointer_expression "*piVar17" (* "*") (identifier "piVar17")) () ")")))) (; ";")) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" (identifier "__snprintf_chk") (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                             local_190)" (( "(") (identifier "local_148") (, ",") (number_literal "0x100") (, ",") (number_literal "1") (, ",") (number_literal "0x100") (, ",") (string_literal ""sg_write_buffer: couldn\'t read from %s"" (" """) (string_content "sg_write_buffer: couldn") (escape_sequence "\'") (string_content "t read from %s") (" """)) (, ",") (identifier "local_190") () ")"))) (; ";")) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" (identifier "perror") (argument_list "(local_148)" (( "(") (identifier "local_148") () ")"))) (; ";")) (} "}")) (else_clause "else {\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" (else "else") (compound_statement "{\n              pr2serr("Can\'t skip on stdin\n");\n              local_194 = 0xf;\n            }" ({ "{") (expression_statement "pr2serr("Can\'t skip on stdin\n");" (call_expression "pr2serr("Can\'t skip on stdin\n")" (identifier "pr2serr") (argument_list "("Can\'t skip on stdin\n")" (( "(") (string_literal ""Can\'t skip on stdin\n"" (" """) (string_content "Can") (escape_sequence "\'") (string_content "t skip on stdin") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "local_194 = 0xf;" (assignment_expression "local_194 = 0xf" (identifier "local_194") (= "=") (number_literal "0xf")) (; ";")) (} "}")))) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (expression_statement "iVar10 = open64(local_190,0);" (assignment_expression "iVar10 = open64(local_190,0)" (identifier "iVar10") (= "=") (call_expression "open64(local_190,0)" (identifier "open64") (argument_list "(local_190,0)" (( "(") (identifier "local_190") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar10 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" (if "if") (parenthesized_expression "(iVar10 < 0)" (( "(") (binary_expression "iVar10 < 0" (identifier "iVar10") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);\n            perror(local_148);\n            goto LAB_00102859;\n          }" ({ "{") (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" (identifier "piVar17") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(*piVar17)" (identifier "sg_convert_errno") (argument_list "(*piVar17)" (( "(") (pointer_expression "*piVar17" (* "*") (identifier "piVar17")) () ")")))) (; ";")) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" (identifier "__snprintf_chk") (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",\n                           local_190)" (( "(") (identifier "local_148") (, ",") (number_literal "0x100") (, ",") (number_literal "1") (, ",") (number_literal "0x100") (, ",") (string_literal ""sg_write_buffer: could not open %s for reading"" (" """) (string_content "sg_write_buffer: could not open %s for reading") (" """)) (, ",") (identifier "local_190") () ")"))) (; ";")) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" (identifier "perror") (argument_list "(local_148)" (( "(") (identifier "local_148") () ")"))) (; ";")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (expression_statement "iVar11 = sg_set_binary_mode(iVar10);" (assignment_expression "iVar11 = sg_set_binary_mode(iVar10)" (identifier "iVar11") (= "=") (call_expression "sg_set_binary_mode(iVar10)" (identifier "sg_set_binary_mode") (argument_list "(iVar10)" (( "(") (identifier "iVar10") () ")")))) (; ";")) (if_statement "if (iVar11 < 0) {\n            perror("sg_set_binary_mode");\n          }" (if "if") (parenthesized_expression "(iVar11 < 0)" (( "(") (binary_expression "iVar11 < 0" (identifier "iVar11") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            perror("sg_set_binary_mode");\n          }" ({ "{") (expression_statement "perror("sg_set_binary_mode");" (call_expression "perror("sg_set_binary_mode")" (identifier "perror") (argument_list "("sg_set_binary_mode")" (( "(") (string_literal ""sg_set_binary_mode"" (" """) (string_content "sg_set_binary_mode") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" (if "if") (parenthesized_expression "((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0))" (( "(") (binary_expression "(0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" (parenthesized_expression "(0 < local_164)" (( "(") (binary_expression "0 < local_164" (number_literal "0") (< "<") (identifier "local_164")) () ")")) (&& "&&") (parenthesized_expression "(_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)" (( "(") (comma_expression "_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0" (assignment_expression "_Var16 = lseek64(iVar10,(long)local_164,0)" (identifier "_Var16") (= "=") (call_expression "lseek64(iVar10,(long)local_164,0)" (identifier "lseek64") (argument_list "(iVar10,(long)local_164,0)" (( "(") (identifier "iVar10") (, ",") (cast_expression "(long)local_164" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "local_164")) (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "_Var16 < 0" (identifier "_Var16") (< "<") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" ({ "{") (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" (identifier "piVar17") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(*piVar17)" (identifier "sg_convert_errno") (argument_list "(*piVar17)" (( "(") (pointer_expression "*piVar17" (* "*") (identifier "piVar17")) () ")")))) (; ";")) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" (identifier "__snprintf_chk") (argument_list "(local_148,0x100,1,0x100,\n                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190)" (( "(") (identifier "local_148") (, ",") (number_literal "0x100") (, ",") (number_literal "1") (, ",") (number_literal "0x100") (, ",") (string_literal ""sg_write_buffer: couldn\'t skip to required position on %s"" (" """) (string_content "sg_write_buffer: couldn") (escape_sequence "\'") (string_content "t skip to required position on %s") (" """)) (, ",") (identifier "local_190") () ")"))) (; ";")) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" (identifier "perror") (argument_list "(local_148)" (( "(") (identifier "local_148") () ")"))) (; ";")) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" (identifier "close") (argument_list "(iVar10)" (( "(") (identifier "iVar10") () ")"))) (; ";")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (expression_statement "uVar15 = read(iVar10,local_178,__n);" (assignment_expression "uVar15 = read(iVar10,local_178,__n)" (identifier "uVar15") (= "=") (call_expression "read(iVar10,local_178,__n)" (identifier "read") (argument_list "(iVar10,local_178,__n)" (( "(") (identifier "iVar10") (, ",") (identifier "local_178") (, ",") (identifier "__n") () ")")))) (; ";")) (if_statement "if ((int)uVar15 < 0) {\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" (if "if") (parenthesized_expression "((int)uVar15 < 0)" (( "(") (binary_expression "(int)uVar15 < 0" (cast_expression "(int)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar15")) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n            piVar17 = __errno_location();\n            local_194 = sg_convert_errno(*piVar17);\n            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);\n            perror(local_148);\n            close(iVar10);\n            goto LAB_00102859;\n          }" ({ "{") (expression_statement "piVar17 = __errno_location();" (assignment_expression "piVar17 = __errno_location()" (identifier "piVar17") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "local_194 = sg_convert_errno(*piVar17);" (assignment_expression "local_194 = sg_convert_errno(*piVar17)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(*piVar17)" (identifier "sg_convert_errno") (argument_list "(*piVar17)" (( "(") (pointer_expression "*piVar17" (* "*") (identifier "piVar17")) () ")")))) (; ";")) (expression_statement "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190);" (call_expression "__snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" (identifier "__snprintf_chk") (argument_list "(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",\n                           local_190)" (( "(") (identifier "local_148") (, ",") (number_literal "0x100") (, ",") (number_literal "1") (, ",") (number_literal "0x100") (, ",") (string_literal ""sg_write_buffer: couldn\'t read from %s"" (" """) (string_content "sg_write_buffer: couldn") (escape_sequence "\'") (string_content "t read from %s") (" """)) (, ",") (identifier "local_190") () ")"))) (; ";")) (expression_statement "perror(local_148);" (call_expression "perror(local_148)" (identifier "perror") (argument_list "(local_148)" (( "(") (identifier "local_148") () ")"))) (; ";")) (expression_statement "close(iVar10);" (call_expression "close(iVar10)" (identifier "close") (argument_list "(iVar10)" (( "(") (identifier "iVar10") () ")"))) (; ";")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" (identifier "iVar11") (= "=") (identifier "local_170")) (; ";")) (if_statement "if (local_170 <= (int)uVar15) {\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" (if "if") (parenthesized_expression "(local_170 <= (int)uVar15)" (( "(") (binary_expression "local_170 <= (int)uVar15" (identifier "local_170") (<= "<=") (cast_expression "(int)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar15"))) () ")")) (compound_statement "{\nLAB_00102b35:\n            close(iVar10);\n            local_170 = iVar11;\n            goto LAB_001029c2;\n          }" ({ "{") (labeled_statement "LAB_00102b35:\n            close(iVar10);" (statement_identifier "LAB_00102b35") (: ":") (expression_statement "close(iVar10);" (call_expression "close(iVar10)" (identifier "close") (argument_list "(iVar10)" (( "(") (identifier "iVar10") () ")"))) (; ";"))) (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" (identifier "local_170") (= "=") (identifier "iVar11")) (; ";")) (goto_statement "goto LAB_001029c2;" (goto "goto") (statement_identifier "LAB_001029c2") (; ";")) (} "}"))) (labeled_statement "LAB_00102c57:\n          uVar21 = uVar15 & 0xffffffff;" (statement_identifier "LAB_00102c57") (: ":") (expression_statement "uVar21 = uVar15 & 0xffffffff;" (assignment_expression "uVar21 = uVar15 & 0xffffffff" (identifier "uVar21") (= "=") (binary_expression "uVar15 & 0xffffffff" (identifier "uVar15") (& "&") (number_literal "0xffffffff"))) (; ";"))) (expression_statement "iVar11 = (int)uVar15;" (assignment_expression "iVar11 = (int)uVar15" (identifier "iVar11") (= "=") (cast_expression "(int)uVar15" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar15"))) (; ";")) (if_statement "if (bVar3) {\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" (if "if") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (compound_statement "{\n            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);\n            pr2serr("pad with 0xff bytes and continue\n");\n            iVar11 = local_170;\nLAB_00102c65:\n            local_170 = iVar11;\n            if (iVar9 == 0) goto LAB_001029c2;\n            goto LAB_00102b35;\n          }" ({ "{") (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" (identifier "pr2serr") (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" (( "(") (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" (" """) (string_content "tried to read %d bytes from %s, got %d bytes") (escape_sequence "\n") (" """)) (, ",") (identifier "local_170") (, ",") (identifier "local_190") (, ",") (identifier "uVar21") () ")"))) (; ";")) (expression_statement "pr2serr("pad with 0xff bytes and continue\n");" (call_expression "pr2serr("pad with 0xff bytes and continue\n")" (identifier "pr2serr") (argument_list "("pad with 0xff bytes and continue\n")" (( "(") (string_literal ""pad with 0xff bytes and continue\n"" (" """) (string_content "pad with 0xff bytes and continue") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "iVar11 = local_170;" (assignment_expression "iVar11 = local_170" (identifier "iVar11") (= "=") (identifier "local_170")) (; ";")) (labeled_statement "LAB_00102c65:\n            local_170 = iVar11;" (statement_identifier "LAB_00102c65") (: ":") (expression_statement "local_170 = iVar11;" (assignment_expression "local_170 = iVar11" (identifier "local_170") (= "=") (identifier "iVar11")) (; ";"))) (if_statement "if (iVar9 == 0) goto LAB_001029c2;" (if "if") (parenthesized_expression "(iVar9 == 0)" (( "(") (binary_expression "iVar9 == 0" (identifier "iVar9") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_001029c2;" (goto "goto") (statement_identifier "LAB_001029c2") (; ";"))) (goto_statement "goto LAB_00102b35;" (goto "goto") (statement_identifier "LAB_00102b35") (; ";")) (} "}"))) (if_statement "if (local_188 == 0) goto LAB_00102c65;" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00102c65;" (goto "goto") (statement_identifier "LAB_00102c65") (; ";"))) (expression_statement "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);" (call_expression "pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" (identifier "pr2serr") (argument_list "("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21)" (( "(") (string_literal ""tried to read %d bytes from %s, got %d bytes\n"" (" """) (string_content "tried to read %d bytes from %s, got %d bytes") (escape_sequence "\n") (" """)) (, ",") (identifier "local_170") (, ",") (identifier "local_190") (, ",") (identifier "uVar21") () ")"))) (; ";")) (expression_statement "pr2serr("will write %d bytes",uVar21);" (call_expression "pr2serr("will write %d bytes",uVar21)" (identifier "pr2serr") (argument_list "("will write %d bytes",uVar21)" (( "(") (string_literal ""will write %d bytes"" (" """) (string_content "will write %d bytes") (" """)) (, ",") (identifier "uVar21") () ")"))) (; ";")) (if_statement "if ((local_16c < 1) || (local_170 <= local_16c)) {\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" (if "if") (parenthesized_expression "((local_16c < 1) || (local_170 <= local_16c))" (( "(") (binary_expression "(local_16c < 1) || (local_170 <= local_16c)" (parenthesized_expression "(local_16c < 1)" (( "(") (binary_expression "local_16c < 1" (identifier "local_16c") (< "<") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(local_170 <= local_16c)" (( "(") (binary_expression "local_170 <= local_16c" (identifier "local_170") (<= "<=") (identifier "local_16c")) () ")"))) () ")")) (compound_statement "{\n            pr2serr("\n");\n            goto LAB_00102c65;\n          }" ({ "{") (expression_statement "pr2serr("\n");" (call_expression "pr2serr("\n")" (identifier "pr2serr") (argument_list "("\n")" (( "(") (string_literal ""\n"" (" """) (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_00102c65;" (goto "goto") (statement_identifier "LAB_00102c65") (; ";")) (} "}"))) (expression_statement "pr2serr(", %d bytes per WRITE BUFFER command\n");" (call_expression "pr2serr(", %d bytes per WRITE BUFFER command\n")" (identifier "pr2serr") (argument_list "(", %d bytes per WRITE BUFFER command\n")" (( "(") (string_literal "", %d bytes per WRITE BUFFER command\n"" (" """) (string_content ", %d bytes per WRITE BUFFER command") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (if_statement "if (iVar9 != 0) goto LAB_00102b35;" (if "if") (parenthesized_expression "(iVar9 != 0)" (( "(") (binary_expression "iVar9 != 0" (identifier "iVar9") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00102b35;" (goto "goto") (statement_identifier "LAB_00102b35") (; ";"))) (} "}")))) (expression_statement "iVar9 = 0;" (assignment_expression "iVar9 = 0" (identifier "iVar9") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_00102da3;" (goto "goto") (statement_identifier "LAB_00102da3") (; ";")) (} "}"))) (expression_statement "iVar7 = sg_cmds_open_device(lVar19,0,local_188);" (assignment_expression "iVar7 = sg_cmds_open_device(lVar19,0,local_188)" (identifier "iVar7") (= "=") (call_expression "sg_cmds_open_device(lVar19,0,local_188)" (identifier "sg_cmds_open_device") (argument_list "(lVar19,0,local_188)" (( "(") (identifier "lVar19") (, ",") (number_literal "0") (, ",") (identifier "local_188") () ")")))) (; ";")) (if_statement "if (iVar7 < 0) {\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" (if "if") (parenthesized_expression "(iVar7 < 0)" (( "(") (binary_expression "iVar7 < 0" (identifier "iVar7") (< "<") (number_literal "0")) () ")")) (compound_statement "{\nLAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }\n        uVar18 = safe_strerror(-iVar7);\n        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);\n        local_194 = sg_convert_errno(-iVar7);\n        if (local_150 != (void *)0x0) goto LAB_00102867;\n        goto LAB_00102880;\n      }" ({ "{") (labeled_statement "LAB_001029f5:\n        if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" (statement_identifier "LAB_001029f5") (: ":") (if_statement "if (local_188 == 0) {\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          local_194 = sg_convert_errno(-iVar7);\n          if (local_150 == (void *)0x0) goto LAB_00102a18;\n          goto LAB_00102867;\n        }" ({ "{") (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(-iVar7)" (identifier "sg_convert_errno") (argument_list "(-iVar7)" (( "(") (unary_expression "-iVar7" (- "-") (identifier "iVar7")) () ")")))) (; ";")) (if_statement "if (local_150 == (void *)0x0) goto LAB_00102a18;" (if "if") (parenthesized_expression "(local_150 == (void *)0x0)" (( "(") (binary_expression "local_150 == (void *)0x0" (identifier "local_150") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_00102a18;" (goto "goto") (statement_identifier "LAB_00102a18") (; ";"))) (goto_statement "goto LAB_00102867;" (goto "goto") (statement_identifier "LAB_00102867") (; ";")) (} "}")))) (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" (identifier "uVar18") (= "=") (call_expression "safe_strerror(-iVar7)" (identifier "safe_strerror") (argument_list "(-iVar7)" (( "(") (unary_expression "-iVar7" (- "-") (identifier "iVar7")) () ")")))) (; ";")) (expression_statement "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);" (call_expression "pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" (identifier "pr2serr") (argument_list "("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18)" (( "(") (string_literal ""sg_write_buffer: open error: %s: %s\n"" (" """) (string_content "sg_write_buffer: open error: %s: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "lVar19") (, ",") (identifier "uVar18") () ")"))) (; ";")) (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(-iVar7)" (identifier "sg_convert_errno") (argument_list "(-iVar7)" (( "(") (unary_expression "-iVar7" (- "-") (identifier "iVar7")) () ")")))) (; ";")) (if_statement "if (local_150 != (void *)0x0) goto LAB_00102867;" (if "if") (parenthesized_expression "(local_150 != (void *)0x0)" (( "(") (binary_expression "local_150 != (void *)0x0" (identifier "local_150") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_00102867;" (goto "goto") (statement_identifier "LAB_00102867") (; ";"))) (goto_statement "goto LAB_00102880;" (goto "goto") (statement_identifier "LAB_00102880") (; ";")) (} "}"))) (if_statement "if ((0 < local_170) || (local_190 != (char *)0x0)) {\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" (if "if") (parenthesized_expression "((0 < local_170) || (local_190 != (char *)0x0))" (( "(") (binary_expression "(0 < local_170) || (local_190 != (char *)0x0)" (parenthesized_expression "(0 < local_170)" (( "(") (binary_expression "0 < local_170" (number_literal "0") (< "<") (identifier "local_170")) () ")")) (|| "||") (parenthesized_expression "(local_190 != (char *)0x0)" (( "(") (binary_expression "local_190 != (char *)0x0" (identifier "local_190") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n        if (local_170 == 0) {\n          local_170 = 0x800000;\n        }\n        goto LAB_00102933;\n      }" ({ "{") (if_statement "if (local_170 == 0) {\n          local_170 = 0x800000;\n        }" (if "if") (parenthesized_expression "(local_170 == 0)" (( "(") (binary_expression "local_170 == 0" (identifier "local_170") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          local_170 = 0x800000;\n        }" ({ "{") (expression_statement "local_170 = 0x800000;" (assignment_expression "local_170 = 0x800000" (identifier "local_170") (= "=") (number_literal "0x800000")) (; ";")) (} "}"))) (goto_statement "goto LAB_00102933;" (goto "goto") (statement_identifier "LAB_00102933") (; ";")) (} "}"))) (if_statement "if (0 < local_16c) goto LAB_0010284e;" (if "if") (parenthesized_expression "(0 < local_16c)" (( "(") (binary_expression "0 < local_16c" (number_literal "0") (< "<") (identifier "local_16c")) () ")")) (goto_statement "goto LAB_0010284e;" (goto "goto") (statement_identifier "LAB_0010284e") (; ";"))) (expression_statement "local_178 = (void *)0x0;" (assignment_expression "local_178 = (void *)0x0" (identifier "local_178") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_00102f05:\n      if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" (statement_identifier "LAB_00102f05") (: ":") (if_statement "if (local_188 == 0) {\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }\n      else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        local_194 = local_188;\n        if (bVar4) goto LAB_00102859;\n      }" ({ "{") (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" (identifier "local_194") (= "=") (identifier "local_188")) (; ";")) (if_statement "if (bVar4) goto LAB_00102859;" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";"))) (} "}")) (else_clause "else {\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" (else "else") (compound_statement "{\n        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);\n        if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }\n      }" ({ "{") (expression_statement "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170);" (call_expression "pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" (identifier "pr2serr") (argument_list "("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8\n                ,local_17c,local_184,local_180,local_170)" (( "(") (string_literal ""sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n"" (" """) (string_content "sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar8") (, ",") (identifier "local_17c") (, ",") (identifier "local_184") (, ",") (identifier "local_180") (, ",") (identifier "local_170") () ")"))) (; ";")) (if_statement "if (bVar4) {\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");\n          goto LAB_00102859;\n        }" ({ "{") (expression_statement "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" (identifier "pr2serr") (argument_list "("skipping WRITE BUFFER(all in one) command due to --dry-run\n")" (( "(") (string_literal ""skipping WRITE BUFFER(all in one) command due to --dry-run\n"" (" """) (string_content "skipping WRITE BUFFER(all in one) command due to --dry-run") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_00102859;" (goto "goto") (statement_identifier "LAB_00102859") (; ";")) (} "}"))) (} "}"))))) (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" (identifier "iVar12") (= "=") (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" (identifier "sg_ll_write_buffer_v2") (argument_list "(iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,\n                          local_188)" (( "(") (identifier "iVar7") (, ",") (identifier "uVar8") (, ",") (identifier "local_17c") (, ",") (identifier "local_184") (, ",") (identifier "local_180") (, ",") (identifier "local_178") (, ",") (identifier "local_170") (, ",") (identifier "local_168") (, ",") (number_literal "1") (, ",") (identifier "local_188") () ")")))) (; ";")) (goto_statement "goto LAB_00102f58;" (goto "goto") (statement_identifier "LAB_00102f58") (; ";")) (} "}"))))) (expression_statement "pr2serr("version: %s\n","1.28 20180628");" (call_expression "pr2serr("version: %s\n","1.28 20180628")" (identifier "pr2serr") (argument_list "("version: %s\n","1.28 20180628")" (( "(") (string_literal ""version: %s\n"" (" """) (string_content "version: %s") (escape_sequence "\n") (" """)) (, ",") (string_literal ""1.28 20180628"" (" """) (string_content "1.28 20180628") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026b7;" (goto "goto") (statement_identifier "LAB_001026b7") (; ";")) (} "}"))) (switch_statement "switch(iVar7) {\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" (switch "switch") (parenthesized_expression "(iVar7)" (( "(") (identifier "iVar7") () ")")) (compound_statement "{\n  case 0x3f:\n  case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;\n  default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;\n  case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;\n  case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;\n  case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;\n  case 100:\n    bVar4 = true;\n    goto LAB_001023de;\n  case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;\n  case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;\n  case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;\n  case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;\n  case 0x74:\n    goto switchD_0010241f_caseD_74;\n  case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;\n  }" ({ "{") (case_statement "case 0x3f:" (case "case") (number_literal "0x3f") (: ":")) (case_statement "case 0x68:\n    local_194 = local_194 + 1;\n    goto LAB_001023de;" (case "case") (number_literal "0x68") (: ":") (expression_statement "local_194 = local_194 + 1;" (assignment_expression "local_194 = local_194 + 1" (identifier "local_194") (= "=") (binary_expression "local_194 + 1" (identifier "local_194") (+ "+") (number_literal "1"))) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "default:\n    pr2serr("unrecognised option code 0x%x ??\n",iVar7);\n    pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );\n    goto LAB_001026af;" (default "default") (: ":") (expression_statement "pr2serr("unrecognised option code 0x%x ??\n",iVar7);" (call_expression "pr2serr("unrecognised option code 0x%x ??\n",iVar7)" (identifier "pr2serr") (argument_list "("unrecognised option code 0x%x ??\n",iVar7)" (( "(") (string_literal ""unrecognised option code 0x%x ??\n"" (" """) (string_content "unrecognised option code 0x%x ??") (escape_sequence "\n") (" """)) (, ",") (identifier "iVar7") () ")"))) (; ";")) (expression_statement "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           );" (call_expression "pr2serr(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" (identifier "pr2serr") (argument_list "(\n           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n           )" (( "(") (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" (" """) (string_content "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]") (escape_sequence "\n") (string_content "                       [--length=LEN] [--mode=MO] [--offset=OFF]") (escape_sequence "\n") (string_content "                       [--read-stdin] [--skip=SKIP] [--specific=MS]") (escape_sequence "\n") (string_content "                       [--timeout=TO] [--verbose] [--version] DEVICE") (escape_sequence "\n") (string_content "  where:") (escape_sequence "\n") (string_content "    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer") (escape_sequence "\n") (string_content "                           command (def: 0 -> as many as possible)") (escape_sequence "\n") (string_content "    --dry-run|-d           skip WRITE BUFFER commands, do everything else") (escape_sequence "\n") (string_content "    --help|-h              print out usage message then exit") (escape_sequence "\n") (string_content "    --id=ID|-i ID          buffer identifier (0 (default) to 255)") (escape_sequence "\n") (string_content "    --in=FILE|-I FILE      read from FILE (") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content " read from stdin)") (escape_sequence "\n") (string_content "    --length=LEN|-l LEN    length in bytes to write; may be deduced from") (escape_sequence "\n") (string_content "                           FILE") (escape_sequence "\n") (string_content "    --mode=MO|-m MO        write buffer mode, MO is number or acronym") (escape_sequence "\n") (string_content "                           (def: 0 -> ") (escape_sequence "\'") (string_content "combined header and data") (escape_sequence "\'") (string_content " (obs))") (escape_sequence "\n") (string_content "    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)") (escape_sequence "\n") (string_content "    --read-stdin|-r        read from stdin (same as ") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content ")") (escape_sequence "\n") (string_content "    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading") (escape_sequence "\n") (string_content "    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)") (escape_sequence "\n") (string_content "    --timeout=TO|-t TO     command timeout in seconds (def: 300)") (escape_sequence "\n") (string_content "    --verbose|-v           increase verbosity") (escape_sequence "\n") (string_content "    --version|-V           print version string and exit") (escape_sequence "\n") (escape_sequence "\n") (string_content "Performs one or more SCSI WRITE BUFFER commands. Use ") (escape_sequence "\'") (string_content "-m xxx") (escape_sequence "\'") (string_content " to list") (escape_sequence "\n") (string_content "available modes. A chunk size of 4 KB (") (escape_sequence "\'") (string_content "--bpw=4k") (escape_sequence "\'") (string_content ") seems to work well.") (escape_sequence "\n") (string_content "Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";"))) (case_statement "case 0x49:\n    local_190 = optarg;\n    goto LAB_001023de;" (case "case") (number_literal "0x49") (: ":") (expression_statement "local_190 = optarg;" (assignment_expression "local_190 = optarg" (identifier "local_190") (= "=") (identifier "optarg")) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x53:\n    local_17c = sg_get_num(optarg);\n    if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x53") (: ":") (expression_statement "local_17c = sg_get_num(optarg);" (assignment_expression "local_17c = sg_get_num(optarg)" (identifier "local_17c") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (7 < local_17c) {\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(7 < local_17c)" (( "(") (binary_expression "7 < local_17c" (number_literal "7") (< "<") (identifier "local_17c")) () ")")) (compound_statement "{\n      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("expected argument to \'--specific\' to be 0 to 7\n");" (call_expression "pr2serr("expected argument to \'--specific\' to be 0 to 7\n")" (identifier "pr2serr") (argument_list "("expected argument to \'--specific\' to be 0 to 7\n")" (( "(") (string_literal ""expected argument to \'--specific\' to be 0 to 7\n"" (" """) (string_content "expected argument to ") (escape_sequence "\'") (string_content "--specific") (escape_sequence "\'") (string_content " to be 0 to 7") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x56:\n    bVar5 = true;\n    goto LAB_001023de;" (case "case") (number_literal "0x56") (: ":") (expression_statement "bVar5 = true;" (assignment_expression "bVar5 = true" (identifier "bVar5") (= "=") (true "true")) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x62:\n    local_16c = sg_get_num(optarg);\n    if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }\n    pcVar13 = strchr(optarg,0x2c);\n    if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x62") (: ":") (expression_statement "local_16c = sg_get_num(optarg);" (assignment_expression "local_16c = sg_get_num(optarg)" (identifier "local_16c") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (local_16c < 0) {\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(local_16c < 0)" (( "(") (binary_expression "local_16c < 0" (identifier "local_16c") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      pr2serr("argument to \'--bpw\' should be in a positive number\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("argument to \'--bpw\' should be in a positive number\n");" (call_expression "pr2serr("argument to \'--bpw\' should be in a positive number\n")" (identifier "pr2serr") (argument_list "("argument to \'--bpw\' should be in a positive number\n")" (( "(") (string_literal ""argument to \'--bpw\' should be in a positive number\n"" (" """) (string_content "argument to ") (escape_sequence "\'") (string_content "--bpw") (escape_sequence "\'") (string_content " should be in a positive number") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (expression_statement "pcVar13 = strchr(optarg,0x2c);" (assignment_expression "pcVar13 = strchr(optarg,0x2c)" (identifier "pcVar13") (= "=") (call_expression "strchr(optarg,0x2c)" (identifier "strchr") (argument_list "(optarg,0x2c)" (( "(") (identifier "optarg") (, ",") (number_literal "0x2c") () ")")))) (; ";")) (if_statement "if (pcVar13 != (char *)0x0) {\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" (if "if") (parenthesized_expression "(pcVar13 != (char *)0x0)" (( "(") (binary_expression "pcVar13 != (char *)0x0" (identifier "pcVar13") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      iVar7 = strncmp("act",pcVar13 + 1,3);\n      if (iVar7 == 0) {\n        bVar2 = true;\n      }\n    }" ({ "{") (expression_statement "iVar7 = strncmp("act",pcVar13 + 1,3);" (assignment_expression "iVar7 = strncmp("act",pcVar13 + 1,3)" (identifier "iVar7") (= "=") (call_expression "strncmp("act",pcVar13 + 1,3)" (identifier "strncmp") (argument_list "("act",pcVar13 + 1,3)" (( "(") (string_literal ""act"" (" """) (string_content "act") (" """)) (, ",") (binary_expression "pcVar13 + 1" (identifier "pcVar13") (+ "+") (number_literal "1")) (, ",") (number_literal "3") () ")")))) (; ";")) (if_statement "if (iVar7 == 0) {\n        bVar2 = true;\n      }" (if "if") (parenthesized_expression "(iVar7 == 0)" (( "(") (binary_expression "iVar7 == 0" (identifier "iVar7") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        bVar2 = true;\n      }" ({ "{") (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" (identifier "bVar2") (= "=") (true "true")) (; ";")) (} "}"))) (} "}"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 100:\n    bVar4 = true;\n    goto LAB_001023de;" (case "case") (number_literal "100") (: ":") (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" (identifier "bVar4") (= "=") (true "true")) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x69:\n    local_184 = sg_get_num(optarg);\n    if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x69") (: ":") (expression_statement "local_184 = sg_get_num(optarg);" (assignment_expression "local_184 = sg_get_num(optarg)" (identifier "local_184") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (0xff < local_184) {\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(0xff < local_184)" (( "(") (binary_expression "0xff < local_184" (number_literal "0xff") (< "<") (identifier "local_184")) () ")")) (compound_statement "{\n      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("argument to \'--id\' should be in the range 0 to 255\n");" (call_expression "pr2serr("argument to \'--id\' should be in the range 0 to 255\n")" (identifier "pr2serr") (argument_list "("argument to \'--id\' should be in the range 0 to 255\n")" (( "(") (string_literal ""argument to \'--id\' should be in the range 0 to 255\n"" (" """) (string_content "argument to ") (escape_sequence "\'") (string_content "--id") (escape_sequence "\'") (string_content " should be in the range 0 to 255") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x6c:\n    local_170 = sg_get_num(optarg);\n    if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }\n    bVar3 = true;\n    goto LAB_001023de;" (case "case") (number_literal "0x6c") (: ":") (expression_statement "local_170 = sg_get_num(optarg);" (assignment_expression "local_170 = sg_get_num(optarg)" (identifier "local_170") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (local_170 < 0) {\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(local_170 < 0)" (( "(") (binary_expression "local_170 < 0" (identifier "local_170") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      pr2serr("bad argument to \'--length\'\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("bad argument to \'--length\'\n");" (call_expression "pr2serr("bad argument to \'--length\'\n")" (identifier "pr2serr") (argument_list "("bad argument to \'--length\'\n")" (( "(") (string_literal ""bad argument to \'--length\'\n"" (" """) (string_content "bad argument to ") (escape_sequence "\'") (string_content "--length") (escape_sequence "\'") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" (identifier "bVar3") (= "=") (true "true")) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x6d:\n    ppuVar14 = __ctype_b_loc();\n    pcVar13 = optarg;\n    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x6d") (: ":") (expression_statement "ppuVar14 = __ctype_b_loc();" (assignment_expression "ppuVar14 = __ctype_b_loc()" (identifier "ppuVar14") (= "=") (call_expression "__ctype_b_loc()" (identifier "__ctype_b_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar13 = optarg;" (assignment_expression "pcVar13 = optarg" (identifier "pcVar13") (= "=") (identifier "optarg")) (; ";")) (if_statement "if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }\n    else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" (if "if") (parenthesized_expression "((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0)" (( "(") (binary_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0" (parenthesized_expression "(*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8)" (( "(") (binary_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8" (pointer_expression "*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" (* "*") (cast_expression "(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)*ppuVar14 + (long)*optarg * 2 + 1)" (( "(") (binary_expression "(long)*ppuVar14 + (long)*optarg * 2 + 1" (binary_expression "(long)*ppuVar14 + (long)*optarg * 2" (cast_expression "(long)*ppuVar14" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*ppuVar14" (* "*") (identifier "ppuVar14"))) (+ "+") (binary_expression "(long)*optarg * 2" (cast_expression "(long)*optarg" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*optarg" (* "*") (identifier "optarg"))) (* "*") (number_literal "2"))) (+ "+") (number_literal "1")) () ")")))) (& "&") (number_literal "8")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      lVar19 = -1;\n      pcVar20 = optarg;\n      do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');\n      if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }\n      ppuVar22 = &PTR_DAT_00107020;\n      pcVar20 = PTR_DAT_00107020;\n      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }\n      uVar8 = *(uint *)(ppuVar22 + 1);\n    }" ({ "{") (expression_statement "lVar19 = -1;" (assignment_expression "lVar19 = -1" (identifier "lVar19") (= "=") (number_literal "-1")) (; ";")) (expression_statement "pcVar20 = optarg;" (assignment_expression "pcVar20 = optarg" (identifier "pcVar20") (= "=") (identifier "optarg")) (; ";")) (do_statement "do {\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      } while (cVar6 != '\0');" (do "do") (compound_statement "{\n        if (lVar19 == 0) break;\n        lVar19 = lVar19 + -1;\n        cVar6 = *pcVar20;\n        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;\n      }" ({ "{") (if_statement "if (lVar19 == 0) break;" (if "if") (parenthesized_expression "(lVar19 == 0)" (( "(") (binary_expression "lVar19 == 0" (identifier "lVar19") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "lVar19 = lVar19 + -1;" (assignment_expression "lVar19 = lVar19 + -1" (identifier "lVar19") (= "=") (binary_expression "lVar19 + -1" (identifier "lVar19") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "cVar6 = *pcVar20;" (assignment_expression "cVar6 = *pcVar20" (identifier "cVar6") (= "=") (pointer_expression "*pcVar20" (* "*") (identifier "pcVar20"))) (; ";")) (expression_statement "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;" (assignment_expression "pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1" (identifier "pcVar20") (= "=") (binary_expression "pcVar20 + (ulong)bVar23 * -2 + 1" (binary_expression "pcVar20 + (ulong)bVar23 * -2" (identifier "pcVar20") (+ "+") (binary_expression "(ulong)bVar23 * -2" (cast_expression "(ulong)bVar23" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "bVar23")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(cVar6 != '\0')" (( "(") (binary_expression "cVar6 != '\0'" (identifier "cVar6") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (; ";")) (if_statement "if (PTR_DAT_00107020 == (undefined *)0x0) {\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" (if "if") (parenthesized_expression "(PTR_DAT_00107020 == (undefined *)0x0)" (( "(") (binary_expression "PTR_DAT_00107020 == (undefined *)0x0" (identifier "PTR_DAT_00107020") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_001025b2:\n        FUN_001022c5();\n        goto LAB_001026af;\n      }" ({ "{") (labeled_statement "LAB_001025b2:\n        FUN_001022c5();" (statement_identifier "LAB_001025b2") (: ":") (expression_statement "FUN_001022c5();" (call_expression "FUN_001022c5()" (identifier "FUN_001022c5") (argument_list "()" (( "(") () ")"))) (; ";"))) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (expression_statement "ppuVar22 = &PTR_DAT_00107020;" (assignment_expression "ppuVar22 = &PTR_DAT_00107020" (identifier "ppuVar22") (= "=") (pointer_expression "&PTR_DAT_00107020" (& "&") (identifier "PTR_DAT_00107020"))) (; ";")) (expression_statement "pcVar20 = PTR_DAT_00107020;" (assignment_expression "pcVar20 = PTR_DAT_00107020" (identifier "pcVar20") (= "=") (identifier "PTR_DAT_00107020")) (; ";")) (while_statement "while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" (while "while") (parenthesized_expression "(iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0)" (( "(") (comma_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0" (assignment_expression "iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" (identifier "iVar7") (= "=") (call_expression "strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" (identifier "strncmp") (argument_list "(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1))" (( "(") (identifier "pcVar20") (, ",") (identifier "pcVar13") (, ",") (cast_expression "(long)(int)(~(uint)lVar19 - 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)(~(uint)lVar19 - 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(~(uint)lVar19 - 1)" (( "(") (binary_expression "~(uint)lVar19 - 1" (unary_expression "~(uint)lVar19" (~ "~") (cast_expression "(uint)lVar19" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "lVar19"))) (- "-") (number_literal "1")) () ")")))) () ")")))) (, ",") (binary_expression "iVar7 != 0" (identifier "iVar7") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n        ppuVar22 = ppuVar22 + 3;\n        pcVar20 = *ppuVar22;\n        if (pcVar20 == (char *)0x0) goto LAB_001025b2;\n      }" ({ "{") (expression_statement "ppuVar22 = ppuVar22 + 3;" (assignment_expression "ppuVar22 = ppuVar22 + 3" (identifier "ppuVar22") (= "=") (binary_expression "ppuVar22 + 3" (identifier "ppuVar22") (+ "+") (number_literal "3"))) (; ";")) (expression_statement "pcVar20 = *ppuVar22;" (assignment_expression "pcVar20 = *ppuVar22" (identifier "pcVar20") (= "=") (pointer_expression "*ppuVar22" (* "*") (identifier "ppuVar22"))) (; ";")) (if_statement "if (pcVar20 == (char *)0x0) goto LAB_001025b2;" (if "if") (parenthesized_expression "(pcVar20 == (char *)0x0)" (( "(") (binary_expression "pcVar20 == (char *)0x0" (identifier "pcVar20") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_001025b2;" (goto "goto") (statement_identifier "LAB_001025b2") (; ";"))) (} "}"))) (expression_statement "uVar8 = *(uint *)(ppuVar22 + 1);" (assignment_expression "uVar8 = *(uint *)(ppuVar22 + 1)" (identifier "uVar8") (= "=") (pointer_expression "*(uint *)(ppuVar22 + 1)" (* "*") (cast_expression "(uint *)(ppuVar22 + 1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(ppuVar22 + 1)" (( "(") (binary_expression "ppuVar22 + 1" (identifier "ppuVar22") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" (else "else") (compound_statement "{\n      uVar8 = sg_get_num(optarg);\n      if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }\n    }" ({ "{") (expression_statement "uVar8 = sg_get_num(optarg);" (assignment_expression "uVar8 = sg_get_num(optarg)" (identifier "uVar8") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (0x1f < uVar8) {\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" (if "if") (parenthesized_expression "(0x1f < uVar8)" (( "(") (binary_expression "0x1f < uVar8" (number_literal "0x1f") (< "<") (identifier "uVar8")) () ")")) (compound_statement "{\n        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");\n        goto LAB_001026af;\n      }" ({ "{") (expression_statement "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");" (call_expression "pr2serr("argument to \'--mode\' should be in the range 0 to 31\n")" (identifier "pr2serr") (argument_list "("argument to \'--mode\' should be in the range 0 to 31\n")" (( "(") (string_literal ""argument to \'--mode\' should be in the range 0 to 31\n"" (" """) (string_content "argument to ") (escape_sequence "\'") (string_content "--mode") (escape_sequence "\'") (string_content " should be in the range 0 to 31") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (} "}")))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x6f:\n    local_180 = sg_get_num(optarg);\n    if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x6f") (: ":") (expression_statement "local_180 = sg_get_num(optarg);" (assignment_expression "local_180 = sg_get_num(optarg)" (identifier "local_180") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (local_180 < 0) {\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(local_180 < 0)" (( "(") (binary_expression "local_180 < 0" (identifier "local_180") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      pr2serr("bad argument to \'--offset\'\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("bad argument to \'--offset\'\n");" (call_expression "pr2serr("bad argument to \'--offset\'\n")" (identifier "pr2serr") (argument_list "("bad argument to \'--offset\'\n")" (( "(") (string_literal ""bad argument to \'--offset\'\n"" (" """) (string_content "bad argument to ") (escape_sequence "\'") (string_content "--offset") (escape_sequence "\'") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x72:\n    local_190 = "-";\n    goto LAB_001023de;" (case "case") (number_literal "0x72") (: ":") (expression_statement "local_190 = "-";" (assignment_expression "local_190 = "-"" (identifier "local_190") (= "=") (string_literal ""-"" (" """) (string_content "-") (" """))) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x73:\n    local_164 = sg_get_num(optarg);\n    if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }\n    goto LAB_001023de;" (case "case") (number_literal "0x73") (: ":") (expression_statement "local_164 = sg_get_num(optarg);" (assignment_expression "local_164 = sg_get_num(optarg)" (identifier "local_164") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";")) (if_statement "if (local_164 < 0) {\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" (if "if") (parenthesized_expression "(local_164 < 0)" (( "(") (binary_expression "local_164 < 0" (identifier "local_164") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      pr2serr("bad argument to \'--skip\'\n");\n      goto LAB_001026af;\n    }" ({ "{") (expression_statement "pr2serr("bad argument to \'--skip\'\n");" (call_expression "pr2serr("bad argument to \'--skip\'\n")" (identifier "pr2serr") (argument_list "("bad argument to \'--skip\'\n")" (( "(") (string_literal ""bad argument to \'--skip\'\n"" (" """) (string_content "bad argument to ") (escape_sequence "\'") (string_content "--skip") (escape_sequence "\'") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (goto_statement "goto LAB_001026af;" (goto "goto") (statement_identifier "LAB_001026af") (; ";")) (} "}"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (case_statement "case 0x74:\n    goto switchD_0010241f_caseD_74;" (case "case") (number_literal "0x74") (: ":") (goto_statement "goto switchD_0010241f_caseD_74;" (goto "goto") (statement_identifier "switchD_0010241f_caseD_74") (; ";"))) (case_statement "case 0x76:\n    local_188 = local_188 + 1;\n    bVar1 = true;\n    goto LAB_001023de;" (case "case") (number_literal "0x76") (: ":") (expression_statement "local_188 = local_188 + 1;" (assignment_expression "local_188 = local_188 + 1" (identifier "local_188") (= "=") (binary_expression "local_188 + 1" (identifier "local_188") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "bVar1 = true;" (assignment_expression "bVar1 = true" (identifier "bVar1") (= "=") (true "true")) (; ";")) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";"))) (} "}"))) (labeled_statement "LAB_0010272c:\n  do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" (statement_identifier "LAB_0010272c") (: ":") (do_statement "do {\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  } while (optind < param_1);" (do "do") (compound_statement "{\n    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));\n    optind = optind + 1;\n  }" ({ "{") (expression_statement "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));" (call_expression "pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" (identifier "pr2serr") (argument_list "("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8))" (( "(") (string_literal ""Unexpected extra argument: %s\n"" (" """) (string_content "Unexpected extra argument: %s") (escape_sequence "\n") (" """)) (, ",") (pointer_expression "*(undefined8 *)(param_2 + (long)optind * 8)" (* "*") (cast_expression "(undefined8 *)(param_2 + (long)optind * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + (long)optind * 8)" (( "(") (binary_expression "param_2 + (long)optind * 8" (identifier "param_2") (+ "+") (binary_expression "(long)optind * 8" (cast_expression "(long)optind" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "optind")) (* "*") (number_literal "8"))) () ")")))) () ")"))) (; ";")) (expression_statement "optind = optind + 1;" (assignment_expression "optind = optind + 1" (identifier "optind") (= "=") (binary_expression "optind + 1" (identifier "optind") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(optind < param_1)" (( "(") (binary_expression "optind < param_1" (identifier "optind") (< "<") (identifier "param_1")) () ")")) (; ";"))) (expression_statement "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         );" (call_expression "pr2serr(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" (identifier "pr2serr") (argument_list "(\n         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"\n         )" (( "(") (string_literal ""Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"" (" """) (string_content "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]") (escape_sequence "\n") (string_content "                       [--length=LEN] [--mode=MO] [--offset=OFF]") (escape_sequence "\n") (string_content "                       [--read-stdin] [--skip=SKIP] [--specific=MS]") (escape_sequence "\n") (string_content "                       [--timeout=TO] [--verbose] [--version] DEVICE") (escape_sequence "\n") (string_content "  where:") (escape_sequence "\n") (string_content "    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer") (escape_sequence "\n") (string_content "                           command (def: 0 -> as many as possible)") (escape_sequence "\n") (string_content "    --dry-run|-d           skip WRITE BUFFER commands, do everything else") (escape_sequence "\n") (string_content "    --help|-h              print out usage message then exit") (escape_sequence "\n") (string_content "    --id=ID|-i ID          buffer identifier (0 (default) to 255)") (escape_sequence "\n") (string_content "    --in=FILE|-I FILE      read from FILE (") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content " read from stdin)") (escape_sequence "\n") (string_content "    --length=LEN|-l LEN    length in bytes to write; may be deduced from") (escape_sequence "\n") (string_content "                           FILE") (escape_sequence "\n") (string_content "    --mode=MO|-m MO        write buffer mode, MO is number or acronym") (escape_sequence "\n") (string_content "                           (def: 0 -> ") (escape_sequence "\'") (string_content "combined header and data") (escape_sequence "\'") (string_content " (obs))") (escape_sequence "\n") (string_content "    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)") (escape_sequence "\n") (string_content "    --read-stdin|-r        read from stdin (same as ") (escape_sequence "\'") (string_content "-I -") (escape_sequence "\'") (string_content ")") (escape_sequence "\n") (string_content "    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading") (escape_sequence "\n") (string_content "    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)") (escape_sequence "\n") (string_content "    --timeout=TO|-t TO     command timeout in seconds (def: 300)") (escape_sequence "\n") (string_content "    --verbose|-v           increase verbosity") (escape_sequence "\n") (string_content "    --version|-V           print version string and exit") (escape_sequence "\n") (escape_sequence "\n") (string_content "Performs one or more SCSI WRITE BUFFER commands. Use ") (escape_sequence "\'") (string_content "-m xxx") (escape_sequence "\'") (string_content " to list") (escape_sequence "\n") (string_content "available modes. A chunk size of 4 KB (") (escape_sequence "\'") (string_content "--bpw=4k") (escape_sequence "\'") (string_content ") seems to work well.") (escape_sequence "\n") (string_content "Example: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" (identifier "local_194") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_001026b7;" (goto "goto") (statement_identifier "LAB_001026b7") (; ";")) (labeled_statement "LAB_00102da3:\n  if (iVar11 <= iVar9) goto LAB_0010284e;" (statement_identifier "LAB_00102da3") (: ":") (if_statement "if (iVar11 <= iVar9) goto LAB_0010284e;" (if "if") (parenthesized_expression "(iVar11 <= iVar9)" (( "(") (binary_expression "iVar11 <= iVar9" (identifier "iVar11") (<= "<=") (identifier "iVar9")) () ")")) (goto_statement "goto LAB_0010284e;" (goto "goto") (statement_identifier "LAB_0010284e") (; ";")))) (expression_statement "iVar10 = iVar11 - iVar9;" (assignment_expression "iVar10 = iVar11 - iVar9" (identifier "iVar10") (= "=") (binary_expression "iVar11 - iVar9" (identifier "iVar11") (- "-") (identifier "iVar9"))) (; ";")) (if_statement "if (local_16c < iVar11 - iVar9) {\n    iVar10 = local_16c;\n  }" (if "if") (parenthesized_expression "(local_16c < iVar11 - iVar9)" (( "(") (binary_expression "local_16c < iVar11 - iVar9" (identifier "local_16c") (< "<") (binary_expression "iVar11 - iVar9" (identifier "iVar11") (- "-") (identifier "iVar9"))) () ")")) (compound_statement "{\n    iVar10 = local_16c;\n  }" ({ "{") (expression_statement "iVar10 = local_16c;" (assignment_expression "iVar10 = local_16c" (identifier "iVar10") (= "=") (identifier "local_16c")) (; ";")) (} "}"))) (if_statement "if (local_188 == 0) {\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }\n  else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }\n  }" ({ "{") (if_statement "if (!bVar4) {\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" (if "if") (parenthesized_expression "(!bVar4)" (( "(") (unary_expression "!bVar4" (! "!") (identifier "bVar4")) () ")")) (compound_statement "{\nLAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);\n      if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }\n    }" ({ "{") (labeled_statement "LAB_00102d61:\n      iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" (statement_identifier "LAB_00102d61") (: ":") (expression_statement "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" (identifier "iVar12") (= "=") (call_expression "sg_ll_write_buffer_v2\n                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" (identifier "sg_ll_write_buffer_v2") (argument_list "(iVar7,uVar8,local_17c,local_184,iVar9 + local_180,\n                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188)" (( "(") (identifier "iVar7") (, ",") (identifier "uVar8") (, ",") (identifier "local_17c") (, ",") (identifier "local_184") (, ",") (binary_expression "iVar9 + local_180" (identifier "iVar9") (+ "+") (identifier "local_180")) (, ",") (binary_expression "(long)local_178 + (long)iVar9" (cast_expression "(long)local_178" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "local_178")) (+ "+") (cast_expression "(long)iVar9" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar9"))) (, ",") (identifier "iVar10") (, ",") (identifier "local_168") (, ",") (number_literal "1") (, ",") (identifier "local_188") () ")")))) (; ";"))) (if_statement "if (iVar12 != 0) {\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" (if "if") (parenthesized_expression "(iVar12 != 0)" (( "(") (binary_expression "iVar12 != 0" (identifier "iVar12") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        if (bVar2) goto LAB_00102ea4;\n        goto LAB_00102f66;\n      }" ({ "{") (if_statement "if (bVar2) goto LAB_00102ea4;" (if "if") (parenthesized_expression "(bVar2)" (( "(") (identifier "bVar2") () ")")) (goto_statement "goto LAB_00102ea4;" (goto "goto") (statement_identifier "LAB_00102ea4") (; ";"))) (goto_statement "goto LAB_00102f66;" (goto "goto") (statement_identifier "LAB_00102f66") (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" (else "else") (compound_statement "{\n    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);\n    if (!bVar4) goto LAB_00102d61;\n    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");\n  }" ({ "{") (expression_statement "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10);" (call_expression "pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" (identifier "pr2serr") (argument_list "("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c\n            ,local_184,iVar9 + local_180,iVar10)" (( "(") (string_literal ""sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n"" (" """) (string_content "sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar8") (, ",") (identifier "local_17c") (, ",") (identifier "local_184") (, ",") (binary_expression "iVar9 + local_180" (identifier "iVar9") (+ "+") (identifier "local_180")) (, ",") (identifier "iVar10") () ")"))) (; ";")) (if_statement "if (!bVar4) goto LAB_00102d61;" (if "if") (parenthesized_expression "(!bVar4)" (( "(") (unary_expression "!bVar4" (! "!") (identifier "bVar4")) () ")")) (goto_statement "goto LAB_00102d61;" (goto "goto") (statement_identifier "LAB_00102d61") (; ";"))) (expression_statement "pr2serr("skipping WRITE BUFFER command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER command due to --dry-run\n")" (identifier "pr2serr") (argument_list "("skipping WRITE BUFFER command due to --dry-run\n")" (( "(") (string_literal ""skipping WRITE BUFFER command due to --dry-run\n"" (" """) (string_content "skipping WRITE BUFFER command due to --dry-run") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}")))) (expression_statement "iVar9 = iVar9 + iVar10;" (assignment_expression "iVar9 = iVar9 + iVar10" (identifier "iVar9") (= "=") (binary_expression "iVar9 + iVar10" (identifier "iVar9") (+ "+") (identifier "iVar10"))) (; ";")) (goto_statement "goto LAB_00102da3;" (goto "goto") (statement_identifier "LAB_00102da3") (; ";")) (labeled_statement "LAB_0010284e:\n  if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" (statement_identifier "LAB_0010284e") (: ":") (if_statement "if (bVar2) {\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" (if "if") (parenthesized_expression "(bVar2)" (( "(") (identifier "bVar2") () ")")) (compound_statement "{\nLAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }\n  }" ({ "{") (labeled_statement "LAB_00102ea4:\n    if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" (statement_identifier "LAB_00102ea4") (: ":") (if_statement "if (local_188 == 0) {\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }\n    else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      local_194 = local_188;\n      if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }\n    }" ({ "{") (expression_statement "local_194 = local_188;" (assignment_expression "local_194 = local_188" (identifier "local_194") (= "=") (identifier "local_188")) (; ";")) (if_statement "if (!bVar4) {\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" (if "if") (parenthesized_expression "(!bVar4)" (( "(") (unary_expression "!bVar4" (! "!") (identifier "bVar4")) () ")")) (compound_statement "{\nLAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);\nLAB_00102f58:\n        local_194 = iVar12;\n        if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }\n      }" ({ "{") (labeled_statement "LAB_00102ec2:\n        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" (statement_identifier "LAB_00102ec2") (: ":") (expression_statement "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);" (assignment_expression "iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" (identifier "iVar12") (= "=") (call_expression "sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" (identifier "sg_ll_write_buffer_v2") (argument_list "(iVar7,0xf,0,0,0,0,0,local_168,1,local_188)" (( "(") (identifier "iVar7") (, ",") (number_literal "0xf") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "local_168") (, ",") (number_literal "1") (, ",") (identifier "local_188") () ")")))) (; ";"))) (labeled_statement "LAB_00102f58:\n        local_194 = iVar12;" (statement_identifier "LAB_00102f58") (: ":") (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" (identifier "local_194") (= "=") (identifier "iVar12")) (; ";"))) (if_statement "if (iVar12 != 0) {\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" (if "if") (parenthesized_expression "(iVar12 != 0)" (( "(") (binary_expression "iVar12 != 0" (identifier "iVar12") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);\n          pr2serr("Write buffer failed: %s\n",local_148);\n          local_194 = iVar12;\n        }" ({ "{") (labeled_statement "LAB_00102f66:\n          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" (statement_identifier "LAB_00102f66") (: ":") (expression_statement "sg_get_category_sense_str(iVar12,0x50,local_148,local_188);" (call_expression "sg_get_category_sense_str(iVar12,0x50,local_148,local_188)" (identifier "sg_get_category_sense_str") (argument_list "(iVar12,0x50,local_148,local_188)" (( "(") (identifier "iVar12") (, ",") (number_literal "0x50") (, ",") (identifier "local_148") (, ",") (identifier "local_188") () ")"))) (; ";"))) (expression_statement "pr2serr("Write buffer failed: %s\n",local_148);" (call_expression "pr2serr("Write buffer failed: %s\n",local_148)" (identifier "pr2serr") (argument_list "("Write buffer failed: %s\n",local_148)" (( "(") (string_literal ""Write buffer failed: %s\n"" (" """) (string_content "Write buffer failed: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "local_148") () ")"))) (; ";")) (expression_statement "local_194 = iVar12;" (assignment_expression "local_194 = iVar12" (identifier "local_194") (= "=") (identifier "iVar12")) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" (else "else") (compound_statement "{\n      pr2serr("sending Activate deferred microcode [0xf]\n");\n      if (!bVar4) goto LAB_00102ec2;\n      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");\n    }" ({ "{") (expression_statement "pr2serr("sending Activate deferred microcode [0xf]\n");" (call_expression "pr2serr("sending Activate deferred microcode [0xf]\n")" (identifier "pr2serr") (argument_list "("sending Activate deferred microcode [0xf]\n")" (( "(") (string_literal ""sending Activate deferred microcode [0xf]\n"" (" """) (string_content "sending Activate deferred microcode [0xf]") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (if_statement "if (!bVar4) goto LAB_00102ec2;" (if "if") (parenthesized_expression "(!bVar4)" (( "(") (unary_expression "!bVar4" (! "!") (identifier "bVar4")) () ")")) (goto_statement "goto LAB_00102ec2;" (goto "goto") (statement_identifier "LAB_00102ec2") (; ";"))) (expression_statement "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");" (call_expression "pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" (identifier "pr2serr") (argument_list "("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n")" (( "(") (string_literal ""skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n"" (" """) (string_content "skipping WRITE BUFFER(ACTIVATE) command due to --dry-run") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))))) (} "}")))) (labeled_statement "LAB_00102859:\n  if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" (statement_identifier "LAB_00102859") (: ":") (if_statement "if (local_150 == (void *)0x0) {\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }\n  else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" (if "if") (parenthesized_expression "(local_150 == (void *)0x0)" (( "(") (binary_expression "local_150 == (void *)0x0" (identifier "local_150") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);\n    if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }\n  }" ({ "{") (labeled_statement "LAB_00102e47:\n    iVar7 = sg_cmds_close_device(iVar7);" (statement_identifier "LAB_00102e47") (: ":") (expression_statement "iVar7 = sg_cmds_close_device(iVar7);" (assignment_expression "iVar7 = sg_cmds_close_device(iVar7)" (identifier "iVar7") (= "=") (call_expression "sg_cmds_close_device(iVar7)" (identifier "sg_cmds_close_device") (argument_list "(iVar7)" (( "(") (identifier "iVar7") () ")")))) (; ";"))) (if_statement "if (iVar7 < 0) {\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" (if "if") (parenthesized_expression "(iVar7 < 0)" (( "(") (binary_expression "iVar7 < 0" (identifier "iVar7") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      uVar18 = safe_strerror(-iVar7);\n      pr2serr("close error: %s\n",uVar18);\n      if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }\n    }" ({ "{") (expression_statement "uVar18 = safe_strerror(-iVar7);" (assignment_expression "uVar18 = safe_strerror(-iVar7)" (identifier "uVar18") (= "=") (call_expression "safe_strerror(-iVar7)" (identifier "safe_strerror") (argument_list "(-iVar7)" (( "(") (unary_expression "-iVar7" (- "-") (identifier "iVar7")) () ")")))) (; ";")) (expression_statement "pr2serr("close error: %s\n",uVar18);" (call_expression "pr2serr("close error: %s\n",uVar18)" (identifier "pr2serr") (argument_list "("close error: %s\n",uVar18)" (( "(") (string_literal ""close error: %s\n"" (" """) (string_content "close error: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar18") () ")"))) (; ";")) (if_statement "if (local_194 == 0) {\n        local_194 = sg_convert_errno(-iVar7);\n      }" (if "if") (parenthesized_expression "(local_194 == 0)" (( "(") (binary_expression "local_194 == 0" (identifier "local_194") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        local_194 = sg_convert_errno(-iVar7);\n      }" ({ "{") (expression_statement "local_194 = sg_convert_errno(-iVar7);" (assignment_expression "local_194 = sg_convert_errno(-iVar7)" (identifier "local_194") (= "=") (call_expression "sg_convert_errno(-iVar7)" (identifier "sg_convert_errno") (argument_list "(-iVar7)" (( "(") (unary_expression "-iVar7" (- "-") (identifier "iVar7")) () ")")))) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" (else "else") (compound_statement "{\nLAB_00102867:\n    free(local_150);\n    if (-1 < iVar7) goto LAB_00102e47;\n  }" ({ "{") (labeled_statement "LAB_00102867:\n    free(local_150);" (statement_identifier "LAB_00102867") (: ":") (expression_statement "free(local_150);" (call_expression "free(local_150)" (identifier "free") (argument_list "(local_150)" (( "(") (identifier "local_150") () ")"))) (; ";"))) (if_statement "if (-1 < iVar7) goto LAB_00102e47;" (if "if") (parenthesized_expression "(-1 < iVar7)" (( "(") (binary_expression "-1 < iVar7" (number_literal "-1") (< "<") (identifier "iVar7")) () ")")) (goto_statement "goto LAB_00102e47;" (goto "goto") (statement_identifier "LAB_00102e47") (; ";"))) (} "}"))))) (if_statement "if (local_188 == 0) {\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" (if "if") (parenthesized_expression "(local_188 == 0)" (( "(") (binary_expression "local_188 == 0" (identifier "local_188") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);\n    if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }\n  }" ({ "{") (labeled_statement "LAB_00102a18:\n    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" (statement_identifier "LAB_00102a18") (: ":") (expression_statement "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);" (assignment_expression "cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194)" (identifier "cVar6") (= "=") (call_expression "sg_if_can2stderr("sg_write_buffer failed: ",local_194)" (identifier "sg_if_can2stderr") (argument_list "("sg_write_buffer failed: ",local_194)" (( "(") (string_literal ""sg_write_buffer failed: "" (" """) (string_content "sg_write_buffer failed: ") (" """)) (, ",") (identifier "local_194") () ")")))) (; ";"))) (if_statement "if (cVar6 == '\0') {\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" (if "if") (parenthesized_expression "(cVar6 == '\0')" (( "(") (binary_expression "cVar6 == '\0'" (identifier "cVar6") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");\n    }" ({ "{") (expression_statement "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");" (call_expression "pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" (identifier "pr2serr") (argument_list "("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n")" (( "(") (string_literal ""Some error occurred, try again with \'-v\' or \'-vv\' for more information\n"" (" """) (string_content "Some error occurred, try again with ") (escape_sequence "\'") (string_content "-v") (escape_sequence "\'") (string_content " or ") (escape_sequence "\'") (string_content "-vv") (escape_sequence "\'") (string_content " for more information") (escape_sequence "\n") (" """)) () ")"))) (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_00102880:\n  if (local_194 < 0) {\n    local_194 = 99;\n  }" (statement_identifier "LAB_00102880") (: ":") (if_statement "if (local_194 < 0) {\n    local_194 = 99;\n  }" (if "if") (parenthesized_expression "(local_194 < 0)" (( "(") (binary_expression "local_194 < 0" (identifier "local_194") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    local_194 = 99;\n  }" ({ "{") (expression_statement "local_194 = 99;" (assignment_expression "local_194 = 99" (identifier "local_194") (= "=") (number_literal "99")) (; ";")) (} "}")))) (goto_statement "goto LAB_001026b7;" (goto "goto") (statement_identifier "LAB_001026b7") (; ";")) (labeled_statement "switchD_0010241f_caseD_74:\n  local_168 = sg_get_num(optarg);" (statement_identifier "switchD_0010241f_caseD_74") (: ":") (expression_statement "local_168 = sg_get_num(optarg);" (assignment_expression "local_168 = sg_get_num(optarg)" (identifier "local_168") (= "=") (call_expression "sg_get_num(optarg)" (identifier "sg_get_num") (argument_list "(optarg)" (( "(") (identifier "optarg") () ")")))) (; ";"))) (if_statement "if (local_168 < 0) goto code_r0x00102669;" (if "if") (parenthesized_expression "(local_168 < 0)" (( "(") (binary_expression "local_168 < 0" (identifier "local_168") (< "<") (number_literal "0")) () ")")) (goto_statement "goto code_r0x00102669;" (goto "goto") (statement_identifier "code_r0x00102669") (; ";"))) (goto_statement "goto LAB_001023de;" (goto "goto") (statement_identifier "LAB_001023de") (; ";")) (labeled_statement "code_r0x00102669:\n  pr2serr("Invalid argument to \'--timeout\'\n");" (statement_identifier "code_r0x00102669") (: ":") (expression_statement "pr2serr("Invalid argument to \'--timeout\'\n");" (call_expression "pr2serr("Invalid argument to \'--timeout\'\n")" (identifier "pr2serr") (argument_list "("Invalid argument to \'--timeout\'\n")" (( "(") (string_literal ""Invalid argument to \'--timeout\'\n"" (" """) (string_content "Invalid argument to ") (escape_sequence "\'") (string_content "--timeout") (escape_sequence "\'") (escape_sequence "\n") (" """)) () ")"))) (; ";"))) (labeled_statement "LAB_001026af:\n  local_194 = 1;" (statement_identifier "LAB_001026af") (: ":") (expression_statement "local_194 = 1;" (assignment_expression "local_194 = 1" (identifier "local_194") (= "=") (number_literal "1")) (; ";"))) (labeled_statement "LAB_001026b7:\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\n  }" (statement_identifier "LAB_001026b7") (: ":") (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return local_194;\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    return local_194;\n  }" ({ "{") (return_statement "return local_194;" (return "return") (identifier "local_194") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(int var_8,char **argv)

{
  long var_55;
  bool bVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  bool bVar6;
  char var_45;
  int var_3;
  type_1 var_47;
  int var_19;
  int var_26;
  int var_28;
  int var_49;
  type_2 **ppuVar14;
  type_3 var_32;
  type_4 var_30;
  int *piVar17;
  type_5 uVar18;
  long var_43;
  char *var_9;
  size_t __n;
  char *var_44;
  type_3 uVar22;
  type_6 *var_46;
  long var_1;
  type_7 bVar24;
  int var_4;
  char *var_17;
  int var_33;
  type_1 var_41;
  int var_48;
  type_1 var_38;
  void *var_14;
  int var_10;
  int var_11;
  int var_54;
  int var_20;
  int option_index;
  uint8_t *var_34;
  char ebuff [256];
  
  bVar24 = 0;
  var_55 = *(long *)(var_1 + 0x28);
  var_34 = (uint8_t *)0x0;
  var_17 = (char *)0x0;
  var_38 = 0;
  var_54 = 300;
  var_20 = 0;
  var_48 = 0;
  var_47 = 0;
  var_10 = 0;
  var_41 = 0;
  var_33 = 0;
  var_4 = 0;
  var_11 = 0;
  bVar4 = false;
  bVar6 = false;
  bVar2 = false;
  bVar5 = false;
  bVar3 = false;
LAB_001023de:
  option_index = 0;
  var_3 = var_2(var_8,argv,"b:dhi:I:l:m:o:rs:S:t:vV",long_options,&option_index);
  if (var_3 == -1) {
    if (var_4 != 0) {
      if (var_4 < 2) {
        var_5(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        var_4 = 0;
      }
      else {
        var_5(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        var_5("\n");
        var_6();
        var_4 = 0;
      }
      goto LAB_001026b7;
    }
    if (var_7 < var_8) {
      var_9 = argv[var_7];
      var_7 = var_7 + 1;
      if (var_7 < var_8) goto LAB_0010272c;
    }
    else {
      var_9 = (char *)0x0;
    }
    if ((bVar2) && (bVar6)) {
      var_5("Not in DEBUG mode, so \'-vV\' has no special action\n");
    }
    else if (!bVar6) {
      if (var_9 == (char *)0x0) {
        var_5("Missing device name!\n\n");
        var_5(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        var_4 = 1;
        goto LAB_001026b7;
      }
      if ((var_10 < var_11) && (0 < var_10)) {
        var_5("trim chunk size (CS) to be the same as LEN\n");
        var_3 = var_12(var_9,0,var_33);
        if (var_3 < 0) goto LAB_001029f5;
        var_11 = var_10;
LAB_00102933:
        var_14 = (void *)var_13(var_10,0,&var_34,0);
        if (var_14 == (void *)0x0) {
          var_5("sg_write_buffer: out of memory\n");
          var_4 = var_15(0xc);
          goto LAB_00102859;
        }
        __n = (size_t)var_10;
        var_16(var_14,0xff,__n);
        if (var_17 == (char *)0x0) {
LAB_001029c2:
          var_28 = var_10;
          if (var_11 < 1) goto LAB_00102f05;
        }
        else {
          var_19 = var_18(var_17,"-");
          if (var_19 == 0) {
            if (var_20 < 1) {
              var_32 = var_21(0,var_14,__n);
              if (-1 < (int)var_32) {
                if ((int)var_32 < var_10) {
                  var_26 = 0;
                  goto LAB_00102c57;
                }
                goto LAB_001029c2;
              }
              piVar17 = var_22();
              var_4 = var_15(*piVar17);
              var_23(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",var_17
                            );
              var_24(ebuff);
            }
            else {
              var_5("Can\'t skip on stdin\n");
              var_4 = 0xf;
            }
            goto LAB_00102859;
          }
          var_26 = var_25(var_17,0);
          if (var_26 < 0) {
            piVar17 = var_22();
            var_4 = var_15(*piVar17);
            var_23(ebuff,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",
                           var_17);
            var_24(ebuff);
            goto LAB_00102859;
          }
          var_28 = var_27(var_26);
          if (var_28 < 0) {
            var_24("sg_set_binary_mode");
          }
          if ((0 < var_20) && (var_30 = var_29(var_26,(long)var_20,0), var_30 < 0)) {
            piVar17 = var_22();
            var_4 = var_15(*piVar17);
            var_23(ebuff,0x100,1,0x100,
                           "sg_write_buffer: couldn\'t skip to required position on %s",var_17);
            var_24(ebuff);
            var_31(var_26);
            goto LAB_00102859;
          }
          var_32 = var_21(var_26,var_14,__n);
          if ((int)var_32 < 0) {
            piVar17 = var_22();
            var_4 = var_15(*piVar17);
            var_23(ebuff,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",var_17);
            var_24(ebuff);
            var_31(var_26);
            goto LAB_00102859;
          }
          var_28 = var_10;
          if (var_10 <= (int)var_32) {
LAB_00102b35:
            var_31(var_26);
            var_10 = var_28;
            goto LAB_001029c2;
          }
LAB_00102c57:
          uVar22 = var_32 & 0xffffffff;
          var_28 = (int)var_32;
          if (bVar4) {
            var_5("tried to read %d bytes from %s, got %d bytes\n",var_10,var_17,uVar22);
            var_5("pad with 0xff bytes and continue\n");
            var_28 = var_10;
LAB_00102c65:
            var_10 = var_28;
            if (var_19 == 0) goto LAB_001029c2;
            goto LAB_00102b35;
          }
          if (var_33 == 0) goto LAB_00102c65;
          var_5("tried to read %d bytes from %s, got %d bytes\n",var_10,var_17,uVar22);
          var_5("will write %d bytes",uVar22);
          if ((var_11 < 1) || (var_10 <= var_11)) {
            var_5("\n");
            goto LAB_00102c65;
          }
          var_5(", %d bytes per WRITE BUFFER command\n");
          if (var_19 != 0) goto LAB_00102b35;
        }
        var_19 = 0;
        goto LAB_00102da3;
      }
      var_3 = var_12(var_9,0,var_33);
      if (var_3 < 0) {
LAB_001029f5:
        if (var_33 == 0) {
          var_4 = var_15(-var_3);
          if (var_34 == (uint8_t *)0x0) goto LAB_00102a18;
          goto LAB_00102867;
        }
        uVar18 = var_35(-var_3);
        var_5("sg_write_buffer: open error: %s: %s\n",var_9,uVar18);
        var_4 = var_15(-var_3);
        if (var_34 != (uint8_t *)0x0) goto LAB_00102867;
        goto LAB_00102880;
      }
      if ((0 < var_10) || (var_17 != (char *)0x0)) {
        if (var_10 == 0) {
          var_10 = 0x800000;
        }
        goto LAB_00102933;
      }
      if (0 < var_11) goto LAB_0010284e;
      var_14 = (void *)0x0;
LAB_00102f05:
      if (var_33 == 0) {
        var_4 = var_33;
        if (bVar5) goto LAB_00102859;
      }
      else {
        var_5("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",var_47
                ,var_38,var_41,var_48,var_10);
        if (bVar5) {
          var_5("skipping WRITE BUFFER(all in one) command due to --dry-run\n");
          goto LAB_00102859;
        }
      }
      var_49 = var_36
                         (var_3,var_47,var_38,var_41,var_48,var_14,var_10,var_54,1,
                          var_33);
      goto LAB_00102f58;
    }
    var_5("version: %s\n","1.28 20180628");
    goto LAB_001026b7;
  }
  switch(var_3) {
  case 0x3f:
  case 0x68:
    var_4 = var_4 + 1;
    goto LAB_001023de;
  default:
    var_5("unrecognised option code 0x%x ??\n",var_3);
    var_5(
           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
           );
    goto LAB_001026af;
  case 0x49:
    var_17 = optarg;
    goto LAB_001023de;
  case 0x53:
    var_38 = var_37(optarg);
    if (7 < var_38) {
      var_5("expected argument to \'--specific\' to be 0 to 7\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x56:
    bVar6 = true;
    goto LAB_001023de;
  case 0x62:
    var_11 = var_37(optarg);
    if (var_11 < 0) {
      var_5("argument to \'--bpw\' should be in a positive number\n");
      goto LAB_001026af;
    }
    var_9 = var_39(optarg,0x2c);
    if (var_9 != (char *)0x0) {
      var_3 = var_40("act",var_9 + 1,3);
      if (var_3 == 0) {
        bVar3 = true;
      }
    }
    goto LAB_001023de;
  case 100:
    bVar5 = true;
    goto LAB_001023de;
  case 0x69:
    var_41 = var_37(optarg);
    if (0xff < var_41) {
      var_5("argument to \'--id\' should be in the range 0 to 255\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x6c:
    var_10 = var_37(optarg);
    if (var_10 < 0) {
      var_5("bad argument to \'--length\'\n");
      goto LAB_001026af;
    }
    bVar4 = true;
    goto LAB_001023de;
  case 0x6d:
    ppuVar14 = var_42();
    var_9 = optarg;
    if ((*(type_7 *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {
      var_43 = -1;
      var_44 = optarg;
      do {
        if (var_43 == 0) break;
        var_43 = var_43 + -1;
        var_45 = *var_44;
        var_44 = var_44 + (type_3)bVar24 * -2 + 1;
      } while (var_45 != '\0');
      if (mode_arr[0].mode_string == (char *)0x0) {
LAB_001025b2:
        var_6();
        goto LAB_001026af;
      }
      var_46 = mode_arr;
      var_44 = mode_arr[0].mode_string;
      while (var_3 = var_40(var_44,var_9,(long)(int)(~(type_1)var_43 - 1)), var_3 != 0) {
        var_46 = var_46 + 1;
        var_44 = var_46->mode_string;
        if (var_44 == (char *)0x0) goto LAB_001025b2;
      }
      var_47 = var_46->mode;
    }
    else {
      var_47 = var_37(optarg);
      if (0x1f < var_47) {
        var_5("argument to \'--mode\' should be in the range 0 to 31\n");
        goto LAB_001026af;
      }
    }
    goto LAB_001023de;
  case 0x6f:
    var_48 = var_37(optarg);
    if (var_48 < 0) {
      var_5("bad argument to \'--offset\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x72:
    var_17 = "-";
    goto LAB_001023de;
  case 0x73:
    var_20 = var_37(optarg);
    if (var_20 < 0) {
      var_5("bad argument to \'--skip\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x74:
    goto switchD_0010241f_caseD_74;
  case 0x76:
    var_33 = var_33 + 1;
    bVar2 = true;
    goto LAB_001023de;
  }
LAB_0010272c:
  do {
    var_5("Unexpected extra argument: %s\n",argv[var_7]);
    var_7 = var_7 + 1;
  } while (var_7 < var_8);
  var_5(
         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
         );
  var_4 = 1;
  goto LAB_001026b7;
LAB_00102da3:
  if (var_28 <= var_19) goto LAB_0010284e;
  var_26 = var_28 - var_19;
  if (var_11 < var_28 - var_19) {
    var_26 = var_11;
  }
  if (var_33 == 0) {
    if (!bVar5) {
LAB_00102d61:
      var_49 = var_36
                         (var_3,var_47,var_38,var_41,var_19 + var_48,
                          (long)var_14 + (long)var_19,var_26,var_54,1,var_33);
      if (var_49 != 0) {
        if (bVar3) goto LAB_00102ea4;
        goto LAB_00102f66;
      }
    }
  }
  else {
    var_5("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",var_47,var_38
            ,var_41,var_19 + var_48,var_26);
    if (!bVar5) goto LAB_00102d61;
    var_5("skipping WRITE BUFFER command due to --dry-run\n");
  }
  var_19 = var_19 + var_26;
  goto LAB_00102da3;
LAB_0010284e:
  if (bVar3) {
LAB_00102ea4:
    if (var_33 == 0) {
      var_4 = var_33;
      if (!bVar5) {
LAB_00102ec2:
        var_49 = var_36(var_3,0xf,0,0,0,0,0,var_54,1,var_33);
LAB_00102f58:
        var_4 = var_49;
        if (var_49 != 0) {
LAB_00102f66:
          var_50(var_49,0x50,ebuff,var_33);
          var_5("Write buffer failed: %s\n",ebuff);
          var_4 = var_49;
        }
      }
    }
    else {
      var_5("sending Activate deferred microcode [0xf]\n");
      if (!bVar5) goto LAB_00102ec2;
      var_5("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");
    }
  }
LAB_00102859:
  if (var_34 == (uint8_t *)0x0) {
LAB_00102e47:
    var_3 = var_51(var_3);
    if (var_3 < 0) {
      uVar18 = var_35(-var_3);
      var_5("close error: %s\n",uVar18);
      if (var_4 == 0) {
        var_4 = var_15(-var_3);
      }
    }
  }
  else {
LAB_00102867:
    var_52(var_34);
    if (-1 < var_3) goto LAB_00102e47;
  }
  if (var_33 == 0) {
LAB_00102a18:
    var_45 = var_53("sg_write_buffer failed: ",var_4);
    if (var_45 == '\0') {
      var_5("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");
    }
  }
LAB_00102880:
  if (var_4 < 0) {
    var_4 = 99;
  }
  goto LAB_001026b7;
switchD_0010241f_caseD_74:
  var_54 = var_37(optarg);
  if (var_54 < 0) goto code_r0x00102669;
  goto LAB_001023de;
code_r0x00102669:
  var_5("Invalid argument to \'--timeout\'\n");
LAB_001026af:
  var_4 = 1;
LAB_001026b7:
  if (var_55 == *(long *)(var_1 + 0x28)) {
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_56();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (false))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (string_literal (string_content)) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (escape_sequence))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (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: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_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 (identifier)) right: (parenthesized_expression (identifier)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (compound_statement (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) (escape_sequence) (escape_sequence))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier)) (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (string_literal (string_content) (escape_sequence) (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (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)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (string_literal (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) (number_literal)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (string_literal (string_content) (escape_sequence) (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (string_literal (string_content) (escape_sequence) (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (escape_sequence))))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (goto_statement label: (statement_identifier)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier) (identifier) (identifier) (identifier) (number_literal) (identifier))))) (goto_statement label: (statement_identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (string_literal (string_content))))) (goto_statement label: (statement_identifier)))) (switch_statement condition: (parenthesized_expression (identifier)) body: (compound_statement (case_statement value: (number_literal)) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (goto_statement label: (statement_identifier))) (case_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (true))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (binary_expression left: (identifier) right: (number_literal)) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (true))))))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (true))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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) (escape_sequence) (string_content) (escape_sequence) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (true))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (pointer_expression argument: (identifier))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (pointer_expression argument: (identifier))) right: (number_literal))) right: (number_literal))))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (unary_expression argument: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (number_literal)))))))) right: (binary_expression left: (identifier) right: (number_literal)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (goto_statement label: (statement_identifier))))))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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) (escape_sequence) (string_content) (escape_sequence) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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) (escape_sequence) (string_content) (escape_sequence) (escape_sequence))))) (goto_statement label: (statement_identifier)))) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (goto_statement label: (statement_identifier))) (case_statement value: (number_literal) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (true))) (goto_statement label: (statement_identifier))))) (labeled_statement label: (statement_identifier) (do_statement body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))) (identifier) (identifier) (number_literal) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (identifier)) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier) (identifier) (identifier) (binary_expression left: (identifier) right: (identifier)) (identifier)))) (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (goto_statement label: (statement_identifier)) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (number_literal) (number_literal) (number_literal) (identifier) (number_literal) (identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence))))) (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)))))))))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (unary_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence)) (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 (unary_expression argument: (identifier))))))))))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (goto_statement label: (statement_identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence))))))))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (goto_statement label: (statement_identifier)) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (goto_statement label: (statement_identifier)) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (escape_sequence)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

int MASKED(int param_1,long param_2)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  char cVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  char *pcVar13;
  ushort **ppuVar14;
  ulong uVar15;
  __off64_t _Var16;
  int *piVar17;
  undefined8 uVar18;
  long lVar19;
  size_t __n;
  char *pcVar20;
  ulong uVar21;
  undefined **ppuVar22;
  long in_FS_OFFSET;
  byte bVar23;
  int local_194;
  char *local_190;
  int local_188;
  uint local_184;
  int local_180;
  uint local_17c;
  void *local_178;
  int local_170;
  int local_16c;
  int local_168;
  int local_164;
  undefined4 local_154;
  void *local_150;
  char local_148 [264];
  long local_40;
  
  bVar23 = 0;
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  local_150 = (void *)0x0;
  local_190 = (char *)0x0;
  local_17c = 0;
  local_168 = 300;
  local_164 = 0;
  local_180 = 0;
  uVar8 = 0;
  local_170 = 0;
  local_184 = 0;
  local_188 = 0;
  local_194 = 0;
  local_16c = 0;
  bVar3 = false;
  bVar5 = false;
  bVar1 = false;
  bVar4 = false;
  bVar2 = false;
LAB_001023de:
  local_154 = 0;
  iVar7 = getopt_long(param_1,param_2,"b:dhi:I:l:m:o:rs:S:t:vV",&PTR_DAT_001071a0,&local_154);
  if (iVar7 == -1) {
    if (local_194 != 0) {
      if (local_194 < 2) {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 0;
      }
      else {
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        pr2serr("\n");
        FUN_001022c5();
        local_194 = 0;
      }
      goto LAB_001026b7;
    }
    if (optind < param_1) {
      lVar19 = *(long *)(param_2 + (long)optind * 8);
      optind = optind + 1;
      if (optind < param_1) goto LAB_0010272c;
    }
    else {
      lVar19 = 0;
    }
    if ((bVar1) && (bVar5)) {
      pr2serr("Not in DEBUG mode, so \'-vV\' has no special action\n");
    }
    else if (!bVar5) {
      if (lVar19 == 0) {
        pr2serr("Missing device name!\n\n");
        pr2serr(
               "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
               );
        local_194 = 1;
        goto LAB_001026b7;
      }
      if ((local_170 < local_16c) && (0 < local_170)) {
        pr2serr("trim chunk size (CS) to be the same as LEN\n");
        iVar7 = sg_cmds_open_device(lVar19,0,local_188);
        if (iVar7 < 0) goto LAB_001029f5;
        local_16c = local_170;
LAB_00102933:
        local_178 = (void *)sg_memalign(local_170,0,&local_150,0);
        if (local_178 == (void *)0x0) {
          pr2serr("sg_write_buffer: out of memory\n");
          local_194 = sg_convert_errno(0xc);
          goto LAB_00102859;
        }
        __n = (size_t)local_170;
        memset(local_178,0xff,__n);
        if (local_190 == (char *)0x0) {
LAB_001029c2:
          iVar11 = local_170;
          if (local_16c < 1) goto LAB_00102f05;
        }
        else {
          iVar9 = strcmp(local_190,"-");
          if (iVar9 == 0) {
            if (local_164 < 1) {
              uVar15 = read(0,local_178,__n);
              if (-1 < (int)uVar15) {
                if ((int)uVar15 < local_170) {
                  iVar10 = 0;
                  goto LAB_00102c57;
                }
                goto LAB_001029c2;
              }
              piVar17 = __errno_location();
              local_194 = sg_convert_errno(*piVar17);
              __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",
                             local_190);
              perror(local_148);
            }
            else {
              pr2serr("Can\'t skip on stdin\n");
              local_194 = 0xf;
            }
            goto LAB_00102859;
          }
          iVar10 = open64(local_190,0);
          if (iVar10 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: could not open %s for reading",
                           local_190);
            perror(local_148);
            goto LAB_00102859;
          }
          iVar11 = sg_set_binary_mode(iVar10);
          if (iVar11 < 0) {
            perror("sg_set_binary_mode");
          }
          if ((0 < local_164) && (_Var16 = lseek64(iVar10,(long)local_164,0), _Var16 < 0)) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,
                           "sg_write_buffer: couldn\'t skip to required position on %s",local_190);
            perror(local_148);
            close(iVar10);
            goto LAB_00102859;
          }
          uVar15 = read(iVar10,local_178,__n);
          if ((int)uVar15 < 0) {
            piVar17 = __errno_location();
            local_194 = sg_convert_errno(*piVar17);
            __snprintf_chk(local_148,0x100,1,0x100,"sg_write_buffer: couldn\'t read from %s",
                           local_190);
            perror(local_148);
            close(iVar10);
            goto LAB_00102859;
          }
          iVar11 = local_170;
          if (local_170 <= (int)uVar15) {
LAB_00102b35:
            close(iVar10);
            local_170 = iVar11;
            goto LAB_001029c2;
          }
LAB_00102c57:
          uVar21 = uVar15 & 0xffffffff;
          iVar11 = (int)uVar15;
          if (bVar3) {
            pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);
            pr2serr("pad with 0xff bytes and continue\n");
            iVar11 = local_170;
LAB_00102c65:
            local_170 = iVar11;
            if (iVar9 == 0) goto LAB_001029c2;
            goto LAB_00102b35;
          }
          if (local_188 == 0) goto LAB_00102c65;
          pr2serr("tried to read %d bytes from %s, got %d bytes\n",local_170,local_190,uVar21);
          pr2serr("will write %d bytes",uVar21);
          if ((local_16c < 1) || (local_170 <= local_16c)) {
            pr2serr("\n");
            goto LAB_00102c65;
          }
          pr2serr(", %d bytes per WRITE BUFFER command\n");
          if (iVar9 != 0) goto LAB_00102b35;
        }
        iVar9 = 0;
        goto LAB_00102da3;
      }
      iVar7 = sg_cmds_open_device(lVar19,0,local_188);
      if (iVar7 < 0) {
LAB_001029f5:
        if (local_188 == 0) {
          local_194 = sg_convert_errno(-iVar7);
          if (local_150 == (void *)0x0) goto LAB_00102a18;
          goto LAB_00102867;
        }
        uVar18 = safe_strerror(-iVar7);
        pr2serr("sg_write_buffer: open error: %s: %s\n",lVar19,uVar18);
        local_194 = sg_convert_errno(-iVar7);
        if (local_150 != (void *)0x0) goto LAB_00102867;
        goto LAB_00102880;
      }
      if ((0 < local_170) || (local_190 != (char *)0x0)) {
        if (local_170 == 0) {
          local_170 = 0x800000;
        }
        goto LAB_00102933;
      }
      if (0 < local_16c) goto LAB_0010284e;
      local_178 = (void *)0x0;
LAB_00102f05:
      if (local_188 == 0) {
        local_194 = local_188;
        if (bVar4) goto LAB_00102859;
      }
      else {
        pr2serr("sending single write buffer, mode=0x%x, mpsec=%d, id=%d, offset=%d, len=%d\n",uVar8
                ,local_17c,local_184,local_180,local_170);
        if (bVar4) {
          pr2serr("skipping WRITE BUFFER(all in one) command due to --dry-run\n");
          goto LAB_00102859;
        }
      }
      iVar12 = sg_ll_write_buffer_v2
                         (iVar7,uVar8,local_17c,local_184,local_180,local_178,local_170,local_168,1,
                          local_188);
      goto LAB_00102f58;
    }
    pr2serr("version: %s\n","1.28 20180628");
    goto LAB_001026b7;
  }
  switch(iVar7) {
  case 0x3f:
  case 0x68:
    local_194 = local_194 + 1;
    goto LAB_001023de;
  default:
    pr2serr("unrecognised option code 0x%x ??\n",iVar7);
    pr2serr(
           "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
           );
    goto LAB_001026af;
  case 0x49:
    local_190 = optarg;
    goto LAB_001023de;
  case 0x53:
    local_17c = sg_get_num(optarg);
    if (7 < local_17c) {
      pr2serr("expected argument to \'--specific\' to be 0 to 7\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x56:
    bVar5 = true;
    goto LAB_001023de;
  case 0x62:
    local_16c = sg_get_num(optarg);
    if (local_16c < 0) {
      pr2serr("argument to \'--bpw\' should be in a positive number\n");
      goto LAB_001026af;
    }
    pcVar13 = strchr(optarg,0x2c);
    if (pcVar13 != (char *)0x0) {
      iVar7 = strncmp("act",pcVar13 + 1,3);
      if (iVar7 == 0) {
        bVar2 = true;
      }
    }
    goto LAB_001023de;
  case 100:
    bVar4 = true;
    goto LAB_001023de;
  case 0x69:
    local_184 = sg_get_num(optarg);
    if (0xff < local_184) {
      pr2serr("argument to \'--id\' should be in the range 0 to 255\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x6c:
    local_170 = sg_get_num(optarg);
    if (local_170 < 0) {
      pr2serr("bad argument to \'--length\'\n");
      goto LAB_001026af;
    }
    bVar3 = true;
    goto LAB_001023de;
  case 0x6d:
    ppuVar14 = __ctype_b_loc();
    pcVar13 = optarg;
    if ((*(byte *)((long)*ppuVar14 + (long)*optarg * 2 + 1) & 8) == 0) {
      lVar19 = -1;
      pcVar20 = optarg;
      do {
        if (lVar19 == 0) break;
        lVar19 = lVar19 + -1;
        cVar6 = *pcVar20;
        pcVar20 = pcVar20 + (ulong)bVar23 * -2 + 1;
      } while (cVar6 != '\0');
      if (PTR_DAT_00107020 == (undefined *)0x0) {
LAB_001025b2:
        FUN_001022c5();
        goto LAB_001026af;
      }
      ppuVar22 = &PTR_DAT_00107020;
      pcVar20 = PTR_DAT_00107020;
      while (iVar7 = strncmp(pcVar20,pcVar13,(long)(int)(~(uint)lVar19 - 1)), iVar7 != 0) {
        ppuVar22 = ppuVar22 + 3;
        pcVar20 = *ppuVar22;
        if (pcVar20 == (char *)0x0) goto LAB_001025b2;
      }
      uVar8 = *(uint *)(ppuVar22 + 1);
    }
    else {
      uVar8 = sg_get_num(optarg);
      if (0x1f < uVar8) {
        pr2serr("argument to \'--mode\' should be in the range 0 to 31\n");
        goto LAB_001026af;
      }
    }
    goto LAB_001023de;
  case 0x6f:
    local_180 = sg_get_num(optarg);
    if (local_180 < 0) {
      pr2serr("bad argument to \'--offset\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x72:
    local_190 = "-";
    goto LAB_001023de;
  case 0x73:
    local_164 = sg_get_num(optarg);
    if (local_164 < 0) {
      pr2serr("bad argument to \'--skip\'\n");
      goto LAB_001026af;
    }
    goto LAB_001023de;
  case 0x74:
    goto switchD_0010241f_caseD_74;
  case 0x76:
    local_188 = local_188 + 1;
    bVar1 = true;
    goto LAB_001023de;
  }
LAB_0010272c:
  do {
    pr2serr("Unexpected extra argument: %s\n",*(undefined8 *)(param_2 + (long)optind * 8));
    optind = optind + 1;
  } while (optind < param_1);
  pr2serr(
         "Usage: sg_write_buffer [--bpw=CS] [--dry-run] [--help] [--id=ID] [--in=FILE]\n                       [--length=LEN] [--mode=MO] [--offset=OFF]\n                       [--read-stdin] [--skip=SKIP] [--specific=MS]\n                       [--timeout=TO] [--verbose] [--version] DEVICE\n  where:\n    --bpw=CS|-b CS         CS is chunk size: bytes per write buffer\n                           command (def: 0 -> as many as possible)\n    --dry-run|-d           skip WRITE BUFFER commands, do everything else\n    --help|-h              print out usage message then exit\n    --id=ID|-i ID          buffer identifier (0 (default) to 255)\n    --in=FILE|-I FILE      read from FILE (\'-I -\' read from stdin)\n    --length=LEN|-l LEN    length in bytes to write; may be deduced from\n                           FILE\n    --mode=MO|-m MO        write buffer mode, MO is number or acronym\n                           (def: 0 -> \'combined header and data\' (obs))\n    --offset=OFF|-o OFF    buffer offset (unit: bytes, def: 0)\n    --read-stdin|-r        read from stdin (same as \'-I -\')\n    --skip=SKIP|-s SKIP    bytes in file FILE to skip before reading\n    --specific=MS|-S MS    mode specific value; 3 bit field (0 to 7)\n    --timeout=TO|-t TO     command timeout in seconds (def: 300)\n    --verbose|-v           increase verbosity\n    --version|-V           print version string and exit\n\nPerforms one or more SCSI WRITE BUFFER commands. Use \'-m xxx\' to list\navailable modes. A chunk size of 4 KB (\'--bpw=4k\') seems to work well.\nExample: sg_write_buffer -b 4k -I xxx.lod -m 7 /dev/sg3\n"
         );
  local_194 = 1;
  goto LAB_001026b7;
LAB_00102da3:
  if (iVar11 <= iVar9) goto LAB_0010284e;
  iVar10 = iVar11 - iVar9;
  if (local_16c < iVar11 - iVar9) {
    iVar10 = local_16c;
  }
  if (local_188 == 0) {
    if (!bVar4) {
LAB_00102d61:
      iVar12 = sg_ll_write_buffer_v2
                         (iVar7,uVar8,local_17c,local_184,iVar9 + local_180,
                          (long)local_178 + (long)iVar9,iVar10,local_168,1,local_188);
      if (iVar12 != 0) {
        if (bVar2) goto LAB_00102ea4;
        goto LAB_00102f66;
      }
    }
  }
  else {
    pr2serr("sending write buffer, mode=0x%x, mspec=%d, id=%d,  offset=%d, len=%d\n",uVar8,local_17c
            ,local_184,iVar9 + local_180,iVar10);
    if (!bVar4) goto LAB_00102d61;
    pr2serr("skipping WRITE BUFFER command due to --dry-run\n");
  }
  iVar9 = iVar9 + iVar10;
  goto LAB_00102da3;
LAB_0010284e:
  if (bVar2) {
LAB_00102ea4:
    if (local_188 == 0) {
      local_194 = local_188;
      if (!bVar4) {
LAB_00102ec2:
        iVar12 = sg_ll_write_buffer_v2(iVar7,0xf,0,0,0,0,0,local_168,1,local_188);
LAB_00102f58:
        local_194 = iVar12;
        if (iVar12 != 0) {
LAB_00102f66:
          sg_get_category_sense_str(iVar12,0x50,local_148,local_188);
          pr2serr("Write buffer failed: %s\n",local_148);
          local_194 = iVar12;
        }
      }
    }
    else {
      pr2serr("sending Activate deferred microcode [0xf]\n");
      if (!bVar4) goto LAB_00102ec2;
      pr2serr("skipping WRITE BUFFER(ACTIVATE) command due to --dry-run\n");
    }
  }
LAB_00102859:
  if (local_150 == (void *)0x0) {
LAB_00102e47:
    iVar7 = sg_cmds_close_device(iVar7);
    if (iVar7 < 0) {
      uVar18 = safe_strerror(-iVar7);
      pr2serr("close error: %s\n",uVar18);
      if (local_194 == 0) {
        local_194 = sg_convert_errno(-iVar7);
      }
    }
  }
  else {
LAB_00102867:
    free(local_150);
    if (-1 < iVar7) goto LAB_00102e47;
  }
  if (local_188 == 0) {
LAB_00102a18:
    cVar6 = sg_if_can2stderr("sg_write_buffer failed: ",local_194);
    if (cVar6 == '\0') {
      pr2serr("Some error occurred, try again with \'-v\' or \'-vv\' for more information\n");
    }
  }
LAB_00102880:
  if (local_194 < 0) {
    local_194 = 99;
  }
  goto LAB_001026b7;
switchD_0010241f_caseD_74:
  local_168 = sg_get_num(optarg);
  if (local_168 < 0) goto code_r0x00102669;
  goto LAB_001023de;
code_r0x00102669:
  pr2serr("Invalid argument to \'--timeout\'\n");
LAB_001026af:
  local_194 = 1;
LAB_001026b7:
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return local_194;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

