// File: btbujiangjun[P]abcdl/include/utils/ParallelOperator.h
// Function: abcdl::utils::ParallelOperator<int>::parallel_mul2mul(int*, unsigned long, int const*, unsigned long, std::function<void (int*, int const&)> const&) const
void parallel_mul2mul(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);
        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, &f](size_t start_idx, size_t end_idx){
                    for(size_t ti = start_idx; ti != end_idx; ti++){
                        f(&op1[ti], op2[ti]);
                    }
                }, i * block_size, std::min(num_op1, (i + 1) * block_size)
            );
        }

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

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movq %rdi, 0x270(%rsp)
movq %rsi, 0x268(%rsp)
movq %rdx, 0x260(%rsp)
movq %rcx, 0x258(%rsp)
movq %r8, 0x250(%rsp)
movq %r9, 0x248(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x260(%rsp), %rax
cmpq 0x250(%rsp), %rax
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xb79f
jmp 0xb80a
leaq 0x8286e(%rip), %rsi     # 0x8e014
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movl $0x83, %edx
movl $0x3, %ecx
callq 0x89860
movq 0x18(%rsp), %rdi
leaq 0x82867(%rip), %rsi     # 0x8e035
callq 0xba40
jmp 0xb7d5
leaq 0xc0(%rsp), %rdi
callq 0x89c20
jmp 0xb80a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x89c20
jmp 0xba32
movq 0x20(%rsp), %rdi
movq 0x260(%rsp), %rsi
callq 0xa8e0
movq 0x20(%rsp), %rdi
movq %rax, 0xa8(%rsp)
movq 0x260(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0xa970
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x87(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xa9f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0xaa00
jmp 0xb87e
leaq 0x87(%rsp), %rdi
callq 0xaa80
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
cmpq 0xa0(%rsp), %rax
je 0xb9b4
leaq 0x268(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x258(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rax
movq 0xa8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x78(%rsp), %rax
incq %rax
movq 0xa8(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x48(%rsp)
leaq 0x260(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xaa90
movq %rax, (%rsp)
jmp 0xb915
movq (%rsp), %rcx
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xba70
jmp 0xb92f
movq 0x78(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xaba0
movq %rax, %rdi
leaq 0x70(%rsp), %rsi
callq 0xabc0
leaq 0x70(%rsp), %rdi
callq 0xac00
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0xb894
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x87(%rsp), %rdi
callq 0xaa80
jmp 0xba32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xacf0
jmp 0xba32
leaq 0x88(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0xac20
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0xac50
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xac80
testb $0x1, %al
jne 0xb9f4
jmp 0xba1d
leaq 0x38(%rsp), %rdi
callq 0xacc0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x96c0
jmp 0xba0f
jmp 0xba11
leaq 0x38(%rsp), %rdi
callq 0xacd0
jmp 0xb9df
leaq 0x88(%rsp), %rdi
callq 0xacf0
addq $0x278, %rsp            # imm = 0x278
retq
movq 0xb8(%rsp), %rdi
callq 0x9700
nop