// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/gff3_parser.c
// Function: gt_gff3_parser_parse_genome_nodes
int gt_gff3_parser_parse_genome_nodes(GtGFF3Parser *parser, int *status_code,
                                      GtQueue *genome_nodes,
                                      GtCstrTable *used_types,
                                      GtStr *filenamestr,
                                      GtUint64 *line_number,
                                      GtFile *fpin, GtError *err)
{
  size_t line_length;
  GtStr *line_buffer;
  char *line;
  const char *filename;
  int rval, had_err = 0;

  gt_error_check(err);
  gt_assert(status_code && genome_nodes && used_types);

  filename = gt_str_get(filenamestr);

  /* init */
  line_buffer = gt_str_new();

  while ((rval = gt_str_read_next_line_generic(line_buffer, fpin)) != EOF) {
    line = gt_str_get(line_buffer);
    line_length = gt_str_length(line_buffer);
    (*line_number)++;

    if (*line_number == 1) {
      had_err = parse_first_gff3_line(line, filename, genome_nodes, filenamestr,
                                      line_number, &parser->gvf_mode,
                                      parser->tidy, err);
      if (had_err == -1) /* error */
        break;
      if (had_err == 1) { /* line processed */
        gt_str_reset(line_buffer);
        had_err = 0;
        continue;
      }
      gt_assert(had_err == 0); /* line not processed */
    }
    if (line_length == 0) {
      gt_warning("skipping blank line "GT_LLU" in file \"%s\"", *line_number,
                 filename);
    }
    else if (parser->fasta_parsing || line[0] == '>') {
      parser->fasta_parsing = true;
      had_err = gff3_parser_parse_fasta_entry(genome_nodes, line, filenamestr,
                                              *line_number, fpin, err);
      break;
    }
    else if (line[0] == '#') {
      had_err = parse_meta_gff3_line(parser, genome_nodes, line, line_length,
                                     filenamestr, *line_number, err);
      if (had_err ||
          (!parser->incomplete_node && gt_queue_size(genome_nodes))) {
        break;
      }
    }
    else {
      had_err = parse_gff3_feature_line(parser, genome_nodes, used_types, line,
                                        line_length, filenamestr, *line_number,
                                        err);
      if (had_err || (!parser->incomplete_node && gt_queue_size(genome_nodes)))
        break;
    }
    gt_str_reset(line_buffer);
  }

  if (!had_err && rval == EOF && *line_number == 0) {
    if (parser->tidy) {
      gt_warning("GFF3 file \"%s\" is empty", gt_str_get(filenamestr));
    } else {
      gt_error_set(err, "GFF3 file \"%s\" is empty", gt_str_get(filenamestr));
      had_err = -1;
    }
  }

  if (!had_err && !parser->strict) {
    had_err = process_orphans(parser->orphanage, parser->feature_info,
                              parser->strict, parser->last_terminator,
                              parser->type_checker, genome_nodes, err);
  }

  if (had_err) {
    while (gt_queue_size(genome_nodes))
      gt_genome_node_delete(gt_queue_get(genome_nodes));
  }
  else if (rval == EOF && !parser->eof_emitted) {
    GtGenomeNode *eofn = gt_eof_node_new();
    gt_genome_node_set_origin(eofn, filenamestr, *line_number+1);
    gt_queue_add(genome_nodes, eofn);
    parser->eof_emitted = true;
  }

  gt_str_delete(line_buffer);
  if (gt_queue_size(genome_nodes))
    *status_code = 0; /* at least one node was created */
  else
    *status_code = EOF;
  return had_err;
}

// Assembly:
subq $0x78, %rsp
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rax
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movl $0x0, 0x20(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x297d0
movq 0x88(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x29798
jmp 0x297d0
movq 0x18a839(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1348bd(%rip), %rsi    # 0x15e066
leaq 0x134e98(%rip), %rdx    # 0x15e648
leaq 0x13a079(%rip), %rcx    # 0x163830
leaq 0x139ded(%rip), %r8     # 0x1635ab
movl $0x85c, %r9d            # imm = 0x85C
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x297d2
jmp 0x297d4
cmpq $0x0, 0x68(%rsp)
je 0x297ec
cmpq $0x0, 0x60(%rsp)
je 0x297ec
cmpq $0x0, 0x58(%rsp)
jne 0x29824
movq 0x18a7e5(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x134869(%rip), %rsi    # 0x15e066
leaq 0x13a04e(%rip), %rdx    # 0x163852
leaq 0x13a025(%rip), %rcx    # 0x163830
leaq 0x139d99(%rip), %r8     # 0x1635ab
movl $0x85d, %r9d            # imm = 0x85D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x29826
movq 0x50(%rsp), %rdi
callq 0x19940
movq %rax, 0x28(%rsp)
callq 0x18f00
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1a150
movl %eax, 0x24(%rsp)
cmpl $-0x1, %eax
je 0x29abe
movq 0x38(%rsp), %rdi
callq 0x19940
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x19a00
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x48(%rsp), %rax
cmpq $0x1, (%rax)
jne 0x29956
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x70(%rsp), %r9
addq $0x1f, %r9
movq 0x70(%rsp), %rax
movb 0x1c(%rax), %r10b
movq 0x88(%rsp), %rax
andb $0x1, %r10b
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x29c50
movl %eax, 0x20(%rsp)
cmpl $-0x1, 0x20(%rsp)
jne 0x298f3
jmp 0x29abe
cmpl $0x1, 0x20(%rsp)
jne 0x29911
movq 0x38(%rsp), %rdi
callq 0x19b70
movl $0x0, 0x20(%rsp)
jmp 0x2983f
jmp 0x29913
cmpl $0x0, 0x20(%rsp)
je 0x29952
movq 0x18a6b7(%rip), %rax    # 0x1b3fd8
movq (%rax), %rdi
leaq 0x13473b(%rip), %rsi    # 0x15e066
leaq 0x139f4a(%rip), %rdx    # 0x16387c
leaq 0x139ef7(%rip), %rcx    # 0x163830
leaq 0x139c6b(%rip), %r8     # 0x1635ab
movl $0x874, %r9d            # imm = 0x874
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x29954
jmp 0x29956
cmpq $0x0, 0x40(%rsp)
jne 0x2997e
movq 0x48(%rsp), %rax
movq (%rax), %rsi
movq 0x28(%rsp), %rdx
leaq 0x139f17(%rip), %rdi    # 0x163889
movb $0x0, %al
callq 0x1c550
jmp 0x29aaf
movq 0x70(%rsp), %rax
testb $0x1, 0x1d(%rax)
jne 0x29996
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
jne 0x299d6
movq 0x70(%rsp), %rax
movb $0x1, 0x1d(%rax)
movq 0x60(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq 0x80(%rsp), %r8
movq 0x88(%rsp), %r9
callq 0x29fe0
movl %eax, 0x20(%rsp)
jmp 0x29abe
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x29a42
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %rax
movq (%rax), %rax
movl %eax, %r9d
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
callq 0x2a190
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jne 0x29a3e
movq 0x70(%rsp), %rax
testb $0x1, 0x18(%rax)
jne 0x29a40
movq 0x60(%rsp), %rdi
callq 0x90d30
cmpq $0x0, %rax
je 0x29a40
jmp 0x29abe
jmp 0x29aab
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x40(%rsp), %r8
movq 0x50(%rsp), %r9
movq 0x48(%rsp), %rax
movq (%rax), %rax
movl %eax, %r10d
movq 0x88(%rsp), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2ae80
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jne 0x29aa7
movq 0x70(%rsp), %rax
testb $0x1, 0x18(%rax)
jne 0x29aa9
movq 0x60(%rsp), %rdi
callq 0x90d30
cmpq $0x0, %rax
je 0x29aa9
jmp 0x29abe
jmp 0x29aab
jmp 0x29aad
jmp 0x29aaf
movq 0x38(%rsp), %rdi
callq 0x19b70
jmp 0x2983f
cmpl $0x0, 0x20(%rsp)
jne 0x29b36
cmpl $-0x1, 0x24(%rsp)
jne 0x29b36
movq 0x48(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x29b36
movq 0x70(%rsp), %rax
testb $0x1, 0x1c(%rax)
je 0x29aff
movq 0x50(%rsp), %rdi
callq 0x19940
movq %rax, %rsi
leaq 0x139db9(%rip), %rdi    # 0x1638af
movb $0x0, %al
callq 0x1c550
jmp 0x29b34
movq 0x88(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
callq 0x19940
movq 0x10(%rsp), %rdi
movq %rax, %rdx
leaq 0x139d8a(%rip), %rsi    # 0x1638af
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x20(%rsp) # imm = 0xFFFFFFFF
jmp 0x29b36
cmpl $0x0, 0x20(%rsp)
jne 0x29b92
movq 0x70(%rsp), %rax
testb $0x1, 0x1b(%rax)
jne 0x29b92
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x70(%rsp), %rax
movq (%rax), %rsi
movq 0x70(%rsp), %rax
movb 0x1b(%rax), %dl
movq 0x70(%rsp), %rax
movl 0x50(%rax), %ecx
movq 0x70(%rsp), %rax
movq 0x40(%rax), %r8
movq 0x60(%rsp), %r9
movq 0x88(%rsp), %rax
andb $0x1, %dl
movzbl %dl, %edx
movq %rax, (%rsp)
callq 0x2b620
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
je 0x29bc1
jmp 0x29b9b
movq 0x60(%rsp), %rdi
callq 0x90d30
cmpq $0x0, %rax
je 0x29bbf
movq 0x60(%rsp), %rdi
callq 0x90c50
movq %rax, %rdi
callq 0x26eb0
jmp 0x29b9b
jmp 0x29c14
cmpl $-0x1, 0x24(%rsp)
jne 0x29c12
movq 0x70(%rsp), %rax
testb $0x1, 0x1e(%rax)
jne 0x29c12
callq 0xa6080
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rax
movq (%rax), %rax
addq $0x1, %rax
movl %eax, %edx
callq 0x25610
movq 0x60(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x909d0
movq 0x70(%rsp), %rax
movb $0x1, 0x1e(%rax)
jmp 0x29c14
movq 0x38(%rsp), %rdi
callq 0x1afc0
movq 0x60(%rsp), %rdi
callq 0x90d30
cmpq $0x0, %rax
je 0x29c3b
movq 0x68(%rsp), %rax
movl $0x0, (%rax)
jmp 0x29c46
movq 0x68(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl 0x20(%rsp), %eax
addq $0x78, %rsp
retq
nop