LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_attribute
void gt_feature_node_set_attribute(GtFeatureNode *fn,
                                   const char *attr_name,
                                   const char *attr_value)
{
  gt_assert(fn && attr_name && attr_value);
  gt_assert(strlen(attr_name)); /* attribute name cannot be empty */
  gt_assert(strlen(attr_value)); /* attribute value cannot be empty */
  if (!fn->attributes)
    fn->attributes = gt_tag_value_map_new(attr_name, attr_value);
  else
    gt_tag_value_map_set(&fn->attributes, attr_name, attr_value);
  if (fn->observer && fn->observer->attribute_changed) {
    fn->observer->attribute_changed(fn, false, attr_name, attr_value,
                                    fn->observer->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3fa31
movq %rsi, %r14
testq %rsi, %rsi
je 0x3fa31
movq %rdx, %rbx
testq %rdx, %rdx
je 0x3fa31
cmpb $0x0, (%r14)
je 0x3fa36
cmpb $0x0, (%rbx)
je 0x3fa3b
movq %rdi, %r15
leaq 0x60(%rdi), %r12
cmpq $0x0, 0x60(%rdi)
je 0x3f9e5
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x49c80
jmp 0x3f9f4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49920
movq %rax, (%r12)
movq 0x80(%r15), %rcx
testq %rcx, %rcx
je 0x3fa25
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x3fa25
movq 0x60(%rcx), %r8
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xfb08
callq 0xfb7a
callq 0xfb41
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_type
void gt_feature_node_set_type(GtFeatureNode *fn, const char *type)
{
  gt_assert(fn && type);
  fn->type = gt_symbol(type);
  if (fn->observer && fn->observer->type_changed)
    fn->observer->type_changed(fn, fn->type, fn->observer->data);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3fa9f
testq %rsi, %rsi
je 0x3fa9f
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3cd3b
movq %rax, 0x40(%rbx)
movq 0x80(%rbx), %rcx
testq %rcx, %rcx
je 0x3fa9d
movq 0x18(%rcx), %r8
testq %r8, %r8
je 0x3fa9d
movq 0x60(%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmpq *%r8
popq %rbx
retq
callq 0xfbec
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_has_type
bool gt_feature_node_has_type(GtFeatureNode *fn, const char *type)
{
  gt_assert(fn && type);
  if (!fn->type) /* <fn> is pseudo-node */
    return false;
  return gt_strcmp(fn->type, type) ? false : true;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3fac8
testq %rsi, %rsi
je 0x3fac8
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x3fac4
callq 0x82d04
testl %eax, %eax
sete %al
jmp 0x3fac6
xorl %eax, %eax
popq %rcx
retq
callq 0xfc25
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_is_multi
bool gt_feature_node_is_multi(const GtFeatureNode *fn)
{
  gt_assert(fn);
  if ((fn->bit_field >> MULTI_FEATURE_OFFSET) & MULTI_FEATURE_MASK) {
    gt_assert(!((fn->bit_field >> PSEUDO_FEATURE_OFFSET) &
                   PSEUDO_FEATURE_MASK));
    return true;
  }
  return false;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3faea
movl 0x68(%rdi), %eax
movl %eax, %ecx
notl %ecx
testl $0xc000, %ecx           # imm = 0xC000
je 0x3faef
shrl $0xe, %eax
andl $0x1, %eax
popq %rcx
retq
callq 0xfc97
callq 0xfc5e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_is_pseudo
bool gt_feature_node_is_pseudo(const GtFeatureNode *fn)
{
  gt_assert(fn);
  if ((fn->bit_field >> PSEUDO_FEATURE_OFFSET) & PSEUDO_FEATURE_MASK) {
    gt_assert(!((fn->bit_field >> MULTI_FEATURE_OFFSET) & MULTI_FEATURE_MASK));
    return true;
  }
  return false;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x3fb11
movl 0x68(%rdi), %eax
movl %eax, %ecx
notl %ecx
testl $0xc000, %ecx           # imm = 0xC000
je 0x3fb16
movzwl %ax, %eax
shrl $0xf, %eax
popq %rcx
retq
callq 0xfd09
callq 0xfcd0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_make_multi_representative
void gt_feature_node_make_multi_representative(GtFeatureNode *fn)
{
  gt_assert(fn);
  feature_node_set_multi(fn);
  if (fn->observer && fn->observer->multi_changed) {
    fn->observer->multi_changed(fn, gt_feature_node_is_multi(fn),
                                fn->representative, fn->observer->data);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3fb74
movq %rdi, %rbx
orb $0x40, 0x69(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x3fb6c
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x3fb6c
movq %rbx, %rdi
movq %rax, %r14
callq 0x3facd
movq 0x78(%rbx), %rdx
movq 0x80(%rbx), %rcx
movq 0x60(%rcx), %rcx
movzbl %al, %esi
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xfd42
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_multi_representative
void gt_feature_node_set_multi_representative(GtFeatureNode *fn,
                                              GtFeatureNode *rep)
{
  gt_assert(fn);
  gt_assert(rep && gt_feature_node_is_multi(rep));
  feature_node_set_multi(fn);
  fn->representative = rep;
  if (fn->observer && fn->observer->multi_changed) {
    fn->observer->multi_changed(fn, gt_feature_node_is_multi(fn),
                                fn->representative, fn->observer->data);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3fbef
movq %rsi, %r14
testq %rsi, %rsi
je 0x3fbea
movq %rdi, %rbx
movq %r14, %rdi
callq 0x3facd
testb %al, %al
je 0x3fbea
orb $0x40, 0x69(%rbx)
movq %r14, 0x78(%rbx)
movq 0x80(%rbx), %rax
testq %rax, %rax
je 0x3fbe2
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x3fbe2
movq %rbx, %rdi
movq %rax, %r14
callq 0x3facd
movq 0x78(%rbx), %rdx
movq 0x80(%rbx), %rcx
movq 0x60(%rcx), %rcx
movzbl %al, %esi
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xfd7b
callq 0xfdb4
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_get_multi_representative
GtFeatureNode* gt_feature_node_get_multi_representative(GtFeatureNode *fn)
{
  gt_assert(fn && gt_feature_node_is_multi(fn) &&
            !gt_feature_node_is_pseudo(fn));
  if (fn->representative) {
    gt_assert(gt_feature_node_is_multi(fn->representative));
    return fn->representative;
  }
  return fn; /* is itself the representative */
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x3fc45
movq %rdi, %rbx
callq 0x3facd
testb %al, %al
je 0x3fc45
movq %rbx, %rdi
callq 0x3faf4
testb %al, %al
jne 0x3fc45
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x3fc40
callq 0x3facd
testb %al, %al
je 0x3fc4a
movq 0x78(%rbx), %rbx
movq %rbx, %rax
popq %rbx
retq
callq 0xfe5f
callq 0xfe26
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_strand
void gt_feature_node_set_strand(GtFeatureNode *fn, GtStrand strand)
{
  gt_assert(fn);
  fn->bit_field &= ~(STRAND_MASK << STRAND_OFFSET);
  fn->bit_field |= strand << STRAND_OFFSET;
  if (fn->observer && fn->observer->strand_changed)
    fn->observer->strand_changed(fn, strand, fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x3fcc0
movl $0xffffff1f, %eax       # imm = 0xFFFFFF1F
andl 0x68(%rdi), %eax
movl %esi, %ecx
shll $0x5, %ecx
orl %eax, %ecx
movl %ecx, 0x68(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x3fcbf
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x3fcbf
movq 0x60(%rax), %rdx
jmpq *%rcx
retq
pushq %rax
callq 0xff7c
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_get_exons
void gt_feature_node_get_exons(GtFeatureNode *fn, GtArray *exon_features)
{
  GT_UNUSED int had_err;
  gt_assert(fn && exon_features && !gt_array_size(exon_features));
  had_err = gt_feature_node_traverse_children(fn, exon_features,
                                              feature_node_save_exon, false,
                                              NULL);
  gt_assert(!had_err); /* feature_node_save_exon() is sane */
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3fd1f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x3fd1f
movq %rdi, %r14
movq %rbx, %rdi
callq 0x6f310
testq %rax, %rax
jne 0x3fd1f
leaq 0x30c(%rip), %rdx       # 0x4000f
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fd29
testl %eax, %eax
jne 0x3fd24
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0xffee
callq 0x10027
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: feature_node_save_exon
static int feature_node_save_exon(GtFeatureNode *fn, void *data,
                                  GT_UNUSED GtError *err)
{
  GtArray *exon_features = (GtArray*) data;
  gt_error_check(err);
  gt_assert(fn && exon_features);
  if (gt_feature_node_has_type(fn, gt_ft_exon)) {
    gt_array_add(exon_features, fn);
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, (%rsp)
testq %rdx, %rdx
je 0x4002e
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x40070
testq %rbx, %rbx
je 0x4006b
testq %r14, %r14
je 0x4006b
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x40061
leaq 0xbc8aa(%rip), %rsi     # 0xfc8f2
callq 0x82d04
testl %eax, %eax
jne 0x40061
movq %rsp, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x6f240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x100d2
callq 0x10099
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_determine_transcripttypes
void gt_feature_node_determine_transcripttypes(GtFeatureNode *fn)
{
  SaveExonAndCDSInfo info;
  GT_UNUSED int had_err;
  gt_assert(fn);
  info.exon_features = gt_array_new(sizeof (GtFeatureNode*));
  info.cds_features = gt_array_new(sizeof (GtFeatureNode*));
  had_err = gt_feature_node_traverse_children(fn, &info,
                                              determine_transcripttypes, false,
                                              NULL);
  gt_assert(!had_err); /* cannot happen, because determine_transcripttypes() is
                          sane */
  gt_array_delete(info.exon_features);
  gt_array_delete(info.cds_features);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x400db
movq %rdi, %rbx
movl $0x8, %edi
callq 0x6ef7c
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movl $0x8, %edi
callq 0x6ef7c
movq %rax, 0x8(%r14)
leaq 0x3a(%rip), %rdx        # 0x400e5
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fd29
testl %eax, %eax
jne 0x400e0
movq 0x8(%rsp), %rdi
callq 0x6f768
movq 0x10(%rsp), %rdi
callq 0x6f768
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x10144
callq 0x1010b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: determine_transcripttypes
static int determine_transcripttypes(GtFeatureNode *fn, void *data,
                                     GT_UNUSED GtError *err)
{
  SaveExonAndCDSInfo *info = (SaveExonAndCDSInfo*) data;
  GT_UNUSED int had_err;
  gt_error_check(err);
  gt_assert(fn && info);
  /* reset exon_features and cds_features */
  gt_array_reset(info->exon_features);
  gt_array_reset(info->cds_features);
  /* collect all direct children exons */
  had_err = gt_feature_node_traverse_direct_children(fn, info,
                                                     save_exons_and_cds, NULL);
  gt_assert(!had_err); /* cannot happen, because save_exons_and_cds() is sane */
  /* set transcript feature type, if necessary */
  set_transcript_types(info->exon_features, gt_feature_node_get_strand(fn));
  set_transcript_types(info->cds_features, gt_feature_node_get_strand(fn));
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x40100
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x4016a
testq %rbx, %rbx
je 0x40160
testq %r14, %r14
je 0x40160
movq (%r14), %rdi
callq 0x6f349
movq 0x8(%r14), %rdi
callq 0x6f349
leaq 0xc7c(%rip), %rdx       # 0x40d9e
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x40831
testl %eax, %eax
jne 0x40165
movq (%r14), %rdi
movl 0x68(%rbx), %esi
shrl $0x5, %esi
andl $0x7, %esi
callq 0x40e1b
movq 0x8(%r14), %rdi
movl 0x68(%rbx), %esi
shrl $0x5, %esi
andl $0x7, %esi
callq 0x40e1b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x101b6
callq 0x101ef
callq 0x1017d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_end
void gt_feature_node_set_end(GtFeatureNode *fn, GtUword end)
{
  gt_assert(fn && fn->range.start <= end);
  fn->range.end = end;
  if (fn->observer && fn->observer->range_changed)
    fn->observer->range_changed(fn, &(fn->range), fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x401b3
cmpq %rsi, 0x48(%rdi)
ja 0x401b3
movq %rsi, 0x50(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x401b2
movq 0x38(%rax), %rcx
testq %rcx, %rcx
je 0x401b2
leaq 0x48(%rdi), %rsi
movq 0x60(%rax), %rdx
jmpq *%rcx
retq
pushq %rax
callq 0x10261
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_set_score_p
void gt_feature_node_set_score_p(GtFeatureNode *fn, float* score)
{
  gt_assert(fn);
  fn->bit_field |= 1 << SCORE_IS_DEFINED_OFFSET;
  fn->score = *score;
  if (fn->observer && fn->observer->score_changed)
    fn->observer->score_changed(fn, *score, fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x401ea
orb $0x20, 0x69(%rdi)
movss (%rsi), %xmm0
movss %xmm0, 0x58(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x401e9
movq (%rax), %rcx
testq %rcx, %rcx
je 0x401e9
cvtss2sd %xmm0, %xmm0
movq 0x60(%rax), %rsi
jmpq *%rcx
retq
pushq %rax
callq 0x1029a
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_unset_score
void gt_feature_node_unset_score(GtFeatureNode *fn)
{
  gt_assert(fn);
  fn->bit_field &= ~(1 << SCORE_IS_DEFINED_OFFSET);
  fn->score = GT_UNDEF_FLOAT;
  if (fn->observer && fn->observer->score_changed)
    fn->observer->score_changed(fn, fn->score, fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x40223
andb $-0x21, 0x69(%rdi)
movl $0x7f7fffff, 0x58(%rdi) # imm = 0x7F7FFFFF
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x40222
movq (%rax), %rcx
testq %rcx, %rcx
je 0x40222
movq 0x60(%rax), %rsi
movsd 0xa48e8(%rip), %xmm0    # 0xe4b08
jmpq *%rcx
retq
pushq %rax
callq 0x102d3
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_add_attribute
void gt_feature_node_add_attribute(GtFeatureNode *fn,
                                   const char *attr_name,
                                   const char *attr_value)
{
  gt_assert(fn && attr_name && attr_value);
  gt_assert(strlen(attr_name)); /* attribute name cannot be empty */
  gt_assert(strlen(attr_value)); /* attribute value cannot be empty */
  if (!fn->attributes)
    fn->attributes = gt_tag_value_map_new(attr_name, attr_value);
  else
    gt_tag_value_map_add(&fn->attributes, attr_name, attr_value);
  if (fn->observer && fn->observer->attribute_changed) {
    fn->observer->attribute_changed(fn, true, attr_name, attr_value,
                                    fn->observer->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x402c6
movq %rsi, %r14
testq %rsi, %rsi
je 0x402c6
movq %rdx, %rbx
testq %rdx, %rdx
je 0x402c6
cmpb $0x0, (%r14)
je 0x402cb
cmpb $0x0, (%rbx)
je 0x402d0
movq %rdi, %r15
leaq 0x60(%rdi), %r12
cmpq $0x0, 0x60(%rdi)
je 0x40277
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x499d4
jmp 0x40286
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49920
movq %rax, (%r12)
movq 0x80(%r15), %rcx
testq %rcx, %rcx
je 0x402ba
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x402ba
movq 0x60(%rcx), %r8
movq %r15, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1030c
callq 0x1037e
callq 0x10345
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_remove_attribute
void gt_feature_node_remove_attribute(GtFeatureNode *fn,
                                      const char *attr_name)
{
  gt_assert(fn && attr_name);
  gt_assert(strlen(attr_name)); /* attribute name cannot be empty */
  gt_assert(fn->attributes); /* attribute list must exist already */
  if (gt_tag_value_map_size(fn->attributes) == 1) {
    gt_tag_value_map_delete(fn->attributes);
    fn->attributes = NULL;
  } else
    gt_tag_value_map_remove(&fn->attributes, attr_name);
  if (fn->observer && fn->observer->attribute_deleted) {
    fn->observer->attribute_deleted(fn, attr_name, fn->observer->data);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x4034f
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4034f
cmpb $0x0, (%rbx)
je 0x40354
movq %rdi, %r14
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x40359
leaq 0x60(%r14), %r15
callq 0x49e85
cmpq $0x1, %rax
jne 0x40318
movq (%r15), %rdi
callq 0x4a06f
movq $0x0, (%r15)
jmp 0x40323
movq %r15, %rdi
movq %rbx, %rsi
callq 0x49b5d
movq 0x80(%r14), %rax
testq %rax, %rax
je 0x40349
movq 0x30(%rax), %rcx
testq %rcx, %rcx
je 0x40349
movq 0x60(%rax), %rdx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rcx
popq %rbx
popq %r14
popq %r15
retq
callq 0x103b7
callq 0x10429
callq 0x103f0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: feature_node_has_gft
static bool feature_node_has_gft(const GtFeatureNode *fn, const char **fnts)
{
  GtFeatureNodeIterator *fni;
  GtFeatureNode *child;
  bool has_gft = false;
  gt_assert(fn && fnts && fnts[0] != NULL);
  fni = gt_feature_node_iterator_new(fn);
  while ((child = gt_feature_node_iterator_next(fni))) {
    GtUword i = 0;
    while (fnts[i] != NULL) {
      if (gt_feature_node_has_type((GtFeatureNode*) child, fnts[i])) {
        has_gft = true;
        break;
      }
      i++;
    }
    if (has_gft)
      break;
  }
  gt_feature_node_iterator_delete(fni);
  return has_gft;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x40411
movq %rsi, %rbx
testq %rsi, %rsi
je 0x40411
cmpq $0x0, (%rbx)
je 0x40411
callq 0x40ee0
movq %rax, %r14
movq %rax, %rdi
callq 0x41076
testq %rax, %rax
je 0x403f7
movq %rax, %r15
leaq 0x8(%rbx), %r12
movq (%rbx), %rsi
testq %rsi, %rsi
je 0x403e7
movq %r12, %r13
movq 0x40(%r15), %rdi
testq %rdi, %rdi
je 0x403da
callq 0x82d04
testl %eax, %eax
je 0x403fb
movq (%r13), %rsi
addq $0x8, %r13
testq %rsi, %rsi
jne 0x403c8
movq %r14, %rdi
callq 0x41076
movq %rax, %r15
testq %rax, %rax
jne 0x403bd
xorl %ebx, %ebx
jmp 0x403fd
movb $0x1, %bl
movq %r14, %rdi
callq 0x41108
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x1049b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_average_splice_site_prob
double gt_feature_node_average_splice_site_prob(const GtFeatureNode *fn,
                                                GtUword *num_ss)
{
  GtFeatureNodeIterator *fni;
  GtFeatureNode *child;
  GtUword num_of_splice_sites = 0;
  double averagessp = 0.0;
  gt_assert(fn);
  fni = gt_feature_node_iterator_new(fn);
  while ((child = gt_feature_node_iterator_next(fni))) {
    if (gt_feature_node_has_type(child, gt_ft_five_prime_cis_splice_site) ||
        gt_feature_node_has_type(child, gt_ft_five_prime_splice_site) ||
        gt_feature_node_has_type(child, gt_ft_three_prime_cis_splice_site) ||
        gt_feature_node_has_type(child, gt_ft_three_prime_splice_site)) {
      averagessp += gt_feature_node_get_score((GtFeatureNode*) child);
      num_of_splice_sites++;
    }
  }
  gt_feature_node_iterator_delete(fni);
  if (num_of_splice_sites)
    averagessp /= num_of_splice_sites;
  if (num_ss)
    *num_ss = num_of_splice_sites;
  return averagessp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4055d
movq %rsi, %rbx
callq 0x40ee0
movq %rax, %r14
movq %rax, %rdi
callq 0x41076
testq %rax, %rax
je 0x404fd
movq %rax, %rbp
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0xa4d6c(%rip), %r15     # 0xe51d3
leaq 0xa4d80(%rip), %r12     # 0xe51ee
movq 0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x404e7
movq %r15, %rsi
callq 0x82d04
testl %eax, %eax
je 0x404ca
movq 0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x404e7
movq %r12, %rsi
callq 0x82d04
testl %eax, %eax
je 0x404ca
movq 0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x404e7
leaq 0xa4d5d(%rip), %rsi     # 0xe5205
callq 0x82d04
testl %eax, %eax
je 0x404ca
movq 0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x404e7
leaq 0xa4d60(%rip), %rsi     # 0xe5221
callq 0x82d04
testl %eax, %eax
jne 0x404e7
movq %rbp, %rdi
callq 0x3fc4f
cvtss2sd %xmm0, %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
incq %r13
movq %r14, %rdi
callq 0x41076
movq %rax, %rbp
testq %rax, %rax
jne 0x4046e
jmp 0x40508
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x41108
testq %rbx, %rbx
je 0x40518
movq %r13, (%rbx)
testq %r13, %r13
je 0x40549
movq %r13, %xmm0
punpckldq 0xa0f56(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xa0f5e(%rip), %xmm0    # 0xe1490
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
jmp 0x4054e
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x104d4
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_is_similar
bool gt_feature_node_is_similar(const GtFeatureNode *fn_a,
                                const GtFeatureNode *fn_b)
{
  GtRange range_a, range_b;
  gt_assert(fn_a && fn_b);
  range_a = feature_node_get_range((GtGenomeNode*) fn_a);
  range_b = feature_node_get_range((GtGenomeNode*) fn_b);
  if (!gt_str_cmp(gt_genome_node_get_seqid((GtGenomeNode*) fn_a),
                  gt_genome_node_get_seqid((GtGenomeNode*) fn_b)) &&
      (gt_feature_node_get_type(fn_a) == gt_feature_node_get_type(fn_b)) &&
      (!gt_range_compare(&range_a, &range_b)) &&
      (gt_feature_node_get_strand(fn_a) ==
       gt_feature_node_get_strand(fn_b)) &&
      (gt_feature_node_get_phase(fn_a) ==
       gt_feature_node_get_phase(fn_b))) {
    return true;
  }
  return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x4060f
movq %rsi, %r14
testq %rsi, %rsi
je 0x4060f
movq %rdi, %rbx
callq 0x3f04a
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4153f
movups 0x48(%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0x3f04a
movq %rax, %rdi
movq %r14, %rsi
callq 0x4153f
movups 0x48(%rax), %xmm0
movaps %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x415a1
movq %rax, %r15
movq %r14, %rdi
callq 0x415a1
movq %r15, %rdi
movq %rax, %rsi
callq 0x3bc02
testl %eax, %eax
jne 0x405ff
movq 0x40(%rbx), %rax
cmpq 0x40(%r14), %rax
jne 0x405ff
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x7e09c
testl %eax, %eax
jne 0x405ff
movl 0x68(%r14), %eax
xorl 0x68(%rbx), %eax
testl $0x3e0, %eax            # imm = 0x3E0
je 0x4060b
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movb $0x1, %al
jmp 0x40601
callq 0x1050d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_unit_test
int gt_feature_node_unit_test(GtError *err)
{
  GtGenomeNode *fn;
  GtStr *seqid;
  int had_err = 0;

  gt_error_check(err);

  seqid = gt_str_new_cstr("seqid");
  fn = gt_feature_node_new(seqid, gt_ft_gene, 1, 1000, GT_STRAND_FORWARD);

  gt_ensure(!gt_feature_node_score_is_defined((GtFeatureNode*) fn));

  gt_genome_node_delete(fn);
  gt_str_delete(seqid);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x40633
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x406bd
leaq 0xc16ba(%rip), %rdi     # 0x101cf4
callq 0x3b785
movq %rax, %r14
leaq 0xcc077(%rip), %rsi     # 0x10c6c0
xorl %ebp, %ebp
movl $0x1, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
movq %rax, %rdi
xorl %r8d, %r8d
callq 0x3f280
movq %rax, %r15
movq %rax, %rdi
callq 0x3f954
testb %al, %al
je 0x406a0
leaq 0xa2ae3(%rip), %rsi     # 0xe3159
leaq 0xa4c27(%rip), %rdx     # 0xe52a4
leaq 0xa4c06(%rip), %rcx     # 0xe528a
leaq 0xa44ad(%rip), %r8      # 0xe4b38
movq %rbx, %rdi
movl $0x338, %r9d            # imm = 0x338
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r15, %rdi
callq 0x4210c
movq %r14, %rdi
callq 0x3c87b
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x10546
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_traverse_children_top
int gt_feature_node_traverse_children_top(GtFeatureNode *feature_node,
                                          void *data,
                                          GtFeatureNodeTraverseFunc traverse,
                                          GtError *err)
{
  GtArray *toplist;
  int had_err = 0;

  if (!feature_node)
    return 0;

  /* this is the first traversal */
  gt_assert(feature_node_get_dfs_status(feature_node) == DFS_WHITE);

  /* initialization */
  toplist = gt_array_new(sizeof (GtFeatureNode*));

  /* process queue */
  dfs_visit(feature_node, toplist);

  /* process topologically sorted feature node list */
  if (traverse) {
    while (gt_array_size(toplist)) {
      GtFeatureNode *fn = *(GtFeatureNode**) gt_array_pop(toplist);
      if ((had_err = traverse(fn, data, err)))
        break;
    }
  }

  /* free */
  gt_array_delete(toplist);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x40763
movq %rdi, %r13
testb $0x3, 0x6a(%rdi)
jne 0x40776
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl $0x8, %edi
callq 0x6ef7c
movq %rax, %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x4077b
xorl %ebp, %ebp
testq %r14, %r14
je 0x40759
movq %r12, %rdi
callq 0x6f310
testq %rax, %rax
je 0x40759
movq %r12, %rdi
callq 0x6f072
movq (%rax), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
je 0x40732
movl %eax, %ebp
movq %r12, %rdi
callq 0x6f768
jmp 0x40765
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x105f1
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: dfs_visit
static void dfs_visit(GtFeatureNode *u, GtArray *toplist)
{
  GtDlistelem *dlistelem;
  gt_assert(u && toplist);
  feature_node_set_dfs_status(u, DFS_GRAY);
  if (u->children) {
    for (dlistelem = gt_dlist_last(u->children);
         dlistelem != NULL;
         dlistelem = gt_dlistelem_previous(dlistelem)) {
      GtFeatureNode *v = (GtFeatureNode*) gt_dlistelem_get_data(dlistelem);
      if (feature_node_get_dfs_status(v) == DFS_WHITE)
        dfs_visit(v, toplist);
    }
  }
  feature_node_set_dfs_status(u, DFS_BLACK);
  if (!gt_feature_node_is_pseudo(u))
    gt_array_add(toplist, u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
je 0x4082c
movq %rsi, %rbx
testq %rsi, %rsi
je 0x4082c
movq %rdi, %r14
movl $0xfffcffff, %eax       # imm = 0xFFFCFFFF
andl 0x68(%rdi), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x68(%rdi)
movq 0x70(%rdi), %rdi
testq %rdi, %rdi
je 0x407f7
callq 0x73318
testq %rax, %rax
je 0x407f7
movq %rax, %r15
movq %r15, %rdi
callq 0x73384
movq %rax, %r12
movq %rax, %rdi
callq 0x406c2
testl %eax, %eax
jne 0x407e7
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4077b
movq %r15, %rdi
callq 0x74122
movq %rax, %r15
testq %rax, %rax
jne 0x407c5
movq %r14, %rdi
movl $0x2, %esi
callq 0x406d5
movq %r14, %rdi
callq 0x3faf4
testb %al, %al
jne 0x40820
movq %rsp, %rsi
movl $0x8, %edx
movq %rbx, %rdi
callq 0x6f240
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1062a
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_traverse_direct_children
int gt_feature_node_traverse_direct_children(GtFeatureNode *fn,
                                             void *traverse_func_data,
                                             GtFeatureNodeTraverseFunc traverse,
                                             GtError *err)
{
  GtDlistelem *dlistelem;
  int had_err = 0;
  gt_error_check(err);
  if (!fn || !traverse)
    return 0;
  if (fn->children) {
    for (dlistelem = gt_dlist_first(fn->children); dlistelem != NULL;
         dlistelem = gt_dlistelem_next(dlistelem)) {
      had_err = traverse((GtFeatureNode*) gt_dlistelem_get_data(dlistelem),
                          traverse_func_data, err);
      if (had_err)
        break;
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %rcx, %rcx
je 0x40856
movq %rbx, %rdi
callq 0x34fea
testb %al, %al
jne 0x408b6
testq %r12, %r12
sete %al
testq %r14, %r14
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x408ab
movq 0x70(%r12), %rdi
testq %rdi, %rdi
je 0x408ab
callq 0x73308
testq %rax, %rax
je 0x408ab
movq %rax, %r12
movq %r12, %rdi
callq 0x73384
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *%r14
testl %eax, %eax
jne 0x408a9
movq %r12, %rdi
callq 0x73394
movq %rax, %r12
testq %rax, %rax
jne 0x4087f
jmp 0x408ab
movl %eax, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x10663
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_number_of_children_of_type
GtUword gt_feature_node_number_of_children_of_type(const GtFeatureNode
                                                         *parent,
                                                         const GtFeatureNode
                                                         *node)
{
  GT_UNUSED int had_err = 0;
  GtTypeTraverseInfo traverseinfo;
  gt_assert(parent && node);
  traverseinfo.type = gt_feature_node_get_type(node);
  traverseinfo.number = 0;
  had_err = gt_feature_node_traverse_direct_children((GtFeatureNode*) parent,
                                                     &traverseinfo, count_types,
                                                     NULL);
  return traverseinfo.number;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x4090b
testq %rsi, %rsi
je 0x4090b
movq 0x40(%rsi), %rax
movq %rsp, %rbx
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
leaq 0x19(%rip), %rdx        # 0x40910
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x40831
movq 0x8(%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
callq 0x106d5
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: count_types
static int count_types(GtFeatureNode *fn, void *data, GT_UNUSED GtError *err)
{
  int had_err = 0;
  GtTypeTraverseInfo *traverseinfo = (GtTypeTraverseInfo*) data;
  gt_error_check(err);
  if (strcmp(traverseinfo->type, gt_feature_node_get_type(fn)) == 0)
    traverseinfo->number++;
  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x4092c
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x40952
movq (%rbx), %r15
movq %r14, %rdi
callq 0x3f914
movq %r15, %rdi
movq %rax, %rsi
callq 0xb890
testl %eax, %eax
jne 0x4094a
incq 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x1070e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_remove_leaf
void gt_feature_node_remove_leaf(GtFeatureNode *tree, GtFeatureNode *leafn)
{
  GT_UNUSED int had_err;
  GtFeatureNodeLeafDeleteInfo info;
  gt_assert(tree && leafn);

  info.leaf = leafn;
  info.parent = tree;
  info.deleted = false;

  /* ref child node to enable traversal */
  gt_genome_node_ref((GtGenomeNode*) leafn);
  gt_assert(gt_feature_node_number_of_children(leafn) == 0);
  had_err = gt_feature_node_traverse_children(tree, &info, remove_leaf, true,
                                              NULL);
  /* unref child node, traversal done */
  gt_genome_node_delete((GtGenomeNode*) leafn);

  if (info.deleted)
    set_tree_status(&tree->bit_field, TREE_STATUS_UNDETERMINED);

  gt_assert(!had_err); /* cannot happen, remove_leaf() is sane */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x409d6
movq %rsi, %r14
testq %rsi, %rsi
je 0x409d6
movq %rdi, %rbx
movq %r14, (%rsp)
movq %rdi, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
callq 0x4130c
movq 0x70(%r14), %rdi
callq 0x733a4
testq %rax, %rax
jne 0x409db
leaq 0x49(%rip), %rdx        # 0x409e5
movq %rsp, %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x3fd29
movl %eax, %ebp
movq %r14, %rdi
callq 0x4210c
cmpb $0x1, 0x10(%r15)
jne 0x409c7
andb $-0x19, 0x68(%rbx)
testl %ebp, %ebp
jne 0x409e0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x10747
callq 0x10780
callq 0x107b9
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: remove_leaf
static int remove_leaf(GtFeatureNode *node, void *data, GT_UNUSED GtError *err)
{
  GtFeatureNode *child;
  GtFeatureNodeLeafDeleteInfo* info = (GtFeatureNodeLeafDeleteInfo*) data;
  GtDlistelem *dlistelem;
  gt_error_check(err);
  if (node != info->leaf && node->children) {
    for (dlistelem = gt_dlist_first(node->children); dlistelem != NULL;
         dlistelem = gt_dlistelem_next(dlistelem)) {
      child = (GtFeatureNode*) gt_dlistelem_get_data(dlistelem);
      if (child == info->leaf) {
        gt_dlist_remove(node->children, dlistelem);
        gt_genome_node_delete((GtGenomeNode*) child);
        info->deleted = true;
        break;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x40a04
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x40a67
cmpq %r14, (%rbx)
je 0x40a59
movq 0x70(%r14), %rdi
testq %rdi, %rdi
je 0x40a59
callq 0x73308
testq %rax, %rax
je 0x40a59
movq %rax, %r15
movq %r15, %rdi
callq 0x73384
cmpq (%rbx), %rax
je 0x40a3e
movq %r15, %rdi
callq 0x73394
movq %rax, %r15
testq %rax, %rax
jne 0x40a1f
jmp 0x40a59
movq %rax, %r12
movq 0x70(%r14), %rdi
movq %r15, %rsi
callq 0x734fd
movq %r12, %rdi
callq 0x4210c
movb $0x1, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x107f2
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_mark
void gt_feature_node_mark(GtFeatureNode *fn)
{
  gt_assert(fn);
  fn->bit_field |= 1;
  if (fn->observer && fn->observer->mark_changed)
    fn->observer->mark_changed(fn, true, fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x40a96
orb $0x1, 0x68(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x40a95
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0x40a95
movq 0x60(%rax), %rdx
movl $0x1, %esi
jmpq *%rcx
retq
pushq %rax
callq 0x1082b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_unmark
void gt_feature_node_unmark(GtFeatureNode *fn)
{
  gt_assert(fn);
  if (gt_feature_node_is_marked(fn))
    fn->bit_field &= ~(1);
  if (fn->observer && fn->observer->mark_changed)
    fn->observer->mark_changed(fn, false, fn->observer->data);
}

// Assembly:
testq %rdi, %rdi
je 0x40acc
movl 0x68(%rdi), %eax
testb $0x1, %al
je 0x40aae
andl $-0x2, %eax
movl %eax, 0x68(%rdi)
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0x40acb
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0x40acb
movq 0x60(%rax), %rdx
xorl %esi, %esi
jmpq *%rcx
retq
pushq %rax
callq 0x10864
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_contains_marked
bool gt_feature_node_contains_marked(GtFeatureNode *fn)
{
  bool contains_marked = false;
  GT_UNUSED int rval;
  gt_assert(fn);
  rval = gt_feature_node_traverse_children(fn, &contains_marked,
                                           check_marked_status, true, NULL);
  gt_assert(!rval); /* check_marked_status() is sane */
  return contains_marked;
}

// Assembly:
pushq %rax
movb $0x0, 0x7(%rsp)
testq %rdi, %rdi
je 0x40b11
leaq 0x26(%rip), %rdx        # 0x40b1b
leaq 0x7(%rsp), %rsi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x3fd29
testl %eax, %eax
jne 0x40b16
movb 0x7(%rsp), %al
popq %rcx
retq
callq 0x1090f
callq 0x108d6
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_direct_children_do_not_overlap_generic
bool gt_feature_node_direct_children_do_not_overlap_generic(GtFeatureNode
                                                            *parent,
                                                            GtFeatureNode
                                                            *child)
{
  GtArray *children_ranges;
  GtDlistelem *dlistelem;
  GtFeatureNode *child_fn;
  GtRange range;
  bool rval;

  gt_assert(parent);

  if (!parent->children)
    return true;

  /* get children ranges */
  children_ranges = gt_array_new(sizeof (GtRange));
  gt_assert(parent->children);
  for (dlistelem = gt_dlist_first(parent->children); dlistelem != NULL;
       dlistelem = gt_dlistelem_next(dlistelem)) {
    if (!child ||
        ((child_fn =
            gt_feature_node_try_cast(gt_dlistelem_get_data(dlistelem))) &&
         gt_feature_node_get_type(child) ==
         gt_feature_node_get_type(child_fn))) {
      range = gt_genome_node_get_range((GtGenomeNode*)
                                    gt_dlistelem_get_data(dlistelem));
      gt_array_add(children_ranges, range);
    }
  }

  gt_ranges_sort(children_ranges);
  gt_assert(gt_ranges_are_sorted(children_ranges));
  rval = gt_ranges_do_not_overlap(children_ranges);

  gt_array_delete(children_ranges);

  return rval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x40c28
movq %rdi, %r15
cmpq $0x0, 0x70(%rdi)
je 0x40c14
movq %rsi, %r14
movl $0x10, %edi
callq 0x6ef7c
movq 0x70(%r15), %rdi
testq %rdi, %rdi
je 0x40c2d
movq %rax, %rbx
callq 0x73308
testq %rax, %rax
je 0x40bec
movq %rax, %r15
leaq 0x8(%rsp), %r12
testq %r14, %r14
je 0x40bb2
movq %r15, %rdi
callq 0x73384
movq %rax, %r13
callq 0x3f04a
movq %rax, %rdi
movq %r13, %rsi
callq 0x41558
testq %rax, %rax
je 0x40bdc
movq 0x40(%r14), %rcx
cmpq 0x40(%rax), %rcx
jne 0x40bdc
movq %r15, %rdi
callq 0x73384
movq %rax, %rdi
callq 0x415e5
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl $0x10, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6f240
movq %r15, %rdi
callq 0x73394
movq %rax, %r15
testq %rax, %rax
jne 0x40b83
movq %rbx, %rdi
callq 0x7ea1b
movq %rbx, %rdi
callq 0x7ea99
testb %al, %al
je 0x40c32
movq %rbx, %rdi
callq 0x7eb0c
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6f768
jmp 0x40c17
movb $0x1, %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x109ba
callq 0x10981
callq 0x10948
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: gt_feature_node_overlaps_nodes_mark
bool gt_feature_node_overlaps_nodes_mark(GtFeatureNode *fn, GtArray *nodes,
                                         GtBittab *b)
{
  GtUword i;
  GtGenomeNode *node;
  GtRange fn_range, node_range;
  bool rval = false;
#ifndef NDEBUG
  GtStr *fn_id;
  gt_assert(fn && nodes);
  gt_assert(!b || gt_bittab_size(b) == gt_array_size(nodes));
  fn_id = gt_genome_node_get_idstr((GtGenomeNode*) fn);
#endif
  fn_range = gt_genome_node_get_range((GtGenomeNode*) fn);

  for (i = 0; i < gt_array_size(nodes); i++) {
    node = *(GtGenomeNode**) gt_array_get(nodes, i);
    gt_assert(!gt_str_cmp(fn_id, gt_genome_node_get_idstr(node)));
    node_range = gt_genome_node_get_range(node);
    if (gt_range_overlap(&fn_range, &node_range)) {
      rval = true;
      if (b)
        gt_bittab_set_bit(b, i);
      else
        break;
    }
  }
  return rval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x40d94
movq %rsi, %r14
testq %rsi, %rsi
je 0x40d94
movq %rdx, %rbx
movq %rdi, %r12
testq %rdx, %rdx
je 0x40cd2
movq %rbx, %rdi
callq 0x71194
movq %rax, %r15
movq %r14, %rdi
callq 0x6f310
cmpq %rax, %r15
jne 0x40d99
movq %r12, %rdi
callq 0x415c2
movq %rax, %r15
movq %r12, %rdi
callq 0x415e5
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, %rdi
callq 0x6f310
testq %rax, %rax
je 0x40d71
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
callq 0x6f037
movq (%rax), %rbp
movq %rbp, %rdi
callq 0x415c2
movq %r15, %rdi
movq %rax, %rsi
callq 0x3bc02
testl %eax, %eax
jne 0x40d8f
movq %rbp, %rdi
callq 0x415e5
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x7e1b2
testb %al, %al
je 0x40d5f
testq %rbx, %rbx
je 0x40d76
movq %rbx, %rdi
movq %r12, %rsi
callq 0x70d40
movb $0x1, %r13b
incq %r12
movq %r14, %rdi
callq 0x6f310
cmpq %rax, %r12
jb 0x40d02
jmp 0x40d79
xorl %r13d, %r13d
jmp 0x40d79
movb $0x1, %r13b
andb $0x1, %r13b
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x10ad7
callq 0x10a65
callq 0x10a9e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: save_exons_and_cds
static int save_exons_and_cds(GtFeatureNode *fn, void *data,
                              GT_UNUSED GtError *err)
{
  SaveExonAndCDSInfo *info = (SaveExonAndCDSInfo*) data;
  gt_error_check(err);
  gt_assert(fn && info);
  if (gt_feature_node_has_type(fn, gt_ft_exon))
    gt_array_add(info->exon_features, fn);
  else if (gt_feature_node_has_type(fn, gt_ft_CDS))
    gt_array_add(info->cds_features, fn);
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, (%rsp)
testq %rdx, %rdx
je 0x40dbd
movq %rdx, %rdi
callq 0x34fea
testb %al, %al
jne 0x40e16
testq %rbx, %rbx
je 0x40e11
testq %r14, %r14
je 0x40e11
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0x40de0
leaq 0xbbb1b(%rip), %rsi     # 0xfc8f2
callq 0x82d04
testl %eax, %eax
je 0x40df7
leaq 0xa43e8(%rip), %rsi     # 0xe51cf
movq %r14, %rdi
callq 0x3faa4
testb %al, %al
je 0x40e07
addq $0x8, %rbx
movq (%rbx), %rdi
movq %rsp, %rsi
movl $0x8, %edx
callq 0x6f240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x10b49
callq 0x10b10
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node.c
// Function: set_transcript_types
static void set_transcript_types(GtArray *features, GtStrand parent_strand)
{
  GtFeatureNode *fn;
  GtUword i;
  gt_assert(features);
  if (gt_array_size(features)) {
    if (gt_array_size(features) == 1) {
      fn = *(GtFeatureNode**) gt_array_get_first(features);
      set_transcriptfeaturetype(fn, TRANSCRIPT_FEATURE_TYPE_SINGLE);
    }
    else {
      fn = *(GtFeatureNode**) gt_array_get_first(features);
      set_transcriptfeaturetype(fn, parent_strand != GT_STRAND_REVERSE
                                    ? TRANSCRIPT_FEATURE_TYPE_INITIAL
                                    : TRANSCRIPT_FEATURE_TYPE_TERMINAL);
      for (i = 1; i < gt_array_size(features) - 1; i++) {
        fn = *(GtFeatureNode**) gt_array_get(features, i);
        set_transcriptfeaturetype(fn, TRANSCRIPT_FEATURE_TYPE_INTERNAL);
      }
      fn = *(GtFeatureNode**) gt_array_get_last(features);
      set_transcriptfeaturetype(fn, parent_strand != GT_STRAND_REVERSE
                                    ? TRANSCRIPT_FEATURE_TYPE_TERMINAL
                                    : TRANSCRIPT_FEATURE_TYPE_INITIAL);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x40ed9
movl %esi, %ebp
movq %rdi, %rbx
callq 0x6f310
testq %rax, %rax
je 0x40e57
movq %rbx, %rdi
callq 0x6f310
movq %rax, %r14
movq %rbx, %rdi
callq 0x6f054
movq (%rax), %rdi
cmpq $0x1, %r14
jne 0x40e5c
xorl %esi, %esi
jmp 0x40ed0
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
cmpl $0x1, %ebp
sete %al
leal 0x1(,%rax,2), %esi
callq 0x3f37e
movq %rbx, %rdi
callq 0x6f310
addq $-0x3, %rax
cmpq $-0x3, %rax
ja 0x40eb3
movl $0x1, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6f037
movq (%rax), %rdi
movl $0x2, %esi
callq 0x3f37e
incq %r14
movq %rbx, %rdi
callq 0x6f310
decq %rax
cmpq %rax, %r14
jb 0x40e88
xorl %r14d, %r14d
cmpl $0x1, %ebp
setne %r14b
movq %rbx, %rdi
callq 0x6f05b
movq (%rax), %rdi
leal 0x1(,%r14,2), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x3f37e
callq 0x10b82
nop
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node_iterator.c
// Function: gt_feature_node_iterator_new
GtFeatureNodeIterator* gt_feature_node_iterator_new(const GtFeatureNode *fn)
{
  GtFeatureNodeIterator *fni;
  GtFeatureNode *child_feature;
  GtDlistelem *dlistelem;
  gt_assert(fn);
  fni = feature_node_iterator_new_base(fn);
  if (gt_feature_node_is_pseudo((GtFeatureNode*) fn)) {
    /* add the children backwards to traverse in order */
    for (dlistelem = gt_dlist_last(fn->children); dlistelem != NULL;
         dlistelem = gt_dlistelem_previous(dlistelem)) {
      child_feature = (GtFeatureNode*) gt_dlistelem_get_data(dlistelem);
      gt_array_add(fni->feature_stack, child_feature);
    }
  }
  else
    gt_array_add(fni->feature_stack, fni->fn);
  gt_assert(gt_array_size(fni->feature_stack));
  fni->direct = false;
  return fni;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdi, %rdi
je 0x40f7f
movq %rdi, %r14
callq 0x40f89
movq %rax, %rbx
movq %r14, %rdi
callq 0x3faf4
testb %al, %al
je 0x40f4f
movq 0x70(%r14), %rdi
callq 0x73318
testq %rax, %rax
je 0x40f60
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x73384
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movl $0x8, %edx
movq %r15, %rsi
callq 0x6f240
movq %r14, %rdi
callq 0x74122
movq %rax, %r14
testq %rax, %rax
jne 0x40f1f
jmp 0x40f60
movq 0x8(%rbx), %rdi
movl $0x8, %edx
movq %rbx, %rsi
callq 0x6f240
movq 0x8(%rbx), %rdi
callq 0x6f310
testq %rax, %rax
je 0x40f84
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x10bf2
callq 0x10bbb
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/feature_node_iterator.c
// Function: feature_node_iterator_new_base
static GtFeatureNodeIterator* feature_node_iterator_new_base(const GtFeatureNode
                                                             *fn)
{
  GtFeatureNodeIterator *fni;
  gt_assert(fn);
  fni = gt_malloc(sizeof *fni);
  fni->fn = (GtFeatureNode*) gt_genome_node_ref((GtGenomeNode*) fn);
  fni->feature_stack = gt_array_new(sizeof (GtFeatureNode*));
  return fni;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa487e(%rip), %rsi     # 0xe5815
movl $0x18, %edi
movl $0x23, %edx
callq 0x35862
movq %rax, %r14
movq %rbx, %rdi
callq 0x4130c
movq %rax, (%r14)
movl $0x8, %edi
callq 0x6ef7c
movq %rax, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq