// File: macfergus[P]baduk/cppsrc/baduk/board.cpp
// Function: baduk::Board::validate() const
void Board::validate() const {
    for (const auto& go_string_idx : grid_) {
        if (go_string_idx == EMPTY) {
            continue;
        }
        const GoString& go_string = strings_[go_string_idx];
        for (const auto point : go_string.stones()) {
            assert(!isEmpty(point));
            assert(at(point) == go_string.color());
        }
        for (const auto point : go_string.liberties()) {
            assert(isEmpty(point));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x160(%rbp)
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3e670
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3e690
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x3d8dc
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x3d640
jmp 0x3d8cb
movq -0x160(%rbp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
movq -0x28(%rbp), %rax
movslq (%rax), %rsi
callq 0x3e640
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x9800
movq -0x168(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x9d20
movl %edx, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
callq 0x9d60
movl %edx, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, -0x98(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x9a90
testb $0x1, %al
jne 0x3d6f0
jmp 0x3d7b7
leaq -0x80(%rbp), %rdi
callq 0x9a60
movq -0x160(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rsi
callq 0x3c650
xorb $-0x1, %al
testb $0x1, %al
jne 0x3d729
jmp 0x3d72b
jmp 0x3d74a
leaq 0x5e80(%rip), %rdi      # 0x435b2
leaq 0x5e3b(%rip), %rsi      # 0x43574
movl $0xb0, %edx
leaq 0x5e7d(%rip), %rcx      # 0x435c2
callq 0x3140
movq -0x160(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rsi
callq 0x3d4c0
movl %eax, -0x16c(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3e310
movl %eax, %ecx
movl -0x16c(%rbp), %eax
cmpl %ecx, %eax
jne 0x3d788
jmp 0x3d7a7
leaq 0x5e57(%rip), %rdi      # 0x435e6
leaq 0x5dde(%rip), %rsi      # 0x43574
movl $0xb1, %edx
leaq 0x5e20(%rip), %rcx      # 0x435c2
callq 0x3140
jmp 0x3d7a9
leaq -0x80(%rbp), %rdi
callq 0x99e0
jmp 0x3d6d7
movq -0x30(%rbp), %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x3e6c0
movq -0x178(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x9d20
movl %edx, -0x120(%rbp)
movq %rax, -0x128(%rbp)
movl -0x120(%rbp), %eax
movl %eax, -0x110(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x9d60
movl %edx, -0x140(%rbp)
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x140(%rbp), %eax
movl %eax, -0x130(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x9a90
testb $0x1, %al
jne 0x3d85b
jmp 0x3d8c9
leaq -0x118(%rbp), %rdi
callq 0x9a60
movq -0x160(%rbp), %rdi
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rsi
callq 0x3c650
testb $0x1, %al
jne 0x3d895
jmp 0x3d897
jmp 0x3d8b6
leaq 0x5d15(%rip), %rdi      # 0x435b3
leaq 0x5ccf(%rip), %rsi      # 0x43574
movl $0xb4, %edx
leaq 0x5d11(%rip), %rcx      # 0x435c2
callq 0x3140
jmp 0x3d8b8
leaq -0x118(%rbp), %rdi
callq 0x99e0
jmp 0x3d842
jmp 0x3d8cb
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x3d61c
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)