// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: cta_vesa_vdddb(unsigned char const*, unsigned int)
static void cta_vesa_vdddb(const unsigned char *x, unsigned length)
{
	if (length != 30) {
		fail("Invalid length %u.\n", length);
		return;
	}

	printf("    Interface Type: ");
	unsigned char v = x[0];
	switch (v >> 4) {
	case 0: printf("Analog (");
		switch (v & 0xf) {
		case 0: printf("15HD/VGA"); break;
		case 1: printf("VESA NAVI-V (15HD)"); break;
		case 2: printf("VESA NAVI-D"); break;
		default: printf("Reserved"); break;
		}
		printf(")\n");
		break;
	case 1: printf("LVDS %u lanes", v & 0xf); break;
	case 2: printf("RSDS %u lanes", v & 0xf); break;
	case 3: printf("DVI-D %u channels", v & 0xf); break;
	case 4: printf("DVI-I analog"); break;
	case 5: printf("DVI-I digital %u channels", v & 0xf); break;
	case 6: printf("HDMI-A"); break;
	case 7: printf("HDMI-B"); break;
	case 8: printf("MDDI %u channels", v & 0xf); break;
	case 9: printf("DisplayPort %u channels", v & 0xf); break;
	case 10: printf("IEEE-1394"); break;
	case 11: printf("M1 analog"); break;
	case 12: printf("M1 digital %u channels", v & 0xf); break;
	default: printf("Reserved"); break;
	}
	printf("\n");

	printf("    Interface Standard Version: %u.%u\n", x[1] >> 4, x[1] & 0xf);
	printf("    Content Protection Support: ");
	switch (x[2]) {
	case 0: printf("None\n"); break;
	case 1: printf("HDCP\n"); break;
	case 2: printf("DTCP\n"); break;
	case 3: printf("DPCP\n"); break;
	default: printf("Reserved\n"); break;
	}

	printf("    Minimum Clock Frequency: %u MHz\n", x[3] >> 2);
	printf("    Maximum Clock Frequency: %u MHz\n", ((x[3] & 0x03) << 8) | x[4]);
	printf("    Device Native Pixel Format: %ux%u\n",
	       x[5] | (x[6] << 8), x[7] | (x[8] << 8));
	printf("    Aspect Ratio: %.2f\n", (100 + x[9]) / 100.0);
	v = x[0x0a];
	printf("    Default Orientation: ");
	switch ((v & 0xc0) >> 6) {
	case 0x00: printf("Landscape\n"); break;
	case 0x01: printf("Portrait\n"); break;
	case 0x02: printf("Not Fixed\n"); break;
	case 0x03: printf("Undefined\n"); break;
	}
	printf("    Rotation Capability: ");
	switch ((v & 0x30) >> 4) {
	case 0x00: printf("None\n"); break;
	case 0x01: printf("Can rotate 90 degrees clockwise\n"); break;
	case 0x02: printf("Can rotate 90 degrees counterclockwise\n"); break;
	case 0x03: printf("Can rotate 90 degrees in either direction)\n"); break;
	}
	printf("    Zero Pixel Location: ");
	switch ((v & 0x0c) >> 2) {
	case 0x00: printf("Upper Left\n"); break;
	case 0x01: printf("Upper Right\n"); break;
	case 0x02: printf("Lower Left\n"); break;
	case 0x03: printf("Lower Right\n"); break;
	}
	printf("    Scan Direction: ");
	switch (v & 0x03) {
	case 0x00: printf("Not defined\n"); break;
	case 0x01: printf("Fast Scan is on the Major (Long) Axis and Slow Scan is on the Minor Axis\n"); break;
	case 0x02: printf("Fast Scan is on the Minor (Short) Axis and Slow Scan is on the Major Axis\n"); break;
	case 0x03: printf("Reserved\n");
		   fail("Scan Direction used the reserved value 0x03.\n");
		   break;
	}
	printf("    Subpixel Information: ");
	switch (x[0x0b]) {
	case 0x00: printf("Not defined\n"); break;
	case 0x01: printf("RGB vertical stripes\n"); break;
	case 0x02: printf("RGB horizontal stripes\n"); break;
	case 0x03: printf("Vertical stripes using primary order\n"); break;
	case 0x04: printf("Horizontal stripes using primary order\n"); break;
	case 0x05: printf("Quad sub-pixels, red at top left\n"); break;
	case 0x06: printf("Quad sub-pixels, red at bottom left\n"); break;
	case 0x07: printf("Delta (triad) RGB sub-pixels\n"); break;
	case 0x08: printf("Mosaic\n"); break;
	case 0x09: printf("Quad sub-pixels, RGB + 1 additional color\n"); break;
	case 0x0a: printf("Five sub-pixels, RGB + 2 additional colors\n"); break;
	case 0x0b: printf("Six sub-pixels, RGB + 3 additional colors\n"); break;
	case 0x0c: printf("Clairvoyante, Inc. PenTile Matrix (tm) layout\n"); break;
	default: printf("Reserved\n"); break;
	}
	printf("    Horizontal and vertical dot/pixel pitch: %.2f x %.2f mm\n",
	       (double)(x[0x0c]) / 100.0, (double)(x[0x0d]) / 100.0);
	v = x[0x0e];
	printf("    Dithering: ");
	switch (v >> 6) {
	case 0: printf("None\n"); break;
	case 1: printf("Spatial\n"); break;
	case 2: printf("Temporal\n"); break;
	case 3: printf("Spatial and Temporal\n"); break;
	}
	printf("    Direct Drive: %s\n", (v & 0x20) ? "Yes" : "No");
	printf("    Overdrive %srecommended\n", (v & 0x10) ? "not " : "");
	printf("    Deinterlacing: %s\n", (v & 0x08) ? "Yes" : "No");

	v = x[0x0f];
	printf("    Audio Support: %s\n", (v & 0x80) ? "Yes" : "No");
	printf("    Separate Audio Inputs Provided: %s\n", (v & 0x40) ? "Yes" : "No");
	printf("    Audio Input Override: %s\n", (v & 0x20) ? "Yes" : "No");
	v = x[0x10];
	if (v)
		printf("    Audio Delay: %s%u ms\n", (v & 0x80) ? "" : "-", (v & 0x7f) * 2);
	else
		printf("    Audio Delay: no information provided\n");
	v = x[0x11];
	printf("    Frame Rate/Mode Conversion: ");
	switch (v >> 6) {
	case 0: printf("None\n"); break;
	case 1: printf("Single Buffering\n"); break;
	case 2: printf("Double Buffering\n"); break;
	case 3: printf("Advanced Frame Rate Conversion\n"); break;
	}
	if (v & 0x3f)
		printf("    Frame Rate Range: %u fps +/- %u fps\n",
		       x[0x12], v & 0x3f);
	else
		printf("    Nominal Frame Rate: %u fps\n", x[0x12]);
	printf("    Color Bit Depth: %u @ interface, %u @ display\n",
	       (x[0x13] >> 4) + 1, (x[0x13] & 0xf) + 1);
	v = x[0x15] & 3;
	if (v) {
		printf("    Additional Primary Chromaticities:\n");
		unsigned col_x = (x[0x16] << 2) | (x[0x14] >> 6);
		unsigned col_y = (x[0x17] << 2) | ((x[0x14] >> 4) & 3);
		printf("      Primary 4:   0.%04u, 0.%04u\n",
		       (col_x * 10000) / 1024, (col_y * 10000) / 1024);
		if (v > 1) {
			col_x = (x[0x18] << 2) | ((x[0x14] >> 2) & 3);
			col_y = (x[0x19] << 2) | (x[0x14] & 3);
			printf("      Primary 5:   0.%04u, 0.%04u\n",
			       (col_x * 10000) / 1024, (col_y * 10000) / 1024);
			if (v > 2) {
				col_x = (x[0x1a] << 2) | (x[0x15] >> 6);
				col_y = (x[0x1b] << 2) | ((x[0x15] >> 4) & 3);
				printf("      Primary 6:   0.%04u, 0.%04u\n",
				       (col_x * 10000) / 1024, (col_y * 10000) / 1024);
			}
		}
	}

	v = x[0x1c];
	printf("    Response Time %s: %u ms\n",
	       (v & 0x80) ? "White -> Black" : "Black -> White", v & 0x7f);
	v = x[0x1d];
	printf("    Overscan: %u%% x %u%%\n", v >> 4, v & 0xf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x1e, -0xc(%rbp)
je 0x1a690
movl -0xc(%rbp), %edx
xorl %edi, %edi
leaq 0x21491(%rip), %rsi     # 0x3bb15
movb $0x0, %al
callq 0x47d0
jmp 0x1b15d
leaq 0x21492(%rip), %rdi     # 0x3bb29
xorl %eax, %eax
callq 0x4050
movq -0x8(%rbp), %rax
movb (%rax), %al
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
shrl $0x4, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xc, %eax
ja 0x1a855
movq -0x20(%rbp), %rax
leaq 0x1b7f4(%rip), %rcx     # 0x35ebc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x21466(%rip), %rdi     # 0x3bb3e
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x24(%rbp)
je 0x1a701
jmp 0x1a6ed
movl -0x24(%rbp), %eax
subl $0x1, %eax
je 0x1a711
jmp 0x1a6f7
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0x1a721
jmp 0x1a731
leaq 0x2143f(%rip), %rdi     # 0x3bb47
movb $0x0, %al
callq 0x4050
jmp 0x1a73f
leaq 0x21438(%rip), %rdi     # 0x3bb50
movb $0x0, %al
callq 0x4050
jmp 0x1a73f
leaq 0x2143b(%rip), %rdi     # 0x3bb63
movb $0x0, %al
callq 0x4050
jmp 0x1a73f
leaq 0x21437(%rip), %rdi     # 0x3bb6f
movb $0x0, %al
callq 0x4050
leaq 0x22c08(%rip), %rdi     # 0x3d34e
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x21418(%rip), %rdi     # 0x3bb78
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x2140c(%rip), %rdi     # 0x3bb86
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x21400(%rip), %rdi     # 0x3bb94
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x213ff(%rip), %rdi     # 0x3bba6
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x213f2(%rip), %rdi     # 0x3bbb3
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x213f9(%rip), %rdi     # 0x3bbcd
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x213ed(%rip), %rdi     # 0x3bbd4
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x213dd(%rip), %rdi     # 0x3bbdb
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x213d7(%rip), %rdi     # 0x3bbec
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x213df(%rip), %rdi     # 0x3bc04
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x213d9(%rip), %rdi     # 0x3bc0e
movb $0x0, %al
callq 0x4050
jmp 0x1a863
movzbl -0xd(%rbp), %esi
andl $0xf, %esi
leaq 0x213cc(%rip), %rdi     # 0x3bc18
movb $0x0, %al
callq 0x4050
jmp 0x1a863
leaq 0x21313(%rip), %rdi     # 0x3bb6f
movb $0x0, %al
callq 0x4050
leaq 0x1509f(%rip), %rdi     # 0x2f909
xorl %eax, %eax
movb %al, -0x31(%rbp)
callq 0x4050
movb -0x31(%rbp), %al
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x213a1(%rip), %rdi     # 0x3bc2f
callq 0x4050
movb -0x31(%rbp), %al
leaq 0x213b9(%rip), %rdi     # 0x3bc56
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
movq %rax, -0x30(%rbp)
subq $0x3, %rax
ja 0x1a908
movq -0x30(%rbp), %rax
leaq 0x1b631(%rip), %rcx     # 0x35ef0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x27c1b(%rip), %rdi     # 0x424ea
movb $0x0, %al
callq 0x4050
jmp 0x1a916
leaq 0x21398(%rip), %rdi     # 0x3bc77
movb $0x0, %al
callq 0x4050
jmp 0x1a916
leaq 0x2138e(%rip), %rdi     # 0x3bc7d
movb $0x0, %al
callq 0x4050
jmp 0x1a916
leaq 0x21384(%rip), %rdi     # 0x3bc83
movb $0x0, %al
callq 0x4050
jmp 0x1a916
leaq 0x24d15(%rip), %rdi     # 0x3f624
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %esi
shrl $0x2, %esi
leaq 0x21361(%rip), %rdi     # 0x3bc89
xorl %eax, %eax
movb %al, -0x41(%rbp)
callq 0x4050
movb -0x41(%rbp), %al
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %esi
andl $0x3, %esi
shll $0x8, %esi
movzbl 0x4(%rcx), %ecx
orl %ecx, %esi
leaq 0x2135e(%rip), %rdi     # 0x3bcae
callq 0x4050
movb -0x41(%rbp), %al
movq -0x8(%rbp), %rcx
movzwl 0x5(%rcx), %esi
movzwl 0x7(%rcx), %edx
leaq 0x21368(%rip), %rdi     # 0x3bcd3
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x9(%rax), %eax
addl $0x64, %eax
cvtsi2sd %eax, %xmm0
movsd 0x146b1(%rip), %xmm1    # 0x2f038
divsd %xmm1, %xmm0
leaq 0x24368(%rip), %rdi     # 0x3ecfa
movb $0x1, %al
callq 0x4050
movb -0x41(%rbp), %al
movq -0x8(%rbp), %rcx
movb 0xa(%rcx), %cl
movb %cl, -0xd(%rbp)
leaq 0x24367(%rip), %rdi     # 0x3ed14
callq 0x4050
movzbl -0xd(%rbp), %eax
shrl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0x3, %eax
ja 0x1aa16
movq -0x40(%rbp), %rax
leaq 0x1b531(%rip), %rcx     # 0x35f00
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2131b(%rip), %rdi     # 0x3bcfa
movb $0x0, %al
callq 0x4050
jmp 0x1aa16
leaq 0x21316(%rip), %rdi     # 0x3bd05
movb $0x0, %al
callq 0x4050
jmp 0x1aa16
leaq 0x21310(%rip), %rdi     # 0x3bd0f
movb $0x0, %al
callq 0x4050
jmp 0x1aa16
leaq 0x2130b(%rip), %rdi     # 0x3bd1a
movb $0x0, %al
callq 0x4050
leaq 0x24313(%rip), %rdi     # 0x3ed30
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
andl $0x30, %eax
shrl $0x4, %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x3, %eax
ja 0x1aa8b
movq -0x50(%rbp), %rax
leaq 0x1b4cc(%rip), %rcx     # 0x35f10
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x27a96(%rip), %rdi     # 0x424ea
movb $0x0, %al
callq 0x4050
jmp 0x1aa8b
leaq 0x212c1(%rip), %rdi     # 0x3bd25
movb $0x0, %al
callq 0x4050
jmp 0x1aa8b
leaq 0x212d2(%rip), %rdi     # 0x3bd46
movb $0x0, %al
callq 0x4050
jmp 0x1aa8b
leaq 0x212ea(%rip), %rdi     # 0x3bd6e
movb $0x0, %al
callq 0x4050
leaq 0x242ba(%rip), %rdi     # 0x3ed4c
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
andl $0xc, %eax
shrl $0x2, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x3, %eax
ja 0x1ab00
movq -0x58(%rbp), %rax
leaq 0x1b467(%rip), %rcx     # 0x35f20
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x212d1(%rip), %rdi     # 0x3bd9a
movb $0x0, %al
callq 0x4050
jmp 0x1ab00
leaq 0x212cd(%rip), %rdi     # 0x3bda6
movb $0x0, %al
callq 0x4050
jmp 0x1ab00
leaq 0x212ca(%rip), %rdi     # 0x3bdb3
movb $0x0, %al
callq 0x4050
jmp 0x1ab00
leaq 0x212c6(%rip), %rdi     # 0x3bdbf
movb $0x0, %al
callq 0x4050
leaq 0x24261(%rip), %rdi     # 0x3ed68
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
andl $0x3, %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
subl $0x3, %eax
ja 0x1ab82
movq -0x60(%rbp), %rax
leaq 0x1b405(%rip), %rcx     # 0x35f30
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x21291(%rip), %rdi     # 0x3bdcc
movb $0x0, %al
callq 0x4050
jmp 0x1ab82
leaq 0x2128e(%rip), %rdi     # 0x3bdd9
movb $0x0, %al
callq 0x4050
jmp 0x1ab82
leaq 0x212c8(%rip), %rdi     # 0x3be23
movb $0x0, %al
callq 0x4050
jmp 0x1ab82
leaq 0x24ab9(%rip), %rdi     # 0x3f624
movb $0x0, %al
callq 0x4050
xorl %edi, %edi
leaq 0x212f3(%rip), %rsi     # 0x3be6e
movb $0x0, %al
callq 0x47d0
leaq 0x21313(%rip), %rdi     # 0x3be9c
xorl %eax, %eax
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0xb(%rax), %eax
movq %rax, -0x68(%rbp)
subq $0xc, %rax
ja 0x1ac99
movq -0x68(%rbp), %rax
leaq 0x1b38f(%rip), %rcx     # 0x35f40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2120b(%rip), %rdi     # 0x3bdcc
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x212e3(%rip), %rdi     # 0x3beb7
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x212e6(%rip), %rdi     # 0x3becd
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x212eb(%rip), %rdi     # 0x3bee5
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x212fe(%rip), %rdi     # 0x3bf0b
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21313(%rip), %rdi     # 0x3bf33
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21325(%rip), %rdi     # 0x3bf55
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x2133a(%rip), %rdi     # 0x3bf7a
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21348(%rip), %rdi     # 0x3bf98
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21340(%rip), %rdi     # 0x3bfa0
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x2135b(%rip), %rdi     # 0x3bfcb
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21377(%rip), %rdi     # 0x3bff7
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x21392(%rip), %rdi     # 0x3c022
movb $0x0, %al
callq 0x4050
jmp 0x1aca7
leaq 0x24984(%rip), %rdi     # 0x3f624
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0xc(%rax), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x1437d(%rip), %xmm2    # 0x2f038
divsd %xmm2, %xmm0
movzbl 0xd(%rax), %eax
cvtsi2sd %eax, %xmm1
divsd %xmm2, %xmm1
leaq 0x2137f(%rip), %rdi     # 0x3c051
movb $0x2, %al
callq 0x4050
movq -0x8(%rbp), %rax
movb 0xe(%rax), %al
movb %al, -0xd(%rbp)
leaq 0x213a4(%rip), %rdi     # 0x3c08e
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
shrl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x70(%rbp)
subl $0x3, %eax
ja 0x1ad55
movq -0x70(%rbp), %rax
leaq 0x1b266(%rip), %rcx     # 0x35f74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x277cc(%rip), %rdi     # 0x424ea
movb $0x0, %al
callq 0x4050
jmp 0x1ad55
leaq 0x21370(%rip), %rdi     # 0x3c09e
movb $0x0, %al
callq 0x4050
jmp 0x1ad55
leaq 0x21375(%rip), %rdi     # 0x3c0b3
movb $0x0, %al
callq 0x4050
jmp 0x1ad55
leaq 0x21359(%rip), %rdi     # 0x3c0a7
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %ecx
andl $0x20, %ecx
leaq 0x21374(%rip), %rsi     # 0x3c0d7
leaq 0x21369(%rip), %rax     # 0x3c0d3
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x21345(%rip), %rdi     # 0x3c0bd
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %ecx
andl $0x10, %ecx
leaq 0x1512c(%rip), %rsi     # 0x2feb9
leaq 0x268b0(%rip), %rax     # 0x41644
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x21338(%rip), %rdi     # 0x3c0da
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %ecx
andl $0x8, %ecx
leaq 0x21320(%rip), %rsi     # 0x3c0d7
leaq 0x21315(%rip), %rax     # 0x3c0d3
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x2132b(%rip), %rdi     # 0x3c0f7
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movb 0xf(%rax), %al
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %ecx
andl $0x80, %ecx
leaq 0x212e9(%rip), %rsi     # 0x3c0d7
leaq 0x212de(%rip), %rax     # 0x3c0d3
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x2130b(%rip), %rdi     # 0x3c10e
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %ecx
andl $0x40, %ecx
leaq 0x212bf(%rip), %rsi     # 0x3c0d7
leaq 0x212b4(%rip), %rax     # 0x3c0d3
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x212f8(%rip), %rdi     # 0x3c125
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %ecx
andl $0x20, %ecx
leaq 0x21295(%rip), %rsi     # 0x3c0d7
leaq 0x2128a(%rip), %rax     # 0x3c0d3
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq 0x212f6(%rip), %rdi     # 0x3c14d
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movb 0x10(%rax), %al
movb %al, -0xd(%rbp)
cmpb $0x0, -0xd(%rbp)
je 0x1aea6
movzbl -0xd(%rbp), %ecx
andl $0x80, %ecx
leaq 0x19310(%rip), %rsi     # 0x3418f
leaq 0x15033(%rip), %rax     # 0x2feb9
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movzbl -0xd(%rbp), %edx
andl $0x7f, %edx
shll %edx
leaq 0x212ce(%rip), %rdi     # 0x3c16b
movb $0x0, %al
callq 0x4050
jmp 0x1aeb4
leaq 0x212d8(%rip), %rdi     # 0x3c185
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movb 0x11(%rax), %al
movb %al, -0xd(%rbp)
leaq 0x212ea(%rip), %rdi     # 0x3c1af
xorl %eax, %eax
callq 0x4050
movzbl -0xd(%rbp), %eax
shrl $0x6, %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x3, %eax
ja 0x1af30
movq -0x78(%rbp), %rax
leaq 0x1b09b(%rip), %rcx     # 0x35f84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x275f1(%rip), %rdi     # 0x424ea
movb $0x0, %al
callq 0x4050
jmp 0x1af30
leaq 0x212c7(%rip), %rdi     # 0x3c1d0
movb $0x0, %al
callq 0x4050
jmp 0x1af30
leaq 0x212c9(%rip), %rdi     # 0x3c1e2
movb $0x0, %al
callq 0x4050
jmp 0x1af30
leaq 0x212cb(%rip), %rdi     # 0x3c1f4
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %eax
andl $0x3f, %eax
cmpl $0x0, %eax
je 0x1af5b
movq -0x8(%rbp), %rax
movzbl 0x12(%rax), %esi
movzbl -0xd(%rbp), %edx
andl $0x3f, %edx
leaq 0x212c2(%rip), %rdi     # 0x3c214
movb $0x0, %al
callq 0x4050
jmp 0x1af71
movq -0x8(%rbp), %rax
movzbl 0x12(%rax), %esi
leaq 0x212d3(%rip), %rdi     # 0x3c23d
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x13(%rax), %esi
sarl $0x4, %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movzbl 0x13(%rax), %edx
andl $0xf, %edx
addl $0x1, %edx
leaq 0x212c9(%rip), %rdi     # 0x3c25d
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x15(%rax), %eax
andl $0x3, %eax
movb %al, -0xd(%rbp)
cmpb $0x0, -0xd(%rbp)
je 0x1b0ec
leaq 0x212d6(%rip), %rdi     # 0x3c290
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movzbl 0x16(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
sarl $0x6, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x17(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
sarl $0x4, %ecx
andl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
imull $0x2710, -0x14(%rbp), %esi # imm = 0x2710
shrl $0xa, %esi
imull $0x2710, -0x18(%rbp), %edx # imm = 0x2710
shrl $0xa, %edx
leaq 0x212a3(%rip), %rdi     # 0x3c2b8
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %eax
cmpl $0x1, %eax
jle 0x1b0ea
movq -0x8(%rbp), %rax
movzbl 0x18(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
sarl $0x2, %ecx
andl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x19(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
andl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
imull $0x2710, -0x14(%rbp), %esi # imm = 0x2710
shrl $0xa, %esi
imull $0x2710, -0x18(%rbp), %edx # imm = 0x2710
shrl $0xa, %edx
leaq 0x2125e(%rip), %rdi     # 0x3c2db
movb $0x0, %al
callq 0x4050
movzbl -0xd(%rbp), %eax
cmpl $0x2, %eax
jle 0x1b0e8
movq -0x8(%rbp), %rax
movzbl 0x1a(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x15(%rcx), %ecx
sarl $0x6, %ecx
orl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x1b(%rax), %eax
shll $0x2, %eax
movq -0x8(%rbp), %rcx
movzbl 0x15(%rcx), %ecx
sarl $0x4, %ecx
andl $0x3, %ecx
orl %ecx, %eax
movl %eax, -0x18(%rbp)
imull $0x2710, -0x14(%rbp), %esi # imm = 0x2710
shrl $0xa, %esi
imull $0x2710, -0x18(%rbp), %edx # imm = 0x2710
shrl $0xa, %edx
leaq 0x2121d(%rip), %rdi     # 0x3c2fe
movb $0x0, %al
callq 0x4050
jmp 0x1b0ea
jmp 0x1b0ec
movq -0x8(%rbp), %rax
movb 0x1c(%rax), %al
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1b111
leaq 0x21233(%rip), %rax     # 0x3c33e
movq %rax, -0x80(%rbp)
jmp 0x1b11e
leaq 0x21235(%rip), %rax     # 0x3c34d
movq %rax, -0x80(%rbp)
jmp 0x1b11e
movq -0x80(%rbp), %rsi
movzbl -0xd(%rbp), %edx
andl $0x7f, %edx
leaq 0x211f1(%rip), %rdi     # 0x3c321
movb $0x0, %al
callq 0x4050
movq -0x8(%rbp), %rax
movb 0x1d(%rax), %al
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %esi
sarl $0x4, %esi
movzbl -0xd(%rbp), %edx
andl $0xf, %edx
leaq 0x21206(%rip), %rdi     # 0x3c35c
movb $0x0, %al
callq 0x4050
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)