// File: disjukr[P]Tetris/Tetris.cc
// Function: Intro::Render()
void Intro::Render() {
    Screen* screen = Console::GetScreen();
    int width = screen -> GetWidth();
    int height = screen -> GetHeight();
    int size = Tetromino::size * 2;
    screen -> Clear(' ', BLACK, WHITE);
    if ((frame % 50) > 25)
        screen -> WriteLine(
            "Press Any Key to Start", (width - 22) >> 1, height - 7);
    for (int i = 0; i < numberOfParticle; ++i){
        Tetromino* particle = particles[i];
        rotations[i] += rotateSpeeds[i];
        if (rotations[i] > 100) {
            if (directions[i])
                particle -> RotateCW();
            else
                particle -> RotateCCW();
            rotations[i] = 0;
        }
        falls[i] += fallSpeeds[i];
        if (falls[i] > 100) {
            ++particle -> y;
            falls[i] = 0;
        }
        if (particle -> y > height) {
            delete particles[i];
            particles[i] = particle = pieceGenerator.Get();
            particle -> x = random.Get(0, width - size);
            particle -> y = -size;
            ResetParticle(i);
        }
        particle -> Render(*screen, particle -> x, particle -> y);
    }
    RenderTitle((width - titleWidth) >> 1, 6);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0xb170
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xabb0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xabc0
movl %eax, -0x18(%rbp)
movl $0x8, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0xaf90
movq -0x68(%rbp), %rax
movl 0xc(%rax), %eax
movl $0x32, %ecx
cltd
idivl %ecx
cmpl $0x19, %edx
jle 0x3d1c
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3280
movq -0x70(%rbp), %rdx
leaq 0x8655(%rip), %rsi      # 0xc304
leaq -0x40(%rbp), %rdi
callq 0x31d0
jmp 0x3cba
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %edx
addl $-0x16, %edx
sarl %edx
movl -0x18(%rbp), %ecx
addl $-0x7, %ecx
leaq -0x40(%rbp), %rsi
callq 0xad40
jmp 0x3cd7
leaq -0x40(%rbp), %rdi
callq 0x30c0
leaq -0x41(%rbp), %rdi
callq 0x3170
jmp 0x3d1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3d0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x30c0
leaq -0x41(%rbp), %rdi
callq 0x3170
jmp 0x3ec5
movl $0x0, -0x58(%rbp)
cmpl $0xa, -0x58(%rbp)
jge 0x3ea6
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x80(%rax,%rcx,8), %rcx
movq %rcx, -0x60(%rbp)
movslq -0x58(%rbp), %rcx
movl 0xf8(%rax,%rcx,4), %edx
movslq -0x58(%rbp), %rcx
addl 0xd0(%rax,%rcx,4), %edx
movl %edx, 0xd0(%rax,%rcx,4)
movslq -0x58(%rbp), %rcx
cmpl $0x64, 0xd0(%rax,%rcx,4)
jle 0x3da7
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
testb $0x1, 0x170(%rax,%rcx)
je 0x3d8a
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0x3d94
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl $0x0, 0xd0(%rax,%rcx,4)
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
movl 0x148(%rax,%rcx,4), %edx
movslq -0x58(%rbp), %rcx
addl 0x120(%rax,%rcx,4), %edx
movl %edx, 0x120(%rax,%rcx,4)
movslq -0x58(%rbp), %rcx
cmpl $0x64, 0x120(%rax,%rcx,4)
jle 0x3df6
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rcx
movl 0x10(%rcx), %edx
addl $0x1, %edx
movl %edx, 0x10(%rcx)
movslq -0x58(%rbp), %rcx
movl $0x0, 0x120(%rax,%rcx,4)
movq -0x60(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0x18(%rbp), %eax
jle 0x3e7c
movq -0x68(%rbp), %rax
movslq -0x58(%rbp), %rcx
movq 0x80(%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0x3e26
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x68(%rbp), %rdi
addq $0x30, %rdi
callq 0x93a0
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movq %rcx, -0x60(%rbp)
movslq -0x58(%rbp), %rax
movq %rcx, 0x80(%rdi,%rax,8)
addq $0x18, %rdi
movl -0x14(%rbp), %edx
subl -0x1c(%rbp), %edx
xorl %esi, %esi
callq 0x8f80
movq -0x68(%rbp), %rdi
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0xc(%rax)
xorl %ecx, %ecx
subl -0x1c(%rbp), %ecx
movq -0x60(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x58(%rbp), %esi
callq 0x3a40
movq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x60(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x60(%rbp), %rax
movl 0x10(%rax), %ecx
movq (%rdi), %rax
callq *0x30(%rax)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x3d23
movq -0x68(%rbp), %rdi
movl -0x14(%rbp), %esi
subl $0x40, %esi
sarl %esi
movl $0x6, %edx
callq 0x3ed0
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3270
nop