// File: EstherJin[P]TetrisRemake/graphicsDisplay.cc
// Function: GraphicsDisplay::printNext(char)
void GraphicsDisplay::printNext (char next) {
    if (next != ' ') {
        switch (next) {
            case 'T':
                window->fillRectangle(xmar,712, cellLength, cellLength, 2);
                window->fillRectangle(xmar+cellLength,712, cellLength, cellLength, 2);
                window->fillRectangle(xmar+2*cellLength,712, cellLength, cellLength, 2);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 2);
                break;
            case 'L':
                window->fillRectangle(xmar+2*cellLength,712, cellLength, cellLength, 3);
                window->fillRectangle(xmar,712+cellLength, cellLength, cellLength, 3);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 3);
                window->fillRectangle(xmar+2*cellLength,712+cellLength, cellLength, cellLength, 3);
                break;
            case 'Z':
                window->fillRectangle(xmar,712, cellLength, cellLength, 4);
                window->fillRectangle(xmar+cellLength,712, cellLength, cellLength, 4);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 4);
                window->fillRectangle(xmar+2*cellLength,712+cellLength, cellLength, cellLength, 4);
                break;
            case 'O':
                window->fillRectangle(xmar,712, cellLength, cellLength, 5);
                window->fillRectangle(xmar+cellLength,712,cellLength, cellLength, 5);
                window->fillRectangle(xmar,712+cellLength, cellLength, cellLength, 5);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 5);
                break;
            case 'S':
                window->fillRectangle(xmar+cellLength,712, cellLength, cellLength, 6);
                window->fillRectangle(xmar+2*cellLength,712, cellLength, cellLength, 6);
                window->fillRectangle(xmar,712+cellLength, cellLength, cellLength, 6);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 6);
                break;
            case 'J':
                window->fillRectangle(xmar,712, cellLength, cellLength, 7);
                window->fillRectangle(xmar,712+cellLength, cellLength, cellLength, 7);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 7);
                window->fillRectangle(xmar+2*cellLength,712+cellLength, cellLength, cellLength, 7);
                break;
            case 'I':
                window->fillRectangle(xmar,712+cellLength, cellLength, cellLength, 8);
                window->fillRectangle(xmar+cellLength,712+cellLength, cellLength, cellLength, 8);
                window->fillRectangle(xmar+2*cellLength,712+cellLength, cellLength, cellLength, 8);
                window->fillRectangle(xmar+3*cellLength,712+cellLength, cellLength, cellLength, 8);
                break;
        }
    } else {
        window->fillRectangle(xmar, 712, 405, 150, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x9(%rbp), %eax
cmpl $0x20, %eax
je 0x2c045
movsbl -0x9(%rbp), %eax
addl $-0x49, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x11, %eax
ja 0x2c043
movq -0x20(%rbp), %rax
leaq 0x1d48(%rip), %rcx      # 0x2d7c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x2, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x2, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x2, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x3, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x3, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x3, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x3, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x4, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x4, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x4, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x4, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x5, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x5, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x5, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x5, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x6, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x6, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x6, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x6, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x7, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x7, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x7, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x7, %r9d
callq 0x2c990
jmp 0x2c043
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x8, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
addl 0x8(%rax), %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x8, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl 0x8(%rax), %ecx
shll %ecx
addl %ecx, %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x8, %r9d
callq 0x2c990
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
imull $0x3, 0x8(%rax), %ecx
addl %ecx, %esi
movl 0x8(%rax), %edx
addl $0x2c8, %edx            # imm = 0x2C8
movl 0x8(%rax), %ecx
movl 0x8(%rax), %r8d
movl $0x8, %r9d
callq 0x2c990
jmp 0x2c074
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
callq 0x2c1c0
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %esi
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x195, %ecx            # imm = 0x195
movl $0x96, %r8d
xorl %r9d, %r9d
callq 0x2c990
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)