// File: /workspace/github_cpp_makefile_star2_O3/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 0x7c4b
movq (%r15), %r8
movb (%r8,%rsi), %r8b
addb $-0x61, %r8b
movb %r8b, (%r14,%rsi)
incq %rsi
decq %rdi
jne 0x7914
incq %rcx
addq $0x6, %rax
cmpq $0xd, %rcx
jne 0x790c
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 0x7c59
movq %rax, %r12
movslq %r12d, %rax
cmpq %r12, %rax
jne 0x7c65
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl $0x22, %eax
je 0x7c65
testl %eax, %eax
jne 0x79bf
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x79d4
callq 0x3260
movl %r12d, 0x68(%r14)
cmpq $0x50, 0x8(%r15)
jb 0x7b0e
movq 0x50(%r14), %r12
testq %r12, %r12
jne 0x7a39
movl $0x18, %edi
callq 0x32a0
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x9095(%rip), %rcx      # 0x10aa0
movq %rcx, (%rax)
leaq 0x10(%rax), %r12
movw $0x0, 0x10(%rax)
movl $0x0, 0x14(%rax)
movq %r12, 0x50(%r14)
movq 0x58(%r14), %rdi
movq %rax, 0x58(%r14)
testq %rdi, %rdi
je 0x7a39
callq 0x7f4e
movq 0x50(%r14), %r12
leaq -0xa8(%rbp), %rbx
movl $0x4f, %edx
movl $0x3, %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32c0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7d4a
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a75
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 0x7ac7
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 0x7b2d
movq %r15, %rdi
movq %r13, %rsi
callq 0x9318
jmp 0x7ae8
xorps %xmm0, %xmm0
movq 0x58(%r14), %rdi
movups %xmm0, 0x50(%r14)
testq %rdi, %rdi
je 0x7c39
callq 0x7f4e
jmp 0x7c39
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 0x7c71
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x7c7d
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x22, %ecx
je 0x7c7d
testl %ecx, %ecx
jne 0x7b92
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 0x7c89
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x7c95
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x22, %ecx
je 0x7c95
testl %ecx, %ecx
jne 0x7bf8
movq -0x30(%rbp), %rcx
movl %r12d, (%rcx)
movl %eax, 0x64(%r14)
leaq -0x60(%rbp), %rdi
callq 0x9364
movq 0x9394(%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 0x7c39
callq 0x3260
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ad5(%rip), %rdi      # 0xc727
xorl %eax, %eax
callq 0x33f0
leaq 0x4ac2(%rip), %rdi      # 0xc722
callq 0x31b0
leaq 0x4ab6(%rip), %rdi      # 0xc722
callq 0x33c0
leaq 0x4aaa(%rip), %rdi      # 0xc722
callq 0x31b0
leaq 0x4a9e(%rip), %rdi      # 0xc722
callq 0x33c0
leaq 0x4a92(%rip), %rdi      # 0xc722
callq 0x31b0
leaq 0x4a86(%rip), %rdi      # 0xc722
callq 0x33c0
movq %rax, %r14
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d2d
callq 0x3260
jmp 0x7d2d
movq %rax, %r14
jmp 0x7d2d
movq %rax, %r14
leaq -0x98(%rbp), %rax
jmp 0x7cfc
jmp 0x7ccb
movq %rax, %r14
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7d05
movq -0x30(%rbp), %rax
movl %r12d, (%rax)
jmp 0x7d05
movq %rax, %r14
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7cf5
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x220(%rbp), %rax
movq -0x10(%rax), %rdi
jmp 0x7d38
movq %rax, %r14
leaq -0x60(%rbp), %rdi
callq 0x9364
movq 0x928b(%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 0x7d42
callq 0x3260
movq %r14, %rdi
callq 0x3480