// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/gff3_parser.c
// Function: process_child
static int process_child(GtGenomeNode *child, GtSplitter *parent_splitter,
                         GtFeatureInfo *feature_info, bool strict,
                         unsigned int last_terminator,
                         GtTypeChecker *type_checker, GtQueue *genome_nodes,
                         GtError *err)
{
  GtStrArray *valid_parents;
  GtGenomeNode* parent_gf;
  GtUword i;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(child && parent_splitter && feature_info && genome_nodes);
  valid_parents = gt_str_array_new();
  for (i = 0; !had_err && i < gt_splitter_size(parent_splitter); i++) {
    const char *parent = gt_splitter_get_token(parent_splitter, i);
    parent_gf = (GtGenomeNode*) gt_feature_info_get(feature_info,
                                                    parent);
    gt_assert(parent_gf);
    if (gt_str_cmp(gt_genome_node_get_seqid(parent_gf),
                        gt_genome_node_get_seqid(child))) {
      gt_error_set(err, "child on line %u in file \"%s\" has different "
                   "sequence id than its parent on line %u ('%s' vs. '%s')",
                   gt_genome_node_get_line_number(child),
                   gt_genome_node_get_filename(child),
                   gt_genome_node_get_line_number(parent_gf),
                   gt_str_get(gt_genome_node_get_seqid(child)),
                   gt_str_get(gt_genome_node_get_seqid(parent_gf)));
      gt_genome_node_delete(child);
      had_err = -1;
    }
    if (!had_err && parent_gf == child) {
      gt_error_set(err, "feature on line %u in file \"%s\" is "
                   "self-referential (%s and %s are the same)",
                   gt_genome_node_get_line_number(child),
                   gt_genome_node_get_filename(child),
                   GT_GFF_PARENT, GT_GFF_ID);
      gt_genome_node_delete(child);
      had_err = -1;
    }
    if (!had_err && gt_genome_node_get_line_number(parent_gf) < last_terminator) {
      gt_error_set(err, "the child with %s \"%s\" on line %u in file "
                   "\"%s\" is separated from its corresponding %s on line %u "
                   "by terminator %s on line %u", GT_GFF_PARENT, parent,
                   gt_genome_node_get_line_number(child),
                   gt_genome_node_get_filename(child), GT_GFF_PARENT,
                   gt_genome_node_get_line_number(parent_gf), GT_GFF_TERMINATOR,
                   last_terminator);
      gt_genome_node_delete(child);
      had_err = -1;
    }
    if (!had_err) {
      if (i)
        child = gt_genome_node_ref(child);
      /* check for cycles (in strict mode, no cycles can occur) */
      if (!strict) {
        GtFeatureNodeIterator *fni;
        GtFeatureNode *node;
        fni = gt_feature_node_iterator_new((GtFeatureNode*) child);
        while (!had_err && (node = gt_feature_node_iterator_next(fni))) {
          if (node == (GtFeatureNode*) parent_gf) {
            gt_error_set(err, "linking the feature on line %u in file \"%s\" "
                         "to its %s with %s \"%s\" would cause a cycle",
                         gt_genome_node_get_line_number(child),
                         gt_genome_node_get_filename(child), GT_GFF_PARENT,
                         GT_GFF_ID, parent);
            gt_genome_node_delete(child);
            had_err = -1;
          }
        }
        gt_feature_node_iterator_delete(fni);
      }
    }
    if (!had_err && type_checker) {
      const char *parent_type, *child_type;
      /* check partof relationships */
      parent_type = gt_feature_node_get_type((GtFeatureNode*) parent_gf);
      child_type = gt_feature_node_get_type((GtFeatureNode*) child);
      if (!gt_type_checker_is_partof(type_checker, parent_type, child_type)) {
        gt_error_set(err, "the child feature with type '%s' on line %u in file "
                     "\"%s\" is not part-of parent feature with type '%s' "
                     "given on line %u (according to type checker '%s')",
                     child_type, gt_genome_node_get_line_number(child),
                     gt_genome_node_get_filename(child), parent_type,
                     gt_genome_node_get_line_number(parent_gf),
                     gt_type_checker_description(type_checker));
        gt_genome_node_delete(child);
        had_err = -1;
      }
    }
    if (!had_err) {
      gt_feature_node_add_child((GtFeatureNode*) parent_gf,
                                (GtFeatureNode*) child);
      gt_str_array_add_cstr(valid_parents, parent);
    }
  }
  if (!had_err) {
    gt_assert(gt_splitter_size(parent_splitter) ==
              gt_str_array_size(valid_parents));
    /* make sure all (valid) parents have the same (pseudo-)root */
    if (gt_str_array_size(valid_parents) >= 2) {
      GtArray *roots = find_roots(valid_parents, feature_info);
      dedup_roots(roots);
      if (roots_differ(roots))
        join_roots(roots, feature_info, genome_nodes);
      gt_array_delete(roots);
    }
  }
  gt_str_array_delete(valid_parents);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movq %r8, 0x8(%rsp)
movl %ecx, 0x1c(%rsp)
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x46b66
callq 0x34fea
testb %al, %al
jne 0x47216
movq %r14, 0x20(%rsp)
testq %rbx, %rbx
je 0x4720c
testq %r13, %r13
je 0x4720c
testq %rbp, %rbp
je 0x4720c
movq %rbx, %r15
callq 0x3c8cc
movq %rax, %r12
movq %r13, %rdi
callq 0x3a16c
testq %rax, %rax
je 0x46cdf
xorl %ebx, %ebx
movq %r12, (%rsp)
movq %rbp, 0x10(%rsp)
movq %r13, 0x38(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3a130
movq %rax, %r13
movq %rbp, %rdi
movq %rax, %rsi
callq 0x84c6c
testq %rax, %rax
je 0x47207
movq %rax, %rbp
movq %rax, %rdi
callq 0x415a1
movq %rax, %r14
movq %r15, %r12
movq %r15, %rdi
callq 0x415a1
movq %r14, %rdi
movq %rax, %rsi
callq 0x3bc02
testl %eax, %eax
jne 0x46ea4
cmpq %r12, %rbp
je 0x46f20
movq %rbp, %rdi
callq 0x41592
cmpl 0x8(%rsp), %eax
jb 0x46f5d
testq %rbx, %rbx
je 0x46c2b
movq %r12, %rdi
callq 0x4130c
movq %rax, %r12
cmpb $0x0, 0x1c(%rsp)
jne 0x46c5c
movq %r12, %rdi
callq 0x40ee0
movq %rax, %r14
movq %r14, %rdi
callq 0x41076
testq %rax, %rax
je 0x46c54
cmpq %rbp, %rax
jne 0x46c3d
jmp 0x46e4a
movq %r14, %rdi
callq 0x41108
movq 0x20(%rsp), %r15
testq %r15, %r15
movq %r12, %r14
je 0x46ca4
movq %rbp, %rdi
callq 0x3f914
movq %r13, 0x30(%rsp)
movq %rax, %r13
movq %r14, %rdi
callq 0x3f914
movq %rax, %r12
movq %r15, %rdi
movq %r13, 0x28(%rsp)
movq %r13, %rsi
movq 0x30(%rsp), %r13
movq %rax, %rdx
callq 0x4b557
testb %al, %al
je 0x471ab
movq %rbp, %rdi
movq %r14, %r15
movq %r14, %rsi
callq 0x3f6eb
movq (%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x3c9a5
incq %rbx
movq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0x3a16c
cmpq %rax, %rbx
movq 0x10(%rsp), %rbp
jb 0x46bb2
movq %r13, %rdi
callq 0x3a16c
movq %rax, %rbx
movq %r12, %rdi
callq 0x3cbed
cmpq %rax, %rbx
jne 0x47225
movq %r12, %rdi
callq 0x3cbed
xorl %ebx, %ebx
cmpq $0x2, %rax
jb 0x47192
testq %r12, %r12
je 0x4722a
movl $0x8, %edi
callq 0x6ef7c
movq %rax, %r15
movq %r12, %rdi
callq 0x3cbed
testq %rax, %rax
je 0x46d74
xorl %ebx, %ebx
leaq 0x40(%rsp), %r14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3ca6f
movq %rbp, %rdi
movq %rax, %rsi
callq 0x84dc4
movq %rax, 0x40(%rsp)
movl $0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f240
incq %rbx
movq %r12, %rdi
callq 0x3cbed
cmpq %rax, %rbx
jb 0x46d39
testq %r15, %r15
je 0x4722f
movq %r12, (%rsp)
movq %r15, %rdi
callq 0x6f310
testq %rax, %rax
je 0x46df0
xorl %r12d, %r12d
movq %r12, %rbx
incq %r12
movq %r15, %rdi
callq 0x6f310
cmpq %rax, %r12
jae 0x46de3
movq %r12, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6f037
movq (%rax), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f037
cmpq (%rax), %r13
jne 0x46dd3
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f096
decq %r14
incq %r14
movq %r15, %rdi
callq 0x6f310
cmpq %rax, %r14
jb 0x46da7
movq %r15, %rdi
callq 0x6f310
cmpq %rax, %r12
jb 0x46d91
movq %rbp, 0x10(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x6f037
movq (%rax), %r14
movq %r15, %rdi
callq 0x6f310
cmpq $0x2, %rax
jb 0x47184
movq 0x80(%rsp), %rbp
movl $0x1, %ebx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6f037
cmpq (%rax), %r14
jne 0x46fcd
incq %rbx
movq %r15, %rdi
callq 0x6f310
cmpq %rax, %rbx
jb 0x46e21
jmp 0x47184
movq %r12, %rdi
callq 0x41592
movl %eax, %ebx
movq %r12, %rdi
callq 0x41572
subq $0x8, %rsp
leaq 0xa15b1(%rip), %rsi     # 0xe8418
leaq 0xa08b8(%rip), %r8      # 0xe7726
leaq 0xa08ae(%rip), %r9      # 0xe7723
movq 0x90(%rsp), %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
pushq %r13
callq 0x34f1f
addq $0x10, %rsp
movq %r12, %rdi
callq 0x4210c
movq %r14, %rdi
callq 0x41108
jmp 0x46fbf
movq %r12, %rdi
callq 0x41592
movl %eax, %ebx
movq %r12, %rdi
callq 0x41572
movq %rax, %r14
movq %rbp, %rdi
callq 0x41592
movq %r12, %r15
movl %eax, %r12d
movq %r15, %rdi
callq 0x415a1
movq %rax, %rdi
callq 0x3bb5d
movq %rax, %r13
movq %rbp, %rdi
callq 0x415a1
movq %rax, %rdi
callq 0x3bb5d
movq %rax, %r10
subq $0x8, %rsp
leaq 0xa13f3(%rip), %rsi     # 0xe82eb
movq 0x90(%rsp), %rdi
movl %ebx, %edx
movq %r14, %rcx
movl %r12d, %r8d
movq %r13, %r9
xorl %eax, %eax
pushq %r10
callq 0x34f1f
addq $0x10, %rsp
movq %r15, %rdi
jmp 0x46fba
movq %r12, %rdi
callq 0x41592
movl %eax, %ebx
movq %r12, %rdi
callq 0x41572
leaq 0xa1415(%rip), %rsi     # 0xe834e
leaq 0xa07e6(%rip), %r8      # 0xe7726
leaq 0xa07dc(%rip), %r9      # 0xe7723
movq 0x88(%rsp), %rdi
movl %ebx, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x34f1f
jmp 0x46fb7
movq %r12, %rdi
callq 0x41592
movl %eax, %ebx
movq %r12, %rdi
callq 0x41572
movq %rax, %r14
movq %rbp, %rdi
callq 0x41592
movl %eax, %r10d
leaq 0x9fd67(%rip), %r11     # 0xe6ceb
leaq 0xa079b(%rip), %rdx     # 0xe7726
leaq 0xa1409(%rip), %rsi     # 0xe839b
movq 0x88(%rsp), %rdi
movq %r13, %rcx
movl %ebx, %r8d
movq %r14, %r9
xorl %eax, %eax
pushq 0x8(%rsp)
pushq %r11
pushq %r10
pushq %rdx
callq 0x34f1f
addq $0x20, %rsp
movq %r12, %rdi
callq 0x4210c
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq (%rsp), %r12
jmp 0x47192
movq %r15, %rdi
xorl %esi, %esi
callq 0x6f037
movq (%rax), %r13
movq %r15, %rdi
callq 0x6f310
cmpq $0x2, %rax
jb 0x47184
movl $0x1, %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x6f037
testq %r13, %r13
je 0x47211
movq (%rax), %r12
testq %r12, %r12
je 0x47211
movq %r13, %rdi
callq 0x3faf4
movl %eax, %ebx
movq %r12, %rdi
callq 0x3faf4
movl %ebx, %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x470c9
movq %r13, %rdi
callq 0x3faf4
testb %al, %al
je 0x47220
movq %r14, 0x8(%rsp)
movq %r12, %rdi
callq 0x3faf4
testb %al, %al
je 0x4721b
movq %r12, %rdi
callq 0x40fcd
movq %rax, %rbx
movq %rax, %rdi
callq 0x41076
testq %rax, %rax
movq 0x10(%rsp), %rbp
je 0x4709f
movq %rax, %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x3f6eb
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x84d56
movq %rbx, %rdi
callq 0x41076
movq %rax, %r14
testq %rax, %rax
jne 0x47076
movq %rbx, %rdi
callq 0x41108
movq 0x80(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x7c636
movq %r12, %rdi
callq 0x4210c
movq 0x8(%rsp), %r14
jmp 0x470fc
testb %bl, %bl
je 0x470e2
movq %r13, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rcx
callq 0x4723e
jmp 0x470fc
testb $0x1, %al
je 0x47112
movq %r12, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rcx
callq 0x4723e
movq %r12, %r13
incq %r14
movq %r15, %rdi
callq 0x6f310
cmpq %rax, %r14
jb 0x46ff2
jmp 0x47184
movq %r13, %rdi
callq 0x3faf4
testb %al, %al
jne 0x47239
movq %r14, 0x8(%rsp)
movq %r12, %rdi
callq 0x3faf4
testb %al, %al
jne 0x47234
movq %r13, %rdi
callq 0x3f3e8
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x46893
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x46893
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x46906
movq %rbp, %rdi
movq %r12, %rsi
callq 0x7c636
movq %rbx, %r13
jmp 0x470c2
movq %r15, %rdi
callq 0x6f768
movq (%rsp), %r12
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x3cc00
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x41592
movl %eax, %ebx
movq %r14, %rdi
callq 0x41572
movq %rax, %r13
movq %rbp, %rdi
callq 0x41592
movl %eax, %ebp
movq %r15, %rdi
callq 0x4b4f3
movq %rax, %r10
leaq 0xa1293(%rip), %rsi     # 0xe846f
movq 0x88(%rsp), %rdi
movq %r12, %rdx
movl %ebx, %ecx
movq %r13, %r8
movq 0x28(%rsp), %r9
xorl %eax, %eax
pushq %r10
pushq %rbp
callq 0x34f1f
addq $0x10, %rsp
movq %r14, %rdi
jmp 0x46fba
callq 0x12cb2
callq 0x12c79
callq 0x12d24
callq 0x12c40
callq 0x12e08
callq 0x12dcf
callq 0x12ceb
callq 0x12e7a
callq 0x12e41
callq 0x12d5d
callq 0x12d96