LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::to_uci[abi:cxx11]()
std::string Board::to_uci() {
	std::string output;

	int null_count = 0;

	for (int r = 7; r >= 0; --r) {
		for (int f = 0; f < 8; ++f) {
			int sq = square::at(r, f);

			if (state[sq] == piece::null) {
				null_count++;
			} else {
				if (null_count > 0) {
					output += '0' + null_count;
					null_count = 0;
				}

				output += piece::get_uci(state[sq]);
			}
		}

		if (null_count > 0) {
			output += '0' + null_count;
			null_count = 0;
		}

		if (r) output += '/';
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x128, %r14            # imm = 0x128
xorl %r13d, %r13d
movl $0x7, %r12d
xorl %ebp, %ebp
movl %ebp, %eax
orl %r12d, %eax
testl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
jne 0x684b
movl (%r14,%rbp,4), %edi
cmpl $-0x1, %edi
je 0x67f9
testl %r13d, %r13d
jle 0x67e7
addb $0x30, %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x4240
movl (%r14,%rbp,4), %edi
xorl %r13d, %r13d
callq 0x841c
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4240
jmp 0x67fc
incl %r13d
incq %rbp
cmpq $0x8, %rbp
jne 0x67b2
testl %r13d, %r13d
jle 0x681d
addb $0x30, %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x4240
xorl %r13d, %r13d
subq $0x1, %r12
jb 0x6839
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x4240
addq $-0x20, %r14
jmp 0x67b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12231(%rip), %rdi     # 0x18a83
leaq 0x1221d(%rip), %rsi     # 0x18a76
leaq 0x12252(%rip), %rcx     # 0x18ab2
movl $0x22, %edx
callq 0x4190
jmp 0x686c
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6882
movq (%r15), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::to_pretty[abi:cxx11]()
std::string Board::to_pretty() {
	std::string output;

	for (int r = 7; r >= 0; --r) {
		for (int f = 0; f < 8; ++f) {
			int sq = square::at(r, f);

			if (state[sq] == piece::null) {
				output += '.';
			} else {
				output += piece::get_uci(state[sq]);
			}
		}

		output += '\n';
	}

	return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x128, %r14            # imm = 0x128
movl $0x7, %r12d
xorl %r13d, %r13d
movl %r13d, %eax
orl %r12d, %eax
testl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
jne 0x6913
movl (%r14,%r13,4), %edi
cmpl $-0x1, %edi
je 0x68d9
callq 0x841c
jmp 0x68db
movb $0x2e, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4240
incq %r13
cmpq $0x8, %r13
jne 0x68bc
movq %rbx, %rdi
movl $0xa, %esi
callq 0x4240
addq $-0x20, %r14
subq $0x1, %r12
jae 0x68b9
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x12169(%rip), %rdi     # 0x18a83
leaq 0x12155(%rip), %rsi     # 0x18a76
leaq 0x1218a(%rip), %rcx     # 0x18ab2
movl $0x22, %edx
callq 0x4190
jmp 0x6934
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x694a
movq (%r15), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::guard_value(int)
int Board::guard_value(int sq) {
	int val = 0;
	bitboard att = attacks_on(sq);

	while (att) {
		val += eval::GUARD_VALUES[state[bb::poplsb(att)]];
	}

	return val;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x6952
testq %rax, %rax
je 0x6a9c
movq %rax, %rdx
xorl %eax, %eax
leaq 0x12e2a(%rip), %rsi     # 0x198a0
movq %rdx, %rdi
bsfq %rdx, %rcx
movl $0x1, %r8d
shlq %cl, %r8
btcq %rcx, %rdi
movslq 0x48(%rbx,%rcx,4), %rcx
addl (%rsi,%rcx,4), %eax
cmpq %rdx, %r8
movq %rdi, %rdx
jne 0x6a79
jmp 0x6a9e
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::mask_is_attacked(unsigned long, int)
bool Board::mask_is_attacked(bitboard mask, int col) {
	bitboard opp = color_occ[col];

	while (mask) {
		if (attacks_on(bb::poplsb(mask)) & opp) return true;
	}

	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq %edx, %rax
movq 0x8(%rdi,%rax,8), %r15
movq %r14, %r12
testq %r14, %r14
je 0x6ad6
bsfq %r12, %rsi
movq %r12, %r14
btcq %rsi, %r14
movq %rbx, %rdi
callq 0x6952
testq %r15, %rax
je 0x6ab6
testq %r12, %r12
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::all_spans(int)
bitboard Board::all_spans(int col) {
	bitboard out = 0;
	bitboard pawns = piece_occ[piece::PAWN] & color_occ[col];

	while (pawns) {
		int p = bb::poplsb(pawns);

		out |= attacks::pawn_attackspans(col, p);
		out |= attacks::pawn_frontspans(col, p);
	}

	return out;
}

// Assembly:
movslq %esi, %rdx
movq 0x8(%rdi,%rdx,8), %rsi
andq 0x18(%rdi), %rsi
je 0x6b35
xorl %eax, %eax
shlq $0x9, %rdx
leaq 0x1c68d(%rip), %rdi     # 0x23190
addq %rdx, %rdi
addq 0x1b49b(%rip), %rdx     # 0x21fa8
movq %rsi, %r8
bsfq %rsi, %rcx
movl $0x1, %r9d
shlq %cl, %r9
btcq %rcx, %r8
shll $0x3, %ecx
orq (%rcx,%rdi), %rax
orq (%rcx,%rdx), %rax
cmpq %rsi, %r9
movq %r8, %rsi
jne 0x6b10
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::front_spans(int)
bitboard Board::front_spans(int col) {
	bitboard out = 0;
	bitboard pawns = piece_occ[piece::PAWN] & color_occ[col];

	while (pawns) {
		int p = bb::poplsb(pawns);

		out |= attacks::pawn_frontspans(col, p);
	}

	return out;
}

// Assembly:
movslq %esi, %rdx
movq 0x8(%rdi,%rdx,8), %rsi
andq 0x18(%rdi), %rsi
je 0x6b74
xorl %eax, %eax
shlq $0x9, %rdx
addq 0x1b455(%rip), %rdx     # 0x21fa8
movq %rsi, %rdi
bsfq %rsi, %rcx
movl $0x1, %r8d
shlq %cl, %r8
btcq %rcx, %rdi
orq (%rdx,%rcx,8), %rax
cmpq %rsi, %r8
movq %rdi, %rsi
jne 0x6b56
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::attack_spans(int)
bitboard Board::attack_spans(int col) {
	bitboard out = 0;
	bitboard pawns = piece_occ[piece::PAWN] & color_occ[col];

	while (pawns) {
		int p = bb::poplsb(pawns);

		out |= attacks::pawn_attackspans(col, p);
	}

	return out;
}

// Assembly:
movslq %esi, %rdx
movq 0x8(%rdi,%rdx,8), %rsi
andq 0x18(%rdi), %rsi
je 0x6bb4
xorl %eax, %eax
shlq $0x9, %rdx
addq 0x1b44d(%rip), %rdx     # 0x21fe0
movq %rsi, %rdi
bsfq %rsi, %rcx
movl $0x1, %r8d
shlq %cl, %r8
btcq %rcx, %rdi
orq (%rdx,%rcx,8), %rax
cmpq %rsi, %r8
movq %rdi, %rsi
jne 0x6b96
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::isolated_pawns(int)
bitboard Board::isolated_pawns(int col) {
	bitboard pawns = piece_occ[piece::PAWN] & color_occ[col];
	bitboard out = 0ULL;

	while (pawns) {
		int p = bb::poplsb(pawns);

		if (!(bb::neighbor_files(p) & pawns)) {
			out |= bb::mask(p);
		}
	}
	
	return out;
}

// Assembly:
movslq %esi, %rax
movq 0x8(%rdi,%rax,8), %rdx
andq 0x18(%rdi), %rdx
je 0x6bfc
xorl %eax, %eax
leaq 0x24dc1(%rip), %rsi     # 0x2b990
movq %rdx, %rdi
bsfq %rdx, %rcx
movl $0x1, %r8d
shlq %cl, %r8
btcq %rcx, %rdi
testq %rdi, (%rsi,%rcx,8)
movl $0x0, %ecx
cmoveq %r8, %rcx
orq %rcx, %rax
cmpq %rdx, %r8
movq %rdi, %rdx
jne 0x6bd2
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/util.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> neocortex::util::format<int, unsigned long, unsigned long, unsigned long, unsigned long, double, unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long, unsigned long, unsigned long, unsigned long, double, unsigned long)
std::string format(std::string fmt, Args ... args) {
			int length = snprintf(nullptr, 0, fmt.c_str(), args ...) + 1;

			if (length <= 0) {
				throw std::runtime_error("Error occurred formatting string.");
			}

			char* buffer = new char[length];
			std::unique_ptr<char[]> buffer_ref(buffer);

			snprintf(buffer, length, fmt.c_str(), args ...);

			return std::string(buffer, buffer + length - 1);
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r10
movq %r8, %r9
movq %rcx, %r8
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdx
subq $0x8, %rsp
xorl %edi, %edi
xorl %esi, %esi
movl %ebp, %ecx
movq %r8, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movb $0x1, %al
pushq 0x70(%rsp)
pushq 0x70(%rsp)
movq %r10, 0x38(%rsp)
pushq %r10
callq 0x4440
addq $0x20, %rsp
testl %eax, %eax
js 0x82dd
movl %eax, %r12d
leaq 0x1(%r12), %r15
movq %r15, %rdi
callq 0x4030
movq %rax, %r13
movq (%r14), %rdx
subq $0x8, %rsp
movq %rax, %rdi
movq %r15, %rsi
movl %ebp, %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
movsd 0x20(%rsp), %xmm0
movb $0x1, %al
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq 0x38(%rsp)
callq 0x4440
addq $0x20, %rsp
leaq (%r12,%r13), %rdx
incq %rdx
decq %rdx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6f6c
movq %r13, %rdi
callq 0x4340
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4110
movq %rax, %rbx
leaq 0x10a93(%rip), %rsi     # 0x18d84
movq %rax, %rdi
callq 0x40d0
movq 0x19cf0(%rip), %rsi     # 0x21ff0
movq 0x19c81(%rip), %rdx     # 0x21f88
movq %rbx, %rdi
callq 0x44c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
jmp 0x8327
movq %rax, %r14
movq %r13, %rdi
callq 0x4340
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/eval.cpp
// Function: neocortex::score::parent(int)
int score::parent(int value) {
	if (value == INCOMPLETE) {
		return value;
	}

	if (is_mate(value)) {
		if (value < 0) return value + 1;
		if (value > 0) return value - 1;

		return 0;
	} else {
		return value;
	}
}

// Assembly:
movl $0x80000000, %eax       # imm = 0x80000000
movl %edi, %ecx
negl %ecx
jo 0x7278
leal -0x3d08e0(%rdi), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x7276
testl %edi, %edi
js 0x7274
decl %edi
jmp 0x7276
incl %edi
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/eval.cpp
// Function: neocortex::score::to_string[abi:cxx11](int)
std::string score::to_string(int value) {
	if (is_mate(value)) {
		if (value > 0) {
			return util::format("#%d", CHECKMATE - value);
		} else {
			return util::format("#-%d", value - CHECKMATED);
		}
	} else {
		return util::format("%+.2f", value / 100.0f);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3d08e0(%r14), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x72e3
testl %r14d, %r14d
jle 0x7327
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12502(%rip), %rsi     # 0x197b4
leaq 0x124fe(%rip), %rdx     # 0x197b7
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
movl $0x3d0900, %edx         # imm = 0x3D0900
subl %r14d, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x74ec
movq 0x48(%rsp), %rdi
jmp 0x7366
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x124c9(%rip), %rsi     # 0x197bd
leaq 0x124c7(%rip), %rdx     # 0x197c2
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
cvtsi2ss %r14d, %xmm0
divss 0x1249b(%rip), %xmm0    # 0x197b0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x75bf
movq 0x8(%rsp), %rdi
jmp 0x7366
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12480(%rip), %rsi     # 0x197b8
leaq 0x1247d(%rip), %rdx     # 0x197bc
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
addl $0x3d0900, %r14d        # imm = 0x3D0900
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x74ec
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x7377
movq (%r12), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x73a2
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x73a2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x73b3
movq (%r12), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/eval.cpp
// Function: neocortex::score::to_uci[abi:cxx11](int)
std::string score::to_uci(int value) {
	if (is_mate(value)) {
		if (value > 0) {
			return util::format("mate %d", CHECKMATE - value);
		} else {
			return util::format("mate -%d", value - CHECKMATED);
		}
	} else {
		return util::format("cp %d", value);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3d08e0(%r14), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x741e
testl %r14d, %r14d
jle 0x7458
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x123d3(%rip), %rsi     # 0x197c3
leaq 0x123d3(%rip), %rdx     # 0x197ca
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
movl $0x3d0900, %edx         # imm = 0x3D0900
subl %r14d, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x74ec
movq 0x48(%rsp), %rdi
jmp 0x7497
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x123a5(%rip), %rsi     # 0x197d4
leaq 0x123a3(%rip), %rdx     # 0x197d9
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x74ec
movq 0x8(%rsp), %rdi
jmp 0x7497
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x12362(%rip), %rsi     # 0x197cb
leaq 0x12363(%rip), %rdx     # 0x197d3
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x70d8
addl $0x3d0900, %r14d        # imm = 0x3D0900
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x74ec
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x74a8
movq (%r12), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x74d3
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x74d3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x74e4
movq (%r12), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/move.cpp
// Function: neocortex::Move::Move(int, int, int)
Move::Move(int src, int dst, int ptype) {
	assert(square::is_valid(src));
	assert(square::is_valid(dst));

	this->m_src = src;
	this->m_dst = dst;
	this->m_ptype = ptype;
}

// Assembly:
pushq %rax
cmpl $0x40, %esi
jae 0x777d
cmpl $0x40, %edx
jae 0x779c
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
popq %rax
retq
leaq 0x12150(%rip), %rdi     # 0x198d4
leaq 0x1215f(%rip), %rsi     # 0x198ea
leaq 0x12165(%rip), %rcx     # 0x198f7
movl $0x16, %edx
callq 0x4190
leaq 0x12179(%rip), %rdi     # 0x1991c
leaq 0x12140(%rip), %rsi     # 0x198ea
leaq 0x12146(%rip), %rcx     # 0x198f7
movl $0x17, %edx
callq 0x4190
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/move.cpp
// Function: neocortex::Move::Move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Move::Move(std::string uci) {
	if (uci.size() < 4 || uci.size() > 5) {
		throw util::fmterr("Invalid UCI \"%s\": moves must be 4 or 5 characters, parsed %d", uci.c_str(), uci.size());
	}

	m_src = square::from_uci(uci.substr(0, 2));
	m_dst = square::from_uci(uci.substr(2, 2));
	m_ptype = (uci.size() == 5) ? piece::type_from_uci(uci[4]) : piece::null;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rax
addq $-0x6, %rax
cmpq $-0x3, %rax
jbe 0x7883
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movl $0x2, %ecx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x42c0
movq %r15, %rdi
callq 0x12144
movl %eax, (%r14)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x781b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x8(%rsp), %r15
movl $0x2, %edx
movl $0x2, %ecx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x42c0
movq %r15, %rdi
callq 0x12144
movl %eax, 0x4(%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x785c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x5, 0x8(%rbx)
jne 0x7874
movq (%rbx), %rax
movsbl 0x4(%rax), %edi
callq 0x862e
movl %eax, 0x8(%r14)
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x4110
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x12092(%rip), %rsi     # 0x19932
leaq 0x120c7(%rip), %rdx     # 0x1996e
leaq 0x48(%rsp), %rdi
callq 0x70d8
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x7c31
xorl %ebp, %ebp
movq 0x1a6f7(%rip), %rsi     # 0x21fc8
movq 0x1a710(%rip), %rdx     # 0x21fe8
movq %r14, %rdi
callq 0x44c0
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x78fa
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42b0
testb %bpl, %bpl
jne 0x7904
jmp 0x7944
movq %rax, %rbx
movq %r14, %rdi
callq 0x41e0
jmp 0x7944
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7944
movq 0x18(%rsp), %rsi
jmp 0x793c
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7944
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/move.cpp
// Function: neocortex::Move::to_uci[abi:cxx11]()
std::string Move::to_uci() {
	std::string output;

	output += square::to_uci(m_src);
	output += square::to_uci(m_dst);

	if (piece::is_type(m_ptype)) {
		output += piece::type_to_uci(m_ptype);
	}

	return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl (%rsi), %esi
leaq 0x8(%rsp), %rdi
callq 0x121c2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
leaq 0x18(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x79aa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movl 0x4(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x121c2
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x79e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movl 0x8(%r14), %edi
cmpl $0x5, %edi
ja 0x79fa
callq 0x8718
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4240
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x7a3c
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x7a2d
jmp 0x7a3f
jmp 0x7a3c
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a3f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x7a3f
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x7a52
movq (%r15), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/move.cpp
// Function: neocortex::PV::to_string[abi:cxx11]()
std::string PV::to_string() {
	std::string output;

	for (int i = 0; i < len; ++i) {
		if (i) output += ' ';
		output += moves[i].to_uci();
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpl $0x0, (%rsi)
jle 0x7bde
movq %rsi, %r14
leaq 0x4(%rsi), %r15
leaq 0x18(%rsp), %rbp
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
testq %r13, %r13
je 0x7b9b
movq %rbx, %rdi
movl $0x20, %esi
callq 0x4240
movq %r12, %rdi
movq %r15, %rsi
callq 0x794c
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7bcf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
incq %r13
movslq (%r14), %rax
addq $0xc, %r15
cmpq %rax, %r13
jl 0x7b89
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7bf2
movq %rax, %r14
jmp 0x7c11
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7c11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rbx), %rdi
cmpq (%rsp), %rdi
je 0x7c29
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/perft.cpp
// Function: neocortex::perft::run(neocortex::Position&, int)
perft::results perft::run(Position& p, int depth) {
	if (depth < 0) {
		throw util::fmterr("Invalid perft depth %d", depth);
	}

	current_results = perft::results();

	util::time_point now = util::time_now();

	perft_movegen(p, depth);

	current_results.totaltime = util::time_elapsed(now);
	current_results.nps = (unsigned long) (current_results.nodes / current_results.totaltime);

	return current_results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
testl %edx, %edx
js 0x7fbe
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x23ce4(%rip)    # 0x2bbe0
movupd %xmm0, 0x23ccc(%rip)    # 0x2bbd0
movupd %xmm0, 0x23cb4(%rip)    # 0x2bbc0
movupd %xmm0, 0x23c9c(%rip)    # 0x2bbb0
callq 0x15fa3
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x8046
movq %r15, %rdi
callq 0x15fa8
movsd %xmm0, 0x23cb2(%rip)    # 0x2bbe8
movsd 0x23c72(%rip), %xmm1    # 0x2bbb0
unpcklps 0x11a2b(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x11a33(%rip), %xmm1    # 0x19980
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x11a1f(%rip), %xmm2    # 0x19990
cvttsd2si %xmm2, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x23c5d(%rip)     # 0x2bbe0
movups 0x23c46(%rip), %xmm0    # 0x2bbd0
movups %xmm0, 0x20(%rbx)
movups 0x23c2b(%rip), %xmm0    # 0x2bbc0
movups %xmm0, 0x10(%rbx)
movups 0x23c10(%rip), %xmm0    # 0x2bbb0
movups %xmm0, (%rbx)
movups 0x23c36(%rip), %xmm0    # 0x2bbe0
movups %xmm0, 0x30(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x4110
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x11a3b(%rip), %rsi     # 0x19a16
leaq 0x11a4a(%rip), %rdx     # 0x19a2c
movq %rsp, %rdi
callq 0x70d8
movb $0x1, %r12b
movq %rsp, %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x832f
xorl %r12d, %r12d
movq 0x19fc4(%rip), %rsi     # 0x21fc8
movq 0x19fdd(%rip), %rdx     # 0x21fe8
movq %rbx, %rdi
callq 0x44c0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x802c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
testb %r12b, %r12b
jne 0x8036
jmp 0x803e
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/perft.cpp
// Function: perft_movegen(neocortex::Position&, int)
void perft_movegen(Position& p, int depth) {
	if (!depth) {
		current_results.nodes++;

		if (p.capture()) current_results.captures++;
		if (p.check()) current_results.checks++;
		if (p.castle()) current_results.castles++;
		if (p.en_passant()) current_results.en_passant++;
		if (p.promotion()) current_results.promotions++;
	
		return;
	}

	Move pl_moves[MAX_PL_MOVES];
	int num_pl_moves = p.pseudolegal_moves(pl_moves);

	for (int i = 0; i < num_pl_moves; ++i) {
		if (p.make_move(pl_moves[i])) {
			perft_movegen(p, depth - 1);
		}

		p.unmake_move(pl_moves[i]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rdi, %rbx
testl %esi, %esi
je 0x80d2
movl %esi, %ebp
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
callq 0x7758
addq $0xc, %r14
cmpq $0x4b0, %r14            # imm = 0x4B0
jne 0x805f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x9d82
testl %eax, %eax
jle 0x8121
decl %ebp
movl %eax, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %r14
xorl %r15d, %r15d
movq (%rsp,%r15), %rsi
movl 0x8(%rsp,%r15), %edx
movq %rbx, %rdi
callq 0x953e
testb %al, %al
je 0x80b6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8046
movq (%rsp,%r15), %rsi
movl 0x8(%rsp,%r15), %edx
movq %rbx, %rdi
callq 0x9b20
addq $0xc, %r15
cmpq %r15, %r14
jne 0x8097
jmp 0x8121
incq 0x23ad7(%rip)           # 0x2bbb0
movq 0x160(%rbx), %rax
cmpl $-0x1, -0x24(%rax)
je 0x80ed
incq 0x23ad3(%rip)           # 0x2bbc0
cmpl $0x0, -0x14(%rax)
je 0x80fa
incq 0x23abe(%rip)           # 0x2bbb8
cmpb $0x1, -0xf(%rax)
jne 0x8107
incq 0x23ac1(%rip)           # 0x2bbc8
cmpb $0x1, -0x10(%rax)
jne 0x8114
incq 0x23ac4(%rip)           # 0x2bbd8
cmpl $0x5, -0x30(%rax)
ja 0x8121
incq 0x23aaf(%rip)           # 0x2bbd0
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/piece.cpp
// Function: neocortex::piece::from_uci(char)
int piece::from_uci(char uci) {
	char typechar = tolower(uci);
	int type;

	switch (typechar) {
	case 'p':
		type = PAWN;
		break;
	case 'b':
		type = BISHOP;
		break;
	case 'n':
		type = KNIGHT;
		break;
	case 'r':
		type = ROOK;
		break;
	case 'q':
		type = QUEEN;
		break;
	case 'k':
		type = KING;
		break;
	default:
		throw util::fmterr("Invalid UCI piece: %c", uci);
	}

	return make_piece((uci == typechar) ? BLACK : WHITE, type);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebp
callq 0x43e0
movsbl %al, %ecx
leal -0x6b(%rcx), %eax
cmpl $0x7, %eax
ja 0x8483
leaq 0x115bd(%rip), %rdx     # 0x19a30
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0xa, %edx
jmp 0x84a6
cmpl $0x62, %ecx
jne 0x84bc
movl $0x2, %edx
jmp 0x84a6
movl $0x6, %edx
jmp 0x84a6
movl $0x4, %edx
jmp 0x84a6
movl $0x8, %edx
jmp 0x84a6
xorl %edx, %edx
xorl %eax, %eax
cmpl %ebp, %ecx
sete %al
orl %edx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x4110
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x115d6(%rip), %rsi     # 0x19aaf
leaq 0x115e4(%rip), %rdx     # 0x19ac4
movq %rsp, %rdi
callq 0x70d8
movb $0x1, %r12b
movsbl %bpl, %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x874a
xorl %r12d, %r12d
movq 0x19ac4(%rip), %rsi     # 0x21fc8
movq 0x19add(%rip), %rdx     # 0x21fe8
movq %rbx, %rdi
callq 0x44c0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x852c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
testb %r12b, %r12b
jne 0x8536
jmp 0x853e
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/piece.cpp
// Function: neocortex::piece::color_from_uci(char)
int piece::color_from_uci(char uci) {
	switch (uci) {
	case 'w':
		return WHITE;
	case 'b':
		return BLACK;
	default:
		throw util::fmterr("Invalid UCI color: %c", uci);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorl %eax, %eax
cmpl $0x77, %edi
je 0x8565
movl %edi, %ebp
cmpl $0x62, %edi
jne 0x8572
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x4110
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x11536(%rip), %rsi     # 0x19ac5
leaq 0x11544(%rip), %rdx     # 0x19ada
movq %rsp, %rdi
callq 0x70d8
movb $0x1, %r12b
movsbl %bpl, %edx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x874a
xorl %r12d, %r12d
movq 0x19a0e(%rip), %rsi     # 0x21fc8
movq 0x19a27(%rip), %rdx     # 0x21fe8
movq %rbx, %rdi
callq 0x44c0
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x85e2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
testb %r12b, %r12b
jne 0x85ec
jmp 0x85f4
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/piece.cpp
// Function: neocortex::piece::type_from_uci(char)
int piece::type_from_uci(char uci) {
	switch (uci) {
	case 'p':
		return PAWN;
	case 'b':
		return BISHOP;
	case 'n':
		return KNIGHT;
	case 'r':
		return ROOK;
	case 'q':
		return QUEEN;
	case 'k':
		return KING;
	default:
		throw util::fmterr("Invalid UCI type: %c", uci);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %r14d
leal -0x6b(%r14), %eax
cmpl $0x7, %eax
ja 0x865b
leaq 0x11405(%rip), %rcx     # 0x19a50
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x5, %eax
jmp 0x867f
cmpl $0x62, %r14d
jne 0x868a
movl $0x1, %eax
jmp 0x867f
movl $0x3, %eax
jmp 0x867f
movl $0x2, %eax
jmp 0x867f
movl $0x4, %eax
jmp 0x867f
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x4110
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1147d(%rip), %rsi     # 0x19b24
leaq 0x1148a(%rip), %rdx     # 0x19b38
leaq 0x8(%rsp), %rdi
callq 0x70d8
movb $0x1, %bpl
movsbl %r14b, %edx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x874a
xorl %ebp, %ebp
movq 0x198f3(%rip), %rsi     # 0x21fc8
movq 0x1990c(%rip), %rdx     # 0x21fe8
movq %rbx, %rdi
callq 0x44c0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x86fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
testb %bpl, %bpl
jne 0x8708
jmp 0x8710
movq %rax, %r14
movq %rbx, %rdi
callq 0x41e0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::Position()
Position::Position() {
	board = Board::standard();

	State first_state;

	eval_counter = 0;

	first_state.castle_rights = 0xF;
	first_state.en_passant_square = square::null;
	first_state.fullmove_number = 1;
	first_state.halfmove_clock = 0;
	first_state.captured_piece = piece::null;
	first_state.captured_square = piece::null;
	first_state.last_move = Move::null;
	first_state.key = 0;
	first_state.key ^= board.get_tt_key();
	first_state.key ^= zobrist::castle(first_state.castle_rights);
	first_state.in_check = 0;
	first_state.was_castle = false;
	first_state.was_en_passant = false;

	reset_history_table();

	ply.push_back(first_state);
	color_to_move = piece::WHITE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rdi, %rbx
callq 0x5f30
leaq 0x158(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x158(%rbx)
movq $0x0, 0x168(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x6508
leaq 0x8(%rsp), %r15
movl $0x158, %edx            # imm = 0x158
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4230
movl $0x0, 0x174(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x1c(%r15)
movaps 0x1120a(%rip), %xmm0    # 0x19b80
movups %xmm0, 0xc(%r15)
leaq 0x23216(%rip), %rax     # 0x2bb98
movq (%rax), %rcx
movq %rcx, (%r15)
movl 0x8(%rax), %eax
movl %eax, 0x8(%r15)
movq 0x150(%rbx), %r15
movl $0xf, %edi
callq 0x16a88
xorq %rax, %r15
movq %r15, 0x38(%rsp)
movl $0x0, 0x2c(%rsp)
movw $0x0, 0x30(%rsp)
leaq 0x178(%rbx), %rdi
movl $0x8000, %edx           # imm = 0x8000
xorl %esi, %esi
callq 0x4150
movq 0x160(%rbx), %rsi
cmpq 0x168(%rbx), %rsi
je 0x8a07
movq 0x38(%rsp), %rax
movq %rax, 0x30(%rsi)
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups 0x28(%rsp), %xmm2
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x38, 0x160(%rbx)
jmp 0x8a14
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0xfc68
movl $0x0, 0x170(%rbx)
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
jmp 0x8a2d
movq %rax, %r15
movq (%r14), %rdi
testq %rdi, %rdi
je 0x8a47
movq 0x168(%rbx), %rsi
subq %rdi, %rsi
callq 0x42b0
movq %r15, %rdi
callq 0x44f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::num_repetitions()
int Position::num_repetitions() {
	int res = 0;

	for (size_t i = 0; i < ply.size(); ++i) {
		if (ply[i].key == ply.back().key) {
			++res;
		}
	}

	return res;
}

// Assembly:
movq 0x158(%rdi), %rcx
movq 0x160(%rdi), %rax
movq %rax, %rsi
subq %rcx, %rsi
je 0xf19d
sarq $0x3, %rsi
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rsi, %rdx
movq -0x8(%rax), %rsi
cmpq $0x1, %rdx
adcq $0x0, %rdx
addq $0x30, %rcx
xorl %eax, %eax
xorl %edi, %edi
cmpq %rsi, (%rcx)
sete %dil
addl %edi, %eax
addq $0x38, %rcx
decq %rdx
jne 0xf188
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/search.cpp
// Function: neocortex::search::Search::set_threads(int)
void search::Search::set_threads(int num) {
	if (num < 1) num = 1;
	if (num > max_threads()) num = max_threads();

	num_threads = num;

	neocortex_info("Using %d search threads.\n", num);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
cmpl $0x2, %esi
movl $0x1, %ebx
cmovgel %esi, %ebx
callq 0x4370
cmpl %eax, %ebx
jle 0xff01
callq 0x4370
movl %eax, %ebx
movl %ebx, %eax
xchgl %eax, 0x8178(%r14)
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xafd6(%rip), %rsi      # 0x1aef0
leaq 0xafe8(%rip), %rdx      # 0x1af09
movq %rsp, %r14
movq %r14, %rdi
callq 0x70d8
movq %r14, %rdi
movl %ebx, %esi
callq 0x11c74
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xff4c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xff6f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq %rbx, %rdi
callq 0x44f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/search.cpp
// Function: neocortex::search::Search::smp_worker(int, neocortex::Position, int*)
void search::Search::smp_worker(int s_depth, Position root, int* node_count_out) {
	PV local_pv;

	root.reset_eval_counter();
	alphabeta(root, s_depth, score::CHECKMATED, score::CHECKMATE, 0, &local_pv, smp_should_stop);
	
	if (node_count_out) {
		*node_count_out = root.get_eval_counter();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x610, %rsp            # imm = 0x610
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
leaq 0xc(%rsp), %r12
movq %r12, %rdi
callq 0x7b28
movq %r14, %rdi
callq 0xfb92
leaq 0x8198(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0xffc2f700, %ecx       # imm = 0xFFC2F700
movl $0x3d0900, %r8d         # imm = 0x3D0900
xorl %r9d, %r9d
pushq %rax
pushq %r12
callq 0x10b54
addq $0x10, %rsp
testq %rbx, %rbx
je 0x1122b
movq %r14, %rdi
callq 0xfb9e
movl %eax, (%rbx)
addq $0x610, %rsp            # imm = 0x610
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/square.cpp
// Function: neocortex::square::from_uci(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int square::from_uci(std::string uci) {
	if (uci == "-") {
		return square::null;
	} else {
		assert(uci.size() == 2);
		return at(uci[1] - '1', uci[0] - 'a');
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x8f4b(%rip), %rsi      # 0x1b09a
callq 0x4080
testl %eax, %eax
je 0x1217d
cmpq $0x2, 0x8(%rbx)
jne 0x12184
movq (%rbx), %rcx
movsbl 0x1(%rcx), %eax
addl $-0x31, %eax
movsbl (%rcx), %ecx
addl $-0x61, %ecx
movl %ecx, %edx
orl %eax, %edx
cmpl $0x8, %edx
jae 0x121a3
leal (%rcx,%rax,8), %eax
jmp 0x12182
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
leaq 0x8f11(%rip), %rdi      # 0x1b09c
leaq 0x8f1a(%rip), %rsi      # 0x1b0ac
leaq 0x8f22(%rip), %rcx      # 0x1b0bb
movl $0x12, %edx
callq 0x4190
leaq 0x68d9(%rip), %rdi      # 0x18a83
leaq 0x68c5(%rip), %rsi      # 0x18a76
leaq 0x68fa(%rip), %rcx      # 0x18ab2
movl $0x22, %edx
callq 0x4190
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/square.cpp
// Function: neocortex::square::to_uci[abi:cxx11](int)
std::string square::to_uci(int sq) {
	if (sq == square::null) {
		return "-";
	}

	std::string output;

	output += 'a' + file(sq);
	output += '1' + rank(sq);

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
cmpl $-0x1, %esi
je 0x12211
movl %esi, %ebp
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
cmpl $0x40, %esi
jae 0x12235
movl %ebp, %eax
andb $0x7, %al
addb $0x61, %al
movzbl %al, %esi
movq %rbx, %rdi
callq 0x4240
shrl $0x3, %ebp
addb $0x31, %bpl
movsbl %bpl, %esi
movq %rbx, %rdi
callq 0x4240
jmp 0x12227
leaq 0x8e82(%rip), %rsi      # 0x1b09a
leaq 0x8e7c(%rip), %rdx      # 0x1b09b
movq %rbx, %rdi
callq 0x70d8
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x69e4(%rip), %rdi      # 0x18c20
leaq 0x6833(%rip), %rsi      # 0x18a76
leaq 0x68f6(%rip), %rcx      # 0x18b40
movl $0x40, %edx
callq 0x4190
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1226a
movq (%r15), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/tt.cpp
// Function: neocortex::tt::resize(int)
void tt::resize(int mb) {
	std::lock_guard<std::shared_mutex> lock(tt_resize_mutex);
	if (tt_buffer) delete[] tt_buffer;
	if (tt_mutex_buffer) delete[] tt_mutex_buffer;

	tt_buffer_size = mb * 1024 * 1024 / (sizeof(tt::entry) + sizeof(std::mutex));
	tt_buffer = new tt::entry[tt_buffer_size];
	tt_mutex_buffer = new std::mutex[tt_buffer_size];

	neocortex_debug("Transposition table resized to %d mb (%d entries)\n", mb, tt_buffer_size);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leaq 0x199d3(%rip), %rdi     # 0x2bc60
callq 0x4410
cmpl $0x23, %eax
je 0x12413
movq 0x199ae(%rip), %rdi     # 0x2bc50
testq %rdi, %rdi
je 0x122ac
callq 0x4340
movq 0x199e5(%rip), %rdi     # 0x2bc98
testq %rdi, %rdi
je 0x122bd
callq 0x4340
movl %ebx, %eax
shll $0x14, %eax
cltq
movabsq $-0x1c71c71c71c71c71, %rcx # imm = 0xE38E38E38E38E38F
mulq %rcx
movq %rdx, %r14
shrq $0x6, %r14
movl %r14d, 0x19979(%rip)    # 0x2bc58
movq %r14, %r12
shlq $0x20, %r12
movslq %r14d, %r15
movq %r15, %rax
shrq $0x3b, %rax
movq %r12, %rcx
sarq $0x1b, %rcx
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rcx, %rdi
callq 0x4030
testq %r12, %r12
je 0x1234f
movq %r15, %rdx
shlq $0x5, %rdx
movq %rax, %rcx
addq %rdx, %rcx
leaq 0x19878(%rip), %rdx     # 0x2bb98
movq %rax, %rsi
movq $0x0, (%rsi)
movq (%rdx), %rdi
movq %rdi, 0x8(%rsi)
movl 0x8(%rdx), %edi
movl %edi, 0x10(%rsi)
movq $0x2, 0x14(%rsi)
movl $0x0, 0x1c(%rsi)
addq $0x20, %rsi
cmpq %rcx, %rsi
jne 0x12323
movq %rax, 0x198fa(%rip)     # 0x2bc50
movl $0x28, %ecx
movq %r15, %rax
mulq %rcx
movq %rax, %r12
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x4030
movq %rax, %r15
testl %r14d, %r14d
je 0x123aa
addq $-0x28, %r12
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
movq %r12, %rax
mulq %rcx
shrq $0x5, %rdx
leaq (%rdx,%rdx,4), %rax
leaq 0x28(,%rax,8), %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x4150
movq %r15, 0x198e7(%rip)     # 0x2bc98
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8d27(%rip), %rsi      # 0x1b0e8
leaq 0x8d52(%rip), %rdx      # 0x1b11a
leaq 0x8(%rsp), %rdi
callq 0x70d8
movl 0x19880(%rip), %edx     # 0x2bc58
leaq 0x8(%rsp), %rdi
movl %ebx, %esi
callq 0x124dd
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x123fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0x1985e(%rip), %rdi     # 0x2bc60
callq 0x4350
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x23, %edi
callq 0x41a0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x1243e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x1243e
jmp 0x1243b
movq %rax, %rbx
leaq 0x1981b(%rip), %rdi     # 0x2bc60
callq 0x4350
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/util.cpp
// Function: neocortex::util::timestring[abi:cxx11]()
std::string util::timestring() {
	std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
	std::tm tm;
	
#ifdef NEOCORTEX_WIN32
	if (localtime_s(&tm, &t)) {
		throw std::runtime_error("localtime() failed.");
	}
#else
	if (!localtime_r(&t, &tm)) {
		throw std::runtime_error("localtime() failed.");
	}
#endif

	std::stringstream ss;
	ss << std::put_time(&tm, "%Y-%m-%d %H:%M:%S");

	return ss.str();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
callq 0x4050
movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x1a, %rdx
addq %rax, %rdx
movq %rsp, %rdi
movq %rdx, (%rdi)
leaq 0x8(%rsp), %rsi
callq 0x4120
testq %rax, %rax
je 0x15f3b
leaq 0x40(%rsp), %rdi
callq 0x41c0
leaq 0x50(%rsp), %rdi
leaq 0x5714(%rip), %rdx      # 0x1b60c
leaq 0x8(%rsp), %rsi
callq 0x16497
leaq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0x4430
movq 0xc052(%rip), %rsi      # 0x21f68
leaq 0x40(%rsp), %rdi
callq 0x41f0
leaq 0xc0(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4110
movq %rax, %r14
leaq 0x56a9(%rip), %rsi      # 0x1b5f8
movq %rax, %rdi
callq 0x40d0
movq 0xc092(%rip), %rsi      # 0x21ff0
movq 0xc023(%rip), %rdx      # 0x21f88
movq %r14, %rdi
callq 0x44c0
movq %rax, %rbx
movq %r14, %rdi
callq 0x41e0
jmp 0x15f9b
movq %rax, %rbx
movq 0xbfe4(%rip), %rsi      # 0x21f68
leaq 0x40(%rsp), %rdi
callq 0x41f0
leaq 0xc0(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/util.cpp
// Function: neocortex::util::split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
std::vector<std::string> util::split(std::string input, char delim) {
	char* buf = new char[input.size() + 1];
	int token_ind = 0;

	std::vector<std::string> result;

	for (size_t c = 0; c < input.size(); ++c) {
		if (input[c] == delim) {
			if (token_ind > 0) {
				buf[token_ind] = '\0';
				token_ind = 0;
				result.push_back(std::string(buf));
			} else {
				continue;
			}
		} else {
			buf[token_ind++] = input[c];
		}
	}

	if (token_ind > 0) {
		buf[token_ind] = '\0';
		token_ind = 0;
		result.push_back(std::string(buf));
	}

	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rsi), %rbx
leaq 0x1(%rbx), %rdi
callq 0x4030
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
movq %r12, (%rsp)
movq $0x0, 0x10(%r12)
testq %rbx, %rbx
je 0x1611e
movq %rax, %r14
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
xorl %eax, %eax
movq (%r15), %rcx
movb (%rcx,%r13), %cl
cmpb %bpl, %cl
jne 0x160b7
testl %eax, %eax
jle 0x160c0
movl %eax, %eax
movb $0x0, (%r14,%rax)
leaq 0x18(%rsp), %rbx
movq %rbx, 0x8(%rsp)
movq %r14, %rdi
callq 0x40f0
leaq (%rax,%r14), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x70d8
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x1663a
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x160af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x8(%r15), %rbx
xorl %eax, %eax
jmp 0x160c0
movslq %eax, %rdx
incl %eax
movb %cl, (%r14,%rdx)
incq %r13
cmpq %rbx, %r13
jb 0x16054
testl %eax, %eax
jle 0x1611e
movl %eax, %eax
movb $0x0, (%r14,%rax)
leaq 0x8(%rsp), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, (%r15)
movq %r14, %rdi
callq 0x40f0
movq %r14, %rdx
addq %rax, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70d8
leaq 0x8(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1663a
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1611e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16135
jmp 0x16151
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x16154
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0x16154
movq %rax, %r14
movq (%rsp), %rdi
callq 0x6f0e
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/util.cpp
// Function: neocortex::util::join(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>>>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string util::join(std::vector<std::string> parts, std::string delim) {
	std::string output;

	for (size_t i = 0; i < parts.size(); ++i) {
		if (i) output += delim;
		output += parts[i];
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x16466
movq %rdx, %r14
movq %rsi, %r15
xorl %r13d, %r13d
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x1643d
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x4090
movq (%r15), %rax
addq %r13, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x4090
incq %rbp
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %r13
cmpq %rcx, %rbp
jb 0x16423
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x1648f
movq (%r12), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0
// File: /workspace/github_cpp_makefile_star2_O3/codeandkey[P]neocortex/src/zobrist.cpp
// Function: neocortex::zobrist::init()
void zobrist::init() {
	assert(!zobrist_initialized);

	std::random_device rng;
	std::mt19937_64 twister(rng()); /* TODO: tune a good zobrist seed */
	std::uniform_int_distribution<zobrist::Key> dist;

	for (int sq = 0; sq < 64; ++sq) {
		for (int p = 0; p < 12; ++p) {
			piece_keys[sq][p] = dist(twister);
		}
	}

	for (int castle = 0; castle < 16; ++castle) {
		castle_keys[castle] = dist(twister);
	}

	for (int file = 0; file < 8; ++file) {
		en_passant_keys[file] = dist(twister);
	}

	black_to_move_key = dist(twister);
	zobrist_initialized = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d60, %rsp           # imm = 0x1D60
cmpb $0x1, 0x1540a(%rip)     # 0x2bcb1
je 0x169f1
leaq 0x9d8(%rsp), %rbx
movq %rbx, %rdi
callq 0x16b58
movq %rbx, %rdi
callq 0x4390
movl %eax, %esi
movq %rsi, 0x10(%rsp)
movl $0x1, %eax
movabsq $0x5851f42d4c957f2d, %rcx # imm = 0x5851F42D4C957F2D
movq %rsi, %rdx
shrq $0x3e, %rdx
xorq %rsi, %rdx
imulq %rcx, %rdx
addq %rax, %rdx
movq %rdx, 0x10(%rsp,%rax,8)
incq %rax
movq %rdx, %rsi
cmpq $0x138, %rax            # imm = 0x138
jne 0x168de
leaq 0x10(%rsp), %rbx
movq $0x138, 0x9c0(%rbx) # imm = 0x138
movq %rsp, %r14
movq $0x0, (%r14)
movq $-0x1, 0x8(%r14)
leaq 0x15398(%rip), %r15     # 0x2bcc0
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x16bd2
movq %rax, (%r15,%r13,8)
incq %r13
cmpq $0xc, %r13
jne 0x1692e
incq %r12
addq $0x60, %r15
cmpq $0x40, %r12
jne 0x1692b
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbx
movq %rsp, %r14
leaq 0x16b58(%rip), %r12     # 0x2d4c0
movq %r14, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x16bd2
movq %rax, (%r15,%r12)
addq $0x8, %r15
cmpq $0x80, %r15
jne 0x16968
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbx
movq %rsp, %r14
leaq 0x16ba7(%rip), %r12     # 0x2d540
movq %r14, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x16bd2
movq %rax, (%r15,%r12)
addq $0x8, %r15
cmpq $0x40, %r15
jne 0x16999
leaq 0x10(%rsp), %rsi
movq %rsp, %rdi
movq %rdi, %rdx
callq 0x16bd2
movq %rax, 0x16bb4(%rip)     # 0x2d580
movb $0x1, 0x152de(%rip)     # 0x2bcb1
leaq 0x9d8(%rsp), %rdi
callq 0x4280
addq $0x1d60, %rsp           # imm = 0x1D60
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4c58(%rip), %rdi      # 0x1b650
leaq 0x4c66(%rip), %rsi      # 0x1b665
leaq 0x4c6f(%rip), %rcx      # 0x1b675
movl $0x16, %edx
callq 0x4190
jmp 0x16a32
jmp 0x16a1a
jmp 0x16a1a
jmp 0x16a1a
jmp 0x16a1a
movq %rax, %rbx
leaq 0x9d8(%rsp), %rdi
callq 0x4280
movq %rbx, %rdi
callq 0x44f0
movq %rax, %rdi
callq 0x11bad