LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/justinpajak[P]Sum_SGX/aes.cpp
// Function: decrypt(unsigned char*, int, unsigned char*, unsigned char*, unsigned char*)
int decrypt(unsigned char *ciphertext, int ciphertext_len, unsigned char *key,
            unsigned char *iv, unsigned char *plaintext)
{
    EVP_CIPHER_CTX *ctx;

    int len;

    int plaintext_len;

    /* Create and initialise the context */
    ctx = EVP_CIPHER_CTX_new();
    EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, key, iv);

    EVP_DecryptUpdate(ctx, plaintext, &len, ciphertext, ciphertext_len);
    plaintext_len = len;

    EVP_DecryptFinal_ex(ctx, plaintext + len, &len);
    plaintext_len += len;

    /* Clean up */
    EVP_CIPHER_CTX_free(ctx);

    return plaintext_len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %esi, -0x2c(%rbp)
movq %rdi, %r13
callq 0x10c0
movq %rax, %rbx
callq 0x10b0
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %r12, %rcx
movq %r15, %r8
callq 0x1050
leaq -0x30(%rbp), %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
movl -0x2c(%rbp), %r8d
callq 0x10a0
movslq (%r15), %r12
addq %r12, %r14
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1070
movl (%r15), %r14d
addl %r12d, %r14d
movq %rbx, %rdi
callq 0x10f0
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x10(%rdi)
movq (%rdi), %rdi
callq 0x2766
xorl %ebp, %ebp
testb %al, %al
je 0x24cd
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x5b90(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %r15
leaq 0x2bb5(%rip), %rsi      # 0x5004
movl $0xe, %edx
movq %rax, %rdi
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%r14), %r15
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x25bc
movq %r15, %rdi
movq %r12, %rsi
callq 0x2734
movq 0x28(%rsp), %rdi
movl $0x1, %ebp
cmpq %r13, %rdi
je 0x24cd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x2580
callq 0x2766
testb %al, %al
je 0x2580
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x5adb(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %r15
leaq 0x2b00(%rip), %rsi      # 0x5004
movl $0xe, %edx
movq %rax, %rdi
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x8(%r14), %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x25bc
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2734
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x257e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
incl %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x25a3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x25b4
movq (%r13), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
leaq 0x28(%rdi), %rbx
leaq 0x38(%rdi), %r15
movq %r15, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
xorl %eax, %eax
movb %al, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movb %al, 0x20(%rdi)
leaq 0x2a4a(%rip), %rcx      # 0x50c8
movl $0x2, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x26ac
movq (%r15), %rsi
incq %rsi
callq 0x2140
movq %r14, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/juancalaca[P]dotsboxes/DotsBox.cc
// Function: DotsBox::~DotsBox()
DotsBox::~DotsBox() { 
	this->left = NULL;
	this->right = NULL;
	this->top = NULL;
	this->bottom = NULL;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x28(%rdi), %rax
addq $0x38, %rdi
cmpq %rdi, %rax
je 0x26d9
movq (%rdi), %rsi
incq %rsi
movq %rax, %rdi
jmp 0x2140
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rdi, %rbx
movslq %esi, %rax
movq 0x10(%rdi), %rsi
leaq (%rax,%rax,2), %rax
movslq %edx, %rdx
movq (%rsi,%rax,8), %rax
movq (%rax,%rdx,8), %rdi
movl %ecx, %esi
callq 0x2706
movq %rax, %r15
movq %rax, %rdi
callq 0x2404
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %al, %al
jne 0x2b00
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x25bc
movq %r15, %rdi
movq %r14, %rsi
callq 0x2408
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2afd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
addl %ebp, 0x8(%rbx)
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2b28
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
leaq 0x10de(%rip), %rdi      # 0x5273
movl $0x2, %esi
xorl %eax, %eax
callq 0x20d0
movl %eax, 0x8(%rbx)
movl $0xff, %esi
movl $0x400d0000, %r9d       # imm = 0x400D0000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
callq 0x21e0
movq %rax, (%rbx)
cmpq $-0x1, %rax
je 0x41ce
popq %rbx
retq
movq 0x3e1b(%rip), %rdi      # 0x7ff0
leaq 0x10a0(%rip), %rsi      # 0x527c
callq 0x2120
movl $0x1, %edi
callq 0x2160
nop
// File: /workspace/github_cpp_makefile_star2_O1/LiGaCu[P]Distributed_System_to_Compute_the_Shortest_Path/serverC.cpp
// Function: Dijkstra(int, int, float*, int*, float (*) [11])
void Dijkstra(int node_num, int srcidx, float *dist, int *prev, float distans[maxnode_num][maxnode_num])
{
    bool s[maxnode_num];    
    for(int i=1; i<=node_num; ++i)
    {
        dist[i] = distans[srcidx][i];
        s[i] = 0;     
        if(dist[i] == inf_dis)
            prev[i] = 0;
        else
            prev[i] = srcidx;
    }
    dist[srcidx] = 0;
    s[srcidx] = 1;

    for(int i=2; i<=node_num; ++i)
    {
        int tmp = inf_dis;
        int u = srcidx;
        
        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && dist[j]<tmp)
            {
                u = j;            
                tmp = dist[j];
            }
        s[u] = 1;    

        for(int j=1; j<=node_num; ++j)
            if((!s[j]) && distans[u][j]<inf_dis)
            {
                float newdist = dist[u] + distans[u][j];
                if(newdist < dist[j])
                {
                    dist[j] = newdist;
                    prev[j] = u;
                }
            }
    }

}

// Assembly:
pushq %r14
pushq %rbx
movslq %esi, %rax
testl %edi, %edi
jle 0x2ecc
leal 0x1(%rdi), %r9d
imulq $0x2c, %rax, %r10
addq %r8, %r10
movl $0x1, %r11d
movss 0x164(%rip), %xmm0      # 0x3004
movss (%r10,%r11,4), %xmm1
movss %xmm1, (%rdx,%r11,4)
ucomiss %xmm0, %xmm1
movl $0x0, %ebx
cmovnel %esi, %ebx
cmovpl %esi, %ebx
movb $0x0, -0xb(%rsp,%r11)
movl %ebx, (%rcx,%r11,4)
incq %r11
cmpq %r11, %r9
jne 0x2ea0
movl $0x0, (%rdx,%rax,4)
movb $0x1, -0xb(%rsp,%rax)
cmpl $0x2, %edi
jl 0x2f85
leal 0x1(%rdi), %eax
movl $0x2, %r9d
movss 0x112(%rip), %xmm0      # 0x3004
movl $0x5f5e100, %ebx        # imm = 0x5F5E100
movl $0x1, %r11d
movl %esi, %r10d
cmpb $0x0, -0xb(%rsp,%r11)
jne 0x2f21
xorps %xmm2, %xmm2
cvtsi2ss %ebx, %xmm2
movss (%rdx,%r11,4), %xmm1
ucomiss %xmm1, %xmm2
jbe 0x2f21
cvttss2si %xmm1, %ebx
movl %r11d, %r10d
incq %r11
cmpq %r11, %rax
jne 0x2f00
movslq %r10d, %r11
movb $0x1, -0xb(%rsp,%r11)
imulq $0x2c, %r11, %rbx
addq %r8, %rbx
movl $0x1, %r14d
cmpb $0x0, -0xb(%rsp,%r14)
jne 0x2f6d
movss (%rbx,%r14,4), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2f6d
addss (%rdx,%r11,4), %xmm1
movss (%rdx,%r14,4), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x2f6d
movss %xmm1, (%rdx,%r14,4)
movl %r10d, (%rcx,%r14,4)
incq %r14
cmpq %r14, %rax
jne 0x2f3f
leal 0x1(%r9), %r10d
cmpl %edi, %r9d
movl %r10d, %r9d
jne 0x2ef2
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl %edx, -0x34(%rsp)
movslq %edx, %rax
movl (%rdi,%rax,4), %edx
movl $0x2, %eax
cmpl %esi, %edx
je 0x2fb2
movl $0x2, %eax
movl %edx, -0x38(%rsp,%rax,4)
incq %rax
movslq %edx, %rdx
movl (%rdi,%rdx,4), %edx
cmpl %esi, %edx
jne 0x2fa1
movl %eax, %edx
leaq (%rsp,%rdx,4), %rdx
addq $-0x38, %rdx
movl %esi, (%rdx)
cmpl $0x2, %eax
movl $0x1, %esi
cmovgel %eax, %esi
xorl %eax, %eax
movslq (%rdx), %rdi
movl (%rcx,%rdi,4), %edi
movl %edi, (%r8,%rax,4)
incq %rax
addq $-0x4, %rdx
cmpq %rax, %rsi
jne 0x2fcb
movl $0x91d, (%r8,%rax,4)    # imm = 0x91D
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x3190
leaq 0x28(%rsp), %rdi
movl $0x1, %edx
movq %r14, %rsi
movq $-0x1, %rcx
callq 0x3190
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
leaq 0x15947(%rip), %rdi     # 0x191a0
xorl %edx, %edx
callq 0x3290
movl %eax, 0x4(%rbx)
movq 0x28(%rsp), %r15
callq 0x3030
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x48(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x3200
cmpq %r15, (%r12)
je 0x38f1
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x38fd
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x38fd
testl %ecx, %ecx
jne 0x38aa
movl %ebp, (%r14)
decl %eax
movl %eax, (%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38c9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3180
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3180
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1072a(%rip), %rdi     # 0x14022
callq 0x30e0
leaq 0x1071e(%rip), %rdi     # 0x14022
callq 0x3210
movq %rax, %rbx
jmp 0x3935
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x391a
movl %ebp, (%r14)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3935
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3180
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3950
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3180
movq %rbx, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5b58, %rsp           # imm = 0x5B58
movq %rdi, %rbx
leaq 0x14(%rsp), %r14
movss %xmm0, (%r14)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl %esi, %edx
callq 0xfd82
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
callq 0x3d7a
movq (%r12), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%r12), %rcx
movq %rax, 0x8(%r12)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
addq $0x5b58, %rsp           # imm = 0x5B58
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x5b48(%rsi), %edi
callq 0x37dc
leaq 0xc(%rsp), %r12
movl %eax, (%r12)
addq $0x8, %r15
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x46e0
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xb(%rsp), %rdx
movq %r12, %rcx
movq %r13, %r8
movq %r14, %r9
callq 0x42d6
leaq 0x20(%rsp), %r14
movq (%r14), %rsi
movq %r14, %rdi
callq 0x436a
movq (%r14), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%r14), %rcx
movq %rax, 0x8(%r14)
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4021
callq 0x3d0a
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4044
callq 0x3d0a
movq %rbx, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
cmpb $0x1, 0x5b58(%rdi)
jne 0x4123
movq %rdi, %r14
movl 0x5b54(%rdi), %eax
leaq 0x20(%rsp), %rsi
movl %eax, 0x8(%rsi)
movq 0x5b4c(%rdi), %rcx
movq %rcx, (%rsi)
movzbl %al, %eax
leaq 0x149ad(%rip), %rcx     # 0x18a68
leaq 0x10(%rsp), %rdi
callq *(%rcx,%rax,8)
movb $0x1, %bl
testb %al, %al
jne 0x4125
leaq 0x20(%rsp), %rsi
movzbl 0x8(%rsi), %eax
leaq 0x14977(%rip), %r15     # 0x18a50
leaq 0x10(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
je 0x4123
movq 0x5b60(%r14), %rax
testq %rax, %rax
je 0x4123
cmpb $0x1, 0x5b58(%rax)
jne 0x4123
movl 0x5b54(%rax), %ecx
leaq 0x10(%rsp), %rsi
movl %ecx, 0x8(%rsi)
movq 0x5b4c(%rax), %rax
movq %rax, (%rsi)
movzbl %cl, %eax
leaq 0xf(%rsp), %rdi
callq *(%r15,%rax,8)
testb %al, %al
jne 0x4125
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/macfergus[P]baduk/cppsrc/baduk/game.cpp
// Function: baduk::GameStateImpl::GameStateImpl(baduk::Stone, std::shared_ptr<baduk::GameStateImpl const>, std::variant<baduk::Play, baduk::Pass, baduk::Resign> const&)
GameStateImpl(
            Stone next_player,
            std::shared_ptr<const GameStateImpl> parent,
            Move const& last_move) :
        board_(parent->board_),
        next_player_(next_player),
        last_move_(last_move),
        prev_state_(parent),
        komi_(parent->komi()),
        num_moves_(parent->numMoves() + 1) {

        if (std::holds_alternative<Play>(last_move)) {
            board_.place(
                std::get<Play>(last_move).point(),
                other(next_player_));
        }

        previous_states_ = parent->previous_states_;
        previous_states_.insert(prev_state_->hash());
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x146b8(%rip), %rax     # 0x18b40
movq %rax, (%rdi)
leaq 0x18(%rdi), %r12
movq (%rdx), %rsi
addq $0x18, %rsi
movl $0x5b30, %edx           # imm = 0x5B30
movq %r12, %rdi
callq 0x3150
movl %ebp, 0x5b48(%rbx)
movq (%r13), %rax
movq %rax, 0x5b4c(%rbx)
movl 0x8(%r13), %eax
movl %eax, 0x5b54(%rbx)
movb $0x1, 0x5b58(%rbx)
movq (%r15), %rax
movq %rax, 0x5b60(%rbx)
movq 0x8(%r15), %rax
movq %rax, 0x5b68(%rbx)
testq %rax, %rax
je 0x44f4
movq 0x14ad2(%rip), %rcx     # 0x18fb8
cmpb $0x0, (%rcx)
je 0x44f0
incl 0x8(%rax)
jmp 0x44f4
lock
incl 0x8(%rax)
leaq 0x8(%rbx), %r14
leaq 0x8a18(%rbx), %rdi
movl $0xc0, %edx
xorl %esi, %esi
callq 0x30d0
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movss %xmm0, 0x8ad8(%rbx)
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
incl %eax
movl %eax, 0x8adc(%rbx)
cmpb $0x0, 0x8(%r13)
jne 0x4557
movq %r13, %rdi
callq 0x3cc9
movq (%rax), %r13
movl 0x5b48(%rbx), %edi
callq 0x37dc
movq %r12, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0xfe56
leaq 0x5b70(%rbx), %r12
movl $0x5b70, %esi           # imm = 0x5B70
addq (%r15), %rsi
movl $0x2f68, %edx           # imm = 0x2F68
movq %r12, %rdi
callq 0x3150
movq 0x5b60(%rbx), %rdi
movq (%rdi), %rax
callq *0x70(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x45be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq 0x5b68(%rbx), %rdi
testq %rdi, %rdi
je 0x45ae
callq 0x3d0a
movq %r14, %rdi
callq 0x42a0
movq %r15, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
leaq (%rdi,%rsi,8), %r9
movl $0xfffffa2b, %r11d      # imm = 0xFFFFFA2B
movabsq $-0x506afeccbb3de647, %r10 # imm = 0xAF95013344C219B9
movq %rsi, %r8
movq %r8, %rax
mulq %r10
shrq $0xa, %rdx
imulq $0x5d5, %rdx, %rax      # imm = 0x5D5
movq %r8, %rcx
subq %rax, %rcx
movl %ecx, %eax
shrl $0x6, %eax
movq 0x2ea8(%rdi,%rax,8), %rdx
movl $0x1, %ebx
shlq %cl, %rbx
btq %rcx, %rdx
jae 0x463e
incq %r8
addq $0x8, %r9
incl %r11d
jne 0x45d6
movl $0x8, %edi
callq 0x30b0
leaq 0x14663(%rip), %rcx     # 0x18c88
movq %rcx, (%rax)
leaq 0x14631(%rip), %rsi     # 0x18c60
movq 0x149a2(%rip), %rdx     # 0x18fd8
movq %rax, %rdi
callq 0x3270
orq %rbx, %rdx
movq %rdx, 0x2ea8(%rdi,%rax,8)
movq %r8, %rax
mulq %r10
shrq $0xa, %rdx
imulq $-0x2ea8, %rdx, %rax    # imm = 0xD158
movq %rsi, (%r9,%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rsi), %rbx
movq (%rdi), %rdi
movl 0x5b48(%rdi), %ebp
addq $0x18, %rdi
movq %rbx, %rsi
callq 0xfe32
testb %al, %al
je 0x479b
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x105c4
movq (%r14), %rdi
testb %al, %al
je 0x4789
movq %rbx, %rsi
callq 0x47a6
jmp 0x4797
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x106f4
testb %al, %al
je 0x479f
xorl %eax, %eax
jmp 0x47a1
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
addq $0x18, %rdi
movl 0x5b48(%rbx), %edx
callq 0x10ba2
cmpl $0x0, 0x5b48(%rbx)
movabsq $0x78072ab4b31b23a7, %rcx # imm = 0x78072AB4B31B23A7
movabsq $0x3089a105e9ebf992, %rsi # imm = 0x3089A105E9EBF992
cmoveq %rcx, %rsi
xorq %rax, %rsi
leaq (%rbx,%rsi,8), %rdi
addq $0x5b70, %rdi           # imm = 0x5B70
movl $0xfffffa2b, %r8d       # imm = 0xFFFFFA2B
movabsq $-0x506afeccbb3de647, %r9 # imm = 0xAF95013344C219B9
movq %rsi, %rcx
movq %rcx, %rax
mulq %r9
shrq $0xa, %rdx
imulq $0x5d5, %rdx, %rax      # imm = 0x5D5
movq %rcx, %r10
subq %rax, %r10
movl %r10d, %eax
shrl $0x3, %eax
andl $0xf8, %eax
movq 0x8a18(%rbx,%rax), %rax
btq %r10, %rax
jae 0x4842
imulq $-0x2ea8, %rdx, %rax    # imm = 0xD158
cmpq %rsi, (%rdi,%rax)
je 0x4846
incq %rcx
addq $0x8, %rdi
incl %r8d
jne 0x47f9
xorl %eax, %eax
jmp 0x4848
movb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rsi), %rbx
movq (%rdi), %rdi
movl 0x5b48(%rdi), %ebp
addq $0x18, %rdi
movq %rbx, %rsi
callq 0xfe32
testb %al, %al
je 0x489f
movq (%r14), %rdi
addq $0x18, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x105c4
testb %al, %al
je 0x489f
movq (%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x47a6
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r12
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
movl %esi, (%rdi)
leaq 0x8(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movl $0x168, 0x38(%rdi)      # imm = 0x168
leaq 0x40(%rdi), %rbx
movups %xmm0, 0x3c(%rdi)
movups %xmm0, 0x4c(%rdi)
movups %xmm0, 0x5c(%rdi)
movl $0x0, 0x6c(%rdi)
movq $0x168, 0x70(%rdi)      # imm = 0x168
movq %r15, %rdi
movq %rax, %rsi
callq 0x4d60
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4db2
movq (%r14), %rbp
movq %r14, (%rsp)
movq 0x8(%r14), %r14
cmpq %r14, %rbp
je 0x4aa4
leaq 0x10(%rsp), %r12
movq (%rbp), %r13
movq 0x38(%r13), %rax
movq %rax, 0x40(%rsp)
movups 0x8(%r13), %xmm0
movups 0x18(%r13), %xmm1
movups 0x28(%r13), %xmm2
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4db2
addq $0x40, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4db2
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x4a56
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4de2
movq (%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
je 0x4b01
leaq 0x10(%rsp), %r14
movq (%r15), %rax
movq 0x38(%rax), %rcx
movq %rcx, 0x40(%rsp)
movups 0x8(%rax), %xmm0
movups 0x18(%rax), %xmm1
movups 0x28(%rax), %xmm2
movaps %xmm2, 0x30(%rsp)
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4df6
addq $0x8, %r15
cmpq %r12, %r15
jne 0x4ac6
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq %rdi, %rax
movl (%rsi), %edi
movl %edi, (%rax)
movups 0x8(%rsi), %xmm0
movups 0x18(%rsi), %xmm1
movups 0x28(%rsi), %xmm2
movups %xmm0, 0x8(%rax)
movups %xmm1, 0x18(%rax)
movups %xmm2, 0x28(%rax)
movq 0x38(%rsi), %rdi
movq %rdi, 0x38(%rax)
leaq 0x40(%rax), %rdi
movups 0x40(%rsi), %xmm0
movups 0x50(%rsi), %xmm1
movups 0x60(%rsi), %xmm2
movups %xmm0, 0x40(%rax)
movups %xmm1, 0x50(%rax)
movups %xmm2, 0x60(%rax)
movq 0x70(%rsi), %rsi
movq %rsi, 0x70(%rax)
movq %rdx, %rsi
testl %ecx, %ecx
je 0x4de2
jmp 0x4d60
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
addq $0x40, %rsi
addq $0x40, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x4ebe
leaq 0x8(%r12), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x4df6
addq $0x8, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4df6
movl (%r12), %ebp
leaq 0x8(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4ebe
movl %ebp, (%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm0, 0x40(%rbx)
movups %xmm1, 0x50(%rbx)
movups %xmm2, 0x60(%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x70(%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq %rdi, %rax
movl 0x8(%rdi), %ecx
movq (%rdi), %rdx
leal 0x1(%rcx), %esi
cmpl $0x16a, %esi            # imm = 0x16A
movl $0x169, %edi            # imm = 0x169
cmovael %esi, %edi
cmpl $0x168, %esi            # imm = 0x168
ja 0x4d1f
cmpl 0x34(%rdx), %esi
ja 0x4d23
movl %esi, %r8d
shrl $0x6, %r8d
movq (%rdx,%r8,8), %r8
movl %esi, %r9d
incl %r9d
incl %ecx
btq %rsi, %r8
movl %r9d, %esi
jae 0x4cf4
jmp 0x4d25
movl %edi, %ecx
jmp 0x4d25
movl %esi, %ecx
movl %ecx, 0x8(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x5b2a
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x4fc6
movl 0x28(%rax), %eax
jmp 0x4fcb
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1382f(%rip), %rax     # 0x18d10
addq $0x10, %rax
movq %rax, 0x38(%rsp)
callq 0x3040
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rcx
addq %rax, %rcx
movabsq $0x200000005, %rdx      # imm = 0x200000005
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rdx
shlq $0x1f, %rdx
subq %rdx, %rax
leaq (%rcx,%rax), %rdx
cmpq $0x1, %rdx
adcq %rcx, %rax
movq %rax, 0x40(%rsp)
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x556f
movq 0x13a57(%rip), %rcx     # 0x18fb8
cmpb $0x0, (%rcx)
je 0x556b
incl 0x8(%rax)
jmp 0x556f
lock
incl 0x8(%rax)
movq (%rbx), %r14
movq %rbx, 0x8(%rsp)
movq 0x8(%rbx), %rbx
leaq 0x38(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x28(%rsp), %rbp
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
testb %al, %al
jne 0x55ed
movq %r12, %rdi
movq %r14, %rsi
callq 0x65c4
movq %rax, 0x28(%rsp)
movb %dl, 0x30(%rsp)
movq (%r14), %rax
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq *0x28(%rax)
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
testq %rbx, %rbx
je 0x55d9
movq %rbx, %rdi
callq 0x3d0a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x55e8
callq 0x3d0a
movq %r15, %rbx
jmp 0x558a
movq 0x8(%rsp), %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x560c
jmp 0x560c
movq %rax, %r12
movq 0x8(%rsp), %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x5629
callq 0x3d0a
movq %r12, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O1/macfergus[P]baduk/cppsrc/baduk/agent.cpp
// Function: baduk::RandomBot::selectMove(baduk::GameState const&)
Move RandomBot::selectMove(GameState const& game_state) {
    thread_local static std::vector<Point> candidates;
    Board const& board = game_state.board();

    candidates.reserve(board.numRows() * board.numCols());
    candidates.clear();

    for (unsigned int r = 0; r < board.numRows(); ++r) {
        for (unsigned int c = 0; c < board.numCols(); ++c) {
            const Point candidate(r, c);
            if (game_state.isMoveLegal(Play(candidate)) &&
                    !isPointAnEye(
                        board, candidate, game_state.nextPlayer())) {
                assert(board.isEmpty(candidate));
                candidates.push_back(candidate);
            }
        }
    }

    if (candidates.empty()) {
        return Pass();
    }
    std::uniform_int_distribution<unsigned int> dist(0, candidates.size() - 1);
    return candidates[dist(rng_)];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
cmpb $0x0, %fs:-0x8
je 0x675c
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %rax, %r15
movq %fs:0x0, %rax
leaq -0x20(%rax), %rdi
movl 0xc(%r15), %esi
imull 0x8(%r15), %esi
movq %rdi, 0x20(%rsp)
callq 0x679e
movq %fs:-0x20, %rax
cmpq %rax, %fs:-0x18
je 0x6635
movq %rax, %fs:-0x18
cmpl $0x0, 0x8(%r15)
je 0x66f9
xorl %ebx, %ebx
leaq 0x8(%rsp), %r13
movq %rsp, %rbp
cmpl $0x0, 0xc(%r15)
je 0x66ed
xorl %r12d, %r12d
movl %ebx, (%rsp)
movl %r12d, 0x4(%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
callq *0x30(%rax)
testb %al, %al
je 0x66e0
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq %r15, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x63a0
testb %al, %al
jne 0x66e0
movq (%rsp), %rsi
movq %r15, %rdi
callq 0xfe32
testb %al, %al
je 0x6766
movq %fs:-0x18, %rsi
cmpq %fs:-0x10, %rsi
je 0x66d3
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %fs:-0x18
jmp 0x66e0
movq 0x20(%rsp), %rdi
movq %rbp, %rdx
callq 0x69b8
incl %r12d
cmpl 0xc(%r15), %r12d
jb 0x6658
incl %ebx
cmpl 0x8(%r15), %ebx
jb 0x664a
movq %fs:-0x20, %rcx
movq %fs:-0x18, %rax
cmpq %rax, %rcx
je 0x674b
subq %rcx, %rax
shrq $0x3, %rax
decl %eax
leaq 0x8(%rsp), %rdi
movl $0x0, (%rdi)
movl %eax, 0x4(%rdi)
movq 0x18(%rsp), %rsi
addq $0x8, %rsi
movq %rdi, %rdx
callq 0x6a9e
movl %eax, %eax
movq %fs:-0x20, %rcx
movq (%rcx,%rax,8), %rax
xorl %edx, %edx
jmp 0x674d
movb $0x1, %dl
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3313
jmp 0x65e9
leaq 0xdc4c(%rip), %rdi      # 0x143b9
leaq 0xdc5e(%rip), %rsi      # 0x143d2
leaq 0xdc6e(%rip), %rcx      # 0x143e9
movl $0x4a, %edx
callq 0x3110
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x6d3e
leaq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x6c68
incl 0x28(%rax)
jmp 0x6c7b
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x6cb0
movl $0x1, (%rax)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq %rax, %rsi
callq 0x705a
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x6ca8
movl 0x28(%rax), %eax
jmp 0x6caa
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/macfergus[P]baduk/cppsrc/baduk/neighbor.cpp
// Function: baduk::NeighborTable::NeighborTable(unsigned int, unsigned int)
NeighborTable::NeighborTable(unsigned int num_rows, unsigned int num_cols) :
    num_cols_(num_cols),
    neighbors_([num_rows, num_cols]() {
        std::vector<std::vector<Point>> table;
        for (unsigned int r = 0; r < num_rows; ++r) {
            for (unsigned int c = 0; c < num_cols; ++c) {
                std::vector<Point> neighbors;
                if (r > 0) {
                    neighbors.push_back(Point(r - 1, c));
                }
                if (r < num_rows - 1) {
                    neighbors.push_back(Point(r + 1, c));
                }
                if (c > 0) {
                    neighbors.push_back(Point(r, c - 1));
                }
                if (c < num_cols - 1) {
                    neighbors.push_back(Point(r, c + 1));
                }
                table.push_back(neighbors);
            }
        }
        return table;
    }()) {
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x18(%rsp)
movl %edx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rdi, 0x10(%rsp)
movq $0x0, 0x18(%rdi)
movq %rsi, 0x28(%rsp)
testl %esi, %esi
je 0x7200
addq $0x8, 0x10(%rsp)
movq 0x28(%rsp), %rax
leal -0x1(%rax), %ebp
movq 0x18(%rsp), %rax
leal -0x1(%rax), %r15d
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
leaq 0x8(%rsp), %r13
cmpl $0x0, 0x18(%rsp)
je 0x71f4
leal -0x1(%rbx), %eax
movl %eax, 0x24(%rsp)
leal 0x1(%rbx), %eax
movl %eax, 0x20(%rsp)
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testl %ebx, %ebx
je 0x716e
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
movl %r14d, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x6842
cmpl %ebp, %ebx
jae 0x718a
movl 0x20(%rsp), %eax
movl %eax, 0x8(%rsp)
movl %r14d, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x6842
testl %r14d, %r14d
je 0x71a6
leal -0x1(%r14), %eax
movl %ebx, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x6842
cmpl %r15d, %r14d
jae 0x71c2
leal 0x1(%r14), %eax
movl %ebx, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x6842
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7482
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x71e6
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3180
incl %r14d
cmpl %r14d, 0x18(%rsp)
jne 0x7141
incl %ebx
cmpl 0x28(%rsp), %ebx
jne 0x7125
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7217
jmp 0x7217
jmp 0x7217
jmp 0x7217
movq %rax, %r14
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7231
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x3180
movq 0x10(%rsp), %rdi
callq 0x74ae
movq %r14, %rdi
callq 0x32b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %r14d
movb 0x11f49(%rip), %al      # 0x191e8
testb %al, %al
je 0x731a
leal (%r14,%r14,4), %eax
leal (%rax,%rax,4), %r12d
addl %ebx, %r12d
movq 0x11f1b(%rip), %rax     # 0x191d0
movq (%rax,%r12,8), %rax
testq %rax, %rax
jne 0x730e
movl $0x20, %edi
callq 0x3170
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x70cc
leaq (,%r12,8), %rdi
addq 0x11ee9(%rip), %rdi     # 0x191d0
leaq 0x10(%rsp), %rbx
movq $0x0, (%rbx)
movq %r15, %rsi
callq 0x7776
movq %rbx, %rdi
callq 0x744e
movq 0x11ec6(%rip), %rax     # 0x191d0
movq (%rax,%r12,8), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x11ec7(%rip), %rdi     # 0x191e8
callq 0x32d0
testl %eax, %eax
je 0x72a3
leaq 0x11e9b(%rip), %rdi     # 0x191d0
leaq 0xf(%rsp), %rdx
movl $0x272, %esi            # imm = 0x272
callq 0x7398
leaq 0xc1(%rip), %rdi        # 0x740c
leaq 0x11e7e(%rip), %rsi     # 0x191d0
leaq 0x11e27(%rip), %rdx     # 0x19180
callq 0x3160
leaq 0x11e83(%rip), %rdi     # 0x191e8
callq 0x3100
jmp 0x72a3
movq %rax, %rbx
leaq 0x11e6f(%rip), %rdi     # 0x191e8
callq 0x30f0
jmp 0x7390
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x3180
movq %rbx, %rdi
callq 0x32b0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %rax
imulq $0x78, %rax, %rax
movq 0x600(%rdi,%rax), %rcx
leaq 0x20(%rsp), %r15
movq %rcx, 0x30(%r15)
movups 0x5d0(%rdi,%rax), %xmm0
movups 0x5e0(%rdi,%rax), %xmm1
movups 0x5f0(%rdi,%rax), %xmm2
movaps %xmm2, 0x20(%r15)
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, %rdi
callq 0x4f10
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movl %edx, 0x8(%r12)
movq %r15, %rdi
callq 0x4f56
movq %rsp, %rsi
movq %rax, (%rsi)
movl %edx, 0x8(%rsi)
movq %r12, %rdi
callq 0x4d56
testb %al, %al
je 0x102ff
leaq 0x5b18(%r14), %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x4d2a
movq %rax, %r13
movq %rax, %rbp
shrq $0x20, %rbp
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movslq 0x20(%r14,%rax,4), %rsi
cmpq $-0x1, %rsi
je 0x102d9
movq %r15, %rdi
callq 0x11120
movl 0xc(%r14), %eax
imull %r13d, %eax
addl %ebp, %eax
movl %ebx, 0x20(%r14,%rax,4)
movq %r12, %rdi
callq 0x4cda
movq %r12, %rdi
movq %rsp, %rsi
callq 0x4d56
testb %al, %al
jne 0x102aa
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7244
movq (%rax), %rcx
movq 0x8(%rax), %rdx
cmpq %rdx, %rcx
setne %al
je 0x106e3
movl 0xc(%r14), %esi
leaq 0x5c8(%r14), %r13
movabsq $0x5555555555555555, %r8 # imm = 0x5555555555555555
movabsq $0x3333333333333333, %r9 # imm = 0x3333333333333333
movabsq $0xf0f0f0f0f0f0f0f, %r10 # imm = 0xF0F0F0F0F0F0F0F
movabsq $0x101010101010101, %r11 # imm = 0x101010101010101
movq %rdx, 0x8(%rsp)
movq (%rcx), %r15
movl %esi, %r12d
imull %r15d, %r12d
shrq $0x20, %r15
addl %r15d, %r12d
movslq 0x20(%r14,%r12,4), %r15
movl $0x3, %ebp
cmpq $-0x1, %r15
je 0x106ca
imulq $0x78, %r15, %r15
cmpl %ebx, (%r13,%r15)
je 0x106ca
movl %esi, %edx
movl %ebx, %edi
movq %r13, %rsi
addq %r13, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x40(%r15,%r13,8), %rbx
movq %rbx, %rbp
shrq %rbp
andq %r8, %rbp
subq %rbp, %rbx
movq %rbx, %rbp
andq %r9, %rbp
shrq $0x2, %rbx
andq %r9, %rbx
addq %rbp, %rbx
movq %rbx, %rbp
shrq $0x4, %rbp
addq %rbx, %rbp
andq %r10, %rbp
imulq %r11, %rbp
shrq $0x38, %rbp
addq %rbp, %r12
incq %r13
cmpq $0x6, %r13
jne 0x10672
xorl %ebp, %ebp
cmpq $0x1, %r12
sete %bpl
movl %edi, %ebx
movq %rsi, %r13
movl %edx, %esi
movq 0x8(%rsp), %rdx
cmpl $0x3, %ebp
je 0x106d3
testl %ebp, %ebp
jne 0x106e3
addq $0x8, %rcx
cmpq %rdx, %rcx
setne %al
jne 0x10636
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rdi, %r14
leaq 0x10(%rsp), %rax
movq %rsi, (%rax)
movq 0x10(%rdi), %rdi
movq %rax, %rsi
callq 0x7244
movq (%rax), %rcx
movq 0x8(%rax), %rdx
cmpq %rdx, %rcx
sete %al
je 0x10827
movl 0xc(%r14), %esi
movq (%rcx), %rdi
movq %rdi, %r8
shrq $0x20, %r8
imull %esi, %edi
addl %r8d, %edi
movl 0x20(%r14,%rdi,4), %ebp
cmpl $-0x1, %ebp
je 0x10827
leaq 0x5c8(%r14), %r13
movabsq $0x5555555555555555, %r8 # imm = 0x5555555555555555
movabsq $0x3333333333333333, %r9 # imm = 0x3333333333333333
movabsq $0xf0f0f0f0f0f0f0f, %r10 # imm = 0xF0F0F0F0F0F0F0F
movabsq $0x101010101010101, %r11 # imm = 0x101010101010101
movq %r14, 0x8(%rsp)
movslq %ebp, %r15
imulq $0x78, %r15, %r15
cmpl %ebx, (%r13,%r15)
jne 0x107fc
movq %rdx, %r14
movl %esi, %edx
movl %ebx, %esi
movq %r13, %rdi
addq %r13, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq 0x40(%r15,%r13,8), %rbx
movq %rbx, %rbp
shrq %rbp
andq %r8, %rbp
subq %rbp, %rbx
movq %rbx, %rbp
andq %r9, %rbp
shrq $0x2, %rbx
andq %r9, %rbx
addq %rbp, %rbx
movq %rbx, %rbp
shrq $0x4, %rbp
addq %rbx, %rbp
andq %r10, %rbp
imulq %r11, %rbp
shrq $0x38, %rbp
addq %rbp, %r12
incq %r13
cmpq $0x6, %r13
jne 0x107a5
cmpq $0x1, %r12
movl %esi, %ebx
movl %edx, %esi
movq %r14, %rdx
movq 0x8(%rsp), %r14
movq %rdi, %r13
ja 0x10827
addq $0x8, %rcx
cmpq %rdx, %rcx
sete %al
je 0x10827
movq (%rcx), %r15
movl %esi, %r12d
imull %r15d, %r12d
shrq $0x20, %r15
addl %r15d, %r12d
movl 0x20(%r14,%r12,4), %ebp
cmpl $-0x1, %ebp
jne 0x10784
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq