// File: kmyk[P]procon26/beam_search.cpp
// Function: beam_search_solver::beam_search_solver(int, std::unordered_set<std::bitset<1024ul>, std::hash<std::bitset<1024ul>>, std::equal_to<std::bitset<1024ul>>, std::allocator<std::bitset<1024ul>>>*)
beam_search_solver(int a_beam_width, unordered_set<bitset<board_size * board_size> > *a_cache)
            : beam_width(a_beam_width),
              cache(a_cache) {
        n = -1;
        highscore = 1000000007;
        least_stone = 1000000007;
        component_pack_table[0 + 2 * 10] = 5;
        component_pack_table[0 + 6 * 10] = 5;
        component_pack_table[1 + 1 * 10] = 6;
        component_pack_table[1 + 3 * 10] = 6;
        component_pack_table[1 + 5 * 10] = 6;
        component_pack_table[3 + 3 * 10] = 6;
        component_pack_table[3 + 3 * 10] = 6;
        component_pack_table[0 + 3 * 10] = 7;
        component_pack_table[0 + 1 * 10] = 7;
        component_pack_table[1 + 4 * 10] = 7;
        component_pack_table[2 + 2 * 10] = 8;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x17250
movq -0x70(%rbp), %rdi
addq $0x20b0, %rdi           # imm = 0x20B0
movq %rdi, -0x88(%rbp)
callq 0x5580
movq -0x70(%rbp), %rdi
addq $0x20c8, %rdi           # imm = 0x20C8
movq %rdi, -0x80(%rbp)
callq 0x55a0
movq -0x70(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, 0x20e8(%rdi)
addq $0x20f0, %rdi           # imm = 0x20F0
movq %rdi, -0x68(%rbp)
callq 0x55c0
movq -0x70(%rbp), %rdi
addq $0x2120, %rdi           # imm = 0x2120
movq %rdi, -0x78(%rbp)
callq 0x55e0
movq -0x70(%rbp), %rax
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq %rcx, 0x2150(%rax)
movl $0xffffffff, 0x20ec(%rax) # imm = 0xFFFFFFFF
movl $0x3b9aca07, 0x20e0(%rax) # imm = 0x3B9ACA07
movl $0x3b9aca07, 0x20e4(%rax) # imm = 0x3B9ACA07
movl $0x14, -0x1c(%rbp)
leaq -0x1c(%rbp), %rsi
callq 0x5630
movq %rax, -0x60(%rbp)
jmp 0x2b76
movq -0x70(%rbp), %rdi
movq -0x60(%rbp), %rax
movl $0x5, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x3c, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x5630
movq %rax, -0x90(%rbp)
jmp 0x2ba4
movq -0x70(%rbp), %rdi
movq -0x90(%rbp), %rax
movl $0x5, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0xb, -0x34(%rbp)
leaq -0x34(%rbp), %rsi
callq 0x5630
movq %rax, -0x98(%rbp)
jmp 0x2bd5
movq -0x70(%rbp), %rdi
movq -0x98(%rbp), %rax
movl $0x6, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x1f, -0x38(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x5630
movq %rax, -0xa0(%rbp)
jmp 0x2c06
movq -0x70(%rbp), %rdi
movq -0xa0(%rbp), %rax
movl $0x6, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x33, -0x3c(%rbp)
leaq -0x3c(%rbp), %rsi
callq 0x5630
movq %rax, -0xa8(%rbp)
jmp 0x2c37
movq -0x70(%rbp), %rdi
movq -0xa8(%rbp), %rax
movl $0x6, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x21, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x5630
movq %rax, -0xb0(%rbp)
jmp 0x2c68
movq -0x70(%rbp), %rdi
movq -0xb0(%rbp), %rax
movl $0x6, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x21, -0x44(%rbp)
leaq -0x44(%rbp), %rsi
callq 0x5630
movq %rax, -0xb8(%rbp)
jmp 0x2c99
movq -0x70(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl $0x6, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x1e, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x5630
movq %rax, -0xc0(%rbp)
jmp 0x2cca
movq -0x70(%rbp), %rdi
movq -0xc0(%rbp), %rax
movl $0x7, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0xa, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x5630
movq %rax, -0xc8(%rbp)
jmp 0x2cfb
movq -0x70(%rbp), %rdi
movq -0xc8(%rbp), %rax
movl $0x7, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x29, -0x50(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x5630
movq %rax, -0xd0(%rbp)
jmp 0x2d2c
movq -0x70(%rbp), %rdi
movq -0xd0(%rbp), %rax
movl $0x7, (%rax)
addq $0x20f0, %rdi           # imm = 0x20F0
movl $0x16, -0x54(%rbp)
leaq -0x54(%rbp), %rsi
callq 0x5630
movq %rax, -0xd8(%rbp)
jmp 0x2d5d
movq -0xd8(%rbp), %rax
movl $0x8, (%rax)
addq $0xe0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x5710
movq -0x68(%rbp), %rdi
callq 0x5760
movq -0x80(%rbp), %rdi
callq 0x5210
movq -0x88(%rbp), %rdi
callq 0x5780
movq -0x28(%rbp), %rdi
callq 0x2260
nop