// File: /workspace/github_c_makefile_star2_O2/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 0x1c44c
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1c8ad
testq %r13, %r13
je 0x1c87f
callq 0xaaf34
testb %al, %al
je 0x1c4ab
leaq 0x2e2e88(%rip), %rdi    # 0x2ff2ed
callq 0xaf4a5
movq %rax, %rbx
movq %rax, %rdi
callq 0xaf4d6
testq %rbx, %rbx
jne 0x1c4ad
movq 0x41bae7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c8b88(%rip), %rsi    # 0x2e5013
leaq 0x2e8d38(%rip), %rdx    # 0x3051ca
leaq 0x2cae6f(%rip), %rcx    # 0x2e7308
leaq 0x2cabbe(%rip), %r8     # 0x2e705e
movl $0xc4, %r9d
jmp 0x1c907
xorl %ebx, %ebx
movq 0x20(%r13), %rdi
callq 0xad289
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1c4d4
movq 0x20(%r13), %rdi
callq 0xad1fa
movq %rax, %rdi
movq %r12, %rsi
callq 0x5773d
jmp 0x1c4d9
callq 0x56967
testq %rax, %rax
je 0x1c63f
movq %rax, %r15
testq %rbx, %rbx
je 0x1c503
movq 0x41b9bf(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2cac0d(%rip), %rsi    # 0x2e7108
movq %rbx, %rdi
callq 0xaf86f
movq 0x30(%r13), %rdi
callq 0xad289
testq %rax, %rax
jne 0x1c54b
movq 0x18(%r13), %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0x5a384
movq %rbx, %r14
movq %rax, %rbx
movq 0x30(%r13), %rdi
movq %rax, %rsi
callq 0xacc8b
leaq 0x2cab23(%rip), %rsi    # 0x2e705e
movq %rbx, %rdi
movq %r14, %rbx
movl $0xdb, %edx
callq 0x936f9
movq 0x18(%r13), %rdi
callq 0xad1fa
movzbl (%r13), %edx
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0xe9968
movq %rax, %r14
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x1c82c
movq %r15, 0x8(%rsp)
movq 0x8(%r13), %r15
testq %r15, %r15
movq %rbx, 0x10(%rsp)
je 0x1c647
leaq 0x2040(%rsp), %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x17380
leaq 0x40(%rsp), %rdi
movl $0x2000, %edx           # imm = 0x2000
xorl %esi, %esi
callq 0x17380
movq %r14, 0x28(%rsp)
movq %r14, %rdi
callq 0xeab56
movq %rax, %r13
leaq 0x2cadbb(%rip), %rdi    # 0x2e7387
callq 0xacbd1
movq %rax, %rbp
callq 0xacb84
movq %rax, %r14
movq %rbp, %rdi
movq %r15, %rsi
callq 0xace26
leaq 0x2cada5(%rip), %rsi    # 0x2e7393
movq %rbp, %rdi
callq 0xacbfb
movq %rbp, %rdi
movq %r13, 0x20(%rsp)
movq %r13, %rsi
callq 0xace26
leaq 0x33fa27(%rip), %rsi    # 0x35c034
movq %rbp, %rdi
callq 0xacbfb
testq %rbx, %rbx
movq %r12, 0x30(%rsp)
je 0x1c693
movq 0x41b88a(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2cad6e(%rip), %rsi    # 0x2e739e
movq %rbx, %rdi
callq 0xaf86f
movq %rbx, 0x18(%rsp)
jmp 0x1c6ac
xorl %r15d, %r15d
jmp 0x1c834
movq 0x38(%r13), %rbx
cmpq $-0x1, %rbx
je 0x1c795
cmpq $-0x1, 0x40(%r13)
je 0x1c795
movq %r14, %rdi
callq 0xeab56
cmpq %rax, %rbx
jae 0x1c7f2
movq 0x40(%r13), %rbx
movq %r14, %rdi
callq 0xeab56
cmpq %rax, %rbx
jae 0x1c7f2
movq 0x38(%r13), %r15
movq 0x40(%r13), %rbx
jmp 0x1c7a6
leaq 0x2cad04(%rip), %rdi    # 0x2e739e
callq 0xaf4a5
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0xaf4d6
decq 0x20(%rsp)
movq %rbp, 0x38(%rsp)
movq %rbp, %rdi
callq 0xad1fa
leaq 0x34c7e4(%rip), %rbx    # 0x368ea9
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x92a82
leaq 0x40(%rsp), %r12
leaq 0x2040(%rsp), %r13
xorl %ebp, %ebp
subq $0x1, %r15
jb 0x1c757
testl %ebp, %ebp
jne 0x1c6e1
movq 0x20(%rsp), %rdi
callq 0x955fa
movq %rax, %rbp
leaq 0x2cacb4(%rip), %rdi    # 0x2e73b3
movq %rax, %rsi
xorl %eax, %eax
callq 0x92a82
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
movq 0x30(%rsp), %r9
callq 0xea1c4
movl %eax, %ebp
movq %r14, %rdi
callq 0xad1fa
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x92a82
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x92a82
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x92a82
jmp 0x1c6e1
movq 0x38(%rsp), %rdi
callq 0xae103
movq %r14, %rdi
callq 0xae103
callq 0xaaf34
testb %al, %al
jne 0x1c77c
movq 0x18(%rsp), %rdi
callq 0xafc5b
movq 0x30(%rsp), %r12
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
movq 0x28(%rsp), %r14
jmp 0x1c82c
movq %r14, %rdi
callq 0xeab56
movq %rax, %rbx
decq %rbx
xorl %r15d, %r15d
movq 0x30(%r13), %rdi
callq 0xad1fa
leaq 0x2cabc0(%rip), %rdi    # 0x2e7376
xorl %ebp, %ebp
movq %rax, %rsi
xorl %eax, %eax
callq 0x92a82
movq 0x30(%r13), %rdi
callq 0xad1fa
movq 0x10(%r13), %r8
movq %r12, (%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq 0x10(%rsp), %rbx
movq %rbx, %r9
callq 0xea7f4
negl %eax
sbbl %ebp, %ebp
jmp 0x1c827
movq 0x38(%r13), %rbx
movq %r14, %r15
movq 0x40(%r13), %r14
movq %r15, %rdi
callq 0xeab56
leaq 0x2cab1b(%rip), %rsi    # 0x2e7327
movq %r12, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movq %r15, %r14
movq %rax, %r8
xorl %eax, %eax
callq 0x89dbb
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0xea14e
movq %r15, %rdi
callq 0x568b5
testq %rbx, %rbx
je 0x1c85b
movq 0x41b668(%rip), %rax    # 0x437eb0
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xafb49
movq %rbx, %rdi
callq 0xafc5b
testl %ebp, %ebp
je 0x1c86b
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
je 0x1c8db
movl %ebp, %eax
addq $0x4048, %rsp           # imm = 0x4048
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x41b6e2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c8783(%rip), %rsi    # 0x2e5013
leaq 0x32bdbc(%rip), %rdx    # 0x348653
leaq 0x2caa6a(%rip), %rcx    # 0x2e7308
leaq 0x2ca7b9(%rip), %r8     # 0x2e705e
movl $0xbf, %r9d
jmp 0x1c907
movq 0x41b6b4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c8755(%rip), %rsi    # 0x2e5013
leaq 0x2c88fa(%rip), %rdx    # 0x2e51bf
leaq 0x2caa3c(%rip), %rcx    # 0x2e7308
leaq 0x2ca78b(%rip), %r8     # 0x2e705e
movl $0xbe, %r9d
jmp 0x1c907
movq 0x41b686(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2c8727(%rip), %rsi    # 0x2e5013
leaq 0x2ec182(%rip), %rdx    # 0x308a75
leaq 0x2caa0e(%rip), %rcx    # 0x2e7308
leaq 0x2ca75d(%rip), %r8     # 0x2e705e
movl $0x10d, %r9d            # imm = 0x10D
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop