// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: gfTransTransFindBundles
static struct ssBundle *gfTransTransFindBundles(struct genoFind *gfs[3], struct dnaSeq *qSeq, 
	struct hash *t3Hash, boolean isRc, int minMatch, boolean isRna)
/* Look for alignment to three translations of qSeq in three translated reading frames. 
 * Save alignment via outFunction/outData. */
{
struct trans3 *qTrans = trans3New(qSeq);
int qFrame, tFrame;
struct gfClump *clumps[3][3], *clump;
struct gfRange *rangeList = NULL, *range;
int tileSize = gfs[0]->tileSize;
bioSeq *targetSeq;
struct ssBundle *bun, *bunList = NULL;
int hitCount;
struct lm *lm = lmInit(0);
enum ffStringency stringency = (isRna ? ffCdna : ffLoose);

gfTransTransFindClumps(gfs, qTrans->trans, clumps, lm, &hitCount);
for (qFrame = 0; qFrame<3; ++qFrame)
    {
    for (tFrame=0; tFrame<3; ++tFrame)
	{
	for (clump = clumps[qFrame][tFrame]; clump != NULL; clump = clump->next)
	    {
	    struct gfRange *rangeSet = NULL;
	    clumpToHspRange(clump, qTrans->trans[qFrame], tileSize, tFrame, NULL, &rangeSet, TRUE, FALSE);
	    untranslateRangeList(rangeSet, qFrame, tFrame, t3Hash, NULL, 0);
	    rangeList = slCat(rangeSet, rangeList);
	    }
	}
    }
slSort(&rangeList, gfRangeCmpTarget);
rangeList = gfRangesBundle(rangeList, 2000);
for (range = rangeList; range != NULL; range = range->next)
    {
    targetSeq = range->tSeq;
    AllocVar(bun);
    bun->qSeq = qSeq;
    bun->genoSeq = targetSeq;
    bun->ffList = gfRangesToFfItem(range->components, qSeq);
    ssStitch(bun, stringency, minMatch, ssAliCount);
    slAddHead(&bunList, bun);
    }
for (qFrame = 0; qFrame<3; ++qFrame)
    for (tFrame=0; tFrame<3; ++tFrame)
	gfClumpFreeList(&clumps[qFrame][tFrame]);
gfRangeFreeList(&rangeList);
trans3Free(&qTrans);
lmCleanup(&lm);
slReverse(&bunList);
return bunList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a4b0
movq %rax, -0x30(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, -0x9c(%rbp)
movq $0x0, -0xb8(%rbp)
xorl %edi, %edi
callq 0x3dc20
movq %rax, -0xc8(%rbp)
movl -0x24(%rbp), %edx
movl $0x3, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0xcc(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x18, %rsi
leaq -0x80(%rbp), %rdx
movq -0xc8(%rbp), %rcx
leaq -0xbc(%rbp), %r8
callq 0xf140
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x14fa5
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x14f95
movslq -0x34(%rbp), %rcx
leaq -0x80(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x14f85
movq $0x0, -0xd8(%rbp)
movq -0x88(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rsi
movl -0x9c(%rbp), %edx
movl -0x38(%rbp), %ecx
xorl %eax, %eax
movl %eax, %r8d
leaq -0xd8(%rbp), %r9
xorl %eax, %eax
movl $0x1, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x12980
movq -0xd8(%rbp), %rdi
movl -0x34(%rbp), %esi
movl -0x38(%rbp), %edx
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x13960
movq -0xd8(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2aa60
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x14edf
jmp 0x14f87
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x14eb7
jmp 0x14f97
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x14ea6
leaq -0x90(%rbp), %rdi
leaq -0x3783(%rip), %rsi     # 0x11830
callq 0x2ab90
movq -0x90(%rbp), %rdi
movl $0x7d0, %esi            # imm = 0x7D0
callq 0x119f0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x15096
movq -0x98(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xa8(%rbp)
movl $0x48, %edi
callq 0x40c50
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x12370
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0xb0(%rbp), %rdi
movl -0xcc(%rbp), %esi
movl -0x20(%rbp), %edx
movl 0xf0d8c(%rip), %ecx     # 0x105df4
callq 0x18b80
movq -0xb0(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x119b0
movq -0x98(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
jmp 0x14fde
movl $0x0, -0x34(%rbp)
cmpl $0x3, -0x34(%rbp)
jge 0x150e7
movl $0x0, -0x38(%rbp)
cmpl $0x3, -0x38(%rbp)
jge 0x150da
movslq -0x34(%rbp), %rax
leaq -0x80(%rbp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0xe5f0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x150aa
jmp 0x150dc
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1509d
leaq -0x90(%rbp), %rdi
callq 0x117e0
leaq -0x30(%rbp), %rdi
callq 0x1a560
leaq -0xc8(%rbp), %rdi
callq 0x3dd90
leaq -0xb8(%rbp), %rdi
callq 0x2aad0
movq -0xb8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)