// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/readseq.c
// Function: writeFastq
int writeFastq (FILE *fil, int *conv, 
		char *seq, unsigned char *qual, char *id, char *desc, int len)
{
  int i ;

  if (!fil) { fprintf (stderr, "ERROR: writeFastq requires a file\n") ; return 0 ; }
  if (!id || !*id) { fprintf (stderr, "ERROR: writeFastq requires an id\n") ; return 0 ; }

  if (desc && *desc) 
    fprintf (fil, "@%s %s\n", id, desc) ;
  else
    fprintf (fil, "@%s\n", id) ;
  for (i = 0 ; i < len ; ++i)
    { if (i && !(i%60))
	fputc ('\n', fil) ;
      if (conv[seq[i]] > 0)
	fputc (conv[seq[i]], fil) ;
      else
	{ fprintf (stderr, "ERROR in writeSequence: %s[%d] = %d does not convert\n",
		   id, i, seq[i]) ;
	  return 0 ;
	}
    }
  fputc ('\n', fil) ;
    
  fprintf (fil, "+%s\n", id) ;
  for (i = 0 ; i < len ; ++i)
    { if (i && !(i%60))
	fputc ('\n', fil) ;
      fputc (qual[i]+33, fil) ;
    }
  fputc ('\n', fil) ;

  return len ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x964e
movq 0x99c7(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x61b8(%rip), %rsi      # 0xf7f3
movb $0x0, %al
callq 0x1150
movl $0x0, -0x4(%rbp)
jmp 0x980a
cmpq $0x0, -0x30(%rbp)
je 0x965e
movq -0x30(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x9682
movq 0x9993(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
leaq 0x61a7(%rip), %rsi      # 0xf816
movb $0x0, %al
callq 0x1150
movl $0x0, -0x4(%rbp)
jmp 0x980a
cmpq $0x0, -0x38(%rbp)
je 0x96b1
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x96b1
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
leaq 0x6190(%rip), %rsi      # 0xf838
movb $0x0, %al
callq 0x1150
jmp 0x96c7
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x6180(%rip), %rsi      # 0xf840
movb $0x0, %al
callq 0x1150
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jge 0x977c
cmpl $0x0, -0x3c(%rbp)
je 0x96fe
movl -0x3c(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x96fe
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x1100
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
cmpl $0x0, (%rax,%rcx,4)
jle 0x9734
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq -0x3c(%rbp), %rdx
movsbq (%rcx,%rdx), %rcx
movl (%rax,%rcx,4), %edi
movq -0x10(%rbp), %rsi
callq 0x1100
jmp 0x976c
movq 0x98bd(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq -0x3c(%rbp), %rsi
movsbl (%rax,%rsi), %r8d
leaq 0x6064(%rip), %rsi      # 0xf7bd
movb $0x0, %al
callq 0x1150
movl $0x0, -0x4(%rbp)
jmp 0x980a
jmp 0x976e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x96ce
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x1100
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x60ac(%rip), %rsi      # 0xf845
movb $0x0, %al
callq 0x1150
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl 0x10(%rbp), %eax
jge 0x97f6
cmpl $0x0, -0x3c(%rbp)
je 0x97d3
movl -0x3c(%rbp), %eax
movl $0x3c, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x97d3
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x1100
movq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movzbl (%rax,%rcx), %edi
addl $0x21, %edi
movq -0x10(%rbp), %rsi
callq 0x1100
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x97a7
movq -0x10(%rbp), %rsi
movl $0xa, %edi
callq 0x1100
movl 0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)