// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %r9, %r14
movl %r8d, %r15d
movl %ecx, 0x2c(%rsp)
movq %rdx, %rbp
movq %rsi, %rbx
movq %rdi, %r12
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x4774e
callq 0x3566a
testb %al, %al
jne 0x47e99
testq %r12, %r12
je 0x47e8f
testq %rbx, %rbx
je 0x47e8f
testq %rbp, %rbp
je 0x47e8f
callq 0x3d23c
movq %rax, %r13
movq %rbx, %rdi
callq 0x3a9cc
testq %rax, %rax
movq %rbp, 0x18(%rsp)
movq %r13, %rax
movq %r13, 0x20(%rsp)
je 0x47b18
movq %r15, 0x30(%rsp)
movq %r14, 0x50(%rsp)
xorl %r13d, %r13d
movq %rbx, 0x48(%rsp)
movq %rax, %r14
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3a990
movq %rbp, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
callq 0x850e4
testq %rax, %rax
je 0x47e7b
movq %rax, %r15
movq %rax, %rdi
callq 0x41f3f
movq %rax, %rbx
movq %r12, %rdi
callq 0x41f3f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c4b0
testl %eax, %eax
movq %r13, 0x58(%rsp)
je 0x47985
movq %r12, %rdi
callq 0x41f30
movl %eax, %ebx
movq %r12, %rdi
callq 0x41f10
movq %rax, %rbp
movq %r15, %rdi
callq 0x41f30
movq %r12, %r13
movl %eax, %r12d
movq %r13, %rdi
callq 0x41f3f
movq %rax, %rdi
callq 0x3c40b
movq %rax, %r14
movq %r15, %rdi
callq 0x41f3f
movq %rax, %rdi
callq 0x3c40b
movq %rax, %r10
subq $0x8, %rsp
movq 0xb0(%rsp), %rdi
leaq 0xa0aeb(%rip), %rsi     # 0xe833d
movl %ebx, %edx
movq %rbp, %rcx
movl %r12d, %r8d
movq %r14, %r9
movq 0x28(%rsp), %r14
xorl %eax, %eax
pushq %r10
callq 0x3559f
addq $0x10, %rsp
movq %r13, %rbx
movq %r13, %rdi
callq 0x42ade
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq 0x50(%rsp), %r12
testq %r12, %r12
sete %al
testl %edx, %edx
setne %cl
orb %al, %cl
jne 0x47936
movq %r15, %rdi
callq 0x40276
movq %rax, %r13
movq %rbx, %rdi
callq 0x40276
movq %rax, %rbp
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4c1ab
xorl %edx, %edx
testb %al, %al
jne 0x47936
movq %rbx, 0x40(%rsp)
movq %rbx, %rdi
callq 0x41f30
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
callq 0x41f10
movq %rax, %r14
movq %r15, %rdi
callq 0x41f30
movq %rax, 0x38(%rsp)
movq %r12, %rdi
callq 0x4c147
movq %rax, %r10
movq 0xa8(%rsp), %rdi
leaq 0xa0bbd(%rip), %rsi     # 0xe84c1
movq %rbp, %rdx
movl 0xc(%rsp), %ecx
movq %r14, %r8
movq 0x20(%rsp), %r14
movq %r13, %r9
xorl %eax, %eax
pushq %r10
pushq 0x40(%rsp)
callq 0x3559f
addq $0x10, %rsp
movq 0x40(%rsp), %rdi
callq 0x42ade
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, 0xc(%rsp)
testl %edx, %edx
jne 0x47e60
movq %r15, %rdi
movq %rbx, %r12
movq %rbx, %rsi
callq 0x4005b
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x3d318
movq 0x58(%rsp), %r13
incq %r13
movq 0x48(%rsp), %rbx
movq %rbx, %rdi
callq 0x3a9cc
cmpq %rax, %r13
movq 0x18(%rsp), %rbp
jb 0x477a4
jmp 0x47b23
cmpq %r12, %r15
je 0x47a10
movq %r15, %rdi
callq 0x41f30
movq 0x30(%rsp), %rbp
cmpl %ebp, %eax
jae 0x47a56
movq %r12, %rdi
callq 0x41f30
movl %eax, %ebx
movq %r12, %rdi
callq 0x41f10
movq %r14, %r13
movq %r12, %r14
movq %rax, %r12
movq %r15, %rdi
callq 0x41f30
movl %eax, %r10d
movq 0xa8(%rsp), %rdi
leaq 0xa0a15(%rip), %rsi     # 0xe83ed
leaq 0x9fd99(%rip), %rdx     # 0xe7778
movq 0x10(%rsp), %rcx
movl %ebx, %r8d
movq %r12, %r9
xorl %eax, %eax
pushq %rbp
leaq 0x9f349(%rip), %r11     # 0xe6d3d
pushq %r11
pushq %r10
pushq %rdx
callq 0x3559f
addq $0x20, %rsp
movq %r14, %rbx
movq %r14, %rdi
movq %r13, %r14
jmp 0x47875
movq %r12, %rdi
callq 0x41f30
movl %eax, %ebx
movq %r12, %rdi
callq 0x41f10
movq 0xa8(%rsp), %rdi
leaq 0xa096f(%rip), %rsi     # 0xe83a0
movl %ebx, %edx
movq %rax, %rcx
leaq 0x9fd3b(%rip), %r8      # 0xe7778
leaq 0x9fd31(%rip), %r9      # 0xe7775
xorl %eax, %eax
callq 0x3559f
movq %r12, %rbx
movq %r12, %rdi
jmp 0x47875
testq %r13, %r13
je 0x47a66
movq %r12, %rdi
callq 0x41ca0
movq %rax, %r12
xorl %edx, %edx
cmpb $0x0, 0x2c(%rsp)
je 0x47a77
movq %r12, %rbx
jmp 0x4787f
movq %r12, %rdi
callq 0x4186c
movq %rax, %r13
movq %rax, %rdi
callq 0x41a02
movq %rax, %rbx
testq %rax, %rax
je 0x47b04
xorl %ebp, %ebp
cmpq %r15, %rbx
jne 0x47aed
movq %r12, %rdi
callq 0x41f30
movl %eax, %ebp
movq %r12, %rdi
callq 0x41f10
subq $0x8, %rsp
movq 0xb0(%rsp), %rdi
leaq 0xa09ac(%rip), %rsi     # 0xe846a
movl %ebp, %edx
movq %rax, %rcx
leaq 0x9fcae(%rip), %r8      # 0xe7778
leaq 0x9fca4(%rip), %r9      # 0xe7775
xorl %eax, %eax
pushq 0x18(%rsp)
callq 0x3559f
addq $0x10, %rsp
movq %r12, %rdi
callq 0x42ade
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq %r15, %rbx
je 0x47b06
movq %r13, %rdi
callq 0x41a02
movq %rax, %rbx
testq %rax, %rax
jne 0x47a92
jmp 0x47b06
xorl %ebp, %ebp
movq %r12, %rbx
movq %r13, %rdi
callq 0x41a94
movl %ebp, %edx
jmp 0x4787f
movl $0x0, 0xc(%rsp)
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a9cc
movq %rax, %rbx
movq %r14, %rdi
callq 0x3d560
cmpq %rax, %rbx
jne 0x47e94
movq %r14, %rdi
callq 0x3d560
cmpq $0x2, %rax
jb 0x47e60
testq %r14, %r14
je 0x47e9e
movl $0x8, %edi
callq 0x6e93c
movq %rax, %r15
movq %r14, %rdi
callq 0x3d560
testq %rax, %rax
je 0x47bb9
movq %r14, %r12
xorl %ebx, %ebx
leaq 0x60(%rsp), %r14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3d3e2
movq %rbp, %rdi
movq %rax, %rsi
callq 0x8523c
movq %rax, 0x60(%rsp)
movl $0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ec0e
incq %rbx
movq %r12, %rdi
callq 0x3d560
cmpq %rax, %rbx
jb 0x47b7e
testq %r15, %r15
je 0x47ea3
movq %r15, %rdi
callq 0x6ecda
testq %rax, %rax
je 0x47c31
xorl %r12d, %r12d
movq %r12, %rbx
incq %r12
movq %r15, %rdi
callq 0x6ecda
cmpq %rax, %r12
jae 0x47c24
movq %r12, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6e9fa
movq (%rax), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e9fa
cmpq (%rax), %r13
jne 0x47c14
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ea59
decq %r14
incq %r14
movq %r15, %rdi
callq 0x6ecda
cmpq %rax, %r14
jb 0x47be8
movq %r15, %rdi
callq 0x6ecda
cmpq %rax, %r12
jb 0x47bd2
movq %r15, %rdi
xorl %esi, %esi
callq 0x6e9fa
movq (%rax), %r14
movq %r15, %rdi
callq 0x6ecda
cmpq $0x2, %rax
setae %bpl
jb 0x47c8b
movl $0x1, %esi
movq %r15, %rdi
callq 0x6e9fa
cmpq (%rax), %r14
jne 0x47c8b
movl $0x2, %ebx
movq %r15, %rdi
callq 0x6ecda
cmpq %rax, %rbx
setb %bpl
jae 0x47c8b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6e9fa
incq %rbx
cmpq (%rax), %r14
je 0x47c67
testb %bpl, %bpl
je 0x47e53
movq %r15, %rdi
xorl %esi, %esi
callq 0x6e9fa
movq (%rax), %r13
movq %r15, %rdi
callq 0x6ecda
cmpq $0x2, %rax
jb 0x47e53
movq 0xa0(%rsp), %rbp
movl $0x1, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0x6e9fa
testq %r13, %r13
je 0x47e80
movq (%rax), %r14
testq %r14, %r14
je 0x47e80
movq %r13, %rdi
callq 0x40459
movl %eax, %ebx
movq %r14, %rdi
callq 0x40459
movl %ebx, %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x47d98
movq %r13, %rdi
callq 0x40459
testb %al, %al
je 0x47e8a
movq %r12, 0x10(%rsp)
movq %r14, %rdi
callq 0x40459
testb %al, %al
je 0x47e85
movq %r14, %rdi
callq 0x41959
movq %rax, %rbx
movq %rax, %rdi
callq 0x41a02
testq %rax, %rax
movq 0x18(%rsp), %r12
je 0x47d6e
movq %rax, %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x4005b
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x851ce
movq %rbx, %rdi
callq 0x41a02
movq %rax, %rbp
testq %rax, %rax
jne 0x47d45
movq %rbx, %rdi
callq 0x41a94
movq 0xa0(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
callq 0x7c1fa
movq %r14, %rdi
callq 0x42ade
movq 0x10(%rsp), %r12
jmp 0x47dcb
testb %bl, %bl
je 0x47db1
movq %r13, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
callq 0x47eb2
jmp 0x47dcb
testb $0x1, %al
je 0x47de1
movq %r14, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %rdx
movq %rbp, %rcx
callq 0x47eb2
movq %r14, %r13
incq %r12
movq %r15, %rdi
callq 0x6ecda
cmpq %rax, %r12
jb 0x47cc1
jmp 0x47e53
movq %r13, %rdi
callq 0x40459
testb %al, %al
jne 0x47ead
movq %r12, 0x10(%rsp)
movq %r14, %rdi
callq 0x40459
testb %al, %al
jne 0x47ea8
movq %r13, %rdi
callq 0x3fd58
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rsi
movq 0x18(%rsp), %r12
movq %r12, %rdx
callq 0x4745f
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4745f
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x474d2
movq %rbp, %rdi
movq %r14, %rsi
callq 0x7c1fa
movq %rbx, %r13
jmp 0x47d91
movq %r15, %rdi
callq 0x6f134
movq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x3d573
movl 0xc(%rsp), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12dcd
callq 0x12e3f
callq 0x12f23
callq 0x12eea
callq 0x12d94
callq 0x12e06
callq 0x12d5b
callq 0x12f95
callq 0x12f5c
callq 0x12e78
callq 0x12eb1