// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/seq_iterator_fastq.c
// Function: gt_seq_iterator_fastq_next
int gt_seq_iterator_fastq_next(GtSeqIterator *seqit,
                              const GtUchar **sequence,
                              GtUword *len,
                              char **desc,
                              GtError *err)
{
  int errstatus = 0;
  GtSeqIteratorFastQ *seqitf;
  gt_assert(seqit && len && desc);

  seqitf = gt_seq_iterator_fastq_cast(seqit);
  gt_str_reset(seqitf->qualsbuffer);
  gt_str_reset(seqitf->qdescbuffer);
  gt_str_reset(seqitf->sequencebuffer);
  gt_str_reset(seqitf->descbuffer);

  /* parse file */
  errstatus = parse_fastq_block(seqitf, err);

  if (!errstatus) {
    *sequence = (GtUchar*) gt_str_get(seqitf->sequencebuffer);
    *len = gt_str_length(seqitf->sequencebuffer);
    *desc = gt_str_get(seqitf->descbuffer);
    if (seqitf->qualities)
      *seqitf->qualities = (GtUchar*) gt_str_get(seqitf->qualsbuffer);
    errstatus = 1;
  } else {
    if (errstatus == EOF) {
      /* we could not get a next entry from this file */
      /* can we open another? */
      if (seqitf->filenum+1 < gt_str_array_size(seqitf->filenametab)) {
        const char *filename;
        filename = gt_str_array_get(seqitf->filenametab, ++seqitf->filenum);
        gt_file_delete(seqitf->curfile);
        seqitf->curfile = gt_file_xopen(filename, "r");
        seqitf->curline = 1;
        /* get first entry from next file*/
        errstatus = parse_fastq_block(seqitf, err);
        if (!errstatus) {
          *sequence = (GtUchar*) gt_str_get(seqitf->sequencebuffer);
          *len = gt_str_length(seqitf->sequencebuffer);
          *desc = gt_str_get(seqitf->descbuffer);
          if (seqitf->qualities)
            *seqitf->qualities = (GtUchar*) gt_str_get(seqitf->qualsbuffer);
          errstatus = 1;
        } else {
          errstatus = -1;
        }
      } else {
        /* all entries read from all files */
        errstatus = 0;
      }
    } else {
      errstatus = -1;
    }
  }
  return errstatus;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0xe3b4d
cmpq $0x0, 0x30(%rsp)
je 0xe3b4d
cmpq $0x0, 0x28(%rsp)
jne 0xe3b85
movq 0xd0484(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x7a508(%rip), %rsi     # 0x15e066
leaq 0x95401(%rip), %rdx     # 0x178f66
leaq 0x9540f(%rip), %rcx     # 0x178f7b
leaq 0x95327(%rip), %r8      # 0x178e9a
movl $0x166, %r9d            # imm = 0x166
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xe3b87
callq 0xe3940
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0xe33f0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x19b70
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x19b70
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19b70
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x19b70
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe3df0
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0xe3c7b
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x20a8(%rax)
je 0xe3c6e
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq 0x20a8(%rax), %rax
movq %rcx, (%rax)
movl $0x1, 0x1c(%rsp)
jmp 0xe3dd8
cmpl $-0x1, 0x1c(%rsp)
jne 0xe3dce
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x1b720
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0xe3dc4
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x10(%rsp), %rcx
movl 0x8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x8(%rcx)
movl %eax, %eax
movl %eax, %esi
callq 0x1b320
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x83f40
movq 0x8(%rsp), %rdi
leaq 0x88512(%rip), %rsi     # 0x16c20c
callq 0x834c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x10(%rsp), %rax
movq $0x1, 0x68(%rax)
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xe3df0
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0xe3dba
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x19a00
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x20a8(%rax)
je 0xe3db0
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq 0x20a8(%rax), %rax
movq %rcx, (%rax)
movl $0x1, 0x1c(%rsp)
jmp 0xe3dc2
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3dcc
movl $0x0, 0x1c(%rsp)
jmp 0xe3dd6
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3dd8
movl 0x1c(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)