// File: /workspace/github_cpp_makefile_star2_O1/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
movl %edi, %r12d
movq %rsp, %rbx
leaq (%r12,%r12,2), %rax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
subq %rcx, %rbx
movq %rbx, %rsp
testl %edi, %edi
je 0x324e
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 0x20f0
movslq %r14d, %rsi
leaq -0x50(%rbp), %rdi
leaq -0x2d(%rbp), %rdx
movq %r12, -0x38(%rbp)
movl %r14d, -0x2c(%rbp)
callq 0x3b4e
testl %r14d, %r14d
jle 0x3285
movq %r12, %r14
movq %rbx, %r15
movq (%r15), %rsi
movq %r15, %rdi
callq 0x41ae
addq $0x18, %r15
decq %r14
jne 0x3271
movq 0x4f54(%rip), %rax      # 0x81e0
cmpq 0x4f45(%rip), %rax      # 0x81d8
movl -0x2c(%rbp), %r14d
je 0x32ee
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 0x4f14(%rip), %rsi      # 0x81d8
addq %r15, %rsi
callq 0x3be2
incq %r13
movq 0x4f0a(%rip), %rax      # 0x81e0
subq 0x4efb(%rip), %rax      # 0x81d8
sarq $0x3, %rax
imulq %r12, %rax
addq $0x28, %r15
cmpq %r13, %rax
ja 0x32a9
testl %r14d, %r14d
jle 0x332d
movq -0x38(%rbp), %rax
leaq (,%rax,8), %r13
xorl %r14d, %r14d
leaq -0x291(%rip), %r15      # 0x3078
movq %rbx, %r12
movq -0x50(%rbp), %rdi
addq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x2320
addq $0x18, %r12
addq $0x8, %r14
cmpq %r14, %r13
jne 0x330c
cmpl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r15
jle 0x3351
xorl %r14d, %r14d
movq -0x50(%rbp), %rax
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
callq 0x2170
incq %r14
cmpq %r14, %r15
jne 0x333a
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x3366
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
cmpl $0x0, -0x2c(%rbp)
je 0x3387
addq $-0x18, %rbx
shlq $0x3, %r15
leaq (%r15,%r15,2), %r14
leaq (%rbx,%r14), %rdi
callq 0x3c2e
addq $-0x18, %r14
jne 0x3378
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x33b5
jmp 0x339d
movq %rax, %r15
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x33b5
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
cmpl $0x0, -0x2c(%rbp)
je 0x33da
addq $-0x18, %rbx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r14
leaq (%rbx,%r14), %rdi
callq 0x3c2e
addq $-0x18, %r14
jne 0x33cb
movq %r15, %rdi
callq 0x2300