// File: /workspace/github_cpp_makefile_star2_O1/Leeingnyo[P]newPuyoC/./board.h
// Function: Board::Deserialize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Deserialize(std::string data) {
        for (int i = 0; i < MAP_HEIGHT; i++) {
            for (int j = 0; j < MAP_WIDTH; j++) {
                map[i][j].Deserialize(data.at(i * MAP_WIDTH + j));
            }
        }
        int stateInteger = std::stoi(data.substr(MAP_HEIGHT * MAP_WIDTH, 1));
        state = static_cast<State>(stateInteger);
        if (data.length() > MAP_HEIGHT * MAP_WIDTH + 1) {
            if (bipuyo == nullptr) {
                bipuyo = BiPuyoGenerator::GenerateEmptyBipuyo();
            }
            bipuyo->Deserialize(data.substr(MAP_HEIGHT * MAP_WIDTH + 1, 3));

            std::string buf;
            std::stringstream ss(data.substr(MAP_HEIGHT * MAP_WIDTH + 1 + 3));
            std::vector<std::string> tokens;
            while (ss >> buf)
                tokens.push_back(buf);
            bipuyo_x = std::stoi(tokens[0]);
            bipuyo_y = std::stoi(tokens[1]);
        }
        else {
            bipuyo.reset();
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rsi), %rdx
xorl %eax, %eax
xorl %ecx, %ecx
movl $0x6, %edi
movq %rax, %rsi
cmpq %rsi, %rdx
jbe 0x7cb1
movq (%r15), %r8
movb (%r8,%rsi), %r8b
addb $-0x61, %r8b
movb %r8b, (%r14,%rsi)
incq %rsi
decq %rdi
jne 0x797c
incq %rcx
addq $0x6, %rax
cmpq $0xd, %rcx
jne 0x7974
leaq -0x230(%rbp), %rbx
movl $0x4e, %edx
movl $0x1, %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32c0
movq (%rbx), %r13
callq 0x3040
movl (%rax), %ecx
movl %ecx, -0x34(%rbp)
movq %rax, -0x30(%rbp)
movl $0x0, (%rax)
leaq -0x88(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
movl $0xa, %edx
callq 0x33a0
cmpq %r13, (%rbx)
je 0x7cbf
movq %rax, %r12
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x7ccb
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl $0x22, %eax
je 0x7ccb
testl %eax, %eax
jne 0x7a27
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a3c
callq 0x3260
movl %r12d, 0x68(%r14)
cmpq $0x50, 0x8(%r15)
jb 0x7b74
cmpq $0x0, 0x50(%r14)
jne 0x7a9b
movl $0x18, %edi
callq 0x32a0
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x8ff7(%rip), %rcx      # 0x10a68
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
movw $0x0, 0x10(%rax)
movl $0x0, 0x14(%rax)
movq %rcx, 0x50(%r14)
movq 0x58(%r14), %rdi
movq %rax, 0x58(%r14)
testq %rdi, %rdi
je 0x7a9b
callq 0x7fac
movq 0x50(%r14), %rbx
leaq -0xa8(%rbp), %r12
movl $0x4f, %edx
movl $0x3, %ecx
movq %r12, %rdi
movq %r15, %rsi
callq 0x32c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7db0
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7adb
callq 0x3260
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x60(%rbp), %rdi
movl $0x52, %edx
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x32c0
leaq -0x230(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x18, %edx
callq 0x3420
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7b2d
callq 0x3260
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r15
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
leaq -0x230(%rbp), %r12
leaq -0x88(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x3350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x7b93
movq %r15, %rdi
movq %r13, %rsi
callq 0x9378
jmp 0x7b4e
xorps %xmm0, %xmm0
movq 0x58(%r14), %rdi
movups %xmm0, 0x50(%r14)
testq %rdi, %rdi
je 0x7c9f
callq 0x7fac
jmp 0x7c9f
movq -0x60(%rbp), %rax
movq (%rax), %rbx
movq -0x30(%rbp), %rax
movl (%rax), %r12d
movl $0x0, (%rax)
leaq -0x68(%rbp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x33a0
cmpq %rbx, (%r15)
je 0x7cd7
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x7ce3
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x22, %ecx
je 0x7ce3
testl %ecx, %ecx
jne 0x7bf8
movq -0x30(%rbp), %rcx
movl %r12d, (%rcx)
movl %eax, 0x60(%r14)
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rbx
movq -0x30(%rbp), %rax
movl (%rax), %r12d
movl $0x0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x33a0
cmpq %rbx, (%r15)
je 0x7cef
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x7cfb
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x22, %ecx
je 0x7cfb
testl %ecx, %ecx
jne 0x7c5e
movq -0x30(%rbp), %rcx
movl %r12d, (%rcx)
movl %eax, 0x64(%r14)
leaq -0x60(%rbp), %rdi
callq 0x93c4
movq 0x932e(%rip), %rsi      # 0x10fa0
leaq -0x230(%rbp), %rdi
callq 0x31f0
leaq -0x1b0(%rbp), %rdi
callq 0x30f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x7c9f
callq 0x3260
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4a8f(%rip), %rdi      # 0xc747
xorl %eax, %eax
callq 0x33f0
leaq 0x4a7c(%rip), %rdi      # 0xc742
callq 0x31b0
leaq 0x4a70(%rip), %rdi      # 0xc742
callq 0x33c0
leaq 0x4a64(%rip), %rdi      # 0xc742
callq 0x31b0
leaq 0x4a58(%rip), %rdi      # 0xc742
callq 0x33c0
leaq 0x4a4c(%rip), %rdi      # 0xc742
callq 0x31b0
leaq 0x4a40(%rip), %rdi      # 0xc742
callq 0x33c0
movq %rax, %r14
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d93
callq 0x3260
jmp 0x7d93
movq %rax, %r14
jmp 0x7d93
movq %rax, %r14
leaq -0x98(%rbp), %rax
jmp 0x7d62
jmp 0x7d31
movq %rax, %r14
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7d6b
movq -0x30(%rbp), %rax
movl %r12d, (%rax)
jmp 0x7d6b
movq %rax, %r14
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7d5b
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x7d9e
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x93c4
movq 0x9225(%rip), %rsi      # 0x10fa0
leaq -0x230(%rbp), %rdi
callq 0x31f0
leaq -0x1b0(%rbp), %rdi
callq 0x30f0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x7da8
callq 0x3260
movq %r14, %rdi
callq 0x3480