// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/hcr.c
// Function: gt_hcr_decoder_decode_range
int gt_hcr_decoder_decode_range(GtHcrDecoder *hcr_dec, const char *name,
                                GtUword start, GtUword end, GtUword width,
                                GtTimer *timer, GtError *err)
{
  char qual[BUFSIZ] = {0},
       seq[BUFSIZ] = {0};
  GtStr *desc = gt_str_new();
  int had_err = 0;
  GtUword cur_width,
                cur_read;
  size_t i;
  FILE *output;
  GT_UNUSED GtHcrSeqDecoder *seq_dec;

  gt_error_check(err);
  gt_assert(hcr_dec && name);
  seq_dec = hcr_dec->seq_dec;
  gt_assert(start <= end);
  gt_assert(start < seq_dec->num_of_reads && end < seq_dec->num_of_reads);
  if (timer != NULL)
    gt_timer_show_progress(timer, "decode hcr", stdout);
  output = gt_fa_fopen_with_suffix(name, HCRFILEDECODEDSUFFIX, "w", err);
  if (output == NULL)
    had_err = -1;

  for (cur_read = start; had_err == 0 && cur_read <= end; cur_read++) {
    if (gt_hcr_decoder_decode(hcr_dec, cur_read, seq, qual, desc, err) != 0)
      had_err = -1;
    else {
      gt_xfputc(HCR_DESCSEPSEQ, output);
      if (hcr_dec->encdesc != NULL)
        gt_xfputs(gt_str_get(desc), output);
      else
        fprintf(output, ""GT_WU"", cur_read);
      gt_xfputc('\n', output);
      for (i = 0, cur_width = 0; i < strlen(seq); i++, cur_width++) {
        if (width != 0 && cur_width == width) {
          cur_width = 0;
          gt_xfputc('\n', output);
        }
        gt_xfputc(seq[i], output);
      }
      gt_xfputc('\n', output);
      gt_xfputc(HCR_DESCSEPQUAL, output);
      gt_xfputc('\n', output);
      for (i = 0, cur_width = 0; i < strlen(qual); i++, cur_width++) {
        if (width != 0 && cur_width == width) {
          cur_width = 0;
          gt_xfputc('\n', output);
        }
        gt_xfputc(qual[i], output);
      }
      gt_xfputc('\n', output);
    }
  }
  gt_fa_xfclose(output);
  gt_str_delete(desc);
  return had_err;
}

// Assembly:
subq $0x4088, %rsp           # imm = 0x4088
movq 0x4090(%rsp), %rax
movq %rdi, 0x4080(%rsp)
movq %rsi, 0x4078(%rsp)
movq %rdx, 0x4070(%rsp)
movq %rcx, 0x4068(%rsp)
movq %r8, 0x4060(%rsp)
movq %r9, 0x4058(%rsp)
leaq 0x2050(%rsp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x19360
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
movl $0x2000, %edx           # imm = 0x2000
callq 0x19360
callq 0x11d4a0
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
cmpq $0x0, 0x4090(%rsp)
je 0x186d9c
movq 0x4090(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x186d64
jmp 0x186d9c
movq 0x4b5235(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38f29e(%rip), %rsi    # 0x516013
leaq 0x38f443(%rip), %rdx    # 0x5161bf
leaq 0x3ce054(%rip), %rcx    # 0x554dd7
leaq 0x3cdf61(%rip), %r8     # 0x554ceb
movl $0x411, %r9d            # imm = 0x411
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x186d9e
jmp 0x186da0
cmpq $0x0, 0x4080(%rsp)
je 0x186db6
cmpq $0x0, 0x4078(%rsp)
jne 0x186dee
movq 0x4b51e3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38f24c(%rip), %rsi    # 0x516013
leaq 0x3ce025(%rip), %rdx    # 0x554df3
leaq 0x3ce002(%rip), %rcx    # 0x554dd7
leaq 0x3cdf0f(%rip), %r8     # 0x554ceb
movl $0x412, %r9d            # imm = 0x412
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x186df0
movq 0x4080(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x4070(%rsp), %rax
cmpq 0x4068(%rsp), %rax
jbe 0x186e4b
movq 0x4b5186(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38f1ef(%rip), %rsi    # 0x516013
leaq 0x3b5a2a(%rip), %rdx    # 0x53c855
leaq 0x3cdfa5(%rip), %rcx    # 0x554dd7
leaq 0x3cdeb2(%rip), %r8     # 0x554ceb
movl $0x414, %r9d            # imm = 0x414
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x186e4d
jmp 0x186e4f
movq 0x4070(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jae 0x186e75
movq 0x4068(%rsp), %rax
movq 0x18(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jb 0x186ead
movq 0x4b5124(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x38f18d(%rip), %rsi    # 0x516013
leaq 0x3cdf76(%rip), %rdx    # 0x554e03
leaq 0x3cdf43(%rip), %rcx    # 0x554dd7
leaq 0x3cde50(%rip), %r8     # 0x554ceb
movl $0x415, %r9d            # imm = 0x415
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x186eaf
cmpq $0x0, 0x4058(%rsp)
je 0x186ed8
movq 0x4058(%rsp), %rdi
movq 0x4b506f(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x3cdf6d(%rip), %rsi    # 0x554e40
callq 0x121930
movq 0x4078(%rsp), %rdi
movq 0x4090(%rsp), %r9
leaq 0x3cdf5c(%rip), %rsi    # 0x554e4b
leaq 0x3defcf(%rip), %rdx    # 0x565ec5
leaq 0x3cddee(%rip), %rcx    # 0x554ceb
movl $0x418, %r8d            # imm = 0x418
callq 0xd92c0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x186f1d
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
movq 0x4070(%rsp), %rax
movq %rax, 0x30(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x44(%rsp)
movb %al, 0x17(%rsp)
jne 0x186f4b
movq 0x30(%rsp), %rax
cmpq 0x4068(%rsp), %rax
setbe %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x186f58
jmp 0x18717c
movq 0x4080(%rsp), %rdi
movq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x2050(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x4090(%rsp), %r9
callq 0x1862d0
cmpl $0x0, %eax
je 0x186f96
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x187167
movq 0x20(%rsp), %rsi
movl $0x40, %edi
callq 0x126b70
movq 0x4080(%rsp), %rax
cmpq $0x0, (%rax)
je 0x186fcc
movq 0x48(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x126bb0
jmp 0x186fe4
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x40802c(%rip), %rsi    # 0x58f009
movb $0x0, %al
callq 0x199f0
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq $0x0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x18708d
cmpq $0x0, 0x4060(%rsp)
je 0x187058
movq 0x38(%rsp), %rax
cmpq 0x4060(%rsp), %rax
jne 0x187058
movq $0x0, 0x38(%rsp)
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq 0x28(%rsp), %rax
movsbl 0x50(%rsp,%rax), %edi
movq 0x20(%rsp), %rsi
callq 0x126b70
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x187005
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq 0x20(%rsp), %rsi
movl $0x2b, %edi
callq 0x126b70
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq $0x0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
leaq 0x2050(%rsp), %rdi
callq 0x192b0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x187158
cmpq $0x0, 0x4060(%rsp)
je 0x187120
movq 0x38(%rsp), %rax
cmpq 0x4060(%rsp), %rax
jne 0x187120
movq $0x0, 0x38(%rsp)
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
movq 0x28(%rsp), %rax
movsbl 0x2050(%rsp,%rax), %edi
movq 0x20(%rsp), %rsi
callq 0x126b70
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1870cc
movq 0x20(%rsp), %rsi
movl $0xa, %edi
callq 0x126b70
jmp 0x187169
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x186f2a
movq 0x20(%rsp), %rdi
callq 0xd9570
movq 0x48(%rsp), %rdi
callq 0x11f560
movl 0x44(%rsp), %eax
addq $0x4088, %rsp           # imm = 0x4088
retq
nopl (%rax)