// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/blatSrc/blat.c
// Function: performBigblat
void* performBigblat(void* args)
{
    int             id=*((int*)(((void**)args)[0]));
    int             queryCount=*((int*)(((void**)args)[1]));
    char            **queryFiles=(char**)(((void**)args)[2]);
    struct lineFile *lf=(struct lineFile *)(((void**)args)[3]);
    struct genoFind **gfs=(struct genoFind**)(((void**)args)[4]);
    struct hash     *t3Hash=(struct hash*)(((void**)args)[5]);
    int             isRc=*((int*)(((void**)args)[6]));
    boolean         qIsDna=*((boolean*)(((void**)args)[7]));
    FILE            *out=(FILE*)(((void**)args)[8]);
    boolean         transQuery=*((boolean*)(((void**)args)[9]));
    boolean         forceLower=*((boolean*)(((void**)args)[10]));
    boolean         forceUpper=*((boolean*)(((void**)args)[11]));
    boolean         maskUpper=*((boolean*)(((void**)args)[12]));
    boolean         toggle=*((boolean*)(((void**)args)[13]));
    struct gfOutput *gvo=(struct gfOutput *)(((void**)args)[14]);

    int             i;
    struct dnaSeq   trimmedSeq;

    unsigned        faFastBufSize = 0;
    DNA             *faFastBuf = NULL;

    ZeroVar(&trimmedSeq);
//for (i=0; i<queryCount; ++i)
    {
        aaSeq qSeq;
        qSeq.name=(char*)malloc(sizeof(char)*512);

        while (queryCount-- && faMixedSpeedReadNext(lf, &qSeq.dna, &qSeq.size, &qSeq.name, &faFastBuf, &faFastBufSize))
        {
            dotOut();
            /* Put it into right case and optionally mask on case. */
            if (forceLower)
                toLowerN(qSeq.dna, qSeq.size);
            else if (forceUpper)
                toUpperN(qSeq.dna, qSeq.size);
            else if (maskUpper)
            {
                if (toggle)
                    toggleCase(qSeq.dna, qSeq.size);
                upperToN(qSeq.dna, qSeq.size);
            }
            if (qSeq.size > qWarnSize)
            {
                warn("Query sequence %s has size %d, it might take a while.",
                     qSeq.name, qSeq.size);
            }
            trimSeq(&qSeq, &trimmedSeq);
            if (transQuery)
                transTripleSearch(&trimmedSeq, gfs, t3Hash, isRc, qIsDna, out, gvo);
            else
                tripleSearch(&trimmedSeq, gfs, t3Hash, isRc, out, gvo);
            gfOutputQuery(gvo, out);
        }
        free(qSeq.name);
        faFreeFastBuf(&faFastBuf, &faFastBufSize);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq 0x8(%rdi), %rax
movq 0x18(%rdi), %rcx
movq %rcx, 0x68(%rsp)
movl (%rax), %r15d
movq 0x20(%rdi), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rdi), %rax
movq %rax, 0x50(%rsp)
movq 0x30(%rdi), %rax
movl (%rax), %eax
movl %eax, 0x10(%rsp)
movq 0x38(%rdi), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x40(%rdi), %r13
movq 0x48(%rdi), %rax
movl (%rax), %ebp
movq 0x50(%rdi), %rax
movl (%rax), %ebx
movq 0x58(%rdi), %rax
movl (%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x60(%rdi), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x68(%rdi), %rax
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x70(%rdi), %r12
leaq 0x14(%rsp), %rax
andl $0x0, (%rax)
leaq 0x60(%rsp), %rax
andq $0x0, (%rax)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
andq $0x0, 0x20(%r14)
movl $0x200, %edi            # imm = 0x200
callq 0x69d0
leaq 0x30(%rsp), %rcx
movq %rax, (%rcx)
subl $0x1, %r15d
jb 0x7aeb
movq 0x68(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x60(%rsp), %r8
leaq 0x14(%rsp), %r9
callq 0x2311f
testl %eax, %eax
je 0x7aeb
callq 0x70bd
testl %ebx, %ebx
je 0x7a30
movq 0x38(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x1df8a
jmp 0x7a71
cmpl $0x0, 0x20(%rsp)
je 0x7a47
movq 0x38(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x1df53
jmp 0x7a71
cmpl $0x0, 0x1c(%rsp)
je 0x7a71
cmpl $0x0, 0x18(%rsp)
je 0x7a63
movq 0x38(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x1dfc1
movq 0x38(%rsp), %rdi
movl 0x40(%rsp), %esi
callq 0x21072
movl 0x40(%rsp), %edx
cmpl $0x4c4b41, %edx         # imm = 0x4C4B41
jl 0x7a90
movq 0x30(%rsp), %rsi
leaq 0x74ab4(%rip), %rdi     # 0x7c53d
xorl %eax, %eax
callq 0x22186
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x71a4
testl %ebp, %ebp
je 0x7ac2
movq %r12, (%rsp)
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movl 0x10(%rsp), %ecx
movl 0x24(%rsp), %r8d
callq 0x78ae
jmp 0x7adb
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movl 0x10(%rsp), %ecx
movq %r12, %r9
callq 0x7891
movq %r12, %rdi
movq %r13, %rsi
callq 0x11a84
jmp 0x79e2
movq 0x30(%rsp), %rdi
callq 0x68a0
leaq 0x60(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x22e09
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq