// File: /workspace/github_cpp_makefile_star2_O3/MatthewZMD[P]TetrisDual/graphicsdisplay.cc
// Function: GraphicsDisplay::notify(Subject&)
void GraphicsDisplay::GraphicsDisplay::notify(Subject& s) {
	Board & b = dynamic_cast<Board&>(s);
	BoardInfo &bi = dynamic_cast<BoardInfo&>(b.getInfo());
	int player = bi.player;
	std::string level = std::to_string(bi.level);
	std::string score = std::to_string(bi.score);
	if (player == 0) {
		xw.fillRectangle(0, 13, 250, 27, Xwindow::Orange);
		xw.drawBigString(15, 40, "Level: " + level, Xwindow::Black);
		xw.fillRectangle(0, 58, 250, 27, Xwindow::Orange);
		xw.drawBigString(15 ,85, "Score: " + score, Xwindow::Black);
		for (int i = 0; i < 18; ++i) {
			for (int j = 0; j < 11; ++j) {
				char current = bi.boardData[i][j];
				xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::White);
				if (current == 'I') {
					xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Brown);
				} else if (current == 'J') {
					xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Red);
				} else if (current == 'L') {
					xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Cyan);
				} else if (current == 'O') {
                                        xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::DarkGreen);
				} else if (current == 'S') {
					xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Magenta);
				} else if (current == 'Z') {
					xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Blue);
				} else if (current == 'T') {
                    xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Green);
				} else if (current == '*') {
                    xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Brown);
					xw.drawString(24 + 20 * j, 115 + 20 * i, "*", Xwindow::White);
				} else if (current == '?') {
                    xw.fillRectangle(15 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Black);
					xw.drawString(24 + 20 * j, 115 + 20 * i, "?", Xwindow::White);
				}
				xw.fillRectangle(15 + 20 * j + 11, 100 + 20 * i + 1, 7, 7, Xwindow::White);
				//xw.fillRectangle(15 + 20 * j + 3, 100 + 20 * i + 15, 3, 3, Xwindow::White);
			    

			}
		}
		xw.drawBigString(15, 500, "Next:", Xwindow::Black);
		CellType type = bi.nextType;
		for (int i = 0; i < 2; ++i) {
                   for (int j = 0; j < 4; ++j) {
                        xw.fillRectangle(65 + 30 * j, 510 + 30 * i, 30, 30, Xwindow::Orange);
                   }
                }

		switch(type) {
			case CellType::I:
				xw.fillRectangle(65, 540, 30, 30, Xwindow::Brown);
				xw.fillRectangle(95, 540, 30, 30, Xwindow::Brown);
                xw.fillRectangle(125, 540, 30, 30, Xwindow::Brown);
                xw.fillRectangle(155, 540, 30, 30, Xwindow::Brown);
                break;
			case CellType::J:
				xw.fillRectangle(65, 510, 30, 30, Xwindow::Red);
                xw.fillRectangle(65, 540, 30, 30, Xwindow::Red);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::Red);
                xw.fillRectangle(125, 540, 30, 30, Xwindow::Red);
                break;
			case CellType::L:
				xw.fillRectangle(125, 510, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(125, 540, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(65, 540, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::Cyan);
                break;
			case CellType::O:
				xw.fillRectangle(65, 510, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(95, 510, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(65, 540, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::DarkGreen);
                break;
			case CellType::S:
				xw.fillRectangle(65, 540, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(95, 510, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(125, 510, 30, 30, Xwindow::Magenta);
                break;
			case CellType::Z:
				xw.fillRectangle(65, 510, 30, 30, Xwindow::Blue);
                xw.fillRectangle(95, 510, 30, 30, Xwindow::Blue);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::Blue);
                xw.fillRectangle(125, 540, 30, 30, Xwindow::Blue);
                break;
			case CellType::T:
				xw.fillRectangle(65, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(95, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(125, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(95, 540, 30, 30, Xwindow::Green);
                break;
            case CellType::E:
                break;
            case CellType::Star:
                break;
		}
		for (int i = 0; i < 19; ++i) {
			xw.drawLine(15, 100 + 20 * i, 235, 100 + 20 * i);
                                                xw.drawLine(15, 100 + 20 * i - 1, 235, 100 + 20 * i - 1);

		}
		for (int j = 0; j < 12; ++j) {
			xw.drawLine(15 + 20 * j, 100, 15 + 20 * j, 460);
			 xw.drawLine(15 + 20 * j - 1, 100, 15 + 20 * j - 1, 460);
            

		}
	} else {
		xw.fillRectangle(270, 13, 250, 27, Xwindow::Orange);
		xw.drawBigString(285, 40, "Level: " + level, Xwindow::Black);
			xw.fillRectangle(270, 58, 250, 27, Xwindow::Orange);
		xw.drawBigString(285 ,85, "Score: " + score, Xwindow::Black);
        for (int i = 0; i < 18; ++i) {
            for (int j = 0; j < 11; ++j) {
                char current = bi.boardData[i][j];
		xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::White);
                if (current == 'I') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Brown);
                } else if (current == 'J') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Red);
                } else if (current == 'L') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Cyan);
                } else if (current == 'O') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::DarkGreen);
                } else if (current == 'S') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Magenta);
                } else if (current == 'Z') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Blue);
                } else if (current == 'T') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Green);
                } else if (current == '*') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Brown);
                    xw.drawString(294 + 20 * j, 115 + 20 * i, "*", Xwindow::White);
                } else if (current == '?') {
                    xw.fillRectangle(285 + 20 * j, 100 + 20 * i, 20, 20, Xwindow::Black);
                    xw.drawString(294 + 20 * j, 115 + 20 * i, "?", Xwindow::White);
                }
		xw.fillRectangle(285 + 20 * j + 11, 100 + 20 * i + 1, 7, 7, Xwindow::White);
		//xw.fillRectangle(285 + 20 * j + 3, 100 + 20 * i + 15, 3, 3, Xwindow::White);



            }
        }
        xw.drawBigString(285, 500, "Next:", Xwindow::Black);
        CellType type = bi.nextType;
	for (int i = 0; i < 2; ++i) {
		for (int j = 0; j < 4; ++j) {
			xw.fillRectangle(335 + 30 * j, 510 + 30 * i, 30, 30, Xwindow::Orange);
		}
	}
        switch(type) {
            case CellType::I:
                xw.fillRectangle(335, 540, 30, 30, Xwindow::Brown);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Brown);
                xw.fillRectangle(395, 540, 30, 30, Xwindow::Brown);
                xw.fillRectangle(425, 540, 30, 30, Xwindow::Brown);
		break;
            case CellType::J:
                xw.fillRectangle(335, 510, 30, 30, Xwindow::Red);
                xw.fillRectangle(335, 540, 30, 30, Xwindow::Red);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Red);
                xw.fillRectangle(395, 540, 30, 30, Xwindow::Red);
		break;
            case CellType::L:
                xw.fillRectangle(395, 510, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(395, 540, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(335, 540, 30, 30, Xwindow::Cyan);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Cyan);
		break;
            case CellType::O:
                xw.fillRectangle(335, 510, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(365, 510, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(335, 540, 30, 30, Xwindow::DarkGreen);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::DarkGreen);
		break;
            case CellType::S:
                xw.fillRectangle(335, 540, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(365, 510, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Magenta);
                xw.fillRectangle(395, 510, 30, 30, Xwindow::Magenta);
		break;
            case CellType::Z:
                xw.fillRectangle(335, 510, 30, 30, Xwindow::Blue);
                xw.fillRectangle(365, 510, 30, 30, Xwindow::Blue);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Blue);
                xw.fillRectangle(395, 540, 30, 30, Xwindow::Blue);
                break;
	    case CellType::T:
                xw.fillRectangle(335, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(365, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(395, 510, 30, 30, Xwindow::Green);
                xw.fillRectangle(365, 540, 30, 30, Xwindow::Green);
		break;
            case CellType::E:
                break;
            case CellType::Star:
                break;
        }
        for (int i = 0; i < 19; ++i) {
            xw.drawLine(285, 100 + 20 * i, 505, 100 + 20 * i);
	     xw.drawLine(285, 100 + 20 * i - 1, 505, 100 + 20 * i - 1);


        }       

        for (int j = 0; j < 12; ++j) {
            xw.drawLine(285 + 20 * j, 100, 285 + 20 * j, 460);
	     xw.drawLine(285 + 20 * j - 1, 100, 285 + 20 * j - 1, 460);

 
        }
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xae1a(%rip), %rsi      # 0x1b208
leaq 0xaf13(%rip), %rdx      # 0x1b308
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x5300
testq %rax, %rax
je 0x115f9
movq (%rax), %rcx
movq %rax, %rdi
callq *(%rcx)
leaq 0xb599(%rip), %rsi      # 0x1b9b0
leaq 0xaf42(%rip), %rdx      # 0x1b360
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x5300
testq %rax, %rax
je 0x115f9
movl 0xc(%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x10498
movl $0x4, %r12d
movl $0xd1b71759, %esi       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1048f
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x10495
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x10498
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1045c
addl $-0x3, %r12d
jmp 0x10498
addl $-0x2, %r12d
jmp 0x10498
decl %r12d
movl 0x8(%rax), %ecx
movl %ecx, 0x10(%rsp)
shrl $0x1f, %r14d
movl %r14d, %esi
addl %r12d, %esi
leaq 0x58(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, 0x18(%rsp)
leaq 0x48(%rsp), %r13
movq %r13, %rdi
movl $0x2d, %edx
callq 0x5330
movq (%r13), %rdi
movq 0x18(%rsp), %r13
addq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x11867
movl 0x10(%r13), %r12d
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
cmpl $0xa, %ebp
jb 0x1053a
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x10531
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x10537
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x1053a
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x104fe
addl $-0x3, %r15d
jmp 0x1053a
addl $-0x2, %r15d
jmp 0x1053a
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x28(%rsp), %rdi
movl $0x2d, %edx
callq 0x5330
addq 0x28(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x11867
addq $0x10, %rbx
cmpl $0x0, 0x10(%rsp)
je 0x109fe
movq %rbx, %rdi
movl $0x10e, %esi            # imm = 0x10E
movl $0xd, %edx
movl $0xfa, %ecx
movl $0x1b, %r8d
movl $0x8, %r9d
callq 0x11b26
leaq 0x354d(%rip), %rsi      # 0x13af2
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x117df
leaq 0x148(%rsp), %rcx
movq %rbx, %rdi
movl $0x11d, %esi            # imm = 0x11D
movl $0x28, %edx
movl $0x1, %r8d
callq 0x11fa0
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x105f8
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
movl $0x10e, %esi            # imm = 0x10E
movl $0x3a, %edx
movl $0xfa, %ecx
movl $0x1b, %r8d
movl $0x8, %r9d
callq 0x11b26
leaq 0x34d8(%rip), %rsi      # 0x13afa
leaq 0x128(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x117df
leaq 0x128(%rsp), %rcx
movq %rbx, %rdi
movl $0x11d, %esi            # imm = 0x11D
movl $0x55, %edx
movl $0x1, %r8d
callq 0x11fa0
movq %rbx, %r14
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10678
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x52e0
xorl %ecx, %ecx
leal (,%rcx,4), %eax
leal (%rax,%rax,4), %edx
addl $0x73, %edx
movl %edx, 0x8(%rsp)
leal 0x64(%rax,%rax,4), %r15d
leal 0x65(%rax,%rax,4), %eax
movl %eax, 0xc(%rsp)
movl $0x128, %r12d           # imm = 0x128
movq %rcx, 0x20(%rsp)
leaq (%rcx,%rcx,2), %rax
movq %rax, 0x10(%rsp)
xorl %ebx, %ebx
movq 0x18(%r13), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movzbl (%rax,%rbx), %r13d
leal -0xb(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
xorl %r9d, %r9d
callq 0x11b26
cmpl $0x48, %r13d
jle 0x1070e
leal -0x49(%r13), %eax
cmpl $0xb, %eax
ja 0x10792
leaq 0x334e(%rip), %rcx      # 0x13a48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x9, %r9d
jmp 0x107c6
cmpl $0x2a, %r13d
je 0x10816
cmpl $0x3f, %r13d
jne 0x107de
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
movl $0x1, %r9d
callq 0x11b26
leaq 0xf8(%rsp), %r13
movq %r13, 0xe8(%rsp)
leaq 0xe8(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2add(%rip), %rsi      # 0x1323f
leaq 0x2ad7(%rip), %rdx      # 0x13240
callq 0x5fce
leal -0x2(%r12), %esi
movq %r14, %rdi
movl 0x8(%rsp), %edx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x11e40
movq 0xe8(%rsp), %rdi
jmp 0x10881
cmpl $0x5a, %r13d
jne 0x107de
movl $0x4, %r9d
jmp 0x107c6
movl $0x7, %r9d
jmp 0x107c6
movl $0x5, %r9d
jmp 0x107c6
movl $0xa, %r9d
jmp 0x107c6
movl $0x2, %r9d
jmp 0x107c6
movl $0x3, %r9d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
callq 0x11b26
movq %r14, %rdi
movl %r12d, %esi
movl 0xc(%rsp), %edx
movl $0x7, %ecx
movl $0x7, %r8d
xorl %r9d, %r9d
callq 0x11b26
incq %rbx
addl $0x14, %r12d
cmpq $0xb, %rbx
movq 0x18(%rsp), %r13
jne 0x106ae
jmp 0x1089d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
movl $0x9, %r9d
callq 0x11b26
leaq 0x118(%rsp), %r13
movq %r13, 0x108(%rsp)
leaq 0x108(%rsp), %rbp
movq %rbp, %rdi
leaq 0x33cc(%rip), %rsi      # 0x13c22
leaq 0x33c6(%rip), %rdx      # 0x13c23
callq 0x5fce
leal -0x2(%r12), %esi
movq %r14, %rdi
movl 0x8(%rsp), %edx
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x11e40
movq 0x108(%rsp), %rdi
movq %r13, %rax
cmpq %r13, %rdi
je 0x107de
movq (%rax), %rsi
incq %rsi
callq 0x52e0
jmp 0x107de
movq 0x20(%rsp), %rcx
incq %rcx
cmpq $0x12, %rcx
jne 0x1067a
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x3086(%rip), %rsi      # 0x13948
leaq 0x3084(%rip), %rdx      # 0x1394d
leaq 0xa8(%rsp), %rdi
callq 0x5fce
leaq 0xa8(%rsp), %rcx
movq %r14, %r12
movq %r14, %rdi
movl $0x11d, %esi            # imm = 0x11D
movl $0x1f4, %edx            # imm = 0x1F4
movl $0x1, %r8d
callq 0x11fa0
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x10916
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x52e0
movl 0x30(%r13), %ebx
movl $0x1fe, %ebp            # imm = 0x1FE
movb $0x1, %r15b
movl $0x14f, %r14d           # imm = 0x14F
movq %r12, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x8, %r9d
callq 0x11b26
addl $0x1e, %r14d
cmpl $0x1c7, %r14d           # imm = 0x1C7
jne 0x10928
movl $0x21c, %ebp            # imm = 0x21C
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x10922
cmpl $0x6, %ebx
ja 0x1118a
movl %ebx, %eax
leaq 0x3102(%rip), %rcx      # 0x13a78
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x9, %ebp
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
movl $0x1a9, %r15d           # imm = 0x1A9
movq %r12, %rdi
movl $0x18b, %esi            # imm = 0x18B
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
jmp 0x1116e
movq %rbx, %rdi
xorl %esi, %esi
movl $0xd, %edx
movl $0xfa, %ecx
movl $0x1b, %r8d
movl $0x8, %r9d
callq 0x11b26
leaq 0x30cd(%rip), %rsi      # 0x13af2
leaq 0x188(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x117df
leaq 0x188(%rsp), %rcx
movq %rbx, %rdi
movl $0xf, %esi
movl $0x28, %edx
movl $0x1, %r8d
callq 0x11fa0
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10a78
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
xorl %esi, %esi
movl $0x3a, %edx
movl $0xfa, %ecx
movl $0x1b, %r8d
movl $0x8, %r9d
callq 0x11b26
leaq 0x305b(%rip), %rsi      # 0x13afa
leaq 0x168(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x117df
leaq 0x168(%rsp), %rcx
movq %rbx, %rdi
movl $0xf, %esi
movl $0x55, %edx
movl $0x1, %r8d
callq 0x11fa0
movq %rbx, %r14
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10af5
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x52e0
xorl %ecx, %ecx
leal (,%rcx,4), %eax
leal (%rax,%rax,4), %edx
addl $0x73, %edx
movl %edx, 0x8(%rsp)
leal 0x64(%rax,%rax,4), %r15d
leal 0x65(%rax,%rax,4), %eax
movl %eax, 0xc(%rsp)
movl $0x1a, %r12d
movq %rcx, 0x20(%rsp)
leaq (%rcx,%rcx,2), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movzbl (%rax,%r13), %ebx
leal -0xb(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
xorl %r9d, %r9d
callq 0x11b26
cmpl $0x48, %ebx
jle 0x10b8f
leal -0x49(%rbx), %eax
cmpl $0xb, %eax
ja 0x10c0a
leaq 0x2f19(%rip), %rcx      # 0x13a94
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x9, %r9d
jmp 0x10c3d
cmpl $0x2a, %ebx
je 0x10c88
cmpl $0x3f, %ebx
jne 0x10c55
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
movl $0x1, %r9d
callq 0x11b26
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2667(%rip), %rsi      # 0x1323f
leaq 0x2661(%rip), %rdx      # 0x13240
callq 0x5fce
leal -0x2(%r12), %esi
movq %r14, %rdi
movl 0x8(%rsp), %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x11e40
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rcx
jmp 0x10cfb
cmpl $0x5a, %ebx
jne 0x10c55
movl $0x4, %r9d
jmp 0x10c3d
movl $0x7, %r9d
jmp 0x10c3d
movl $0x5, %r9d
jmp 0x10c3d
movl $0xa, %r9d
jmp 0x10c3d
movl $0x2, %r9d
jmp 0x10c3d
movl $0x3, %r9d
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
callq 0x11b26
movq %r14, %rdi
movl %r12d, %esi
movl 0xc(%rsp), %edx
movl $0x7, %ecx
movl $0x7, %r8d
xorl %r9d, %r9d
callq 0x11b26
incq %r13
addl $0x14, %r12d
cmpq $0xb, %r13
jne 0x10b2c
jmp 0x10d17
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movl $0x14, %ecx
movl $0x14, %r8d
movl $0x9, %r9d
callq 0x11b26
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2f5a(%rip), %rsi      # 0x13c22
leaq 0x2f54(%rip), %rdx      # 0x13c23
callq 0x5fce
leal -0x2(%r12), %esi
movq %r14, %rdi
movl 0x8(%rsp), %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x11e40
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0x10c55
movq (%rax), %rsi
incq %rsi
callq 0x52e0
jmp 0x10c55
movq 0x20(%rsp), %rcx
incq %rcx
cmpq $0x12, %rcx
jne 0x10af7
leaq 0xd8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c0c(%rip), %rsi      # 0x13948
leaq 0x2c0a(%rip), %rdx      # 0x1394d
leaq 0xc8(%rsp), %rdi
callq 0x5fce
leaq 0xc8(%rsp), %rcx
movq %r14, %r12
movq %r14, %rdi
movl $0xf, %esi
movl $0x1f4, %edx            # imm = 0x1F4
movl $0x1, %r8d
callq 0x11fa0
movq 0x18(%rsp), %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x10d95
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x52e0
movl 0x30(%rbx), %ebx
movl $0x1fe, %ebp            # imm = 0x1FE
movb $0x1, %r15b
movl $0x41, %r14d
movq %r12, %rdi
movl %r14d, %esi
movl %ebp, %edx
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x8, %r9d
callq 0x11b26
addl $0x1e, %r14d
cmpl $0xb9, %r14d
jne 0x10da6
movl $0x21c, %ebp            # imm = 0x21C
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x10da0
cmpl $0x6, %ebx
ja 0x11526
movl %ebx, %eax
leaq 0x2cd0(%rip), %rcx      # 0x13ac4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r12, %rdi
movl $0x41, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x9, %ebp
movq %r12, %rdi
movl $0x5f, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
movl $0x9b, %r15d
movq %r12, %rdi
movl $0x7d, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x9, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
movl $0x1fe, %r14d           # imm = 0x1FE
movl $0x7, %ebp
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
movl $0x18b, %r15d           # imm = 0x18B
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
jmp 0x1116e
movq %r12, %rdi
movl $0x18b, %esi            # imm = 0x18B
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x5, %ebp
movq %r12, %rdi
movl $0x18b, %esi            # imm = 0x18B
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
movl $0x16d, %r15d           # imm = 0x16D
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
jmp 0x1116e
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
movl $0x16d, %r15d           # imm = 0x16D
movl $0xa, %ebp
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
jmp 0x1116e
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x2, %ebp
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
movl $0x18b, %r15d           # imm = 0x18B
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
jmp 0x1116e
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
movl $0x4, %ebp
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x18b, %r15d           # imm = 0x18B
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
jmp 0x1116e
movq %r12, %rdi
movl $0x14f, %esi            # imm = 0x14F
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movl $0x16d, %r15d           # imm = 0x16D
movl $0x3, %ebp
movq %r12, %rdi
movl $0x16d, %esi            # imm = 0x16D
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movq %r12, %rdi
movl $0x18b, %esi            # imm = 0x18B
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl $0x1e, %ecx
movl $0x1e, %r8d
movl %ebp, %r9d
callq 0x11b26
movl $0x64, %r14d
movq %r12, %rdi
movl $0x11d, %esi            # imm = 0x11D
movl %r14d, %edx
movl $0x1f9, %ecx            # imm = 0x1F9
movl %r14d, %r8d
callq 0x11cfc
leal -0x1(%r14), %edx
movq %r12, %rdi
movl $0x11d, %esi            # imm = 0x11D
movl $0x1f9, %ecx            # imm = 0x1F9
movl %edx, %r8d
callq 0x11cfc
addl $0x14, %r14d
cmpl $0x1e0, %r14d           # imm = 0x1E0
jne 0x11190
movl $0x11c, %r14d           # imm = 0x11C
leal 0x1(%r14), %ecx
movq %r12, %rdi
movl %ecx, %esi
movl $0x64, %edx
movl $0x1cc, %r8d            # imm = 0x1CC
callq 0x11cfc
movq %r12, %rdi
movl %r14d, %esi
movl $0x64, %edx
movl %r14d, %ecx
movl $0x1cc, %r8d            # imm = 0x1CC
callq 0x11cfc
addl $0x14, %r14d
cmpl $0x20c, %r14d           # imm = 0x20C
jne 0x111d4
jmp 0x115af
movq %r12, %rdi
movl $0x41, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
movl $0x1fe, %r14d           # imm = 0x1FE
movl $0x7, %ebp
movq %r12, %rdi
movl $0x5f, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
movl $0x7d, %r15d
movq %r12, %rdi
movl $0x5f, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x7, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x7d, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x5, %ebp
movq %r12, %rdi
movl $0x7d, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
movl $0x5f, %r15d
movq %r12, %rdi
movl $0x41, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x5, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x41, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
movl $0x5f, %r15d
movl $0xa, %ebp
movq %r12, %rdi
movl $0x5f, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movq %r12, %rdi
movl $0x41, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0xa, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x41, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x2, %ebp
movq %r12, %rdi
movl $0x41, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
movl $0x7d, %r15d
movq %r12, %rdi
movl $0x5f, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x2, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x41, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
movl $0x4, %ebp
movq %r12, %rdi
movl $0x5f, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movl $0x7d, %r15d
movq %r12, %rdi
movl $0x5f, %esi
movl $0x21c, %edx            # imm = 0x21C
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x4, %r9d
callq 0x11b26
jmp 0x1150a
movq %r12, %rdi
movl $0x41, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movl $0x5f, %r15d
movl $0x3, %ebp
movq %r12, %rdi
movl $0x5f, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movl $0x21c, %r14d           # imm = 0x21C
movq %r12, %rdi
movl $0x7d, %esi
movl $0x1fe, %edx            # imm = 0x1FE
movl $0x1e, %ecx
movl $0x1e, %r8d
movl $0x3, %r9d
callq 0x11b26
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl $0x1e, %ecx
movl $0x1e, %r8d
movl %ebp, %r9d
callq 0x11b26
movl $0x64, %r14d
movq %r12, %rdi
movl $0xf, %esi
movl %r14d, %edx
movl $0xeb, %ecx
movl %r14d, %r8d
callq 0x11cfc
leal -0x1(%r14), %edx
movq %r12, %rdi
movl $0xf, %esi
movl $0xeb, %ecx
movl %edx, %r8d
callq 0x11cfc
addl $0x14, %r14d
cmpl $0x1e0, %r14d           # imm = 0x1E0
jne 0x1152c
movl $0xf, %r14d
movq %r12, %rdi
movl %r14d, %esi
movl $0x64, %edx
movl %r14d, %ecx
movl $0x1cc, %r8d            # imm = 0x1CC
callq 0x11cfc
leal -0x1(%r14), %ecx
movq %r12, %rdi
movl %ecx, %esi
movl $0x64, %edx
movl $0x1cc, %r8d            # imm = 0x1CC
callq 0x11cfc
addl $0x14, %r14d
cmpl $0xff, %r14d
jne 0x11570
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x115cb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x52e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x115e7
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x52e0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5530
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1178b
movq 0xd8(%rsp), %rsi
jmp 0x11778
jmp 0x11788
movq %rax, %rbx
leaq 0x178(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1178b
movq 0x178(%rsp), %rsi
jmp 0x11778
movq %rax, %rbx
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1178b
movq 0x198(%rsp), %rsi
jmp 0x11778
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1178b
movq 0xb8(%rsp), %rsi
jmp 0x11778
jmp 0x11788
movq %rax, %rbx
leaq 0x138(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1178b
movq 0x138(%rsp), %rsi
jmp 0x11778
movq %rax, %rbx
leaq 0x158(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1178b
movq 0x158(%rsp), %rsi
jmp 0x11778
movq %rax, %rbx
jmp 0x117a7
jmp 0x11788
jmp 0x11788
jmp 0x11788
jmp 0x11788
jmp 0x11788
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x1178b
movq 0x98(%rsp), %rsi
jmp 0x11778
jmp 0x11788
jmp 0x11788
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x1178b
movq 0x78(%rsp), %rsi
jmp 0x11778
jmp 0x11788
jmp 0x11788
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r13, %rdi
je 0x1178b
movq 0x118(%rsp), %rsi
jmp 0x11778
jmp 0x11788
jmp 0x11788
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1178b
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x52e0
jmp 0x1178b
jmp 0x11788
jmp 0x11788
jmp 0x11788
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x117a7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x52e0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x117c3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x54e0
nop