LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/integeruser[P]GA3C-cpp/src/ga3c.cc
// Function: train(std::shared_ptr<Model>, std::vector<std::shared_ptr<Environment>, std::allocator<std::shared_ptr<Environment>>> const&)
void train(std::shared_ptr<Model> model, const std::vector<std::shared_ptr<Environment>>& environments)
{
    assert(BATCH_SIZE >= 0);

    assert(N_STEP_RETURN >= 1);
    assert(GAMMA >= 0.0f and GAMMA <= 1.0f);

    assert(EPSILON_START >= 0.0f and EPSILON_START <= 1.0f);
    assert(EPSILON_END   >= 0.0f and EPSILON_END   <= 1.0f and EPSILON_END <= EPSILON_START);

    assert(NUM_AGENTS >= 0);
    assert(MAX_NUM_TRAINING_EXPERIENCES >= 0);

    shared_model = model;
    assert(environments.size() == NUM_AGENTS);

    // start the trainer and the agents
    auto trainer_thread = std::thread(trainer);
    auto agents_threads = std::vector<std::thread>(NUM_AGENTS);
    for (uint32_t id = 0; id < NUM_AGENTS; ++id) {
        agents_threads[id] = std::thread(agent, id, environments[id]);
    }

    // and wait for them to finish
    for (uint32_t id = 0; id < NUM_AGENTS; ++id) {
        agents_threads[id].join();
    }
    trainer_thread.join();
    assert(num_training_experiences == MAX_NUM_TRAINING_EXPERIENCES);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x8474(%rip), %rdi      # 0xb1a0
callq 0x3d08
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x4, %rax
leaq 0x8445(%rip), %r13      # 0xb188
movl (%r13), %ecx
cmpq %rcx, %rax
jne 0x2e32
leaq -0x11f(%rip), %rsi      # 0x2c38
leaq 0x8(%rsp), %rdi
callq 0x339c
movl (%r13), %esi
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x3402
xorl %ecx, %ecx
leaq -0x6c1(%rip), %r14      # 0x26bc
leaq 0x10(%rsp), %r15
leaq 0x4(%rsp), %r12
movl %ecx, 0x4(%rsp)
movl (%r13), %eax
cmpl %eax, %ecx
jae 0x2dcf
movl %ecx, %ecx
shlq $0x4, %rcx
addq (%rbx), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3454
movl 0x4(%rsp), %edi
shlq $0x3, %rdi
addq 0x18(%rsp), %rdi
movq %r15, %rsi
callq 0x34e8
movq %r15, %rdi
callq 0x3502
movl 0x4(%rsp), %ecx
incl %ecx
jmp 0x2d87
xorl %ebx, %ebx
xorl %r14d, %r14d
movl %eax, %eax
cmpq %rax, %r14
jae 0x2df5
movq 0x18(%rsp), %rdi
addq %rbx, %rdi
callq 0x2290
incq %r14
movl (%r13), %eax
addq $0x8, %rbx
jmp 0x2dd4
leaq 0x8(%rsp), %rdi
callq 0x2290
movl 0x8453(%rip), %eax      # 0xb258
leaq 0x8380(%rip), %rcx      # 0xb18c
cmpl (%rcx), %eax
jne 0x2e51
leaq 0x18(%rsp), %rdi
callq 0x3510
leaq 0x8(%rsp), %rdi
callq 0x3502
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x330f(%rip), %rdi      # 0x6148
leaq 0x324b(%rip), %rsi      # 0x608b
leaq 0x32ab(%rip), %rcx      # 0x60f2
movl $0xb7, %edx
callq 0x20e0
leaq 0x3312(%rip), %rdi      # 0x616a
leaq 0x322c(%rip), %rsi      # 0x608b
leaq 0x328c(%rip), %rcx      # 0x60f2
movl $0xc5, %edx
callq 0x20e0
jmp 0x2e79
movq %rax, %rbx
jmp 0x2e86
jmp 0x2e79
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3510
leaq 0x8(%rsp), %rdi
callq 0x3502
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/integeruser[P]GA3C-cpp/include/queue.h
// Function: Queue<std::tuple<std::vector<float, std::allocator<float>>, long, float>>::pop()
T pop()
        {
            std::unique_lock<std::mutex> lock(this->mutex);
            this->condition.wait(lock, [=] { return !this->queue.empty(); });
            T rc(std::move(this->queue.back()));
            this->queue.pop_back();
            return rc;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x4a0c
leaq 0x28(%r14), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x5380
movq 0x88(%r14), %rsi
cmpq 0x90(%r14), %rsi
jne 0x3323
movq 0xa0(%r14), %rax
movl $0x1e0, %esi            # imm = 0x1E0
addq -0x8(%rax), %rsi
addq $0x58, %r14
addq $-0x28, %rsi
movq %rbx, %rdi
callq 0x53d4
movq %r14, %rdi
callq 0x53ae
movq %rsp, %rdi
callq 0x4a4a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4a4a
movq %rbx, %rdi
callq 0x22b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/integeruser[P]GA3C-cpp/src/main.cc
// Function: main
int main(int argc, char const *argv[])
{
    const auto start = std::chrono::steady_clock::now();

    // train the model
    auto model = std::make_shared<Model>();
    std::vector<std::shared_ptr<Environment>> environments;
    for (uint32_t id = 0; id < NUM_AGENTS; ++id) {
        auto env = std::make_shared<Environment>();
        environments.push_back(env);
    }
    train(model, environments);

    const auto end = std::chrono::steady_clock::now();
    const std::chrono::duration<float> duration_s = end-start;
    std::cout << "Training finished in " << duration_s.count() << " seconds" << std::endl;

    // save the trained model
    model->save();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
callq 0x21e0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x57be
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r15
andq $0x0, 0x10(%r15)
movaps %xmm0, (%r15)
xorl %ebp, %ebp
leaq 0x48(%rsp), %r14
leaq 0x40(%rsp), %r12
cmpl 0x5ac1(%rip), %ebp      # 0xb188
jae 0x56e8
movq %r12, %rdi
callq 0x57d9
movq %r15, %rdi
movq %r12, %rsi
callq 0x57f4
movq %r14, %rdi
callq 0x3532
incl %ebp
jmp 0x56c1
leaq 0x10(%rsp), %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5842
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x2d12
leaq 0x18(%rsp), %rdi
callq 0x3532
callq 0x21e0
movq %rax, %r14
movq 0x58ba(%rip), %rdi      # 0xafd8
leaq 0xbd7(%rip), %rsi       # 0x62fc
callq 0x21b0
subq %rbx, %r14
cvtsi2ss %r14, %xmm0
divss 0xbbe(%rip), %xmm0      # 0x62f8
movq %rax, %rdi
callq 0x2130
leaq 0xbc9(%rip), %rsi       # 0x6312
movq %rax, %rdi
callq 0x21b0
movq %rax, %rdi
callq 0x20a0
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x20(%rsp), %rdi
callq 0x5820
leaq 0x8(%rsp), %rdi
callq 0x3532
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x5798
jmp 0x579f
movq %rax, %rbx
movq %r14, %rdi
callq 0x3532
jmp 0x57a2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5820
leaq 0x8(%rsp), %rdi
callq 0x3532
movq %rbx, %rdi
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O2/tdv[P]boss/boss/examples/multy_component/client/main.cpp
// Function: main
int main()
{
  try
  {
    Boss::Loader Ldr("Registry.xml", "./" MAKE_MODULE_NAME("service_registry"),
                     "./" MAKE_MODULE_NAME("class_factory"));
    auto Obj1 = Boss::CreateObject<MyNs::IFace1>(MyNs::Service::Id::Face1);
    if (Obj1->Method() != Boss::Status::Ok)
      std::cerr << "Failed to call IFace1::Method" << std::endl;
    auto Obj2 = Boss::CreateObject<MyNs::IFace2>(MyNs::Service::Id::Face2);
    if (Obj2->Method() != Boss::Status::Ok)
      std::cerr << "Failed to call IFace2::Method" << std::endl;
  }
  catch (std::exception const &e)
  {
    std::cerr << "Error: " << e.what() << std::endl;
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
leaq 0xa6ea8(%rip), %rsi     # 0xbe004
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x8fe30
leaq 0xa6e9f(%rip), %rsi     # 0xbe011
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x8fe30
leaq 0xa6ea2(%rip), %rsi     # 0xbe02a
leaq 0x50(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x8fe30
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0x17378
leaq 0x50(%rsp), %rdi
callq 0x8d4b0
leaq 0x10(%rsp), %rdi
callq 0x8d4b0
leaq 0x30(%rsp), %rdi
callq 0x8d4b0
leaq 0x30(%rsp), %rdi
movl $0x1c3fa8af, %esi       # imm = 0x1C3FA8AF
callq 0x17505
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testl %eax, %eax
je 0x17207
leaq 0xe616d(%rip), %rdi     # 0xfd360
leaq 0xa6e46(%rip), %rsi     # 0xbe040
callq 0x86d00
movq %rax, %rdi
callq 0x865e0
leaq 0x10(%rsp), %rdi
movl $0x8536f915, %esi       # imm = 0x8536F915
callq 0x17777
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testl %eax, %eax
je 0x17240
leaq 0xe6134(%rip), %rdi     # 0xfd360
leaq 0xa6e2b(%rip), %rsi     # 0xbe05e
callq 0x86d00
movq %rax, %rdi
callq 0x865e0
leaq 0x10(%rsp), %rdi
callq 0x179ea
leaq 0x30(%rsp), %rdi
callq 0x179fa
leaq 0x70(%rsp), %rdi
callq 0x17a0a
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
jmp 0x172c5
movq %rdx, %r14
movq %rax, %rbx
jmp 0x172d5
movq %rdx, %r14
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x8d4b0
jmp 0x1728d
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x8d4b0
jmp 0x1729f
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8d4b0
jmp 0x172df
movq %rdx, %r14
movq %rax, %rbx
jmp 0x172df
movq %rdx, %r14
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x179ea
jmp 0x172cb
movq %rdx, %r14
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x179fa
leaq 0x70(%rsp), %rdi
callq 0x17a0a
cmpl $0x1, %r14d
jne 0x17334
movq %rbx, %rdi
callq 0x1a9a0
movq %rax, %rbx
leaq 0xe6069(%rip), %rdi     # 0xfd360
leaq 0xa6d7e(%rip), %rsi     # 0xbe07c
callq 0x86d00
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x86d00
movq %rax, %rdi
callq 0x865e0
callq 0x1aa10
jmp 0x1725e
movq %rax, %rbx
callq 0x1aa10
movq %rbx, %rdi
callq 0xbb270
movq %rax, %rdi
callq 0x17a64
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/attacks.cpp
// Function: make_rocc(int, unsigned long, int)
bitboard make_rocc(int index, bitboard mask, int bits) {
	bitboard output = 0;

	for (int i = 0; i < bits; ++i) {
		if ((index >> i) & 1) {
			/* The ith bit in mask should be passed to result. */

			int currentbit = -1;
			for (int maskpos = 0; maskpos < 64; ++maskpos) {
				if ((mask >> maskpos) & 1) {
					if (++currentbit == i) {
						/* Pass this bit on! */
						output |= (1ULL << maskpos);
					}
				}
			}
		}
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %r8d, %r8d
testl %edx, %edx
cmovlel %r8d, %edx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movabsq $0x1, %r10
xorl %eax, %eax
xorl %r11d, %r11d
cmpl %edx, %r11d
je 0x50ac
btl %r11d, %edi
jae 0x50a7
xorl %ecx, %ecx
movl %r9d, %ebx
cmpq $0x40, %rcx
je 0x50a7
movq %r10, %r14
shlq %cl, %r14
leal 0x1(%rbx), %ebp
cmpl %r11d, %ebp
cmovneq %r8, %r14
btq %rcx, %rsi
cmovaeq %r8, %r14
cmovael %ebx, %ebp
orq %r14, %rax
incq %rcx
movl %ebp, %ebx
jmp 0x507c
incl %r11d
jmp 0x506c
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/bitboard.cpp
// Function: neocortex::bb::to_string[abi:cxx11](unsigned long)
std::string bb::to_string(bitboard inp) {
	std::string output;

	for (int r = 7; r >= 0; --r) {
		for (int f = 0; f < 8; ++f) {
			if (bb::mask(square::at(r, f)) & inp) {
				output += '1';
			} else {
				output += '.';
			}
		}

		output += '\n';
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
pushq $0x7
popq %rbp
pushq $0xa
popq %r15
testl %ebp, %ebp
js 0x564b
xorl %r12d, %r12d
cmpl $0x8, %r12d
je 0x563c
movl %ebp, %edi
movl %r12d, %esi
callq 0x5131
movl %eax, %edi
callq 0x5103
xorl %ecx, %ecx
testq %r14, %rax
setne %cl
leal (%rcx,%rcx,2), %esi
addl $0x2e, %esi
movq %rbx, %rdi
callq 0x42a0
incl %r12d
jmp 0x560a
movq %rbx, %rdi
movl %r15d, %esi
callq 0x42a0
decl %ebp
jmp 0x5603
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5659
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::Board()
Board::Board() {
	for (int i = 0; i < 64; ++i) {
		state[i] = -1;
	}

	for (int c = 0; c < 2; ++c) {
		color_occ[c] = 0;
	}

	for (int p = 0; p < 6; ++p) {
		piece_occ[p] = 0;
	}

	key = 0;
	global_occ = 0;
	mat_mg = mat_eg = 0;
}

// Assembly:
pushq $0x12
popq %rax
cmpq $0x52, %rax
je 0x56b6
orl $-0x1, (%rdi,%rax,4)
incq %rax
jmp 0x56a7
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
pushq $0x3
popq %rax
cmpq $0x9, %rax
je 0x56d0
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x56c0
andq $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
pushq $0x7
popq %rbp
xorl %r13d, %r13d
testl %ebp, %ebp
js 0x5e21
xorl %r12d, %r12d
cmpl $0x8, %r12d
je 0x5df4
movl %ebp, %edi
movl %r12d, %esi
callq 0x5131
movslq %eax, %r15
movl 0x48(%r14,%r15,4), %edi
cmpl $-0x1, %edi
je 0x5dec
testl %r13d, %r13d
jle 0x5dda
addb $0x30, %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x42a0
movl 0x48(%r14,%r15,4), %edi
xorl %r13d, %r13d
callq 0x77a4
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42a0
jmp 0x5def
incl %r13d
incl %r12d
jmp 0x5da0
testl %r13d, %r13d
jle 0x5e0c
addb $0x30, %r13b
movsbl %r13b, %esi
movq %rbx, %rdi
callq 0x42a0
xorl %r13d, %r13d
subl $0x1, %ebp
jb 0x5d95
movq %rbx, %rdi
pushq $0x2f
popq %rsi
callq 0x42a0
jmp 0x5d95
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5e35
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
pushq $0x7
popq %rbp
pushq $0xa
popq %r15
testl %ebp, %ebp
js 0x5eb8
xorl %r12d, %r12d
cmpl $0x8, %r12d
je 0x5ea9
movl %ebp, %edi
movl %r12d, %esi
callq 0x5131
cltq
movl 0x48(%r14,%rax,4), %edi
cmpl $-0x1, %edi
je 0x5e97
callq 0x77a4
jmp 0x5e99
movb $0x2e, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42a0
incl %r12d
jmp 0x5e74
movq %rbx, %rdi
movl %r15d, %esi
callq 0x42a0
decl %ebp
jmp 0x5e6d
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5ec6
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5eda
movq %rsp, %r14
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xe982(%rip), %r15      # 0x14950
testq %rax, %rax
je 0x5fec
movq %r14, %rdi
callq 0x64fc
cltq
movslq 0x48(%rbx,%rax,4), %rax
addl (%r15,%rax,4), %ebp
movq (%rsp), %rax
jmp 0x5fce
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %rsi, (%r15)
movslq %edx, %rax
movq 0x8(%rdi,%rax,8), %r12
testq %rbx, %rbx
je 0x6038
movq %r15, %rdi
callq 0x64fc
movq %r14, %rdi
movl %eax, %esi
callq 0x5eda
testq %r12, %rax
jne 0x6038
movq (%rsp), %rbx
jmp 0x6016
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movslq %esi, %r15
movq 0x8(%rdi,%r15,8), %rax
andq 0x18(%rdi), %rax
movq %rsp, %rbx
movq %rax, (%rbx)
xorl %r14d, %r14d
shlq $0x9, %r15
leaq 0x1814e(%rip), %r12     # 0x1e1c0
addq %r15, %r12
addq 0x16f24(%rip), %r15     # 0x1cfa0
testq %rax, %rax
je 0x609c
movq %rbx, %rdi
callq 0x64fc
cltq
movq (%r12,%rax,8), %rcx
orq (%r15,%rax,8), %rcx
orq %rcx, %r14
movq (%rsp), %rax
jmp 0x607c
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq %esi, %r15
movq 0x8(%rdi,%r15,8), %rax
andq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
xorl %r14d, %r14d
shlq $0x9, %r15
addq 0x16ec9(%rip), %r15     # 0x1cfa0
testq %rax, %rax
je 0x60f1
movq %rbx, %rdi
callq 0x64fc
cltq
orq (%r15,%rax,8), %r14
movq 0x8(%rsp), %rax
jmp 0x60d7
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq %esi, %r15
movq 0x8(%rdi,%r15,8), %rax
andq 0x18(%rdi), %rax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
xorl %r14d, %r14d
shlq $0x9, %r15
addq 0x16eb7(%rip), %r15     # 0x1cfe0
testq %rax, %rax
je 0x6143
movq %rbx, %rdi
callq 0x64fc
cltq
orq (%r15,%rax,8), %r14
movq 0x8(%rsp), %rax
jmp 0x6129
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq %esi, %rax
movq 0x8(%rdi,%rax,8), %rcx
andq 0x18(%rdi), %rcx
leaq 0x8(%rsp), %rbx
movq %rcx, (%rbx)
xorl %r14d, %r14d
leaq 0x20849(%rip), %r15     # 0x269c0
testq %rcx, %rcx
je 0x61a3
movq %rbx, %rdi
callq 0x64fc
movslq %eax, %rdx
movq 0x8(%rsp), %rcx
testq %rcx, (%r15,%rdx,8)
jne 0x6177
movl %eax, %edi
callq 0x5103
orq %rax, %r14
movq 0x8(%rsp), %rcx
jmp 0x6177
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/board.cpp
// Function: neocortex::Board::backward_pawns(int)
bitboard Board::backward_pawns(int col) {
	bitboard pawns = piece_occ[piece::PAWN] & color_occ[col];
	bitboard stops = bb::shift(pawns, (col == piece::WHITE) ? NORTH : SOUTH);

	bitboard opp_pawns = piece_occ[piece::PAWN] & color_occ[!col];
	bitboard opp_attacks = bb::shift(opp_pawns & ~FILE_A, (col == piece::WHITE) ? NORTHWEST : SOUTHWEST);

	opp_attacks |= bb::shift(opp_pawns & ~FILE_H, (col == piece::WHITE) ? NORTHEAST : SOUTHEAST);

	stops &= ~attack_spans(col);
	stops &= opp_attacks;

	return bb::shift(stops, (col == piece::WHITE) ? SOUTH : NORTH);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %r14
xorl %eax, %eax
testl %esi, %esi
sete %al
movq 0x8(%rdi,%rax,8), %rax
andq %r14, %rax
movabsq $-0x101010101010102, %rcx # imm = 0xFEFEFEFEFEFEFEFE
andq %rax, %rcx
movq %rcx, %rdx
shlq $0x7, %rdx
shrq $0x9, %rcx
movabsq $0x7f7f7f7f7f7f7f7f, %r15 # imm = 0x7F7F7F7F7F7F7F7F
andq %rax, %r15
movq %r15, %rax
shlq $0x9, %rax
orq %rdx, %rax
shrq $0x7, %r15
orq %rcx, %r15
testl %esi, %esi
movslq %esi, %rbx
cmoveq %rax, %r15
andq 0x8(%rdi,%rbx,8), %r14
movq %r14, %rax
shlq $0x8, %rax
shrq $0x8, %r14
testl %ebx, %ebx
cmoveq %rax, %r14
movl %ebx, %esi
callq 0x60fe
notq %rax
andq %r14, %rax
andq %r15, %rax
movq %rax, %rcx
shlq $0x8, %rcx
shrq $0x8, %rax
testl %ebx, %ebx
cmovneq %rcx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r13
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 0x44b0
addq $0x20, %rsp
testl %eax, %eax
js 0x76c6
movl %eax, %r12d
leaq 0x1(%r12), %r14
movq %r14, %rdi
callq 0x4030
movq %rax, %r15
movq %rax, (%rsp)
movq (%r13), %rdx
subq $0x8, %rsp
movq %rax, %rdi
movq %r14, %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 0x44b0
addq $0x20, %rsp
leaq (%r15,%r12), %rdx
incq %rdx
decq %rdx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6548
movq %rsp, %rdi
callq 0x6712
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x4150
movq %rax, %rbx
leaq 0xc75c(%rip), %rsi      # 0x13e34
movq %rax, %rdi
callq 0x40e0
movq 0x15909(%rip), %rsi     # 0x1cff0
movq 0x15892(%rip), %rdx     # 0x1cf80
movq %rbx, %rdi
callq 0x4520
movq %rax, %r14
movq %rbx, %rdi
callq 0x4240
jmp 0x770e
movq %rax, %r14
movq %rsp, %rdi
callq 0x6712
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 0x68e0
leal -0x3d08e0(%rdi), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x68de
testl %edi, %edi
js 0x68dc
decl %edi
jmp 0x68de
incl %edi
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3d08e0(%r14), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x6933
testl %r14d, %r14d
jle 0x696a
leaq 0xdf5c(%rip), %rsi      # 0x14864
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
movl $0x3d0900, %edx         # imm = 0x3D0900
subl %r14d, %edx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x6ad1
leaq 0x48(%rsp), %rdi
jmp 0x699c
leaq 0xdf33(%rip), %rsi      # 0x1486d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
cvtsi2ss %r14d, %xmm0
divss 0xdf0a(%rip), %xmm0     # 0x14860
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6ba6
leaq 0x8(%rsp), %rdi
jmp 0x699c
leaq 0xdef7(%rip), %rsi      # 0x14868
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
addl $0x3d0900, %r14d        # imm = 0x3D0900
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x6ad1
leaq 0x28(%rsp), %rdi
callq 0x4120
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x69cc
jmp 0x69d3
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x69cc
jmp 0x69d3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4120
jmp 0x69d6
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leal -0x3d08e0(%r14), %eax
cmpl $0xff85ee40, %eax       # imm = 0xFF85EE40
ja 0x6a30
testl %r14d, %r14d
jle 0x6a5d
leaq 0xde6e(%rip), %rsi      # 0x14873
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
movl $0x3d0900, %edx         # imm = 0x3D0900
subl %r14d, %edx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x6ad1
leaq 0x48(%rsp), %rdi
jmp 0x6a8f
leaq 0xde4d(%rip), %rsi      # 0x14884
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x6ad1
leaq 0x8(%rsp), %rdi
jmp 0x6a8f
leaq 0xde17(%rip), %rsi      # 0x1487b
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
addl $0x3d0900, %r14d        # imm = 0x3D0900
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x6ad1
leaq 0x28(%rsp), %rdi
callq 0x4120
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x6abf
jmp 0x6ac6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x6abf
jmp 0x6ac6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4120
jmp 0x6ac9
movq %rax, %rbx
movq %rbx, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6d63
cmpl $0x40, %edx
jae 0x6d7c
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
popq %rax
retq
leaq 0xdc1a(%rip), %rdi      # 0x14984
leaq 0xdc29(%rip), %rsi      # 0x1499a
leaq 0xdc2f(%rip), %rcx      # 0x149a7
pushq $0x16
jmp 0x6d93
leaq 0xdc49(%rip), %rdi      # 0x149cc
leaq 0xdc10(%rip), %rsi      # 0x1499a
leaq 0xdc16(%rip), %rcx      # 0x149a7
pushq $0x17
popq %rdx
callq 0x41f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6e39
movq %rdi, %r14
leaq 0x28(%rsp), %r15
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x4330
movq %r15, %rdi
callq 0xf330
movl %eax, (%r14)
leaq 0x28(%rsp), %rdi
callq 0x4120
leaq 0x8(%rsp), %r15
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %rcx, %rdx
callq 0x4330
movq %r15, %rdi
callq 0xf330
movl %eax, 0x4(%r14)
leaq 0x8(%rsp), %rdi
callq 0x4120
cmpq $0x5, 0x8(%rbx)
jne 0x6e27
movq (%rbx), %rax
movsbl 0x4(%rax), %edi
callq 0x796d
jmp 0x6e2a
pushq $-0x1
popq %rax
movl %eax, 0x8(%r14)
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x4150
movq %rax, %r14
leaq 0xdb97(%rip), %rsi      # 0x149e2
leaq 0x48(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x70cf
xorl %ebp, %ebp
movq 0x1614e(%rip), %rsi     # 0x1cfc8
movq 0x16167(%rip), %rdx     # 0x1cfe8
movq %r14, %rdi
callq 0x4520
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4120
testb %bpl, %bpl
jne 0x6ea0
jmp 0x6ec1
movq %rax, %rbx
movq %r14, %rdi
callq 0x4240
jmp 0x6ec1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x6ebc
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x4550
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
movl (%rsi), %esi
leaq 0x8(%rsp), %rdi
callq 0xf383
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x45c0
leaq 0x8(%rsp), %rdi
callq 0x4120
movl 0x4(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0xf383
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x45c0
leaq 0x8(%rsp), %rdi
callq 0x4120
movl 0x8(%r14), %edi
cmpl $0x5, %edi
ja 0x6f48
callq 0x7a2b
movsbl %al, %esi
movq %rbx, %rdi
callq 0x42a0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x6f68
jmp 0x6f59
jmp 0x6f68
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4120
jmp 0x6f6b
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x4(%rsi), %r15
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
pushq $0x20
popq %rbp
movslq (%r14), %rax
cmpq %rax, %r13
jge 0x7099
testq %r13, %r13
je 0x7072
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42a0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6eca
movq %rbx, %rdi
movq %r12, %rsi
callq 0x45c0
movq %r12, %rdi
callq 0x4120
incq %r13
addq $0xc, %r15
jmp 0x705b
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x70bc
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4120
jmp 0x70bf
movq %rax, %r14
movq %rbx, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x28, %rsp
movl %edx, %ebp
testl %edx, %edx
js 0x73e8
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movupd %xmm0, 0x1f8e8(%rip)    # 0x26c10
movupd %xmm0, 0x1f8d0(%rip)    # 0x26c00
movupd %xmm0, 0x1f8b8(%rip)    # 0x26bf0
movupd %xmm0, 0x1f8a0(%rip)    # 0x26be0
callq 0x11ecc
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x745b
movq %r15, %rdi
callq 0x11ed1
movsd %xmm0, 0x1f8b6(%rip)    # 0x26c18
movsd 0x1f876(%rip), %xmm1    # 0x26be0
unpcklps 0xd6af(%rip), %xmm1     # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0xd6b7(%rip), %xmm1     # 0x14a30
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 0xd6a3(%rip), %xmm2     # 0x14a40
cvttsd2si %xmm2, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x1f861(%rip)     # 0x26c10
movups 0x1f84a(%rip), %xmm0    # 0x26c00
movups %xmm0, 0x20(%rbx)
movups 0x1f82f(%rip), %xmm0    # 0x26bf0
movups %xmm0, 0x10(%rbx)
movups 0x1f814(%rip), %xmm0    # 0x26be0
movups %xmm0, (%rbx)
movups 0x1f83a(%rip), %xmm0    # 0x26c10
movups %xmm0, 0x30(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x4150
movq %rax, %rbx
leaq 0xd6cc(%rip), %rsi      # 0x14ac6
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
movb $0x1, %r15b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x7716
xorl %r15d, %r15d
movq 0x15ba3(%rip), %rsi     # 0x1cfc8
movq 0x15bbc(%rip), %rdx     # 0x1cfe8
movq %rbx, %rdi
callq 0x4520
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4120
testb %r15b, %r15b
jne 0x744b
jmp 0x7453
movq %rax, %r14
movq %rbx, %rdi
callq 0x4240
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 0x74e3
movl %esi, %ebp
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
callq 0x6d44
addq $0xc, %r14
cmpq $0x4b0, %r14            # imm = 0x4B0
jne 0x7474
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x8a04
decl %ebp
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %eax
imulq $0xc, %rax, %r15
cmpq %r14, %r15
je 0x7532
movq (%rsp,%r14), %rsi
movl 0x8(%rsp,%r14), %edx
movq %rbx, %rdi
callq 0x8258
testb %al, %al
je 0x74cc
movq %rbx, %rdi
movl %ebp, %esi
callq 0x745b
movq (%rsp,%r14), %rsi
movl 0x8(%rsp,%r14), %edx
movq %rbx, %rdi
callq 0x8824
addq $0xc, %r14
jmp 0x74a4
incq 0x1f6f6(%rip)           # 0x26be0
movq 0x160(%rbx), %rax
cmpl $-0x1, -0x24(%rax)
je 0x74fe
incq 0x1f6f2(%rip)           # 0x26bf0
cmpl $0x0, -0x14(%rax)
je 0x750b
incq 0x1f6dd(%rip)           # 0x26be8
cmpb $0x1, -0xf(%rax)
jne 0x7518
incq 0x1f6e0(%rip)           # 0x26bf8
cmpb $0x1, -0x10(%rax)
jne 0x7525
incq 0x1f6e3(%rip)           # 0x26c08
cmpl $0x5, -0x30(%rax)
ja 0x7532
incq 0x1f6ce(%rip)           # 0x26c00
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movl %edi, %ebx
callq 0x4440
movsbl %al, %eax
leal -0x6b(%rax), %ecx
cmpl $0x7, %ecx
ja 0x7802
leaq 0xd2eb(%rip), %rdx      # 0x14ae0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
pushq $0x5
jmp 0x7815
cmpl $0x62, %eax
jne 0x782f
pushq $0x1
jmp 0x7815
pushq $0x3
jmp 0x7815
pushq $0x2
jmp 0x7815
pushq $0x4
popq %rsi
xorl %edi, %edi
cmpl %ebx, %eax
sete %dil
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x7ae8
xorl %esi, %esi
jmp 0x7816
pushq $0x8
popq %rdi
callq 0x4150
movq %rax, %r14
leaq 0xd31e(%rip), %rsi      # 0x14b5f
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6302
movb $0x1, %bpl
movsbl %bl, %edx
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x7a5b
xorl %ebp, %ebp
movq 0x1575c(%rip), %rsi     # 0x1cfc8
movq 0x15775(%rip), %rdx     # 0x1cfe8
movq %r14, %rdi
callq 0x4520
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4120
testb %bpl, %bpl
jne 0x7892
jmp 0x789a
movq %rax, %rbx
movq %r14, %rdi
callq 0x4240
movq %rbx, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpl $0x77, %edi
je 0x78bd
movl %edi, %ebp
cmpl $0x62, %edi
jne 0x78c8
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x4150
movq %rax, %rbx
leaq 0xd29b(%rip), %rsi      # 0x14b75
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
movb $0x1, %r15b
movsbl %bpl, %edx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x7a5b
xorl %r15d, %r15d
movq 0x156c1(%rip), %rsi     # 0x1cfc8
movq 0x156da(%rip), %rdx     # 0x1cfe8
movq %rbx, %rdi
callq 0x4520
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4120
testb %r15b, %r15b
jne 0x792d
jmp 0x7935
movq %rax, %r14
movq %rbx, %rdi
callq 0x4240
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x30, %rsp
movl %edi, %r14d
leal -0x6b(%r14), %eax
cmpl $0x7, %eax
ja 0x7995
leaq 0xd178(%rip), %rcx      # 0x14b00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x5
jmp 0x79a9
cmpl $0x62, %r14d
jne 0x79b7
pushq $0x1
jmp 0x79a9
pushq $0x3
jmp 0x79a9
pushq $0x2
jmp 0x79a9
pushq $0x4
popq %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
jmp 0x79aa
pushq $0x8
popq %rdi
callq 0x4150
movq %rax, %rbx
leaq 0xd20b(%rip), %rsi      # 0x14bd4
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x6302
movb $0x1, %bpl
movsbl %r14b, %edx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x7a5b
xorl %ebp, %ebp
movq 0x155d3(%rip), %rsi     # 0x1cfc8
movq 0x155ec(%rip), %rdx     # 0x1cfe8
movq %rbx, %rdi
callq 0x4520
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4120
testb %bpl, %bpl
jne 0x7a1b
jmp 0x7a23
movq %rax, %r14
movq %rbx, %rdi
callq 0x4240
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %r14
callq 0x56a4
leaq 0x158(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x158(%r14)
andq $0x0, 0x168(%r14)
movq %rsp, %rdi
callq 0x5b2e
movq %rsp, %r15
movl $0x158, %edx            # imm = 0x158
movq %r14, %rdi
movq %r15, %rsi
callq 0x4290
andl $0x0, 0x174(%r14)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x1c(%r15)
movaps 0xd034(%rip), %xmm0     # 0x14c80
movups %xmm0, 0xc(%r15)
leaq 0x1ef70(%rip), %rax     # 0x26bc8
movq (%rax), %rcx
movq %rcx, (%r15)
movl 0x8(%rax), %eax
movl %eax, 0x8(%r15)
movq 0x150(%r14), %r12
pushq $0xf
popq %rdi
callq 0x12767
xorq %rax, %r12
movq %rsp, %r15
movq %r12, 0x30(%r15)
andl $0x0, 0x24(%r15)
andw $0x0, 0x28(%r15)
movq %r14, %rdi
callq 0x7cc8
movq %rbx, %rdi
movq %r15, %rsi
callq 0xce44
andl $0x0, 0x170(%r14)
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x7cb5
movq %rax, %r14
movq %rbx, %rdi
callq 0xd174
movq %r14, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::reset_history_table()
void Position::reset_history_table() {
	for (int c = 0; c < 2; ++c) {
		for (int s1 = 0; s1 < 64; ++s1) {
			for (int s2 = 0; s2 < 64; ++s2) {
				history[c][s1][s2] = 0;
			}
		}
	}
}

// Assembly:
addq $0x178, %rdi            # imm = 0x178
xorl %eax, %eax
cmpq $0x2, %rax
je 0x7d0b
movq %rdi, %rcx
xorl %edx, %edx
cmpq $0x40, %rdx
je 0x7cff
xorl %esi, %esi
cmpq $0x40, %rsi
je 0x7cf3
andl $0x0, (%rcx,%rsi,4)
incq %rsi
jmp 0x7ce4
incq %rdx
addq $0x100, %rcx            # imm = 0x100
jmp 0x7cdc
incq %rax
addq $0x4000, %rdi           # imm = 0x4000
jmp 0x7cd1
retq
// File: /workspace/github_cpp_makefile_star2_O2/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::see_capture(neocortex::Move)
int Position::see_capture(Move cap) {
	assert(!(bb::mask(cap.dst()) & board.get_piece_occ(piece::KING)));

	bool ep = false;
	int csq = cap.dst();

	if (piece::type(board.get_piece(cap.src())) == piece::PAWN && bb::mask(cap.dst()) == en_passant_mask()) {
		ep = true;
		csq = cap.dst() + ((color_to_move == piece::WHITE) ? SOUTH : NORTH);
	}

	int capped = piece::null;

	/* Make capture */
	if (ep) {
		capped = board.remove(csq);
		board.place(cap.dst(), board.remove(cap.src()));
	} else {
		capped = board.replace(cap.dst(), board.remove(cap.src()));
	}

	int ret = eval::MATERIAL_MG[piece::type(capped)] - see(cap.dst(), !color_to_move);

	/* Undo capture */
	if (ep) {
		board.place(csq, capped);
		board.place(cap.src(), board.remove(cap.dst()));
	}
	else {
		board.place(cap.src(), board.replace(cap.dst(), capped));
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %r15
shrq $0x20, %r15
movl %r15d, %edi
callq 0x5103
testq %rax, 0x40(%r14)
jne 0xb1a1
movslq %ebx, %rax
movl 0x48(%r14,%rax,4), %edi
callq 0x63ef
testl %eax, %eax
movq %rbx, 0x10(%rsp)
jne 0xb105
movl %r15d, %edi
callq 0x5103
movq %rax, %r12
movq %r14, %rdi
callq 0x89ee
cmpq %rax, %r12
jne 0xb105
xorl %eax, %eax
cmpl $0x0, 0x170(%r14)
setne %al
shll $0x4, %eax
leal (%rax,%r15), %esi
addl $-0x8, %esi
movq %r14, %rdi
movl %esi, 0xc(%rsp)
callq 0x5b86
movl %eax, %ebp
movq %r14, %rdi
movl %ebx, %esi
callq 0x5b86
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0x5a44
movb $0x1, %bl
jmp 0xb125
movq %r14, %rdi
movl %ebx, %esi
callq 0x5b86
movq %r14, %rdi
movl %r15d, %esi
movl %eax, %edx
callq 0x5c54
movl %eax, %ebp
xorl %ebx, %ebx
movl %r15d, 0xc(%rsp)
movl %ebp, %edi
callq 0x63ef
cltq
leaq 0x975b(%rip), %rcx      # 0x14890
movl (%rcx,%rax,4), %r13d
xorl %edx, %edx
cmpl $0x0, 0x170(%r14)
sete %dl
movq %r14, %rdi
movl %r15d, %esi
callq 0xb3fc
movl %eax, %r12d
movq %r14, %rdi
testb %bl, %bl
je 0xb173
movl 0xc(%rsp), %esi
movl %ebp, %edx
callq 0x5a44
movq %r14, %rdi
movl %r15d, %esi
callq 0x5b86
jmp 0xb17d
movl %r15d, %esi
movl %ebp, %edx
callq 0x5c54
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movl %eax, %edx
callq 0x5a44
subl %r12d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9e0d(%rip), %rdi      # 0x14fb5
leaq 0x9b66(%rip), %rsi      # 0x14d15
leaq 0x9e39(%rip), %rcx      # 0x14fef
movl $0x463, %edx            # imm = 0x463
callq 0x41f0
// File: /workspace/github_cpp_makefile_star2_O2/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), %rsi
movq 0x160(%rdi), %rdi
movq %rdi, %rax
subq %rsi, %rax
pushq $0x38
popq %rcx
cqto
idivq %rcx
addq $0x30, %rsi
xorl %ecx, %ecx
subq $0x1, %rax
jb 0xc9d3
movq (%rsi), %rdx
xorl %r8d, %r8d
cmpq -0x8(%rdi), %rdx
sete %r8b
addl %r8d, %ecx
addq $0x38, %rsi
jmp 0xc9b6
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
cmpl $0x2, %esi
pushq $0x1
popq %rbx
cmovgel %esi, %ebx
callq 0x43d0
cmpl %eax, %ebx
jle 0xd40d
callq 0x43d0
movl %eax, %ebx
movl %ebx, %eax
xchgl %eax, 0x8178(%r14)
leaq 0x8a83(%rip), %rsi      # 0x15ea0
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x6302
movq %r14, %rdi
movl %ebx, %esi
callq 0xed54
leaq 0x8(%rsp), %rdi
callq 0x4120
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4120
movq %rbx, %rdi
callq 0x4550