// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/sequence_buffer_embl.c
// Function: parse_next_line
static inline int
parse_next_line(GtSequenceBuffer *sb, GtEMBLParserLineCode *lc,
                GtStr *linebuf, const char **content,
                GtUword *linelen, GtUword *currentfileread,
                GtUword *currentfileadd, GtUword *currentoutpos,
                GtError *err)
{
  int currentchar, i, ret = 0;
  char linecode[2];
  GtSequenceBufferMembers *pvt;
  *lc = OTHER;

  pvt = sb->pvt;
  pvt->linenum++;
  *linelen = 0;

  /* determine line code */
  currentchar = inlinebuf_getchar(sb, pvt->inputstream);
  if (currentchar == EOF)
    return EOF;
  (*currentfileread)++;
  if (currentchar == NEWLINESYMBOL)
    return 0;
  linecode[0] = currentchar;
  currentchar = inlinebuf_getchar(sb, pvt->inputstream);
  if (currentchar == EOF)
    return EOF;
  (*currentfileread)++;
  if (currentchar == NEWLINESYMBOL) {
    gt_error_set(err, "2-character line code not found in line "GT_WU"",
                 (GtUword) pvt->linenum);
    return -2;
  }
  linecode[1] = currentchar;

  /* determine current line type */
  if (memcmp(linecode,      EMBL_DESCR_LINE_STRING, 2*sizeof (char)) == 0)
    *lc = DESCRIPTION;
  else if (memcmp(linecode, EMBL_SEQ_LINE_STRING ,  2*sizeof (char)) == 0)
    *lc = SEQUENCE;
  else if (memcmp(linecode, EMBL_SPACER,            2*sizeof (char)) == 0)
    *lc = SPACER;
  else if (memcmp(linecode, EMBL_ID_LINE_STRING,    2*sizeof (char)) == 0)
    *lc = ID;
  else if (memcmp(linecode, EMBL_ENTRY_TERMINATOR,  2*sizeof (char)) == 0)
    *lc = TERMINATOR;

  /* expect 3 blanks, except in spacer lines */
  if (*lc != SPACER) {
    for (i = 0; i < 3; i++) {
      currentchar = inlinebuf_getchar(sb, pvt->inputstream);
      if (currentchar == EOF)
        return EOF;
      (*currentfileread)++;
      if (currentchar == NEWLINESYMBOL)
        return 0;
      if (!isspace(currentchar)) {
        gt_error_set(err, "3 blanks expected between line code and content "
                          "in line "GT_WU"",
                     (GtUword) pvt->linenum);
        return -2;
      }
    }
  }

  /* read line body */
  i = 0;
  currentchar = inlinebuf_getchar(sb, pvt->inputstream);
  if (currentchar == EOF)
    return EOF;
  (*currentfileread)++;
  while (currentchar != NEWLINESYMBOL) {
    switch (*lc) {
      case SEQUENCE:
      /* sequences are 60 characters per line with 5 spaces in between */
        if (i++ < 65 && !isspace(currentchar)) {
          if (*currentoutpos >= (GtUword) OUTBUFSIZE) {
            /* if outbuffer is full, keep rest of sequence in overflow buffer */
            gt_str_append_char(linebuf, currentchar);
          } else {
            /* fill output buffer w/ current char */
            if ((ret = process_char(sb, *currentoutpos, currentchar, err)))
                return ret;
            (*currentoutpos)++;
            (*currentfileadd)++;
          }
          (*linelen)++;
        }
        break;
      case DESCRIPTION:
        /* write description into buffer */
        if (pvt->descptr) {
          if (!(((GtSequenceBufferEMBL*) sb)->desc_spacer_was_set)) {
            gt_desc_buffer_append_char(pvt->descptr, ' ');
            ((GtSequenceBufferEMBL*)sb)->desc_spacer_was_set = true;
          }
          gt_desc_buffer_append_char(pvt->descptr, currentchar);
        }
        break;
      case ID:
        /* write ID up to ';' into buffer */
        if (currentchar == ';') {
          *lc = OTHER;
          break;
        }
        if (pvt->descptr) {
          gt_desc_buffer_append_char(pvt->descptr, currentchar);
        }
        break;
      default:
        break;
    }
    currentchar = inlinebuf_getchar(sb, pvt->inputstream);
    if (currentchar == EOF)
      return EOF;
    (*currentfileread)++;
  }
  *content = gt_str_get(linebuf);
  return 0;
}

// Assembly:
subq $0x58, %rsp
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rax
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x40(%rsp), %rax
movl $0x5, (%rax)
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, (%rax)
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9efe0
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x9eb9a
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9efd3
movq 0x20(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0xa, 0x1c(%rsp)
jne 0x9ebbd
movl $0x0, 0x54(%rsp)
jmp 0x9efd3
movl 0x1c(%rsp), %eax
movb %al, 0x12(%rsp)
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9efe0
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x9ebf0
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9efd3
movq 0x20(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0xa, 0x1c(%rsp)
jne 0x9ec2f
movq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0xd2929(%rip), %rsi     # 0x171544
movb $0x0, %al
callq 0xc0d0
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x9efd3
movl 0x1c(%rsp), %eax
movb %al, 0x13(%rsp)
leaq 0x12(%rsp), %rax
movw (%rax), %ax
subw $0x4544, %ax            # imm = 0x4544
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9ec5e
movq 0x40(%rsp), %rax
movl $0x0, (%rax)
jmp 0x9ecf4
leaq 0x12(%rsp), %rax
movw (%rax), %ax
subw $0x2020, %ax            # imm = 0x2020
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9ec82
movq 0x40(%rsp), %rax
movl $0x2, (%rax)
jmp 0x9ecf2
leaq 0x12(%rsp), %rax
movw (%rax), %ax
subw $0x5858, %ax            # imm = 0x5858
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9eca6
movq 0x40(%rsp), %rax
movl $0x3, (%rax)
jmp 0x9ecf0
leaq 0x12(%rsp), %rax
movw (%rax), %ax
subw $0x4449, %ax            # imm = 0x4449
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9ecca
movq 0x40(%rsp), %rax
movl $0x1, (%rax)
jmp 0x9ecee
leaq 0x12(%rsp), %rax
movw (%rax), %ax
subw $0x2f2f, %ax            # imm = 0x2F2F
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9ecec
movq 0x40(%rsp), %rax
movl $0x4, (%rax)
jmp 0x9ecee
jmp 0x9ecf0
jmp 0x9ecf2
jmp 0x9ecf4
movq 0x40(%rsp), %rax
cmpl $0x3, (%rax)
je 0x9edbb
movl $0x0, 0x18(%rsp)
cmpl $0x3, 0x18(%rsp)
jge 0x9edb9
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9efe0
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x9ed40
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9efd3
movq 0x20(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0xa, 0x1c(%rsp)
jne 0x9ed63
movl $0x0, 0x54(%rsp)
jmp 0x9efd3
callq 0xb6b0
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x9eda7
movq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0xd27e0(%rip), %rsi     # 0x171573
movb $0x0, %al
callq 0xc0d0
movl $0xfffffffe, 0x54(%rsp) # imm = 0xFFFFFFFE
jmp 0x9efd3
jmp 0x9eda9
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x9ed0a
jmp 0x9edbb
movl $0x0, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9efe0
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x9edee
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9efd3
movq 0x20(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0xa, 0x1c(%rsp)
je 0x9efb6
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x9eef7
jmp 0x9ee1d
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0x9ef41
jmp 0x9ee2c
movl 0x4(%rsp), %eax
subl $0x2, %eax
jne 0x9ef78
jmp 0x9ee3b
movl 0x18(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rsp)
cmpl $0x41, %eax
jge 0x9eef2
callq 0xb6b0
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x9eef2
movq 0x68(%rsp), %rax
cmpq $0x2000, (%rax)         # imm = 0x2000
jb 0x9ee91
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %eax
movsbl %al, %esi
callq 0x194d0
jmp 0x9eee3
movq 0x48(%rsp), %rdi
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movl 0x1c(%rsp), %eax
movq 0x70(%rsp), %rcx
movzbl %al, %edx
callq 0x9e980
movl %eax, 0x14(%rsp)
cmpl $0x0, %eax
je 0x9eec5
movl 0x14(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0x9efd3
movq 0x68(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x60(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x9ef7a
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x9ef3f
movq 0x48(%rsp), %rax
testb $0x1, 0x24(%rax)
jne 0x9ef2a
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movl $0x20, %esi
callq 0xe0630
movq 0x48(%rsp), %rax
movb $0x1, 0x24(%rax)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movl 0x1c(%rsp), %eax
movsbl %al, %esi
callq 0xe0630
jmp 0x9ef7a
cmpl $0x3b, 0x1c(%rsp)
jne 0x9ef55
movq 0x40(%rsp), %rax
movl $0x5, (%rax)
jmp 0x9ef7a
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x9ef76
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movl 0x1c(%rsp), %eax
movsbl %al, %esi
callq 0xe0630
jmp 0x9ef7a
jmp 0x9ef7a
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
callq 0x9efe0
movl %eax, 0x1c(%rsp)
cmpl $-0x1, 0x1c(%rsp)
jne 0x9efa2
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9efd3
movq 0x20(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x9edfd
movq 0x38(%rsp), %rdi
callq 0x19940
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)