// File: /workspace/github_c_makefile_star2_O3/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 0x5eb3(%rip)            # 0x7bb0
movl $0x0, (%rdx)
callq 0x10d0
testl %eax, %eax
jne 0x1d51
movq %rbx, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x1d2f
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1d37
movq %r15, %rdi
callq 0x1070
movb %al, (%r13)
cmpb $0xa, %al
je 0x1d51
incq %r13
incl (%rbp)
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1d0f
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1d64
xorl %eax, %eax
jmp 0x1f1c
cmpb $0x40, (%rbx)
je 0x1d7d
movl 0x5e41(%rip), %esi      # 0x7bb0
leaq 0x2789(%rip), %rdi      # 0x44ff
xorl %eax, %eax
callq 0x3244
movslq (%rbp), %rax
cmpb $0xa, (%rbx,%rax)
je 0x1d9f
movl 0x5e23(%rip), %esi      # 0x7bb0
leaq 0x279c(%rip), %rdi      # 0x4530
xorl %eax, %eax
callq 0x3244
movslq (%rbp), %rax
movb $0x0, (%rbx,%rax)
movl (%r14), %edx
testl %edx, %edx
je 0x1dda
incl %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1110
movl (%r14), %ecx
incl %ecx
cmpl %ecx, %eax
movq (%rsp), %rbx
je 0x1e2f
movl 0x5de6(%rip), %esi      # 0x7bb0
leaq 0x2789(%rip), %rdi      # 0x455a
xorl %eax, %eax
callq 0x3244
jmp 0x1e2f
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
movq (%rsp), %rbx
jne 0x1e2f
movq %r12, %r13
movl (%r15), %eax
testl %eax, %eax
je 0x1e0d
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movb (%rax), %al
jmp 0x1e15
movq %r15, %rdi
callq 0x1070
movb %al, (%r13)
cmpb $0xa, %al
je 0x1e2f
incq %r13
incl (%r14)
movq %r15, %rdi
callq 0x10d0
testl %eax, %eax
je 0x1ded
movslq (%r14), %rax
cmpb $0xa, (%r12,%rax)
je 0x1e50
movl 0x5d71(%rip), %esi      # 0x7bb0
leaq 0x272c(%rip), %rdi      # 0x4572
xorl %eax, %eax
callq 0x3244
movslq (%r14), %rax
movb $0x0, (%r12,%rax)
movl (%r15), %eax
testl %eax, %eax
je 0x1e76
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1e7e
movq %r15, %rdi
callq 0x1070
cmpl $0x2b, %eax
jne 0x1eb1
movl (%r15), %eax
testl %eax, %eax
je 0x1ea4
decl %eax
movl %eax, (%r15)
incq 0x10(%r15)
movq 0x8(%r15), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%r15)
movzbl (%rax), %eax
jmp 0x1eac
movq %r15, %rdi
callq 0x1070
cmpl $0xa, %eax
je 0x1ec5
movl 0x5cf9(%rip), %esi      # 0x7bb0
leaq 0x26df(%rip), %rdi      # 0x459d
xorl %eax, %eax
callq 0x3244
movl (%r14), %edx
incl %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1110
movl (%r14), %ecx
leal 0x1(%rcx), %edx
cmpl %edx, %eax
je 0x1ef6
movl 0x5ccb(%rip), %esi      # 0x7bb0
leaq 0x26cb(%rip), %rdi      # 0x45b7
xorl %eax, %eax
callq 0x3244
movl (%r14), %ecx
movslq %ecx, %rax
cmpb $0xa, (%rbx,%rax)
je 0x1f16
movl 0x5cab(%rip), %esi      # 0x7bb0
leaq 0x26c4(%rip), %rdi      # 0x45d0
xorl %eax, %eax
callq 0x3244
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