LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<double>::SimpleThreadPool(unsigned int, unsigned int)
SimpleThreadPool(unsigned int max_thread_size, unsigned int max_job_size)
	{
		m_oTrdList.set_thread_func(boost::bind(&SimpleThreadPool::dispatch_thread, this));
		m_oTrdList.set_max_thread_num(max_thread_size);
		m_oJobList.set_max_job_num(max_job_size);
		m_bStopFlag = false;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
callq 0x63c2
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x6408
leaq 0x170(%rbx), %r15
movq %r15, %rdi
callq 0x64c6
leaq 0xadb(%rip), %rax       # 0x656c
movq %rsp, %rsi
movq %rax, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, 0x18(%rsi)
leaq 0xcc79(%rip), %rax      # 0x12721
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x650a
movq %rsp, %rdi
callq 0x660a
movq %r15, %rdi
movl %r12d, %esi
callq 0x661a
movq %r14, %rdi
movl %ebp, %esi
callq 0x66ce
movb $0x0, 0x1d8(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq %rsp, %rdi
callq 0x660a
jmp 0x5afe
movq %rax, %r12
jmp 0x5b06
movq %rax, %r12
jmp 0x5b0e
movq %rax, %r12
movq %r15, %rdi
callq 0x670e
movq %r14, %rdi
callq 0x6780
movq %rbx, %rdi
callq 0x67c0
movq %r12, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<double>::add_job_block(Switch::Tool::SimpleJob<void> const&)
bool add_job_block(const SimpleJob< void >& job)
	{
		m_oJobList.lock_add_job();
		m_oJobList.wait_add_job();
		if (m_bStopFlag)
		{
			m_oJobList.unlock_add_job();
			return false;
		}
		bool ret = m_oJobList.push_back(job);
		m_oJobList.unlock_add_job();
		if (ret)
		{
			m_oJobList.notify_one_get_job();
		}

		return ret;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x28(%rdi), %r12
leaq 0x68(%rdi), %r14
movq %r14, %rdi
callq 0x6ed6
movq %r12, %rdi
callq 0x8780
cmpb $0x1, 0x1d8(%rbx)
jne 0x5c1f
movq %r14, %rdi
callq 0x72ae
jmp 0x5c4c
movq %r12, %rdi
movq %r15, %rsi
callq 0x87be
movl %eax, %ebp
movq %r14, %rdi
callq 0x72ae
testb %bpl, %bpl
je 0x5c4c
addq $0x110, %rbx            # imm = 0x110
movq %rbx, %rdi
callq 0x89ac
movb $0x1, %al
jmp 0x5c4e
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<float>::SetMaxPoolSize(unsigned int)
int SetMaxPoolSize(unsigned int size)
	{
        m_TMutex.lock();
        if (size > m_nMaxPoolSize || size >= m_lpThread.size())
        {
            m_nMaxPoolSize = size;
            m_TMutex.unlock();
            return 0;
        }
        m_TMutex.unlock();

        return -1;
	}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x6ed6
cmpl %ebp, 0x48(%rbx)
jb 0x5d3d
movl %ebp, %eax
cmpq %rax, 0x38(%rbx)
jbe 0x5d3d
pushq $-0x1
popq %rbp
jmp 0x5d42
movl %ebp, 0x48(%rbx)
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x72ae
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: int Switch::Tool::SimpleThreadPool<float>::AddThread<boost::_bi::bind_t<double, double (*)(void*), boost::_bi::list1<boost::_bi::value<void*>>>>(boost::_bi::bind_t<double, double (*)(void*), boost::_bi::list1<boost::_bi::value<void*>>>)
int	AddThread(T func)
	{
	    m_TMutex.lock();
		if (m_lpThread.size() >= m_nMaxPoolSize) {
            m_TMutex.unlock();
			return -1;
		}

        m_lpThread.push_back(new boost::thread(func));
        m_TMutex.unlock();

		return 0;
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
movq %rdx, 0x8(%rsp)
callq 0x6ed6
movl 0x48(%rbx), %eax
cmpq %rax, 0x38(%rbx)
jae 0x5da8
pushq $0x10
popq %rdi
callq 0x5240
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
callq 0x9c64
leaq 0x28(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
callq 0x7e9a
movq %rbx, %rdi
callq 0x72ae
xorl %eax, %eax
jmp 0x5db3
movq %rbx, %rdi
callq 0x72ae
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x5260
movq %rbx, %rdi
callq 0x53d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<float>::GetPoolSize()
int GetPoolSize(void)
	{
	    m_TMutex.lock();
	    int size = m_lpThread.size();
	    m_TMutex.unlock();

		return size;
	}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6ed6
movl 0x38(%rbx), %ebp
movq %rbx, %rdi
callq 0x72ae
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<float>::~SimpleThreadPool()
~SimpleThreadPool(void)
	{
	    m_pJoinThread->interrupt();
	    m_pJoinThread->join();
	    delete m_pJoinThread;

        StopThreadPool();
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
callq 0x52e0
movq 0x40(%rbx), %rdi
callq 0x86f0
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x5ede
movq %r14, %rdi
callq 0x8752
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x5260
movq %rbx, %rdi
callq 0x5e6e
leaq 0x28(%rbx), %rdi
callq 0x6e4c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x67c0
movq %rax, %rdi
callq 0x59a2
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<double>::dispatch_thread()
void dispatch_thread(void)
	{
		SimpleJob< void > job;

		while (1)
		{
			m_oJobList.lock_get_job();
			m_oJobList.wait_get_job();
			if (m_bStopFlag)
			{
				m_oJobList.unlock_get_job();
				return;
			}
			m_oJobList.pop_front(job);
			m_oJobList.unlock_get_job();
			m_oJobList.notify_all_add_job();
			job.CallJob();
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x72e2
leaq 0x28(%rbx), %r12
leaq 0xe8(%rbx), %r15
leaq 0x90(%rbx), %r13
movq %r15, %rdi
callq 0x6ed6
movq %r12, %rdi
callq 0x7312
cmpb $0x1, 0x1d8(%rbx)
je 0x65d7
movq %r12, %rdi
movq %r14, %rsi
callq 0x7356
movq %r15, %rdi
callq 0x72ae
movq %r13, %rdi
callq 0x7a40
movq %r14, %rdi
callq 0x73ca
jmp 0x6599
movq %r15, %rdi
callq 0x72ae
movq %rsp, %rdi
callq 0x5c58
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x65f7
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5c58
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadList.hpp
// Function: Switch::Tool::SimpleThreadList::set_max_thread_num(unsigned int)
bool set_max_thread_num(unsigned int max)
    {
        boost::lock_guard< boost::mutex > guard(m_oMutex);

        if (m_bStopFlag || max <= m_nMaxThreadNum)
        {
            return false;
        }

        for (unsigned int i = m_nMaxThreadNum; i < max; ++i)
        {
            m_lpThread.push_back(new boost::thread(m_oFunc));
        }
        m_nMaxThreadNum = max;

        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
addq $0x18, %rdi
movq %rdi, 0x8(%rsp)
callq 0x6ed6
cmpb $0x0, 0x64(%r14)
jne 0x6684
movl 0x60(%r14), %r12d
cmpl %ebx, %r12d
jae 0x6684
leaq 0x40(%r14), %r15
leaq 0x10(%rsp), %r13
cmpl %ebx, %r12d
jae 0x6688
pushq $0x10
popq %rdi
callq 0x5240
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x7ea6
movq %rbp, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x7e9a
incl %r12d
jmp 0x6654
xorl %ebx, %ebx
jmp 0x668e
movl %ebx, 0x60(%r14)
movb $0x1, %bl
leaq 0x8(%rsp), %rdi
callq 0x6ec2
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %rbp, %rdi
callq 0x5260
jmp 0x66bc
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6ec2
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleJob.hpp
// Function: Switch::Tool::SimpleJobList::set_max_job_num(unsigned int)
bool set_max_job_num(unsigned int max)
    {
        boost::lock_guard< boost::mutex > guard(m_oMutex);

        if (max <= m_nMaxJobNum)
        {
            return false;
        }
        m_nMaxJobNum = max;

        return true;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0x18, %rdi
movq %rdi, (%rsp)
callq 0x6ed6
movl 0x140(%r14), %eax
cmpl %ebx, %eax
jae 0x66f6
movl %ebx, 0x140(%r14)
cmpl %ebx, %eax
setb %bl
movq %rsp, %rdi
callq 0x6ec2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadList.hpp
// Function: Switch::Tool::SimpleThreadList::~SimpleThreadList()
~SimpleThreadList(void)
    {
    	iterator iter, end;
    	end = m_lpThread.end();
    	for (iter = m_lpThread.begin(); iter != end; ++iter)
		{
			(*iter)->join();
			delete (*iter);
		}
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %r14
movq %rdi, %r12
movq (%r12), %r12
cmpq %rbx, %r12
je 0x6752
movq 0x10(%r12), %rdi
callq 0x86f0
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x6745
movq %r15, %rdi
callq 0x8752
movq %r15, %rdi
movq %r14, %rsi
callq 0x5260
jmp 0x6720
leaq 0x40(%rbx), %rdi
callq 0x660a
leaq 0x18(%rbx), %rdi
callq 0x67c0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6e4c
movq %rax, %rdi
callq 0x59a2
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleJob.hpp
// Function: Switch::Tool::SimpleJobList::pop_front(Switch::Tool::SimpleJob<void>&)
bool pop_front(SimpleJob< void >& job)
    {
		boost::lock_guard< boost::mutex > guard(m_oMutex);

		if (!m_bStopFlag || m_lJobList.size() > 0)
		{
			job = m_lJobList.front();
			m_lJobList.pop_front();

			return true;
		}

		return false;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
addq $0x18, %rdi
movq %rdi, 0x8(%rsp)
callq 0x6ed6
cmpq $0x0, 0x10(%r14)
sete %bl
andb 0x144(%r14), %bl
jne 0x739b
movq (%r14), %rsi
addq $0x10, %rsi
movq %r15, %rdi
callq 0x79f0
movq %r14, %rdi
callq 0x7a12
xorb $0x1, %bl
leaq 0x8(%rsp), %rdi
callq 0x6ec2
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6ec2
movq %rbx, %rdi
callq 0x53d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleJob.hpp
// Function: Switch::Tool::SimpleJob<void>::CallJob()
void CallJob(void)
    {
        m_oMutex.lock();
        m_eStat = SJS_CALL;
        m_oMutex.unlock();

        m_oFunc();

        m_oMutex.lock();
        m_eStat = SJS_DONE;
        m_oMutex.unlock();
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x20(%rdi), %r14
movq %r14, %rdi
callq 0x6ed6
movl $0x2, 0x48(%rbx)
movq %r14, %rdi
callq 0x72ae
movq %rbx, %rdi
callq 0x7b1c
movq %r14, %rdi
callq 0x6ed6
movl $0x3, 0x48(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x72ae
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleJob.hpp
// Function: Switch::Tool::SimpleJobList::stop()
void stop(void)
    {
    	boost::lock_guard< boost::mutex > guard(m_oMutex);
    	m_bStopFlag = true;
		notify_all_add_job();
		notify_all_get_job();
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq %rsp, %r14
movq %rdi, (%r14)
callq 0x6ed6
movb $0x1, 0x144(%rbx)
leaq 0x68(%rbx), %rdi
callq 0x7a40
addq $0xe8, %rbx
movq %rbx, %rdi
callq 0x7a40
movq %r14, %rdi
callq 0x6ec2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadList.hpp
// Function: Switch::Tool::SimpleThreadList::stop()
void stop(void)
    {
    	boost::lock_guard< boost::mutex > guard(m_oMutex);
    	m_bStopFlag = true;

    	iterator iter, end;
    	end = m_lpThread.end();
    	for (iter = m_lpThread.begin(); iter != end; ++iter)
		{
			(*iter)->join();
			delete (*iter);
		}
		m_lpThread.clear();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
movq %rdi, (%rsp)
callq 0x6ed6
movb $0x1, 0x64(%rbx)
pushq $0x10
popq %r14
movq %rbx, %r12
movq (%r12), %r12
cmpq %rbx, %r12
je 0x8a97
movq 0x10(%r12), %rdi
callq 0x86f0
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x8a8a
movq %r15, %rdi
callq 0x8752
movq %r15, %rdi
movq %r14, %rsi
callq 0x5260
jmp 0x8a65
movq %rbx, %rdi
callq 0x8ac6
movq %rsp, %rdi
callq 0x6ec2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6ec2
movq %rbx, %rdi
callq 0x53d0
// File: /workspace/github_cpp_makefile_star2_O2/switch-st[P]SimpleThreadPool/./SimpleThreadPool.hpp
// Function: Switch::Tool::SimpleThreadPool<float>::ThreadJoin()
void ThreadJoin(void)
    {
        std::list< boost::thread* >::iterator iter, end;

        while(1)
        {
            m_TMutex.lock();
            end = m_lpThread.end();
            for (iter = m_lpThread.begin(); iter != end;)
            {
                if ((*iter)->timed_join(boost::posix_time::microseconds(1)))
                {
                    boost::thread* p = *iter;
                    iter = m_lpThread.erase(iter);
                    delete p;
                }
                else
                {
                    ++iter;
                }
            }
            m_TMutex.unlock();

            boost::this_thread::sleep(boost::posix_time::milliseconds(1));
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
movq %rsp, %r15
pushq $0x10
popq %r12
movq %rbx, %rdi
callq 0x6ed6
movq 0x28(%rbx), %r13
cmpq %r14, %r13
je 0x8b52
movq 0x10(%r13), %rdi
movq $0x1, (%rsp)
movq %r15, %rsi
callq 0x8bb6
testb %al, %al
je 0x8b4c
movq 0x10(%r13), %rbp
movq %r14, %rdi
movq %r13, %rsi
callq 0x8c16
movq %rax, %r13
testq %rbp, %rbp
je 0x8b3f
movq %rbp, %rdi
callq 0x8752
movq %rbp, %rdi
movq %r12, %rsi
callq 0x5260
jmp 0x8b03
movq (%r13), %r13
jmp 0x8b03
movq %rbx, %rdi
callq 0x72ae
movq $0x3e8, (%rsp)          # imm = 0x3E8
movq %r15, %rdi
callq 0x8c24
jmp 0x8af7
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/Character.cpp
// Function: Character::Character(Character const&)
Character::Character(const Character &other):
	name(other.name), equipped(0)
{
	for (int i = 0; i < other.equipped; i++)
		this->equip(other.inventory[i]->clone());
	for (int i = this->equipped; i < 4; i++)
		this->inventory[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x37ca(%rip), %rax      # 0x5c78
movq %rax, (%rdi)
leaq 0x8(%rdi), %r14
addq $0x8, %rsi
movq %r14, %rdi
callq 0x2120
andl $0x0, 0x28(%rbx)
xorl %r12d, %r12d
movslq 0x28(%r15), %rax
cmpq %rax, %r12
jge 0x24ed
movq 0x30(%r15,%r12,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x18(%rcx)
incq %r12
jmp 0x24c8
movslq 0x28(%rbx), %rax
cmpq $0x4, %rax
jge 0x2502
andq $0x0, 0x30(%rbx,%rax,8)
incq %rax
jmp 0x24f1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/Character.cpp
// Function: Character::operator=(Character const&)
Character &Character::operator=(const Character &other)
{
	this->name = other.name;
	for (int i = 0; i < this->equipped; i++)
		delete this->inventory[i];
	this->equipped = 0;
	for (int i = 0; i < other.equipped; i++)
		this->equip(other.inventory[i]->clone());
	for (int i = this->equipped; i < 4; i++)
		this->inventory[i] = 0;
	return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rsi
addq $0x8, %rdi
callq 0x2090
xorl %r15d, %r15d
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jge 0x25c2
movq 0x30(%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x25bd
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
jmp 0x25a4
andl $0x0, 0x28(%rbx)
xorl %r15d, %r15d
movslq 0x28(%r14), %rax
cmpq %rax, %r15
jge 0x25ee
movq 0x30(%r14,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x18(%rcx)
incq %r15
jmp 0x25c9
movslq 0x28(%rbx), %rax
cmpq $0x4, %rax
jge 0x2603
andq $0x0, 0x30(%rbx,%rax,8)
incq %rax
jmp 0x25f2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/Character.cpp
// Function: Character::equip(AMateria*)
void Character::equip(AMateria *m)
{
	if (m == 0)
		return ;
	if (this->equipped == 4)
		return ;
	for (int i = 0; i < this->equipped; i++)
	{
		if (this->inventory[i] == m)
			return ;
	}
	this->inventory[this->equipped++] = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x265b
movslq 0x28(%rdi), %rax
cmpq $0x4, %rax
je 0x265b
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x2650
leaq 0x1(%rcx), %r8
cmpq %rsi, 0x30(%rdi,%rcx,8)
movq %r8, %rcx
jne 0x263b
jmp 0x265b
leal 0x1(%rax), %ecx
movl %ecx, 0x28(%rdi)
movq %rsi, 0x30(%rdi,%rax,8)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/Character.cpp
// Function: Character::unequip(int)
void Character::unequip(int idx)
{
	if (idx < 0 || idx >= this->equipped || this->inventory[idx] == 0)
		return ;
	for (int i = idx; i < 3; i++)
	{
		this->inventory[i] = this->inventory[i + 1];
		this->inventory[i + 1] = 0;
	}
	this->equipped--;
}

// Assembly:
testl %esi, %esi
js 0x269d
movl 0x28(%rdi), %eax
cmpl %esi, %eax
jle 0x269d
movl %esi, %ecx
cmpq $0x0, 0x30(%rdi,%rcx,8)
je 0x269d
pushq %rbp
movq %rsp, %rbp
leaq (%rdi,%rcx,8), %rcx
addq $0x38, %rcx
cmpl $0x3, %esi
jge 0x2697
movq (%rcx), %rdx
movq %rdx, -0x8(%rcx)
andq $0x0, (%rcx)
addq $0x8, %rcx
incl %esi
jmp 0x267f
decl %eax
movl %eax, 0x28(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/MateriaSource.cpp
// Function: MateriaSource::MateriaSource(MateriaSource const&)
MateriaSource::MateriaSource(const MateriaSource &other):
	current(0)
{
	for (int i = 0; i < other.current; i++)
		this->learnMateria(other.sources[i]->clone());
	for (int i = 0; i < 4; i++)
		this->sources[i] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3259(%rip), %rax      # 0x5d70
movq %rax, (%rdi)
andl $0x0, 0x8(%rdi)
xorl %r15d, %r15d
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jge 0x2b46
movq 0x10(%r14,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
incq %r15
jmp 0x2b21
xorl %eax, %eax
cmpq $0x4, %rax
je 0x2b59
andq $0x0, 0x10(%rbx,%rax,8)
incq %rax
jmp 0x2b48
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/MateriaSource.cpp
// Function: MateriaSource::operator=(MateriaSource const&)
MateriaSource &MateriaSource::operator=(const MateriaSource &other)
{
	for (int i = 0; i < this->current; i++)
		delete this->sources[i];
	this->current = 0;
	for (int i = 0; i < other.current; i++)
		this->learnMateria(other.sources[i]->clone());
	for (int i = 0; i < 4; i++)
		this->sources[i] = 0;
	return (*this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jge 0x2bef
movq 0x10(%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x2bea
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
jmp 0x2bd1
andl $0x0, 0x8(%rbx)
xorl %r15d, %r15d
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jge 0x2c1b
movq 0x10(%r14,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x10(%rcx)
incq %r15
jmp 0x2bf6
pushq $0x2
popq %rax
cmpq $0x6, %rax
je 0x2c2e
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x2c1e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/MateriaSource.cpp
// Function: MateriaSource::learnMateria(AMateria*)
void MateriaSource::learnMateria(AMateria *m)
{
	if (this->current  == 4 || m == 0)
		return ;
	for (int i = 0; i < this->current; i++)
	{
		if (this->sources[i] == m)
			return ;
	}
	this->sources[this->current++] = m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8(%rdi), %rax
cmpq $0x4, %rax
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0x2c81
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x2c76
leaq 0x1(%rcx), %r8
cmpq %rsi, 0x10(%rdi,%rcx,8)
movq %r8, %rcx
jne 0x2c61
jmp 0x2c81
leal 0x1(%rax), %ecx
movl %ecx, 0x8(%rdi)
movq %rsi, 0x10(%rdi,%rax,8)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/t0mm4rx[P]piscine_cpp/day04/ex03/MateriaSource.cpp
// Function: MateriaSource::createMateria(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AMateria* MateriaSource::createMateria(const std::string &type)
{
	for (int i = 0; i < this->current; i++)
	{
		if (this->sources[i]->getType() == type)
			return (this->sources[i]->clone());
	}
	return (0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jge 0x2cd1
movq 0x10(%rbx,%r15,8), %rdi
callq 0x2428
movq %rax, %rdi
movq %r14, %rsi
callq 0x2cde
incq %r15
testb %al, %al
je 0x2c97
movq 0x8(%rbx,%r15,8), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/factory.cpp
// Function: Factory::collect_relevant_facilities(item_t) const
vector<size_t> Factory::collect_relevant_facilities(item_t item) const
{
	vector<size_t> relevant_facilities;

	for (size_t facility_id = 0; facility_id < facilities.size(); facility_id++)
	{
		const auto& facility = facilities[facility_id];

		if (facility.items.find(item) != facility.items.end())
		{
			relevant_facilities.push_back(facility_id);
		}
		#ifndef NDEBUG
		else // assert that there is no `item`-edge from or to that facility
		{
			for (const auto& transport_line : transport_lines)
				if (transport_line.item_type == item)
					assert(transport_line.from != facility_id
						&& transport_line.to != facility_id);
		}
		#endif
	}
	
	return relevant_facilities;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x14(%rsp), %r15
movl %edx, (%r15)
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %ecx, %ecx
pushq $0x50
popq %rbp
leaq 0x8(%rsp), %r12
movq %rcx, 0x8(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
cqto
idivq %rbp
cmpq %rax, %rcx
jae 0x4d73
imulq $0x50, %rcx, %rax
leaq (%rsi,%rax), %r13
addq $0x20, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x642a
addq $0x8, %r13
cmpq %r13, %rax
je 0x4d47
movq %rbx, %rdi
movq %r12, %rsi
callq 0x59a2
movq 0x8(%rsp), %rcx
incq %rcx
jmp 0x4cf9
movq 0x18(%r14), %rax
movq 0x20(%r14), %rdx
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rcx
cmpq %rdx, %rax
je 0x4d42
cmpl %esi, (%rax)
jne 0x4d6d
cmpq %rcx, 0x8(%rax)
je 0x4d85
cmpq %rcx, 0x10(%rax)
je 0x4d85
addq $0x30, %rax
jmp 0x4d58
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8504(%rip), %rdi      # 0xd290
leaq 0x8544(%rip), %rsi      # 0xd2d7
leaq 0x8549(%rip), %rcx      # 0xd2e3
pushq $0x2d
popq %rdx
callq 0x3170
jmp 0x4da4
movq %rax, %r14
movq %rbx, %rdi
callq 0x474a
movq %r14, %rdi
callq 0x33c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/factory.cpp
// Function: Factory::build_facility_itemset()
void Factory::build_facility_itemset()
{
	for (const auto& tl : transport_lines)
	{
		facilities[tl.from].items.insert(tl.item_type);
		facilities[tl.to].items.insert(tl.item_type);
	}

	for (auto& fac : facilities)
		fac.most_advanced_item_involved = *fac.items.rbegin();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
cmpq %r15, %r14
je 0x4e1d
movq (%rbx), %rax
imulq $0x50, 0x8(%r14), %rcx
leaq (%rax,%rcx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x6018
movq (%rbx), %rax
imulq $0x50, 0x10(%r14), %rcx
leaq (%rax,%rcx), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x6018
addq $0x30, %r14
jmp 0x4de2
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
cmpq %rbx, %r14
je 0x4e3f
leaq 0x28(%r14), %rdi
callq 0x3160
movl 0x20(%rax), %eax
movl %eax, 0x18(%r14)
addq $0x50, %r14
jmp 0x4e24
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/factory.cpp
// Function: Factory::build_edge_table()
void Factory::build_edge_table()
{
	edge_table_per_item.resize(MAX_ITEM);
	edge_table_per_item_inv.resize(MAX_ITEM);

	for (size_t item = 0; item < MAX_ITEM; item++)
	{
		edge_table_per_item[item].clear();
		edge_table_per_item_inv[item].resize(transport_lines.size());

		for (size_t i = 0; i < transport_lines.size(); i++)
			if (transport_lines[i].item_type == item)
			{
				edge_table_per_item[item].push_back(i);
				edge_table_per_item_inv[item][i] = edge_table_per_item[item].size()-1;
			}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
pushq $0xb
popq %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x59c2
leaq 0x78(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x59c2
xorl %r13d, %r13d
pushq $0x30
popq %rbp
cmpq $0xb, %r13
je 0x5238
movq (%r14), %rax
imulq $0x18, %r13, %r12
movq (%rax,%r12), %rcx
cmpq %rcx, 0x8(%rax,%r12)
je 0x51b3
addq %r12, %rax
movq %rcx, 0x8(%rax)
movq 0x78(%rbx), %rdi
addq %r12, %rdi
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
cqto
idivq %rbp
movq %rax, %rsi
callq 0x59f8
xorl %ecx, %ecx
movq %rcx, (%rsp)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rax
subq %rsi, %rax
cqto
idivq %rbp
cmpq %rax, %rcx
jae 0x5230
imulq $0x30, %rcx, %rax
movslq (%rsi,%rax), %rax
cmpq %rax, %r13
jne 0x522b
movq (%r14), %rdi
addq %r12, %rdi
movq %rsp, %rsi
callq 0x59a2
movq (%r14), %rax
movq 0x8(%rax,%r12), %rcx
subq (%rax,%r12), %rcx
sarq $0x3, %rcx
decq %rcx
movq (%r15), %rax
movq (%rsp), %rdx
movq (%rax,%r12), %rax
movq %rcx, (%rax,%rdx,8)
movq (%rsp), %rcx
incq %rcx
jmp 0x51d1
incq %r13
jmp 0x5190
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::Node::update_forward()
void FlowGraph::Node::update_forward()
{
	if (max_production > 0)
		actual_production = max_production;
	else
		actual_production = -min(incoming(), -max_production); // never consume more than incoming
	
	multimap<int, Edge*> sorted_edges;
	for (Edge* edge : outgoing_edges)
		sorted_edges.insert( std::pair<int, Edge*>(edge->actual_capacity, edge) );

	size_t edges_remaining = sorted_edges.size();
	int amount_remaining = available();

	for (auto& it : sorted_edges)
	{
		Edge* edge = it.second;
		auto capacity = it.first;

		int fair_share = amount_remaining / edges_remaining; // beware: integer division!
		if (fair_share < capacity)
			edge->actual_flow = fair_share;
		else
		{
			edge->actual_flow = capacity; // set edge flow to maximum possible value
			amount_remaining -= capacity; // the remaining amount must now be shared over even less edges
			edges_remaining--;
		}

		assert(amount_remaining >= 0);
	}

	if (edges_remaining == 0)
	{
		excess = amount_remaining;
		if (actual_production > 0)
		{
			int reduction = min(excess, actual_production);
			actual_production -= reduction;
			excess -= reduction;
		}
	}
	else
		excess = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movl (%rdi), %ebp
testl %ebp, %ebp
jg 0x74ca
movq %rbx, %rdi
callq 0x7470
negl %ebp
cmpl %ebp, %eax
cmovll %eax, %ebp
negl %ebp
movl %ebp, 0x4(%rbx)
leaq 0x20(%rsp), %r12
andl $0x0, (%r12)
andq $0x0, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
movq 0x28(%rbx), %r13
movq 0x30(%rbx), %rbp
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
cmpq %rbp, %r13
je 0x7525
movq (%r13), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x84fe
addq $0x8, %r13
jmp 0x74ff
movq 0x40(%rsp), %r15
movq %rbx, %rdi
callq 0x748c
movl %eax, %r14d
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x757e
movq 0x28(%rdi), %rsi
movl 0x20(%rdi), %ecx
movslq %r14d, %r14
movq %r14, %rax
xorl %edx, %edx
divq %r15
cmpl %eax, %ecx
movl %eax, %edx
cmovll %ecx, %edx
movl $0x0, %r8d
cmovlel %ecx, %r8d
subl %r8d, %r14d
movl %edx, 0x8(%rsi)
js 0x75c0
xorl %edx, %edx
cmpl %eax, %ecx
setle %dl
subq %rdx, %r15
callq 0x3190
movq %rax, %rdi
jmp 0x753a
xorl %eax, %eax
testq %r15, %r15
jne 0x75a4
movl %r14d, 0x8(%rbx)
movl 0x4(%rbx), %eax
testl %eax, %eax
jle 0x75a7
cmpl %r14d, %eax
movl %r14d, %ecx
cmovll %eax, %ecx
subl %ecx, %eax
movl %eax, 0x4(%rbx)
subl %ecx, %r14d
movl %r14d, %eax
movl %eax, 0x8(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x84a6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f72(%rip), %rdi      # 0xd539
leaq 0x5f81(%rip), %rsi      # 0xd54f
leaq 0x5f88(%rip), %rcx      # 0xd55d
pushq $0x46
popq %rdx
callq 0x3170
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x84a6
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::Node::update_backward()
void FlowGraph::Node::update_backward()
{
	if (excess <= 0)
		return;

	int amount = incoming() - excess;

	multimap<int, Edge*> sorted_edges;
	for (Edge* edge : incoming_edges)
		sorted_edges.insert( std::pair<int, Edge*>(edge->actual_flow, edge) );

	size_t edges_remaining = sorted_edges.size();
	int amount_remaining = amount;

	for (auto& it : sorted_edges)
	{
		Edge* edge = it.second;
		auto capacity = it.first;

		int fair_share = amount_remaining / edges_remaining; // beware: integer division
		if (fair_share < capacity)
			edge->actual_capacity = fair_share;
		else
		{
			edge->actual_capacity = capacity; // set edge flow to maximum possible value
			amount_remaining -= capacity; // the remaining amount must now be shared over even less edges
			edges_remaining--;
		}

		assert(amount_remaining >= 0);
	}

	assert(edges_remaining > 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl 0x8(%rdi), %ebp
testl %ebp, %ebp
jle 0x76cc
movq %rdi, %r14
callq 0x7470
movl %eax, %ebx
subl %ebp, %ebx
leaq 0x20(%rsp), %r12
andl $0x0, (%r12)
andq $0x0, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
andq $0x0, 0x20(%r12)
movq 0x10(%r14), %r13
movq 0x18(%r14), %rbp
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
cmpq %rbp, %r13
je 0x766f
movq (%r13), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x84fe
addq $0x8, %r13
jmp 0x7649
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %r14
cmpq %r12, %rdi
je 0x76bd
movq 0x28(%rdi), %rsi
movl 0x20(%rdi), %ecx
movslq %ebx, %rbx
movq %rbx, %rax
xorl %edx, %edx
divq %r14
cmpl %eax, %ecx
movl %eax, %edx
cmovll %ecx, %edx
movl $0x0, %r8d
cmovlel %ecx, %r8d
subl %r8d, %ebx
movl %edx, 0x4(%rsi)
js 0x76db
xorl %edx, %edx
cmpl %eax, %ecx
setle %dl
subq %rdx, %r14
callq 0x3190
movq %rax, %rdi
jmp 0x7679
testq %r14, %r14
je 0x76f8
leaq 0x18(%rsp), %rdi
callq 0x84a6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5e57(%rip), %rdi      # 0xd539
leaq 0x5e66(%rip), %rsi      # 0xd54f
leaq 0x5e94(%rip), %rcx      # 0xd584
pushq $0x78
popq %rdx
callq 0x3170
leaq 0x5ead(%rip), %rdi      # 0xd5ac
leaq 0x5e49(%rip), %rsi      # 0xd54f
leaq 0x5e77(%rip), %rcx      # 0xd584
pushq $0x7b
jmp 0x76f2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x84a6
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::calculate()
void FlowGraph::calculate()
{
	//dump("initial");
	bool done;
	int i = 0;
	do
	{
		for (auto& node : nodes)
			node.update_forward();

		//dump("it"+to_string(i));

		for (auto& node : nodes)
			node.update_backward();

		done = true;
		for (auto& node : nodes)
			if (node.excess > 0)
				done = false;

		//dump("it"+to_string(i)+".5");
		i++;
	} while(!done);
	dump("FINAL");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r15, %r14
je 0x774c
movq %r14, %rdi
callq 0x74a2
addq $0x40, %r14
jmp 0x7739
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x7766
movq %r14, %rdi
callq 0x75f2
addq $0x40, %r14
jmp 0x7753
movq (%rbx), %r14
movq 0x8(%rbx), %r15
movb $0x1, %al
movq %r14, %rcx
cmpq %r15, %rcx
je 0x7786
cmpl $0x0, 0x8(%rcx)
setle %dl
andb %dl, %al
addq $0x40, %rcx
jmp 0x7772
testb $0x1, %al
je 0x7739
leaq 0x5e2f(%rip), %rsi      # 0xd5c0
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x4636
movq %rbx, %rdi
movq %r14, %rsi
callq 0x77d8
leaq 0x10(%rsp), %rdi
callq 0x3418
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3418
movq %rbx, %rdi
callq 0x33c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::dump(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const
void FlowGraph::dump(string name) const
{
	cout << "digraph \""<<name<<"\" {" << endl;

	for (size_t i=0; i<nodes.size(); i++)
		cout << "\t" << i << " [" << nodes[i].label() << "];" << endl;

	cout << endl;

	for (const Edge& edge : edges)
		cout << "\t" << edge_from(&edge) << " -> " << edge_to(&edge) << " [" << edge.label() << "];" << endl;

	cout << "}" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0xd7d5(%rip), %rdi      # 0x14fc8
leaq 0x5dff(%rip), %rsi      # 0xd5f9
callq 0x3200
movq %rax, %rdi
movq %r14, %rsi
callq 0x31f0
leaq 0x5bc5(%rip), %rsi      # 0xd3d6
movq %rax, %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3110
xorl %r12d, %r12d
leaq 0x8(%rsp), %r13
leaq 0x5bca(%rip), %rbp      # 0xd3fa
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x6, %rax
movq 0xd783(%rip), %rdi      # 0x14fc8
cmpq %rax, %r14
jae 0x78b0
leaq 0x5b89(%rip), %rsi      # 0xd3da
callq 0x3200
movq %rax, %rdi
movq %r14, %rsi
callq 0x3180
movq %rax, %rdi
leaq 0x5d98(%rip), %rsi      # 0xd603
callq 0x3200
movq %rax, %r15
movq (%rbx), %rsi
addq %r12, %rsi
movq %r13, %rdi
callq 0x7d16
movq %r15, %rdi
movq %r13, %rsi
callq 0x31f0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3200
movq %rax, %rdi
callq 0x3110
movq %r13, %rdi
callq 0x3418
incq %r14
addq $0x40, %r12
jmp 0x7833
callq 0x3110
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %rbp
leaq 0x8(%rsp), %r14
leaq 0x5b31(%rip), %r12      # 0xd3fa
movq 0xd6f8(%rip), %rdi      # 0x14fc8
cmpq %rbp, %r15
je 0x7972
leaq 0x5afa(%rip), %rsi      # 0xd3da
callq 0x3200
movq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8260
movq %r13, %rdi
movq %rax, %rsi
callq 0x3180
movq %rax, %rdi
leaq 0x5aec(%rip), %rsi      # 0xd3f4
callq 0x3200
movq %rax, %r13
movq %rbx, %rdi
movq %r15, %rsi
callq 0x82ee
movq %r13, %rdi
movq %rax, %rsi
callq 0x3180
movq %rax, %rdi
leaq 0x5cd3(%rip), %rsi      # 0xd603
callq 0x3200
movq %rax, %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x79e2
movq %r13, %rdi
movq %r14, %rsi
callq 0x31f0
movq %rax, %rdi
movq %r12, %rsi
callq 0x3200
movq %rax, %rdi
callq 0x3110
movq %r14, %rdi
callq 0x3418
addq $0xc, %r15
jmp 0x78c9
leaq 0x5a84(%rip), %rsi      # 0xd3fd
callq 0x3200
movq %rax, %rdi
callq 0x3110
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7997
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3418
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::edge_from(FlowGraph::Edge const*) const
size_t FlowGraph::edge_from(const Edge* edge) const
{
	for (size_t i=0; i<nodes.size(); i++)
	{
		for (const Edge* e : nodes[i].outgoing_edges)
			if (e == edge)
				return i;
	}

	throw runtime_error("FlowGraph is corrupt");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
sarq $0x6, %rdx
xorl %eax, %eax
cmpq %rdx, %rax
je 0x82aa
movq %rax, %rdi
shlq $0x6, %rdi
movq 0x28(%rcx,%rdi), %r8
movq 0x30(%rcx,%rdi), %rdi
cmpq %rdi, %r8
je 0x829d
leaq 0x8(%r8), %r9
cmpq %rsi, (%r8)
movq %r9, %r8
jne 0x828a
jmp 0x82a2
incq %rax
jmp 0x8274
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x534a(%rip), %rsi      # 0xd606
movq %rax, %rdi
callq 0x30e0
movq 0xcd25(%rip), %rsi      # 0x14ff0
movq 0xccee(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x31b0
movq %r14, %rdi
callq 0x33c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/flowgraph.cpp
// Function: FlowGraph::edge_to(FlowGraph::Edge const*) const
size_t FlowGraph::edge_to(const Edge* edge) const
{
	for (size_t i=0; i<nodes.size(); i++)
	{
		for (const Edge* e : nodes[i].incoming_edges)
			if (e == edge)
				return i;
	}

	throw runtime_error("FlowGraph is corrupt");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
subq %rcx, %rdx
sarq $0x6, %rdx
xorl %eax, %eax
cmpq %rdx, %rax
je 0x8338
movq %rax, %rdi
shlq $0x6, %rdi
movq 0x10(%rcx,%rdi), %r8
movq 0x18(%rcx,%rdi), %rdi
cmpq %rdi, %r8
je 0x832b
leaq 0x8(%r8), %r9
cmpq %rsi, (%r8)
movq %r9, %r8
jne 0x8318
jmp 0x8330
incq %rax
jmp 0x8302
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $0x10
popq %rdi
callq 0x3120
movq %rax, %rbx
leaq 0x52bc(%rip), %rsi      # 0xd606
movq %rax, %rdi
callq 0x30e0
movq 0xcc97(%rip), %rsi      # 0x14ff0
movq 0xcc60(%rip), %rdx      # 0x14fc0
movq %rbx, %rdi
callq 0x33a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x31b0
movq %r14, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/Windfisch[P]production-flow/./factory.hpp
// Function: Factory::Facility::Facility(std::vector<Factory::FacilityConfiguration, std::allocator<Factory::FacilityConfiguration>>)
Facility(std::vector<FacilityConfiguration> upgrade_plan_) :
			upgrade_plan(std::move(upgrade_plan_))
		{
			for (const auto& conf : upgrade_plan)
				for (const auto& itemprod : conf.production_or_consumption)
					if (itemprod.second != 0)
						items.insert(itemprod.first);
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x28(%rdi), %rax
andl $0x0, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x20(%rdi), %r14
movq (%rdi), %r12
movq 0x8(%rdi), %r13
cmpq %r13, %r12
je 0xbac0
movq 0x18(%r12), %r15
leaq 0x8(%r12), %rbp
cmpq %rbp, %r15
je 0xbaba
cmpl $0x0, 0x24(%r15)
je 0xbaad
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x6018
movq %r15, %rdi
callq 0x3250
movq %rax, %r15
jmp 0xba95
addq $0x38, %r12
jmp 0xba86
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x49cc
movq %rbx, %rdi
callq 0x49aa
movq %r15, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/multiset.cc
// Function: main
int main()
{
	// uses hash<Sales_data> and Sales_data operator==
	unordered_multiset<Sales_data> SDset;
	Sales_data item;
	while (cin >> item) {
		SDset.insert(item);
	}
	cout << SDset.size() << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
leaq -0x20(%rbp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
leaq -0x70(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
andl $0x0, 0x10(%rcx)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
andq $0x0, 0x18(%rcx)
movups %xmm0, -0x8(%rax)
movq 0x2c55(%rip), %rbx      # 0x4fe0
leaq -0x80(%rbp), %r14
leaq -0x50(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2bcc
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x23b9
movq %r15, %rdi
movq %r14, %rsi
callq 0x24fc
jmp 0x2393
movq -0x38(%rbp), %rsi
movq 0x2c0c(%rip), %rdi      # 0x4fd0
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq -0x80(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x241e
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x23f2
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x241e
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH03_StringsVectorsAndArrays/examples/arrayScores.cc
// Function: main
int main ()
{
	vector<unsigned> grades;
	// count the number of grades by clusters of ten: 
	// 0--9, 10--19, . . . 90--99, 100
	unsigned scores[11] = {};  // 11 buckets, all value initialized to 0
	unsigned grade;
	while (cin >> grade) {
		if (grade <= 100)
			// increment the counter for the current cluster
			++scores[grade/10]; 
		grades.push_back(grade);
	}
	cout << "grades.size = " << grades.size() << endl;

	for (auto g : grades)  // for every element in grades
		cout << g << " " ;
	cout << endl;

	for (auto i : scores)       // for each counter in scores
		cout << i << " ";       // print the value of that counter
	cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
leaq -0x40(%rbp), %rbx
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movups %xmm0, -0x54(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movq 0x2d53(%rip), %r14      # 0x3fe0
leaq -0x24(%rbp), %r15
movb $0xa, %r12b
movq %r14, %rdi
movq %r15, %rsi
callq 0x1100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x12cf
movl -0x24(%rbp), %eax
cmpl $0x64, %eax
ja 0x12c2
movzbl %al, %eax
divb %r12b
movzbl %al, %eax
incl -0x70(%rbp,%rax,4)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13b4
jmp 0x1294
movq 0x2cfa(%rip), %rdi      # 0x3fd0
leaq 0xd27(%rip), %rsi       # 0x2004
callq 0x10b0
movq -0x38(%rbp), %rsi
subq -0x40(%rbp), %rsi
sarq $0x2, %rsi
movq %rax, %rdi
callq 0x1080
movq %rax, %rdi
callq 0x1060
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %r12
movq 0x2cc3(%rip), %rbx      # 0x3fd0
leaq 0xcfd(%rip), %r14       # 0x2011
cmpq %r12, %r15
je 0x1335
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x1314
movq 0x2c94(%rip), %rdi      # 0x3fd0
callq 0x1060
xorl %r15d, %r15d
movq 0x2c85(%rip), %rbx      # 0x3fd0
leaq 0xcbf(%rip), %r14       # 0x2011
cmpq $0x2c, %r15
je 0x1376
movl -0x70(%rbp,%r15), %esi
movq %rbx, %rdi
callq 0x1080
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x4, %r15
jmp 0x1352
movq 0x2c53(%rip), %rdi      # 0x3fd0
callq 0x1060
leaq -0x40(%rbp), %rdi
callq 0x13e8
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13a0
jmp 0x13a0
jmp 0x13a0
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x13e8
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.c
// Function: sum2fft
void sum2fft(const double *input, double *output, unsigned size, int inverse) {
    unsigned k;

    double temp[4], cosfi, sinfi,
        dfi = (inverse ? 2.0 : -2.0) * M_PI / (double)(size << 1),
        kfi = 0.0;

    for (k = 0; k < size; k++) {
        cosfi = cos(kfi); sinfi = sin(kfi);
        temp[0] = input[k << 1]; temp[1] = input[(k << 1) + 1];
        temp[2] = input[(k + size) << 1]; temp[3] = input[((k + size) << 1) + 1];

        output[k << 1] = temp[0] + cosfi * temp[2] - sinfi * temp[3];
        output[(k << 1) + 1] = temp[1] + sinfi * temp[2] + cosfi * temp[3];
        output[(k + size) << 1] = temp[0] - cosfi * temp[2] + sinfi * temp[3];
        output[((k + size) << 1) + 1] = temp[1] - sinfi * temp[2] - cosfi * temp[3];
        kfi += dfi;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0xe14(%rip), %rcx       # 0x2010
leal (%rdx,%rdx), %r15d
cvtsi2sd %r15, %xmm0
movsd (%rcx,%rax,8), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movl %edx, %r12d
addq %r12, %r12
leaq 0x1(%r15), %r13
xorpd %xmm0, %xmm0
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x12f8
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq 0x1070
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x1090
movl %ebp, %eax
andl $-0x2, %eax
shlq $0x3, %rax
leal (%r15,%rbp), %ecx
movsd (%r14,%rcx,8), %xmm3
leal (%r13,%rbp), %edx
movsd (%r14,%rdx,8), %xmm2
movapd %xmm0, %xmm1
xorpd 0xdab(%rip), %xmm1      # 0x2020
movapd 0x10(%rsp), %xmm7
movapd %xmm7, %xmm4
unpcklpd %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
movapd %xmm7, %xmm5
mulsd %xmm3, %xmm5
movapd %xmm0, %xmm6
mulsd %xmm3, %xmm0
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm4, %xmm3
movupd (%r14,%rax), %xmm4
addpd %xmm4, %xmm3
unpcklpd %xmm7, %xmm1            # xmm1 = xmm1[0],xmm7[0]
mulsd %xmm2, %xmm6
mulsd %xmm2, %xmm7
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm3, %xmm2
movupd %xmm2, (%rbx,%rax)
movapd %xmm4, %xmm1
subsd %xmm5, %xmm1
addsd %xmm1, %xmm6
movsd %xmm6, (%rbx,%rcx,8)
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
subsd %xmm0, %xmm4
movsd (%rsp), %xmm0
subsd %xmm7, %xmm4
movsd %xmm4, (%rbx,%rdx,8)
addsd 0x8(%rsp), %xmm0
addq $0x2, %rbp
jmp 0x1224
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/markondej[P]phase_correl/phase_correl.c
// Function: gen2fftorder
unsigned *gen2fftorder(unsigned size) {
    unsigned *offset = (unsigned *)malloc(sizeof(unsigned) * size),
        stride = 1, step;

    memset(offset, 0xff, sizeof(unsigned) * size);
    offset[0] = 0;

    for (step = size >> 1; step > 0; step >>= 1) {
        unsigned base = 0, i;
        for (i = 0; i < size; i += step) {
            if (offset[i] != UINT_MAX) {
                base = offset[i];
            } else {
                offset[i] = base + stride;
            }
        }
        stride <<= 1;
    }

    return offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
movl %edi, %r15d
shlq $0x2, %r15
movq %r15, %rdi
callq 0x1080
movq %rax, %r14
movq %rax, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x1060
andl $0x0, (%r14)
pushq $0x1
popq %rax
movl %ebx, %ecx
cmpl $0x2, %ecx
jb 0x136a
shrl %ecx
xorl %esi, %esi
xorl %edx, %edx
cmpl %ebx, %edx
jae 0x1366
movl %edx, %edi
movl (%r14,%rdi,4), %r8d
cmpl $-0x1, %r8d
jne 0x135f
leal (%rsi,%rax), %r8d
movl %r8d, (%r14,%rdi,4)
movl %esi, %r8d
addl %ecx, %edx
movl %r8d, %esi
jmp 0x1344
addl %eax, %eax
jmp 0x1339
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq