// File: Leeingnyo[P]newPuyoC/game.cpp
// Function: VSGame::GameInit()
bool VSGame::GameInit() {
    Console::ScreenClear();
    std::cout << Console::GotoXY(X(0), Y(0));

    // prepare game
    int seed = time(NULL);
    my_bipuyo_generator = std::make_shared<BiPuyoGenerator>(seed);
    my_board = std::make_shared<Board>();
    my_board->SetNextBiPuyo(my_bipuyo_generator->GenerateBipuyo());
    my_next_bipuyo = my_bipuyo_generator->GenerateBipuyo();
    other_bipuyo_generator = std::make_shared<BiPuyoGenerator>(seed);
    other_board = std::make_shared<Board>();
    other_board->SetNextBiPuyo(other_bipuyo_generator->GenerateBipuyo());
    other_next_bipuyo = other_bipuyo_generator->GenerateBipuyo();

    std::cout << "Loading..." << std::endl;
    Console::Sleep(500);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
callq 0x5250
leaq -0x10(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
xorl %edx, %edx
movl %edx, -0xe4(%rbp)
movl %edx, %esi
callq 0x8790
movq -0xf0(%rbp), %rsi
movq 0x22091(%rip), %rdi     # 0x27fc8
callq 0x5300
movl -0xe4(%rbp), %eax
movl %eax, %edi
callq 0x4290
movl %eax, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x92a0
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movq %rdi, -0xc0(%rbp)
callq 0x8aa0
movq -0xe0(%rbp), %rdi
callq 0x8ad0
leaq -0x38(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x8af0
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
addq $0x20, %rdi
movq %rdi, -0xc8(%rbp)
callq 0x8b60
movq -0xd0(%rbp), %rdi
callq 0x8b90
movq -0xc8(%rbp), %rdi
callq 0x87b0
movq -0xc0(%rbp), %rdi
movq %rax, -0xb8(%rbp)
callq 0x8c00
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x8c20
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x8bb0
jmp 0x600b
leaq -0x48(%rbp), %rdi
callq 0x8ca0
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
callq 0x8c00
movq %rax, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x8c20
movq -0x128(%rbp), %rsi
movq -0xd8(%rbp), %rdi
addq $0x30, %rdi
callq 0x8cc0
movq -0x128(%rbp), %rdi
callq 0x8ca0
leaq -0x78(%rbp), %rdi
movq %rdi, -0x120(%rbp)
leaq -0x14(%rbp), %rsi
callq 0x92a0
movq -0x120(%rbp), %rsi
movq -0xd8(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x108(%rbp)
callq 0x8aa0
movq -0x120(%rbp), %rdi
callq 0x8ad0
leaq -0x88(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x8af0
movq -0xd8(%rbp), %rdi
movq -0x118(%rbp), %rsi
addq $0x60, %rdi
movq %rdi, -0x110(%rbp)
callq 0x8b60
movq -0x118(%rbp), %rdi
callq 0x8b90
movq -0x110(%rbp), %rdi
callq 0x87b0
movq -0x108(%rbp), %rdi
movq %rax, -0x100(%rbp)
callq 0x8c00
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x8c20
movq -0x100(%rbp), %rdi
movq -0xf8(%rbp), %rsi
callq 0x8bb0
jmp 0x611f
leaq -0x98(%rbp), %rdi
callq 0x8ca0
movq -0xd8(%rbp), %rdi
addq $0x50, %rdi
callq 0x8c00
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x8c20
movq -0xd8(%rbp), %rdi
addq $0x70, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x8cc0
leaq -0xa8(%rbp), %rdi
callq 0x8ca0
movq 0x21e54(%rip), %rdi     # 0x27fc8
leaq 0x13fe5(%rip), %rsi     # 0x1a160
callq 0x42d0
movq %rax, %rdi
movq 0x21e1e(%rip), %rsi     # 0x27fa8
callq 0x4320
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x5230
movb $0x1, %al
andb $0x1, %al
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8ca0
jmp 0x61d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x8ca0
movq -0x50(%rbp), %rdi
callq 0x44f0
nop