// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %r14
xorl %r15d, %r15d
movq %rdi, -0x58(%rbp)
movq %rdi, %r12
xorl %r13d, %r13d
cmpq $0xd, %r13
je 0x6564
xorl %ebx, %ebx
cmpq $0x6, %rbx
je 0x6557
leaq (%r15,%rbx), %rsi
movq %r14, %rdi
callq 0x3490
movb (%rax), %al
addb $-0x61, %al
movb %al, (%r12,%rbx)
incq %rbx
jmp 0x6538
incq %r13
addq $0x6, %r12
addq $0x6, %r15
jmp 0x6530
leaq -0x220(%rbp), %r15
pushq $0x4e
popq %rdx
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
pushq $0xa
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x611a
movl %eax, %r15d
leaq -0x220(%rbp), %rdi
callq 0x3140
movq -0x58(%rbp), %rbx
movl %r15d, 0x68(%rbx)
leaq 0x50(%rbx), %r15
cmpq $0x50, 0x8(%r14)
jb 0x668d
movq (%r15), %r12
testq %r12, %r12
jne 0x65e0
leaq -0x220(%rbp), %r12
movq %r12, %rdi
callq 0x613c
movq %r15, %rdi
movq %r12, %rsi
callq 0x81ec
leaq -0x218(%rbp), %rdi
callq 0x6896
movq (%r15), %r12
leaq -0x98(%rbp), %r15
pushq $0x4f
popq %rdx
pushq $0x3
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x32b0
movq %r12, %rdi
movq %r15, %rsi
callq 0x6744
leaq -0x98(%rbp), %rdi
callq 0x3140
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x50(%rbp), %rdi
pushq $0x52
popq %rdx
pushq $-0x1
popq %rcx
movq %r14, %rsi
callq 0x32b0
leaq -0x220(%rbp), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x18
popq %rdx
callq 0x3410
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x3140
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
leaq -0x220(%rbp), %r15
leaq -0x78(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3340
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x6697
movq %r14, %rdi
movq %r12, %rsi
callq 0x7f62
jmp 0x6667
movq %r15, %rdi
callq 0x7356
jmp 0x66db
movq -0x50(%rbp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x611a
movl %eax, 0x60(%rbx)
movq -0x50(%rbp), %rdi
addq $0x20, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x611a
movl %eax, 0x64(%rbx)
leaq -0x50(%rbp), %rdi
callq 0x7f9e
leaq -0x220(%rbp), %rdi
callq 0x31d0
leaq -0x78(%rbp), %rdi
callq 0x3140
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3140
jmp 0x6732
movq %rax, %rbx
jmp 0x6732
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x6736
jmp 0x671a
movq %rax, %rbx
leaq -0x220(%rbp), %rdi
jmp 0x6736
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x7f9e
leaq -0x220(%rbp), %rdi
callq 0x31d0
leaq -0x78(%rbp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x3470
nop