// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/seq_iterator_fastq.c
// Function: parse_fastq_sequence
static int parse_fastq_sequence(GtSeqIteratorFastQ *seqit,
                                GtError *err)
{
  int had_err = 0;
  char currentchar;
  GtStr *tmp_str = gt_str_new();

  gt_error_check(err);
  gt_assert(seqit);
  gt_assert(gt_str_length(seqit->sequencebuffer) == 0);
  /* read sequence */
  if ((currentchar = fastq_buf_getchar(seqit)) == EOF) {
    gt_str_delete(tmp_str);
    return EOF;
  }
  while (currentchar != GT_FASTQ_QUAL_SEPARATOR_CHAR) {
    if (currentchar != '\n' && currentchar != ' ') {
      gt_str_append_char(tmp_str, currentchar);
    } else if (currentchar == '\n') {
      seqit->curline++;
    }
    if ((currentchar = fastq_buf_getchar(seqit)) == EOF) {
      gt_str_delete(tmp_str);
      return EOF;
    }
    seqit->currentread++;
  }
  if (!gt_str_length(tmp_str)) {
    gt_error_set(err, "empty sequence given in file '%s', line "GT_WU"",
                      gt_str_array_get(seqit->filenametab,
                                       seqit->filenum),
                      seqit->curline-1);
    had_err = -2;
  }
  if (!had_err && seqit->is_color_space)
  {
    GtStr *translated = gt_str_new();
    had_err = gt_colorspace_decode_string(tmp_str,
                                          translated,
                                          err);
    gt_str_delete(tmp_str);
    tmp_str = translated;
  }
  if (!had_err)
  {
    if (seqit->symbolmap)
    {
      int charcode;
      char *input_str = gt_str_get(tmp_str);
      GtUword str_len = gt_str_length(tmp_str),
                    idx;
      for (idx = 0; !had_err && idx < str_len; idx++)
      {
        charcode = seqit->symbolmap[(unsigned int) input_str[idx]];
        if (charcode == GT_UNDEFCHAR) {
          gt_error_set(err, "illegal character '%c': file \"%s\", line "GT_WU"",
                            input_str[idx],
                            gt_str_array_get(seqit->filenametab,
                                             seqit->filenum),
                            (GtUword) seqit->curline);
          had_err = -2;
        }
        if (GT_ISSPECIAL(charcode)) {
          seqit->lastspeciallength++;
        } else {
          if (seqit->lastspeciallength > 0)
            seqit->lastspeciallength = 0;
          if (seqit->chardisttab)
            seqit->chardisttab[(int) charcode]++;
        }
        gt_str_append_char(seqit->sequencebuffer, charcode);
      }
    } else {
      gt_str_set(seqit->sequencebuffer, gt_str_get(tmp_str));
    }
  }
  fastq_buf_ungetchar(seqit);
  gt_str_delete(tmp_str);
  return had_err;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
callq 0x18f00
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xe46b0
movq 0x60(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0xe4678
jmp 0xe46b0
movq 0xcf959(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x799dd(%rip), %rsi     # 0x15e066
leaq 0x79fb8(%rip), %rdx     # 0x15e648
leaq 0x94ad6(%rip), %rcx     # 0x17916d
leaq 0x947fc(%rip), %r8      # 0x178e9a
movl $0x85, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe46b2
jmp 0xe46b4
cmpq $0x0, 0x68(%rsp)
jne 0xe46f4
movq 0xcf915(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x79999(%rip), %rsi     # 0x15e066
leaq 0x94680(%rip), %rdx     # 0x178d54
leaq 0x94a92(%rip), %rcx     # 0x17916d
leaq 0x947b8(%rip), %r8      # 0x178e9a
movl $0x86, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe46f6
jmp 0xe46f8
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
cmpq $0x0, %rax
je 0xe4744
movq 0xcf8c5(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x79949(%rip), %rsi     # 0x15e066
leaq 0x94a5e(%rip), %rdx     # 0x179182
leaq 0x94a42(%rip), %rcx     # 0x17916d
leaq 0x94768(%rip), %r8      # 0x178e9a
movl $0x87, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe4746
movq 0x68(%rsp), %rdi
callq 0xe4cd0
movb %al, 0x5b(%rsp)
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0xe4773
movq 0x50(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0xe4a81
jmp 0xe4775
movsbl 0x5b(%rsp), %eax
cmpl $0x2b, %eax
je 0xe480e
movsbl 0x5b(%rsp), %eax
cmpl $0xa, %eax
je 0xe47a8
movsbl 0x5b(%rsp), %eax
cmpl $0x20, %eax
je 0xe47a8
movq 0x50(%rsp), %rdi
movsbl 0x5b(%rsp), %esi
callq 0x194d0
jmp 0xe47c5
movsbl 0x5b(%rsp), %eax
cmpl $0xa, %eax
jne 0xe47c3
movq 0x68(%rsp), %rax
movq 0x68(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rax)
jmp 0xe47c5
movq 0x68(%rsp), %rdi
callq 0xe4cd0
movb %al, 0x5b(%rsp)
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0xe47f2
movq 0x50(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0xe4a81
movq 0x68(%rsp), %rax
movq 0x88(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x88(%rax)
jmp 0xe4775
movq 0x50(%rsp), %rdi
callq 0x19a00
cmpq $0x0, %rax
jne 0xe486e
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x68(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x1b320
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movq 0x68(%rsp), %rax
movq 0x68(%rax), %rcx
subq $0x1, %rcx
leaq 0x9494d(%rip), %rsi     # 0x1791ac
movb $0x0, %al
callq 0xc0d0
movl $0xfffffffe, 0x5c(%rsp) # imm = 0xFFFFFFFE
cmpl $0x0, 0x5c(%rsp)
jne 0xe48b6
movq 0x68(%rsp), %rax
testb $0x1, 0x22(%rax)
je 0xe48b6
callq 0x18f00
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x111b40
movl %eax, 0x5c(%rsp)
movq 0x50(%rsp), %rdi
callq 0x1afc0
movq 0x48(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpl $0x0, 0x5c(%rsp)
jne 0xe4a65
movq 0x68(%rsp), %rax
cmpq $0x0, 0x20a0(%rax)
je 0xe4a3e
movq 0x50(%rsp), %rdi
callq 0x19940
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
callq 0x19a00
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x5c(%rsp)
movb %al, 0x1f(%rsp)
jne 0xe4919
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
setb %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0xe4926
jmp 0xe4a3c
movq 0x68(%rsp), %rax
movq 0x20a0(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x28(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, 0x44(%rsp)
cmpl $0xfd, 0x44(%rsp)
jne 0xe49b6
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, 0x18(%rsp)
movq 0x68(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x68(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x1b320
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %edx
movq %rax, %rcx
movq 0x68(%rsp), %rax
movq 0x68(%rax), %r8
leaq 0x94831(%rip), %rsi     # 0x1791d8
movb $0x0, %al
callq 0xc0d0
movl $0xfffffffe, 0x5c(%rsp) # imm = 0xFFFFFFFE
cmpl $0xfe, 0x44(%rsp)
jl 0xe49d3
movq 0x68(%rsp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
jmp 0xe4a14
movq 0x68(%rsp), %rax
cmpq $0x0, 0x78(%rax)
jbe 0xe49ec
movq 0x68(%rsp), %rax
movq $0x0, 0x78(%rax)
movq 0x68(%rsp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe4a12
movq 0x68(%rsp), %rax
movq 0x50(%rax), %rax
movslq 0x44(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0xe4a14
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rdi
movl 0x44(%rsp), %eax
movsbl %al, %esi
callq 0x194d0
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0xe48fb
jmp 0xe4a63
movq 0x68(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0x19940
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x190b0
jmp 0xe4a65
movq 0x68(%rsp), %rdi
callq 0xe4db0
movq 0x50(%rsp), %rdi
callq 0x1afc0
movl 0x5c(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw (%rax,%rax)