// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/blatSrc/blat.c
// Function: searchOneIndex
void searchOneIndex(int fileCount, char *files[], struct lineFile *lf[], struct genoFind *gf,
                    boolean isProt, struct hash *maskHash, FILE *out[], struct gfOutput *gvo[],
                    boolean showStatus)
/* Search all sequences in all files against single genoFind index. */
{
    int        i;
    pthread_t* thd=(pthread_t*)malloc(sizeof(pthread_t)*threads);
    void***    args=(void***)malloc(sizeof(void*)*threads);
    int*       id=(int*)malloc(sizeof(int)*threads);

    for (i=0; i<threads; i++)
    {
        args[i]=(void**)malloc(sizeof(void*)*10);
        args[i][1]=&fileCount;
        args[i][2]=files;
        args[i][4]=gf;
        args[i][5]=&isProt;
        args[i][6]=maskHash;
        args[i][8]=&showStatus;

        id[i]=i;
        args[i][0]=&(id[i]);
        args[i][3]=lf[i];
        args[i][7]=out[i];
        args[i][9]=gvo[i];
        if (pthread_create(&(thd[i]), NULL, performSearch, (void*)(args[i])) != 0)
        {
            printf("Failed to create threads\n");
            return;
        }
    }

    for (i=0; i<threads; i++)
        pthread_join(thd[i], NULL);
    free(thd);
    for (i=0; i<threads; i++)
        free(args[i]);
    free(args);
    free(id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movl %edi, 0x4(%rsp)
movl %r8d, (%rsp)
movslq 0xb67e8(%rip), %r15     # 0xbf760
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x69d0
movq %rax, %r12
movq %rbx, %rdi
callq 0x69d0
movq %rax, %rbx
shlq $0x2, %r15
movq %r15, %rdi
callq 0x69d0
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb67b2(%rip)     # 0xbf760
jle 0x9061
xorl %r13d, %r13d
movq 0x8(%rsp), %rbp
movq %r12, %r15
movl $0x50, %edi
callq 0x69d0
movq %rax, (%rbx,%r13,8)
leaq 0x4(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq %rsp, %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x70(%rsp), %rcx
movq %rcx, 0x40(%rax)
movl %r13d, (%rbp)
movq %rbp, (%rax)
movq 0x10(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movq %rcx, 0x18(%rax)
movq 0x60(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movq %rcx, 0x38(%rax)
movq 0x68(%rsp), %rcx
movq (%rcx,%r13,8), %rcx
movq %rcx, 0x48(%rax)
movq %r15, %rdi
xorl %esi, %esi
leaq -0x3da(%rip), %rdx      # 0x8c5c
movq %rax, %rcx
callq 0x6dc0
testl %eax, %eax
jne 0x90c7
incq %r13
movslq 0xb6710(%rip), %rax     # 0xbf760
addq $0x8, %r15
addq $0x4, %rbp
cmpq %rax, %r13
jl 0x8fbf
cmpl $0x0, 0xb66f8(%rip)     # 0xbf760
jle 0x9087
xorl %r14d, %r14d
movq (%r12,%r14,8), %rdi
xorl %esi, %esi
callq 0x6610
incq %r14
movslq 0xb66de(%rip), %rax     # 0xbf760
cmpq %rax, %r14
jl 0x906d
movq %r12, %rdi
callq 0x68a0
cmpl $0x0, 0xb66ca(%rip)     # 0xbf760
jle 0x90b3
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x68a0
incq %r14
movslq 0xb66b2(%rip), %rax     # 0xbf760
cmpq %rax, %r14
jl 0x909b
movq %rbx, %rdi
callq 0x68a0
movq 0x8(%rsp), %rdi
callq 0x68a0
jmp 0x90d3
leaq 0x8478a(%rip), %rdi     # 0x8d858
callq 0x6bb0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq