LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/waket[P]ThreadPool/ThreadPoolTask.cpp
// Function: ThreadPoolTask::doTask(boost::function<void ()> const&)
bool ThreadPoolTask::doTask(const TaskItem& task) {
    //Lock by mutex before getting the value of isShutdown
    stopMutex.lock();
    if (isShutdown ) {
        stopMutex.unlock();
        return false;
    }
    
    // TO ALLOW ADDING TASK EVEN IF IT IS NOT STARTED YET
    // Comment the next 4 lines.
    if (!started()) {
        stopMutex.unlock();
        return false;
    }
    stopMutex.unlock();

    //Lock by mutex before queuing the task
    tasksMutex.lock();
    tasksDeque.push_back(task);
    cout << "\tadd. Size of the task queue is: " << tasksDeque.size() << endl;
    // wakeup one worker that is waiting for a task to be available
    tasksCond.signal();
    tasksMutex.unlock();
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r15
leaq 0xf0(%rdi), %r14
movq %r14, %rdi
callq 0x3936
movb 0x151(%r15), %bl
testb %bl, %bl
jne 0x361f
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
movl %eax, %ebp
movq %r14, %rdi
callq 0x3946
testb %bpl, %bpl
je 0x362c
leaq 0x90(%r15), %r14
movq %r14, %rdi
callq 0x3936
leaq 0x10(%r15), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x39f6
movq 0x49f2(%rip), %rdi      # 0x7fd8
leaq 0x1e97(%rip), %rsi      # 0x5484
callq 0x21a0
movq %rax, %r12
movq %r13, %rdi
callq 0x3950
movq %r12, %rdi
movq %rax, %rsi
callq 0x2100
movq %rax, %rdi
callq 0x20a0
addq $0xc0, %r15
movq %r15, %rdi
callq 0x2030
xorb $0x1, %bl
movq %r14, %rdi
callq 0x3946
jmp 0x362e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/waket[P]ThreadPool/ThreadPoolTask.cpp
// Function: ThreadPoolTask::wait()
bool ThreadPoolTask::wait() {
    //Lock by mutex before getting  the value of isShutdown
    stopMutex.lock();
    if(isShutdown) { //Don't wait. The Thread pool is already stopped
        assert(!isStarted);
        stopMutex.unlock();
        return true;
    }
     //Wait til the thread pool stops all the workers
    stopCond.wait(stopMutex.mutexPtr());
    stopMutex.unlock();
    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xf0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3936
cmpb $0x1, 0x151(%r14)
jne 0x3691
cmpb $0x1, 0x150(%r14)
jne 0x36a3
leaq 0x1e2d(%rip), %rdi      # 0x54a6
leaq 0x1cf1(%rip), %rsi      # 0x5371
leaq 0x1e2a(%rip), %rcx      # 0x54b1
movl $0xb6, %edx
callq 0x20f0
addq $0x120, %r14            # imm = 0x120
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2270
movq %rbx, %rdi
callq 0x3946
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/waket[P]ThreadPool/ThreadPoolTask.cpp
// Function: ThreadPoolTask::requestStop()
bool ThreadPoolTask::requestStop() {
    //Lock by mutex to avoid scheduling successive requestStop
    stopMutex.lock();
    if(isShutdown) { //Nothing to do. The thread pool is already stopped
        assert(!isStarted);
        stopMutex.unlock();
        return true;
    }
    stopMutex.unlock();
    //Stop all workers by creating new thread for asynchronous purpose
    pthread_t pth;
    if (pthread_create(&pth, NULL, stop_workers, (void*) this) != 0) {
        cout << "\tFailed to create thread to stop all the workers" << endl;
        return false;
    }
    return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xf0(%rdi), %r14
movq %r14, %rdi
callq 0x3936
cmpb $0x1, 0x151(%rbx)
jne 0x36f4
cmpb $0x1, 0x150(%rbx)
je 0x373c
movq %r14, %rdi
callq 0x3946
movb $0x1, %bl
jmp 0x3732
movq %r14, %rdi
callq 0x3946
leaq -0x4e(%rip), %rdx       # 0x36b5
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2300
testl %eax, %eax
sete %bl
je 0x3732
movq 0x48ba(%rip), %rdi      # 0x7fd8
leaq 0x1dcb(%rip), %rsi      # 0x54f0
callq 0x21a0
movq %rax, %rdi
callq 0x20a0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1d63(%rip), %rdi      # 0x54a6
leaq 0x1c27(%rip), %rsi      # 0x5371
leaq 0x1d7c(%rip), %rcx      # 0x54cd
movl $0xcb, %edx
callq 0x20f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/waket[P]ThreadPool/ThreadPoolTask.cpp
// Function: ThreadPoolTask::setWorkerCount(unsigned long)
bool ThreadPoolTask::setWorkerCount(size_t dynWorkerCount) {
    //Lock by mutex to avoid scheduling successive requestStop
    stopMutex.lock();
    if(isShutdown || dynWorkerCount == workersSet.size()) { //Nothing to do
        assert(!isStarted);
        stopMutex.unlock();
        return true;
    }

    if (dynWorkerCount > workersSet.size()) {
        workerCount = dynWorkerCount;
        startWorkersMutex.lock();
        //Start new worker by creating new thread
        for (unsigned int i = 0; i < dynWorkerCount - workersSet.size(); i++) {
            pthread_t pth;
            if (pthread_create(&pth, NULL, start_worker, (void*) this) != 0) {
                cout << "\tFailed to create new worker" << endl;
                stopMutex.unlock();
                startWorkersMutex.unlock();
                return false;
            }
        }
        startWorkersCond.wait(startWorkersMutex.mutexPtr());
        startWorkersMutex.unlock();
    } else {
        workerCount = dynWorkerCount;
        isStopWorker = true;
        // wakeup a worker to exit
        tasksCond.signal();
        stopWorkersMutex.lock();
        // wait till all unnecessary workers exit
        stopWorkersCond.wait(stopWorkersMutex.mutexPtr());
        stopWorkersMutex.unlock();
    }
    assert(workerCount == workersSet.size());
    stopMutex.unlock();
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq 0xf0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3936
cmpb $0x0, 0x151(%r14)
jne 0x3792
cmpq %r12, 0x88(%r14)
jne 0x37bf
cmpb $0x1, 0x150(%r14)
jne 0x3865
leaq 0x1cff(%rip), %rdi      # 0x54a6
leaq 0x1bc3(%rip), %rsi      # 0x5371
leaq 0x1d6c(%rip), %rcx      # 0x5521
movl $0xdd, %edx
callq 0x20f0
movq %r12, 0x8(%r14)
jae 0x3810
leaq 0x158(%r14), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3936
xorl %r15d, %r15d
leaq -0x907(%rip), %r13      # 0x2ed9
leaq 0x10(%rsp), %rbp
movl %r15d, %eax
movq %r12, %rcx
subq 0x88(%r14), %rcx
cmpq %rax, %rcx
jbe 0x383c
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r14, %rcx
callq 0x2300
testl %eax, %eax
jne 0x387e
incl %r15d
jmp 0x37e5
movb $0x1, 0x152(%r14)
leaq 0xc0(%r14), %rdi
callq 0x2030
leaq 0x1b8(%r14), %r15
movq %r15, %rdi
callq 0x3936
leaq 0x1e8(%r14), %rdi
jmp 0x3848
leaq 0x188(%r14), %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
callq 0x2270
movq %r15, %rdi
callq 0x3946
movq 0x8(%r14), %rax
cmpq 0x88(%r14), %rax
jne 0x38af
movq %rbx, %rdi
callq 0x3946
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4753(%rip), %rdi      # 0x7fd8
leaq 0x19cb(%rip), %rsi      # 0x5257
callq 0x21a0
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x3946
movq 0x8(%rsp), %rdi
callq 0x3946
xorl %eax, %eax
jmp 0x386f
leaq 0x1c97(%rip), %rdi      # 0x554d
leaq 0x1ab4(%rip), %rsi      # 0x5371
leaq 0x1c5d(%rip), %rcx      # 0x5521
movl $0xfb, %edx
callq 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/waket[P]ThreadPool/./ThreadPoolTask.h
// Function: Mutex::~Mutex()
~Mutex() {
        // It shall be safe to destroy an initialized mutex that is unlocked.
        // Attempting to destroy a locked mutex results in undefined behavior.
        if (isLocked) {
            unlock();
        }
        pthread_mutex_destroy(&mutxLock);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x28(%rdi), %al
cmpb $0x1, %al
jne 0x38e1
movq %rbx, %rdi
callq 0x3946
movq %rbx, %rdi
popq %rbx
jmp 0x2200
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/main.cpp
// Function: main
int main () {
    // set up for multithreading
    XInitThreads();

    Resources resources;
    XHandler xhandler(&resources);

    /*
    updateSize(xhandler.windowAttributes());
    Tower::setDelay(2);
    Missile::setDelay(2);
    Bomb::setDelay(4);

    xhandler.setShowCredit(true);
    */

    pthread_mutex_t mutex;
    pthread_mutex_init(&mutex, NULL);

    // dispatch rendering thread
    RenderArg renderArg = { &resources, &xhandler, &mutex };
    pthread_t renderT;
    pthread_create(&renderT, NULL, render, static_cast<void*>(&renderArg));

    // dispatch events thread
    EventsArg eventsArg = { &resources, &xhandler, &mutex };
    pthread_t eventsT;
    pthread_create(&eventsT, NULL, events, static_cast<void*>(&eventsArg));

    // dispatch controlling thread
    ControlArg controlArg = { &resources, &xhandler, &mutex };
    pthread_t controlT;
    pthread_create(&controlT, NULL, control, static_cast<void*>(&controlArg));

    xhandler.setShowCredit(true);
    usleep(1000 * 2000);
    xhandler.setShowCredit(false);

    /*
    // cleans credit screen
    usleep(1000 * 1000 * 2);
    xhandler.setShowCredit(false);
    */

    // join threads
    pthread_join(renderT,  NULL);
    pthread_join(eventsT,  NULL);
    pthread_join(controlT, NULL);

    pthread_mutex_destroy(&mutex);

    return 0;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
callq 0x2180
leaq 0x188(%rsp), %rbx
movq %rbx, %rdi
callq 0x27c4
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2de0
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x22a0
leaq 0x78(%rsp), %rcx
movq %rbx, (%rcx)
movq %r14, 0x8(%rcx)
movq %r15, 0x10(%rcx)
leaq 0x12de(%rip), %rdx      # 0x39b4
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2370
leaq 0x60(%rsp), %rcx
movq %rbx, (%rcx)
movq %r14, 0x8(%rcx)
movq %r15, 0x10(%rcx)
leaq 0x1543(%rip), %rdx      # 0x3c3c
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2370
leaq 0x48(%rsp), %rcx
movq %rbx, (%rcx)
movq %r14, 0x8(%rcx)
movq %r15, 0x10(%rcx)
leaq 0x1ed4(%rip), %rdx      # 0x45f0
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x2370
movb $0x1, 0x180(%rsp)
movl $0x1e8480, %edi         # imm = 0x1E8480
callq 0x2270
movb $0x0, 0x180(%rsp)
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x21c0
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x21c0
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x21c0
leaq 0x20(%rsp), %rdi
callq 0x2210
leaq 0x90(%rsp), %rdi
callq 0x3264
leaq 0x188(%rsp), %rdi
callq 0x2862
xorl %eax, %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x27ae
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x3264
leaq 0x188(%rsp), %rdi
callq 0x2862
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/tower.cpp
// Function: Tower::draw(XInfo*, int)
void Tower::draw (XInfo *xinfo, int x) {
    int y = y_ / ScaleY;
    int height = Tower::Size::h() / ScaleY;

    // temporary fix
    // adjust y to align properly along bottom of screen
    y = xinfo->attr_.height - numBlocks_ * height;

    for (int i = 0; i < numBlocks_ ; ++i) {
        reinterpret_cast<Fill&>(*this).draw<attr::NAVAJO>(xinfo, x, y + i * height);
        Draw::draw<attr::BLACK>(xinfo, x, y + i * height);
        if (!i && hasLauncher_) {
            // draw launcher
            launcher_.draw<attr::GREY>(
                    xinfo,
                    x + ((Tower::Size::w() - MLauncher::Size::w()) / 2) / ScaleX,
                    y);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cvtsi2sdl 0x6888(%rip), %xmm0 # 0x91ec
leaq 0x6895(%rip), %rax      # 0x9200
divsd (%rax), %xmm0
cvttsd2si %xmm0, %r12d
movl 0x24(%rsi), %r13d
movl 0x8(%rdi), %eax
movl %eax, %ecx
imull %r12d, %ecx
subl %ecx, %r13d
leaq 0xc(%rdi), %rcx
movq %rcx, 0x10(%rsp)
cvtsi2sd %edx, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
movl %r13d, 0x4(%rsp)
cmpl %eax, %ebp
jge 0x2a14
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x2bda
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x2be6
testl %ebp, %ebp
jne 0x2a09
cmpb $0x1, 0xd(%r15)
jne 0x2a09
movl 0x6815(%rip), %eax      # 0x91e8
subl 0x6807(%rip), %eax      # 0x91e0
cltd
pushq $0x2
popq %rcx
idivl %ecx
cvtsi2sd %eax, %xmm0
leaq 0x680e(%rip), %rax      # 0x91f8
divsd (%rax), %xmm0
addsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movl 0x4(%rsp), %ecx
callq 0x2bf2
incl %ebp
movl 0x8(%r15), %eax
addl %r12d, %r13d
jmp 0x299e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/tower.cpp
// Function: TowerList::addTower()
void TowerList::addTower () {
    int h = rand() % 10 + 1;
    int m = rand() % 5;
    bool mlauncher = false;

    if (!m) {
        mlauncher = true;
    }

    towers_.push_back(Tower(PLANE_W,
                            PLANE_H - h * Tower::Size::h(),
                            h,
                            mlauncher));
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x2060
pushq $0xa
popq %rcx
cltd
idivl %ecx
movl %edx, %ebp
incl %ebp
callq 0x2060
pushq $0x5
popq %rcx
cltd
idivl %ecx
movl 0x6747(%rip), %eax      # 0x91ec
imull %ebp, %eax
movl $0xbb8, %ecx            # imm = 0xBB8
subl %eax, %ecx
testl %edx, %edx
leaq 0x8(%rsp), %rsi
movl $0xfa0, (%rsi)          # imm = 0xFA0
movl %ecx, 0x4(%rsi)
movl %ebp, 0x8(%rsi)
sete 0xd(%rsi)
movq %rbx, %rdi
callq 0x2c0c
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/tower.cpp
// Function: TowerList::draw(XInfo*)
void TowerList::draw (XInfo *xinfo) {
    TowerList::Towers::iterator first = towers_.begin();
    int firstx = first->x() / Tower::ScaleX;
    int firstw = Tower::Size::w() / Tower::ScaleX;
    for (TowerList::Towers::iterator itr = towers_.begin();
         itr != towers_.end();
         ++itr) {
        itr->draw(xinfo, firstx);
        firstx += firstw;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
cvtsi2sdl 0x10(%r15), %xmm0
leaq 0x6707(%rip), %rax      # 0x91f8
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ebp
cvtsi2sdl 0x66e3(%rip), %xmm0 # 0x91e8
movq %rsi, %r14
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12d
cmpq %rbx, %r15
je 0x2b2c
leaq 0x10(%r15), %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2946
addl %r12d, %ebp
movq (%r15), %r15
jmp 0x2b11
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/tower.cpp
// Function: TowerList::move()
void TowerList::move () {
    Towers::iterator last  = --towers_.end();
    Towers::iterator first = towers_.begin();
    Towers::iterator itr = towers_.begin();

    if (last->x() <= PLANE_W - Tower::Size::w()) {
        addTower();
    }

    for (; itr != towers_.end(); ++itr) {
        itr->setX(itr->x() - Tower::speed());
    }

    if (first->x() <= 0) {
        towers_.erase(first);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %rax
movl $0xfa0, %ecx            # imm = 0xFA0
subl 0x6699(%rip), %ecx      # 0x91e8
cmpl %ecx, 0x10(%rax)
jg 0x2b5c
movq %r14, %rdi
callq 0x2a7c
movl 0x668e(%rip), %eax      # 0x91f0
movq %rbx, %rcx
cmpq %r14, %rcx
je 0x2b72
subl %eax, 0x10(%rcx)
movq (%rcx), %rcx
jmp 0x2b65
cmpl $0x0, 0x10(%rbx)
jle 0x2b80
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2bfe
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/tower.cpp
// Function: TowerList::fire(MissileList&)
void TowerList::fire (MissileList &mlist) {
    for (Towers::iterator itr = towers_.begin();
         itr != towers_.end();
         ++itr) {
        if (itr->hasLauncher() && !(rand() % 100)) {
            itr->fire(mlist);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x64
popq %rbp
movq %rdi, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x2bce
cmpb $0x1, 0x1d(%r15)
jne 0x2ba5
callq 0x2060
cltd
idivl %ebp
testl %edx, %edx
jne 0x2ba5
leaq 0x10(%r15), %rdi
movq %rbx, %rsi
callq 0x2a24
jmp 0x2ba5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/attributes_impl.h
// Function: void Attributes::DrawableImpl<Tower, Attributes::Rectangle>::drawImpl<(Attributes::Color)7>(XInfo*, int, int, int (*)(_XDisplay*, unsigned long, _XGC*, int, int, unsigned int, unsigned int))
void drawImpl (XInfo *xinfo, int x, int y, Draw draw) {
        Display *display = xinfo->display_;
        Pixmap   buffer  = xinfo->buffer_;
        GC       gcColor = pickColor(xinfo, color);

        draw(display, buffer, gcColor,
             x,
             y,
             self.w() / ScaleX,
             self.h() / ScaleY);
    }

// Assembly:
pushq %rax
movq %r8, %rax
movl %ecx, %r8d
movl %edx, %ecx
movq (%rsi), %rdi
movq 0xa0(%rsi), %r10
cvtsi2sdl 0x65b5(%rip), %xmm0 # 0x91e8
leaq 0x65be(%rip), %rdx      # 0x91f8
divsd (%rdx), %xmm0
cvttsd2si %xmm0, %r9
movq 0xe0(%rsi), %rdx
cvtsi2sdl 0x659a(%rip), %xmm0 # 0x91ec
leaq 0x65a7(%rip), %rsi      # 0x9200
divsd (%rsi), %xmm0
cvttsd2si %xmm0, %rsi
movl %esi, (%rsp)
movq %r10, %rsi
callq *%rax
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/x_handler.cpp
// Function: XHandler::draw()
void XHandler::draw () {
    if (!showCredit_) {
        drawBombs();
        drawHeli();
        drawTowers();
        drawMissiles();
        drawExplosions();

        drawHealthBar();
        drawScore();
    }
    else {
        drawCredits();
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0xf0(%rdi)
je 0x3282
movq %rbx, %rdi
popq %rbx
jmp 0x3344
movq %rbx, %rdi
callq 0x32bc
movq %rbx, %rdi
callq 0x32cc
movq %rbx, %rdi
callq 0x32e0
movq %rbx, %rdi
callq 0x32f4
movq %rbx, %rdi
callq 0x3308
movq %rbx, %rdi
callq 0x331c
movq %rbx, %rdi
popq %rbx
jmp 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/x_handler.cpp
// Function: XHandler::updateAttr(XWindowAttributes*)
void XHandler::updateAttr (XWindowAttributes *attr) {
    xinfo_.attr_ = *attr;

    int depth = DefaultDepth(xinfo_.display_, xinfo_.screen_);
    XFreePixmap(xinfo_.display_, xinfo_.buffer_);
    xinfo_.buffer_ = XCreatePixmap(
            xinfo_.display_, xinfo_.window_,
            attr->width, attr->height, depth);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rdi
movl $0x88, %edx
callq 0x2170
movq 0x8(%rbx), %rdi
movq 0xa8(%rbx), %rsi
movq 0xe8(%rdi), %rax
movslq 0x10(%rbx), %rcx
shlq $0x7, %rcx
movl 0x38(%rax,%rcx), %ebp
callq 0x2350
movq 0x8(%rbx), %rdi
movq 0x18(%rbx), %rsi
movl 0x8(%r14), %edx
movl 0xc(%r14), %ecx
movl %ebp, %r8d
callq 0x2050
movq %rax, 0xa8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/x_handler.cpp
// Function: XHandler::refresh()
void XHandler::refresh () {
    Display           *display = xinfo_.display_;
    Window            &window  = xinfo_.window_;
    Pixmap            &buffer  = xinfo_.buffer_;
    GC                &draw    = xinfo_.black_;
    GC                &erase   = xinfo_.blue_;
    XWindowAttributes &attr    = xinfo_.attr_;

    unsigned int winW = attr.width;
    unsigned int winH = attr.height;

    XCopyArea(display, buffer, window, draw, 0, 0, winW, winH, 0, 0);
    XFlush(display);

    // clear buffer
    XFillRectangle(display, buffer, erase, 0, 0, winW, winH);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl 0x28(%rdi), %ebx
movl 0x2c(%rdi), %ebp
movq 0xa8(%rdi), %rsi
movq 0x8(%rdi), %r15
movq 0x18(%rdi), %rdx
movq 0xb0(%rdi), %rcx
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movl %ebp, 0x8(%rsp)
movl %ebx, (%rsp)
movq %r15, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x20c0
movq %r15, %rdi
callq 0x22c0
movq 0xa8(%r14), %rsi
movq 0xe0(%r14), %rdx
movl %ebp, (%rsp)
movq %r15, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebx, %r9d
callq 0x2398
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/x_handler.cpp
// Function: render(void*)
void render (RenderArg *renderArg) {
    XHandler *xhandler  = renderArg->xhandler_;
    pthread_mutex_t *mutex = renderArg->mutex_;

    while (true) {
        if (pthread_mutex_lock(mutex) == -1) {
            error("cannot lock mutex in render thread");
        }

        xhandler->draw();

        if (pthread_mutex_unlock(mutex) == -1) {
            error("cannot unlock mutex in render thread");
        }

        xhandler->refresh();
        usleep(1000 * REFRESH_RATE);
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x8(%rdi), %rbx
movq 0x10(%rdi), %r14
leaq 0x28(%rsp), %r12
leaq 0x7(%rsp), %r13
leaq 0x27f0(%rip), %rbp      # 0x61cb
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x2290
cmpl $-0x1, %eax
jne 0x3a0f
movq %r12, %rdi
leaq 0x27b1(%rip), %rsi      # 0x61a8
movq %r13, %rdx
callq 0x3a9c
movq %r12, %rdi
callq 0x3a7c
movq %r12, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x326c
movq %r14, %rdi
callq 0x2140
cmpl $-0x1, %eax
jne 0x3a42
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x3a9c
movq %r15, %rdi
callq 0x3a7c
movq %r15, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x3938
movl $0x3a98, %edi           # imm = 0x3A98
callq 0x2270
jmp 0x39e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x3a68
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20b0
jmp 0x3a74
jmp 0x3a71
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/x_resources.h
// Function: setupGC(XInfo&, _XGC*&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
inline
void setupGC (XInfo &xinfo, GC &target, std::string color) {
    // init values for the GC
    XGCValues values;
    values.cap_style = CapButt;
    values.join_style = JoinBevel;

    // which values to check when creating the GC
    unsigned long valuemask = GCCapStyle | GCJoinStyle;

    Colormap colormap = DefaultColormap(xinfo.display_, DefaultScreen(xinfo.display_));
    XColor c;

    target = XCreateGC(xinfo.display_, xinfo.window_, valuemask, &values);

    XAllocNamedColor(xinfo.display_, colormap, color.c_str(), &c, &c);

    XSetForeground(
            xinfo.display_,
            target,
            c.pixel);

    XSetBackground(
            xinfo.display_,
            target,
            BlackPixel(xinfo.display_, xinfo.screen_));

    XSetFillStyle(xinfo.display_, target, FillSolid);

    XSetLineAttributes(
            xinfo.display_, target,
            2,              // line width
            LineSolid,      // line drawing style
            CapRound,       // cap drawing style (line'end)
            JoinRound);     // lines join style


}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movabsq $0x200000001, %rax      # imm = 0x200000001
leaq 0x18(%rsp), %rcx
movq %rax, 0x28(%rcx)
movq (%rdi), %rdi
movq 0xe8(%rdi), %rax
movslq 0xe0(%rdi), %rdx
shlq $0x7, %rdx
movq 0x50(%rax,%rdx), %r12
movq 0x10(%r14), %rsi
movl $0xc0, %edx
callq 0x20f0
movq %rax, (%rbx)
movq (%r14), %rdi
movq (%r15), %rdx
leaq 0x8(%rsp), %r15
movq %r12, %rsi
movq %r15, %rcx
movq %r15, %r8
callq 0x2230
movq (%r14), %rdi
movq (%rbx), %rsi
movq (%r15), %rdx
callq 0x2080
movq (%r14), %rdi
movq (%rbx), %rsi
movq 0xe8(%rdi), %rax
movslq 0x8(%r14), %rcx
shlq $0x7, %rcx
movq 0x60(%rax,%rcx), %rdx
callq 0x2240
movq (%r14), %rdi
movq (%rbx), %rsi
xorl %edx, %edx
callq 0x2030
movq (%r14), %rdi
movq (%rbx), %rsi
pushq $0x2
popq %rdx
pushq $0x1
popq %r9
xorl %ecx, %ecx
movl %edx, %r8d
callq 0x22f0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/bomb.cpp
// Function: Bomb::draw(XInfo*, int, int)
void Bomb::draw (XInfo *xinfo, int x, int y) {
    int tx = x + (BombBtm::w() - BombTop::w()) / 2;
    int mx = x + (BombBtm::w() - BombMid::w()) / 2;
    int bx = x;

    int ty = y;
    int my = ty + BombTop::h() * 0.8;
    int by = my + BombMid::h() * 0.8;

    top_.draw<attr::BROWN>(xinfo,
                           tx / Bomb::ScaleX,
                           ty / Bomb::ScaleY);

    mid_.draw<attr::BROWN>(xinfo,
                           mx / Bomb::ScaleX,
                           my / Bomb::ScaleY);

    btm_.draw<attr::BROWN>(xinfo,
                           bx / Bomb::ScaleX,
                           by / Bomb::ScaleY);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
cvtsi2sd %ecx, %xmm0
movsd 0x183f(%rip), %xmm1     # 0x62f8
addsd %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
leal 0x1e(%r15), %eax
cvtdq2pd %xmm1, %xmm1
movapd %xmm1, (%rsp)
addsd 0x182a(%rip), %xmm1     # 0x6300
movapd %xmm1, 0x10(%rsp)
cvtsi2sd %eax, %xmm1
leal 0xf(%r15), %ebp
leaq 0x470d(%rip), %r13      # 0x91f8
divsd (%r13), %xmm1
addq $0xc, %rdi
cvttsd2si %xmm1, %edx
leaq 0x4700(%rip), %r12      # 0x9200
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
callq 0x4c72
leaq 0xd(%r14), %rdi
cvtsi2sd %ebp, %xmm0
divsd (%r13), %xmm0
cvttsd2si %xmm0, %edx
movsd (%r12), %xmm0
movapd (%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
movq %rbx, %rsi
callq 0x4cd4
addq $0xe, %r14
cvtsi2sd %r15d, %xmm0
divsd (%r13), %xmm0
cvttsd2si %xmm0, %edx
cvttpd2dq 0x10(%rsp), %xmm0
cvtdq2pd %xmm0, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d36
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/bomb.cpp
// Function: BombList::draw(XInfo*)
void BombList::draw (XInfo *xinfo) {
    for (Bombs::iterator itr = bombs_.begin();
         itr != bombs_.end();
         ++itr) {
        itr->draw(xinfo, itr->x(), itr->y());
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x4bba
leaq 0x10(%r15), %rdi
movl 0x10(%r15), %edx
movl 0x14(%r15), %ecx
movq %rbx, %rsi
callq 0x4a96
jmp 0x4b9c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/bomb.cpp
// Function: BombList::move()
void BombList::move () {
    for (Bombs::iterator itr = bombs_.begin();
         itr != bombs_.end();
         ++itr) {

        if (itr->hasInertia() == Bomb::NUL) {
            itr->setX(itr->x() - Tower::speed() / 2);
        }
        else if (itr->hasInertia() == Bomb::FORWARD) {
            itr->setX(itr->x() - Tower::speed() / 3);
        }
        else {
            itr->setX(itr->x() - Tower::speed());
        }

        itr->setY(itr->y() + Bomb::speed());

        if (itr->y() > PLANE_H) {
            itr = bombs_.erase(itr);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x461f(%rip), %r14      # 0x91f0
pushq $-0x3
popq %rbp
pushq $-0x2
popq %r15
movq %rdi, %rsi
movq (%rsi), %rsi
cmpq %rbx, %rsi
je 0x4c29
movl 0x10(%rsi), %ecx
movl 0x18(%rsi), %edx
movl (%r14), %eax
cmpl $0x1, %edx
je 0x4bfb
testl %edx, %edx
jne 0x4c02
cltd
idivl %r15d
jmp 0x4bfe
cltd
idivl %ebp
addl %ecx, %eax
jmp 0x4c06
subl %eax, %ecx
movl %ecx, %eax
movl %eax, 0x10(%rsi)
movl 0x45fd(%rip), %eax      # 0x920c
addl 0x14(%rsi), %eax
movl %eax, 0x14(%rsi)
cmpl $0xbb9, %eax            # imm = 0xBB9
jl 0x4bdb
movq %rbx, %rdi
callq 0x4a36
movq %rax, %rsi
jmp 0x4bdb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/missile.cpp
// Function: MissileList::draw(XInfo*)
void MissileList::draw (XInfo *xinfo) {
    for (Missiles::iterator itr = missiles_.begin();
         itr != missiles_.end();
         ++itr) {
        int x = itr->x() / Missile::ScaleX;
        int y = itr->y() / Missile::ScaleY;
        itr->draw<attr::BLACK>(xinfo, x, y);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4376(%rip), %r15      # 0x91f8
leaq 0x4377(%rip), %r12      # 0x9200
movq %rdi, %r13
movq (%r13), %r13
cmpq %r14, %r13
je 0x4ec2
leaq 0x10(%r13), %rdi
cvtsi2sdl 0x10(%r13), %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
cvtsi2sdl 0x14(%r13), %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x4f4a
jmp 0x4e8c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/missile.cpp
// Function: MissileList::move()
void MissileList::move () {
    for (Missiles::iterator itr = missiles_.begin();
         itr != missiles_.end();
         ++itr) {

        itr->setX(itr->x() - Tower::speed());
        itr->setY(itr->y() - Missile::speed());

        if (itr->y() < 0) {
            itr = missiles_.erase(itr);
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4316(%rip), %r14      # 0x91f0
movq %rdi, %rax
movq (%rax), %rax
cmpq %rbx, %rax
je 0x4f03
movl (%r14), %ecx
subl %ecx, 0x10(%rax)
movl 0x4327(%rip), %ecx      # 0x9218
subl %ecx, 0x14(%rax)
jns 0x4edd
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4a60
jmp 0x4edd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/explosion.cpp
// Function: ExplosionList::draw(XInfo*)
void ExplosionList::draw (XInfo *xinfo) {
    for (Explosions::iterator itr = explosions_.begin();
         itr != explosions_.end();
         ++itr) {
        itr->draw(xinfo, itr->x(), itr->y());
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r15
movq (%r15), %r15
cmpq %r14, %r15
je 0x510e
leaq 0x10(%r15), %rdi
movl 0x10(%r15), %edx
movl 0x14(%r15), %ecx
movq %rbx, %rsi
callq 0x5080
jmp 0x50f0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/explosion.cpp
// Function: ExplosionList::move()
void ExplosionList::move () {
    for (Explosions::iterator itr = explosions_.begin();
         itr != explosions_.end();
         ++itr) {
        itr->setX(itr->x() - Tower::speed());
        itr->inflate();
        if (itr->w() > 300 &&
            itr->h() > 300) {
            itr = explosions_.erase(itr);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x40ce(%rip), %r14      # 0x91f0
movl $0x128, %ebp            # imm = 0x128
movq %rdi, %rax
movq (%rax), %rax
cmpq %rbx, %rax
je 0x5168
movl (%r14), %ecx
subl %ecx, 0x10(%rax)
movl 0x18(%rax), %ecx
movl 0x1c(%rax), %edx
leal 0x5(%rcx), %esi
movl %esi, 0x18(%rax)
leal 0x5(%rdx), %esi
movl %esi, 0x1c(%rax)
cmpl %ebp, %ecx
setge %cl
cmpl %ebp, %edx
setge %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x512a
movq %rbx, %rdi
movq %rax, %rsi
callq 0x519a
jmp 0x512a
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/misc.cpp
// Function: HealthBar::draw(XInfo*)
void HealthBar::draw (XInfo *xinfo) {
    frame_.draw<attr::BLACK>(xinfo,
                             x_ / ScaleX,
                             y_ / ScaleY);
    if (hp_ > 50) {
        Draw::draw<attr::GREEN>(xinfo,
                                (x_ + 20) / ScaleX,
                                (y_ + 20) / ScaleY);
    }
    else {
        Draw::draw<attr::RED>(xinfo,
                              (x_ + 20) / ScaleX,
                              (y_ + 20) / ScaleY);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cvtsi2sdl (%rdi), %xmm0
leaq 0x3eed(%rip), %r15      # 0x91f8
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
addq $0x14, %rdi
cvtsi2sdl 0x4(%r14), %xmm0
leaq 0x3edb(%rip), %r12      # 0x9200
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
callq 0x55b4
movl (%r14), %eax
movl 0x4(%r14), %ecx
addl $0x14, %eax
addl $0x14, %ecx
cmpl $0x33, 0x10(%r14)
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
cvtsi2sd %ecx, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %r14, %rdi
movq %rbx, %rsi
jl 0x5379
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5608
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5614
nop
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: isEmptyPath()
bool isEmptyPath()
{
    bool res;
    pthread_mutex_lock(&pathMutex);
    res = pathQueue.empty();
    pthread_mutex_unlock(&pathMutex);
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x5b36(%rip), %rbx      # 0x8320
movq %rbx, %rdi
callq 0x22a0
movq 0x5abf(%rip), %rax      # 0x82b8
cmpq 0x5a98(%rip), %rax      # 0x8298
sete %r14b
movq %rbx, %rdi
callq 0x2170
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: producer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void producer(const string fp)
{

    ifstream fileStream(fp);
    string line;

    while (getline(fileStream, line))
    {
        pthread_mutex_lock(&queueMutex);
        while (workQueue.size() >= maxQSize)
        {
            // Waiting for the work queue is not full
            pthread_cond_wait(&condQueue, &queueMutex);
        }

        // Add the line to end of work queue
        workQueue.push(line);

        // Wake up a waiting thread
        pthread_cond_signal(&condQueue);
        pthread_mutex_unlock(&queueMutex);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rsi
leaq -0x250(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x2310
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %r14
leaq 0x5af0(%rip), %r15      # 0x8348
leaq 0x59d9(%rip), %r12      # 0x8238
leaq 0x5b32(%rip), %r13      # 0x8398
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2080
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x28c1
movq %r15, %rdi
callq 0x22a0
movq %r12, %rdi
callq 0x3784
cmpq $0x2710, %rax           # imm = 0x2710
jb 0x28a4
movq %r13, %rdi
movq %r15, %rsi
callq 0x22c0
jmp 0x2887
movq %r12, %rdi
movq %r14, %rsi
callq 0x392e
movq %r13, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2170
jmp 0x2866
leaq -0x48(%rbp), %rdi
callq 0x23b8
leaq -0x250(%rbp), %rdi
callq 0x20a0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28ea
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x23b8
leaq -0x250(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: launchProducer(void*)
void *launchProducer(void *args)
{
    producerNum++;
    string fp;
    while (!isEmptyPath())
    {
        // ! Use trylock instead of lock to avoid blocking forever
        int getLockStu = pthread_mutex_trylock(&pathMutex);
        if (getLockStu != 0)
        {
            // Didn't get the lock
            continue;
        }

        fp = pathQueue.front();
        pathQueue.pop();

        pthread_mutex_unlock(&pathMutex);
        producer(fp);
    }
    producerNum--;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
lock
incl 0x59d8(%rip)            # 0x82f8
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x59e9(%rip), %rbx      # 0x8320
leaq -0x40(%rbp), %r14
leaq 0x5946(%rip), %r15      # 0x8288
leaq -0x60(%rbp), %r12
callq 0x27dc
testb %al, %al
jne 0x2997
movq %rbx, %rdi
callq 0x2070
testl %eax, %eax
jne 0x2946
movq 0x5936(%rip), %rsi      # 0x8298
movq %r14, %rdi
callq 0x2140
movq %r15, %rdi
callq 0x3a16
movq %rbx, %rdi
callq 0x2170
movq %r12, %rdi
movq %r14, %rsi
callq 0x2270
movq %r12, %rdi
callq 0x2814
movq %r12, %rdi
callq 0x23b8
jmp 0x2946
lock
decl 0x595a(%rip)            # 0x82f8
leaq -0x40(%rbp), %rdi
callq 0x23b8
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x23b8
jmp 0x29c7
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x23b8
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: isEmptyWork()
bool isEmptyWork()
{
    bool res;
    pthread_mutex_lock(&queueMutex);
    res = workQueue.empty();
    pthread_mutex_unlock(&queueMutex);
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x58e5(%rip), %rbx      # 0x8348
movq %rbx, %rdi
callq 0x22a0
movq 0x57f6(%rip), %rax      # 0x8268
cmpq 0x57cf(%rip), %rax      # 0x8248
sete %r14b
movq %rbx, %rdi
callq 0x2170
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: wordCount(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void wordCount(string line)
{
    cleanPunct(line);
    istringstream is(line);
    string word;
    while (is >> word)
    {
        toLowerCase(word);
        // Exclusive access to staREsult
        pthread_mutex_lock(&mutexMap);
        staResult[word]++;
        pthread_mutex_unlock(&mutexMap);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, %r14
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29d8
movq %rbx, %rdi
callq 0x23b8
leaq -0x1e0(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2340
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x40(%rbp), %r14
leaq 0x5887(%rip), %r15      # 0x8370
leaq 0x5710(%rip), %r12      # 0x8200
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b30
movq %r14, %rdi
callq 0x2a1e
movq %r15, %rdi
callq 0x22a0
movq %r12, %rdi
movq %r14, %rsi
callq 0x3a96
incl (%rax)
movq %r15, %rdi
callq 0x2170
jmp 0x2af0
leaq -0x40(%rbp), %rdi
callq 0x23b8
leaq -0x1e0(%rbp), %rdi
callq 0x2110
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x23b8
leaq -0x1e0(%rbp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: consumer(void*)
void *consumer(void *args)
{
    string line;
    // loop while producer is working or queue is not empty
    while (producerNum > 0 || !isEmptyWork())
    {
        pthread_mutex_lock(&queueMutex);
        while (producerNum > 0 && workQueue.empty())
        {
            // Wait for the producer to stop reading or the work queue is not empty
            pthread_cond_wait(&condQueue, &queueMutex);
        }

        if (!workQueue.empty())
        {
            // Only take strings when the work queue is not empty
            line = workQueue.front();
            workQueue.pop();
        }

        pthread_cond_signal(&condQueue); // Wake up a waiting thread
        pthread_mutex_unlock(&queueMutex);

        // Count words in this line
        wordCount(line);
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x57ab(%rip), %rbx      # 0x8348
leaq 0x57f4(%rip), %r14      # 0x8398
leaq -0x68(%rbp), %r15
leaq -0x48(%rbp), %r12
leaq 0x5685(%rip), %r13      # 0x8238
movl 0x573f(%rip), %eax      # 0x82f8
testl %eax, %eax
jg 0x2bc6
callq 0x2a55
testb %al, %al
jne 0x2c3d
movq %rbx, %rdi
callq 0x22a0
movl 0x5724(%rip), %ecx      # 0x82f8
movq 0x568d(%rip), %rax      # 0x8268
movq 0x5666(%rip), %rsi      # 0x8248
testl %ecx, %ecx
jle 0x2bf8
cmpq %rsi, %rax
jne 0x2bf8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22c0
jmp 0x2bce
cmpq %rsi, %rax
je 0x2c0d
movq %r12, %rdi
callq 0x2140
movq %r13, %rdi
callq 0x3a16
movq %r14, %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2170
movq %r15, %rdi
movq %r12, %rsi
callq 0x2270
movq %r15, %rdi
callq 0x2a8d
movq %r15, %rdi
callq 0x23b8
jmp 0x2bb3
leaq -0x48(%rbp), %rdi
callq 0x23b8
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x23b8
jmp 0x2c6a
jmp 0x2c67
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x23b8
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: sortWords()
void sortWords()
{
    auto iter = staResult.begin();
    while (iter != staResult.end())
    {
        wordsRank.push(make_pair(iter->second, iter->first));
        iter++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x557f(%rip), %r12      # 0x8210
leaq -0x40(%rbp), %rbx
leaq -0x48(%rbp), %r14
leaq 0x5638(%rip), %r15      # 0x82d8
movq (%r12), %r12
testq %r12, %r12
je 0x2cd0
leaq 0x8(%r12), %rdx
leaq 0x28(%r12), %rsi
movq %r14, %rdi
callq 0x34b8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3186
movq %rbx, %rdi
callq 0x23b8
jmp 0x2ca0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x23b8
movq %r14, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: printHotWords()
void printHotWords()
{
    // Print title
    printf("%-10s%-20s%-10s\n", "RANK", "KEY WORDS", "FREQUENCY");
    for (int i = 1; i <= printNum && !wordsRank.empty(); i++)
    {
        cout << setiosflags(ios::left)
             << setw(10) << i << setw(20) << wordsRank.top().second
             << setw(10) << wordsRank.top().first << endl;
        wordsRank.pop();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x2394(%rip), %rdi      # 0x5096
leaq 0x239e(%rip), %rsi      # 0x50a7
leaq 0x239c(%rip), %rdx      # 0x50ac
leaq 0x239f(%rip), %rcx      # 0x50b6
xorl %eax, %eax
callq 0x2050
pushq $0x1
popq %rbx
movq 0x52a8(%rip), %r14      # 0x7fd0
pushq $0xa
popq %r12
leaq 0x55a5(%rip), %r15      # 0x82d8
cmpl $0xb, %ebx
je 0x2dc3
movq 0x5595(%rip), %rax      # 0x82d8
cmpq 0x5596(%rip), %rax      # 0x82e0
je 0x2dc3
movq (%r14), %rax
movq -0x18(%rax), %rcx
orl $0x20, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r12, 0x10(%r14,%rax)
movq %r14, %rdi
movl %ebx, %esi
callq 0x2350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x14, 0x10(%rax,%rcx)
movq 0x5555(%rip), %rsi      # 0x82d8
addq $0x8, %rsi
movq %rax, %rdi
callq 0x21a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r12, 0x10(%rax,%rcx)
movq 0x5536(%rip), %rcx      # 0x82d8
movl (%rcx), %esi
movq %rax, %rdi
callq 0x2350
movq %rax, %rdi
callq 0x2120
movq %r15, %rdi
callq 0x31a6
incl %ebx
jmp 0x2d33
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunpihai-up[P]MulThreadsWordsCounter/WordsCounter-v3.cpp
// Function: threadLauncher(std::vector<unsigned long*, std::allocator<unsigned long*>>&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void threadLauncher(std::vector<pthread_t *> &threadGroup, int cores, string &path)
{
    getFiles(path);
    for (int i = 0; i < cores / 2; i++)
    {
        threadGroup.push_back(new pthread_t);
        pthread_create(threadGroup[i], NULL, launchProducer, NULL);
    }

    for (int i = cores / 2; i < cores; i++)
    {
        threadGroup.push_back(new pthread_t);
        pthread_create(threadGroup[i], NULL, consumer, NULL);
    }

    for (int i = 0; i < threadGroup.size(); i++)
    {
        pthread_join(*threadGroup[i], NULL);
        free(threadGroup[i]);
        threadGroup[i] = NULL;
    }

    sortWords();
    printHotWords();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x58(%rbp), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2270
movq %r14, %rdi
callq 0x25cc
leaq -0x58(%rbp), %rdi
callq 0x23b8
pushq $0x2
popq %rcx
movl %r15d, -0x38(%rbp)
movl %r15d, %eax
cltd
idivl %ecx
xorl %r15d, %r15d
testl %eax, %eax
movl $0x0, %r12d
movl %eax, -0x34(%rbp)
cmovgl %eax, %r12d
leaq -0x30(%rbp), %r13
leaq -0x523(%rip), %r14      # 0x290a
cmpq %r15, %r12
je 0x2e61
pushq $0x8
popq %rdi
callq 0x2200
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x44d0
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x2370
incq %r15
jmp 0x2e2d
movslq -0x34(%rbp), %r13
movslq -0x38(%rbp), %r14
leaq -0x30(%rbp), %r15
leaq -0x2ff(%rip), %r12      # 0x2b75
cmpq %r14, %r13
jge 0x2ea8
pushq $0x8
popq %rdi
callq 0x2200
movq %rax, -0x30(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x44d0
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x2370
incq %r13
jmp 0x2e74
xorl %r14d, %r14d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
jbe 0x2ee5
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x21b0
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2210
movq (%rbx), %rax
andq $0x0, (%rax,%r14,8)
incq %r14
jmp 0x2eab
callq 0x2c7b
callq 0x2cf0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x23b8
movq %rbx, %rdi
callq 0x2360