// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/obo_parse_tree.c
// Function: parse_obo_file
static int parse_obo_file(GtOBOParseTree *obo_parse_tree,
                          GtIO *obo_file, GtError *err)
{
  int had_err = 0;
  gt_error_check(err);
  gt_assert(obo_parse_tree && obo_file);
  while (!had_err && ignored_char(obo_file)) {
    had_err = ignored_line(obo_file, err);
  }
  if (!had_err)
    had_err = header(obo_parse_tree, obo_file, err);
  while (!had_err && gt_io_has_char(obo_file)) {
    switch (gt_io_peek(obo_file)) {
      case OBO_BLANK_CHAR:
        had_err = blank_line(obo_file, err);
        break;
      case OBO_COMMENT_CHAR:
        had_err = comment_line(obo_file, err);
        break;
      case GT_CARRIAGE_RETURN:
        gt_io_next(obo_file);
        if (gt_io_peek(obo_file) == GT_END_OF_LINE)
          gt_io_next(obo_file);
        break;
      case GT_END_OF_LINE:
        gt_io_next(obo_file);
        break;
      default:
        had_err = stanza(obo_parse_tree, obo_file, err);
    }
  }
  if (!had_err)
    had_err = gt_io_expect(obo_file, GT_END_OF_FILE, err);
  if (!had_err)
    had_err = gt_obo_parse_tree_validate_stanzas(obo_parse_tree, err);
  return had_err;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x50b2bb
movq 0x10(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x50b283
jmp 0x50b2bb
movq 0x130d16(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0xad7f(%rip), %rsi      # 0x516013
leaq 0xaf24(%rip), %rdx      # 0x5161bf
leaq 0xb8d64(%rip), %rcx     # 0x5c4006
leaq 0xb8cad(%rip), %r8      # 0x5c3f56
movl $0x180, %r9d            # imm = 0x180
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x50b2bd
jmp 0x50b2bf
cmpq $0x0, 0x20(%rsp)
je 0x50b2cf
cmpq $0x0, 0x18(%rsp)
jne 0x50b307
movq 0x130cca(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0xad33(%rip), %rsi      # 0x516013
leaq 0xb8d2e(%rip), %rdx     # 0x5c4015
leaq 0xb8d18(%rip), %rcx     # 0x5c4006
leaq 0xb8c61(%rip), %r8      # 0x5c3f56
movl $0x181, %r9d            # imm = 0x181
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x50b309
jmp 0x50b30b
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
movb %al, 0xb(%rsp)
jne 0x50b326
movq 0x18(%rsp), %rdi
callq 0x50b7e0
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
testb $0x1, %al
jne 0x50b330
jmp 0x50b34a
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x50b840
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xc(%rsp)
jmp 0x50b30b
cmpl $0x0, 0xc(%rsp)
jne 0x50b369
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x50b8f0
movl %eax, 0xc(%rsp)
jmp 0x50b36b
xorl %eax, %eax
cmpl $0x0, 0xc(%rsp)
movb %al, 0xa(%rsp)
jne 0x50b386
movq 0x18(%rsp), %rdi
callq 0xe7270
movb %al, 0xa(%rsp)
movb 0xa(%rsp), %al
testb $0x1, %al
jne 0x50b393
jmp 0x50b43d
movq 0x18(%rsp), %rdi
callq 0xe7300
movsbl %al, %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x17, %eax
ja 0x50b420
movq (%rsp), %rax
leaq 0xb8b27(%rip), %rcx     # 0x5c3ee0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x50bab0
movl %eax, 0xc(%rsp)
jmp 0x50b438
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x50bbf0
movl %eax, 0xc(%rsp)
jmp 0x50b438
movq 0x18(%rsp), %rdi
callq 0xe7380
movq 0x18(%rsp), %rdi
callq 0xe7300
movsbl %al, %eax
cmpl $0xa, %eax
jne 0x50b412
movq 0x18(%rsp), %rdi
callq 0xe7380
jmp 0x50b438
movq 0x18(%rsp), %rdi
callq 0xe7380
jmp 0x50b438
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x50bd10
movl %eax, 0xc(%rsp)
jmp 0x50b36b
cmpl $0x0, 0xc(%rsp)
jne 0x50b45c
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xe7500
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x50b476
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x50bf70
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nop