// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/seq_iterator_fastq.c
// Function: parse_fastq_qualities
static inline int parse_fastq_qualities(GtSeqIteratorFastQ *seqit,
                                        GT_UNUSED GtError *err)
{
  char currentchar;
  GtUword i = 0;
  gt_assert(gt_str_length(seqit->sequencebuffer) > 0);
  if ((currentchar = fastq_buf_getchar(seqit)) == EOF)
    return EOF;
  seqit->currentread++;

  for (i=0;i<gt_str_length(seqit->sequencebuffer);i++) {
    if (currentchar != '\n' && currentchar != ' ') {
      gt_str_append_char(seqit->qualsbuffer, currentchar);
    } else if (currentchar == '\n') {
      seqit->curline++;
      i--;
    } else {
      i--;
    }
    if (i+1 == gt_str_length(seqit->sequencebuffer)) {
      seqit->curline++;
    }
    if ((currentchar = fastq_buf_getchar(seqit)) == EOF)
      return EOF;
    seqit->currentread++;
  }
  /* expect newline at end of qualities */
  if (currentchar != GT_FASTQ_NEWLINESYMBOL) {
    gt_error_set(err, "qualities string of sequence length " GT_WU
                 " is not ended by newline in file '%s', line "
                 GT_WU " -- this may be a sign for sequence and qualities "
                 "strings of different length",
                 gt_str_length(seqit->sequencebuffer),
                 gt_str_array_get(seqit->filenametab, seqit->filenum),
                 seqit->curline-1);
    return -2;
  }
  return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
cmpq $0x0, %rax
ja 0xe4af3
movq 0xcf516(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x7959a(%rip), %rsi     # 0x15e066
leaq 0x9475b(%rip), %rdx     # 0x17922e
leaq 0x9477d(%rip), %rcx     # 0x179257
leaq 0x943b9(%rip), %r8      # 0x178e9a
movl $0xd4, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe4af5
movq 0x38(%rsp), %rdi
callq 0xe4cd0
movb %al, 0x2f(%rsp)
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0xe4b18
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xe4cc6
movq 0x38(%rsp), %rax
movq 0x88(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x88(%rax)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0xe4c4c
movsbl 0x2f(%rsp), %eax
cmpl $0xa, %eax
je 0xe4b8a
movsbl 0x2f(%rsp), %eax
cmpl $0x20, %eax
je 0xe4b8a
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rdi
movsbl 0x2f(%rsp), %esi
callq 0x194d0
jmp 0xe4bc5
movsbl 0x2f(%rsp), %eax
cmpl $0xa, %eax
jne 0xe4bb5
movq 0x38(%rsp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xe4bc3
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xe4bc5
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jne 0xe4bff
movq 0x38(%rsp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
movq 0x38(%rsp), %rdi
callq 0xe4cd0
movb %al, 0x2f(%rsp)
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0xe4c22
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xe4cc6
movq 0x38(%rsp), %rax
movq 0x88(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x88(%rax)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xe4b38
movsbl 0x2f(%rsp), %eax
cmpl $0xa, %eax
je 0xe4cbe
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x38(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x1b320
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq 0x68(%rax), %r8
subq $0x1, %r8
leaq 0x945c0(%rip), %rsi     # 0x17926d
movb $0x0, %al
callq 0xc0d0
movl $0xfffffffe, 0x44(%rsp) # imm = 0xFFFFFFFE
jmp 0xe4cc6
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop