LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/src/framework/Pool.cpp
// Function: abcdl::framework::MeanPooling::pool(abcdl::algebra::Matrix<float>&, abcdl::algebra::Matrix<float> const&, unsigned long, unsigned long, unsigned long)
void MeanPooling::pool(abcdl::algebra::Mat& pool,
                       const abcdl::algebra::Mat& mat,
                       const size_t rows,
                       const size_t cols,
                       const size_t scale){
    real* data = new real[rows * cols];
    size_t pooling_size = scale * scale;
    for(size_t j = 0; j != rows; j++){
        for(size_t k = 0; k != cols; k++){
            real pooling_value = 0;
            for(size_t m = 0; m != scale; m++){
                for(size_t n = 0; n != scale; n++){
                    pooling_value += mat.get_data(j * scale + m, k * scale + n);
                }
            }
            data[j * cols + k] = pooling_value / pooling_size;
        }
    }
    pool.set_shallow_data(data, rows, cols);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %rdx, %r13
movq %rsi, 0x30(%rsp)
movq %r8, 0x10(%rsp)
movq %r8, %rax
movq %rcx, 0x20(%rsp)
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x8030
movq %rax, 0x18(%rsp)
movq %rbx, %rax
imulq %rbx, %rax
testq %rax, %rax
js 0x14f80
cvtsi2ss %rax, %xmm0
jmp 0x14f95
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
xorl %eax, %eax
cmpq 0x20(%rsp), %rax
je 0x1506b
movq %rax, %rcx
imulq %rbx, %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x38(%rsp)
imulq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0x28(%rsp)
xorl %eax, %eax
cmpq 0x10(%rsp), %rax
je 0x1505e
movq %rax, 0x48(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
cmpq %rbx, %rbp
je 0x15033
movq 0x50(%rsp), %rax
leaq (%rax,%rbp), %r12
movq %rbx, %r15
movq 0x28(%rsp), %r14
subq $0x1, %r15
jb 0x1502e
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x13b9a
movss 0x8(%rsp), %xmm0
addss (%rax), %xmm0
movss %xmm0, 0x8(%rsp)
incq %r14
jmp 0x15005
incq %rbp
jmp 0x14fef
movss 0x8(%rsp), %xmm0
divss 0xc(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq %rcx, %rax
incq %rax
addq %rbx, 0x28(%rsp)
jmp 0x14fd8
movq 0x38(%rsp), %rax
incq %rax
jmp 0x14f9d
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rcx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x169d0
// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/src/framework/Pool.cpp
// Function: abcdl::framework::MaxPooling::pool(abcdl::algebra::Matrix<float>&, abcdl::algebra::Matrix<float> const&, unsigned long, unsigned long, unsigned long)
void MaxPooling::pool(abcdl::algebra::Mat& pool,
                      const abcdl::algebra::Mat& mat,
                      const size_t rows,
                      const size_t cols,
                      const size_t scale){
    real* data = new real[rows * cols];
    for(size_t j = 0; j != rows; j++){
        for(size_t k = 0; k != cols; k++){
            real pooling_value = 0;
            for(size_t m = 0; m != scale; m++){
                for(size_t n = 0; n != scale; n++){
                    real value = mat.get_data(j * scale + m, k * scale + n);
                    if((m == 0 && n == 0) || value > pooling_value){
                        pooling_value = value;
                    }
                }
            }
            data[j * cols + k] = pooling_value;
        }
    }
    pool.set_shallow_data(data, rows, cols);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r15
movq %rdx, %r13
movq %rsi, 0x20(%rsp)
movq %r8, (%rsp)
movq %r8, %rax
movq %rcx, 0x18(%rsp)
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
xorl %ebx, %ebx
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x8030
movq %rax, 0x10(%rsp)
cmpq 0x18(%rsp), %rbx
je 0x15194
movq %rbx, %rax
imulq %r15, %rax
movq %rax, 0x40(%rsp)
movq %rbx, 0x28(%rsp)
movq %rbx, %rax
imulq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
xorl %eax, %eax
cmpq (%rsp), %rax
je 0x15187
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
xorl %ebp, %ebp
cmpq %r15, %rbp
je 0x1516d
movq 0x40(%rsp), %rax
leaq (%rax,%rbp), %r12
xorl %r14d, %r14d
cmpq %r14, %r15
je 0x15168
movss %xmm0, 0xc(%rsp)
leaq (%rbx,%r14), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x13b9a
movss (%rax), %xmm0
movq %r14, %rax
orq %rbp, %rax
je 0x15163
maxss 0xc(%rsp), %xmm0
incq %r14
jmp 0x15137
incq %rbp
jmp 0x15126
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq %rcx, %rax
incq %rax
addq %r15, %rbx
jmp 0x15116
movq 0x28(%rsp), %rbx
incq %rbx
jmp 0x150e0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq (%rsp), %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x169d0
// File: /workspace/github_cpp_makefile_star2_O2/btbujiangjun[P]abcdl/src/framework/Pool.cpp
// Function: abcdl::framework::L2Pooling::pool(abcdl::algebra::Matrix<float>&, abcdl::algebra::Matrix<float> const&, unsigned long, unsigned long, unsigned long)
void L2Pooling::pool(abcdl::algebra::Mat& pool,
                     const abcdl::algebra::Mat& mat,
                     const size_t rows,
                     const size_t cols,
                     const size_t scale){
    real* data = new real[rows * cols];
    for(size_t j = 0; j != rows; j++){
        for(size_t k = 0; k != cols; k++){
            real pooling_value = 0;
            for(size_t m = 0; m != scale; m++){
                for(size_t n = 0; n != scale; n++){
                    real value = mat.get_data(j * scale + m, k * scale + n);
                    if(value != 0){
                        pooling_value += (value * value);
                    }
                }
            }
            data[j * cols + k] = sqrt(pooling_value);
        }
    }
    pool.set_shallow_data(data, rows, cols);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %rdx, %r13
movq %rsi, 0x48(%rsp)
movq %r8, 0x8(%rsp)
movq %r8, %rax
movq %rcx, 0x18(%rsp)
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x3e, %rcx
shlq $0x2, %rax
negq %rcx
movl $0x0, %edi
sbbq %rdi, %rdi
orq %rax, %rdi
callq 0x8030
movq %rax, 0x10(%rsp)
xorl %eax, %eax
cmpq 0x18(%rsp), %rax
je 0x152ff
movq %rax, %rcx
imulq %rbx, %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x50(%rsp)
imulq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
movq %rax, 0x58(%rsp)
movq $0x0, 0x28(%rsp)
xorl %ecx, %ecx
cmpq 0x8(%rsp), %rcx
je 0x152f2
movq %rcx, 0x20(%rsp)
xorps %xmm0, %xmm0
xorl %ebp, %ebp
cmpq %rbx, %rbp
je 0x152c2
movaps %xmm0, 0x30(%rsp)
movq 0x60(%rsp), %rax
leaq (%rax,%rbp), %r12
movq %rbx, %r15
movq 0x28(%rsp), %r14
subq $0x1, %r15
jb 0x152b8
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x13b9a
movss (%rax), %xmm0
movaps %xmm0, %xmm1
mulss %xmm0, %xmm1
movaps 0x30(%rsp), %xmm2
addss %xmm2, %xmm1
cmpneqss 0x1c02f(%rip), %xmm0    # 0x312d4
andps %xmm0, %xmm1
andnps %xmm2, %xmm0
orps %xmm1, %xmm0
incq %r14
movaps %xmm0, 0x30(%rsp)
jmp 0x15274
incq %rbp
movaps 0x30(%rsp), %xmm0
jmp 0x15259
ucomiss 0x1c00b(%rip), %xmm0    # 0x312d4
jb 0x152d1
sqrtss %xmm0, %xmm0
jmp 0x152d6
callq 0x8530
movq 0x20(%rsp), %rcx
movq 0x58(%rsp), %rax
movss %xmm0, (%rax,%rcx,4)
incq %rcx
addq %rbx, 0x28(%rsp)
jmp 0x15244
movq 0x50(%rsp), %rax
incq %rax
jmp 0x15209
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x169d0
// File: /workspace/github_cpp_makefile_star2_O2/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: printWorkingDirectory(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>>>>)
void printWorkingDirectory(vector<string> tokens) {

	int len = 50;
	char cwd[len];

	getcwd(cwd, len);

	if (tokens.size() == 1)
		cout << cwd << "\n";

	// for redirecting output
	else if (tokens[1].size() == 1 and tokens[1][0] == '>') {
		if (tokens.size() == 3) {
			string filename = tokens[2];

			int file_desc = open(filename.c_str(), O_WRONLY | O_CREAT |  O_TRUNC, 0777);
			output = dup(1);

			close(1);
			dup(file_desc);
			close(file_desc);
			
			cout << cwd;
			
			fflush(stdout); 

			dup2(output, 1);
			close(output);
		}

		else if (tokens.size() < 3) {
			cout << "\033[1;31m" << "Error: ";
			cout << "\033[0;38m" << "Output file not provided.\n";
		}

		else {
			cout << "\033[1;31m" << "Error: ";
			cout << "\033[0;38m" << "Too many arguments.\n";
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
pushq $0x32
popq %rsi
callq 0x20b0
movq (%rbx), %rsi
movq 0x8(%rbx), %r14
subq %rsi, %r14
cmpq $0x20, %r14
jne 0x2e1c
movq 0x41ca(%rip), %rdi      # 0x6fc8
leaq 0x20(%rsp), %rsi
callq 0x2170
leaq 0x233a(%rip), %rsi      # 0x5149
movq %rax, %rdi
callq 0x2170
jmp 0x2ec9
cmpq $0x1, 0x28(%rsi)
jne 0x2ec9
movq 0x20(%rsi), %rax
cmpb $0x3e, (%rax)
jne 0x2ec9
cmpq $0x60, %r14
jne 0x2ed2
addq $0x40, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x2220
movq (%rbx), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x20e0
movl %eax, %ebx
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x2280
movl %eax, 0x4335(%rip)      # 0x71a8
movl %ebp, %edi
callq 0x2300
movl %ebx, %edi
callq 0x2280
movl %ebx, %edi
callq 0x2300
movq 0x4139(%rip), %rdi      # 0x6fc8
leaq 0x20(%rsp), %rsi
callq 0x2170
movq 0x4108(%rip), %rax      # 0x6fa8
movq (%rax), %rdi
callq 0x21a0
movl 0x42fa(%rip), %edi      # 0x71a8
pushq $0x1
popq %rsi
callq 0x2150
movl 0x42ec(%rip), %edi      # 0x71a8
callq 0x2300
movq %rsp, %rdi
callq 0x20a0
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x40ef(%rip), %rbx      # 0x6fc8
leaq 0x21a1(%rip), %rsi      # 0x5081
movq %rbx, %rdi
callq 0x2170
leaq 0x219a(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
leaq 0x2193(%rip), %rsi      # 0x5091
movq %rbx, %rdi
callq 0x2170
cmpq $0x40, %r14
ja 0x2f18
leaq 0x2186(%rip), %rsi      # 0x5099
jmp 0x2e0f
leaq 0x2197(%rip), %rsi      # 0x50b6
jmp 0x2e0f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: changeDirectory(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>>>>)
void changeDirectory(vector<string> tokens) {

	string temp;

	if (tokens.size() > 1)
		temp = tokens[1];
	else
		temp = "/home";

	if (tokens.size() > 3) {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Too many arguments.\n";
		return;
	}

	const char* path = temp.c_str();

	chdir(path);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
cmpq $0x21, %rax
jb 0x2f6e
addq $0x20, %rsi
movq %rsp, %rdi
callq 0x20d0
jmp 0x2f7d
leaq 0x2169(%rip), %rsi      # 0x50de
movq %rsp, %rdi
callq 0x22f0
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cmpq $0x61, %rax
jb 0x2fd0
movq 0x4037(%rip), %rdi      # 0x6fc8
leaq 0x20e9(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x20e5(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x4015(%rip), %rdi      # 0x6fc8
leaq 0x20d7(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x20f0(%rip), %rsi      # 0x50b6
movq %rax, %rdi
callq 0x2170
jmp 0x2fd9
movq (%rsp), %rdi
callq 0x2240
movq %rsp, %rdi
callq 0x20a0
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: setEnvVar(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>>>>)
void setEnvVar(vector<string> tokens) {

	char cwd[100];
	getcwd(cwd, 100);

	setenv("SHELL", cwd, 1);

	string name, value;

	if (tokens.size() == 1) {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Name of environment variable not given.\n";
		return;
	}

	name = tokens[1];

	if (tokens.size() == 2)
		value = "";

	else if (tokens.size() == 3)
		value = tokens[2];

	else {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Too many arguments provided.\n";
		return;
	}

	char* var = getenv(name.c_str());

	if (var != NULL)
		cout << "'" << name << "' is already defined.\n";

	else
		setenv(name.c_str(), value.c_str(), 0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %r14
pushq $0x64
popq %rsi
movq %r14, %rdi
callq 0x20b0
leaq 0x1e36(%rip), %rdi      # 0x5069
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x2270
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
cmpq $0x20, %rax
jne 0x32b1
movq 0x3d51(%rip), %rdi      # 0x6fc8
leaq 0x1e03(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x1dff(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x3d2f(%rip), %rdi      # 0x6fc8
leaq 0x1df1(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x1e58(%rip), %rsi      # 0x5104
jmp 0x3379
addq $0x20, %rsi
leaq 0x20(%rsp), %rdi
callq 0x20d0
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq $0x3, %rax
je 0x32ea
cmpq $0x2, %rax
jne 0x333d
leaq 0x1dec(%rip), %rsi      # 0x50cc
movq %rsp, %rdi
callq 0x22f0
jmp 0x32f6
addq $0x40, %rsi
movq %rsp, %rdi
callq 0x20d0
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x21d0
testq %rax, %rax
je 0x339e
movq 0x3cb5(%rip), %rdi      # 0x6fc8
leaq 0x1e31(%rip), %rsi      # 0x514b
callq 0x2170
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x2140
leaq 0x1e1a(%rip), %rsi      # 0x514d
movq %rax, %rdi
callq 0x2170
jmp 0x3381
movq 0x3c84(%rip), %rdi      # 0x6fc8
leaq 0x1d36(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x1d32(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x3c62(%rip), %rdi      # 0x6fc8
leaq 0x1d24(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x1db4(%rip), %rsi      # 0x512d
movq %rax, %rdi
callq 0x2170
movq %rsp, %rdi
callq 0x20a0
leaq 0x20(%rsp), %rdi
callq 0x20a0
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
movq (%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2270
jmp 0x3381
jmp 0x33b0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
leaq 0x20(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: unsetEnvVar(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>>>>)
void unsetEnvVar(vector<string> tokens) {

	char cwd[100];
	getcwd(cwd, 100);

	setenv("SHELL", cwd, 1);

	string name;

	if (tokens.size() == 1) {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Name of environment variable not given.\n";
		return;
	}

	if (tokens.size() == 2)
		name = tokens[1];

	else {
		cout << "\033[1;31m" << "Error: ";
		cout << "\033[0;38m" << "Too many arguments provided.\n";
		return;
	}

	char* var = getenv(name.c_str());

	if (var == NULL)
		cout << "'" << name << "' is undefined.\n";

	else
		unsetenv(name.c_str());
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
pushq $0x64
popq %rsi
movq %r14, %rdi
callq 0x20b0
leaq 0x1c78(%rip), %rdi      # 0x5069
pushq $0x1
popq %rdx
movq %r14, %rsi
callq 0x2270
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq $0x2, %rax
je 0x3465
cmpq $0x1, %rax
jne 0x348c
movq 0x3b9a(%rip), %rdi      # 0x6fc8
leaq 0x1c4c(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x1c48(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x3b78(%rip), %rdi      # 0x6fc8
leaq 0x1c3a(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x1ca1(%rip), %rsi      # 0x5104
jmp 0x34c8
addq $0x20, %rsi
movq %rsp, %rdi
callq 0x20d0
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x21d0
testq %rax, %rax
je 0x34e3
movq %rbx, %rdi
callq 0x2210
jmp 0x34d0
movq 0x3b35(%rip), %rdi      # 0x6fc8
leaq 0x1be7(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x1be3(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x3b13(%rip), %rdi      # 0x6fc8
leaq 0x1bd5(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x1c65(%rip), %rsi      # 0x512d
movq %rax, %rdi
callq 0x2170
movq %rsp, %rdi
callq 0x20a0
addq $0x88, %rsp
popq %rbx
popq %r14
retq
movq 0x3ade(%rip), %rdi      # 0x6fc8
leaq 0x1c5a(%rip), %rsi      # 0x514b
callq 0x2170
movq %rsp, %rsi
movq %rax, %rdi
callq 0x2140
leaq 0x1c5c(%rip), %rsi      # 0x5164
movq %rax, %rdi
callq 0x2170
jmp 0x34d0
jmp 0x3514
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/sanaa-khan[P]mini-linux-shell/gbsh.cpp
// Function: pipeCommands(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>>>>)
void pipeCommands(vector<string> tokens) {

	string cmd1, cmd2;

	for (int i = 0; i < tokens.size(); i++) {
		if (tokens[i].size() == 1 and tokens[i][0] == '|') {
			if (i == 0 or i == tokens.size() - 1) {
				cout << "\033[1;31m" << "Error: ";
				cout << "\033[0;38m" << "Command missing.\n";
				return;
			}

			else {
				cmd1 = tokens[0];
				cmd2 = tokens[i + 1];
				break;
			}
		}
	}

	return; // error here fix later

	int fd[2];
	pipe(fd);

	if (!fork()) {
		close(1);
		dup(fd[1]);
		close(fd[0]);
		
		if (!fork()) {
			execl(cmd1.c_str(), cmd1.c_str(), NULL);
		}

		else {
			wait(NULL);
		}
	}

	else {
		close(0);
		dup(fd[0]);
		close(fd[1]);
		execl(cmd2.c_str(), cmd2.c_str(), NULL);
	} 
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %r14d, %r14d
movb %r14b, (%rax)
movb %r14b, (%rcx)
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
sarq $0x5, %rax
leaq 0x8(%rsi), %rcx
cmpq %r14, %rax
je 0x3602
cmpq $0x1, (%rcx)
jne 0x3580
movq -0x8(%rcx), %rdx
cmpb $0x7c, (%rdx)
je 0x3589
incq %r14
addq $0x20, %rcx
jmp 0x3568
testq %r14, %r14
je 0x35be
decq %rax
cmpq %r14, %rax
je 0x35be
leaq 0x28(%rsp), %rdi
callq 0x20d0
movq (%rbx), %rax
movl %r14d, %ecx
shlq $0x5, %rcx
leaq (%rax,%rcx), %rsi
addq $0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0x3602
movq 0x3a03(%rip), %rdi      # 0x6fc8
leaq 0x1ab5(%rip), %rsi      # 0x5081
callq 0x2170
leaq 0x1ab1(%rip), %rsi      # 0x5089
movq %rax, %rdi
callq 0x2170
movq 0x39e1(%rip), %rdi      # 0x6fc8
leaq 0x1aa3(%rip), %rsi      # 0x5091
callq 0x2170
leaq 0x1b7b(%rip), %rsi      # 0x5175
movq %rax, %rdi
callq 0x2170
leaq 0x8(%rsp), %rdi
callq 0x20a0
leaq 0x28(%rsp), %rdi
callq 0x20a0
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20a0
leaq 0x28(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/gualtieromalde[P]owmread/owmread.C
// Function: setMetar(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void setMetar(int port, std::string metar)
{
    CURL* curl = curl_easy_init();
    const std::string url = "http://localhost:" + std::to_string(port) + "/props/environment/metar?submit=set&data[0]=" + curl_easy_escape(curl, metar.c_str(), metar.size());
    curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
    curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, no_write_data);
    curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
    curl_easy_perform(curl);
    curl_easy_cleanup(curl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movl %edi, %ebp
callq 0x87b0
movq %rax, %rbx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %ebp, %esi
callq 0xad98
leaq 0x262e5(%rip), %rsi     # 0x305ab
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xae44
leaq 0x26322(%rip), %rdx     # 0x305fc
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xadf1
movq (%r14), %rsi
movl 0x8(%r14), %edx
movq %rbx, %rdi
callq 0x8550
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rax, %rdx
callq 0xadf1
leaq 0x28(%rsp), %rdi
callq 0x8988
leaq 0x8(%rsp), %rdi
callq 0x8988
leaq 0x68(%rsp), %rdi
callq 0x8988
movq 0x48(%rsp), %rdx
movq %rbx, %rdi
movl $0x2712, %esi           # imm = 0x2712
xorl %eax, %eax
callq 0x86a0
pushq $0x71
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x86a0
pushq $0xd
popq %rsi
pushq $0xa
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x86a0
leaq 0x84(%rip), %rdx        # 0xa3e7
movq %rbx, %rdi
movl $0x4e2b, %esi           # imm = 0x4E2B
xorl %eax, %eax
callq 0x86a0
pushq $0x34
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x86a0
movq %rbx, %rdi
callq 0x8510
movq %rbx, %rdi
callq 0x8130
leaq 0x48(%rsp), %rdi
callq 0x8988
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xa3c1
movq %rax, %rbx
jmp 0xa3cb
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8988
leaq 0x8(%rsp), %rdi
callq 0x8988
leaq 0x68(%rsp), %rdi
jmp 0xa3da
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x8988
movq %rbx, %rdi
callq 0x84b0
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/utils.cpp
// Function: words(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<string> words(const string &str) {
    vector<string> v;
    int start_pos = 0;
    bool in_word = false;

    for (size_t i = 0; i < str.size(); i++) {
        if (str[i] == ' ' || str[i] == '\n' || str[i] == '\t') {
            if (!in_word)
                continue;
            in_word = false;
            v.push_back(str.substr(start_pos, i - start_pos));
            continue;
        }

        if (in_word)
            continue;

        in_word = true;
        start_pos = i;
    }

    if (in_word) {
        v.push_back(str.substr(start_pos, str.size() - start_pos));
    }

    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r12d, %r12d
movabsq $0x100000600, %r13      # imm = 0x100000600
leaq 0x8(%rsp), %r15
xorl %eax, %eax
xorl %ebp, %ebp
movq 0x8(%r14), %rcx
movslq %r12d, %rdx
cmpq %rcx, %rbp
jae 0x37c0
movq (%r14), %rcx
movzbl (%rcx,%rbp), %ecx
cmpq $0x20, %rcx
ja 0x37ac
btq %rcx, %r13
jae 0x37ac
testb $0x1, %al
je 0x37bb
movq %rbp, %rcx
subq %rdx, %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3e12
movq %r15, %rdi
callq 0x3498
xorl %eax, %eax
jmp 0x37bb
testb $0x1, %al
cmovel %ebp, %r12d
movzbl %al, %eax
pushq $0x1
popq %rcx
cmovel %ecx, %eax
incq %rbp
jmp 0x3761
testb $0x1, %al
je 0x37eb
subq %rdx, %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x32b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3e12
leaq 0x8(%rsp), %rdi
callq 0x3498
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3801
jmp 0x3810
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3498
jmp 0x3813
movq %rax, %r14
movq %rbx, %rdi
callq 0x3ba2
movq %r14, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/utils.cpp
// Function: cat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void cat(string filename) {
    ifstream ifs(filename);
    string str;
    while (getline(ifs, str))
        cout << str << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %rsi
leaq 0x28(%rsp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x33c0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %r14
movq 0xe769(%rip), %r15      # 0x11fc8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3070
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x388d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3250
movq %rax, %rdi
callq 0x3140
jmp 0x385f
leaq 0x8(%rsp), %rdi
callq 0x3498
leaq 0x28(%rsp), %rdi
callq 0x3090
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3498
leaq 0x28(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/utils.cpp
// Function: crc32(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
unsigned int crc32(string str) {
    unsigned int crcinit = 0;
    unsigned int crc = 0;

    crc = crcinit ^ 0xFFFFFFFF;
    for (size_t i = 0; i < str.size(); i++) {
        crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (str[i])) & 0xFF];
    }
    return crc ^ 0xFFFFFFFF;
}

// Assembly:
movq 0x8(%rdi), %rcx
pushq $-0x1
popq %rax
xorl %edx, %edx
leaq 0x7553(%rip), %rsi      # 0xb0d0
cmpq %rdx, %rcx
je 0x3b9f
movl %eax, %r8d
shrl $0x8, %r8d
movq (%rdi), %r9
xorb (%r9,%rdx), %al
movzbl %al, %eax
xorl (%rsi,%rax,4), %r8d
incq %rdx
movl %r8d, %eax
jmp 0x3b7d
notl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::begin()
void Transaction::begin() {
    TXLOG;
    unique_lock<mutex> lock(giant_mtx_);
    lock_ = move(lock);
    wait();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x74(%rdi), %esi
leaq 0x745e(%rip), %rdi      # 0xb4e0
leaq 0x6fd1(%rip), %rdx      # 0xb05a
pushq $0x20
popq %rcx
xorl %eax, %eax
callq 0x3050
leaq 0xe1d6(%rip), %rsi      # 0x12270
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x5fc8
leaq 0x90(%rbx), %rdi
movq %r14, %rsi
callq 0x5fde
movq %rbx, %rdi
callq 0x40ce
movq %r14, %rdi
callq 0x6042
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::commit()
void Transaction::commit() {
    TXLOG;
    db_->apply_tx(this);
    for (const auto& key : write_log_) {
        scheduler_->log(id_, key, Write);
    }
    finish();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x74(%rdi), %esi
leaq 0x73b5(%rip), %rdi      # 0xb4e0
leaq 0x6f41(%rip), %rdx      # 0xb073
pushq $0x27
popq %rcx
xorl %eax, %eax
callq 0x3050
movq 0xd8(%rbx), %rdi
movq %rbx, %rsi
callq 0x41c2
movq 0x78(%rbx), %r14
movq 0x80(%rbx), %rbp
leaq 0x8(%rsp), %r15
cmpq %rbp, %r14
je 0x4195
movq 0xe0(%rbx), %r12
movl 0x74(%rbx), %r13d
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %r12, %rdi
movl %r13d, %esi
movq %r15, %rdx
pushq $0x1
popq %rcx
callq 0x6058
movq %r15, %rdi
callq 0x3498
addq $0x20, %r14
jmp 0x415b
movq %rbx, %rdi
callq 0x429c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: DataBase::apply_tx(Transaction*)
void DataBase::apply_tx(Transaction* tx) {
    string buf = serialize(tx->write_set);
    size_t nbytes_written = 0;
    while (nbytes_written < buf.size()) {
        nbytes_written += write(fd_log_,
                buf.c_str() + nbytes_written,
                buf.size() - nbytes_written);
    }
    fsync(fd_log_);

    // apply write_set to table
    for (const auto& [key, value] : tx->write_set) {
        if (value.first == New)
            table[key].value = value.second;
        else
            table.erase(key);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x6d32
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5704
leaq 0x28(%rsp), %rdi
callq 0x6cce
xorl %r15d, %r15d
movq 0x10(%rsp), %rdx
movl 0x78(%r14), %edi
subq %r15, %rdx
jbe 0x421c
movq 0x8(%rsp), %rsi
addq %r15, %rsi
callq 0x30d0
addq %rax, %r15
jmp 0x41fc
callq 0x3230
movq 0x18(%rbx), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x425e
leaq 0x20(%r15), %rsi
cmpl $0x0, 0x40(%r15)
je 0x4243
movq %r14, %rdi
callq 0x8478
jmp 0x4251
movl 0x44(%r15), %ebp
movq %r14, %rdi
callq 0x6140
movl %ebp, (%rax)
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
jmp 0x4229
leaq 0x8(%rsp), %rdi
callq 0x3498
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4286
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x6cce
jmp 0x4293
jmp 0x4286
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::finish()
void Transaction::finish() {
    for (const auto& entry : write_set) {
        Key key = entry.first;
        db_->table[key].nlock = 0;
    }
    for (const auto& key : lock_set) {
        db_->table[key].nlock = 0;
    }
    write_set = {};
    is_done = true;
    turn_ = false;
    lock_.unlock();
    scheduler_->notify();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r15
leaq 0x8(%rdi), %r12
leaq 0x8(%rsp), %r14
cmpq %r12, %r15
je 0x42f0
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x3320
movq 0xd8(%rbx), %rdi
movq %r14, %rsi
callq 0x6140
andl $0x0, 0x4(%rax)
movq %r14, %rdi
callq 0x3498
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
jmp 0x42b7
movq 0x30(%rbx), %r14
movq 0x38(%rbx), %r15
cmpq %r15, %r14
je 0x4316
movq 0xd8(%rbx), %rdi
movq %r14, %rsi
callq 0x6140
andl $0x0, 0x4(%rax)
addq $0x20, %r14
jmp 0x42f8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x61b4
movb $0x1, 0x48(%rbx)
movb $0x0, 0x70(%rbx)
leaq 0x90(%rbx), %rdi
callq 0x61ca
movq 0xe0(%rbx), %rdi
callq 0x61a6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
bool Transaction::set(Key key, int val) {
    TXLOG;

    if (db_->table.count(key) > 0) {
        while (!db_->get_lock(this, key, Write)) {
            wait();
        }
    }
    write_log_.push_back(key);
    write_set[key] = make_pair(New, val);
    wait();
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x74(%rdi), %esi
leaq 0x7134(%rip), %rdi      # 0xb4e0
leaq 0x6c51(%rip), %rdx      # 0xb004
pushq $0x35
popq %rcx
xorl %eax, %eax
callq 0x3050
movq 0xd8(%rbx), %rdi
movq %r14, %rsi
callq 0x607a
testq %rax, %rax
je 0x4417
leaq 0x8(%rsp), %r15
pushq $0x1
popq %r12
movq 0xd8(%rbx), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x4462
movl %eax, %r13d
movq %r15, %rdi
callq 0x3498
testb %r13b, %r13b
jne 0x4417
movq %rbx, %rdi
callq 0x40ce
jmp 0x43da
leaq 0x78(%rbx), %rdi
movq %r14, %rsi
callq 0x6094
movq %rbx, %rdi
movq %r14, %rsi
callq 0x60c0
andl $0x0, (%rax)
movl %ebp, 0x4(%rax)
movq %rbx, %rdi
callq 0x40ce
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: DataBase::get_lock(Transaction*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, BaseOp)
bool DataBase::get_lock(Transaction* tx, Key key, BaseOp locktype) {
    if (table.count(key) <= 0) {
        UNREACHABLE;
        return false;
    }

    if (vexists(tx->lock_set, key)) {
        return ((locktype == Write && table[key].nlock == -1) ||
                (locktype == Read && table[key].nlock > 0));
    }

    if (locktype == Write) {
        if (table[key].nlock != 0)
            return false;
        table[key].nlock = -1;
        tx->lock_set.push_back(key);
        return true;
    }

    if (table[key].nlock < 0)
        return false;

    table[key].nlock++;
    tx->lock_set.push_back(key);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rsi
callq 0x607a
testq %rax, %rax
je 0x4554
addq $0x30, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x6364
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x3320
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x63b7
movl %eax, %r12d
leaq 0x20(%rsp), %rdi
callq 0x3498
leaq 0x8(%rsp), %rdi
callq 0x3ba2
testb %r12b, %r12b
je 0x44f3
testl %ebp, %ebp
je 0x4540
cmpl $0x1, %ebp
jne 0x453c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6140
cmpl $-0x1, 0x4(%rax)
sete %bl
jmp 0x457a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6140
movl 0x4(%rax), %eax
cmpl $0x1, %ebp
jne 0x451b
testl %eax, %eax
jne 0x453c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6140
orl $-0x1, 0x4(%rax)
jmp 0x452d
testl %eax, %eax
js 0x453c
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6140
incl 0x4(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6094
movb $0x1, %bl
jmp 0x457a
xorl %ebx, %ebx
jmp 0x457a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6140
cmpl $0x0, 0x4(%rax)
setg %bl
jmp 0x457a
movq 0xda75(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0x6f93(%rip), %rsi      # 0xb4f8
leaq 0x6ff8(%rip), %rdx      # 0xb564
xorl %ebx, %ebx
movl $0x13d, %ecx            # imm = 0x13D
xorl %eax, %eax
callq 0x3350
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3498
jmp 0x459b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3ba2
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
optional<int> Transaction::get(Key key) {
    TXLOG;

    if (!has_key(key)) {
        wait();
        return nullopt;
    }

    // read from the write set
    if (write_set.count(key) > 0) {
        if (write_set[key].first != New) {
            UNREACHABLE;
            return nullopt;
        }
        // db_->get_lock(this, key, DataBase::Read);
        wait();
        scheduler_->log(id_, key, Read);
        return write_set[key].second;
    }

    while (!db_->get_lock(this, key, Read)) {
        wait();
    }
    lock_set.push_back(key);
    wait();
    scheduler_->log(id_, key, Read);
    return db_->table[key].value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x74(%rdi), %esi
leaq 0x6f13(%rip), %rdi      # 0xb4e0
leaq 0x6a6b(%rip), %rdx      # 0xb03f
pushq $0x43
popq %rcx
xorl %eax, %eax
callq 0x3050
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3320
movq %r14, %rdi
movq %r15, %rsi
callq 0x478e
movl %eax, %ebp
leaq 0x40(%rsp), %rdi
callq 0x3498
testb %bpl, %bpl
je 0x4687
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6126
testq %rax, %rax
je 0x4697
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60c0
cmpl $0x0, (%rax)
jne 0x474b
movq %r14, %rdi
callq 0x40ce
movq 0xe0(%r14), %r12
movl 0x74(%r14), %ebp
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3320
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x6058
movabsq $0x100000000, %r15      # imm = 0x100000000
leaq 0x20(%rsp), %rdi
callq 0x3498
movq %r14, %rdi
movq %rbx, %rsi
callq 0x60c0
movl 0x4(%rax), %eax
jmp 0x4736
movq %r14, %rdi
callq 0x40ce
xorl %r15d, %r15d
jmp 0x4736
leaq 0x60(%rsp), %r15
movq 0xd8(%r14), %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3320
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x4462
movl %eax, %ebp
movq %r15, %rdi
callq 0x3498
testb %bpl, %bpl
jne 0x46d7
movq %r14, %rdi
callq 0x40ce
jmp 0x469c
leaq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x6094
movq %r14, %rdi
callq 0x40ce
movq 0xe0(%r14), %r12
movl 0x74(%r14), %ebp
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3320
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x6058
movabsq $0x100000000, %r15      # imm = 0x100000000
movq %rsp, %rdi
callq 0x3498
movq 0xd8(%r14), %rdi
movq %rbx, %rsi
callq 0x6140
movl (%rax), %eax
movl %eax, %eax
orq %r15, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xd87e(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0x6d9c(%rip), %rsi      # 0xb4f8
leaq 0x68dc(%rip), %rdx      # 0xb03f
xorl %r15d, %r15d
pushq $0x4d
popq %rcx
xorl %eax, %eax
callq 0x3350
jmp 0x4692
jmp 0x477b
jmp 0x477b
jmp 0x477b
movq %rax, %rbx
movq %r15, %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::del(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Transaction::del(Key key) {
    TXLOG;

    if (!has_key(key)) {
        return true;
    }
    while (!db_->get_lock(this, key, Write)) {
        wait();
    }
    write_log_.push_back(key);
    write_set[key] = make_pair(Delete, 0);
    wait();
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x74(%rdi), %esi
leaq 0x6cf0(%rip), %rdi      # 0xb4e0
leaq 0x685f(%rip), %rdx      # 0xb056
pushq $0x60
popq %rcx
xorl %eax, %eax
callq 0x3050
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x478e
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x3498
testb %bpl, %bpl
je 0x4899
leaq 0x28(%rsp), %r15
pushq $0x1
popq %r12
movq 0xd8(%rbx), %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x4462
movl %eax, %r13d
movq %r15, %rdi
callq 0x3498
testb %r13b, %r13b
jne 0x4873
movq %rbx, %rdi
callq 0x40ce
jmp 0x4836
leaq 0x78(%rbx), %rdi
movq %r14, %rsi
callq 0x6094
movq %rbx, %rdi
movq %r14, %rsi
callq 0x60c0
movq $0x1, (%rax)
movq %rbx, %rdi
callq 0x40ce
xorb $0x1, %bpl
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48b0
movq %rax, %rbx
movq %r15, %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::keys[abi:cxx11]()
vector<string> Transaction::keys() {
    TXLOG;

    vector<string> v;
    for (const auto& entry : db_->table) {
        Key key = entry.first;
        if (write_set.count(key) > 0 && write_set[key].first == Delete)
            continue;
        v.push_back(key);
    }
    for (const auto& [key, val] : write_set) {
        if (db_->table.count(key) <= 0 || val.first == Delete)
            continue;
        v.push_back(key);
    }

    wait();
    return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x74(%rsi), %esi
leaq 0x6bff(%rip), %rdi      # 0xb4e0
leaq 0x6798(%rip), %rdx      # 0xb080
pushq $0x6f
popq %rcx
xorl %eax, %eax
callq 0x3050
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0xd8(%r14), %r13
movq 0x18(%r13), %r15
addq $0x8, %r13
movq %rsp, %r12
cmpq %r13, %r15
je 0x4960
leaq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x3320
movq %r14, %rdi
movq %r12, %rsi
callq 0x6126
testq %rax, %rax
je 0x4940
movq %r14, %rdi
movq %r12, %rsi
callq 0x60c0
cmpl $0x1, (%rax)
je 0x494b
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6094
movq %r12, %rdi
callq 0x3498
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
jmp 0x490f
movq 0x18(%r14), %r15
leaq 0x8(%r14), %r13
cmpq %r13, %r15
je 0x49a4
leaq 0x20(%r15), %r12
movq 0xd8(%r14), %rdi
movq %r12, %rsi
callq 0x607a
testq %rax, %rax
je 0x4997
cmpl $0x1, 0x40(%r15)
je 0x4997
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6094
movq %r15, %rdi
callq 0x31d0
movq %rax, %r15
jmp 0x4968
movq %r14, %rdi
callq 0x40ce
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x49bf
movq %rax, %r14
jmp 0x49cf
movq %rax, %r14
movq %rsp, %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3ba2
movq %r14, %rdi
callq 0x3410
nop
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Transaction::get_until_success(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Transaction::get_until_success(Key key) {
    TXLOG;
    optional<int> tmp = get(key);
    while (!tmp.has_value()) {
        wait();
        tmp = get(key);
    }
    wait();
    return tmp.value();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x74(%rdi), %esi
leaq 0x6ae5(%rip), %rdi      # 0xb4e0
leaq 0x6b14(%rip), %rdx      # 0xb516
movl $0x83, %ecx
xorl %eax, %eax
callq 0x3050
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45ae
movq %rax, %r12
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %r15
callq 0x3498
btq $0x20, %r12
jb 0x4a68
movq %rbx, %rdi
callq 0x40ce
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45ae
movq %rax, %r12
movq %r15, %rdi
jmp 0x4a36
movq %rbx, %rdi
callq 0x40ce
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x4a8c
movq %rax, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x3498
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: ConflictGraph::emit()
void ConflictGraph::emit() {
    FILE* fp_out = fopen(graphfilename_.c_str(), "w");

    vector<int> serial_schedule = serialize();

    fprintf(fp_out, "/*\n");
    fprintf(fp_out, "serial schedule:\n");
    for (const auto& n : serial_schedule) {
        fprintf(fp_out, "%d\n", n);
    }
    fprintf(fp_out, " */\n");

    fprintf(fp_out, "digraph g {\n");
    for (const auto& n : nodes_) {
        fprintf(fp_out, "    Tx%d;\n", n);
    }
    for (const auto& e : edges_) {
        string conflict_type =
            (e.type == ReadWrite) ? "r-w" :
            (e.type == WriteRead) ? "w-r" : "w-w";
        fprintf(fp_out, "    Tx%d -> Tx%d [label = \"%s\"];\n",
                e.from, e.to, conflict_type.c_str());
    }
    fprintf(fp_out, "}\n");
    fclose(fp_out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movq 0x30(%rdi), %rdi
leaq 0x6a87(%rip), %rsi      # 0xb5b9
callq 0x32f0
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cb2
leaq 0x6a33(%rip), %rdi      # 0xb584
pushq $0x3
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3460
leaq 0x6a1e(%rip), %rdi      # 0xb588
pushq $0x11
popq %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3460
movq (%r15), %r12
movq 0x8(%r15), %r13
leaq 0x69b5(%rip), %r15      # 0xb53b
cmpq %r13, %r12
je 0x4ba2
movl (%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
addq $0x4, %r12
jmp 0x4b86
leaq 0x69f1(%rip), %rdi      # 0xb59a
pushq $0x4
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3460
leaq 0x69dd(%rip), %rdi      # 0xb59f
pushq $0xc
popq %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x3460
movq (%r14), %r12
movq 0x8(%r14), %r13
leaq 0x69ce(%rip), %r15      # 0xb5ac
cmpq %r13, %r12
je 0x4bfa
movl (%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3350
addq $0x4, %r12
jmp 0x4bde
movq 0x18(%r14), %r13
movq 0x20(%r14), %rbp
leaq 0x28(%rsp), %r14
leaq 0xf(%rsp), %r15
leaq 0x69b0(%rip), %r12      # 0xb5c3
cmpq %rbp, %r13
je 0x4c71
movl 0x8(%r13), %eax
cmpl $0x1, %eax
leaq 0x6999(%rip), %rsi      # 0xb5bf
leaq 0x698e(%rip), %rcx      # 0xb5bb
cmoveq %rcx, %rsi
testl %eax, %eax
leaq 0x697d(%rip), %rax      # 0xb5b7
cmoveq %rax, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x3c1a
movl (%r13), %edx
movl 0x4(%r13), %ecx
movq 0x28(%rsp), %r8
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3350
movq %r14, %rdi
callq 0x3498
addq $0xc, %r13
jmp 0x4c13
leaq 0x68f5(%rip), %rdi      # 0xb56d
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x3460
movq %rbx, %rdi
callq 0x3280
leaq 0x10(%rsp), %rdi
callq 0x7eae
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7eae
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Scheduler::add_tx(std::function<void (Transaction*)>)
void Scheduler::add_tx(Transaction::Logic logic) {
    LOG;
    // create transaction objects and store it
    unique_ptr<Transaction> tx = db_->generate_tx(move(logic));
    transactions.push(move(tx));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6858(%rip), %rdi      # 0xb528
leaq 0x6868(%rip), %rsi      # 0xb53f
movl $0xb1, %edx
xorl %eax, %eax
callq 0x3050
movq 0xb0(%rbx), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movq 0x18(%r14), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x4d20
movups (%r14), %xmm1
addq $0x10, %r14
movaps %xmm1, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movups %xmm0, (%r14)
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x4d7c
leaq 0x10(%rsp), %rdi
callq 0x628c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7f8a
leaq 0x8(%rsp), %rdi
callq 0x62a8
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x62a8
jmp 0x4d74
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x628c
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O2/momohatt[P]seccampDB/database.cpp
// Function: Scheduler::start()
void Scheduler::start() {
    // spawn transaction threads
    unique_lock<mutex> lock(giant_mtx_);
    lock_ = move(lock);
    LOG;
    for (const auto& tx : transactions) {
        thread th(tx->logic, tx.get());
        tx->set_thread(move(th));
    }
    run();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0xd448(%rip), %rsi      # 0x12270
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x5fc8
leaq 0x88(%rbx), %rdi
movq %r14, %rsi
callq 0x5fde
leaq 0x66dd(%rip), %rdi      # 0xb528
leaq 0x66f4(%rip), %rsi      # 0xb546
movl $0xbb, %edx
xorl %eax, %eax
callq 0x3050
movq 0x10(%rbx), %r12
movq 0x20(%rbx), %r13
movq 0x28(%rbx), %rax
movq %rax, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq 0x30(%rbx), %rbp
leaq 0x30(%rsp), %r14
leaq 0x18(%rsp), %r15
movl $0xd0, %ebx
cmpq %rbp, %r12
je 0x4ee0
movq (%r12), %rsi
movq %rsi, 0x18(%rsp)
addq $0x50, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x62c2
movq (%r12), %rdi
addq %rbx, %rdi
movq %r14, %rsi
callq 0x6c50
movq %r14, %rdi
callq 0x6346
addq $0x8, %r12
cmpq %r13, %r12
jne 0x4e87
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r12
addq $0x8, %rax
movq %rax, 0x8(%rsp)
leaq 0x200(%r12), %r13
jmp 0x4e87
movq 0x10(%rsp), %rdi
callq 0x4f1a
leaq 0x20(%rsp), %rdi
callq 0x6042
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4f05
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x6042
movq %rbx, %rdi
callq 0x3410