// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movq %r9, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r14
leaq 0xc(%rsp), %rax
movl %edi, (%rax)
leaq 0x8(%rsp), %rax
movl %r8d, (%rax)
movslq 0xac0d8(%rip), %r15     # 0xb3760
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x69d0
movq %rax, %rbp
movq %rbx, %rdi
callq 0x69d0
movq %rax, %rbx
shlq $0x2, %r15
movq %r15, %rdi
callq 0x69d0
movq %rax, %r13
xorl %r12d, %r12d
movq %rax, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movq %rbp, %r15
movslq 0xac094(%rip), %rbp     # 0xb3760
cmpq %rbp, %r12
jge 0x7778
pushq $0x50
popq %rdi
callq 0x69d0
movq %rax, (%rbx,%r12,8)
leaq 0xc(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0x8(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x80(%rsp), %rcx
movq %rcx, 0x40(%rax)
movl %r12d, (%r13)
movq %r13, (%rax)
movq 0x20(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x18(%rax)
movq 0x70(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x38(%rax)
movq 0x78(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
movq %rcx, 0x48(%rax)
movq %r15, %rdi
xorl %esi, %esi
leaq -0x3b8(%rip), %rdx      # 0x7397
movq %rax, %rcx
callq 0x6dc0
incq %r12
addq $0x8, %r15
addq $0x4, %r13
testl %eax, %eax
je 0x76c5
leaq 0x750e7(%rip), %rdi     # 0x7c858
callq 0x6bb0
jmp 0x77d7
xorl %r14d, %r14d
movq 0x10(%rsp), %r15
movslq %ebp, %rax
cmpq %rax, %r14
jge 0x779e
movq (%r15,%r14,8), %rdi
xorl %esi, %esi
callq 0x6610
incq %r14
movl 0xabfc4(%rip), %ebp     # 0xb3760
jmp 0x7780
movq %r15, %rdi
callq 0x68a0
xorl %r14d, %r14d
movslq %ebp, %rax
cmpq %rax, %r14
jge 0x77c5
movq (%rbx,%r14,8), %rdi
callq 0x68a0
incq %r14
movl 0xabf9d(%rip), %ebp     # 0xb3760
jmp 0x77a9
movq %rbx, %rdi
callq 0x68a0
movq 0x18(%rsp), %rdi
callq 0x68a0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq