LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/waket[P]ThreadPool/main.cpp
// Function: hello()
void hello () {
    int time = random() % 8;
    cout << "\t\tHello ... " << time << " ...." << endl;
    sleep(time);
    cout << "\t\tHello ... " << time << " DONE" << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x20d0
movq %rax, %rbx
addl $0x7, %eax
testq %rbx, %rbx
cmovnsl %ebx, %eax
andl $-0x8, %eax
subl %eax, %ebx
movq 0x5ac7(%rip), %r14      # 0x7fd8
leaq 0x2b00(%rip), %r15      # 0x5018
movl $0xc, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movq %r14, %rdi
movl %ebx, %esi
callq 0x2310
movq %rax, %r12
leaq 0x2ae9(%rip), %rsi      # 0x5025
movl $0x5, %edx
movq %rax, %rdi
callq 0x2220
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl %ebx, %edi
callq 0x2140
movl $0xc, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2220
movq %r14, %rdi
movl %ebx, %esi
callq 0x2310
movq %rax, %rbx
leaq 0x2af6(%rip), %rsi      # 0x5092
movl $0x5, %edx
movq %rax, %rdi
callq 0x2220
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/waket[P]ThreadPool/ThreadPoolTask.cpp
// Function: ThreadPoolTask::start()
bool ThreadPoolTask::start() {
    startWorkersMutex.lock();
    isStarted = true;
    isStopWorker = false;
    for (int i = 0; i < workerCount; i++) {
        pthread_t pth;
        if (pthread_create(&pth, NULL, start_worker, (void*) this) != 0) {
            cout << "\tFailed to create new worker" << endl;
            isStarted = false;
            startWorkersMutex.unlock();
            return false;
        }
    }
    // Lock and wait till all the workers start
    cout << "\tLock and wait for All workers to get started" << endl;
    startWorkersCond.wait(startWorkersMutex.mutexPtr());
    startWorkersMutex.unlock();

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x158(%rdi), %rbx
movq %rbx, %rdi
callq 0x2290
movb $0x1, %al
movb %al, 0x180(%r14)
movb %al, 0x150(%r14)
movb $0x0, 0x152(%r14)
cmpq $0x0, 0x8(%r14)
sete %bpl
je 0x3ae5
leaq -0x6b6(%rip), %rdx      # 0x3391
movq %rsp, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x2340
testl %eax, %eax
jne 0x3a86
xorl %r13d, %r13d
leaq -0x6d1(%rip), %r15      # 0x3391
movq %rsp, %r12
incq %r13
cmpq %r13, 0x8(%r14)
setbe %bpl
jbe 0x3ae5
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2340
testl %eax, %eax
je 0x3a65
movq 0x454b(%rip), %r15      # 0x7fd8
leaq 0x17c7(%rip), %rsi      # 0x525b
movl $0x1c, %edx
movq %r15, %rdi
callq 0x2220
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
xorl %eax, %eax
movb %al, 0x150(%r14)
movb %al, 0x180(%r14)
movq %rbx, %rdi
callq 0x2150
testb %bpl, %bpl
je 0x3b46
movq 0x44ec(%rip), %r15      # 0x7fd8
leaq 0x1785(%rip), %rsi      # 0x5278
movl $0x2d, %edx
movq %r15, %rdi
callq 0x2220
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
leaq 0x188(%r14), %rdi
movq %rbx, %rsi
callq 0x22b0
movb $0x0, 0x180(%r14)
movq %rbx, %rdi
callq 0x2150
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
leaq 0xf0(%rdi), %r15
movq %r15, %rdi
callq 0x2290
movb $0x1, 0x118(%r14)
movb 0x151(%r14), %bl
testb %bl, %bl
je 0x3e2d
addq $0x118, %r14            # imm = 0x118
jmp 0x3f13
movq (%r14), %rax
movq %r14, %rdi
callq *0x20(%rax)
movl %eax, %ebp
movb $0x0, 0x118(%r14)
movq %r15, %rdi
callq 0x2150
testb %bpl, %bpl
je 0x3f24
leaq 0x90(%r14), %r15
movq %r15, %rdi
callq 0x2290
leaq 0xb8(%r14), %r13
movb $0x1, 0xb8(%r14)
leaq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x43f4
movq 0x4156(%rip), %r12      # 0x7fd8
leaq 0x15ff(%rip), %rsi      # 0x5488
movl $0x21, %edx
movq %r12, %rdi
callq 0x2220
movq 0x58(%r14), %rax
movq %rax, %rcx
subq 0x38(%r14), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x4, %rcx
movq 0x30(%r14), %rsi
movq 0x40(%r14), %rax
subq 0x48(%r14), %rax
subq 0x20(%r14), %rsi
sarq $0x5, %rax
sarq $0x5, %rsi
addq %rax, %rsi
addq %rcx, %rsi
movq %r12, %rdi
callq 0x2110
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
addq $0xc0, %r14
movq %r14, %rdi
callq 0x2030
movq %r13, %r14
xorb $0x1, %bl
movb $0x0, (%r14)
movq %r15, %rdi
callq 0x2150
jmp 0x3f26
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_O1/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 0x2290
movb $0x1, 0x118(%r14)
cmpb $0x1, 0x151(%r14)
jne 0x3f91
cmpb $0x1, 0x150(%r14)
jne 0x3fa0
leaq 0x1531(%rip), %rdi      # 0x54aa
leaq 0x13f5(%rip), %rsi      # 0x5375
leaq 0x152e(%rip), %rcx      # 0x54b5
movl $0xb6, %edx
callq 0x2100
leaq 0x120(%r14), %rdi
movq %rbx, %rsi
callq 0x22b0
movb $0x0, 0x118(%r14)
movq %rbx, %rdi
callq 0x2150
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2290
movb $0x1, 0x118(%rbx)
cmpb $0x1, 0x151(%rbx)
jne 0x400c
cmpb $0x1, 0x150(%rbx)
je 0x4082
movb $0x0, 0x118(%rbx)
movq %r14, %rdi
callq 0x2150
movb $0x1, %bl
jmp 0x4078
movb $0x0, 0x118(%rbx)
movq %r14, %rdi
callq 0x2150
leaq -0x68(%rip), %rdx       # 0x3fba
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x2340
testl %eax, %eax
sete %bl
je 0x4078
movq 0x3f9b(%rip), %r14      # 0x7fd8
leaq 0x14b0(%rip), %rsi      # 0x54f4
movl $0x30, %edx
movq %r14, %rdi
callq 0x2220
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1421(%rip), %rdi      # 0x54aa
leaq 0x12e5(%rip), %rsi      # 0x5375
leaq 0x143a(%rip), %rcx      # 0x54d1
movl $0xcb, %edx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x42df
movb $0x0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x2150
movq %rbx, %rdi
popq %rbx
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x2ae5
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 0x67d5(%rip), %xmm0 # 0x91fc
leaq 0x67e2(%rip), %rcx      # 0x9210
divsd (%rcx), %xmm0
cvttsd2si %xmm0, %r12d
movl 0x24(%rsi), %r13d
imull %r12d, %eax
subl %eax, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xc(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movl %r13d, 0x4(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x2d36
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x2d8e
testl %ebp, %ebp
jne 0x2acc
cmpb $0x1, 0xd(%r15)
jne 0x2acc
movl 0x6768(%rip), %eax      # 0x91f8
subl 0x675a(%rip), %eax      # 0x91f0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
leaq 0x675b(%rip), %rax      # 0x9208
divsd (%rax), %xmm0
addsd 0x10(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movl 0x4(%rsp), %ecx
callq 0x2de6
incl %ebp
addl %r12d, %r13d
cmpl 0x8(%r15), %ebp
jl 0x2a5f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2070
cltq
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
negl %ecx
leal (%rax,%rcx), %ebp
incl %ebp
callq 0x2070
imull $0xcccccccd, %eax, %r14d # imm = 0xCCCCCCCD
addl $0x19999999, %r14d      # imm = 0x19999999
movl 0x665a(%rip), %eax      # 0x91fc
imull %ebp, %eax
movl $0xbb8, %r15d           # imm = 0xBB8
subl %eax, %r15d
movl $0x20, %edi
callq 0x21f0
cmpl $0x33333333, %r14d      # imm = 0x33333333
movl $0xfa0, 0x10(%rax)      # imm = 0xFA0
movl %r15d, 0x14(%rax)
movl %ebp, 0x18(%rax)
setb 0x1d(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x658d(%rip), %ecx      # 0x91f8
cmpl %ecx, 0x10(%rax)
jg 0x2c78
movq %r14, %rdi
callq 0x2b58
cmpq %r14, %rbx
je 0x2c91
movl 0x657d(%rip), %eax      # 0x9200
movq %rbx, %rcx
subl %eax, 0x10(%rcx)
movq (%rcx), %rcx
cmpq %r14, %rcx
jne 0x2c86
cmpl $0x0, 0x10(%rbx)
jle 0x2c9f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
decq 0x10(%r14)
movq %rbx, %rdi
callq 0x2330
movl $0x20, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r15
cmpq %rdi, %r15
je 0x2d29
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x6543(%rip), %r12      # 0x9220
cmpb $0x1, 0x1d(%r15)
jne 0x2d21
callq 0x2070
imull $0xc28f5c29, %eax, %eax # imm = 0xC28F5C29
addl $0x51eb850, %eax        # imm = 0x51EB850
rorl $0x2, %eax
cmpl $0x28f5c28, %eax        # imm = 0x28F5C28
ja 0x2d21
movl 0x64f4(%rip), %eax      # 0x91f8
subl (%r12), %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
addl 0x10(%r15), %esi
movl 0x14(%r15), %edx
movq %rbx, %rdi
callq 0x57e4
movq (%r15), %r15
cmpq %r14, %r15
jne 0x2cdd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0xf0(%rdi)
je 0x3817
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3912
movq (%rbx), %rdi
leaq 0x8(%rbx), %r14
movq %r14, %rsi
callq 0x55ba
movq (%rbx), %rdi
addq $0x38, %rdi
movq %r14, %rsi
callq 0x4970
movq (%rbx), %rdi
subq $-0x80, %rdi
movq %r14, %rsi
callq 0x2bec
movq (%rbx), %rdi
addq $0x60, %rdi
movq %r14, %rsi
callq 0x571a
movq (%rbx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x58fe
movl $0x98, %edi
addq (%rbx), %rdi
movq %r14, %rsi
callq 0x5ab6
movl $0xb0, %edi
addq (%rbx), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5b96
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2180
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 0x2370
movq 0x8(%rbx), %rdi
movq 0x18(%rbx), %rsi
movl 0x8(%r14), %edx
movl 0xc(%r14), %ecx
movl %ebp, %r8d
callq 0x2060
movq %rax, 0xa8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x28(%rdi), %ebx
movl 0x2c(%rdi), %r12d
movq 0xa8(%rdi), %rsi
movq 0x8(%rdi), %r15
movq 0x18(%rdi), %rdx
movq 0xb0(%rdi), %rcx
xorl %eax, %eax
movq %r15, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq %rax
pushq %r12
pushq %rbx
callq 0x20b0
addq $0x20, %rsp
movq %r15, %rdi
callq 0x22d0
movq 0xa8(%r14), %rsi
movq 0xe0(%r14), %rdx
subq $0x8, %rsp
movq %r15, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebx, %r9d
pushq %r12
callq 0x20f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq 0x8(%rdi), %rbx
movq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x22a0
cmpl $-0x1, %eax
je 0x41ee
movq %rbx, %rdi
callq 0x37f8
movq %r14, %rdi
callq 0x2160
cmpl $-0x1, %eax
je 0x425f
movq %rbx, %rdi
callq 0x412a
movl $0x3a98, %edi           # imm = 0x3A98
callq 0x2280
jmp 0x41b4
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8(%rsp), %rbx
movq $0x22, (%rbx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2380
movq %rax, (%r14)
movq (%rbx), %rcx
movq %rcx, 0x10(%r14)
movups 0x1f92(%rip), %xmm0     # 0x61b8
movups %xmm0, 0x10(%rax)
movups 0x1f77(%rip), %xmm0     # 0x61a8
movups %xmm0, (%rax)
movw $0x6461, 0x20(%rax)     # imm = 0x6461
movq %rcx, 0x8(%r14)
movb $0x0, (%rax,%rcx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x4da0(%rip), %rdi      # 0x8ff0
callq 0x2210
movq %rax, %rdi
callq 0x20c0
jmp 0x42cf
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8(%rsp), %rbx
movq $0x24, (%rbx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2380
movq %rax, (%r14)
movq (%rbx), %rcx
movq %rcx, 0x10(%r14)
movups 0x1f44(%rip), %xmm0     # 0x61db
movups %xmm0, 0x10(%rax)
movups 0x1f29(%rip), %xmm0     # 0x61cb
movups %xmm0, (%rax)
movl $0x64616572, 0x20(%rax) # imm = 0x64616572
movq %rcx, 0x8(%r14)
movb $0x0, (%rax,%rcx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x4d2e(%rip), %rdi      # 0x8ff0
callq 0x2210
movq %rax, %rdi
callq 0x20c0
movl $0x1, %edi
callq 0x2230
jmp 0x42db
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x42f3
movq (%r15), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2350
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14d
movq %rsi, %rbx
leal 0x1e(%r14), %eax
cvtsi2sd %ecx, %xmm0
movsd 0xeee(%rip), %xmm1      # 0x62f8
addsd %xmm0, %xmm1
cvttpd2dq %xmm1, %xmm1
leal 0xf(%r14), %r15d
cvtdq2pd %xmm1, %xmm4
movapd %xmm4, (%rsp)
movsd 0xed9(%rip), %xmm3      # 0x6300
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
leaq 0x3dd3(%rip), %rbp      # 0x9208
movsd (%rbp), %xmm2
divsd %xmm2, %xmm1
cvttsd2si %xmm1, %ecx
leaq 0x3dc7(%rip), %r13      # 0x9210
movsd (%r13), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
addsd %xmm4, %xmm3
movapd %xmm3, 0x10(%rsp)
movq (%rsi), %rdi
movq 0xa0(%rsi), %rsi
movq 0xc8(%rbx), %rdx
movsd 0xe65(%rip), %xmm0      # 0x62e0
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %r9
movsd 0xe24(%rip), %xmm0      # 0x62b0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
subq $0x8, %rsp
movl $0x5a00, %r12d          # imm = 0x5A00
xorl %r10d, %r10d
pushq %r12
pushq %r10
pushq %rax
callq 0x22e0
addq $0x20, %rsp
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd (%rbp), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movsd (%r13), %xmm0
movapd (%rsp), %xmm2
divsd %xmm0, %xmm2
cvttsd2si %xmm2, %r8d
movq (%rbx), %rdi
movq 0xa0(%rbx), %rsi
movq 0xc8(%rbx), %rdx
movsd 0xe16(%rip), %xmm2      # 0x6308
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %r9
movsd 0xe0d(%rip), %xmm1      # 0x6310
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
subq $0x8, %rsp
pushq %r12
xorl %r10d, %r10d
pushq %r10
xorl %r15d, %r15d
pushq %rax
callq 0x22e0
addq $0x20, %rsp
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd (%rbp), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
cvttpd2dq 0x10(%rsp), %xmm0
cvtdq2pd %xmm0, %xmm0
movsd (%r13), %xmm2
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %r8d
movq (%rbx), %rdi
movq 0xa0(%rbx), %rsi
movq 0xc8(%rbx), %rdx
movsd 0xd3d(%rip), %xmm0      # 0x62a8
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r9
movsd 0xd9c(%rip), %xmm0      # 0x6318
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
subq $0x8, %rsp
pushq %r12
pushq %r15
pushq %rax
callq 0x22e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rdi), %r15
cmpq %rdi, %r15
je 0x55e5
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%r15), %edx
movl 0x14(%r15), %ecx
movq %rbx, %rsi
callq 0x53e6
movq (%r15), %r15
cmpq %r14, %r15
jne 0x55cd
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
cmpq %rdi, %r14
je 0x5690
movq %rdi, %rbx
leaq 0x3bf6(%rip), %r15      # 0x9200
movl 0x10(%r14), %eax
movl 0x18(%r14), %edx
movl (%r15), %ecx
cmpl $0x1, %edx
je 0x562b
testl %edx, %edx
jne 0x564a
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
subl %edx, %eax
jmp 0x564c
movslq %ecx, %rcx
imulq $0x55555555, %rcx, %rdx # imm = 0x55555555
shrq $0x20, %rdx
subl %ecx, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
sarl %edx
addl %ecx, %edx
addl %eax, %edx
movl %edx, %eax
jmp 0x564c
subl %ecx, %eax
movl %eax, 0x10(%r14)
movl 0x3bc6(%rip), %eax      # 0x921c
addl 0x14(%r14), %eax
movl %eax, 0x14(%r14)
cmpl $0xbb9, %eax            # imm = 0xBB9
jl 0x5684
movq (%r14), %r12
decq 0x10(%rbx)
movq %r14, %rdi
callq 0x2330
movl $0x20, %esi
movq %r14, %rdi
callq 0x2200
movq %r12, %r14
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x560a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 (%rdi), %r15
cmpq %rdi, %r15
je 0x5779
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3ad0(%rip), %r12      # 0x9208
leaq 0x3ad1(%rip), %r13      # 0x9210
leaq 0x10(%r15), %rdi
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%r15), %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %edx
xorps %xmm0, %xmm0
cvtsi2sdl 0x14(%r15), %xmm0
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x583a
movq (%r15), %r15
cmpq %r14, %r15
jne 0x573f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
cmpq %rdi, %r14
je 0x57d8
movq %rdi, %rbx
leaq 0x3a62(%rip), %r15      # 0x9200
movl (%r15), %eax
subl %eax, 0x10(%r14)
movl 0x3a7d(%rip), %eax      # 0x9228
subl %eax, 0x14(%r14)
jns 0x57d0
movq (%r14), %r12
decq 0x10(%rbx)
movq %r14, %rdi
callq 0x2330
movl $0x18, %esi
movq %r14, %rdi
callq 0x2200
movq %r12, %r14
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x579e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq (%rdi), %r15
cmpq %rdi, %r15
je 0x597f
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38ec(%rip), %r12      # 0x9208
leaq 0x38ed(%rip), %r13      # 0x9210
leaq 0x10(%r15), %rdi
movl 0x10(%r15), %eax
movl 0x14(%r15), %ecx
movl 0x18(%r15), %edx
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
subl %esi, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %edx
movl 0x1c(%r15), %eax
movl %eax, %esi
shrl $0x1f, %esi
addl %eax, %esi
sarl %esi
subl %esi, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x5a40
movq (%r15), %r15
cmpq %r14, %r15
jne 0x5923
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %r14
cmpq %rdi, %r14
je 0x59fe
movq %rdi, %rbx
leaq 0x385c(%rip), %r15      # 0x9200
movl $0x128, %ebp            # imm = 0x128
movl (%r15), %eax
subl %eax, 0x10(%r14)
movl 0x18(%r14), %eax
movl 0x1c(%r14), %ecx
leal 0x5(%rax), %edx
movl %edx, 0x18(%r14)
leal 0x5(%rcx), %edx
movl %edx, 0x1c(%r14)
cmpl %ebp, %eax
setge %al
cmpl %ebp, %ecx
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x59f6
movq (%r14), %r12
decq 0x10(%rbx)
movq %r14, %rdi
callq 0x2330
movl $0x20, %esi
movq %r14, %rdi
callq 0x2200
movq %r12, %r14
movq (%r14), %r14
cmpq %rbx, %r14
jne 0x59a9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, %rbx
cvtsi2sdl (%rdi), %xmm0
leaq 0x373c(%rip), %r15      # 0x9208
movsd (%r15), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rdi), %xmm0
leaq 0x3728(%rip), %r12      # 0x9210
movsd (%r12), %xmm2
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %r8d
movq %rsi, %r14
movq (%rsi), %rdi
movq 0xa0(%rsi), %rsi
movq 0xa8(%r14), %rdx
movsd 0x82d(%rip), %xmm0      # 0x6340
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r9
movsd 0x50c(%rip), %xmm0      # 0x6030
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, (%rsp)
callq 0x20f0
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
addl $0x14, %eax
addl $0x14, %ecx
cmpl $0x33, 0x10(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rdi
movq %r14, %rsi
jl 0x5b7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5e60
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5eb4
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x58fe(%rip), %rbx      # 0x8338
movq %rbx, %rdi
callq 0x22b0
movq 0x5887(%rip), %rax      # 0x82d0
cmpq 0x5860(%rip), %rax      # 0x82b0
sete %r14b
movq %rbx, %rdi
callq 0x2170
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2320
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %r14
leaq 0x58b3(%rip), %r15      # 0x8360
leaq 0x58fc(%rip), %r12      # 0x83b0
leaq 0x5795(%rip), %r13      # 0x8250
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b7c
movq %r15, %rdi
callq 0x22b0
movq 0x5796(%rip), %rax      # 0x8298
movq %rax, %rcx
subq 0x576c(%rip), %rcx      # 0x8278
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x4, %rcx
movq 0x575d(%rip), %rax      # 0x8280
subq 0x575e(%rip), %rax      # 0x8288
sarq $0x5, %rax
movq 0x573b(%rip), %rdx      # 0x8270
subq 0x5724(%rip), %rdx      # 0x8260
sarq $0x5, %rdx
addq %rax, %rdx
addq %rcx, %rdx
cmpq $0x2710, %rdx           # imm = 0x2710
jb 0x2b5c
movq %r12, %rdi
movq %r15, %rsi
callq 0x22d0
jmp 0x2afb
movq %r13, %rdi
movq %r14, %rsi
callq 0x3eba
movq %r12, %rdi
callq 0x2030
movq %r15, %rdi
callq 0x2170
jmp 0x2abb
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2b8e
callq 0x21d0
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 0x2bae
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2bc3
callq 0x21d0
leaq -0x250(%rbp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
lock
incl 0x5721(%rip)            # 0x8310
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x572f(%rip), %rbx      # 0x8338
movq %rbx, %rdi
callq 0x22b0
movq 0x56b8(%rip), %r14      # 0x82d0
movq 0x5691(%rip), %r15      # 0x82b0
movq %rbx, %rdi
callq 0x2170
cmpq %r15, %r14
je 0x2cbf
leaq -0x58(%rbp), %r13
leaq 0x56fd(%rip), %rbx      # 0x8338
leaq -0x68(%rbp), %r12
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
jne 0x2c9c
movq 0x565e(%rip), %rsi      # 0x82b0
leaq -0x48(%rbp), %rdi
callq 0x2120
leaq 0x563e(%rip), %rdi      # 0x82a0
callq 0x4012
movq %rbx, %rdi
callq 0x2170
movq %r13, -0x68(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x3964
movq %r12, %rdi
callq 0x2a64
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x2c9c
callq 0x21d0
movq %rbx, %rdi
callq 0x22b0
movq 0x5625(%rip), %r14      # 0x82d0
movq 0x55fe(%rip), %r15      # 0x82b0
movq %rbx, %rdi
callq 0x2170
cmpq %r15, %r14
jne 0x2c3f
lock
decl 0x564a(%rip)            # 0x8310
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2cd8
callq 0x21d0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r13, %rdi
je 0x2cff
callq 0x21d0
jmp 0x2cff
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2d11
callq 0x21d0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/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 0x55a2(%rip), %rbx      # 0x8360
movq %rbx, %rdi
callq 0x22b0
movq 0x54b3(%rip), %rax      # 0x8280
cmpq 0x548c(%rip), %rax      # 0x8260
sete %r14b
movq %rbx, %rdi
callq 0x2170
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %r14
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2d19
movq (%rbx), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x2e1f
callq 0x21d0
leaq -0x1e8(%rbp), %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2350
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x48(%rbp), %r14
leaq 0x5537(%rip), %r15      # 0x8388
leaq -0x1e8(%rbp), %rdi
movq %r14, %rsi
callq 0x2250
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq -0x48(%rbp), %r13
jne 0x2eb9
movq -0x40(%rbp), %rbx
testq %rbx, %rbx
je 0x2e96
xorl %r12d, %r12d
movsbl (%r13,%r12), %edi
callq 0x2290
movb %al, (%r13,%r12)
incq %r12
cmpq %r12, %rbx
jne 0x2e7e
movq %r15, %rdi
callq 0x22b0
leaq 0x5373(%rip), %rdi      # 0x8218
movq %r14, %rsi
callq 0x40aa
incl (%rax)
movq %r15, %rdi
callq 0x2170
jmp 0x2e51
leaq -0x38(%rbp), %rax
cmpq %rax, %r13
je 0x2eca
movq %r13, %rdi
callq 0x21d0
movq 0x50f7(%rip), %rsi      # 0x7fc8
leaq -0x1e8(%rbp), %rdi
callq 0x2280
leaq -0x170(%rbp), %rdi
callq 0x20d0
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x2f10
callq 0x21d0
movq 0x50b1(%rip), %rsi      # 0x7fc8
leaq -0x1e8(%rbp), %rdi
callq 0x2280
leaq -0x170(%rbp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x58(%rbp), %r12
leaq 0x53fa(%rip), %rbx      # 0x8360
leaq 0x5443(%rip), %r14      # 0x83b0
leaq -0x68(%rbp), %r15
movl 0x5399(%rip), %eax      # 0x8310
testl %eax, %eax
jg 0x2fac
movq %rbx, %rdi
callq 0x22b0
movq 0x52f6(%rip), %r13      # 0x8280
movq %r12, %r15
movq 0x52cc(%rip), %r12      # 0x8260
movq %rbx, %rdi
callq 0x2170
cmpq %r12, %r13
movq %r15, %r12
leaq -0x68(%rbp), %r15
je 0x3046
movq %rbx, %rdi
callq 0x22b0
movl 0x5356(%rip), %eax      # 0x8310
testl %eax, %eax
jle 0x2fdb
movq 0x52bb(%rip), %rax      # 0x8280
cmpq 0x5294(%rip), %rax      # 0x8260
jne 0x2fdb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22d0
jmp 0x2fb4
movq 0x527e(%rip), %rsi      # 0x8260
cmpq %rsi, 0x5297(%rip)      # 0x8280
je 0x3000
leaq -0x48(%rbp), %rdi
callq 0x2120
leaq 0x5255(%rip), %rdi      # 0x8250
callq 0x4012
movq %r14, %rdi
callq 0x2030
movq %rbx, %rdi
callq 0x2170
movq %r12, -0x68(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x3964
movq %r15, %rdi
callq 0x2de8
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x2f71
callq 0x21d0
jmp 0x2f71
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3058
callq 0x21d0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x3081
callq 0x21d0
jmp 0x3081
jmp 0x307e
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x3093
callq 0x21d0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x5175(%rip), %r12      # 0x8228
testq %r12, %r12
je 0x3121
leaq -0x48(%rbp), %rbx
leaq -0x38(%rbp), %r13
leaq 0x5229(%rip), %r14      # 0x82f0
leaq -0x50(%rbp), %r15
movl 0x28(%r12), %eax
movl %eax, -0x50(%rbp)
movq %r13, -0x48(%rbp)
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3964
movq %r14, %rdi
movq %r15, %rsi
callq 0x4616
movq 0x51f2(%rip), %rdi      # 0x82f0
movq 0x51f3(%rip), %rsi      # 0x82f8
callq 0x450a
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3118
callq 0x21d0
movq (%r12), %r12
testq %r12, %r12
jne 0x30cb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x3141
callq 0x21d0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1f38(%rip), %rdi      # 0x5096
leaq 0x1f42(%rip), %rsi      # 0x50a7
leaq 0x1f40(%rip), %rdx      # 0x50ac
leaq 0x1f43(%rip), %rcx      # 0x50b6
xorl %eax, %eax
callq 0x2060
movl $0x1, %ebx
movq 0x4e4a(%rip), %r14      # 0x7fd0
movl $0xa, %r13d
leaq 0x515d(%rip), %r15      # 0x82f0
movq 0x5156(%rip), %rax      # 0x82f0
cmpq 0x5157(%rip), %rax      # 0x82f8
je 0x3248
movq (%r14), %rax
movq -0x18(%rax), %rcx
orl $0x20, 0x18(%r14,%rcx)
movq -0x18(%rax), %rax
movq %r13, 0x10(%r14,%rax)
movq %r14, %rdi
movl %ebx, %esi
callq 0x2360
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x14, 0x10(%rax,%rcx)
movq 0x5112(%rip), %rcx      # 0x82f0
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %rdx
movq %rax, %rdi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %r13, 0x10(%rax,%rcx)
movq 0x50ef(%rip), %rcx      # 0x82f0
movl (%rcx), %esi
movq %rax, %rdi
callq 0x2360
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2150
movq %r15, %rdi
callq 0x36a8
incl %ebx
cmpl $0xb, %ebx
jne 0x3193
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x28, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x3964
movq %r15, %rdi
callq 0x26fc
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x32a3
callq 0x21d0
movl %r14d, %eax
shrl $0x1f, %eax
addl %r14d, %eax
sarl %eax
movl %eax, %r13d
cmpl $0x2, %r14d
jl 0x330a
xorl %r15d, %r15d
leaq -0x6ea(%rip), %r12      # 0x2bd7
movl $0x8, %edi
callq 0x2200
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x32e3
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x32ef
movq %rbx, %rdi
leaq -0x30(%rbp), %rdx
callq 0x4c52
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x23a0
incq %r15
cmpq %r15, %r13
jne 0x32c1
testl %r14d, %r14d
jle 0x3362
leaq -0x30(%rbp), %r15
leaq -0x3e3(%rip), %r12      # 0x2f37
movl $0x8, %edi
callq 0x2200
movq %rax, -0x30(%rbp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x333c
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x3347
movq %rbx, %rdi
movq %r15, %rdx
callq 0x4c52
movq (%rbx), %rax
movq (%rax,%r13,8), %rdi
xorl %esi, %esi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x23a0
incq %r13
cmpl %r14d, %r13d
jl 0x331a
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x33a9
xorl %r14d, %r14d
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x21b0
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2230
movq (%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x336e
callq 0x309b
callq 0x3149
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x33d3
callq 0x21d0
movq %rbx, %rdi
callq 0x2380