// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/blatSrc/blat.c
// Function: blat
void blat(char *dbFile, int queryCount, char **queryFiles, struct lineFile **lf, FILE *out[])
/* blat - Standalone BLAT fast sequence search command line tool. */
{
    char **dbFiles;
    int dbCount;
    struct dnaSeq *dbSeqList, *seq;
    struct genoFind *gf;
    boolean tIsProt = (tType == gftProt);
    boolean qIsProt = (qType == gftProt);
    boolean bothSimpleNuc = (tType == gftDna && (qType == gftDna || qType == gftRna));
    boolean bothSimpleProt = (tIsProt && qIsProt);
    boolean showStatus = (out[0] != stdout);
    /* Stuff to support various output formats. */
    struct gfOutput **gvo;		/* output controller */
    int i;

    databaseName = dbFile;
    gfClientFileArray(dbFile, &dbFiles, &dbCount);
    if (makeOoc != NULL)
    {
        gfMakeOoc(makeOoc, dbFiles, dbCount, tileSize, repMatch, tType);
        if (showStatus)
            printf("Done making %s\n", makeOoc);
        exit(0);
    }

    dbSeqList = gfClientSeqList(dbCount, dbFiles, tIsProt, tType == gftDnaX, repeats,
                                minRepDivergence, showStatus);
    databaseSeqCount = slCount(dbSeqList);
    for (seq = dbSeqList; seq != NULL; seq = seq->next)
        databaseLetters += seq->size;


    gvo = (struct gfOutput **)malloc(sizeof(struct gfOutput *) * threads);
    for (i=0; i<threads; i++)
    {
        gvo[i] = gfOutputAny(outputFormat, minIdentity*10, qIsProt, tIsProt, noHead,
                             databaseName, databaseSeqCount, databaseLetters, minIdentity, out[i]);
    }


    if (bothSimpleNuc || bothSimpleProt)
    {
        struct hash *maskHash = NULL;

        /* Save away masking info for output. */
        if (repeats != NULL)
        {
            maskHash = newHash(0);
            for (seq = dbSeqList; seq != NULL; seq = seq->next)
            {
                Bits *maskedBits = maskFromUpperCaseSeq(seq);
                hashAdd(maskHash, seq->name, maskedBits);
            }
        }

        /* Handle masking and indexing.  If masking is off, we want the indexer
         * to see unmasked sequence, otherwise we want it to see masked.  However
         * after indexing we always want it unmasked, because things are always
         * unmasked for the extension phase. */
        if (mask == NULL && !bothSimpleProt)
            gfClientUnmask(dbSeqList);
        gf = gfIndexSeq(dbSeqList, minMatch, maxGap, tileSize, repMatch, ooc,
                        tIsProt, oneOff, FALSE, stepSize);
        if (mask != NULL)
            gfClientUnmask(dbSeqList);

        searchOneIndex(queryCount, queryFiles, lf, gf, tIsProt, maskHash, out, gvo, showStatus);
        freeHash(&maskHash);
    }
    else if (tType == gftDnaX && qType == gftProt)
    {
        bigBlat(dbSeqList, queryCount, queryFiles, lf, FALSE, TRUE, out, gvo, showStatus);
    }
    else if (tType == gftDnaX && (qType == gftDnaX || qType == gftRnaX))
    {
        bigBlat(dbSeqList, queryCount, queryFiles, lf, TRUE, qType == gftDnaX, out, gvo, showStatus);
    }
    else
    {
        errAbort("Unrecognized combination of target and query types\n");
    }
    if (dotEvery > 0)
        printf("\n");
    freeDnaSeqList(&dbSeqList);
    free(gvo);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %esi, 0x4(%rsp)
movl 0xaceb3(%rip), %eax     # 0xb4ebc
xorl %r14d, %r14d
cmpl $0x2, %eax
sete 0x3(%rsp)
testl %eax, %eax
sete %r13b
xorl %ebp, %ebp
cmpl $0x2, 0xace95(%rip)     # 0xb4eb8
sete %r15b
setb 0x18(%rsp)
movq (%r8), %rcx
movq 0xaaf7a(%rip), %rax     # 0xb2fb0
movq (%rax), %rax
xorl %r12d, %r12d
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
cmpq %rax, %rcx
setne 0x8(%rsp)
movq %rdi, 0xace83(%rip)     # 0xb4ed8
leaq 0x40(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x1027c
movq 0xace3d(%rip), %rdi     # 0xb4ea8
testq %rdi, %rdi
jne 0x8371
movb 0x3(%rsp), %al
movb %al, %r14b
movb %r15b, %bpl
andb 0x18(%rsp), %r13b
movb %r13b, 0x30(%rsp)
movl %r15d, %eax
andb %r14b, %al
movb %al, 0x3(%rsp)
movb 0x8(%rsp), %al
movb %al, %r12b
movl 0x14(%rsp), %edi
movq 0x40(%rsp), %rsi
xorl %ecx, %ecx
cmpl $0x3, 0xace11(%rip)     # 0xb4ebc
sete %cl
movq 0xace13(%rip), %r8      # 0xb4ec8
cvtsd2ss 0xab6bb(%rip), %xmm0    # 0xb3778
movl %r14d, %edx
movl %r12d, %r9d
callq 0x10381
movq %rax, %r15
movq %rax, 0x50(%rsp)
movq %rax, %rdi
callq 0x1c4aa
movl %eax, 0xacd9a(%rip)     # 0xb4e78
movq 0xacd9b(%rip), %rax     # 0xb4e80
movq %r15, 0x18(%rsp)
testq %r15, %r15
je 0x8102
movslq 0x18(%r15), %rdx
addq %rdx, %rax
movq %rax, 0xacd83(%rip)     # 0xb4e80
movq (%r15), %r15
jmp 0x80ea
movq %r12, 0x8(%rsp)
movslq 0xab652(%rip), %r15     # 0xb3760
movq %r15, %rdi
shlq $0x3, %rdi
callq 0x69d0
movq %rax, %r13
xorl %r12d, %r12d
movslq %r15d, %rax
cmpq %rax, %r12
jge 0x81a0
movq 0xab659(%rip), %rdi     # 0xb3788
movsd 0xab649(%rip), %xmm1    # 0xb3780
movapd %xmm1, %xmm0
mulsd 0x72ec5(%rip), %xmm0    # 0x7b008
cvttsd2si %xmm0, %esi
movl 0xacd46(%rip), %r8d     # 0xb4e94
movq 0xacd83(%rip), %r9      # 0xb4ed8
movl 0xacd1d(%rip), %eax     # 0xb4e78
movsd 0xacd1d(%rip), %xmm2    # 0xb4e80
unpcklps 0x72ea6(%rip), %xmm2    # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x72eae(%rip), %xmm2    # 0x7b020
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
addsd %xmm2, %xmm0
movl %ebp, %edx
movl %r14d, %ecx
pushq (%rbx,%r12,8)
pushq %rax
callq 0x118f8
popq %rcx
popq %rdx
movq %rax, (%r13,%r12,8)
incq %r12
movl 0xab5c2(%rip), %r15d    # 0xb3760
jmp 0x8120
movb 0x30(%rsp), %al
orb 0x3(%rsp), %al
testb $0x1, %al
je 0x81ff
andq $0x0, 0x38(%rsp)
cmpq $0x0, 0xacd0e(%rip)     # 0xb4ec8
movq 0x18(%rsp), %r12
je 0x8288
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x245c9
movq %rax, %rbp
movq %rax, 0x38(%rsp)
movq %r12, %r15
testq %r15, %r15
je 0x828a
movq %r15, %rdi
callq 0x209d5
movq 0x8(%r15), %rsi
movq %rbp, %rdi
movq %rax, %rdx
callq 0x242d0
movq (%r15), %r15
jmp 0x81da
movl 0xaccb7(%rip), %ecx     # 0xb4ebc
movl %ecx, %edx
xorl $0x3, %edx
movl 0xacca8(%rip), %eax     # 0xb4eb8
movl %eax, %esi
xorl $0x2, %esi
orl %edx, %esi
movq 0x18(%rsp), %rdi
jne 0x8239
subq $0x8, %rsp
pushq $0x1
popq %r9
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
xorl %r8d, %r8d
jmp 0x8273
cmpl $0x3, %ecx
sete %cl
leal -0x3(%rax), %edx
cmpl $0x2, %edx
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x8361
xorl %r9d, %r9d
cmpl $0x3, %eax
sete %r9b
subq $0x8, %rsp
pushq $0x1
popq %r8
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
pushq 0x10(%rsp)
pushq %r13
pushq %rbx
callq 0x7b16
addq $0x20, %rsp
jmp 0x832f
xorl %ebp, %ebp
cmpq $0x0, 0xacc2e(%rip)     # 0xb4ec0
setne %al
orb 0x3(%rsp), %al
testb $0x1, %al
jne 0x82a5
movq %r12, %rdi
callq 0x10365
movl 0xab4bd(%rip), %esi     # 0xb3768
movl 0xab4bf(%rip), %edx     # 0xb3770
movl 0xab4ad(%rip), %ecx     # 0xb3764
movl 0xab4b6(%rip), %r8d     # 0xb3774
movq 0xacbeb(%rip), %r9      # 0xb4eb0
movl 0xacbc5(%rip), %eax     # 0xb4e90
movl 0xacbb6(%rip), %r10d    # 0xb4e88
movq %r12, %rdi
pushq %r10
pushq $0x0
pushq %rax
pushq %r14
callq 0xb6df
addq $0x20, %rsp
movq %rax, %r15
cmpq $0x0, 0xacbd0(%rip)     # 0xb4ec0
je 0x82fa
movq %r12, %rdi
callq 0x10365
subq $0x8, %rsp
movl 0xc(%rsp), %edi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rcx
movl %r14d, %r8d
movq %rbp, %r9
pushq 0x10(%rsp)
pushq %r13
pushq %rbx
callq 0x7652
addq $0x20, %rsp
leaq 0x38(%rsp), %rdi
callq 0x2494c
cmpl $0x0, 0xacb56(%rip)     # 0xb4e8c
jle 0x8340
pushq $0xa
popq %rdi
callq 0x6a40
leaq 0x50(%rsp), %rdi
callq 0x2077b
movq %r13, %rdi
callq 0x68a0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7430c(%rip), %rdi     # 0x7c674
xorl %eax, %eax
callq 0x223fb
jmp 0x832f
movq 0x40(%rsp), %rsi
movl 0x14(%rsp), %edx
movl 0xab3e4(%rip), %ecx     # 0xb3764
movl 0xab3ed(%rip), %r8d     # 0xb3774
movl 0xacb2e(%rip), %r9d     # 0xb4ebc
callq 0xcc40
movq 0x48(%rsp), %rax
cmpq %rax, 0x30(%rsp)
je 0x83b4
movq 0xacb02(%rip), %rsi     # 0xb4ea8
leaq 0x742b7(%rip), %rdi     # 0x7c664
xorl %eax, %eax
callq 0x6070
xorl %edi, %edi
callq 0x68d0