// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
pushq %rbx
subq $0xb8, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpl $0x2, 0xfeac6(%rip)     # 0x1072dc
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x2, 0xfeab0(%rip)     # 0x1072d8
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x60(%rbp)
xorl %eax, %eax
cmpl $0x0, 0xfeaa0(%rip)     # 0x1072dc
movb %al, -0x91(%rbp)
jne 0x8871
movb $0x1, %al
cmpl $0x0, 0xfea8b(%rip)     # 0x1072d8
movb %al, -0x92(%rbp)
je 0x8865
cmpl $0x1, 0xfea7c(%rip)     # 0x1072d8
sete %al
movb %al, -0x92(%rbp)
movb -0x92(%rbp), %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x64(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x5c(%rbp)
movb %al, -0x93(%rbp)
je 0x889a
cmpl $0x0, -0x60(%rbp)
setne %al
movb %al, -0x93(%rbp)
movb -0x93(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0xfc6fa(%rip), %rcx     # 0x104fb0
cmpq (%rcx), %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0xfea29(%rip)     # 0x1072f8
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x3c(%rbp), %rdx
callq 0x15a40
cmpq $0x0, 0xfe9e0(%rip)     # 0x1072c8
je 0x8933
movq 0xfe9d7(%rip), %rdi     # 0x1072c8
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
movl 0xfce66(%rip), %ecx     # 0x105764
movl 0xfce6f(%rip), %r8d     # 0x105774
movl 0xfe9d0(%rip), %r9d     # 0x1072dc
callq 0xf1c0
cmpl $0x0, -0x6c(%rbp)
je 0x892c
movq 0xfe9aa(%rip), %rsi     # 0x1072c8
leaq 0xced69(%rip), %rdi     # 0xd768e
movb $0x0, %al
callq 0x6070
xorl %edi, %edi
callq 0x68b0
movl -0x3c(%rbp), %edi
movq -0x38(%rbp), %rsi
movl -0x5c(%rbp), %edx
cmpl $0x3, 0xfe998(%rip)     # 0x1072dc
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq 0xfe995(%rip), %r8      # 0x1072e8
movsd 0xfce1d(%rip), %xmm0    # 0x105778
cvtsd2ss %xmm0, %xmm0
movl -0x6c(%rbp), %r9d
callq 0x15bc0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2a810
movl %eax, 0xfe91d(%rip)     # 0x107298
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x89ad
movq -0x50(%rbp), %rax
movslq 0x18(%rax), %rax
addq 0xfe907(%rip), %rax     # 0x1072a0
movq %rax, 0xfe900(%rip)     # 0x1072a0
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x8983
movslq 0xfcdac(%rip), %rdi     # 0x105760
shlq $0x3, %rdi
callq 0x69c0
movq %rax, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
cmpl 0xfcd8f(%rip), %eax     # 0x105760
jge 0x8a7a
movq 0xfcdaa(%rip), %rdi     # 0x105788
movsd 0xfcd9a(%rip), %xmm0    # 0x105780
movsd 0xcd61a(%rip), %xmm1    # 0xd6008
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movl -0x60(%rbp), %edx
movl -0x5c(%rbp), %ecx
movl 0xfe8b1(%rip), %r8d     # 0x1072b4
movq 0xfe8ee(%rip), %r9      # 0x1072f8
movl 0xfe887(%rip), %r10d    # 0x107298
movaps 0xcd608(%rip), %xmm1    # 0xd6020
movq 0xfe880(%rip), %xmm0    # 0x1072a0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xcd604(%rip), %xmm1    # 0xd6030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xfcd3d(%rip), %xmm1    # 0x105780
movq -0x30(%rbp), %rax
movslq -0x7c(%rbp), %r11
movq (%rax,%r11,8), %rax
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x17440
movq %rax, %rdx
movq -0x78(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x89c8
cmpl $0x0, -0x64(%rbp)
jne 0x8a8a
cmpl $0x0, -0x68(%rbp)
je 0x8bc4
movq $0x0, -0x88(%rbp)
cmpq $0x0, 0xfe84b(%rip)     # 0x1072e8
je 0x8afb
xorl %edi, %edi
movl $0x1, %esi
callq 0x398a0
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x8af9
movq -0x50(%rbp), %rdi
callq 0x32c70
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x90(%rbp), %rdx
callq 0x39230
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x8aba
jmp 0x8afb
cmpq $0x0, 0xfe7dd(%rip)     # 0x1072e0
jne 0x8b14
cmpl $0x0, -0x68(%rbp)
jne 0x8b14
movq -0x48(%rbp), %rdi
callq 0x15b70
movq -0x48(%rbp), %rdi
movl 0xfcc4a(%rip), %esi     # 0x105768
movl 0xfcc4c(%rip), %edx     # 0x105770
movl 0xfcc3a(%rip), %ecx     # 0x105764
movl 0xfcc43(%rip), %r8d     # 0x105774
movq 0xfe798(%rip), %r9      # 0x1072d0
movl -0x5c(%rbp), %r11d
movl 0xfe76d(%rip), %r10d    # 0x1072b0
movl 0xfe75f(%rip), %eax     # 0x1072a8
xorl %ebx, %ebx
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0xe170
movq %rax, -0x58(%rbp)
cmpq $0x0, 0xfe76f(%rip)     # 0x1072e0
je 0x8b7c
movq -0x48(%rbp), %rdi
callq 0x15b70
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x5c(%rbp), %r8d
movq -0x88(%rbp), %r9
movq -0x30(%rbp), %r11
movq -0x78(%rbp), %r10
movl -0x6c(%rbp), %eax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x7960
leaq -0x88(%rbp), %rdi
callq 0x3a080
jmp 0x8c7e
cmpl $0x3, 0xfe711(%rip)     # 0x1072dc
jne 0x8c0d
cmpl $0x2, 0xfe704(%rip)     # 0x1072d8
jne 0x8c0d
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r11
movq -0x78(%rbp), %r10
movl -0x6c(%rbp), %eax
xorl %r8d, %r8d
movl $0x1, %r9d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x80b0
jmp 0x8c7c
cmpl $0x3, 0xfe6c8(%rip)     # 0x1072dc
jne 0x8c6c
cmpl $0x3, 0xfe6bb(%rip)     # 0x1072d8
je 0x8c28
cmpl $0x4, 0xfe6b2(%rip)     # 0x1072d8
jne 0x8c6c
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
cmpl $0x3, 0xfe69a(%rip)     # 0x1072d8
sete %al
andb $0x1, %al
movzbl %al, %r9d
movq -0x30(%rbp), %r11
movq -0x78(%rbp), %r10
movl -0x6c(%rbp), %eax
movl $0x1, %r8d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x80b0
jmp 0x8c7a
leaq 0xcea2b(%rip), %rdi     # 0xd769e
movb $0x0, %al
callq 0x35d40
jmp 0x8c7c
jmp 0x8c7e
cmpl $0x0, 0xfe627(%rip)     # 0x1072ac
jle 0x8c95
leaq 0xd038b(%rip), %rdi     # 0xd9019
movb $0x0, %al
callq 0x6070
leaq -0x48(%rbp), %rdi
callq 0x32850
movq -0x78(%rbp), %rdi
callq 0x6880
addq $0xb8, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)