// File: /workspace/github_c_makefile_star2_O2/richarddurbin[P]hash10x/fq2b.c
// Function: gzReadFastq
BOOL gzReadFastq (gzFile f, char *idBuf, int *idLen, char *sBuf, char *qBuf, int *sLen)
{
  static char *buf = 0 ;
  static int nEntry = 0 ;
  char *s ;

  ++nEntry ;
  *idLen = 0 ;	/* id lines are variable length, so need to read char by char */
  for (s = idBuf ; !gzeof(f) && (*s++ = gzgetc(f)) != '\n' ; ++*idLen) ;
  if (gzeof (f)) return FALSE ;
  if (*idBuf != '@') die ("fastq id line for entry %d does not start with @", nEntry) ;
  if (idBuf[*idLen] != '\n') die ("fastq entry %d id line does not end in \\n", nEntry) ;
  idBuf[*idLen] = 0 ;

  if (*sLen)
    { if (gzread (f, sBuf, *sLen+1) != *sLen+1) die ("bad seq gzread entry %d", nEntry) ; }
  else
    for (s = sBuf ; !gzeof(f) && (*s++ = gzgetc(f)) != '\n' ; ++*sLen) ;
  if (sBuf[*sLen] != '\n') die ("fastq entry %d seq line does not end in \\n", nEntry) ;
  sBuf[*sLen] = 0 ;

  if (gzgetc(f) != '+' || gzgetc(f) != '\n') die ("bad + fastq line entry %d", nEntry) ;

  if (gzread (f, qBuf, *sLen+1) != *sLen+1) die ("bad qual gzread entry %d", nEntry) ;
  if (qBuf[*sLen] != '\n') die ("fastq entry %d qual line does not end in \\n", nEntry) ;
  qBuf[*sLen] = 0 ;
  
  return TRUE ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, (%rsp)
movq %rcx, %r12
movq %rdx, %rbp
incl 0x5fc7(%rip)            # 0x7bb0
movq %rsi, %rbx
movq %rdi, %r15
xorl %eax, %eax
movq %rsi, %r13
movl %eax, (%rbp)
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
jne 0x1c3d
movl (%r15), %eax
testl %eax, %eax
je 0x1c23
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1c2b
movq %r15, %rdi
callq 0x1070
movb %al, (%r13)
cmpb $0xa, %al
je 0x1c3d
incq %r13
movl (%rbp), %eax
incl %eax
jmp 0x1bf4
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1c50
xorl %eax, %eax
jmp 0x1dfa
cmpb $0x40, (%rbx)
je 0x1c69
movl 0x5f55(%rip), %esi      # 0x7bb0
leaq 0x286d(%rip), %rdi      # 0x44cf
xorl %eax, %eax
callq 0x3060
movslq (%rbp), %rax
cmpb $0xa, (%rbx,%rax)
je 0x1c8b
movl 0x5f37(%rip), %esi      # 0x7bb0
leaq 0x2880(%rip), %rdi      # 0x4500
xorl %eax, %eax
callq 0x3060
movslq (%rbp), %rax
movb $0x0, (%rbx,%rax)
movl (%r14), %edx
testl %edx, %edx
je 0x1d0b
incl %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1110
movl (%r14), %ecx
incl %ecx
cmpl %ecx, %eax
je 0x1cc0
movl 0x5efe(%rip), %esi      # 0x7bb0
leaq 0x2871(%rip), %rdi      # 0x452a
xorl %eax, %eax
callq 0x3060
movslq (%r14), %rax
cmpb $0xa, (%r12,%rax)
je 0x1ce1
movl 0x5ee0(%rip), %esi      # 0x7bb0
leaq 0x286b(%rip), %rdi      # 0x4542
xorl %eax, %eax
callq 0x3060
movslq (%r14), %rax
movb $0x0, (%r12,%rax)
movl (%r15), %eax
testl %eax, %eax
movq (%rsp), %rbx
je 0x1d54
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1d5c
movq %r12, %rbx
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
jne 0x1cc0
movl (%r15), %eax
testl %eax, %eax
je 0x1d3a
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1d42
movq %r15, %rdi
callq 0x1070
movb %al, (%rbx)
cmpb $0xa, %al
je 0x1cc0
incq %rbx
incl (%r14)
jmp 0x1d0e
movq %r15, %rdi
callq 0x1070
cmpl $0x2b, %eax
jne 0x1d8f
movl (%r15), %eax
testl %eax, %eax
je 0x1d82
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1d8a
movq %r15, %rdi
callq 0x1070
cmpl $0xa, %eax
je 0x1da3
movl 0x5e1b(%rip), %esi      # 0x7bb0
leaq 0x27d1(%rip), %rdi      # 0x456d
xorl %eax, %eax
callq 0x3060
movl (%r14), %edx
incl %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1110
movl (%r14), %ecx
leal 0x1(%rcx), %edx
cmpl %edx, %eax
je 0x1dd4
movl 0x5ded(%rip), %esi      # 0x7bb0
leaq 0x27bd(%rip), %rdi      # 0x4587
xorl %eax, %eax
callq 0x3060
movl (%r14), %ecx
movslq %ecx, %rax
cmpb $0xa, (%rbx,%rax)
je 0x1df4
movl 0x5dcd(%rip), %esi      # 0x7bb0
leaq 0x27b6(%rip), %rdi      # 0x45a0
xorl %eax, %eax
callq 0x3060
movslq (%r14), %rax
movb $0x0, (%rbx,%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)