LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/romkatv[P]action-chain/src/action_chain.h
// Function: romkatv::ActionChain::Work::ContinueWith(romkatv::ActionChain::Work*)
void* ContinueWith(Work* next) {
      assert(next != nullptr && next != Sealed());
      if (Work* w = next_.load(std::memory_order_acquire)
                        ?: next_.exchange(next, std::memory_order_acq_rel)) {
        static_cast<void>(w);
        assert(w == Sealed());
        Destroy();
        RunAll(next);
        return this;
      }
      return nullptr;
    }

// Assembly:
pushq %rbx
testq $-0x9, %rsi
je 0x525b
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
jne 0x5237
movq %rsi, %rax
xchgq %rax, (%rbx)
testq %rax, %rax
je 0x5254
cmpq $0x8, %rax
jne 0x527a
movq (%rbx), %rax
testq %rax, %rax
je 0x5299
movq %rsi, %rdi
callq 0x5186
jmp 0x5256
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
leaq 0x11be(%rip), %rdi      # 0x6420
leaq 0x108b(%rip), %rsi      # 0x62f4
leaq 0x11d4(%rip), %rcx      # 0x6444
movl $0x75, %edx
callq 0x2100
leaq 0x11fa(%rip), %rdi      # 0x647b
leaq 0x106c(%rip), %rsi      # 0x62f4
leaq 0x11b5(%rip), %rcx      # 0x6444
movl $0x79, %edx
callq 0x2100
leaq 0x11e9(%rip), %rdi      # 0x6489
leaq 0x104d(%rip), %rsi      # 0x62f4
leaq 0x120c(%rip), %rcx      # 0x64ba
movl $0x6e, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O1/romkatv[P]action-chain/src/action_chain.cc
// Function: romkatv::ActionChain::Work::RunAllSlow(romkatv::ActionChain::Work*, romkatv::ActionChain::Work*)
void ActionChain::Work::RunAllSlow(Work* w, Work* next) {
  do {
    do {
      assert(w != nullptr && w != Sealed());
      assert(next != nullptr && next != Sealed());
      w->Destroy();
      ::operator delete(w, kAllocSize);
      w = next;
      w->invoke_(w);
      next = w->next_.load(std::memory_order_acquire);
    } while (next);
    next = w->next_.exchange(Sealed(), std::memory_order_acq_rel);
  } while (next);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq $-0x9, %rdi
je 0x53e9
testq $-0x9, %rbx
je 0x5408
movq (%rdi), %rax
testq %rax, %rax
je 0x5427
movl $0x20, %esi
callq 0x21d0
movq %rbx, %rdi
callq *0x8(%rbx)
movq (%rbx), %rax
testq %rax, %rax
jne 0x53df
movl $0x8, %eax
xchgq %rax, (%rbx)
testq %rax, %rax
je 0x53e7
movq %rbx, %rdi
movq %rax, %rbx
jmp 0x53a0
popq %rbx
retq
leaq 0xee6(%rip), %rdi       # 0x62d6
leaq 0x13c3(%rip), %rsi      # 0x67ba
leaq 0x13d0(%rip), %rcx      # 0x67ce
movl $0xa, %edx
callq 0x2100
leaq 0x1011(%rip), %rdi      # 0x6420
leaq 0x13a4(%rip), %rsi      # 0x67ba
leaq 0x13b1(%rip), %rcx      # 0x67ce
movl $0xb, %edx
callq 0x2100
leaq 0x105b(%rip), %rdi      # 0x6489
leaq 0xebf(%rip), %rsi       # 0x62f4
leaq 0x107e(%rip), %rcx      # 0x64ba
movl $0x6e, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O1/dianejdan[P]Eclat/./DbReader.hpp
// Function: DbReader::template_type(char*)
int template_type(char* filename){

        ifstream in_(filename); // open input file
        char buffer[4096]; // store each line/transaction
        string line;

        int typ = 3;
        // parse the input file, add item and tid into the tid list
        in_.getline(buffer, 4096);
        line = buffer;
        size_t pos1 = line.find_first_not_of(" ");
        if (buffer[pos1+1] == ' '){
            if (buffer[pos1] == '0' || buffer[pos1] == '1' || buffer[pos1] == '2' ||
                buffer[pos1] == '3' || buffer[pos1] == '4' || buffer[pos1] == '5' ||
                buffer[pos1] == '6' || buffer[pos1] == '7' || buffer[pos1] == '8' ||
                buffer[pos1] == '9')
                typ = 1;
            else
                typ = 2;
        }

        in_.close();
        return typ;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1230, %rsp           # imm = 0x1230
leaq -0x248(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x22e0
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %ecx
leaq -0x248(%rbp), %rdi
leaq -0x1250(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x22f0
leaq -0x40(%rbp), %rbx
movq 0x8(%rbx), %r15
leaq -0x1250(%rbp), %r14
movq %r14, %rdi
callq 0x20d0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x2250
leaq 0x48f8(%rip), %rsi      # 0x7149
leaq -0x40(%rbp), %rdi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x2290
movl $0x3, %ebx
cmpb $0x20, 0x1(%rax,%r14)
jne 0x2881
movb -0x1250(%rbp,%rax), %al
addb $-0x30, %al
cmpb $0xa, %al
movl $0x2, %ebx
sbbl $0x0, %ebx
leaq -0x248(%rbp), %rdi
callq 0x2060
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x28a2
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21d0
leaq -0x248(%rbp), %rdi
callq 0x2080
movl %ebx, %eax
addq $0x1230, %rsp           # imm = 0x1230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28c2
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x28da
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21d0
leaq -0x248(%rbp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/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)
movl $0x50, %edi
callq 0x21c0
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x40(%r15)
leaq -0x58(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r13
movq %r13, %rdi
callq 0x4f9c
movq %r15, %rdi
movq %r13, %rsi
callq 0x2100
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x5d0a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x4030
movq %r15, %rdi
movq %r13, %rsi
callq 0x62e2
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x5d39
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
movq %r15, %rsi
callq 0x6338
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, %r14
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x5d87
movq -0x38(%rbp), %rsi
subq %rdi, %rsi
jmp 0x5d82
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x5d87
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
leaq 0x8(%rdx), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4030
movq -0x38(%rbp), %rdi
cmpq %rdi, -0x30(%rbp)
je 0x4c2e
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movslq %r12d, %rax
cmpq %rax, %rdx
jbe 0x4c17
movl (%rdi,%r15,4), %r8d
incl %r12d
cmpl (%rcx,%rax,4), %r8d
je 0x4bf4
jl 0x4bef
incq %rax
incl %r12d
cmpq %rax, %rdx
ja 0x4bdc
movl %eax, %r12d
jmp 0x4c17
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c0b
movl %r8d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4c17
leaq (%rdi,%r15,4), %rdx
movq %rbx, %rdi
callq 0x40b0
incq %r15
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
subq %rdi, %rax
sarq $0x2, %rax
cmpq %r15, %rax
ja 0x4bbe
testq %rdi, %rdi
je 0x4c3f
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4c6c
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x4c6c
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c80
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2f8a
movq 0x59ce(%rip), %r15      # 0x7fd0
leaq 0x2a03(%rip), %rsi      # 0x500c
movq %r15, %rdi
callq 0x2220
movq (%r14), %rsi
movq %rax, %rdi
callq 0x2220
movq %rax, %rdi
callq 0x2110
leaq 0x29f4(%rip), %rsi      # 0x501f
movq %r15, %rdi
callq 0x2220
movq %rax, %rdi
movl %ebx, %esi
callq 0x2330
movq %rax, %rdi
callq 0x2110
movl %ebx, %edi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movl %edi, 0xc(%rsp)
leaq 0x273f(%rip), %rax      # 0x5008
movslq (%rax), %r13
testq %r13, %r13
jle 0x297a
leaq 0x2728(%rip), %rax      # 0x5004
movl (%rax), %r15d
xorl %r14d, %r14d
leaq 0x10(%rsp), %r12
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x590f(%rip), %rdi      # 0x8218
movq %r12, %rsi
callq 0x2fee
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2928
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2240
movl %r15d, %ebp
testl %r15d, %r15d
jle 0x296e
movq 0x58e9(%rip), %rdx      # 0x8220
movq 0x58da(%rip), %rax      # 0x8218
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbx, %rdx
cmpq %r14, %rdx
jbe 0x29f2
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %rdi
movl $0x0, 0x10(%rsp)
movq %r12, %rsi
callq 0x3206
decl %ebp
jne 0x2930
incq %r14
cmpq %r13, %r14
jne 0x28f1
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0xe2(%rip), %rax        # 0x2a72
movq %rax, (%rsi)
leaq 0x9d6(%rip), %rax       # 0x3370
movq %rax, 0x18(%rsi)
leaq 0x9d3(%rip), %rax       # 0x3378
movq %rax, 0x10(%rsi)
movl 0xc(%rsp), %edi
callq 0x3bf8
movq %rax, 0x587f(%rip)      # 0x8238
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x29d2
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
cmpq $0x0, 0x585e(%rip)      # 0x8238
je 0x2a03
movb $0x1, 0x584d(%rip)      # 0x8230
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2797(%rip), %rdi      # 0x5190
movq %r14, %rsi
xorl %eax, %eax
callq 0x22f0
movq 0x55e6(%rip), %rdi      # 0x7ff0
leaq 0x26d7(%rip), %rsi      # 0x50e8
callq 0x2220
movq %rax, %rdi
callq 0x2110
movl $0x1, %edi
callq 0x2270
jmp 0x2a48
movq %rax, %rbx
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x2a6a
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2a6a
movq %rax, %rdi
callq 0x2fe3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x2a6a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x225f(%rip), %rax      # 0x5008
movslq (%rax), %rax
movq %rax, (%rsp)
testq %rax, %rax
jle 0x2e23
movq %rdi, %rbx
leaq 0x2245(%rip), %rax      # 0x5004
movl (%rax), %r13d
xorl %r14d, %r14d
movl $0xff, %ebp
testl %r13d, %r13d
jle 0x2e1a
leaq (%r14,%r14,2), %r12
xorl %r15d, %r15d
movq 0x543b(%rip), %rax      # 0x8218
movq (%rax,%r12,8), %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 0x22c0
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x2200
incq %r15
cmpq %r15, %r13
jne 0x2dd6
incq %r14
cmpq (%rsp), %r14
jne 0x2dca
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %r14
movq 0x5177(%rip), %rbx      # 0x7fd0
leaq 0x22f8(%rip), %rsi      # 0x5158
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
leaq 0x2169(%rip), %rax      # 0x5004
movl (%rax), %r15d
leaq 0x2163(%rip), %rax      # 0x5008
movslq (%rax), %r12
xorl %eax, %eax
xorl %edi, %edi
movl %r15d, %esi
movl %r12d, %edx
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
callq 0x22a0
addq $0x10, %rsp
movq %rax, %r13
movq %rax, %rdi
callq 0x2290
testq %r12, %r12
jle 0x2f1c
leaq (,%r15,4), %rax
xorl %ecx, %ecx
xorl %edx, %edx
testl %r15d, %r15d
jle 0x2f11
leaq (%rdx,%rdx,2), %rsi
xorl %edi, %edi
movq 0x5322(%rip), %r8       # 0x8218
movq (%r8,%rsi,8), %r8
movl (%r8,%rdi,4), %r8d
movq 0x20(%r13), %r9
addq %rcx, %r9
movl %r8d, (%r9,%rdi,4)
incq %rdi
cmpq %rdi, %r15
jne 0x2eef
incq %rdx
addq %rax, %rcx
cmpq %r12, %rdx
jne 0x2ee4
movq %r13, %rdi
callq 0x22b0
leaq 0x223b(%rip), %rsi      # 0x5166
movq %r14, %rdi
callq 0x20f0
movq %r13, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x2130
leaq 0x221f(%rip), %rsi      # 0x5169
movl $0xc, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x1965(%rip), %rax      # 0x5004
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
subl %ecx, %edi
cvtsi2sd %edi, %xmm0
mulsd 0x4bb8(%rip), %xmm0     # 0x8270
addsd 0x4bc0(%rip), %xmm0     # 0x8280
leaq 0x1941(%rip), %rax      # 0x5008
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
subl %ecx, %esi
cvtsi2sd %esi, %xmm1
mulsd 0x4b98(%rip), %xmm1     # 0x8278
addsd 0x4ba0(%rip), %xmm1     # 0x8288
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rsp)
leaq 0x4ad4(%rip), %r12      # 0x81d8
cmpl $0x0, (%r12)
je 0x376c
xorl %ebx, %ebx
leaq 0x20(%rsp), %r14
movq %rsp, %r15
movaps (%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x360e
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
addsd 0x10(%rsp), %xmm0
addsd 0x18(%rsp), %xmm1
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
ucomisd 0x1af0(%rip), %xmm1     # 0x5250
ja 0x376e
incl %ebx
cmpl (%r12), %ebx
jb 0x3715
jmp 0x376e
xorl %ebx, %ebx
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
movl %ebx, %edi
callq 0x339c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r15d
movl $0x108, %edi            # imm = 0x108
callq 0x2230
movq %rax, %rbx
leaq 0x8(%rax), %r14
movq $0x0, 0x58(%rax)
movl $0x0, 0x60(%rax)
leaq 0x98(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x44(%rax)
movups %xmm0, 0x68(%rax)
movups %xmm0, 0x78(%rax)
movups %xmm0, 0x88(%rax)
movups %xmm0, 0x98(%rax)
movups %xmm0, 0xa8(%rax)
movups %xmm0, 0xb8(%rax)
movups %xmm0, 0xc8(%rax)
movups %xmm0, 0xd8(%rax)
xorl %esi, %esi
callq 0x43e6
xorps %xmm0, %xmm0
movups %xmm0, 0xf8(%rbx)
movups %xmm0, 0xe8(%rbx)
testl %r15d, %r15d
jle 0x3cd1
leaq 0x48(%rbx), %r12
leaq 0x8(%rsp), %r13
movl %r15d, %ebp
movq $0x0, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x4722
cmpq $0x0, 0x8(%rsp)
jne 0x3d3b
movq %r12, %rdi
xorl %esi, %esi
callq 0x424a
decl %ebp
jne 0x3ca7
movq %rbx, %rdi
addq $0xe8, %rdi
movq 0x10(%rsp), %rsi
callq 0x4298
movl %r15d, (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %rbx, %rdi
addq $0x48, %rdi
callq 0x455e
movq %r14, %rdi
callq 0x43aa
movl $0x108, %esi            # imm = 0x108
movq %rbx, %rdi
callq 0x2240
jmp 0x3d33
movq %rax, %rdi
callq 0x2fe3
cmpq $0x0, 0x8(%rsp)
jne 0x3d3b
movq %rax, %r15
movq %r15, %rdi
callq 0x2350
callq 0x2070
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
leaq 0x70(%rdi), %r15
leaq 0x20(%rsp), %r14
movq %r15, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x4620
movb $0x1, 0x8(%r14)
movq 0xc8(%rbx), %rax
movq 0xd8(%rbx), %rcx
addq $-0x10, %rcx
cmpq %rcx, %rax
je 0x3d9d
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rax)
addq $0x10, 0xc8(%rbx)
jmp 0x3dae
leaq 0x98(%rbx), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4cb2
leaq 0x20(%rsp), %rdi
callq 0x4306
movq %rbx, 0x10(%rsp)
leaq 0x40(%rsp), %rdi
movq %r15, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x4620
movb $0x1, 0x48(%rsp)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
movq 0x10(%rsp), %rdi
cmpl $0x0, (%rdi)
jle 0x3e0e
xorl %ebx, %ebx
addq $0x48, %rdi
movq %rbx, %rsi
callq 0x4344
testq %rdx, (%rax)
je 0x3e0a
incq %rbx
movq 0x10(%rsp), %rdi
movslq (%rdi), %rax
cmpq %rax, %rbx
jl 0x3de7
jmp 0x3e0e
movl %ebx, 0xc(%rsp)
movslq 0xc(%rsp), %rsi
cmpq $-0x1, %rsi
je 0x3e7b
movq 0x10(%rsp), %rdi
addq $0x48, %rdi
callq 0x4344
orq %rdx, (%rax)
leaq 0x241(%rip), %rsi       # 0x4072
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x458c
movq 0x10(%rsp), %rcx
movslq 0xc(%rsp), %rsi
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
jbe 0x3e99
cmpq $0x0, (%rax,%rsi,8)
jne 0x3eb1
leaq (%rax,%rsi,8), %rdi
movq 0x18(%rsp), %rax
movq %rax, (%rdi)
callq 0x2340
leaq 0x40(%rsp), %rdi
callq 0x432e
leaq 0x20(%rsp), %rdi
callq 0x432e
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x12f0(%rip), %rdi      # 0x5190
xorl %eax, %eax
callq 0x22f0
jmp 0x3ebf
cmpq $0x0, 0x18(%rsp)
je 0x3ebf
callq 0x2070
jmp 0x3ebf
jmp 0x3ebf
movq %rax, %rbx
jmp 0x3ecc
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x432e
leaq 0x20(%rsp), %rdi
callq 0x432e
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40e1(%rip), %r14      # 0x7fd0
leaq 0x13a2(%rip), %rsi      # 0x5298
movl $0x10, %edx
movq %r14, %rdi
callq 0x2250
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movq $0xbebc200, 0x8(%r14)   # imm = 0xBEBC200
movq %r14, %rdi
movq %r14, %rsi
callq 0x2090
cmpl $-0x1, %eax
jne 0x3f58
callq 0x2050
cmpl $0x4, (%rax)
je 0x3f3e
movslq (%rbx), %rax
testq %rax, %rax
jle 0x3f85
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x3fd7
cmpq $0x0, (%rcx,%rsi,8)
jne 0x3fe8
incq %rsi
cmpq %rsi, %rax
jne 0x3f71
movq 0xf8(%rbx), %rax
testq %rax, %rax
je 0x3fa2
leaq 0xe8(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x98(%rbx), %rdi
callq 0x46d2
leaq 0x48(%rbx), %rdi
callq 0x455e
leaq 0x8(%rbx), %rdi
callq 0x43aa
movl $0x108, %esi            # imm = 0x108
movq %rbx, %rdi
callq 0x2240
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x11b2(%rip), %rdi      # 0x5190
movq %rdx, %rsi
xorl %eax, %eax
callq 0x22f0
callq 0x2070
jmp 0x3fef
movq %rax, %rdi
callq 0x2fe3
// File: /workspace/github_cpp_makefile_star2_O1/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 0x22e0
testl %eax, %eax
jne 0x4058
cmpl $0x0, (%r14)
jle 0x4043
leaq 0x48(%r14), %r15
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x4344
andq (%rax), %rdx
cmpq $0x1, %rdx
sbbl $-0x1, %ebp
incq %r12
movslq (%r14), %rax
cmpq %rax, %r12
jl 0x4021
jmp 0x4045
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2190
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x2150
movq %rax, %r14
movq %rbx, %rdi
callq 0x2190
movq %r14, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O1/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
movq 0x2e0f(%rip), %rdi      # 0x3fe0
leaq -0x29(%rbp), %rsi
callq 0x1060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
xorl %ebx, %ebx
testb $0x5, 0x20(%rax,%rcx)
je 0x11ef
xorl %r14d, %r14d
jmp 0x123f
movq 0x2dea(%rip), %r14      # 0x3fe0
leaq -0x29(%rbp), %r15
movl $0x495, %r13d           # imm = 0x495
xorl %r12d, %r12d
movsbl -0x29(%rbp), %eax
addl $-0x61, %eax
rorl %eax
cmpl $0xa, %eax
ja 0x1235
btl %eax, %r13d
jae 0x1235
incl %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x1060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
je 0x1203
jmp 0x1239
incl %ebx
jmp 0x121a
movl %ebx, %r14d
movl %r12d, %ebx
movq 0x2d8a(%rip), %r15      # 0x3fd0
leaq 0xdb7(%rip), %rsi       # 0x2004
movl $0x13, %edx
movq %r15, %rdi
callq 0x1050
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1030
movb $0xa, %r15b
leaq -0x2a(%rbp), %rsi
movb %r15b, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x1050
movq %rax, %rbx
leaq 0xd92(%rip), %rsi       # 0x2018
movl $0x14, %edx
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1030
leaq -0x2b(%rbp), %rsi
movb %r15b, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x1050
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_O1/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 %r14
pushq %rbx
subq $0x40, %rsp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%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 0x71c0
movl %r14d, 0x74(%rbx)
movl %ebp, 0x78(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x68(%rbx)
movsd 0x18(%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 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x28(%rsp), %r14
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
callq 0x126ba
leaq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x1311c
movq (%r14), %rdi
testq %rdi, %rdi
je 0xfc57
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x7350
movslq 0x7c(%rbx), %rsi
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x28(%rsp), %r14
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
callq 0x126ba
addq $0x48, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1311c
movq (%r14), %rdi
testq %rdi, %rdi
je 0xfc9d
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x7350
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0xb2e5(%rip), %r14      # 0x1afa8
leaq 0x4ece(%rip), %rsi      # 0x14b98
movl $0x16, %edx
movq %r14, %rdi
callq 0x73a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x9d62
movq %rbx, %rdi
movq %r12, %rsi
callq 0xfde8
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfd42
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x7350
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x9d62
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10514
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0xfd81
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x7350
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq %rbx, %rdi
callq 0x10c38
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0xfdcf
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0xfde0
movq (%r13), %rsi
incq %rsi
callq 0x7350
movq %rbx, %rdi
callq 0x7620
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10f6c
cmpl $0x0, 0x78(%rbx)
jle 0x10f21
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x10f78
testb %al, %al
jne 0x10f26
cmpb $0x1, 0x70(%rbx)
jne 0x10f16
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1104c
incl %r14d
cmpl 0x78(%rbx), %r14d
jl 0x10ef2
jmp 0x10f39
xorl %r14d, %r14d
jmp 0x10f39
cmpb $0x1, 0x70(%rbx)
jne 0x10f39
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1104c
movq %rbx, %rdi
callq 0x11c90
movl %eax, %r15d
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1104c
testb %r15b, %r15b
jne 0x10f63
cmpb $0x1, 0x71(%rbx)
jne 0x10f61
callq 0x7470
incl %ebp
testb %r15b, %r15b
je 0x10ee0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpb $0x0, 0x70(%rdi)
jne 0x10f96
cmpb $0x1, 0x71(%rbx)
jne 0x11007
movq 0xa00b(%rip), %r15      # 0x1afa8
leaq 0x3d57(%rip), %rsi      # 0x14cfb
movl $0x17, %edx
movq %r15, %rdi
callq 0x73a0
movq %r15, %rdi
movl %r14d, %esi
callq 0x75f0
movq %rax, %r14
leaq 0x3d4d(%rip), %rsi      # 0x14d13
movl $0x9, %edx
movq %rax, %rdi
callq 0x73a0
movq %r14, %rdi
movl %ebp, %esi
callq 0x75f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq %rbx, %rdi
callq 0x11e22
movsd 0x68(%rbx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x1103a
movq %rbx, %rdi
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x121b2
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm0, %xmm1
seta %al
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11cad
cmpb $0x1, 0x71(%rbx)
jne 0x11cef
movq 0x92f4(%rip), %r14      # 0x1afa8
leaq 0x3062(%rip), %rsi      # 0x14d1d
movl $0x12, %edx
movq %r14, %rdi
callq 0x73a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x11e11
movl $0x1, %ebp
movq %r12, 0x8(%rsp)
movq (%r15), %r14
cmpb $0x1, 0x21(%r14)
jne 0x11dbb
cmpq $0x0, 0x40(%r14)
je 0x11dbb
movq %r15, 0x10(%rsp)
movslq 0x8(%r14), %rax
leaq (,%rax,8), %rdi
testq %rax, %rax
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x7030
movq %rax, %r15
movslq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x11d60
shlq $0x3, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x71d0
movq 0x38(%r14), %rbp
testq %rbp, %rbp
je 0x11dd8
cmpl $0x0, 0x84(%rbx)
jle 0x11db5
movslq 0x8(%rbp), %r13
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0x128ac
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
movslq 0x84(%rbx), %rax
cmpq %rax, %r12
jl 0x11d79
movq (%rbp), %rbp
jmp 0x11d64
cmpb $0x0, 0x71(%rbx)
je 0x11dc9
movq %r14, %rdi
callq 0x1273c
addq $0x8, %r15
cmpq %r12, %r15
jne 0x11d09
jmp 0x11e0a
movq (%r14), %rdi
testq %rdi, %rdi
je 0x11de5
callq 0x7410
movq %r15, (%r14)
movsd 0x18(%r14), %xmm0
movq %r14, %rdi
callq 0x1292a
xorl %ebp, %ebp
cmpb $0x0, 0x71(%rbx)
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r12
jne 0x11dc1
jmp 0x11dc9
testl %ebp, %ebp
setne %al
jmp 0x11e13
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0x7c(%rdi)
jle 0x12291
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movq 0x8dd5(%rip), %r14      # 0x1afa8
leaq 0x2bda(%rip), %r15      # 0x14db4
leaq 0x2be1(%rip), %r12      # 0x14dc2
movsd 0x60(%rbx), %xmm1
movq 0x30(%rbx), %rax
movq 0x48(%rbx), %rcx
movsd (%rax,%rbp,8), %xmm0
mulsd (%rcx,%rbp,8), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rbp,8)
cmpb $0x0, 0x70(%rbx)
jne 0x1220d
cmpb $0x1, 0x71(%rbx)
jne 0x12273
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x12273
movl $0xd, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x73a0
movq 0x30(%rbx), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r14, %rdi
callq 0x7560
movq %rax, %r13
movl $0x27, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x73a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r13, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
incq %rbp
movslq 0x7c(%rbx), %rax
cmpq %rax, %rbp
jl 0x121e1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %r14, %rdi
movl $0x10, %edx
callq 0x76d0
leaq 0x2b5e(%rip), %rsi      # 0x14e1d
movl $0x6, %edx
movq %r14, %rdi
callq 0x73a0
movl 0x7c(%rbx), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x75f0
movq %rax, %r15
leaq 0x2ab7(%rip), %rsi      # 0x14d9d
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x84(%rbx), %esi
movq %r15, %rdi
callq 0x75f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r15, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
cmpl $0x0, 0x7c(%rbx)
jle 0x1244e
xorl %r13d, %r13d
leaq 0x2af3(%rip), %rbp      # 0x14e32
leaq 0x2a57(%rip), %r15      # 0x14d9d
movl $0x8, %edx
movq %r14, %rdi
leaq 0x2acf(%rip), %rsi      # 0x14e24
callq 0x73a0
movq (%rbx), %rax
movq (%rax,%r13,8), %rax
movsd 0x18(%rax), %xmm0
movq %r14, %rdi
callq 0x7560
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0x2aec(%rip), %rsi      # 0x14e6c
callq 0x73a0
movq (%rbx), %rax
movq (%rax,%r13,8), %rax
movsd 0x10(%rax), %xmm0
movq %r12, %rdi
callq 0x7560
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x2a82(%rip), %rsi      # 0x14e2d
callq 0x73a0
movq 0x30(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
movq %r12, %rdi
callq 0x7560
movl $0x3, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x73a0
cmpl $0x0, 0x84(%rbx)
jle 0x12415
xorl %r12d, %r12d
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
movl %r12d, %esi
callq 0x128ac
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x7560
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x73a0
incl %r12d
cmpl 0x84(%rbx), %r12d
jl 0x123de
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
incq %r13
movslq 0x7c(%rbx), %rax
cmpq %rax, %r13
jl 0x12346
leaq 0x8(%rsp), %rdi
callq 0x74b0
movq 0x8b29(%rip), %rax      # 0x1af88
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x72d0
leaq 0x100(%rsp), %rdi
callq 0x7120
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x124a0
jmp 0x124a0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x74e0
movq %rbx, %rdi
callq 0x7620
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %r14, %rdi
movl $0x10, %edx
callq 0x76d0
leaq 0x2953(%rip), %rsi      # 0x14e36
movl $0xa, %edx
movq %r14, %rdi
callq 0x73a0
movl 0x80(%rbx), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x75f0
movq %rax, %r15
leaq 0x2890(%rip), %rsi      # 0x14d9d
movl $0x1, %edx
movq %rax, %rdi
callq 0x73a0
movl 0x84(%rbx), %esi
movq %r15, %rdi
callq 0x75f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r15, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
cmpl $0x0, 0x80(%rbx)
jle 0x12653
xorl %r12d, %r12d
leaq 0x28c9(%rip), %r13      # 0x14e32
leaq 0x282d(%rip), %rbp      # 0x14d9d
movl $0x8, %edx
movq %r14, %rdi
leaq 0x28a5(%rip), %rsi      # 0x14e24
callq 0x73a0
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movsd 0x10(%rax), %xmm0
movq %r14, %rdi
callq 0x7560
movq %rax, %r15
movl $0xe, %edx
movq %rax, %rdi
leaq 0x2896(%rip), %rsi      # 0x14e41
callq 0x73a0
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rax
movl 0xc(%rax), %esi
movq %r15, %rdi
callq 0x75f0
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x73a0
cmpl $0x0, 0x84(%rbx)
jle 0x12617
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rdi
movl %r15d, %esi
callq 0x128ac
movsd (%rax), %xmm0
movq %r14, %rdi
callq 0x7560
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x73a0
incl %r15d
cmpl 0x84(%rbx), %r15d
jl 0x125df
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x7320
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
incq %r12
movslq 0x80(%rbx), %rax
cmpq %rax, %r12
jl 0x12570
leaq 0x8(%rsp), %rdi
callq 0x74b0
movq 0x8924(%rip), %rax      # 0x1af88
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x10(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x8(%rsp,%rcx)
callq 0x72d0
leaq 0x100(%rsp), %rdi
callq 0x7120
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x126a5
jmp 0x126a5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x74e0
movq %rbx, %rdi
callq 0x7620