// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/ltr/ltrdigest_pbs_visitor.c
// Function: gt_pbs_add_hit
static void gt_pbs_add_hit(GtLTRdigestPBSVisitor *lv, GtArray *hitlist,
                           GtAlignment *ali, GtUword trna_seqlen,
                           const char *desc, GtStrand strand, GtPBSResults *r)
{
  GtUword dist;
  GtPBSHit *hit;
  GtUword offset, alilen;
  GtRange urange, vrange;
  gt_assert(hitlist && desc);

  if (!ali) return;
  gt_assert(ali);

  dist = gt_alignment_eval(ali);
  urange = gt_alignment_get_urange(ali);
  vrange = gt_alignment_get_vrange(ali);
  offset = gt_ulongabs((GtUword) lv->radius, urange.start);
  alilen = gt_ulongabs(urange.end, urange.start)+1;

  if (dist <= (GtUword) lv->max_edist
        && offset <= lv->offsetlen.end
        && offset >= lv->offsetlen.start
        && alilen <= lv->alilen.end
        && alilen >= lv->alilen.start
        && vrange.start <= lv->trnaoffsetlen.end
        && vrange.start >= lv->trnaoffsetlen.start)
  {
    hit = gt_pbs_hit_new(alilen,
                         strand,
                         desc,
                         vrange.start,
                         urange.start,
                         urange.end,
                         offset,
                         dist,
                         gt_pbs_score_func(dist,
                                           offset,
                                           urange.end-urange.start + 1,
                                           trna_seqlen,
                                           vrange.start),
                         r);
    gt_array_add(hitlist, hit);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0x1c(%rsp)
movq %rcx, 0x20(%rsp)
testq %rsi, %rsi
je 0x1c01bf
movq %r8, %r14
testq %r8, %r8
je 0x1c01bf
movq %rdx, %r15
testq %rdx, %rdx
je 0x1c01b0
movq %rsi, %rbx
movq %rdi, %rbp
movq %r15, %rdi
callq 0xb55be
movq %rax, 0x8(%rsp)
movq %r15, %rdi
callq 0xb5000
movq %rax, %r12
movq %rdx, %r13
movq %r15, %rdi
callq 0xb5113
movl 0x48(%rbp), %ecx
movq %r12, %r15
subq %rcx, %r15
jne 0x1c001c
xorl %r15d, %r15d
jmp 0x1c0024
jae 0x1c0024
subq %r12, %rcx
movq %rcx, %r15
movq 0x8(%rsp), %rcx
movq %r13, 0x10(%rsp)
subq %r12, %r13
jne 0x1c0038
xorl %r13d, %r13d
jmp 0x1c0042
ja 0x1c0042
movq %r12, %r13
subq 0x10(%rsp), %r13
movl 0x4c(%rbp), %edx
cmpq %rdx, %rcx
ja 0x1c01b0
cmpq 0x68(%rbp), %r15
ja 0x1c01b0
cmpq 0x60(%rbp), %r15
jb 0x1c01b0
incq %r13
cmpq 0x58(%rbp), %r13
ja 0x1c01b0
cmpq 0x50(%rbp), %r13
jb 0x1c01b0
cmpq 0x78(%rbp), %rax
ja 0x1c01b0
cmpq 0x70(%rbp), %rax
jb 0x1c01b0
movq 0x10(%rsp), %rdx
subq %r12, %rdx
movq 0x127843(%rip), %xmm2   # 0x2e78e0
movapd 0x12784b(%rip), %xmm1   # 0x2e78f0
movsd 0x12617b(%rip), %xmm0   # 0x2e6228
movapd %xmm0, %xmm3
testq %r15, %r15
je 0x1c00d8
cvtsi2sd %rcx, %xmm4
movq %r15, %xmm5
punpckldq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
subpd %xmm1, %xmm5
movapd %xmm5, %xmm3
unpckhpd %xmm5, %xmm3            # xmm3 = xmm3[1],xmm5[1]
addsd %xmm5, %xmm3
mulsd %xmm4, %xmm3
incq %rdx
testq %rcx, %rcx
je 0x1c00e4
movapd %xmm3, %xmm0
movq %rdx, %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
subpd %xmm1, %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
movq 0x20(%rsp), %rcx
movq %rcx, %xmm3
subq %rax, %rcx
movq %rcx, %xmm5
punpckldq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
subpd %xmm1, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
subpd %xmm1, %xmm3
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
divsd %xmm1, %xmm6
mulsd %xmm4, %xmm6
divsd %xmm0, %xmm6
movapd %xmm6, 0x20(%rsp)
leaq 0x1a03d6(%rip), %rsi    # 0x360526
pushq $0x50
popq %rdi
movq %rax, %rbp
pushq $0x5a
popq %rdx
callq 0x93160
movq %r13, 0x28(%rax)
movl 0x1c(%rsp), %ecx
movl %ecx, 0x30(%rax)
movq %r14, 0x40(%rax)
movq %rbp, 0x20(%rax)
movq %r12, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x18(%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rax)
movaps 0x20(%rsp), %xmm0
movsd %xmm0, 0x38(%rax)
movq 0x70(%rsp), %rcx
movq %rcx, 0x48(%rax)
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x5851d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x277da2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x124e43(%rip), %rsi    # 0x2e5013
leaq 0x1a03b6(%rip), %rdx    # 0x36058d
leaq 0x1a03bf(%rip), %rcx    # 0x36059d
leaq 0x1a0341(%rip), %r8     # 0x360526
movl $0xed, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390