// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltrdigest_ppt_visitor.c
// Function: ppt_attach_results_to_gff3
static void ppt_attach_results_to_gff3(GtLTRdigestPPTVisitor *lv,
                                       GtPPTResults *results,
                                       GtFeatureNode *mainnode,
                                       GtStrand *canonical_strand)
{
  GtRange ppt_range;
  GtUword i = 0;
  GtGenomeNode *gf;
  GtPPTHit *hit = gt_ppt_results_get_ranked_hit(results, i++),
           *ubox;
  if (*canonical_strand == GT_STRAND_UNKNOWN)
    *canonical_strand = hit->strand;
  else {
    /* find best-scoring PPT on the given canonical strand */
    while (hit->strand != *canonical_strand
             && i < gt_ppt_results_get_number_of_hits(results)) {
      const char *msg = gt_feature_node_get_attribute(mainnode, "ID");
      gt_log_log("dropping PPT because of nonconsistent strand: %s\n",
                 msg == NULL ? "undefined" : msg);
      hit = gt_ppt_results_get_ranked_hit(results, i++);
    }
    /* if there is none, do not report a PPT */
    if (hit->strand != *canonical_strand)
      return;
  }
  ppt_range = gt_ppt_hit_get_coords(hit, lv);
  ppt_range.start++; ppt_range.end++;  /* GFF3 is 1-based */
  gf = gt_feature_node_new(gt_genome_node_get_seqid((GtGenomeNode*) mainnode),
                           gt_ft_RR_tract,
                           ppt_range.start,
                           ppt_range.end,
                           hit->strand);
  gt_feature_node_set_source((GtFeatureNode*) gf, lv->tag);
  gt_feature_node_set_strand(mainnode, hit->strand);
  gt_feature_node_add_child(mainnode, (GtFeatureNode*) gf);
  if ((ubox = gt_ppt_hit_get_ubox(hit)) != NULL) {
    GtRange ubox_range = gt_ppt_hit_get_coords(ubox, lv);
    ubox_range.start++; ubox_range.end++;
    gf = gt_feature_node_new(gt_genome_node_get_seqid((GtGenomeNode*) mainnode),
                             gt_ft_U_box,
                             ubox_range.start,
                             ubox_range.end,
                             gt_ppt_hit_get_strand(ubox));
    gt_feature_node_set_source((GtFeatureNode*) gf, lv->tag);
    gt_feature_node_set_strand(mainnode, gt_ppt_hit_get_strand(ubox));
    gt_feature_node_add_child(mainnode, (GtFeatureNode*) gf);
  }
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq $0x0, 0x80(%rsp)
movq 0xa8(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
callq 0x30d350
movq %rax, 0x70(%rsp)
movq 0x98(%rsp), %rax
cmpl $0x3, (%rax)
jne 0x30c850
movq 0x70(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x98(%rsp), %rax
movl %ecx, (%rax)
jmp 0x30c937
jmp 0x30c852
movq 0x70(%rsp), %rax
movl 0x28(%rax), %ecx
movq 0x98(%rsp), %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, 0x3f(%rsp)
je 0x30c898
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x30c770
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %al
testb $0x1, %al
jne 0x30c8a2
jmp 0x30c91c
movq 0xa0(%rsp), %rdi
leaq 0x2a31fc(%rip), %rsi    # 0x5afaad
callq 0x16c040
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x30c8d1
leaq 0x22137b(%rip), %rax    # 0x52dc45
movq %rax, 0x28(%rsp)
jmp 0x30c8db
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
leaq 0x287658(%rip), %rdi    # 0x593f3f
movb $0x0, %al
callq 0xe7740
movq 0xa8(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
callq 0x30d350
movq %rax, 0x70(%rsp)
jmp 0x30c852
movq 0x70(%rsp), %rax
movl 0x28(%rax), %eax
movq 0x98(%rsp), %rcx
cmpl (%rcx), %eax
je 0x30c935
jmp 0x30cafb
jmp 0x30c937
movq 0x70(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x30b200
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x171b70
movq %rax, %rdi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x70(%rsp), %rax
movl 0x28(%rax), %r8d
leaq 0x28618f(%rip), %rsi    # 0x592b54
callq 0x16c7e0
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x16c170
movq 0xa0(%rsp), %rdi
movq 0x70(%rsp), %rax
movl 0x28(%rax), %esi
callq 0x16e0f0
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x16d010
movq 0x70(%rsp), %rdi
callq 0x30d3c0
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x30cafb
movq 0x68(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x30b200
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x171b70
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x68(%rsp), %rdi
callq 0x30d410
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl %eax, %r8d
leaq 0x2874cb(%rip), %rsi    # 0x593f71
callq 0x16c7e0
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x16c170
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rdi
callq 0x30d410
movq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0x16e0f0
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x16d010
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)