// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_compreads_decompress.c
// Function: gt_compreads_decompress_runner
static int gt_compreads_decompress_runner(GT_UNUSED int argc,
                                    GT_UNUSED const char **argv,
                                    GT_UNUSED int parsed_args,
                                    void *tool_arguments, GtError *err)
{
  GtCsrHcrDecodeArguments *arguments = tool_arguments;
  int had_err = 0;
  GtAlphabet *alpha = NULL;
  GtHcrDecoder *hcrd = NULL;
  GtTimer *timer = NULL;
  GtUword start,
                end;

  gt_error_check(err);
  gt_assert(arguments);

  if (gt_showtime_enabled()) {
    timer = gt_timer_new_with_progress_description("start");
    gt_timer_start(timer);
    gt_assert(timer);
  }

  if (gt_str_length(arguments->smap) > 0) {
    alpha = gt_alphabet_new_from_file_no_suffix(gt_str_get(arguments->smap),
                                                err);
    if (!alpha)
      had_err = -1;
  }
  else {
    alpha = gt_alphabet_new_dna();
    if (!alpha)
      had_err = -1;
  }

  if (!had_err) {
    if (timer != NULL)
      gt_timer_show_progress(timer, "decoding", stdout);

    if (gt_str_length(arguments->name) == 0) {
      char *basenameptr;
      basenameptr = gt_basename(gt_str_get(arguments->file));
      gt_str_set(arguments->name, basenameptr);
      gt_free(basenameptr);
    }
    hcrd = gt_hcr_decoder_new(gt_str_get(arguments->file), alpha,
                              arguments->descs, timer, err);
    if (hcrd == NULL)
      had_err = -1;
    else {
      if (arguments->bench != 0) {
        had_err = gt_compreads_decompress_benchmark(hcrd,
                                                    arguments->bench,
                                                    timer, err);
      }
      else {
        if (arguments->rng.start != GT_UNDEF_UWORD
            && arguments->rng.end != GT_UNDEF_UWORD) {
          if (arguments->rng.start >= gt_hcr_decoder_num_of_reads(hcrd)
                || arguments->rng.end >= gt_hcr_decoder_num_of_reads(hcrd)) {
            gt_error_set(err, "range " GT_WU "-" GT_WU " includes a read "
                              "number exceeding the total number of reads ("
                              GT_WU ")",
                              arguments->rng.start,
                              arguments->rng.end,
                              gt_hcr_decoder_num_of_reads(hcrd));
            had_err = -1;
          }
          start = arguments->rng.start;
          end = arguments->rng.end;
        }
        else {
          start = 0;
          end = gt_hcr_decoder_num_of_reads(hcrd) - 1;
        }
        if (!had_err) {
          gt_log_log("filebasename: %s", gt_str_get(arguments->name));
          if (gt_hcr_decoder_decode_range(hcrd, gt_str_get(arguments->name),
                                          start, end, arguments->width,
                                          timer, err)
            != 0)
            had_err = -1;
        }
      }
    }
    gt_hcr_decoder_delete(hcrd);
  }
  gt_alphabet_delete(alpha);
  if (timer != NULL) {
    gt_timer_show_progress_final(timer, stdout);
    gt_timer_delete(timer);
  }
  if (had_err)
    gt_assert(gt_error_is_set(err));
  return had_err;
}

// Assembly:
subq $0xa8, %rsp
movl %edi, 0xa4(%rsp)
movq %rsi, 0x98(%rsp)
movl %edx, 0x94(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movl $0x0, 0x74(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x209d3
movq 0x80(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2099b
jmp 0x209d3
movq 0x61b5fe(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f5667(%rip), %rsi    # 0x516013
leaq 0x4f580c(%rip), %rdx    # 0x5161bf
leaq 0x4f7988(%rip), %rcx    # 0x518342
leaq 0x4f76d7(%rip), %r8     # 0x518098
movl $0xbe, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x209d5
jmp 0x209d7
cmpq $0x0, 0x78(%rsp)
jne 0x20a17
movq 0x61b5ba(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f5623(%rip), %rsi    # 0x516013
leaq 0x55a168(%rip), %rdx    # 0x57ab5f
leaq 0x4f7944(%rip), %rcx    # 0x518342
leaq 0x4f7693(%rip), %r8     # 0x518098
movl $0xbf, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x20a19
callq 0x11aa90
testb $0x1, %al
jne 0x20a24
jmp 0x20a83
leaq 0x553d26(%rip), %rdi    # 0x574751
callq 0x1213a0
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x1213f0
cmpq $0x0, 0x58(%rsp)
jne 0x20a7f
movq 0x61b552(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f55bb(%rip), %rsi    # 0x516013
leaq 0x515aed(%rip), %rdx    # 0x53654c
leaq 0x4f78dc(%rip), %rcx    # 0x518342
leaq 0x4f762b(%rip), %r8     # 0x518098
movl $0xc4, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x20a81
jmp 0x20a83
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x20acc
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x80(%rsp), %rsi
callq 0x7fa00
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x20aca
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x20ae8
callq 0x7e4b0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x20ae6
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x20ae8
cmpl $0x0, 0x74(%rsp)
jne 0x20d7c
cmpq $0x0, 0x58(%rsp)
je 0x20b16
movq 0x58(%rsp), %rdi
movq 0x61b431(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4f7631(%rip), %rsi    # 0x518142
callq 0x121930
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x20b6e
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0x83ee0
movq %rax, 0x40(%rsp)
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x11d650
movq 0x40(%rsp), %rdi
leaq 0x4f7534(%rip), %rsi    # 0x518098
movl $0xdb, %edx
callq 0xe88c0
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rax
movb (%rax), %al
movq 0x58(%rsp), %rcx
movq 0x80(%rsp), %r8
andb $0x1, %al
movzbl %al, %edx
callq 0x185da0
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x20bbc
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x20d72
movq 0x78(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x20bf1
movq 0x60(%rsp), %rdi
movq 0x78(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x58(%rsp), %rdx
movq 0x80(%rsp), %rcx
callq 0x20e10
movl %eax, 0x74(%rsp)
jmp 0x20d70
movq 0x78(%rsp), %rax
cmpq $-0x1, 0x38(%rax)
je 0x20cd4
movq 0x78(%rsp), %rax
cmpq $-0x1, 0x40(%rax)
je 0x20cd4
movq 0x78(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
callq 0x1871a0
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x20c5b
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rdi
callq 0x1871a0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jb 0x20cb6
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
callq 0x1871a0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rax, %r8
leaq 0x4f76ba(%rip), %rsi    # 0x518361
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
movq 0x78(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x48(%rsp)
jmp 0x20cf0
movq $0x0, 0x50(%rsp)
movq 0x60(%rsp), %rdi
callq 0x1871a0
subq $0x1, %rax
movq %rax, 0x48(%rsp)
cmpl $0x0, 0x74(%rsp)
jne 0x20d6e
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq %rax, %rsi
leaq 0x4f76a1(%rip), %rdi    # 0x5183b0
movb $0x0, %al
callq 0xe7740
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x78(%rsp), %rax
movq 0x10(%rax), %r8
movq 0x58(%rsp), %r9
movq 0x80(%rsp), %rax
movq %rax, (%rsp)
callq 0x186cd0
cmpl $0x0, %eax
je 0x20d6c
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x20d6e
jmp 0x20d70
jmp 0x20d72
movq 0x60(%rsp), %rdi
callq 0x186220
movq 0x68(%rsp), %rdi
callq 0x7e3d0
cmpq $0x0, 0x58(%rsp)
je 0x20dac
movq 0x58(%rsp), %rdi
movq 0x61b19e(%rip), %rax    # 0x63bf38
movq (%rax), %rsi
callq 0x121d70
movq 0x58(%rsp), %rdi
callq 0x121f00
cmpl $0x0, 0x74(%rsp)
je 0x20e02
jmp 0x20db5
movq 0x80(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x20dfe
movq 0x61b1d3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4f523c(%rip), %rsi    # 0x516013
leaq 0x5191a9(%rip), %rdx    # 0x539f87
leaq 0x4f755d(%rip), %rcx    # 0x518342
leaq 0x4f72ac(%rip), %r8     # 0x518098
movl $0x10d, %r9d            # imm = 0x10D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x20e00
jmp 0x20e02
movl 0x74(%rsp), %eax
addq $0xa8, %rsp
retq
nop