// File: /workspace/github_c_makefile_star2_O0/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:
subq $0xe8, %rsp
movq 0xf0(%rsp), %rax
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r8, 0xc0(%rsp)
movl %r9d, 0xbc(%rsp)
cmpq $0x0, 0xd8(%rsp)
je 0x306d25
cmpq $0x0, 0xc0(%rsp)
jne 0x306d5d
movq 0x335274(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x20f2dd(%rip), %rsi    # 0x516013
leaq 0x28c5e7(%rip), %rdx    # 0x593324
leaq 0x28c5f0(%rip), %rcx    # 0x593334
leaq 0x28c572(%rip), %r8     # 0x5932bd
movl $0xed, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x306d5f
cmpq $0x0, 0xd0(%rsp)
jne 0x306d6f
jmp 0x30701c
jmp 0x306d71
cmpq $0x0, 0xd0(%rsp)
jne 0x306db4
movq 0x33521d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x20f286(%rip), %rsi    # 0x516013
leaq 0x28c3f1(%rip), %rdx    # 0x593185
leaq 0x28c599(%rip), %rcx    # 0x593334
leaq 0x28c51b(%rip), %r8     # 0x5932bd
movl $0xf0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x306db6
movq 0xd0(%rsp), %rdi
callq 0x12a9b0
movq %rax, 0xb0(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x12a0f0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x12a290
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xe0(%rsp), %rax
movl 0x48(%rax), %eax
movl %eax, %edi
movq 0x88(%rsp), %rsi
callq 0x307080
movq %rax, 0xa0(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x307080
addq $0x1, %rax
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movq 0xe0(%rsp), %rcx
movl 0x4c(%rcx), %ecx
cmpq %rcx, %rax
ja 0x30701c
movq 0xa0(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x68(%rcx), %rax
ja 0x30701c
movq 0xa0(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jb 0x30701c
movq 0x98(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x58(%rcx), %rax
ja 0x30701c
movq 0x98(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x30701c
movq 0x78(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x78(%rcx), %rax
ja 0x30701c
movq 0x78(%rsp), %rax
movq 0xe0(%rsp), %rcx
cmpq 0x70(%rcx), %rax
jb 0x30701c
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0xbc(%rsp), %eax
movl %eax, 0x24(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0x90(%rsp), %rdx
subq 0x88(%rsp), %rdx
addq $0x1, %rdx
movq 0xc8(%rsp), %rcx
movq 0x78(%rsp), %r8
callq 0x3071d0
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
movq 0x48(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0xf0(%rsp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x3070e0
movq %rax, 0xa8(%rsp)
movq 0xd8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
movl $0x8, %edx
callq 0x81100
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)