// File: /workspace/github_c_makefile_star2_O0/richarddurbin[P]hash10x/readseq.c
// Function: readSequence
int readSequence (FILE *fil, int *conv, 
                  char **seq, char **id, char **desc, int *length)
{
  char c ;
  int n ;
  static FILE *oldFil = 0 ;
  static int line ;
  int buflen ;

  if (fil != oldFil)
    { line = 1 ;
      oldFil = fil ;
    }
  
/* get id, descriptor */
  c = getc (fil) ;
  if (c == '>')			/* header line */
    { c = getc(fil) ;

      n = 0 ;			/* id */
      buflen = -32;
      while (!feof (fil) && c != ' ' && c != '\n' && c != '\t')
	{ if (id) add (c, id, &buflen, n++) ;
	  c = getc (fil) ;
	}
      if (id) add (0, id, &buflen, n) ;

				/* white space */
      while (!feof (fil) && (c == ' ' || c == '\t'))
	c = getc (fil) ;

      n = 0 ;			/* desc */
      buflen = -32 ;
      while (!feof (fil) && c != '\n')
	{ if (desc) add (c, desc, &buflen, n++) ;
	  c = getc (fil) ;
	}
      if (desc) add (0, desc, &buflen, n) ;

      ++line ;
    }
  else
    { ungetc (c, fil) ;		/* no header line */
      if (id) 
	*id = "" ;
      if (desc)
	*desc = "" ;
    }

  /* ensure whitespace ignored */

  conv[' '] = conv['\t'] = -1 ;
  conv['\n'] = -3 ;

  n = 0 ;			/* sequence */
  buflen = -1024 ;

  while (!feof (fil))
    { 
      c = getc (fil) ;
      if (c == '>')
	{ ungetc (c, fil) ;
	  break ;
	}

      if (c == EOF) /* for some compiler once needed || c == EOF + 256 */
	break ;

    
      switch (conv[c]) {
        case -2:
          { if (id) 
              fprintf (stderr, "Bad char 0x%x = '%c' at line %d, base %d, sequence %s\n",
          	     c, c, line, n, *id) ;
            else
              fprintf (stderr, "Bad char 0x%x = '%c' at line %d, base %d\n",
          	     c, c, line, n) ;
            return 0 ;
          }
          break;
        case -3:
          ++line;
        case -1:
          break;
        default:
	  if (seq) add (conv[c], seq, &buflen, n++) ;
	  else ++n ;
      }
    }
  if (seq) add (0, seq, &buflen, n) ;

  if (length)
    *length = n ;

  return n ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq 0xbc2d(%rip), %rax      # 0x14498
je 0x8882
movl $0x1, 0xbc29(%rip)      # 0x144a0
movq -0x10(%rbp), %rax
movq %rax, 0xbc16(%rip)      # 0x14498
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x3e, %eax
jne 0x8a2d
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
movl $0x0, -0x40(%rbp)
movl $0xffffffe0, -0x44(%rbp) # imm = 0xFFFFFFE0
movq -0x10(%rbp), %rdi
callq 0x1160
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x45(%rbp)
jne 0x88f3
movsbl -0x39(%rbp), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x45(%rbp)
je 0x88f3
movsbl -0x39(%rbp), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x45(%rbp)
je 0x88f3
movsbl -0x39(%rbp), %eax
cmpl $0x9, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x88fc
jmp 0x892f
cmpq $0x0, -0x28(%rbp)
je 0x8921
movb -0x39(%rbp), %al
movq -0x28(%rbp), %rsi
movl -0x40(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x40(%rbp)
leaq -0x44(%rbp), %rdx
movsbl %al, %edi
callq 0x8c20
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
jmp 0x88b5
cmpq $0x0, -0x28(%rbp)
je 0x8948
movq -0x28(%rbp), %rsi
movl -0x40(%rbp), %ecx
xorl %edi, %edi
leaq -0x44(%rbp), %rdx
callq 0x8c20
jmp 0x894a
movq -0x10(%rbp), %rdi
callq 0x1160
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x46(%rbp)
jne 0x8980
movsbl -0x39(%rbp), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x47(%rbp)
je 0x897a
movsbl -0x39(%rbp), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x47(%rbp)
movb -0x47(%rbp), %al
movb %al, -0x46(%rbp)
movb -0x46(%rbp), %al
testb $0x1, %al
jne 0x8989
jmp 0x8997
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
jmp 0x894a
movl $0x0, -0x40(%rbp)
movl $0xffffffe0, -0x44(%rbp) # imm = 0xFFFFFFE0
movq -0x10(%rbp), %rdi
callq 0x1160
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x48(%rbp)
jne 0x89c7
movsbl -0x39(%rbp), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x48(%rbp)
movb -0x48(%rbp), %al
testb $0x1, %al
jne 0x89d0
jmp 0x8a03
cmpq $0x0, -0x30(%rbp)
je 0x89f5
movb -0x39(%rbp), %al
movq -0x30(%rbp), %rsi
movl -0x40(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x40(%rbp)
leaq -0x44(%rbp), %rdx
movsbl %al, %edi
callq 0x8c20
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
jmp 0x89a5
cmpq $0x0, -0x30(%rbp)
je 0x8a1c
movq -0x30(%rbp), %rsi
movl -0x40(%rbp), %ecx
xorl %edi, %edi
leaq -0x44(%rbp), %rdx
callq 0x8c20
movl 0xba7e(%rip), %eax      # 0x144a0
addl $0x1, %eax
movl %eax, 0xba75(%rip)      # 0x144a0
jmp 0x8a66
movsbl -0x39(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x11b0
cmpq $0x0, -0x28(%rbp)
je 0x8a4f
movq -0x28(%rbp), %rax
leaq 0x6122(%rip), %rcx      # 0xeb6e
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x8a64
movq -0x30(%rbp), %rax
leaq 0x610d(%rip), %rcx      # 0xeb6e
movq %rcx, (%rax)
jmp 0x8a66
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x24(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0xffffffff, 0x80(%rax) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movl $0xfffffffd, 0x28(%rax) # imm = 0xFFFFFFFD
movl $0x0, -0x40(%rbp)
movl $0xfffffc00, -0x44(%rbp) # imm = 0xFFFFFC00
movq -0x10(%rbp), %rdi
callq 0x1160
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x8ab2
jmp 0x8be3
movq -0x10(%rbp), %rdi
callq 0x1260
movb %al, -0x39(%rbp)
movsbl -0x39(%rbp), %eax
cmpl $0x3e, %eax
jne 0x8ad9
movsbl -0x39(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x11b0
jmp 0x8be3
movsbl -0x39(%rbp), %eax
cmpl $-0x1, %eax
jne 0x8ae7
jmp 0x8be3
movq -0x18(%rbp), %rax
movsbq -0x39(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x4c(%rbp)
subl $-0x3, %eax
je 0x8b92
jmp 0x8b01
movl -0x4c(%rbp), %eax
subl $-0x2, %eax
je 0x8b1c
jmp 0x8b0b
movl -0x4c(%rbp), %eax
subl $-0x1, %eax
je 0x8ba1
jmp 0x8ba3
cmpq $0x0, -0x28(%rbp)
je 0x8b5b
movq 0xa4ce(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movsbl -0x39(%rbp), %edx
movsbl -0x39(%rbp), %ecx
movl 0xb964(%rip), %r8d      # 0x144a0
movl -0x40(%rbp), %r9d
movq -0x28(%rbp), %rax
movq (%rax), %rax
leaq 0x6b2a(%rip), %rsi      # 0xf678
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1150
jmp 0x8b86
movq 0xa496(%rip), %rax      # 0x12ff8
movq (%rax), %rdi
movsbl -0x39(%rbp), %edx
movsbl -0x39(%rbp), %ecx
movl 0xb92c(%rip), %r8d      # 0x144a0
movl -0x40(%rbp), %r9d
leaq 0x6b30(%rip), %rsi      # 0xf6af
movb $0x0, %al
callq 0x1150
movl $0x0, -0x4(%rbp)
jmp 0x8c12
movl 0xb908(%rip), %eax      # 0x144a0
addl $0x1, %eax
movl %eax, 0xb8ff(%rip)      # 0x144a0
jmp 0x8bde
cmpq $0x0, -0x20(%rbp)
je 0x8bd3
movq -0x18(%rbp), %rax
movsbq -0x39(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x20(%rbp), %rsi
movl -0x40(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x40(%rbp)
leaq -0x44(%rbp), %rdx
movsbl %al, %edi
callq 0x8c20
jmp 0x8bdc
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x8bde
jmp 0x8a98
cmpq $0x0, -0x20(%rbp)
je 0x8bfc
movq -0x20(%rbp), %rsi
movl -0x40(%rbp), %ecx
xorl %edi, %edi
leaq -0x44(%rbp), %rdx
callq 0x8c20
cmpq $0x0, -0x38(%rbp)
je 0x8c0c
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)