// File: /workspace/github_c_makefile_star2_O1/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
movq %rsi, %rbx
movq %rdi, %r15
incl 0x5eb7(%rip)            # 0x7bb0
movl $0x0, (%rdx)
callq 0x10d0
testl %eax, %eax
jne 0x1d4d
movq %rbx, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x1d2b
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1d33
movq %r15, %rdi
callq 0x1070
movb %al, (%r13)
cmpb $0xa, %al
je 0x1d4d
incq %r13
incl (%rbp)
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1d0b
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1d60
xorl %eax, %eax
jmp 0x1f14
cmpb $0x40, (%rbx)
je 0x1d79
movl 0x5e45(%rip), %esi      # 0x7bb0
leaq 0x2760(%rip), %rdi      # 0x44d2
xorl %eax, %eax
callq 0x3264
movslq (%rbp), %rax
cmpb $0xa, (%rbx,%rax)
je 0x1d97
movl 0x5e27(%rip), %esi      # 0x7bb0
leaq 0x2773(%rip), %rdi      # 0x4503
xorl %eax, %eax
callq 0x3264
movslq (%rbp), %rax
movb $0x0, (%rbx,%rax)
movl (%r14), %edx
testl %edx, %edx
je 0x1dd6
incl %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1110
movl (%r14), %ecx
incl %ecx
cmpl %ecx, %eax
movq (%rsp), %rbx
je 0x1e2b
movl 0x5dea(%rip), %esi      # 0x7bb0
leaq 0x2760(%rip), %rdi      # 0x452d
xorl %eax, %eax
callq 0x3264
jmp 0x1e2b
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
movq (%rsp), %rbx
jne 0x1e2b
movq %r12, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x1e09
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1e11
movq %r15, %rdi
callq 0x1070
movb %al, (%r13)
cmpb $0xa, %al
je 0x1e2b
incq %r13
incl (%r14)
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1de9
movslq (%r14), %rax
cmpb $0xa, (%r12,%rax)
je 0x1e49
movl 0x5d75(%rip), %esi      # 0x7bb0
leaq 0x2703(%rip), %rdi      # 0x4545
xorl %eax, %eax
callq 0x3264
movslq (%r14), %rax
movb $0x0, (%r12,%rax)
movl (%r15), %eax
testl %eax, %eax
je 0x1e72
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1e7a
movq %r15, %rdi
callq 0x1070
cmpl $0x2b, %eax
jne 0x1ead
movl (%r15), %eax
testl %eax, %eax
je 0x1ea0
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1ea8
movq %r15, %rdi
callq 0x1070
cmpl $0xa, %eax
je 0x1ec1
movl 0x5cfd(%rip), %esi      # 0x7bb0
leaq 0x26b6(%rip), %rdi      # 0x4570
xorl %eax, %eax
callq 0x3264
movl (%r14), %edx
incl %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1110
movl (%r14), %ecx
incl %ecx
cmpl %ecx, %eax
je 0x1eee
movl 0x5cd0(%rip), %esi      # 0x7bb0
leaq 0x26a3(%rip), %rdi      # 0x458a
xorl %eax, %eax
callq 0x3264
movslq (%r14), %rax
cmpb $0xa, (%rbx,%rax)
je 0x1f0b
movl 0x5cb3(%rip), %esi      # 0x7bb0
leaq 0x269f(%rip), %rdi      # 0x45a3
xorl %eax, %eax
callq 0x3264
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
nop