// File: /workspace/github_c_makefile_star2_O3/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, %rbp
movq %rsi, %r14
movl %edi, 0x4(%rsp)
movl %r8d, (%rsp)
movslq 0xb68d3(%rip), %r15     # 0xbf760
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x69d0
movq %rax, %r12
movq %rbx, %rdi
callq 0x69d0
movq %rax, %rbx
leaq (,%r15,4), %rdi
callq 0x69d0
movq %rax, %r13
testq %r15, %r15
jle 0x8fc7
movq %r12, %r15
xorl %r12d, %r12d
movq %r13, 0x10(%rsp)
movq %r15, 0x8(%rsp)
movl $0x50, %edi
callq 0x69d0
movq %rax, (%rbx,%r12,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 %r12d, (%r13)
movq %r13, (%rax)
movq (%rbp,%r12,8), %rcx
movq %rcx, 0x18(%rax)
movq 0x60(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x38(%rax)
movq 0x68(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x48(%rax)
movq %r15, %rdi
xorl %esi, %esi
leaq -0x3c3(%rip), %rdx      # 0x8b84
movq %rax, %rcx
callq 0x6dc0
testl %eax, %eax
jne 0x8fe1
incq %r12
movslq 0xb67ff(%rip), %rax     # 0xbf760
addq $0x8, %r15
addq $0x4, %r13
cmpq %rax, %r12
jl 0x8ed4
testl %eax, %eax
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %r12
jle 0x8fc7
xorl %r14d, %r14d
movq (%r12,%r14,8), %rdi
xorl %esi, %esi
callq 0x6610
incq %r14
movslq 0xb67c8(%rip), %r15     # 0xbf760
cmpq %r15, %r14
jl 0x8f83
movq %r12, %rdi
callq 0x68a0
testl %r15d, %r15d
jle 0x8fcf
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x68a0
incq %r14
movslq 0xb67a0(%rip), %rax     # 0xbf760
cmpq %rax, %r14
jl 0x8fad
jmp 0x8fcf
movq %r12, %rdi
callq 0x68a0
movq %rbx, %rdi
callq 0x68a0
movq %r13, %rdi
callq 0x68a0
jmp 0x8fed
leaq 0x84870(%rip), %rdi     # 0x8d858
callq 0x6bb0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq