// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltrdigest_pdom_visitor.c
// Function: gt_ltrdigest_pdom_visitor_attach_hit
static int gt_ltrdigest_pdom_visitor_attach_hit(GtLTRdigestPdomVisitor *lv,
                                                GtHMMERModelHit *modelhit,
                                                GtHMMERSingleHit *singlehit)
{
  GT_UNUSED GtUword i;
  GtGenomeNode *gf;
  int had_err = 0;
  GtRange rrng;
  gt_assert(lv && singlehit);

  rrng = gt_ltrdigest_pdom_visitor_coords(lv, singlehit);

  if (gt_array_size(singlehit->chains) > 0 || lv->output_all_chains) {
    char buf[32];
    gf = gt_feature_node_new(gt_genome_node_get_seqid((GtGenomeNode*)
                                                      lv->ltr_retrotrans),
                             gt_ft_protein_match,
                             rrng.start,
                             rrng.end,
                             singlehit->strand);
    gt_genome_node_add_user_data((GtGenomeNode*) gf, "pdom_alignment",
                                 gt_str_ref(singlehit->alignment),
                                 (GtFree) gt_str_delete);
    gt_genome_node_add_user_data((GtGenomeNode*) gf, "pdom_aaseq",
                                 gt_str_ref(singlehit->aastring),
                                 (GtFree) gt_str_delete);
    gt_feature_node_set_source((GtFeatureNode*) gf, lv->tag);
    gt_feature_node_set_score((GtFeatureNode*) gf, (float) singlehit->evalue);
    (void) snprintf(buf, (size_t) 32, "%d", (int) singlehit->frame);
    gt_feature_node_add_attribute((GtFeatureNode*) gf,
                                    "reading_frame", buf);
    if (modelhit->modelname != NULL) {
      gt_feature_node_add_attribute((GtFeatureNode*) gf, "name",
                                    modelhit->modelname);
    }
    if (gt_array_size(singlehit->chains) > 1UL && lv->output_all_chains) {
      GtStr *buffer;
      GtUword j;
      gt_assert(singlehit->chains != NULL);
      buffer = gt_str_new();
      for (j = 0UL; j < gt_array_size(singlehit->chains); j++) {
        gt_str_append_cstr(buffer, modelhit->modelname);
        gt_str_append_char(buffer, ':');
        gt_str_append_uword(buffer,
                          *(GtUword*) gt_array_get(singlehit->chains, j));
        if (j != gt_array_size(singlehit->chains) - 1) {
          gt_str_append_char(buffer, ',');
        }
      }
      gt_feature_node_set_attribute((GtFeatureNode*) gf, "chains",
                                    gt_str_get(buffer));
      gt_str_delete(buffer);
    }
    gt_feature_node_add_child(lv->ltr_retrotrans, (GtFeatureNode*) gf);
  }
  gt_array_delete(singlehit->chains);
  singlehit->chains = NULL;
  return had_err;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movl $0x0, 0x8c(%rsp)
cmpq $0x0, 0xb0(%rsp)
je 0x30acf0
cmpq $0x0, 0xa0(%rsp)
jne 0x30ad28
movq 0x3312a9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x20b312(%rip), %rsi    # 0x516013
leaq 0x288f5d(%rip), %rdx    # 0x593c65
leaq 0x288f66(%rip), %rcx    # 0x593c75
leaq 0x2887e3(%rip), %r8     # 0x5934f9
movl $0x243, %r9d            # imm = 0x243
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x30ad2a
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x30b0c0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x81370
cmpq $0x0, %rax
ja 0x30ad8c
movq 0xb0(%rsp), %rax
testb $0x1, 0x90(%rax)
je 0x30b08f
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x171b70
movq %rax, %rdi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0xa0(%rsp), %rax
movl 0x38(%rax), %r8d
leaq 0x248472(%rip), %rsi    # 0x553232
callq 0x16c7e0
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x11e360
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x28840d(%rip), %rsi    # 0x593207
leaq -0x1eb8a1(%rip), %rcx   # 0x11f560
callq 0x1726d0
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x11e360
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x2883e3(%rip), %rsi    # 0x593216
leaq -0x1eb8da(%rip), %rcx   # 0x11f560
callq 0x1726d0
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq 0x88(%rax), %rsi
callq 0x16c170
movq 0x90(%rsp), %rdi
movq 0xa0(%rsp), %rax
movsd 0x28(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x16d590
leaq 0x40(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rax
movl %eax, %ecx
movl $0x20, %esi
leaq 0x29260a(%rip), %rdx    # 0x59d4a2
movb $0x0, %al
callq 0x19b90
movq 0x90(%rsp), %rdi
leaq 0x40(%rsp), %rdx
leaq 0x25521f(%rip), %rsi    # 0x5600d2
callq 0x16edb0
movq 0xa8(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x30aee7
movq 0x90(%rsp), %rdi
movq 0xa8(%rsp), %rax
movq 0x30(%rax), %rdx
leaq 0x249f1c(%rip), %rsi    # 0x554dfe
callq 0x16edb0
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x81370
cmpq $0x1, %rax
jbe 0x30b076
movq 0xb0(%rsp), %rax
testb $0x1, 0x90(%rax)
je 0x30b076
jmp 0x30af19
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x30af60
movq 0x331071(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x20b0da(%rip), %rsi    # 0x516013
leaq 0x288d5a(%rip), %rdx    # 0x593c9a
leaq 0x288d2e(%rip), %rcx    # 0x593c75
leaq 0x2885ab(%rip), %r8     # 0x5934f9
movl $0x261, %r9d            # imm = 0x261
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x30af62
callq 0x11d4a0
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jae 0x30b043
movq 0x38(%rsp), %rdi
movq 0xa8(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0x11d550
movq 0x38(%rsp), %rdi
movl $0x3a, %esi
callq 0x11da70
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x80b60
movq 0x8(%rsp), %rdi
movq (%rax), %rsi
callq 0x11d930
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x10(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x30b02e
movq 0x38(%rsp), %rdi
movl $0x2c, %esi
callq 0x11da70
jmp 0x30b030
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x30af75
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x2665cc(%rip), %rsi    # 0x571633
callq 0x16d660
movq 0x38(%rsp), %rdi
callq 0x11f560
movq 0xb0(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x90(%rsp), %rsi
callq 0x16d010
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x81f80
movq 0xa0(%rsp), %rax
movq $0x0, 0x40(%rax)
movl 0x8c(%rsp), %eax
addq $0xb8, %rsp
retq
nop