// File: disjukr[P]Tetris/Tetris.cc
// Function: Tetris::Render()
void Tetris::Render() {
    stage.Render(*currentPiece, true);
    this -> RenderPieceQueue();
    this -> RenderHoldPiece();
    int xOffset = 2;
    int xGap = 1;
    int ceilOffset = 1;
    int yOffset = ceilOffset + 1;
    Screen* mainScreen = Console::GetScreen();
    Screen* stageScreen = stage.GetScreen();
    mainScreen -> Clear(
        ' ', ColorUtil::GetComplementary(backgroundColor), backgroundColor);
    mainScreen -> RenderScreen(*holdPieceScreen, xOffset, ceilOffset);
    xOffset += holdPieceScreen -> GetWidth() + xGap;
    mainScreen -> RenderScreen(*stageScreen, xOffset, ceilOffset);
    xOffset += stageScreen -> GetWidth() + xGap;
    mainScreen -> RenderScreen(*queueScreen, xOffset, ceilOffset);
    xOffset += queueScreen -> GetWidth() + xGap;
    // statistics
    mainScreen -> WriteLine("STATISTICS", xOffset, ceilOffset);
    mainScreen -> FillLine(WHITE, xOffset, ceilOffset, 10, true);
    mainScreen -> FillLine(BLACK, xOffset, ceilOffset, 10, false);
    ++xOffset;
    mainScreen -> WriteLine("score:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics.score), xOffset + 7, yOffset);
    mainScreen -> WriteLine("level:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics.level), xOffset + 7, yOffset);
    ++yOffset;
    int valueOffset = xOffset + 8;
    mainScreen -> WriteLine("single:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics._single), valueOffset, yOffset);
    mainScreen -> WriteLine("double:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics._double), valueOffset, yOffset);
    mainScreen -> WriteLine("triple:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics._triple), valueOffset, yOffset);
    mainScreen -> WriteLine("tetris:", xOffset, ++yOffset);
    mainScreen -> WriteLine(
        to_string(statistics._tetris), valueOffset, yOffset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x230(%rbp)
movq %rax, %rdi
addq $0x38, %rdi
movq %rdi, -0x240(%rbp)
movq 0x420(%rax), %rsi
movl $0x1, %edx
callq 0x56e0
movq -0x230(%rbp), %rdi
callq 0x5730
movq -0x230(%rbp), %rdi
callq 0x58d0
movl $0x2, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
incl %eax
movl %eax, -0x18(%rbp)
callq 0xb170
movq -0x240(%rbp), %rdi
movq %rax, -0x20(%rbp)
callq 0x5a50
movq %rax, %rcx
movq -0x230(%rbp), %rax
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, -0x238(%rbp)
movl 0x3b0(%rax), %edi
callq 0x70d0
movq -0x238(%rbp), %rdi
movl %eax, %edx
movq -0x230(%rbp), %rax
movl 0x3b0(%rax), %ecx
movl $0x20, %esi
callq 0xaf90
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rdi
movq 0x3c0(%rax), %rsi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xaea0
movq -0x230(%rbp), %rax
movq 0x3c0(%rax), %rdi
callq 0xabb0
movl %eax, %ecx
movl -0x10(%rbp), %eax
addl %eax, %ecx
movl -0xc(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xaea0
movq -0x28(%rbp), %rdi
callq 0xabb0
movl %eax, %edx
movq -0x230(%rbp), %rax
movl -0x10(%rbp), %ecx
addl %ecx, %edx
movl -0xc(%rbp), %ecx
addl %edx, %ecx
movl %ecx, -0xc(%rbp)
movq -0x20(%rbp), %rdi
movq 0x3b8(%rax), %rsi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xaea0
movq -0x230(%rbp), %rax
movq 0x3b8(%rax), %rdi
callq 0xabb0
movl %eax, %ecx
movl -0x10(%rbp), %eax
addl %eax, %ecx
movl -0xc(%rbp), %eax
addl %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x3280
movq -0x220(%rbp), %rdx
leaq 0x7392(%rip), %rsi      # 0xc31b
leaq -0x48(%rbp), %rdi
callq 0x31d0
jmp 0x4f94
movq -0x228(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq -0x48(%rbp), %rsi
callq 0xad40
jmp 0x4fac
leaq -0x48(%rbp), %rdi
callq 0x30c0
leaq -0x49(%rbp), %rdi
callq 0x3170
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
movl $0xa, %r8d
movl %r8d, -0x254(%rbp)
movl $0x1, %r9d
movl %r9d, %esi
callq 0xae20
movl -0x254(%rbp), %r8d
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x14(%rbp), %ecx
movl $0x3, %esi
xorl %r9d, %r9d
callq 0xae20
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x3280
movq -0x248(%rbp), %rdx
leaq 0x72f1(%rip), %rsi      # 0xc326
leaq -0x80(%rbp), %rdi
callq 0x31d0
jmp 0x5040
movq -0x250(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0x80(%rbp), %rsi
callq 0xad40
jmp 0x505d
leaq -0x80(%rbp), %rdi
callq 0x30c0
leaq -0x81(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x268(%rbp)
movl 0x20(%rax), %esi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x72f0
movq -0x268(%rbp), %rdi
movq -0x260(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0x7, %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x50b8
leaq -0xa8(%rbp), %rdi
callq 0x30c0
movq -0x20(%rbp), %rax
movq %rax, -0x278(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x3280
movq -0x270(%rbp), %rdx
leaq 0x723d(%rip), %rsi      # 0xc32d
leaq -0xc8(%rbp), %rdi
callq 0x31d0
jmp 0x50fe
movq -0x278(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0xc8(%rbp), %rsi
callq 0xad40
jmp 0x511e
leaq -0xc8(%rbp), %rdi
callq 0x30c0
leaq -0xc9(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x288(%rbp)
movl 0x24(%rax), %esi
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x72f0
movq -0x288(%rbp), %rdi
movq -0x280(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0x7, %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x517c
leaq -0xf0(%rbp), %rdi
callq 0x30c0
movl -0x18(%rbp), %eax
incl %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x8, %eax
movl %eax, -0xf4(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x3280
movq -0x290(%rbp), %rdx
leaq 0x716c(%rip), %rsi      # 0xc334
leaq -0x118(%rbp), %rdi
callq 0x31d0
jmp 0x51d6
movq -0x298(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0x118(%rbp), %rsi
callq 0xad40
jmp 0x51f6
leaq -0x118(%rbp), %rdi
callq 0x30c0
leaq -0x119(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x2a8(%rbp)
movl 0x28(%rax), %esi
leaq -0x140(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x72f0
movq -0x2a8(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
movl -0xf4(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x5254
leaq -0x140(%rbp), %rdi
callq 0x30c0
movq -0x20(%rbp), %rax
movq %rax, -0x2b8(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x3280
movq -0x2b0(%rbp), %rdx
leaq 0x70b0(%rip), %rsi      # 0xc33c
leaq -0x160(%rbp), %rdi
callq 0x31d0
jmp 0x529a
movq -0x2b8(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0x160(%rbp), %rsi
callq 0xad40
jmp 0x52ba
leaq -0x160(%rbp), %rdi
callq 0x30c0
leaq -0x161(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x2c8(%rbp)
movl 0x2c(%rax), %esi
leaq -0x188(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x72f0
movq -0x2c8(%rbp), %rdi
movq -0x2c0(%rbp), %rsi
movl -0xf4(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x5318
leaq -0x188(%rbp), %rdi
callq 0x30c0
movq -0x20(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x1a9(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x3280
movq -0x2d0(%rbp), %rdx
leaq 0x6ff4(%rip), %rsi      # 0xc344
leaq -0x1a8(%rbp), %rdi
callq 0x31d0
jmp 0x535e
movq -0x2d8(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0x1a8(%rbp), %rsi
callq 0xad40
jmp 0x537e
leaq -0x1a8(%rbp), %rdi
callq 0x30c0
leaq -0x1a9(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x2e8(%rbp)
movl 0x30(%rax), %esi
leaq -0x1d0(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x72f0
movq -0x2e8(%rbp), %rdi
movq -0x2e0(%rbp), %rsi
movl -0xf4(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x53dc
leaq -0x1d0(%rbp), %rdi
callq 0x30c0
movq -0x20(%rbp), %rax
movq %rax, -0x2f8(%rbp)
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x3280
movq -0x2f0(%rbp), %rdx
leaq 0x6f38(%rip), %rsi      # 0xc34c
leaq -0x1f0(%rbp), %rdi
callq 0x31d0
jmp 0x5422
movq -0x2f8(%rbp), %rdi
movl -0xc(%rbp), %edx
movl -0x18(%rbp), %ecx
incl %ecx
movl %ecx, -0x18(%rbp)
leaq -0x1f0(%rbp), %rsi
callq 0xad40
jmp 0x5442
leaq -0x1f0(%rbp), %rdi
callq 0x30c0
leaq -0x1f1(%rbp), %rdi
callq 0x3170
movq -0x230(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, -0x308(%rbp)
movl 0x34(%rax), %esi
leaq -0x218(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x72f0
movq -0x308(%rbp), %rdi
movq -0x300(%rbp), %rsi
movl -0xf4(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0xad40
jmp 0x54a0
leaq -0x218(%rbp), %rdi
callq 0x30c0
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x54d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x30c0
leaq -0x49(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x5509
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x30c0
leaq -0x81(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x30c0
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x555d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x30c0
leaq -0xc9(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x30c0
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x55b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x30c0
leaq -0x119(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x30c0
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x5605
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x30c0
leaq -0x161(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x30c0
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x5659
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x30c0
leaq -0x1a9(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x30c0
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x56a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x30c0
leaq -0x1f1(%rbp), %rdi
callq 0x3170
jmp 0x56cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x30c0
movq -0x58(%rbp), %rdi
callq 0x3270
nopw %cs:(%rax,%rax)