// File: /workspace/github_cpp_makefile_star2_O1/btbujiangjun[P]abcdl/include/utils/ParallelOperator.h
// Function: abcdl::utils::ParallelOperator<int>::parallel_mul2mul_repeat(int*, unsigned long, int const*, unsigned long, std::function<void (int*, int const&)> const&) const
void parallel_mul2mul_repeat(T* op1,
                                 const size_t num_op1,
                                 const T* op2,
                                 const size_t num_op2,
                                 const std::function<void(T*, const T&)> &f) const{
        CHECK(num_op1 % num_op2 == 0);
        size_t block_size = get_block_size(num_op1);
        size_t num_thread = get_num_thread(num_op1, block_size);
        std::vector<std::thread> threads(num_thread);

        for(size_t i = 0; i != num_thread; i++){
            threads[i] = std::thread(
                [&op1, &op2, &num_op2, &f](size_t start_idx, size_t end_idx){
                    for(size_t ti = start_idx; ti != end_idx; ti++){
                        f(&op1[ti], op2[ti % num_op2]);
                    }
                }, i * block_size, std::min(num_op1, (i + 1) * block_size)
            );
        }

        for(auto& thread : threads){
            thread.join();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %r9, 0x10(%rsp)
movq %rdx, %rax
movq %rdi, %r15
movq %rsi, 0x58(%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, 0x50(%rsp)
movq %r8, 0x48(%rsp)
xorl %edx, %edx
divq %r8
testq %rdx, %rdx
jne 0xaeff
movq 0x8(%rsp), %rcx
movq (%r15), %r14
movq 0x8(%r15), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %r14
cmpq $0x1, %rdx
sbbq $-0x1, %rax
cmpq %rcx, %rsi
movq %rcx, %rbp
cmovbq %rsi, %rbp
cmpq %rsi, %rax
cmovaeq %rax, %rbp
cmpq %rbp, %rsi
jb 0xae25
movq %rcx, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r14
cmpq $0x1, %rdx
sbbq $-0x1, %r14
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0xa482
testq %r14, %r14
je 0xaec6
xorl %ebx, %ebx
leaq 0x60(%rsp), %r12
leaq 0x20(%rsp), %r13
xorl %r15d, %r15d
leaq 0x58(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rbx, 0x20(%rsp)
addq %rbp, %rbx
movq %rbx, 0x18(%rsp)
leaq 0x18(%rsp), %rcx
cmpq 0x8(%rsp), %rbx
jb 0xae95
leaq 0x8(%rsp), %rcx
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xaf70
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax,%r15,8)
jne 0xaf40
movq 0x28(%rsp), %rcx
movq %rcx, (%rax,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0xae4f
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
cmpq %r14, %rbx
je 0xaee3
movq %rbx, %rdi
callq 0x95a0
addq $0x8, %rbx
jmp 0xaed0
leaq 0x30(%rsp), %rdi
callq 0xa594
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2f11a(%rip), %rsi     # 0x3a020
leaq 0x60(%rsp), %r14
movq %r14, %rdi
movl $0x9c, %edx
movl $0x3, %ecx
callq 0x3894e
leaq 0x2f13e(%rip), %rsi     # 0x3a062
movl $0x24, %edx
movq %r14, %rdi
callq 0x93b0
leaq 0x60(%rsp), %rdi
callq 0x38b76
jmp 0xade0
callq 0x90c0
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x38b76
jmp 0xaf68
movq %rax, %rbx
jmp 0xaf68
jmp 0xaf5b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xa594
movq %rbx, %rdi
callq 0x95d0