// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/jkOwnLib/gfBlatLib.c
// Function: gfFindAlignAaTrans
void gfFindAlignAaTrans(struct genoFind *gfs[3], aaSeq *qSeq, struct hash *t3Hash, 
	boolean tIsRc, int minMatch, struct gfOutput *out)
/* Look for qSeq alignment in three translated reading frames. Save alignment
 * via outFunction/outData. */
{
struct gfClump *clumps[3];
int frame;
struct gfClump *clump;
struct gfRange *rangeList = NULL, *range;
aaSeq *targetSeq;
struct ssBundle *bun;
int tileSize = gfs[0]->tileSize;
struct trans3 *t3;
int hitCount;
struct lm *lm = lmInit(0);

gfTransFindClumps(gfs, qSeq, clumps, lm, &hitCount);
for (frame=0; frame<3; ++frame)
    {
    for (clump = clumps[frame]; clump != NULL; clump = clump->next)
	{
	clumpToHspRange(clump, qSeq, tileSize, frame, NULL, &rangeList, TRUE, FALSE);
	}
    }
slReverse(&rangeList);
slSort(&rangeList, gfRangeCmpTarget);
rangeList = gfRangesBundle(rangeList, ffIntronMax/3);
for (range = rangeList; range != NULL; range = range->next)
    {
    targetSeq = range->tSeq;
    t3 = hashMustFindVal(t3Hash, targetSeq->name);
    AllocVar(bun);
    bun->qSeq = qSeq;
    bun->genoSeq = targetSeq;
    bun->ffList = gfRangesToFfItem(range->components, qSeq);
    bun->isProt = TRUE;
    bun->t3List = t3;
    ssStitch(bun, ffCdna, minMatch, ssAliCount);
    saveAlignments(targetSeq->name, t3->seq->size, 0, 
	bun, t3Hash, FALSE, tIsRc, ffCdna, minMatch, out);
    ssBundleFree(&bun);
    }
gfRangeFreeList(&rangeList);
for (frame=0; frame<3; ++frame)
    gfClumpFreeList(&clumps[frame]);
lmCleanup(&lm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x38(%rsp)
movq %r8, 0x28(%rsp)
movl %ecx, %r12d
movq %rdx, 0x18(%rsp)
movq %rsi, %r13
movq %rdi, %r14
leaq 0x10(%rsp), %rbx
movq $0x0, (%rbx)
movq (%rdi), %rax
movl 0xc(%rax), %ebp
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2c220
movq %rax, 0x40(%rsp)
leaq 0x50(%rsp), %rdx
leaq 0x4c(%rsp), %r8
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rcx
callq 0xeec7
movq 0x50(%rsp,%r15,8), %r14
testq %r14, %r14
je 0x10817
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
pushq $0x0
pushq $0x1
callq 0x1098c
addq $0x10, %rsp
movq (%r14), %r14
jmp 0x107ef
incq %r15
cmpq $0x3, %r15
jne 0x107ea
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
leaq -0xbe8(%rip), %rsi      # 0xfc4c
movq %rbx, %rdi
callq 0x201c4
movq (%rbx), %rdi
leaq 0xb032a(%rip), %rax     # 0xc0b70
movslq (%rax), %rax
imulq $0x55555556, %rax, %rsi # imm = 0x55555556
movq %rsi, %rax
shrq $0x3f, %rax
shrq $0x20, %rsi
addl %eax, %esi
callq 0xfd63
movq %rax, (%rbx)
testq %rax, %rax
je 0x10951
movq %rax, %rbp
movq %r12, 0x30(%rsp)
movq 0x28(%rsp), %r12
movq 0x18(%rsp), %r14
movq 0x18(%rbp), %rbx
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x29361
movq %rax, %r14
movl $0x48, %edi
callq 0x2dff4
movq %rax, 0x8(%rsp)
movq %r13, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0x28(%rbp), %rdi
movq %r13, %rsi
callq 0x10529
movq 0x8(%rsp), %rdi
movq %rax, 0x8(%rdi)
movl $0x1, %r15d
movl %r15d, 0x30(%rdi)
movq %r14, 0x38(%rdi)
movl $0x1, %esi
movl %r12d, %edx
movl $0x10, %ecx
callq 0x14f5d
movq 0x8(%rbx), %rdi
movq 0x10(%r14), %rax
movq 0x18(%rsp), %r14
movl 0x18(%rax), %esi
movq 0x8(%rsp), %rcx
xorl %edx, %edx
movq %r14, %r8
xorl %r9d, %r9d
pushq 0x38(%rsp)
pushq %r12
pushq %r15
pushq 0x48(%rsp)
callq 0x10352
addq $0x20, %rsp
leaq 0x8(%rsp), %rdi
callq 0x149ec
movq (%rbp), %rbp
testq %rbp, %rbp
jne 0x10880
movq 0x10(%rsp), %r14
movq %r14, 0x20(%rsp)
testq %r14, %r14
je 0x10951
leaq 0x20(%rsp), %rbx
movq (%r14), %r14
movq %rbx, %rdi
callq 0xfbac
movq %r14, 0x20(%rsp)
testq %r14, %r14
jne 0x1093c
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x50, %rdi
callq 0xdbe4
addq $0x8, %rbx
cmpq $0x18, %rbx
jne 0x1095c
leaq 0x40(%rsp), %rdi
callq 0x2c2c7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq