LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: juancalaca[P]dotsboxes/DotsEdge.cc
// Function: DotsEdge::Claim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsEdge::Claim(string name)
{
	int claimedBoxes = 0;
	
	this->claimed = true;
	
	if (this->box1->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box1->Claim(name);
		claimedBoxes++;
	}
	
	if (this->box2 != NULL && this->box2->NewlyClaimed())
	{
		cout << name << " claimed a box" << endl;
		this->box2->Claim(name);
		claimedBoxes++;
	}
	
	return claimedBoxes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rsi, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x14(%rbp)
movb $0x1, 0x10(%rax)
movq (%rax), %rdi
callq 0x29c0
testb $0x1, %al
jne 0x25bb
jmp 0x2648
movq -0x78(%rbp), %rsi
movq 0x8a0a(%rip), %rdi      # 0xafd0
callq 0x2140
movq %rax, %rdi
leaq 0x4a2f(%rip), %rsi      # 0x7004
callq 0x2150
movq %rax, %rdi
movq 0x89dc(%rip), %rsi      # 0xafc0
callq 0x2180
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x2080
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x2960
jmp 0x261a
leaq -0x38(%rbp), %rdi
callq 0x20c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x20c0
jmp 0x270a
movq -0x70(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x26fe
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x29c0
testb $0x1, %al
jne 0x266d
jmp 0x26fe
movq -0x78(%rbp), %rsi
movq 0x8958(%rip), %rdi      # 0xafd0
callq 0x2140
movq %rax, %rdi
leaq 0x497d(%rip), %rsi      # 0x7004
callq 0x2150
movq %rax, %rdi
movq 0x892a(%rip), %rsi      # 0xafc0
callq 0x2180
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x98(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x2080
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x2960
jmp 0x26d3
leaq -0x68(%rbp), %rdi
callq 0x20c0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x26fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x20c0
jmp 0x270a
movl -0x14(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2260
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::DotsBox()
DotsBox::DotsBox()
{
	this->left = NULL;
	this->top = NULL;
	this->right = NULL;
	this->bottom = NULL;
	
	this->claimed = false;
	this->name = "  ";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x28, %rdi
movq %rdi, -0x20(%rbp)
callq 0x2200
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movq $0x0, (%rax)
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movb $0x0, 0x20(%rax)
leaq 0x4929(%rip), %rsi      # 0x709c
callq 0x21f0
jmp 0x277a
addq $0x30, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x20c0
movq -0x10(%rbp), %rdi
callq 0x2260
nop
// File: juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::~DotsBox()
DotsBox::~DotsBox() { 
	this->left = NULL;
	this->right = NULL;
	this->top = NULL;
	this->bottom = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq $0x0, (%rdi)
movq $0x0, 0x10(%rdi)
movq $0x0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
addq $0x28, %rdi
callq 0x20c0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::GetEdge(int)
DotsEdge *DotsBox::GetEdge(int edge_num)
{
	DotsEdge *edge;
	switch (edge_num)
	{
		case 1:
			edge = this->left;
			break;
		case 2:
			edge = this->top;
			break;
		case 3:
			edge = this->right;
			break;
		case 4:
			edge = this->bottom;
			break;
		default:
			edge = NULL;
	}
	
	return edge;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0x294e
movq -0x20(%rbp), %rax
leaq 0x4706(%rip), %rcx      # 0x7014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2956
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2956
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2956
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x2956
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: juancalaca[P]dotsboxes/DotsBoard.cc
// Function: DotsBoard::ClaimEdge(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int DotsBoard::ClaimEdge(int row, int column, int edge_num, string name)
{
	DotsEdge *edge = this->boxes[row][column]->GetEdge(edge_num);
	
	//if that edge is taken return -1
	if (edge->IsClaimed())
	{
		return -1;
	}
	
	int new_claimed =  edge->Claim(name);
	this->claimedBoxes += new_claimed;
	return new_claimed;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %r8, -0x78(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x70(%rbp)
addq $0x10, %rdi
movslq -0x14(%rbp), %rsi
callq 0x38a0
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x3880
movq (%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x28e0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x2560
testb $0x1, %al
jne 0x2eef
jmp 0x2ef8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2f6a
movq -0x78(%rbp), %rsi
movq -0x30(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x2080
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x2580
movl %eax, -0x7c(%rbp)
jmp 0x2f2f
leaq -0x58(%rbp), %rdi
callq 0x20c0
movl -0x7c(%rbp), %ecx
movq -0x70(%rbp), %rax
movl %ecx, -0x34(%rbp)
movl -0x34(%rbp), %ecx
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2f6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x20c0
jmp 0x2f76
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x2260
nop
// File: juancalaca[P]dotsboxes/main.cc
// Function: ZedBoard::PushButtonGet(int)
int PushButtonGet(int last_value)
	{
		if (RegisterRead(gpio_pbtnu_offset)){ //UP
			return 1;
		}
		if (RegisterRead(gpio_pbtnd_offset)) //DOWN 
		{
			return 2;
		}
        if (RegisterRead(gpio_pbtnl_offset)) //LEFT
        {
        	return 3;
        }
		if (RegisterRead(gpio_pbtnr_offset)) //RIGHT
		{
			return 4;
		}
		if (RegisterRead(gpio_pbtnc_offset)) //CENTER
		{	
			return 5;
		}

		return 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0x174, %esi            # imm = 0x174
callq 0x6e70
cmpl $0x0, %eax
je 0x6d1f
movl $0x1, -0x4(%rbp)
jmp 0x6d96
movq -0x20(%rbp), %rdi
movl $0x178, %esi            # imm = 0x178
callq 0x6e70
cmpl $0x0, %eax
je 0x6d3b
movl $0x2, -0x4(%rbp)
jmp 0x6d96
movq -0x20(%rbp), %rdi
movl $0x16c, %esi            # imm = 0x16C
callq 0x6e70
cmpl $0x0, %eax
je 0x6d57
movl $0x3, -0x4(%rbp)
jmp 0x6d96
movq -0x20(%rbp), %rdi
movl $0x170, %esi            # imm = 0x170
callq 0x6e70
cmpl $0x0, %eax
je 0x6d73
movl $0x4, -0x4(%rbp)
jmp 0x6d96
movq -0x20(%rbp), %rdi
movl $0x17c, %esi            # imm = 0x17C
callq 0x6e70
cmpl $0x0, %eax
je 0x6d8f
movl $0x5, -0x4(%rbp)
jmp 0x6d96
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: juancalaca[P]dotsboxes/main.cc
// Function: ZedBoard::ZedBoard()
ZedBoard()
	{
		fd = open( "/dev/mem", O_RDWR);
		pBase = (char *) mmap(
				NULL,
				gpio_size,
				PROT_READ | PROT_WRITE,
				MAP_SHARED,
				fd,	
				gpio_address);

		//Check error
		if (pBase == MAP_FAILED)
		{
			cerr << "Mapping I/O memory failed - Did you run with 'sudo'?\n";
			exit(1); // Returns 1 to the operating system; 
		}

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x49c(%rip), %rdi       # 0x7257
movl $0x2, %esi
movb $0x0, %al
callq 0x20f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl 0x8(%rax), %r8d
xorl %eax, %eax
movl %eax, %edi
movl $0xff, %esi
movl $0x3, %edx
movl $0x1, %ecx
movl $0x400d0000, %r9d       # imm = 0x400D0000
callq 0x2280
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq $-0x1, %rcx
cmpq %rcx, (%rax)
jne 0x6e25
movq 0x41e1(%rip), %rdi      # 0xaff0
leaq 0x44a(%rip), %rsi       # 0x7260
callq 0x2150
movl $0x1, %edi
callq 0x21d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: recoverPath(int*, int, int, int*, int*)
void recoverPath(int *prev, int srcidx, int dstidx, int *indextable, int *path)
{
    int que[maxnode_num];
    int tot = 1;
    que[tot] = dstidx;
    tot++;
    int tmp = prev[dstidx];
    while(tmp != srcidx)
    {
        que[tot] = tmp;
        tot++;
        tmp = prev[tmp];
    }
    que[tot] = srcidx;
    int j = 0;
    for(int i=tot; i>=1; --i)
    {
        path[j] = indextable[que[i]];
        j++;
    }
    path[j]=2333;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x1, -0x54(%rbp)
movl -0x10(%rbp), %ecx
movslq -0x54(%rbp), %rax
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
cmpl -0xc(%rbp), %eax
je 0x347b
movl -0x58(%rbp), %ecx
movslq -0x54(%rbp), %rax
movl %ecx, -0x50(%rbp,%rax,4)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x58(%rbp)
jmp 0x344f
movl -0xc(%rbp), %ecx
movslq -0x54(%rbp), %rax
movl %ecx, -0x50(%rbp,%rax,4)
movl $0x0, -0x5c(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x60(%rbp)
cmpl $0x1, -0x60(%rbp)
jl 0x34c8
movq -0x18(%rbp), %rax
movslq -0x60(%rbp), %rcx
movslq -0x50(%rbp,%rcx,4), %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x60(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x3493
movq -0x20(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movl $0x91d, (%rax,%rcx,4)   # imm = 0x91D
popq %rbp
retq
// File: macfergus[P]baduk/cppsrc/baduk/point.cpp
// Function: baduk::Point::Point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Point::Point(std::string const& name) {
    const auto col_s = name.substr(0, 1);
    const auto row_s = name.substr(1);
    col_ = COLS.find(col_s);
    row_ = std::stoi(row_s) - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x30(%rbp), %rdi
movl $0x1, %ecx
movq %rcx, -0x68(%rbp)
callq 0x3210
movq -0x68(%rbp), %rdx
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq $-0x1, %rcx
callq 0x3210
jmp 0x39df
leaq 0x4f84a(%rip), %rdi     # 0x53230
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x80(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x3400
movq -0x80(%rbp), %rsi
movq %rax, %rcx
movq -0x70(%rbp), %rax
movl %ecx, 0x4(%rax)
leaq -0x50(%rbp), %rdi
movl $0xa, %edx
callq 0x3bf0
movl %eax, -0x74(%rbp)
jmp 0x3a18
movq -0x70(%rbp), %rax
movl -0x74(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, (%rax)
leaq -0x50(%rbp), %rdi
callq 0x3418
leaq -0x30(%rbp), %rdi
callq 0x3418
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3a62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3418
leaq -0x30(%rbp), %rdi
callq 0x3418
movq -0x58(%rbp), %rdi
callq 0x3370
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::newGame(unsigned int, float)
std::shared_ptr<const GameState> newGame(unsigned int board_size, float komi) {
    return std::shared_ptr<const GameState>(
        std::make_shared<const GameStateImpl>(
            Board(board_size, board_size),
            Stone::black,
            komi
        )
    );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5b70, %rsp           # imm = 0x5B70
movq %rdi, -0x5b68(%rbp)
movq %rdi, %rax
movq %rax, -0x5b60(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movl -0xc(%rbp), %esi
movl -0xc(%rbp), %edx
leaq -0x5b50(%rbp), %rdi
callq 0x3c5b0
movl $0x0, -0x5b54(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x5b50(%rbp), %rsi
leaq -0x5b54(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x4670
movq -0x5b68(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x46f0
leaq -0x20(%rbp), %rdi
callq 0x4720
movq -0x5b60(%rbp), %rax
addq $0x5b70, %rsp           # imm = 0x5B70
popq %rbp
retq
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::applyMove(std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&) const
std::shared_ptr<GameState> applyMove(Move const& move) const override {
        return std::make_shared<GameStateImpl>(
            other(next_player_),
            shared_from_this(),
            move
        );
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movl 0x5b48(%rax), %edi
callq 0x3910
movq -0x60(%rbp), %rsi
movl %eax, -0x2c(%rbp)
addq $0x8, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x6680
movq -0x58(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x6600
jmp 0x5f01
movq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x66b0
leaq -0x28(%rbp), %rdi
callq 0x66e0
leaq -0x40(%rbp), %rdi
callq 0x4720
movq -0x68(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4720
movq -0x48(%rbp), %rdi
callq 0x3370
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::isOver() const
bool isOver() const override {
        if (!last_move_) {
            // First move of game.
            return false;
        }
        const auto last_move = *last_move_;
        if (isResign(last_move)) {
            return true;
        }

        if (isPass(last_move)) {
            if (prev_state_ != nullptr) {
                if (prev_state_->last_move_) {
                    const auto prev_prev_move = *prev_state_->last_move_;
                    if (isPass(prev_prev_move)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x5b4c, %rdi           # imm = 0x5B4C
callq 0x8a80
testb $0x1, %al
jne 0x5ffd
movb $0x0, -0x1(%rbp)
jmp 0x60ce
movq -0x30(%rbp), %rdi
addq $0x5b4c, %rdi           # imm = 0x5B4C
callq 0x8aa0
movq (%rax), %rcx
movq %rcx, -0x1c(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x4440
testb $0x1, %al
jne 0x6029
jmp 0x6032
movb $0x1, -0x1(%rbp)
jmp 0x60ce
leaq -0x1c(%rbp), %rdi
callq 0x4410
testb $0x1, %al
jne 0x6044
jmp 0x60ca
movq -0x30(%rbp), %rdi
addq $0x5b60, %rdi           # imm = 0x5B60
xorl %eax, %eax
movl %eax, %esi
callq 0x8ac0
testb $0x1, %al
jne 0x605e
jmp 0x60c8
movq -0x30(%rbp), %rdi
addq $0x5b60, %rdi           # imm = 0x5B60
callq 0x7260
movq %rax, %rdi
addq $0x5b4c, %rdi           # imm = 0x5B4C
callq 0x8a80
testb $0x1, %al
jne 0x6083
jmp 0x60c6
movq -0x30(%rbp), %rdi
addq $0x5b60, %rdi           # imm = 0x5B60
callq 0x7260
movq %rax, %rdi
addq $0x5b4c, %rdi           # imm = 0x5B4C
callq 0x8aa0
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4410
testb $0x1, %al
jne 0x60be
jmp 0x60c4
movb $0x1, -0x1(%rbp)
jmp 0x60ce
jmp 0x60c6
jmp 0x60c8
jmp 0x60ca
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: macfergus[P]baduk/cppsrc/baduk/statichash.h
// Function: baduk::StaticHash<unsigned long long, 1493u>::insert(unsigned long long)
void insert(T value) {
        auto attempts = TABLESIZE;
        T index = value;
        while (attempts != 0) {
            if (!filled_[index % TABLESIZE]) {
                filled_.set(index % TABLESIZE);
                values_[index % TABLESIZE] = value;
                return;
            }
            ++index;
            --attempts;
        }
        throw HashTableFull();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x5d5, -0x14(%rbp)     # imm = 0x5D5
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x73f2
movq -0x38(%rbp), %rsi
addq $0x2ea8, %rsi           # imm = 0x2EA8
movq -0x20(%rbp), %rax
movl $0x5d5, %ecx            # imm = 0x5D5
xorl %edx, %edx
divq %rcx
leaq -0x30(%rbp), %rdi
callq 0x7610
leaq -0x30(%rbp), %rdi
callq 0x7650
xorb $-0x1, %al
movb %al, -0x39(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x7690
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x7383
jmp 0x73d8
movq -0x38(%rbp), %rdi
addq $0x2ea8, %rdi           # imm = 0x2EA8
movq -0x20(%rbp), %rax
movl $0x5d5, %ecx            # imm = 0x5D5
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
movl $0x1, %edx
callq 0x76a0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl $0x5d5, %ecx            # imm = 0x5D5
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x76f0
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7337
movl $0x8, %edi
callq 0x30d0
movq %rax, %rdi
movq %rdi, -0x50(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x30f0
movq -0x50(%rbp), %rdi
callq 0x7720
movq -0x50(%rbp), %rdi
leaq 0x4b80d(%rip), %rsi     # 0x52c30
leaq 0x336(%rip), %rdx       # 0x7760
callq 0x3340
nop
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::CheckLegal::operator()(baduk::Play const&)
bool operator()(Play const& play) {
            const auto point = play.point();
            const auto player = game_state->next_player_;
            if (!game_state->board_.isEmpty(point)) {
                return false;
            }

            // Ko.
            if (game_state->board_.willCapture(point, player)) {
                if (game_state->willViolateKo(point)) {
                    return false;
                }
            } else if (game_state->board_.willHaveNoLiberties(point, player)) {
                return false;
            }

            return true;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq (%rax), %rcx
movl 0x5b48(%rcx), %ecx
movl %ecx, -0x24(%rbp)
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x2c(%rbp)
movq -0x2c(%rbp), %rsi
callq 0x3c650
testb $0x1, %al
jne 0x823a
movb $0x0, -0x1(%rbp)
jmp 0x82b6
movq -0x50(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x34(%rbp)
movl -0x24(%rbp), %edx
movq -0x34(%rbp), %rsi
callq 0x3d270
testb $0x1, %al
jne 0x825f
jmp 0x8285
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x3c(%rbp)
movq -0x3c(%rbp), %rsi
callq 0x82d0
testb $0x1, %al
jne 0x827d
jmp 0x8283
movb $0x0, -0x1(%rbp)
jmp 0x82b6
jmp 0x82b2
movq -0x50(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x44(%rbp)
movl -0x24(%rbp), %edx
movq -0x44(%rbp), %rsi
callq 0x3d380
testb $0x1, %al
jne 0x82aa
jmp 0x82b0
movb $0x0, -0x1(%rbp)
jmp 0x82b6
jmp 0x82b2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::willViolateKo(baduk::Point) const
bool willViolateKo(Point point) const {
        // Find the hash of the next state, without actually computing
        // the full board position.
        const auto next_board_hash = board_.hashAfter(point, next_player_);
        const auto next_player_hash =
            next_player_ == Stone::black ?
                zobrist::WHITE_TO_PLAY :
                zobrist::BLACK_TO_PLAY;
        const auto next_state_hash = next_board_hash ^ next_player_hash;

        return previous_states_.contains(next_state_hash);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rax, %rdi
addq $0x18, %rdi
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl 0x5b48(%rax), %edx
movq -0x20(%rbp), %rsi
callq 0x3da60
movq -0x38(%rbp), %rdi
movq %rax, -0x18(%rbp)
movl 0x5b48(%rdi), %edx
movabsq $0x3089a105e9ebf992, %rax # imm = 0x3089A105E9EBF992
movabsq $0x78072ab4b31b23a7, %rcx # imm = 0x78072AB4B31B23A7
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
xorq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
addq $0x5b70, %rdi           # imm = 0x5B70
movq -0x30(%rbp), %rsi
callq 0x8360
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/statichash.h
// Function: baduk::StaticHash<unsigned long long, 1493u>::contains(unsigned long long) const
bool contains(T value) const {
        auto attempts = TABLESIZE;
        T index = value;
        while (attempts != 0 ) {
            if (filled_[index % TABLESIZE]) {
                if (values_[index % TABLESIZE] == value) {
                    return true;
                }
            } else {
                return false;
            }
            ++index;
            --attempts;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x5d5, -0x1c(%rbp)     # imm = 0x5D5
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x83fc
movq -0x30(%rbp), %rdi
addq $0x2ea8, %rdi           # imm = 0x2EA8
movq -0x28(%rbp), %rax
movl $0x5d5, %ecx            # imm = 0x5D5
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x8410
testb $0x1, %al
jne 0x83b4
jmp 0x83df
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movl $0x5d5, %ecx            # imm = 0x5D5
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x8440
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x83dd
movb $0x1, -0x1(%rbp)
jmp 0x8400
jmp 0x83e5
movb $0x0, -0x1(%rbp)
jmp 0x8400
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8387
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::CheckViolatesKo::operator()(baduk::Play const&)
bool operator()(Play const& play) {
            const auto point = play.point();
            const auto player = game_state->next_player_;
            if (!game_state->board_.isEmpty(point)) {
                return false;
            }

            if (game_state->board_.willCapture(point, player)) {
                return game_state->willViolateKo(point);
            }
            return false;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4650
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq (%rax), %rcx
movl 0x5b48(%rcx), %ecx
movl %ecx, -0x24(%rbp)
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x2c(%rbp)
movq -0x2c(%rbp), %rsi
callq 0x3c650
testb $0x1, %al
jne 0x88da
movb $0x0, -0x1(%rbp)
jmp 0x8922
movq -0x48(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x34(%rbp)
movl -0x24(%rbp), %edx
movq -0x34(%rbp), %rsi
callq 0x3d270
testb $0x1, %al
jne 0x88ff
jmp 0x891e
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x3c(%rbp)
movq -0x3c(%rbp), %rsi
callq 0x82d0
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x8922
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::GoString(baduk::Stone, baduk::Point, baduk::PointSet const&, std::vector<baduk::GoString const*, std::allocator<baduk::GoString const*>>)
GoString::GoString(
        Stone c, Point p,
        PointSet const& liberties,
        std::vector<GoString const*> neighbors) :
    color_(c) {
    stones_.add(p);
    liberties_.add(liberties);
    for (auto neighbor : neighbors) {
        stones_.add(neighbor->stones());
        liberties_.add(neighbor->liberties_);
    }
    liberties_.remove(p);
    for (auto neighbor : neighbors) {
        liberties_.remove(neighbor->stones());
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %r8, -0xe0(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
movl -0x14(%rbp), %eax
movl %eax, (%rdi)
addq $0x8, %rdi
callq 0x9700
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
callq 0x9700
movq -0xe8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x8(%rbp), %rsi
callq 0x9ac0
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
movq -0x20(%rbp), %rsi
callq 0x9b30
movq -0xe0(%rbp), %r8
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9740
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9770
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x97a0
testb $0x1, %al
jne 0x933e
jmp 0x93a3
leaq -0x38(%rbp), %rdi
callq 0x97e0
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x48(%rbp)
addq $0x8, %rax
movq %rax, -0xf0(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x9800
movq -0xf0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x9b30
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
movq -0x48(%rbp), %rsi
addq $0x40, %rsi
callq 0x9b30
leaq -0x38(%rbp), %rdi
callq 0x9830
jmp 0x932b
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
leaq -0x8(%rbp), %rsi
callq 0x9ba0
movq -0xe0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x9740
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x9770
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x97a0
testb $0x1, %al
jne 0x9404
jmp 0x9463
leaq -0x90(%rbp), %rdi
callq 0x97e0
movq %rax, %rcx
movq -0xe8(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0xa0(%rbp)
addq $0x40, %rax
movq %rax, -0xf8(%rbp)
movq -0xa0(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x9800
movq -0xf8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x9be0
leaq -0x90(%rbp), %rdi
callq 0x9830
jmp 0x93eb
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax)
// File: macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::GoString(baduk::GoString const&, baduk::Point const&, bool)
GoString::GoString(
        GoString const& original,
        Point const& liberty_to_change,
        bool add_liberty) :
    color_(original.color_),
    stones_(original.stones_),
    liberties_(original.liberties_) {

    if (add_liberty) {
        liberties_.add(liberty_to_change);
    } else {
        liberties_.remove(liberty_to_change);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, (%rdi)
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movl $0x38, %edx
callq 0x31b0
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
movq -0x10(%rbp), %rsi
addq $0x40, %rsi
movl $0x38, %edx
callq 0x31b0
testb $0x1, -0x19(%rbp)
je 0x94e4
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
movq -0x18(%rbp), %rsi
callq 0x9ac0
jmp 0x94f5
movq -0x28(%rbp), %rdi
addq $0x40, %rdi
movq -0x18(%rbp), %rsi
callq 0x9ba0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/gostring.cpp
// Function: baduk::GoString::mergedWith(baduk::GoString const&) const
GoString GoString::mergedWith(GoString const& other) const {
    auto new_liberties = liberties_.unionWith(other.liberties_);
    new_liberties.remove(stones_);
    new_liberties.remove(other.stones_);
    return GoString(color_, stones_.unionWith(other.stones_), new_liberties);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0xa0(%rbp)
addq $0x40, %rsi
movq -0x10(%rbp), %rdx
addq $0x40, %rdx
leaq -0x48(%rbp), %rdi
callq 0x9ce0
movq -0xa0(%rbp), %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x9be0
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x9be0
movq -0xa0(%rbp), %rsi
movl (%rsi), %eax
movl %eax, -0x8c(%rbp)
addq $0x8, %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
leaq -0x80(%rbp), %rdi
callq 0x9ce0
movq -0x98(%rbp), %rdi
movl -0x8c(%rbp), %esi
leaq -0x80(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x9850
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: macfergus[P]baduk/cppsrc/baduk/pointset.cpp
// Function: baduk::PointIter::operator++()
PointIter& PointIter::operator++() {
    ++i_;
    while (i_ < MAX_POINTS &&
            i_ <= pointset_->max_ &&
            !pointset_->points_[i_]) {
        ++i_;
    }
    return *this;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x169, 0x8(%rcx)       # imm = 0x169
movb %al, -0x11(%rbp)
jae 0x9a39
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq (%rax), %rdx
xorl %eax, %eax
cmpl 0x34(%rdx), %ecx
movb %al, -0x11(%rbp)
ja 0x9a39
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x9de0
xorb $-0x1, %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x9a42
jmp 0x9a51
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x99fd
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/pointset.cpp
// Function: baduk::PointSet::add(baduk::Point const&)
void PointSet::add(Point const& p) {
    const auto pindex = index(p);
    points_.set(pindex);
    if (pindex < min_) {
        min_ = pindex;
    }
    if (pindex > max_) {
        max_ = pindex;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9930
movq -0x20(%rbp), %rdi
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x9e10
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x30(%rcx), %eax
jae 0x9b0d
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x30(%rax)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x34(%rcx), %eax
jbe 0x9b23
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x34(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: macfergus[P]baduk/cppsrc/baduk/scoring.cpp
// Function: baduk::TerritoryMap::at(baduk::Point) const
PointStatus TerritoryMap::at(Point p) const {
    // TODO Should bounds-check p;
    const auto ptr = map_.find(p);
    if (ptr != map_.end()) {
        return ptr->second;
    }
    return PointStatus::neutral;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x30(%rbp)
leaq -0xc(%rbp), %rsi
callq 0xb370
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0xb3d0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xb3a0
testb $0x1, %al
jne 0xa455
jmp 0xa466
leaq -0x20(%rbp), %rdi
callq 0xb400
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0xa46d
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/scoring.cpp
// Function: baduk::completeGame(std::shared_ptr<baduk::GameState const>)
std::shared_ptr<const GameState> completeGame(
        std::shared_ptr<const GameState> start) {
    RandomBot bot;

    auto game = start;
    while (!game->isOver()) {
        const auto next_move = bot.selectMove(*game);
        game = game->applyMove(next_move);
    }
    return game;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x68(%rbp)
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xb810
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movb $0x0, -0x21(%rbp)
callq 0xb890
movq -0x70(%rbp), %rdi
callq 0xb8c0
movq %rax, %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movb %al, -0x79(%rbp)
jmp 0xacf6
movb -0x79(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xad04
jmp 0xad9b
movq -0x70(%rbp), %rdi
callq 0xb8e0
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0xfec0
movb %dl, -0x89(%rbp)
movq %rax, -0x88(%rbp)
jmp 0xad28
movq -0x70(%rbp), %rdi
movb -0x89(%rbp), %al
movq -0x88(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movb %al, -0x48(%rbp)
movb -0x48(%rbp), %al
movb %al, -0x38(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xb8c0
movq %rax, %rsi
movq (%rsi), %rax
movq 0x28(%rax), %rax
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq *%rax
jmp 0xad69
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xb910
leaq -0x60(%rbp), %rdi
callq 0xb940
jmp 0xacdc
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xb960
jmp 0xadbb
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0xadae
movq -0x70(%rbp), %rdi
callq 0xb960
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3370
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/point.h
// Function: baduk::Point::operator<(baduk::Point) const
bool operator<(Point q) const {
        if (row_ < q.row_) {
            return true;
        }
        if (row_ > q.row_) {
            return false;
        }
        return col_ < q.col_;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jae 0xcfe1
movb $0x1, -0x1(%rbp)
jmp 0xd004
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jbe 0xcff2
movb $0x0, -0x1(%rbp)
jmp 0xd004
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x8(%rbp), %eax
setb %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/counter.cpp
// Function: baduk::BoardCounter::increment(baduk::Point)
void BoardCounter::increment(Point p) {
    const auto ptr = map_.find(p);
    if (ptr == map_.end()) {
        map_[p] = 1;
    } else {
        ptr->second += 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
leaq -0x8(%rbp), %rsi
callq 0x11b10
movq -0x28(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x11b70
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x11b40
testb $0x1, %al
jne 0x11a45
jmp 0x11a5a
movq -0x28(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x11ba0
movl $0x1, (%rax)
jmp 0x11a6c
leaq -0x18(%rbp), %rdi
callq 0x11c80
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/counter.cpp
// Function: baduk::BoardCounter::get(baduk::Point) const
unsigned int BoardCounter::get(Point p) const {
    const auto ptr = map_.find(p);
    if (ptr == map_.end()) {
        return 0;
    }
    return ptr->second;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x30(%rbp)
leaq -0xc(%rbp), %rsi
callq 0x11ca0
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x11d00
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x11cd0
testb $0x1, %al
jne 0x11ac5
jmp 0x11ace
movl $0x0, -0x4(%rbp)
jmp 0x11add
leaq -0x20(%rbp), %rdi
callq 0x11d30
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/neighbor.cpp
// Function: baduk::getNeighborTable(unsigned int, unsigned int)
NeighborTable const* getNeighborTable(
        unsigned int num_rows, unsigned int num_cols) {
    // Max supported board size is 25x25.
    static std::vector<std::unique_ptr<NeighborTable>> tables(25 * 25 + 1);

    const auto index = num_rows * 25 + num_cols;
    NeighborTable const* rv = tables[index].get();
    if (rv == nullptr) {
        tables[index] = std::make_unique<NeighborTable>(num_rows, num_cols);
        rv = tables[index].get();
    }

    return rv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpb $0x0, 0x40253(%rip)     # 0x53278
jne 0x1308b
leaq 0x4024a(%rip), %rdi     # 0x53278
callq 0x33a0
cmpl $0x0, %eax
je 0x1308b
leaq -0x9(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x13190
movq -0x38(%rbp), %rdx
leaq 0x40210(%rip), %rdi     # 0x53260
movl $0x272, %esi            # imm = 0x272
callq 0x131b0
jmp 0x1305c
leaq -0x9(%rbp), %rdi
callq 0x13220
leaq 0x1d4(%rip), %rdi       # 0x13240
leaq 0x401ed(%rip), %rsi     # 0x53260
leaq 0x40196(%rip), %rdx     # 0x53210
callq 0x31d0
leaq 0x401f2(%rip), %rdi     # 0x53278
callq 0x3130
imull $0x19, -0x4(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, %esi
leaq 0x401bf(%rip), %rdi     # 0x53260
callq 0x132a0
movq %rax, %rdi
callq 0x132c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x13132
leaq -0x30(%rbp), %rdi
leaq -0x4(%rbp), %rsi
leaq -0x8(%rbp), %rdx
callq 0x132f0
movl -0x20(%rbp), %eax
movl %eax, %esi
leaq 0x4018a(%rip), %rdi     # 0x53260
callq 0x132a0
movq %rax, %rdi
leaq -0x30(%rbp), %rsi
callq 0x13370
leaq -0x30(%rbp), %rdi
callq 0x133a0
movl -0x20(%rbp), %eax
movl %eax, %esi
leaq 0x40164(%rip), %rdi     # 0x53260
callq 0x132a0
movq %rax, %rdi
callq 0x132c0
movq %rax, -0x28(%rbp)
jmp 0x13132
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x9(%rbp), %rdi
callq 0x13220
leaq 0x4014d(%rip), %rdi     # 0x53278
callq 0x3120
jmp 0x1313c
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3370
nopw %cs:(%rax,%rax)
nop
// File: macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::getUnusedString()
StringIdx Board::getUnusedString() {
    for (unsigned int i = 0; i < strings_.size(); ++i) {
        if (!used_[i]) {
            used_.set(i);
            strings_[i].clear();
            return static_cast<StringIdx>(i);
        }
    }
    throw StringPoolEmpty();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %eax
movq %rax, -0x30(%rbp)
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x3e6f0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x3cc0b
movq -0x28(%rbp), %rsi
addq $0x5b18, %rsi           # imm = 0x5B18
movl -0xc(%rbp), %eax
movl %eax, %edx
leaq -0x20(%rbp), %rdi
callq 0x3e700
leaq -0x20(%rbp), %rdi
callq 0x3e740
xorb $-0x1, %al
movb %al, -0x31(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3e780
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3cbbb
jmp 0x3cbfb
movq -0x28(%rbp), %rdi
addq $0x5b18, %rdi           # imm = 0x5B18
movl -0xc(%rbp), %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x3e790
movq -0x28(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x3e2b0
movq %rax, %rdi
callq 0x9500
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
jmp 0x3cbfd
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3cb5b
movl $0x8, %edi
callq 0x30d0
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x30f0
movq -0x40(%rbp), %rdi
callq 0x3e7e0
movq -0x40(%rbp), %rdi
leaq 0x1610c(%rip), %rsi     # 0x52d48
leaq 0x1bdd(%rip), %rdx      # 0x3e820
callq 0x3340
nopl (%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::replace(int)
void Board::replace(StringIdx new_string_idx) {
    const GoString& new_string = strings_[new_string_idx];
    for (auto point : new_string.stones()) {
        if (grid_[index(point)] != EMPTY) {
            recycle(grid_[index(point)]);
        }
        grid_[index(point)] = new_string_idx;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
addq $0x5c8, %rdi            # imm = 0x5C8
movslq -0xc(%rbp), %rsi
callq 0x3e2b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x58(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x9800
movq -0xc0(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9d20
movl %edx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9d60
movl %edx, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x80(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x9a90
testb $0x1, %al
jne 0x3cd04
jmp 0x3ce03
leaq -0x68(%rbp), %rdi
callq 0x9a60
movq -0xc8(%rbp), %rdi
movq %rax, -0xa0(%rbp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, -0xd0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rsi
callq 0x3c6a0
movq -0xd0(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3e2e0
cmpl $-0x1, (%rax)
je 0x3cda5
movq -0xc8(%rbp), %rdi
movq %rdi, %rax
addq $0x20, %rax
movq %rax, -0xd8(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rsi
callq 0x3c6a0
movq -0xd8(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3e2e0
movq -0xc8(%rbp), %rdi
movl (%rax), %esi
callq 0x3d490
movq -0xc8(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, -0xe8(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rsi
callq 0x3c6a0
movq -0xe8(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3e2e0
movl -0xdc(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x68(%rbp), %rdi
callq 0x99e0
jmp 0x3cceb
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
// File: macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::willCapture(baduk::Point, baduk::Stone) const
bool Board::willCapture(Point point, Stone player) const {
    for (Point neighbor : neighbors_->get(point)) {
        const auto neighbor_string_idx = grid_[index(neighbor)];
        if (neighbor_string_idx == EMPTY) {
            continue;
        }
        const auto& neighbor_string = strings_[neighbor_string_idx];
        if (neighbor_string.color() == player) {
            continue;
        }
        if (neighbor_string.numLiberties() == 1) {
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x12fb0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x101b0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x101e0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x10210
testb $0x1, %al
jne 0x3d2cc
jmp 0x3d363
leaq -0x30(%rbp), %rdi
callq 0x10250
movq -0x60(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x4c(%rbp)
movq -0x4c(%rbp), %rsi
callq 0x3c6a0
movq -0x68(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3e260
movl (%rax), %eax
movl %eax, -0x44(%rbp)
cmpl $-0x1, -0x44(%rbp)
jne 0x3d316
jmp 0x3d355
movq -0x60(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movslq -0x44(%rbp), %rsi
callq 0x3e640
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x3e310
cmpl -0x1c(%rbp), %eax
jne 0x3d33e
jmp 0x3d355
movq -0x58(%rbp), %rdi
callq 0x3e600
cmpq $0x1, %rax
jne 0x3d353
movb $0x1, -0x1(%rbp)
jmp 0x3d367
jmp 0x3d355
leaq -0x30(%rbp), %rdi
callq 0x10270
jmp 0x3d2b6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::willHaveNoLiberties(baduk::Point, baduk::Stone) const
bool Board::willHaveNoLiberties(Point point, Stone player) const {
    // Does NOT check if it is a capture! Call willCapture first.
    for (Point neighbor : neighbors_->get(point)) {
        const auto neighbor_string_idx = grid_[index(neighbor)];
        if (neighbor_string_idx == EMPTY) {
            // This point will be a liberty.
            return false;
        } else {
            const auto& neighbor_string = strings_[neighbor_string_idx];
            if (neighbor_string.color() == player) {
                if (neighbor_string.numLiberties() > 1) {
                    // This string will still have a liberty after placing the
                    // stone.
                    return false;
                }
            }
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x10(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x12fb0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x101b0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x101e0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x10210
testb $0x1, %al
jne 0x3d3dc
jmp 0x3d479
leaq -0x30(%rbp), %rdi
callq 0x10250
movq -0x60(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq %rdi, %rax
addq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x4c(%rbp)
movq -0x4c(%rbp), %rsi
callq 0x3c6a0
movq -0x68(%rbp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0x3e260
movl (%rax), %eax
movl %eax, -0x44(%rbp)
cmpl $-0x1, -0x44(%rbp)
jne 0x3d42a
movb $0x0, -0x1(%rbp)
jmp 0x3d47d
movq -0x60(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movslq -0x44(%rbp), %rsi
callq 0x3e640
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x3e310
cmpl -0x1c(%rbp), %eax
jne 0x3d467
movq -0x58(%rbp), %rdi
callq 0x3e600
cmpq $0x1, %rax
jbe 0x3d465
movb $0x0, -0x1(%rbp)
jmp 0x3d47d
jmp 0x3d467
jmp 0x3d469
jmp 0x3d46b
leaq -0x30(%rbp), %rdi
callq 0x10270
jmp 0x3d3c6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)