LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/dianejdan[P]Eclat/./PatternStore.hpp
// Function: PatternStore<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::add_pattern(Pattern<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>)
void add_pattern(Pattern<Typ> *parent, Typ item, vector<int> newTidList){
        Pattern<Typ> *new_pat = new Pattern<Typ>(); // create a Pattern node
        new_pat->set_item(item);
        new_pat->set_tid_list(newTidList);
        parent->add_child(new_pat); // add to the children list of its parent
                                    // i.e. I link its parent and its child
        ++numPatterns; // once add a frequent pattern, increase number of frequent
                       // pattern by 1
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
pushq $0x50
popq %rdi
callq 0x21e0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x40(%r15)
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2260
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2110
leaq -0x68(%rbp), %rdi
callq 0x20d0
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3818
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5afa
leaq -0x48(%rbp), %rdi
callq 0x3c38
movq %r14, %rdi
movq %r15, %rsi
callq 0x5b20
movq -0x30(%rbp), %rax
incl 0x8(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3c38
jmp 0x5569
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dianejdan[P]Eclat/./Pattern.hpp
// Function: Pattern<int>::join_tid_list(Pattern<int>*)
vector<int> join_tid_list( Pattern<Typ> *x){
        vector<int> ret; // joined tid list
        vector<int> xTidList = x->tidList; // the "larger" child tid list

        int i = 0; // iterator for one tid list
        int j = 0; // iterator for another tid list

        while (i < xTidList.size()){ // go through one tid list
            while (j < tidList.size()){ // go through second tid list

                if (xTidList[i] == tidList[j]){ // if the tid of two tid lists
                                                // are the same, add this tid to
                                                // joined tid list. The first tid list
                                                // catches up the second
                    ret.push_back(xTidList[i]);
                    ++j; // move iterator of second tid list by one
                    break; // get out of the while loop since I need to compare
                           // this new tid with the next tid in the first tid list
                }

                if (xTidList[i] < tidList[j]){ // if the tid in first tid list is 
                                               // smaller than the second one tid list
                                               // break, the second one needs to catch
                                               // up the first tid list
                    break;
                }
                ++j; // if two tids are unequal, or they are racing, move the iterator
                     // of second tid list by one
            }
            ++i; // move the iterator of the first tid list by one
        }
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdx), %rsi
leaq -0x38(%rbp), %rdi
callq 0x3818
xorl %r15d, %r15d
xorl %eax, %eax
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
subq %rsi, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x4629
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
leaq (%rsi,%r15,4), %rsi
movslq %eax, %r12
cmpq %r12, %rdx
movq %r12, %rax
cmovaq %rdx, %rax
cmpq %r12, %rdx
jbe 0x4624
movl (%rcx,%r12,4), %edi
cmpl %edi, (%rsi)
je 0x4616
jl 0x4621
incq %r12
jmp 0x4602
movq %rbx, %rdi
callq 0x3712
incq %r12
movq %r12, %rax
incq %r15
jmp 0x45ce
leaq -0x38(%rbp), %rdi
callq 0x3c38
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4653
movq %rax, %r14
leaq -0x38(%rbp), %rdi
callq 0x3c38
movq %rbx, %rdi
callq 0x3c38
movq %r14, %rdi
callq 0x22e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/main.cpp
// Function: shutdown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned char)
void shutdown(std::string str, uint8_t exit_code)
{
    render_destroy();
    std::cout << "Shutdown message: " << str.c_str() << std::endl;
    std::cout << "Returning to system with exit code: " << int(exit_code) << std::endl;
    exit(exit_code);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x2d57
movq 0x6a4e(%rip), %r15      # 0x8fd0
leaq 0x2aaf(%rip), %rsi      # 0x5038
movq %r15, %rdi
callq 0x2210
movq (%r14), %rsi
movq %rax, %rdi
callq 0x2210
movq %rax, %rdi
callq 0x2120
leaq 0x2aa0(%rip), %rsi      # 0x504b
movq %r15, %rdi
callq 0x2210
movq %rax, %rdi
movl %ebx, %esi
callq 0x2310
movq %rax, %rdi
callq 0x2120
movl %ebx, %edi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/render.cpp
// Function: render_init(int)
void render_init(int n_threads)
{
    /* Initialize render buffer. */
    for (int y = 0; y < scr_height; y++)
    {
        render_buffer.push_back(std::vector<rgb_t>());
        for (int x = 0; x < scr_width; x++)
        {
            render_buffer.at(y).push_back(rgb_t{ 0, 0, 0, 0 });
        }
    }
    /* Initialize the thread pool. */
    thread_pool = mandelbrot_thread_pool_create(n_threads, render_segment);
    if (thread_pool == NULL)
    {
        std::cerr << "Error initializeing threadpool, exiting." << std::endl;
        #ifdef _WIN32
        system("pause");
        #endif  
        exit(1);
    }
    /* Initialze render data. */
    rendering_complete = false;
    render_initialized = true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edi, 0xc(%rsp)
leaq 0x280f(%rip), %rax      # 0x5034
movslq (%rax), %r13
leaq 0x2801(%rip), %rax      # 0x5030
movl (%rax), %ebp
xorl %r14d, %r14d
leaq 0x69dd(%rip), %r15      # 0x9218
leaq 0x10(%rsp), %r12
cmpq %r13, %r14
jge 0x2890
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e62
movq %r12, %rdi
callq 0x2e2e
xorl %ebx, %ebx
cmpl %ebp, %ebx
jge 0x288b
movq %r15, %rdi
movq %r14, %rsi
callq 0x2d86
andl $0x0, 0x10(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x309c
incl %ebx
jmp 0x2868
incq %r14
jmp 0x2840
leaq 0x28(%rsp), %rsi
andq $0x0, 0x8(%rsi)
leaq 0x9a(%rip), %rax        # 0x293b
movq %rax, (%rsi)
leaq 0x969(%rip), %rax       # 0x3214
movq %rax, 0x18(%rsi)
leaq 0x966(%rip), %rax       # 0x321c
movq %rax, 0x10(%rsi)
movl 0xc(%rsp), %edi
callq 0x397c
movq %rax, 0x696e(%rip)      # 0x9238
leaq 0x28(%rsp), %rdi
callq 0x2da4
cmpq $0x0, 0x695c(%rip)      # 0x9238
je 0x28f4
movb $0x1, 0x694b(%rip)      # 0x9230
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x66f5(%rip), %rdi      # 0x8ff0
leaq 0x280e(%rip), %rsi      # 0x5110
callq 0x2210
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %rdi
callq 0x2250
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2da4
jmp 0x2933
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2e2e
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/render.cpp
// Function: render_mandelbrot(std::complex<double> const&, std::complex<double> const&)
void render_mandelbrot(
    const std::complex<double> & upper_left, 
    const std::complex<double> & lower_right)
{
    /* Test if renderer is initialized. */
    if (!render_initialized)
    {
        std::cerr << "Renderer not initialized. Could not render." << std::endl;
        return;
    }
    /* Set the scale and the offset and aquire the segments. */
    scale = get_scale(upper_left, lower_right);
    offset = get_offset(upper_left, lower_right);
    supersample_init(scale, offset);
    int segment_size_x = scr_width / 20;
    int segment_size_y = scr_height / 20;
    for (int y = 0; y < scr_height / segment_size_y; y++)
    {
        for (int x = 0; x < scr_width / segment_size_x; x++)
        {
            segment_t segment = {
                segment_size_x * x,
                segment_size_y * y,
                segment_size_x * (1 + x),
                segment_size_y * (1 + y)};
            mandelbrot_thread_pool_add_job(thread_pool, segment);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x67d9(%rip)      # 0x9230
je 0x2b5e
leaq 0x25cc(%rip), %rax      # 0x5030
movl (%rax), %ebx
leaq 0x25c7(%rip), %rax      # 0x5034
movl (%rax), %r15d
movupd (%rdi), %xmm0
movupd (%rsi), %xmm1
subpd %xmm0, %xmm1
movd %r15d, %xmm0
movd %ebx, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
cvtdq2pd %xmm2, %xmm0
divpd %xmm0, %xmm1
movapd %xmm1, 0x67a7(%rip)     # 0x9240
movupd (%rdi), %xmm0
movupd (%rsi), %xmm1
movhpd 0x8(%rdi), %xmm1        # xmm1 = xmm1[0],mem[0]
movhpd 0x8(%rsi), %xmm0        # xmm0 = xmm0[0],mem[0]
subpd %xmm0, %xmm1
mulpd 0x2649(%rip), %xmm1     # 0x5100
leaq 0x6782(%rip), %rdi      # 0x9240
addpd %xmm0, %xmm1
movapd %xmm1, 0x6786(%rip)     # 0x9250
leaq 0x677f(%rip), %rsi      # 0x9250
callq 0x3524
pushq $0x14
popq %rcx
movl %ebx, 0xc(%rsp)
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, %ebp
movl %r15d, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl %r15d, %eax
cltd
movl %ecx, 0x8(%rsp)
idivl %ecx
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %eax
movq %rax, 0x10(%rsp)
cmpq 0x10(%rsp), %r15
je 0x2b87
movl 0xc(%rsp), %eax
cltd
idivl %ebp
movl %eax, %r12d
movl 0x8(%rsp), %eax
movl %eax, %ebx
imull %r15d, %ebx
shlq $0x20, %rbx
incq %r15
movl %r15d, %r13d
imull %eax, %r13d
shlq $0x20, %r13
xorl %r14d, %r14d
testl %r12d, %r12d
cmovlel %r14d, %r12d
subq $0x1, %r12
jb 0x2b04
movl %r14d, %esi
orq %rbx, %rsi
addl %ebp, %r14d
movq %r13, %rdx
orq %r14, %rdx
movq 0x66e1(%rip), %rdi      # 0x9238
callq 0x3a36
jmp 0x2b3b
movq 0x648b(%rip), %rdi      # 0x8ff0
leaq 0x25e8(%rip), %rsi      # 0x5154
callq 0x2210
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/render.cpp
// Function: render_draw_to_SDL_Renderer(SDL_Renderer*)
void render_draw_to_SDL_Renderer(SDL_Renderer* renderer)
{
    for (int y = 0; y < scr_height; y++)
    {
        for (int x = 0; x < scr_width; x++)
        {
            SDL_SetRenderDrawColor(
                renderer,
                render_buffer[y][x].red,
                render_buffer[y][x].green,
                render_buffer[y][x].blue,
                render_buffer[y][x].alpha);
            SDL_RenderDrawPoint(renderer, x, y);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2489(%rip), %rax      # 0x5034
movl (%rax), %ecx
leaq 0x247c(%rip), %rax      # 0x5030
movl (%rax), %r13d
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
testl %ecx, %ecx
cmovlel %r14d, %ecx
movq %rcx, (%rsp)
movl $0xff, %ebp
cmpq (%rsp), %r14
je 0x2c28
imulq $0x18, %r14, %r12
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x2c23
movq 0x662f(%rip), %rax      # 0x9218
movq (%rax,%r12), %rax
movl (%rax,%r15,4), %esi
movl %esi, %edx
shrl $0x8, %edx
movl %esi, %ecx
shrl $0x10, %ecx
movl %esi, %r8d
shrl $0x18, %r8d
andl %ebp, %esi
andl %ebp, %edx
andl %ebp, %ecx
movq %rbx, %rdi
callq 0x22a0
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x2200
incq %r15
jmp 0x2bdd
incq %r14
jmp 0x2bd0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/render.cpp
// Function: render_create_bmp(char const*)
int render_create_bmp(const char* file_name)
{
    /* Create a surface and unlock the pixels*/
    std::cout << "Creating BMP." << std::endl;
    SDL_Surface* surface = SDL_CreateRGBSurface(0, scr_width, scr_height, 32, 0, 0, 0, 0);
    SDL_LockSurface(surface);
    for (int y = 0; y < scr_height; y++)
    {
        for (int x = 0; x < scr_width; x++)
        {
            set_pixel_on_surface(surface, x, y, render_buffer[y][x]);
        }
    }
    SDL_UnlockSurface(surface);
    SDL_SaveBMP(surface, file_name);
    std::cout << "BMP created." << std::endl;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x636e(%rip), %rdi      # 0x8fd0
leaq 0x2517(%rip), %rsi      # 0x5180
callq 0x2210
movq %rax, %rdi
callq 0x2120
leaq 0x23b3(%rip), %rax      # 0x5030
movslq (%rax), %r14
leaq 0x23ad(%rip), %rax      # 0x5034
movl (%rax), %r15d
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x20
popq %rcx
xorl %r13d, %r13d
xorl %edi, %edi
movl %r14d, %esi
movl %r15d, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2280
movq %rax, %r12
movq %rax, %rdi
callq 0x2270
testl %r14d, %r14d
movl $0x0, %eax
cmovgl %r14d, %eax
testl %r15d, %r15d
cmovlel %r13d, %r15d
shlq $0x2, %r14
xorl %ecx, %ecx
cmpq %r15, %rcx
je 0x2d07
imulq $0x18, %rcx, %rdx
xorl %esi, %esi
cmpq %rsi, %rax
je 0x2cff
movq 0x6531(%rip), %rdi      # 0x9218
movq (%rdi,%rdx), %rdi
movl (%rdi,%rsi,4), %edi
movq 0x20(%r12), %r8
addq %r13, %r8
movl %edi, (%r8,%rsi,4)
incq %rsi
jmp 0x2cdb
incq %rcx
addq %r14, %r13
jmp 0x2cd0
movq %r12, %rdi
callq 0x2290
leaq 0x2478(%rip), %rsi      # 0x518e
movq %rbx, %rdi
callq 0x20e0
pushq $0x1
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x2140
movq 0x629d(%rip), %rdi      # 0x8fd0
leaq 0x2457(%rip), %rsi      # 0x5191
callq 0x2210
movq %rax, %rdi
callq 0x2120
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/supersampling.cpp
// Function: get_px_1x_ss(int, int)
rgb_t get_px_1x_ss(int px_x, int px_y)
{
    using std::complex;
    double x = double((px_x - scr_width / 2) * scale.x + offset.x);
    double y = double((px_y - scr_height / 2) * scale.y + offset.y);
    complex<double> c(x, y);
    complex<double> z(0, 0);
    unsigned int iterations;
    for (iterations = 0; iterations < max_iterations; iterations++)
    {
        z = z * z + c;
        if (test_escape(z, 2.0)) { break; }
    }
    return get_color(iterations, z, c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x1ae7(%rip), %rax      # 0x5030
movl (%rax), %eax
pushq $-0x2
popq %rcx
cltd
idivl %ecx
addl %edi, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x5d21(%rip), %xmm0     # 0x9280
addsd 0x5d29(%rip), %xmm0     # 0x9290
leaq 0x1ac6(%rip), %rax      # 0x5034
movl (%rax), %eax
cltd
idivl %ecx
addl %esi, %eax
cvtsi2sd %eax, %xmm1
mulsd 0x5d07(%rip), %xmm1     # 0x9288
addsd 0x5d0f(%rip), %xmm1     # 0x9298
movsd %xmm0, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm1, 0x28(%rsp)
xorpd %xmm0, %xmm0
movq %rsp, %r14
movapd %xmm0, (%r14)
xorl %ebx, %ebx
leaq 0x5c12(%rip), %r15      # 0x91c8
cmpl (%r15), %ebx
jae 0x35f7
movq %r14, %rdi
movq %r14, %rsi
callq 0x3481
addsd 0x18(%rsp), %xmm0
addsd 0x10(%rsp), %xmm1
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
ucomisd 0x1c87(%rip), %xmm1     # 0x5278
ja 0x35f7
incl %ebx
jmp 0x35b6
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movl %ebx, %edi
callq 0x3240
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/thread_pool.cpp
// Function: mandelbrot_thread_pool_create(int, std::function<void (segment_t)>)
mandelbrot_threadpool* mandelbrot_thread_pool_create(
    int threads,
    std::function<void(segment_t)> render_segment_callback)
{
    /* Allocate the threadpool and set it up. */
    mandelbrot_threadpool* threadpool = new mandelbrot_threadpool;
    if (threadpool != NULL) 
    {
        /* Create the proper amount of thread objects. */
        for (int i = 0; i < threads; i++)
        {
            /* No need to lock mutex since no other threads are using resources. */
            threadpool->workers.push_back(std::thread());
            threadpool->worker_busy.push_back(false);
        }
        /* Set threadpool data. */
        threadpool->render_segment = render_segment_callback;
        threadpool->n_threads = threads;
        return threadpool;
    }
    else 
    { 
        return NULL; 
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
movl $0x108, %edi            # imm = 0x108
callq 0x2220
movq %rax, %rbx
movq %rax, %rdi
callq 0x3dd6
leaq 0x8(%rbx), %r15
leaq 0x48(%rbx), %r12
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
leaq 0x8(%rsp), %r13
subl $0x1, %r14d
jb 0x39e7
andq $0x0, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x4568
movq %r13, %rdi
callq 0x3e54
movq %r12, %rdi
xorl %esi, %esi
callq 0x3e62
jmp 0x39bc
movq %rbx, %rdi
addq $0xe8, %rdi
movq 0x10(%rsp), %rsi
callq 0x3ea0
movl %ebp, (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x108, %esi            # imm = 0x108
movq %rbx, %rdi
callq 0x2230
jmp 0x3a2e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3e54
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/thread_pool.cpp
// Function: mandelbrot_thread_pool_add_job(mandelbrot_threadpool*, segment_t)
void mandelbrot_thread_pool_add_job(
    mandelbrot_threadpool* threadpool, 
    segment_t segment)
{
    /* Add the job to the job queue and launch the thread pool. */
    std::unique_lock<std::mutex> jobs_lock(threadpool->jobs_mutex);
    threadpool->jobs.push(segment);
    jobs_lock.unlock();
    mandelbrot_thread_pool_launch(threadpool);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %r15
movq %rsi, (%r15)
movq %rdx, 0x8(%r15)
leaq 0x70(%rdi), %r14
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x3eee
leaq 0x98(%rbx), %rdi
movq %r15, %rsi
callq 0x4bbe
leaq 0x20(%rsp), %rdi
callq 0x3f04
movq %rbx, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x3eee
leaq 0x48(%rbx), %r14
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x3b26
movq %r14, %rdi
movq %r15, %rsi
callq 0x3fea
testq %rdx, (%rax)
je 0x3ab2
incq %r15
jmp 0x3a91
movl %r15d, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3fea
orq %rdx, (%rax)
leaq 0x199(%rip), %rsi       # 0x3c65
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x430c
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movslq 0xc(%rsp), %rsi
callq 0x3f96
leaq 0x18(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x438c
movq %rbx, %rdi
callq 0x3e54
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movslq 0xc(%rsp), %rsi
callq 0x3f96
movq %rax, %rdi
callq 0x2320
leaq 0x30(%rsp), %rdi
callq 0x3f2a
leaq 0x20(%rsp), %rdi
callq 0x3f2a
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3e54
jmp 0x3b61
jmp 0x3b5e
jmp 0x3b5e
jmp 0x3b5e
movq %rax, %rbx
jmp 0x3b6b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3f2a
leaq 0x20(%rsp), %rdi
callq 0x3f2a
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/thread_pool.cpp
// Function: mandelbrot_thread_pool_destroy(mandelbrot_threadpool*)
int mandelbrot_thread_pool_destroy(mandelbrot_threadpool * threadpool)
{
    std::cout << "Killing threads." << std::endl;
    std::this_thread::sleep_for(std::chrono::milliseconds(200));
    for (int i = 0; i < threadpool->n_threads; i++)
    {
        threadpool->workers.at(i).~thread();
    }
    delete threadpool;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x5440(%rip), %rdi      # 0x8fd0
leaq 0x1739(%rip), %rsi      # 0x52d0
callq 0x2210
movq %rax, %rdi
callq 0x2120
leaq 0x8(%rsp), %rdi
movq $0xc8, (%rdi)
callq 0x3f40
leaq 0x8(%rbx), %r14
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x3bdc
movq %r14, %rdi
movq %r15, %rsi
callq 0x3f96
movq %rax, %rdi
callq 0x3e54
incq %r15
jmp 0x3bbc
movq %rbx, %rdi
callq 0x3fb8
movl $0x108, %esi            # imm = 0x108
movq %rbx, %rdi
callq 0x2230
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/miklhh[P]mandelbrot/src/thread_pool.cpp
// Function: mandelbrot_thread_pool_get_active_workers(mandelbrot_threadpool*)
int mandelbrot_thread_pool_get_active_workers(mandelbrot_threadpool * threadpool)
{
    std::lock_guard<std::mutex> lock_worker_busy(threadpool->worker_busy_mutex);
    int active_workers = 0;
    for (int i = 0; i < threadpool->n_threads; i++)
    {
        if (threadpool->worker_busy.at(i)) { active_workers++; }
    }
    return active_workers;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x444e
leaq 0x48(%r14), %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x3c3f
movq %r15, %rdi
movq %r12, %rsi
callq 0x3fea
andq (%rax), %rdx
cmpq $0x1, %rdx
sbbl $-0x1, %ebp
incq %r12
jmp 0x3c1d
movq %rbx, %rdi
callq 0x2190
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH05_Statements/examples/othercnt.cc
// Function: main
int main()
{
    char ch;
    // initialize counters for each vowel
    unsigned vowelCnt = 0;
    unsigned otherCnt = 0;  // count anything that isn't a vowel

    while (cin >> ch) {
        // if ch is a vowel, increment the appropriate counter
        switch (ch) {
			case 'a': case 'e': case 'i': case 'o': case 'u':
				++vowelCnt;
				break;
            default:
                ++otherCnt;
                break;
        }
    }
    // print results
    cout << "Number of vowels: \t" << vowelCnt << '\n'
         << "Total non-vowels : \t" << otherCnt << '\n';

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
movq 0x2dfc(%rip), %rbx      # 0x3fe0
leaq -0x29(%rbp), %r14
movl $0x495, %r13d           # imm = 0x495
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1228
movsbl -0x29(%rbp), %eax
addl $-0x61, %eax
rorl %eax
cmpl $0xa, %eax
ja 0x121e
btl %eax, %r13d
jb 0x1223
incl %r15d
jmp 0x11f1
incl %r12d
jmp 0x11f1
movq 0x2da1(%rip), %rdi      # 0x3fd0
leaq 0xdce(%rip), %rsi       # 0x2004
callq 0x1050
movl %r12d, %esi
movq %rax, %rdi
callq 0x1030
pushq $0xa
popq %rbx
movq %rax, %rdi
movl %ebx, %esi
callq 0x1060
leaq 0xdbe(%rip), %rsi       # 0x2018
movq %rax, %rdi
callq 0x1050
movl %r15d, %esi
movq %rax, %rdi
callq 0x1030
movq %rax, %rdi
movl %ebx, %esi
callq 0x1060
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::setup(int, int, double, double, bool, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void OTX::setup(const int pMaxIterD, const int pMaxIterH, const double pThres,
        const double pLearnRate, const bool pFlagVerb, const double vPlotScale,
        const std::string pPrefix, const bool pFlagDebug) {
        vFlagVerb = pFlagVerb;
        vFlagDebug = pFlagDebug;
        vPrefix = pPrefix;
        vMaxIterD = pMaxIterD;
        vMaxIterH = pMaxIterH;
        vThres = pThres;
        vLearnRate = pLearnRate;

        vNumDiracXs = vDiracXs.size();
        vNumEmpiricalXs = vEmpiricalXs.size();

        // Set h to 1 and gradient to 0
        vHs = std::vector<double>(vNumDiracXs, 1.0);
        vGradient = std::vector<double>(vNumDiracXs, 0.0);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movb %cl, 0x70(%rdi)
movb %r9b, 0x71(%rdi)
addq $0x88, %rdi
movq %r8, %rsi
callq 0x71e0
movl %r14d, 0x74(%rbx)
movl %ebp, 0x78(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x68(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x60(%rbx)
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rcx
subq (%rbx), %rax
shrq $0x3, %rax
movl %eax, 0x7c(%rbx)
subq 0x18(%rbx), %rcx
shrq $0x3, %rcx
movl %ecx, 0x80(%rbx)
movslq %eax, %rsi
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq 0x18(%rsp), %r14
movq %rax, (%r14)
leaq 0x20(%rsp), %r15
leaq 0x7(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rdx
callq 0xee18
leaq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0xfbba
movq %r15, %rdi
callq 0xface
movslq 0x7c(%rbx), %rsi
andq $0x0, (%r14)
leaq 0x20(%rsp), %r14
leaq 0x18(%rsp), %rdx
leaq 0x7(%rsp), %rcx
movq %r14, %rdi
callq 0xee18
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfbba
movq %r14, %rdi
callq 0xface
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::import_data(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OTX::import_data(const std::string pDiracFile, const std::string pEmpiricalFile) {
        std::cout << "--> Importing data... " << std::endl;
        read_diracX_from_file(pDiracFile);
        read_empiricalX_from_file(pEmpiricalFile);
        std::cout << std::endl;
        check_total_mass();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0xb7cd(%rip), %rdi      # 0x18fa8
leaq 0x3396(%rip), %rsi      # 0x10b78
callq 0x7330
movq %rax, %rdi
callq 0x71b0
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x7450
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd86e
leaq 0x28(%rsp), %rdi
callq 0x7728
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x7450
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdc48
leaq 0x8(%rsp), %rdi
callq 0x7728
movq 0xb768(%rip), %rdi      # 0x18fa8
callq 0x71b0
movq %rbx, %rdi
callq 0xe006
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xd85b
movq %rax, %rbx
movq %r14, %rdi
callq 0x7728
movq %rbx, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::check_total_mass()
void OTX::check_total_mass() {
        double totaldirac = 0, totalmass = 0;
        for (auto d : vDiracXs) totaldirac += d->dirac();
        for (auto e : vEmpiricalXs) totalmass += e->mass();

        if (vFlagVerb) {
            std::cout << "--> Checking total measures... " << std::endl;
            std::cout << "       Total Dirac measure: " << totaldirac << std::endl;
            std::cout << "       Total Empirical measure: " << totalmass << std::endl;
            std::cout << "       Diff: " << fabs(totaldirac - totalmass) << std::endl;
            std::cout << std::endl;
        }
        ASSERT_VOT(fabs(totaldirac - totalmass) / totaldirac < OTX_TOLERANCE*vNumEmpiricalXs,
               "Total Dirac measure: " << totaldirac << 
               " not equal to total Empirical measure: " << totalmass);
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorpd %xmm1, %xmm1
cmpq %rcx, %rax
je 0xe02e
movq (%rax), %rdx
addsd 0x10(%rdx), %xmm1
addq $0x8, %rax
jmp 0xe01b
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0xe04d
movq (%rax), %rdx
addsd 0x10(%rdx), %xmm0
addq $0x8, %rax
jmp 0xe03a
cmpb $0x0, 0x70(%rbx)
movsd %xmm0, 0x8(%rsp)
je 0xe116
movq 0xaf44(%rip), %r14      # 0x18fa8
leaq 0x2b77(%rip), %rsi      # 0x10be2
movq %r14, %rdi
movsd %xmm1, (%rsp)
callq 0x7330
movq %rax, %rdi
callq 0x71b0
leaq 0x2b7b(%rip), %rsi      # 0x10c02
movq %r14, %rdi
callq 0x7330
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x7560
movq %rax, %rdi
callq 0x71b0
leaq 0x2b74(%rip), %rsi      # 0x10c1f
movq %r14, %rdi
callq 0x7330
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x7560
movq %rax, %rdi
callq 0x71b0
leaq 0x2b70(%rip), %rsi      # 0x10c40
movq %r14, %rdi
callq 0x7330
movsd (%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
andpd 0x2a65(%rip), %xmm0     # 0x10b50
movapd %xmm0, 0x10(%rsp)
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
callq 0x71b0
movq %r14, %rdi
callq 0x71b0
movapd 0x10(%rsp), %xmm2
movsd (%rsp), %xmm1
jmp 0xe126
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
andpd 0x2a2a(%rip), %xmm2     # 0x10b50
divsd %xmm1, %xmm2
cvtsi2sdl 0x80(%rbx), %xmm0
mulsd 0x2a26(%rip), %xmm0     # 0x10b60
ucomisd %xmm2, %xmm0
jbe 0xe148
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq 0xae91(%rip), %rdi      # 0x18fe0
leaq 0x2af8(%rip), %rsi      # 0x10c4e
movsd %xmm1, (%rsp)
callq 0x7330
leaq 0x2a50(%rip), %rsi      # 0x10bb7
movq %rax, %rdi
callq 0x7330
leaq 0x2a48(%rip), %rsi      # 0x10bbe
movq %rax, %rdi
callq 0x7330
pushq $0x67
popq %rsi
movq %rax, %rdi
callq 0x75f0
leaq 0x22ab(%rip), %rsi      # 0x1043b
movq %rax, %rdi
callq 0x7330
leaq 0x2a6a(%rip), %rsi      # 0x10c09
movq %rax, %rdi
callq 0x7330
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x76a0
leaq 0x2af8(%rip), %rsi      # 0x10cb3
movq %rax, %rdi
callq 0x7330
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x76a0
movq %rax, %rdi
callq 0x71b0
callq 0x7120
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::cluster()
void OTX::cluster() {
        int iterD = 0;
        while (iterD < vMaxIterD) {
            int iterH = 0;
            while (iterH < vMaxIterH) {
                // break if map converges 
                if (update_map(iterD, iterH)) {
                    if (vFlagVerb) write_results(iterD,iterH);
                    break;
                } 
                if (vFlagVerb) write_results(iterD,iterH);
                iterH++;
            }

            // break if dirac converges
            if (update_dirac()) { write_results(iterD,iterH); break; }
            write_results(iterD,iterH);

            if (vFlagDebug) getchar();
            
            iterD++;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
cmpl 0x74(%rbx), %ebp
jge 0xe25f
xorl %r14d, %r14d
cmpl 0x78(%rbx), %r14d
jge 0xe233
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe26a
movb 0x70(%rbx), %cl
testb %al, %al
jne 0xe222
testb %cl, %cl
je 0xe21d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe306
incl %r14d
jmp 0xe1f2
testb %cl, %cl
je 0xe233
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe306
movq %rbx, %rdi
callq 0xe67a
movl %eax, %r15d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe306
testb %r15b, %r15b
jne 0xe25f
cmpb $0x1, 0x71(%rbx)
jne 0xe25b
callq 0x7470
incl %ebp
jmp 0xe1ea
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::update_map(int, int)
bool OTX::update_map(int iterD, int iterH) {
        if (vFlagVerb || vFlagDebug) {
            std::cout << "updating map... iterD: " << iterD 
                                    << ", iterH: " << iterH << std::endl;    
        }
        // If gradient norm less than threshold
        if (compute_gradient() < vThres) { return true; }
        update_h();
        return false;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x0, 0x70(%rdi)
jne 0xe286
cmpb $0x1, 0x71(%rbx)
jne 0xe2c5
movq 0xad1b(%rip), %rdi      # 0x18fa8
leaq 0x2a47(%rip), %rsi      # 0x10cdb
callq 0x7330
movq %rax, %rdi
movl %r14d, %esi
callq 0x75f0
leaq 0x2a48(%rip), %rsi      # 0x10cf3
movq %rax, %rdi
callq 0x7330
movq %rax, %rdi
movl %ebp, %esi
callq 0x75f0
movq %rax, %rdi
callq 0x71b0
movq %rbx, %rdi
callq 0xe7ca
movsd 0x68(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0xe2f6
movq %rbx, %rdi
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, (%rsp)
callq 0xea90
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm1
seta %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::update_dirac()
bool OTX::update_dirac() {
        if (vFlagVerb || vFlagDebug) { std::cout << "updating dirac... " << std::endl; }
        int converge = true;
        // Create a new double array to replace the old one.
        for (auto d : vDiracXs) {
            // If index set does not change, no need to update.
            if (!d->update_flag()) { if (vFlagDebug) d->print(); continue; }

            double* coor = new double[d->dim()];
            std::fill(&coor[0], &coor[d->dim()], 0.0);
            std::unordered_set<int>& tmpSet = d->set();
            for (auto idx : tmpSet) for (int i = 0; i < vDim; i++) 
                coor[i] += (*vEmpiricalXs[idx])[i]*vEmpiricalXs[idx]->mass();

            d->update_coor(*coor);
            *d /= d->mass();

            if (vFlagDebug) d->print();
            converge = false;
        }
        // 0 means no dirac points have been updated.
        return converge;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x70(%rdi)
jne 0xe697
cmpb $0x1, 0x71(%rbx)
jne 0xe6b2
movq 0xa90a(%rip), %rdi      # 0x18fa8
leaq 0x2658(%rip), %rsi      # 0x10cfd
callq 0x7330
movq %rax, %rdi
callq 0x71b0
movq (%rbx), %r12
movq 0x8(%rbx), %r13
pushq $0x1
popq %r15
movq %r13, 0x8(%rsp)
cmpq %r13, %r12
je 0xe7b5
movq (%r12), %r14
cmpb $0x1, 0x21(%r14)
jne 0xe715
cmpq $0x0, 0x40(%r14)
je 0xe715
movslq 0x8(%r14), %rax
leaq (,%rax,8), %rdi
testq %rax, %rax
pushq $-0x1
popq %rax
cmovsq %rax, %rdi
callq 0x7030
movq %rax, %r15
movslq 0x8(%r14), %rax
shlq $0x3, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0xe729
andq $0x0, (%r15,%rcx)
addq $0x8, %rcx
jmp 0xe705
cmpb $0x0, 0x71(%rbx)
je 0xe723
movq %r14, %rdi
callq 0xeee0
addq $0x8, %r12
jmp 0xe6c2
movq %r12, 0x10(%rsp)
leaq 0x38(%r14), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0xe780
movslq 0x8(%rbp), %r13
xorl %r12d, %r12d
movslq 0x84(%rbx), %rax
cmpq %rax, %r12
jge 0xe732
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0xefea
movsd (%rax), %xmm0
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rax
mulsd 0x10(%rax), %xmm0
addsd (%r15,%r12,8), %xmm0
movsd %xmm0, (%r15,%r12,8)
incq %r12
jmp 0xe742
movq %r14, %rdi
movq %r15, %rsi
callq 0xf066
movsd 0x18(%r14), %xmm0
movq %r14, %rdi
callq 0xf088
xorl %r15d, %r15d
cmpb $0x0, 0x71(%rbx)
movq 0x10(%rsp), %r12
movq 0x8(%rsp), %r13
jne 0xe71b
jmp 0xe723
testl %r15d, %r15d
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::update_h()
void OTX::update_h() {
        for (int i = 0; i < vNumDiracXs; i++) {
            vHs[i] -= vLearnRate * vGradient[i];
            if((vFlagVerb || vFlagDebug) && vHs[i] < 0) {
                std::cout << "[warning] H: " << vHs[i] 
                          << ", voro++ cannot plot if h is negative. " << std::endl;
            }
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r13d, %r13d
movq 0xa502(%rip), %r14      # 0x18fa8
leaq 0x22e7(%rip), %r15      # 0x10d94
leaq 0x22ee(%rip), %r12      # 0x10da2
movslq 0x7c(%rbx), %rax
cmpq %rax, %r13
jge 0xeb2b
movsd 0x60(%rbx), %xmm1
movq 0x30(%rbx), %rax
movq 0x48(%rbx), %rcx
movsd (%rax,%r13,8), %xmm0
mulsd (%rcx,%r13,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r13,8)
cmpb $0x0, 0x70(%rbx)
jne 0xeaec
cmpb $0x1, 0x71(%rbx)
jne 0xeb26
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0xeb26
movq %r14, %rdi
movq %r15, %rsi
callq 0x7330
movq 0x30(%rbx), %rcx
movsd (%rcx,%r13,8), %xmm0
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
movq %r12, %rsi
callq 0x7330
movq %rax, %rdi
callq 0x71b0
incq %r13
jmp 0xeab4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::write_dirac(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OTX::write_dirac(std::string filename) {
        std::ofstream of(filename);
        of << "dirac " << vNumDiracXs << " " << vDim << std::endl;
        for (int i = 0; i < vNumDiracXs; i++) {
            of << "{ mass: " << vDiracXs[i]->mass() << " dirac: " << vDiracXs[i]->dirac() 
               << " h: " << vHs[i] << " } ";
            for (int j = 0; j < vDim; j++) {
                of << (*vDiracXs[i])[j] << " ";
            }
            of << std::endl;
        }
        of.close();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x76d0
leaq 0x229c(%rip), %rsi      # 0x10dfd
movq %r14, %rdi
callq 0x7330
movl 0x7c(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
leaq 0x2202(%rip), %rsi      # 0x10d7d
movq %rax, %rdi
callq 0x7330
movl 0x84(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
movq %rax, %rdi
callq 0x71b0
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
leaq 0x226a(%rip), %rbp      # 0x10e12
leaq 0x21ce(%rip), %r14      # 0x10d7d
movslq 0x7c(%rbx), %rax
cmpq %rax, %r13
jge 0xec75
movq %r15, %rdi
leaq 0x223e(%rip), %rsi      # 0x10e04
callq 0x7330
movq (%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movsd 0x18(%rcx), %xmm0
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
leaq 0x2263(%rip), %rsi      # 0x10e4c
callq 0x7330
movq (%rbx), %rcx
movq (%rcx,%r13,8), %rcx
movsd 0x10(%rcx), %xmm0
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
leaq 0x2201(%rip), %rsi      # 0x10e0d
callq 0x7330
movq 0x30(%rbx), %rcx
movsd (%rcx,%r13,8), %xmm0
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7330
xorl %r12d, %r12d
cmpl 0x84(%rbx), %r12d
jge 0xec65
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0xefea
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x7560
movq %rax, %rdi
movq %r14, %rsi
callq 0x7330
incl %r12d
jmp 0xec31
movq %r15, %rdi
callq 0x71b0
incq %r13
jmp 0xebaf
leaq 0x8(%rsp), %rdi
callq 0x74a0
leaq 0x8(%rsp), %rdi
callq 0x74d0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xec9f
jmp 0xec9f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x74d0
movq %rbx, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/otx.cc
// Function: votx::OTX::write_empirical(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OTX::write_empirical(std::string filename) {
        std::ofstream of(filename);
        of << "empirical " << vNumEmpiricalXs << " " << vDim << std::endl;
        for (int i = 0; i < vNumEmpiricalXs; i++) {
            of << "{ mass: " << vEmpiricalXs[i]->mass() << " dirac index: " << vEmpiricalXs[i]->di() << " } ";
            for (int j = 0; j < vDim; j++) {
                of << (*vEmpiricalXs[i])[j] << " ";
            }
            of << std::endl;
        }
        of.close();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0x76d0
leaq 0x2137(%rip), %rsi      # 0x10e16
movq %r14, %rdi
callq 0x7330
movl 0x80(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
leaq 0x2081(%rip), %rsi      # 0x10d7d
movq %rax, %rdi
callq 0x7330
movl 0x84(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
movq %rax, %rdi
callq 0x71b0
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
leaq 0x20e9(%rip), %r13      # 0x10e12
leaq 0x204d(%rip), %rbp      # 0x10d7d
movslq 0x80(%rbx), %rax
cmpq %rax, %r12
jge 0xedd9
movq %r15, %rdi
leaq 0x20ba(%rip), %rsi      # 0x10e04
callq 0x7330
movq 0x18(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movsd 0x10(%rcx), %xmm0
movq %rax, %rdi
callq 0x7560
movq %rax, %rdi
leaq 0x20b3(%rip), %rsi      # 0x10e21
callq 0x7330
movq 0x18(%rbx), %rcx
movq (%rcx,%r12,8), %rcx
movl 0xc(%rcx), %esi
movq %rax, %rdi
callq 0x75f0
movq %rax, %rdi
movq %r13, %rsi
callq 0x7330
xorl %r14d, %r14d
cmpl 0x84(%rbx), %r14d
jge 0xedc9
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
movl %r14d, %esi
callq 0xefea
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x7560
movq %rax, %rdi
movq %rbp, %rsi
callq 0x7330
incl %r14d
jmp 0xed94
movq %r15, %rdi
callq 0x71b0
incq %r12
jmp 0xed30
leaq 0x8(%rsp), %rdi
callq 0x74a0
leaq 0x8(%rsp), %rdi
callq 0x74d0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xee03
jmp 0xee03
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x74d0
movq %rbx, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/./pointX.hh
// Function: votx::DiracX::print()
void print() {
        std::cout << "("  << "update? " << vic <<  "; dim" << vn << "; dirac: " << vd 
                  << "; mass: " << vm << "; coor: ";
        for (int i = 0; i < vn-1; i++) { std::cout << vp[i] << ", "; }
        std::cout << vp[vn-1] << ")" << std::endl;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xa0b6(%rip), %r14      # 0x18fa8
leaq 0x1f41(%rip), %rsi      # 0x10e3a
movq %r14, %rdi
callq 0x7330
leaq 0x1f34(%rip), %rsi      # 0x10e3c
movq %rax, %rdi
callq 0x7330
movzbl 0x21(%rbx), %esi
movq %rax, %rdi
callq 0x75b0
leaq 0x1f22(%rip), %rsi      # 0x10e45
movq %rax, %rdi
callq 0x7330
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
leaq 0x1f0e(%rip), %rsi      # 0x10e4b
movq %rax, %rdi
callq 0x7330
movsd 0x10(%rbx), %xmm0
movq %rax, %rdi
callq 0x7560
leaq 0x1efc(%rip), %rsi      # 0x10e55
movq %rax, %rdi
callq 0x7330
movsd 0x18(%rbx), %xmm0
movq %rax, %rdi
callq 0x7560
leaq 0x1ee9(%rip), %rsi      # 0x10e5e
movq %rax, %rdi
callq 0x7330
xorl %r12d, %r12d
leaq 0x1df5(%rip), %r15      # 0x10d7c
movslq 0x8(%rbx), %rax
leaq -0x1(%rax), %rdx
movq (%rbx), %rcx
cmpq %rdx, %r12
jge 0xefb5
movsd (%rcx,%r12,8), %xmm0
movq %r14, %rdi
callq 0x7560
movq %rax, %rdi
movq %r15, %rsi
callq 0x7330
incq %r12
jmp 0xef87
movsd -0x8(%rcx,%rax,8), %xmm0
movq 0x9fe6(%rip), %rdi      # 0x18fa8
callq 0x7560
leaq 0x1694(%rip), %rsi      # 0x10662
movq %rax, %rdi
callq 0x7330
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x71b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/./pointbaseX.hh
// Function: votx::PointX::distL22(votx::PointX const&) const
double distL22(const PointX &p) const {
        double dist = 0.0;
        for (int i = 0; i < vn; i++) {
            dist += (vp[i]-p[i]) * (vp[i]-p[i]); 
        }
        return dist;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
xorl %r15d, %r15d
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jge 0xf1b8
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm1
movsd %xmm1, 0x8(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
movsd %xmm0, 0x18(%rsp)
callq 0xf4d2
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq (%r14), %rax
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0xf4d2
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
mulsd 0x8(%rsp), %xmm1
addsd %xmm1, %xmm0
incq %r15
jmp 0xf146
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/votx/./pointX.hh
// Function: votx::EmpiricalX::print() const
void print() const {
        std::cout << "( dirac_idx: " << vdi << "; mass: " << vm << "; coor: ";
        for (int i = 0; i < vn-1; i++) {
            std::cout << vp[i] << ", ";
        }
        std::cout << vp[vn-1] << ")" << std::endl;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x9dbe(%rip), %r14      # 0x18fa8
leaq 0x1cf1(%rip), %rsi      # 0x10ee2
movq %r14, %rdi
callq 0x7330
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x75f0
leaq 0x1c4a(%rip), %rsi      # 0x10e55
movq %rax, %rdi
callq 0x7330
movsd 0x10(%rbx), %xmm0
movq %rax, %rdi
callq 0x7560
leaq 0x1c37(%rip), %rsi      # 0x10e5e
movq %rax, %rdi
callq 0x7330
xorl %r12d, %r12d
leaq 0x1b43(%rip), %r15      # 0x10d7c
movslq 0x8(%rbx), %rax
leaq -0x1(%rax), %rdx
movq (%rbx), %rcx
cmpq %rdx, %r12
jge 0xf267
movsd (%rcx,%r12,8), %xmm0
movq %r14, %rdi
callq 0x7560
movq %rax, %rdi
movq %r15, %rsi
callq 0x7330
incq %r12
jmp 0xf239
movsd -0x8(%rcx,%rax,8), %xmm0
movq 0x9d34(%rip), %rdi      # 0x18fa8
callq 0x7560
leaq 0x13e2(%rip), %rsi      # 0x10662
movq %rax, %rdi
callq 0x7330
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x71b0
// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/example/algebra/LibSvm.cpp
// Function: main
int main(int argc,char** argv){
    abcdl::utils::log::set_min_log_level(abcdl::utils::log::INFO);
    abcdl::utils::log::initialize_log(argc, argv);
    abcdl::algebra::Mat data_mat;
    abcdl::algebra::Mat label_mat;
    abcdl::utils::LibsvmHelper<real> helper;
    helper.read_data(251, 2, "./data/test.libsvm", &data_mat, &label_mat);
    printf("sample size:%zu\n", data_mat.rows());
    helper.write_data("./data/test.write.libsvm", data_mat, label_mat);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x37fca
movl %ebp, %edi
movq %rbx, %rsi
callq 0x37cd4
leaq 0x38(%rsp), %rdi
callq 0x21080
leaq 0x60(%rsp), %rdi
callq 0x21080
movq $0x2710, 0x28(%rsp)     # imm = 0x2710
leaq 0x2e1fd(%rip), %rsi     # 0x39190
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xa150
leaq 0x28(%rsp), %rdi
pushq $0x2
popq %rdx
leaq 0x8(%rsp), %rcx
leaq 0x38(%rsp), %r8
leaq 0x60(%rsp), %r9
movl $0xfb, %esi
callq 0x10fb8
leaq 0x8(%rsp), %rdi
callq 0xa190
movq 0x38(%rsp), %rsi
leaq 0x2e1ca(%rip), %rdi     # 0x391a3
xorl %eax, %eax
callq 0xa060
leaq 0x2e1cd(%rip), %rsi     # 0x391b4
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xa150
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x11338
leaq 0x8(%rsp), %rdi
callq 0xa190
leaq 0x60(%rsp), %rdi
callq 0x212aa
leaq 0x38(%rsp), %rdi
callq 0x212aa
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
jmp 0xb03d
jmp 0xb04c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa190
jmp 0xb04f
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x212aa
jmp 0xb05e
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x212aa
movq %rbx, %rdi
callq 0xa6e0