// File: /workspace/github_cpp_makefile_star2_O3/waltersharpWEI[P]CommentEliminator/main.cpp
// Function: balanceThreads(int)
void balanceThreads(int NumThread) {
    vector<string> Files[NumThread];
    std::vector<pthread_t> ThreadPointers(NumThread);

    for (int I = 0;I < NumThread; I++) {
        Files[I].clear();
    }

    for (int I = 0;I < FileList.size();I++) {
        int TargetThread = rand() % NumThread;
        Files[TargetThread].push_back(FileList[I].path);
    }

    for (int I = 0;I < NumThread;I++) {
        pthread_create(&ThreadPointers[I],NULL,threadEliminator,&(Files[I]));
    }
    for (int I = 0; I < NumThread; I++) {
        pthread_join(ThreadPointers[I], NULL);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %r14d
movq %rsp, %rbx
leaq (%r14,%r14,2), %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
subq %rcx, %rbx
movq %rbx, %rsp
movl %edi, -0x2c(%rbp)
testl %edi, %edi
je 0x321e
leaq -0x18(,%rax,8), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x20e0
movl -0x2c(%rbp), %r15d
movslq %r15d, %rsi
leaq -0x50(%rbp), %rdi
leaq -0x2d(%rbp), %rdx
movq %r14, -0x38(%rbp)
callq 0x3b28
testl %r15d, %r15d
jle 0x3252
movq %rbx, %r15
movq (%r15), %rsi
movq %r15, %rdi
callq 0x41a2
addq $0x18, %r15
decq %r14
jne 0x323e
movq 0x4f7f(%rip), %rax      # 0x81d8
cmpq 0x4f70(%rip), %rax      # 0x81d0
movl -0x2c(%rbp), %r14d
je 0x32bb
xorl %r15d, %r15d
movabsq $-0x3333333333333333, %r12 # imm = 0xCCCCCCCCCCCCCCCD
xorl %r13d, %r13d
callq 0x2050
cltd
idivl %r14d
movslq %edx, %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %rdi
movq 0x4f3f(%rip), %rsi      # 0x81d0
addq %r15, %rsi
callq 0x3bc0
incq %r13
movq 0x4f35(%rip), %rax      # 0x81d8
subq 0x4f26(%rip), %rax      # 0x81d0
sarq $0x3, %rax
imulq %r12, %rax
addq $0x28, %r15
cmpq %r13, %rax
ja 0x3276
testl %r14d, %r14d
movq -0x38(%rbp), %r15
jle 0x331e
leaq (,%r15,8), %r13
xorl %r14d, %r14d
leaq -0x28e(%rip), %r15      # 0x3048
movq %rbx, %r12
movq -0x50(%rbp), %rdi
addq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2310
addq $0x18, %r12
addq $0x8, %r14
cmpq %r14, %r13
jne 0x32d9
cmpl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r15
jle 0x331e
xorl %r14d, %r14d
movq -0x50(%rbp), %rax
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
callq 0x2160
incq %r14
cmpq %r14, %r15
jne 0x3307
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3333
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
cmpl $0x0, -0x2c(%rbp)
je 0x3354
addq $-0x18, %rbx
shlq $0x3, %r15
leaq (%r15,%r15,2), %r14
leaq (%rbx,%r14), %rdi
callq 0x3c0c
addq $-0x18, %r14
jne 0x3345
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x3382
jmp 0x336a
movq %rax, %r15
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3382
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
cmpl $0x0, -0x2c(%rbp)
je 0x33a7
addq $-0x18, %rbx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r14
leaq (%rbx,%r14), %rdi
callq 0x3c0c
addq $-0x18, %r14
jne 0x3398
movq %r15, %rdi
callq 0x22f0