LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tyhsu[P]Ewn/game.cpp
// Function: Game::create_movable_chs_map()
Movable_chs_map Game::create_movable_chs_map()
{
	Movable_chs_map movable_chs_map_;
	for(int exist_=0; exist_<(1<<6); exist_++) { // each exist status
		for(int dice=0; dice<6; dice++) {
			int former_chs_index = -1, latter_chs_index = -1;
			for(int i=dice-1; i>=0; i--) {
				if((exist_%(1<<(i+1)))/(1<<i) == true) {
					former_chs_index = i;
					break;
				}
			}
			for(int i=dice+1; i<6; i++) {
				if((exist_>>i)%2 == true) {
					latter_chs_index = i;
					break;
				}
			}
			former_chs_index = (former_chs_index == -1) ? latter_chs_index : former_chs_index;
			latter_chs_index = (latter_chs_index == -1) ? former_chs_index : latter_chs_index;
			pair<int, int> fir(dice, exist_), sec(former_chs_index, latter_chs_index);
			movable_chs_map_.insert(make_pair(fir, sec));
		}
	}
	return movable_chs_map_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %r14, 0x28(%rdi)
leaq -0x38(%rbp), %r15
movq %r14, %r12
shlq $0x20, %r12
xorl %r13d, %r13d
movl %r13d, %ecx
testl %ecx, %ecx
jle 0x85cc
leal -0x1(%rcx), %esi
movl $0x1, %edi
shll %cl, %edi
movl %r14d, %eax
cltd
idivl %edi
movl %esi, %ecx
shrl %cl, %edx
movl %esi, %ecx
cmpl $0x1, %edx
jne 0x85ab
jmp 0x85d1
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %r13d, %ecx
cmpl $0x5, %ecx
je 0x85f0
movl %r14d, %edx
shrl %cl, %edx
leal 0x1(%rcx), %eax
movl %eax, %ecx
testb $0x2, %dl
je 0x85d4
cmpl $-0x1, %esi
cmovel %eax, %esi
jmp 0x85f2
movl %esi, %eax
movq %r12, %rcx
orq %r13, %rcx
shlq $0x20, %rax
movl %esi, %edx
orq %rax, %rdx
movq %rcx, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8650
incq %r13
cmpq $0x6, %r13
jne 0x85a8
incq %r14
cmpq $0x40, %r14
jne 0x859e
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2840
movq %r14, %rdi
callq 0x2200
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/aligned_allocator.hpp
// Function: cpp::aligned_allocator<float, 32ul>::allocate(unsigned long) const
T* allocate(const std::size_t n) const {
        // The return value of allocate(0) is unspecified.
        // Mallocator returns nullptr in order to avoid depending
        // on malloc(0)'s implementation-defined behavior
        // (the implementation can define malloc(0) to return nullptr,
        // in which case the bad_alloc check below would fire).
        // All allocators can return nullptr in this case.
        if (n == 0) {
            return nullptr;
        }

        // All allocators should contain an integer overflow check.
        // The Standardization Committee recommends that std::length_error
        // be thrown in the case of integer overflow.
        if (n > max_size()) {
            throw std::length_error("aligned_allocator<T>::allocate() - Integer overflow.");
        }

        void* pv = aligned_allocate(n);

        // Allocators should throw std::bad_alloc in the case of memory allocation failure.
        if (!pv) {
            throw std::bad_alloc();
        }

        return static_cast<T*>(pv);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x176bd
movq %rsi, %rax
shrq $0x3e, %rax
jne 0x176c7
movq %rsi, %rdi
callq 0x1770c
testq %rax, %rax
jne 0x176bf
movl $0x8, %edi
callq 0x8200
movq 0x688c0(%rip), %rcx     # 0x7ff60
movq 0x688f9(%rip), %rsi     # 0x7ffa0
movq 0x68882(%rip), %rdx     # 0x7ff30
movq %rax, %rdi
addq $0x10, %rcx
movq %rcx, (%rax)
callq 0x8780
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x8200
movq %rax, %rbx
leaq 0x47069(%rip), %rsi     # 0x5e744
movq %rax, %rdi
callq 0x8580
movq 0x688c6(%rip), %rsi     # 0x7ffb0
movq 0x68877(%rip), %rdx     # 0x7ff68
movq %rbx, %rdi
callq 0x8780
movq %rbx, %rdi
movq %rax, %r14
callq 0x8350
movq %r14, %rdi
callq 0x87c0
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/aligned_allocator.hpp
// Function: cpp::aligned_allocator<double, 48ul>::aligned_allocate(unsigned long)
static T* aligned_allocate(std::size_t size) {
        auto required_bytes = sizeof(T) * size;
        auto offset         = (A - 1) + sizeof(uintptr_t);
        auto orig           = malloc(required_bytes + offset);

        if (!orig) {
            return nullptr;
        }

        if ((reinterpret_cast<size_t>(orig) + sizeof(uintptr_t)) % A == 0) {
            auto aligned = reinterpret_cast<void**>((reinterpret_cast<size_t>(orig) + sizeof(uintptr_t)));
            aligned[-1] = orig;
            return reinterpret_cast<T*>(aligned);
        } else {
            auto diff    = (reinterpret_cast<size_t>(orig) + sizeof(uintptr_t)) % A;
            auto offset  = A - diff;
            auto aligned = reinterpret_cast<void**>((reinterpret_cast<size_t>(orig) + sizeof(uintptr_t) + offset));
            aligned[-1] = orig;
            return reinterpret_cast<T*>(aligned);
        }
    }

// Assembly:
pushq %rax
leaq 0x37(,%rdi,8), %rdi
callq 0x8620
testq %rax, %rax
je 0x17833
leaq 0x8(%rax), %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulxq %rcx, %rcx, %rcx
shrq $0x5, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
negq %rcx
leaq 0x8(%rax,%rcx), %rsi
movq %rax, %rcx
subq %rsi, %rcx
addq $0x38, %rcx
testq %rsi, %rsi
cmoveq %rdx, %rcx
movq %rax, -0x8(%rcx)
jmp 0x17835
xorl %ecx, %ecx
movq %rcx, %rax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/assert.hpp
// Function: void cpp::assertion::detail::assertion_failed_msg<char>(char const*, char const*, char const*, char const*, unsigned long)
void assertion_failed_msg(const CharT* expr, const char* msg, const char* function, const char* file, size_t line) {
    std::cerr
        << "***** Internal Program Error - assertion (" << expr << ") failed in "
        << function << ":\n"
        << file << '(' << line << "): " << msg << std::endl;
    std::abort();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x6795e(%rip), %rbp     # 0x7ffe8
movq %rdx, %r12
movq %rsi, %rbx
leaq 0x462f4(%rip), %rsi     # 0x5e98b
movl $0x2a, %edx
movq %rdi, %r13
movq %r8, %r14
movq %rcx, %r15
movq %rbp, %rdi
callq 0x8560
testq %r13, %r13
jne 0x186cd
movq (%rbp), %rax
movq -0x18(%rax), %rax
movl 0x20(%rbp,%rax), %esi
leaq (%rbp,%rax), %rdi
orl $0x1, %esi
callq 0x8760
jmp 0x186e7
movq %r13, %rdi
callq 0x81b0
movq 0x6790c(%rip), %rdi     # 0x7ffe8
movq %r13, %rsi
movq %rax, %rdx
callq 0x8560
movq 0x678fa(%rip), %r13     # 0x7ffe8
leaq 0x462c1(%rip), %rsi     # 0x5e9b6
movl $0xc, %edx
movq %r13, %rdi
callq 0x8560
testq %r12, %r12
jne 0x18723
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x20(%r13,%rax), %esi
leaq (%r13,%rax), %rdi
orl $0x1, %esi
callq 0x8760
jmp 0x1873d
movq %r12, %rdi
callq 0x81b0
movq 0x678b6(%rip), %rdi     # 0x7ffe8
movq %r12, %rsi
movq %rax, %rdx
callq 0x8560
movq 0x678a4(%rip), %r12     # 0x7ffe8
leaq 0x4d48d(%rip), %rsi     # 0x65bd8
movl $0x2, %edx
movq %r12, %rdi
callq 0x8560
testq %r15, %r15
jne 0x18778
movq (%r12), %rax
movq -0x18(%rax), %rax
movl 0x20(%r12,%rax), %esi
leaq (%r12,%rax), %rdi
orl $0x1, %esi
callq 0x8760
jmp 0x18792
movq %r15, %rdi
callq 0x81b0
movq 0x67861(%rip), %rdi     # 0x7ffe8
movq %r15, %rsi
movq %rax, %rdx
callq 0x8560
movq 0x6784f(%rip), %rdi     # 0x7ffe8
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
movb $0x28, (%rsi)
callq 0x8560
movq %rax, %rdi
movq %r14, %rsi
callq 0x8300
leaq 0x46206(%rip), %rsi     # 0x5e9c3
movl $0x3, %edx
movq %rax, %rdi
movq %rax, %r14
callq 0x8560
testq %rbx, %rbx
jne 0x187ee
movq (%r14), %rax
movq %r14, %rdi
movq -0x18(%rax), %rax
movl 0x20(%r14,%rax), %esi
addq %rax, %rdi
orl $0x1, %esi
callq 0x8760
jmp 0x18804
movq %rbx, %rdi
callq 0x81b0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8560
movq %r14, %rdi
callq 0x81f0
movl $0x4, %edi
callq 0x8200
movq 0x676fb(%rip), %rsi     # 0x7ff18
movl $0x1, (%rax)
movq %rax, %rdi
xorl %edx, %edx
callq 0x8780
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/data.hpp
// Function: void cpp::normalize<std::vector<double, std::allocator<double>>>(std::vector<double, std::allocator<double>>&)
void normalize(Container& container) {
    //normalize to zero-mean
    auto m = cpp::mean(container);
    for (auto& v : container) {
        v -= m;
    }

    //normalize to unit variance
    if (auto s = cpp::stddev(container, 0.0); s != 0.0) {
        for (auto& v : container) {
            v /= s;
        }
    }
}

// Assembly:
pushq %rbx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
movq %rdi, %rbx
cmpq %rax, %rcx
je 0x1b843
vxorpd %xmm2, %xmm2, %xmm2
movq %rcx, %rdx
vaddsd (%rdx), %xmm2, %xmm2
addq $0x8, %rdx
cmpq %rax, %rdx
jne 0x1b797
movq %rax, %rsi
subq %rcx, %rsi
movq %rax, %rdx
vxorpd %xmm1, %xmm1, %xmm1
sarq $0x3, %rsi
subq %rcx, %rdx
vcvtsi2sd %rsi, %xmm0, %xmm0
je 0x1b853
vdivsd %xmm0, %xmm2, %xmm3
vpmovsxbq 0x43277(%rip), %zmm4 # 0x5ea48
addq $-0x8, %rdx
xorl %esi, %esi
vpbroadcastq %rdx, %zmm2
shrq $0x3, %rdx
addq $0x8, %rdx
vpsrlq $0x3, %zmm2, %zmm2
andq $-0x8, %rdx
vbroadcastsd %xmm3, %zmm3
vpbroadcastq %rsi, %zmm5
vporq %zmm4, %zmm5, %zmm5
vpcmpleuq %zmm2, %zmm5, %k1
vmovupd (%rcx,%rsi,8), %zmm5 {%k1} {z}
vsubpd %zmm3, %zmm5, %zmm5
vmovupd %zmm5, (%rcx,%rsi,8) {%k1}
addq $0x8, %rsi
cmpq %rsi, %rdx
jne 0x1b7f6
cmpq %rax, %rcx
je 0x1b853
vxorpd %xmm1, %xmm1, %xmm1
vmovsd (%rcx), %xmm2
addq $0x8, %rcx
vfmadd231sd %xmm2, %xmm2, %xmm1 # xmm1 = (xmm2 * xmm2) + xmm1
cmpq %rax, %rcx
jne 0x1b82f
jmp 0x1b853
subq %rcx, %rax
vxorpd %xmm1, %xmm1, %xmm1
sarq $0x3, %rax
vcvtsi2sd %rax, %xmm0, %xmm0
vdivsd %xmm0, %xmm1, %xmm0
vxorpd %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jb 0x1b867
vsqrtsd %xmm0, %xmm0, %xmm0
jmp 0x1b873
vzeroupper
callq 0x83c0
vxorpd %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jne 0x1b87b
jnp 0x1b8e9
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x1b8e9
vpmovsxbq 0x431b7(%rip), %zmm2 # 0x5ea48
subq %rax, %rcx
vbroadcastsd %xmm0, %zmm0
xorl %edx, %edx
addq $-0x8, %rcx
vpbroadcastq %rcx, %zmm1
shrq $0x3, %rcx
addq $0x8, %rcx
vpsrlq $0x3, %zmm1, %zmm1
andq $-0x8, %rcx
vpbroadcastq %rdx, %zmm3
vporq %zmm2, %zmm3, %zmm3
vpcmpleuq %zmm1, %zmm3, %k1
vmovupd (%rax,%rdx,8), %zmm3 {%k1} {z}
vdivpd %zmm0, %zmm3, %zmm3
vmovupd %zmm3, (%rax,%rdx,8) {%k1}
addq $0x8, %rdx
cmpq %rdx, %rcx
jne 0x1b8b9
popq %rbx
vzeroupper
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/doctest/doctest/doctest.h
// Function: doctest::detail::Expression_lhs<bool&>::operator doctest::detail::Result()
DOCTEST_NOINLINE operator Result() {
// this is needed only for MSVC 2015
DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4800) // 'int': forcing value to bool
            bool res = static_cast<bool>(lhs);
DOCTEST_MSVC_SUPPRESS_WARNING_POP
            if(m_at & assertType::is_false) { //!OCLINT bitwise operator in conditional
                res = !res;
            }

            if(!res || getContextOptions()->success) {
                return { res, (DOCTEST_STRINGIFY(lhs)) };
            }
            return { res };
        }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq (%rsi), %rax
movb 0x9(%rsi), %bpl
movq %rdi, %rbx
movb (%rax), %al
xorb %al, %bpl
testb $0x1, %bpl
je 0x1d94e
movq %rsi, %r14
callq 0x3fcaa
cmpb $0x1, 0x6c(%rax)
jne 0x1d975
movq (%r14), %rax
movb (%rax), %al
movzbl %al, %esi
leaq 0x8(%rsp), %r14
andl $0x1, %esi
movq %r14, %rdi
callq 0x3fdb0
movzbl %bpl, %esi
movq %rbx, %rdi
movq %r14, %rdx
andl $0x1, %esi
callq 0x40ca2
jmp 0x1d992
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3edd8
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x40ca2
leaq 0x8(%rsp), %rdi
callq 0x3ede0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x1d9aa
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
callq 0x3ede0
movq %rbx, %rdi
callq 0x87c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/thread_pool.hpp
// Function: void cpp::default_thread_pool<std::deque>::do_task<DOCTEST_ANON_FUNC_2()::$_0, int>(DOCTEST_ANON_FUNC_2()::$_0, int)
void do_task(Functor fun, Args... args) {
        with_lock(main_lock, [fun, args..., this] () mutable {
            if (stop_flag) {
#ifndef CPP_UTILS_NO_EXCEPT
                throw std::runtime_error("cpp_utils: enqueue on stopped ThreadPool");
#else
                std::cerr << "cpp_utils: enqueue on stopped ThreadPool (exceptions disabled)" << std::endl;
                std::abort();
#endif
            }

            //Execute the task
            tasks.emplace_back([fun, args...] () mutable {
                fun(args...);
            });
        });

        condition.notify_one();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x80(%rdi), %rax
leaq 0x8(%rsp), %r15
movq %rdi, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rax, (%r15)
movq %r15, %rdi
movb $0x0, 0x8(%r15)
callq 0x277ec
movb $0x1, 0x8(%r15)
movb 0x108(%rbx), %al
cmpb $0x1, %al
je 0x2631d
movq 0x70(%rbx), %rcx
movq 0x60(%rbx), %rax
addq $-0x20, %rcx
cmpq %rcx, %rax
je 0x2622f
leaq 0x179(%rip), %rcx       # 0x2637e
leaq 0x180(%rip), %rdx       # 0x2638c
movq $0x0, 0x8(%rax)
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq %rcx, 0x18(%rax)
movq %rdx, 0x10(%rax)
movq 0x60(%rbx), %rax
addq $0x20, %rax
jmp 0x262f5
movq 0x78(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rcx, %rsi
subq 0x58(%rbx), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rcx
adcq $-0x1, %rsi
subq 0x68(%rbx), %rax
subq 0x40(%rbx), %rdx
shlq $0x4, %rsi
sarq $0x5, %rax
sarq $0x5, %rdx
addq %rax, %rdx
movabsq $0x7ffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFF
addq %rsi, %rdx
cmpq %rax, %rdx
je 0x2634f
subq 0x30(%rbx), %rcx
movq 0x38(%rbx), %rax
sarq $0x3, %rcx
subq %rcx, %rax
cmpq $0x1, %rax
ja 0x2629c
leaq 0x30(%rbx), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x27ee8
movl $0x200, %edi            # imm = 0x200
callq 0x84e0
movq 0x78(%rbx), %rcx
leaq 0xdb(%rip), %rdx        # 0x2638c
movq %rax, 0x8(%rcx)
leaq 0xc2(%rip), %rcx        # 0x2637e
movq 0x60(%rbx), %rax
movq $0x0, 0x8(%rax)
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq %rcx, 0x18(%rax)
movq %rdx, 0x10(%rax)
movq 0x78(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq 0x8(%rax), %rax
leaq 0x200(%rax), %rcx
movq %rax, 0x68(%rbx)
movq %rcx, 0x70(%rbx)
leaq 0x8(%rsp), %rdi
movq %rax, 0x60(%rbx)
callq 0x275ac
addq $0xa8, %rbx
movq %rbx, %rdi
callq 0x8210
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x8200
movq %rax, %rbx
leaq 0x3a351(%rip), %rsi     # 0x60682
movq %rax, %rdi
callq 0x8190
movq 0x59cb0(%rip), %rsi     # 0x7fff0
movq 0x59c29(%rip), %rdx     # 0x7ff70
movq %rbx, %rdi
callq 0x8780
leaq 0x3a355(%rip), %rdi     # 0x606ab
callq 0x8250
movq %rbx, %rdi
movq %rax, %r14
callq 0x8350
jmp 0x2636b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x275ac
movq %r14, %rdi
callq 0x87c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/thread_pool.hpp
// Function: cpp::default_thread_pool<std::deque>::~default_thread_pool()
~default_thread_pool() {
        with_lock(main_lock, [this] { stop_flag = true; });

        condition.notify_all();

        for (auto& thread : threads) {
            thread.join();
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x80(%rdi), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x277ec
leaq 0x8(%rsp), %rdi
movb $0x1, %al
movb %al, 0x8(%rdi)
movb %al, 0x108(%rbx)
callq 0x275ac
leaq 0xa8(%rbx), %r14
movq %r14, %rdi
callq 0x8770
movq (%rbx), %r15
movq 0x8(%rbx), %r12
cmpq %r12, %r15
je 0x27202
movq %r15, %rdi
callq 0x8890
addq $0x8, %r15
jmp 0x271ef
leaq 0xd8(%rbx), %rdi
callq 0x87e0
movq %r14, %rdi
callq 0x87e0
leaq 0x30(%rbx), %rdi
callq 0x275c2
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x27234
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x8500
movq %rbx, %rdi
callq 0x27602
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2724a
movq %rax, %rdi
callq 0x13d8e
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/thread_pool.hpp
// Function: cpp::default_thread_pool<std::deque>::default_thread_pool(unsigned long)
explicit default_thread_pool(std::size_t n) : status(n, thread_status::WAITING) {
        // The thread pool is of fixed size, avoid any possible reallocation
        threads.reserve(n);

        // Lets all the threads start at the same time and avoid any possible race conditions
        std::unique_lock<std::mutex> ulock(main_lock);

        for (std::size_t t = 0; t < n; ++t) {
            threads.emplace_back([this, t] {
                while (true) {
                    std::function<void()> task;

                    {
                        std::unique_lock<std::mutex> ulock(main_lock);

                        status[t] = thread_status::WAITING;

                        wait_condition.notify_one();

                        condition.wait(ulock, [this] {
                            return stop_flag || !tasks.empty();
                        });

                        if (stop_flag && tasks.empty()) {
                            return;
                        }

                        task = std::move(tasks.front());
                        tasks.pop_front();

                        status[t] = thread_status::WORKING;
                    }

                    task();
                }
            });
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
vxorps %xmm0, %xmm0, %xmm0
leaq 0x18(%rdi), %r14
leaq 0x8(%rsp), %rdx
movq %rsi, %r12
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
vmovups %xmm0, (%rdi)
movl $0x0, (%rdx)
leaq 0x28(%rsp), %rcx
movq %r14, %rdi
callq 0x273ce
leaq 0x30(%rbx), %r15
vxorps %xmm0, %xmm0, %xmm0
vmovups %zmm0, 0x40(%rbx)
vmovups %zmm0, 0x30(%rbx)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, 0x20(%rsp)
vzeroupper
callq 0x2765a
vxorps %xmm0, %xmm0, %xmm0
leaq 0xa8(%rbx), %r13
movq $0x0, 0xa0(%rbx)
movq %r13, %rdi
vmovups %ymm0, 0x80(%rbx)
vzeroupper
callq 0x8670
leaq 0xd8(%rbx), %rbp
movq %rbp, %rdi
callq 0x8670
movb $0x0, 0x108(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, 0x18(%rsp)
callq 0x274c4
leaq 0x80(%rbx), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x277ec
movb $0x1, 0x10(%rsp)
testq %r12, %r12
je 0x27353
leaq 0x28(%rsp), %r14
xorl %r15d, %r15d
movq %rbx, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27570
incq %r15
cmpq %r15, %r12
jne 0x27336
leaq 0x8(%rsp), %rdi
callq 0x275ac
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2736e
movq %rax, %r12
jmp 0x2738a
movq %rax, %r12
jmp 0x273a4
movq %rax, %r12
jmp 0x273bd
leaq 0x8(%rsp), %rdi
movq %rax, %r12
callq 0x275ac
movq %rbp, %rdi
callq 0x87e0
movq %r13, %rdi
callq 0x87e0
movq 0x18(%rsp), %rdi
callq 0x275c2
movq 0x20(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x273bd
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x8500
movq %rbx, %rdi
callq 0x27602
movq %r12, %rdi
callq 0x87c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/thread_pool.hpp
// Function: cpp::default_thread_pool<std::deque>::wait()
void wait() {
        while (true) {
            std::unique_lock<std::mutex> ulock(main_lock);

            if (tasks.empty() && std::find(status.begin(), status.end(), thread_status::WORKING) == status.end()) {
                return;
            }

            //At this point, there are still some threads working, we wait for
            //one of them to notify a change of status
            wait_condition.wait(ulock, [this] {
                return tasks.empty();
            });
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x80(%rdi), %r13
leaq 0xd8(%rdi), %r14
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %rdi, %rbx
movq %r13, 0x10(%rsp)
movq %r15, %rdi
movb $0x0, 0x18(%rsp)
callq 0x277ec
movb $0x1, 0x18(%rsp)
movq 0x40(%rbx), %rax
movq 0x60(%rbx), %rcx
cmpq %rax, %rcx
jne 0x27e96
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rsi
movl $0x1, 0xc(%rsp)
movq %r12, %rdx
callq 0x2802a
cmpq 0x20(%rbx), %rax
je 0x27eba
movq 0x40(%rbx), %rax
movq 0x60(%rbx), %rcx
cmpq %rax, %rcx
je 0x27eb0
movq %r14, %rdi
movq %r15, %rsi
callq 0x8120
movq 0x60(%rbx), %rax
cmpq 0x40(%rbx), %rax
jne 0x27e9b
movq %r15, %rdi
callq 0x275ac
jmp 0x27e4c
leaq 0x10(%rsp), %rdi
callq 0x275ac
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0x275ac
movq %rbx, %rdi
callq 0x87c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/streams.hpp
// Function: std::ostream& cpp::operator<<<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>(std::ostream&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
std::ostream& operator<<(std::ostream& os, const std::vector<T, A>& vec) {
    os << "[";
    std::string comma;
    for (auto& v : vec) {
        os << comma << v;
        comma = ", ";
    }
    os << "]";
    return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
leaq 0x27fd7(%rip), %rsi     # 0x6362f
movl $0x1, %edx
movq %rdi, %rbx
callq 0x8560
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x3b6d8
leaq 0x292b1(%rip), %r14     # 0x64941
leaq 0x8(%rsp), %r15
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8560
movq 0x8(%r13), %rdx
movq (%r13), %rsi
movq %rax, %rdi
callq 0x8560
movq 0x10(%rsp), %rdx
movl $0x2, %r8d
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x383f8
addq $0x20, %r13
cmpq %rbp, %r13
jne 0x3b695
leaq 0x27f92(%rip), %rsi     # 0x63671
movl $0x1, %edx
movq %rbx, %rdi
callq 0x8560
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3b703
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8500
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3b717
movq 0x8(%rsp), %rdi
movq %rax, %rbx
cmpq %r12, %rdi
je 0x3b731
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8500
movq %rbx, %rdi
callq 0x87c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/include/cpp_utils/string.hpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& cpp::ltrim<char, std::char_traits<char>, std::allocator<char>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
std::basic_string<CharT, Traits, Allocator>& ltrim(std::basic_string<CharT, Traits, Allocator>& s) {
    s.erase(s.begin(), std::find_if(s.begin(), s.end(),
									[](CharT c) {
										return !std::isspace(c);
									}));
    return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %rdi, %rbx
addq %r14, %rsi
movq %r14, %rdi
callq 0x3e57b
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movq %r14, %rsi
subq %rcx, %rsi
addq %rcx, %rdx
cmpq %rax, %rdx
je 0x3e2cd
subq %r14, %rax
movq %rbx, %rdi
movq %rax, %rdx
callq 0x3e51a
jmp 0x3e2d5
movq %rsi, 0x8(%rbx)
movb $0x0, (%rcx,%rsi)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/doctest/doctest/doctest.h
// Function: doctest::skipPathFromFilename(char const*)
const char* skipPathFromFilename(const char* file) {
#ifndef DOCTEST_CONFIG_DISABLE
    if(getContextOptions()->no_path_in_filenames) {
        auto back    = std::strrchr(file, '\\');
        auto forward = std::strrchr(file, '/');
        if(back || forward) {
            if(back > forward)
                forward = back;
            return forward + 1;
        }
    }
#endif // DOCTEST_CONFIG_DISABLE
    return file;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x40a04(%rip), %rax     # 0x80668
movq %rdi, %rbx
cmpb $0x1, 0x7c(%rax)
jne 0x3fc9f
movl $0x5c, %esi
movq %rbx, %rdi
callq 0x8550
movl $0x2f, %esi
movq %rbx, %rdi
movq %rax, %r14
callq 0x8550
cmpq %rax, %r14
movq %rax, %rcx
cmovaq %r14, %rcx
orq %rax, %r14
je 0x3fc9f
incq %rcx
movq %rcx, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/wichtounet[P]cpp_utils_test/doctest/doctest/doctest.h
// Function: doctest::SubcaseSignature::operator<(doctest::SubcaseSignature const&) const
bool SubcaseSignature::operator<(const SubcaseSignature& other) const {
    if(m_line != other.m_line)
        return m_line < other.m_line;
    if(std::strcmp(m_file, other.m_file) != 0)
        return std::strcmp(m_file, other.m_file) < 0;
    return m_name.compare(other.m_name) < 0;
}

// Assembly:
movl 0x20(%rsi), %eax
cmpl %eax, 0x20(%rdi)
jne 0x3fd54
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
movq 0x18(%rsi), %rsi
callq 0x8660
testl %eax, %eax
jne 0x3fd49
cmpb $0x0, 0x17(%rbx)
jns 0x3fd34
movq (%rbx), %rbx
cmpb $0x0, 0x17(%r14)
jns 0x3fd3e
movq (%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8660
shrl $0x1f, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/persistence.cc
// Function: PersistenceTest::start_test(void*)
void start_test(void *args = NULL) override
	{
		bool testmode = (args && *static_cast<bool *>(args));

		std::cout << "KVStore Persistence Test" << std::endl;

		if (testmode) {
			std::cout << "<<Test Mode>>" << std::endl;
			test(TEST_MAX);
		} else {
			std::cout << "<<Preparation Mode>>" << std::endl;
			prepare(TEST_MAX);
		}
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3e77
movb (%rsi), %bpl
movq 0xb1ec(%rip), %r14      # 0xefd0
leaq 0x73d8(%rip), %rsi      # 0xb1c3
movl $0x18, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
cmpb $0x1, %bpl
jne 0x3eb9
leaq 0x73ac(%rip), %rsi      # 0xb1dc
movl $0xd, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq 0xa8(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3f52
movq 0xb152(%rip), %r14      # 0xefd0
leaq 0x733e(%rip), %rsi      # 0xb1c3
movl $0x18, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq 0xb110(%rip), %r14      # 0xefd0
leaq 0x7323(%rip), %rsi      # 0xb1ea
movl $0x14, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq 0xa8(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4266
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/./test.h
// Function: void Test::expect<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void expect(const T &exp, const T &got,
		    const std::string &file, int line)
	{
		++nr_tests;
		if (exp == got) {
			++nr_passed_tests;
			return;
		}
		if (verbose) {
			std::cerr << "TEST Error @" << file << ":" << line;
			std::cerr << ", expected " << exp;
			std::cerr << ", got " << got << std::endl;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %rbx
movq %rdi, %r15
incq 0x8(%rdi)
movq %rsi, %r14
movq 0x8(%rsi), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x4b45
testq %rdx, %rdx
je 0x4c18
movq (%rbx), %rsi
movq (%r14), %rdi
callq 0x3290
testl %eax, %eax
je 0x4c18
cmpb $0x1, 0xa0(%r15)
jne 0x4c1c
movq 0xa496(%rip), %r15      # 0xeff0
leaq 0x66ad(%rip), %rsi      # 0xb20e
movl $0xc, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x32b0
movq %rax, %r12
leaq 0x6574(%rip), %rsi      # 0xb0fd
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
movq %r12, %rdi
movl %ebp, %esi
callq 0x33d0
leaq 0x6674(%rip), %rsi      # 0xb21b
movl $0xb, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x32b0
leaq 0x665d(%rip), %rsi      # 0xb227
movl $0x6, %edx
movq %r15, %rdi
callq 0x32b0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x32b0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31b0
incq 0x10(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/./test.h
// Function: Test::phase()
void phase(void)
	{
		// Report
		std::cout << "  Phase " << (nr_phases+1) << ": ";
		std::cout << nr_passed_tests << "/" << nr_tests << " ";

		// Count
		++nr_phases;
		if (nr_tests == nr_passed_tests) {
			++nr_passed_phases;
			std::cout << "[PASS]" << std::endl;
		} else
			std::cout << "[FAIL]" << std::endl;

		std::cout.flush();

		// Reset
		nr_tests = 0;
		nr_passed_tests = 0;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0xa398(%rip), %rbx      # 0xefd0
leaq 0x65ef(%rip), %rsi      # 0xb22e
movl $0x8, %edx
movq %rbx, %rdi
callq 0x32b0
movq 0x18(%r14), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x31a0
leaq 0x63c7(%rip), %rsi      # 0xb029
movl $0x2, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x31a0
movq %rax, %r15
leaq 0x65b2(%rip), %rsi      # 0xb237
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rsi
movq %r15, %rdi
callq 0x31a0
leaq 0x6648(%rip), %rsi      # 0xb2f1
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
incq 0x18(%r14)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
jne 0x4cd1
incq 0x20(%r14)
leaq 0x656a(%rip), %rsi      # 0xb239
jmp 0x4cd8
leaq 0x6568(%rip), %rsi      # 0xb240
movl $0x6, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq %rbx, %rdi
callq 0x31b0
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/./test.h
// Function: Test::report()
void report(void)
	{
		std::cout << nr_passed_phases << "/" << nr_phases << " passed.";
		std::cout << std::endl;
		std::cout.flush();

		nr_phases = 0;
		nr_passed_phases = 0;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
movq 0xa295(%rip), %r14      # 0xefd0
movq %r14, %rdi
callq 0x31a0
movq %rax, %r15
leaq 0x64ea(%rip), %rsi      # 0xb237
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x18(%rbx), %rsi
movq %r15, %rdi
callq 0x31a0
leaq 0x64da(%rip), %rsi      # 0xb247
movl $0x8, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
movq %r14, %rdi
callq 0x31b0
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/kvstore.cc
// Function: KVStore::KVStore(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
KVStore::KVStore(const std::string &dir)
    : KVStoreAPI(dir), dir(dir), verbose(false), memTableSize(0), level(0) {
    memTable = std::unique_ptr<SkipList<uint64_t, std::string>>(
        new SkipList<uint64_t, std::string>());
    // this->dir = dir;
    // root = std::filesystem::path(dir);
    fileNum.push_back(0);
    loadSsTable();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
leaq 0x9d34(%rip), %rax      # 0xec88
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x18(%rdi), %r12
movq %r12, 0x8(%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x95b2
movb $0x0, 0x28(%r15)
leaq 0x38(%r15), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r15)
movq $0x0, 0x70(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x4c(%r15)
movl $0x28, %edi
callq 0x3270
movq %rax, %rbp
leaq 0x60(%r15), %r13
movq %rax, %rdi
callq 0x84cc
movq (%r14), %rsi
movq %rbp, (%r14)
testq %rsi, %rsi
je 0x4fcc
movq %r14, %rdi
callq 0x9402
movl $0x0, 0x14(%rsp)
movq 0x68(%r15), %rsi
cmpq 0x70(%r15), %rsi
je 0x4fee
movl $0x0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%r15)
jmp 0x4ffb
leaq 0x14(%rsp), %rdx
movq %r13, %rdi
callq 0x97a2
movq %r15, %rdi
callq 0x508c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5014
movq %rax, 0x8(%rsp)
jmp 0x502d
movq %rax, 0x8(%rsp)
movl $0x28, %esi
movq %rbp, %rdi
callq 0x3280
movq (%r13), %rdi
jmp 0x503a
movq %rax, 0x8(%rsp)
xorl %edi, %edi
leaq 0x40(%r15), %r13
testq %rdi, %rdi
je 0x504f
movq 0x70(%r15), %rsi
subq %rdi, %rsi
callq 0x3280
movq %r13, %rdi
callq 0x8642
movq (%r14), %rsi
testq %rsi, %rsi
je 0x5067
movq %r14, %rdi
callq 0x9402
movq $0x0, (%r14)
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x5082
movq (%r12), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rsp), %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/kvstore.cc
// Function: KVStore::put(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void KVStore::put(uint64_t key, const std::string &s) {
    std::clog << "+ " << key << " " << std::string(s, 0, 50) << std::endl;
    memTable->put(key, s);
    memTableSize += getDataSize(s.length());
    if (verbose) {
        // std::clog << "put " << key << '\t' << s << "  done.\n";
        // std::clog << *memTable << '\n';
    }
    // if the size memTable reaches the threshold, then calls buildSsTable and
    // resets memTable
    if (this->memTableSize >= MEM_TABLE_SIZE_MAX) {
        convertMemTable();
        resetMemTable();
        // std::clog << *memTable << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x9bca(%rip), %r12      # 0xefa8
leaq 0x5f0b(%rip), %rsi      # 0xb2f0
movl $0x2, %edx
movq %r12, %rdi
callq 0x32b0
movq %r12, %rdi
movq %r15, %rsi
callq 0x31a0
movq %rax, %r12
leaq 0x5eea(%rip), %rsi      # 0xb2f1
movl $0x1, %edx
movq %rax, %rdi
callq 0x32b0
leaq 0x28(%rsp), %r13
movl $0x32, %ecx
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3070
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x32b0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5480
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x38(%rbx), %r12
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x95b2
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x8696
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54c9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%r14), %rax
movq 0x30(%rbx), %rcx
addq %rcx, %rax
addq $0x28, %rax
movq %rax, 0x30(%rbx)
cmpq $0x1fffff, %rax         # imm = 0x1FFFFF
jbe 0x54f4
movq %rbx, %rdi
callq 0x553e
movq %rbx, %rdi
callq 0x5a46
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5535
movq 0x18(%rsp), %rsi
jmp 0x552d
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5535
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/kvstore.cc
// Function: KVStore::resetMemTable()
void KVStore::resetMemTable() {
    // resets memTable
    memTable.release();
    memTable = std::unique_ptr<SkipList<uint64_t, std::string>>(
        new SkipList<uint64_t, std::string>());
    // reset state
    memTableSize = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq $0x0, 0x38(%rdi)
movl $0x28, %edi
callq 0x3270
movq %rax, %r14
movq %rax, %rdi
callq 0x84cc
leaq 0x38(%rbx), %rdi
movq (%rdi), %rsi
movq %r14, (%rdi)
testq %rsi, %rsi
je 0x5a7e
callq 0x9402
movq $0x0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x3280
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/kvstore.cc
// Function: KVStore::resolvePath[abi:cxx11](int) const
std::string KVStore::resolvePath(int level) const {
    std::filesystem::path root(this->dir);
    std::string lv = "level-" + std::to_string(level);
    if (level == -1) lv = "tmp";
    return std::filesystem::path(root / lv).string();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebp
movq %rdi, %rbx
addq $0x8, %rsi
leaq 0x70(%rsp), %rdi
movl $0x2, %edx
callq 0x8f64
movl %ebp, %r14d
negl %r14d
cmovsl %ebp, %r14d
movl $0x1, %r15d
cmpl $0xa, %r14d
jb 0x6741
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x6738
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x673e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x6741
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x6705
addl $-0x3, %r15d
jmp 0x6741
addl $-0x2, %r15d
jmp 0x6741
decl %r15d
movl %ebp, %r12d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x20(%rsp), %rdi
movl $0x2d, %edx
callq 0x32c0
movl %r12d, %edi
leaq 0x20(%rsp), %r12
addq (%r12), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0x94ef
leaq 0x4bbf(%rip), %rcx      # 0xb341
movl $0x6, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x32a0
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x67ba
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x67c1
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x67f0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
cmpl $-0x1, %ebp
jne 0x6810
movq %rsp, %rdi
movq 0x8(%rdi), %rdx
leaq 0x4b45(%rip), %rcx      # 0xb348
movl $0x3, %r8d
xorl %esi, %esi
callq 0x3360
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
movl $0x2, %edx
callq 0x8f64
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x92e0
movq 0x20(%rsp), %rsi
leaq 0x10(%rbx), %rax
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x4ea6
leaq 0x20(%rsp), %rdi
callq 0x8fe4
leaq 0x48(%rsp), %rdi
callq 0x8fe4
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x687c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x70(%rsp), %rdi
callq 0x8fe4
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x68bb
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8fe4
jmp 0x68af
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x8fe4
jmp 0x68be
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x68ed
movq 0x10(%rsp), %rsi
jmp 0x68e0
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x68ed
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x68ed
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x8fe4
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/kvstore.cc
// Function: KVStore::getIndex(int, int) const
int KVStore::getIndex(int level, int id) const {
    int index = 0;
    for (size_t i = 0; i < fileNum.size() && i < (size_t)level; i++) {
        index += fileNum[i];
    }
    index += id;
    return index;
}

// Assembly:
movq 0x60(%rdi), %rcx
movq 0x68(%rdi), %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
movslq %esi, %rax
cmpq %rdi, %rax
cmovbq %rax, %rdi
testq %rdi, %rdi
je 0x82b3
xorl %esi, %esi
xorl %eax, %eax
addl (%rcx,%rsi,4), %eax
incq %rsi
cmpq %rsi, %rdi
jne 0x82a6
jmp 0x82b5
xorl %eax, %eax
addl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/./skiplist.h
// Function: SkipList<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::SkipList()
SkipList<Key, Value>::SkipList() : level(1) {
    srand(time(nullptr));
    head = std::shared_ptr<Node>(new Node());
    tail = std::shared_ptr<Node>(new Node());
    head->succ = tail;
    tail->pred = head;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x1, 0x20(%rdi)
xorl %edi, %edi
callq 0x3230
movl %eax, %edi
callq 0x3240
movl $0x68, %edi
callq 0x3270
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x58(%rax)
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x9648
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x8567
callq 0x9436
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8567
callq 0x9436
movl $0x68, %edi
callq 0x3270
movq %rax, %rcx
addq $0x18, %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
movb $0x0, 0x18(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x58(%rax)
leaq 0x8(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %rax, %rsi
callq 0x9648
leaq 0x8(%rbx), %r14
leaq 0x18(%rbx), %r15
movaps (%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rsp)
movq 0x18(%rbx), %rdi
movups %xmm0, 0x10(%rbx)
testq %rdi, %rdi
je 0x85e0
callq 0x9436
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x85e0
callq 0x9436
movq (%rbx), %rdi
movq 0x10(%rbx), %rax
movq %rax, 0x38(%rdi)
addq $0x40, %rdi
movq %r15, %rsi
callq 0x94a6
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
movq %rax, 0x28(%rdi)
addq $0x30, %rdi
movq %r14, %rsi
callq 0x94a6
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x861a
movq %rax, %r14
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x862b
callq 0x9436
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8639
callq 0x9436
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeanChao[P]KV-Store/./skiplist.h
// Function: std::ostream& operator<<<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::ostream&, SkipList<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
std::ostream& operator<<(std::ostream& os, const SkipList<Key, Value>& l) {
    std::shared_ptr<typename SkipList<Key, Value>::Node> vPtr = l.head;
    while (vPtr) {
        std::shared_ptr<typename SkipList<Key, Value>::Node> hPtr = vPtr->succ;
        os << "#" << vPtr << " ";
        while (hPtr->succ) {
            os << (hPtr) << " " << hPtr->key << hPtr->val << '\t';
            hPtr = hPtr->succ;
        }
        os << "#" << hPtr << " ";
        os << '\n';
        vPtr = vPtr->below;
    }
    return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsi), %rcx
movq %rcx, 0x20(%rsp)
testq %rcx, %rcx
je 0x9da4
movq 0x5237(%rip), %rdx      # 0xefc8
cmpb $0x0, (%rdx)
je 0x9d9b
incl 0x8(%rcx)
jmp 0x9da4
lock
incl 0x8(%rcx)
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x9f16
leaq 0x20(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x1627(%rip), %r12      # 0xb3e5
leaq 0x152c(%rip), %r13      # 0xb2f1
leaq 0x7(%rsp), %rbp
movq 0x38(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x40(%rax), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x9df6
movq 0x51e0(%rip), %rcx      # 0xefc8
cmpb $0x0, (%rcx)
je 0x9df2
incl 0x8(%rax)
jmp 0x9df6
lock
incl 0x8(%rax)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32b0
movq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x31d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x32b0
movq 0x8(%rsp), %rsi
cmpq $0x0, 0x38(%rsi)
je 0x9e9d
movq %rbx, %rdi
callq 0x31d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x32b0
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x31a0
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rsi
movq 0x10(%rcx), %rdx
movq %rax, %rdi
callq 0x32b0
movb $0x9, 0x7(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x32b0
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rsi
movq %r15, %rdi
callq 0x94a6
jmp 0x9e23
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32b0
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x31d0
movl $0x1, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x32b0
movb $0xa, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x32b0
movq 0x18(%rsp), %rsi
movq 0x58(%rsi), %rax
movq %rax, 0x18(%rsp)
addq $0x60, %rsi
movq %r14, %rdi
callq 0x94a6
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9f08
callq 0x9436
movq 0x18(%rsp), %rax
testq %rax, %rax
jne 0x9dca
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9f25
callq 0x9436
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9f39
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x9f4b
callq 0x9436
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9f5a
callq 0x9436
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O3/elarielcl[P]ArielsSequitur/Sequitur.cpp
// Function: main
int main(int argc, char **argv) {
  extern char *optarg;
  extern int optind, opterr;
  FILE *fp = stdin;

  int c;

  while ((c = getopt(argc, argv, "f:")) != -1) {
    switch (c) {
      case 'f':
      fp = fopen(optarg, "r");
      if (fp == NULL) {
        cerr << "Error oppening \"" << optarg << "\" file" << endl;
        exit(1);
      } break;
    }
  }

  SequiturGrammar grammar;
  while (!feof(fp)) {
    int c = fgetc(fp);
    if (c == EOF) break;
    grammar.put(c);
  }

  fprintf (stderr,"\nSequitur succeeded\n\n");
  fprintf (stderr,"Grammar\n\n");
  grammar.print();

  fprintf (stderr,"Original chars: %i\n",grammar.inputSize);
  fprintf (stderr,"Number of rules: %i\n",grammar.numberOfRules);
  fprintf (stderr,"Grammar Size: %i\n",grammar.grammarSize);
  fprintf (stderr,"Compression ratio: %0.2f%%\n",
			100.0*blog(grammar.M+grammar.numberOfRules)*grammar.grammarSize/(8.0*grammar.inputSize)); // In case we code the grammar with log |R|+|$\Sigma$| bits

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movq 0x3a90(%rip), %rax      # 0x4fc0
movq (%rax), %r13
leaq 0x1ade(%rip), %r15      # 0x3018
leaq 0x1ada(%rip), %r12      # 0x301b
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1050
cmpl $0x66, %eax
je 0x155b
cmpl $-0x1, %eax
jne 0x1541
jmp 0x15bb
movq 0x3a4e(%rip), %rax      # 0x4fb0
movq (%rax), %rdi
movq %r12, %rsi
callq 0x1120
movq %rax, %r13
testq %rax, %rax
jne 0x1541
movq 0x3a74(%rip), %rdi      # 0x4ff0
leaq 0x1a9a(%rip), %rsi      # 0x301d
callq 0x10e0
movq 0x3a21(%rip), %rcx      # 0x4fb0
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x10e0
leaq 0x1a8d(%rip), %rsi      # 0x302e
movq %rax, %rdi
callq 0x10e0
movq %rax, %rdi
callq 0x1070
movl $0x1, %edi
callq 0x1130
movq %r13, %rdi
callq 0x11d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq