// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4048, %rsp           # imm = 0x4048
movq %r8, %r12
movq %rcx, %r13
testq %r8, %r8
je 0x9d97a
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
jne 0x9dd92
testq %r13, %r13
je 0x9dd8d
callq 0x11ed94
testb %al, %al
je 0x9d9ad
leaq 0x30dd5e(%rip), %rdi    # 0x3ab6f1
callq 0x1226d6
movq %rax, %r15
movq %rax, %rdi
callq 0x122733
testq %r15, %r15
jne 0x9d9b0
callq 0x18a44
xorl %r15d, %r15d
movq 0x20(%r13), %rdi
callq 0x120d4c
testq %rax, %rax
je 0x9d9d4
movq 0x20(%r13), %rdi
callq 0x120d23
movq %rax, %rdi
movq %r12, %rsi
callq 0xd3e83
jmp 0x9d9d9
callq 0xd340f
movq %rax, %r14
testq %rax, %rax
je 0x9db4a
testq %r15, %r15
je 0x9da03
movq 0x4264f7(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x2b270d(%rip), %rsi    # 0x350108
movq %r15, %rdi
callq 0x1229c8
movq 0x30(%r13), %rdi
callq 0x120d4c
testq %rax, %rax
jne 0x9da45
movq 0x18(%r13), %rdi
callq 0x120d23
movq %rax, %rdi
callq 0xd6450
movq %rax, %rbx
movq 0x30(%r13), %rdi
movq %rax, %rsi
callq 0x1209e4
leaq 0x2b2626(%rip), %rsi    # 0x35005e
movq %rbx, %rdi
movl $0xdb, %edx
callq 0x109670
movq 0x18(%r13), %rdi
callq 0x120d23
movzbl (%r13), %edx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rcx
movq %r12, %r8
callq 0x156174
movq %rax, %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
movq %r14, 0x38(%rsp)
je 0x9dd38
movq %r15, 0x10(%rsp)
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x9db54
movq %rdi, %rbx
leaq 0x2040(%rsp), %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x173a0
leaq 0x40(%rsp), %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x173a0
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x156f70
movq %rax, %rbx
leaq 0x2b28bc(%rip), %rdi    # 0x350387
callq 0x120955
movq %rax, %r13
callq 0x1208f8
movq %rax, %r14
movq %r13, %rdi
movq %r15, %rsi
callq 0x120af4
leaq 0x2b28a6(%rip), %rsi    # 0x350393
movq %r13, %rdi
callq 0x12097f
movq %r13, %rdi
movq %rbx, 0x20(%rsp)
movq %rbx, %rsi
callq 0x120af4
leaq 0x327746(%rip), %rsi    # 0x3c5252
movq %r13, %rdi
callq 0x12097f
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
movq %r12, 0x28(%rsp)
je 0x9dbcf
movq 0x4263ba(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x2b2866(%rip), %rsi    # 0x35039e
movq %rbx, %rdi
callq 0x1229c8
movq %rbx, 0x18(%rsp)
jmp 0x9dbe8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x9dd42
movq 0x38(%r13), %rbx
cmpq $-0x1, %rbx
je 0x9dcc6
cmpq $-0x1, 0x40(%r13)
je 0x9dcc6
movq %rdi, %r14
callq 0x156f70
cmpq %rax, %rbx
jae 0x9db8e
movq 0x40(%r13), %rbx
movq %r14, %rdi
callq 0x156f70
movb $0x1, %r15b
cmpq %rax, %rbx
jb 0x9dbc2
movq 0x38(%r13), %rbx
movq 0x40(%r13), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x156f70
leaq 0x2b277d(%rip), %rsi    # 0x350327
xorl %r15d, %r15d
movq %r12, %rdi
movq %rbx, %rdx
movq 0x8(%rsp), %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x1019cf
movq 0x38(%r13), %rax
movq 0x40(%r13), %rbx
jmp 0x9dcd9
leaq 0x2b27c8(%rip), %rdi    # 0x35039e
callq 0x1226d6
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x122733
decq 0x20(%rsp)
movq %r13, 0x30(%rsp)
movq %r13, %rdi
callq 0x120d23
leaq 0x3345d0(%rip), %rbx    # 0x3d21d1
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
leaq 0x40(%rsp), %r12
leaq 0x2040(%rsp), %r13
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x9dc8b
movq 0x20(%rsp), %rdi
callq 0x10ae3c
movq %rax, %rbp
leaq 0x2b277e(%rip), %rdi    # 0x3503b3
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
movq 0x28(%rsp), %r9
callq 0x1567ea
movl %eax, %ebp
movq %r14, %rdi
callq 0x120d23
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x108e02
decq %r15
jne 0x9dc1d
movq 0x30(%rsp), %rdi
callq 0x121b03
movq %r14, %rdi
callq 0x121b03
callq 0x11ed94
testb %al, %al
jne 0x9dcb5
movq 0x18(%rsp), %rdi
callq 0x122d79
movq 0x28(%rsp), %r12
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %rdi
jmp 0x9dd38
movq %rdi, %r14
callq 0x156f70
movq %rax, %rbx
decq %rbx
movb $0x1, %r15b
xorl %eax, %eax
testb %r15b, %r15b
movq 0x10(%rsp), %r15
movq %r14, %rdi
je 0x9dd38
movq %rdi, %r14
movq 0x30(%r13), %rdi
movq %rax, 0x8(%rsp)
callq 0x120d23
leaq 0x2b2678(%rip), %rdi    # 0x350376
xorl %ebp, %ebp
movq %rax, %rsi
xorl %eax, %eax
callq 0x108e02
movq 0x30(%r13), %rdi
callq 0x120d23
movq 0x10(%r13), %r8
movq %r12, (%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rcx
movq %r15, %r9
callq 0x156c96
movq %r14, %rdi
negl %eax
sbbl %ebp, %ebp
callq 0x1567a7
movq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0xd335d
testq %r15, %r15
je 0x9dd69
movq 0x426192(%rip), %rax    # 0x4c3ee8
movq (%rax), %rsi
movq %r15, %rdi
callq 0x122c67
movq %r15, %rdi
callq 0x122d79
testl %ebp, %ebp
je 0x9dd79
movq %r12, %rdi
callq 0x101a9a
testb %al, %al
je 0x9dd97
movl %ebp, %eax
addq $0x4048, %rsp           # imm = 0x4048
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18a7d
callq 0x189d2
callq 0x18a0b