// File: disjukr[P]Tetris/Tetris.cc
// Function: Tetris::Tetris()
Tetris::Tetris() {
    this -> dropFrameInterval = 20;
    this -> attachFrameInterval = 20;
    this -> lastDrop = this -> frame;
    this -> pieceGenerator = new TGM2Randomizer();
    this -> backgroundColor = BLUE;
    this -> queueScreen = new Screen(
        Tetromino::size * 2, (Tetromino::size + 1) * pieceQueueSize);
    for (int i = 0; i < pieceQueueSize; ++i)
        this -> pieceQueue.push_back(pieceGenerator -> Get());
    this -> holdPieceScreen = new Screen(
        Tetromino::size * 2, Tetromino::size + 1);
    this -> currentPiece = this -> EmitPiece();
    this -> holdPiece = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x6f60
movq -0x28(%rbp), %rdi
leaq 0xd8fc(%rip), %rax      # 0x118c0
movq %rax, (%rdi)
addq $0x20, %rdi
callq 0x7160
jmp 0x3fd2
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0x30(%rbp)
callq 0x5de0
jmp 0x3fe5
movq -0x28(%rbp), %rdi
addq $0x3d0, %rdi            # imm = 0x3D0
movq %rdi, -0x38(%rbp)
callq 0x71a0
jmp 0x3ffb
movq -0x28(%rbp), %rax
movl $0x14, 0x14(%rax)
movl $0x14, 0x18(%rax)
movl 0xc(%rax), %ecx
movl %ecx, 0x1c(%rax)
movl $0x50, %edi
callq 0x3150
movq %rax, -0x40(%rbp)
jmp 0x4023
movq -0x40(%rbp), %rdi
callq 0x9260
jmp 0x402e
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x3c8(%rax)
movl $0x4, 0x3b0(%rax)
movl $0x20, %edi
callq 0x3150
movq %rax, -0x48(%rbp)
jmp 0x4057
movq -0x48(%rbp), %rdi
movl $0x8, %esi
movl $0x14, %edx
callq 0xaa20
jmp 0x406c
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x3b8(%rax)
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0x413c
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x3d0, %rcx            # imm = 0x3D0
movq %rcx, -0x58(%rbp)
movq 0x3c8(%rax), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, -0x50(%rbp)
jmp 0x40b4
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x71c0
jmp 0x40cb
jmp 0x40cd
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4082
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x41c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x41bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x41b4
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x3120
jmp 0x41b4
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x3120
jmp 0x41b4
movl $0x20, %edi
callq 0x3150
movq %rax, -0x60(%rbp)
jmp 0x414c
movq -0x60(%rbp), %rdi
movl $0x8, %esi
movl $0x5, %edx
callq 0xaa20
jmp 0x4161
movq -0x28(%rbp), %rdi
movq -0x60(%rbp), %rax
movq %rax, 0x3c0(%rdi)
xorl %eax, %eax
movl %eax, %esi
callq 0x41e0
movq %rax, -0x68(%rbp)
jmp 0x417f
movq -0x28(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, 0x420(%rax)
movq $0x0, 0x428(%rax)
addq $0x70, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0x3120
movq -0x38(%rbp), %rdi
callq 0x71f0
movq -0x30(%rbp), %rdi
callq 0x5ee0
movq -0x28(%rbp), %rdi
callq 0x7530
movq -0x10(%rbp), %rdi
callq 0x3270
nopl (%rax,%rax)