// File: /workspace/github_cpp_makefile_star2_O1/rpavlik[P]edid-decode/parse-base-block.cpp
// Function: edid_state::detailed_block(unsigned char const*)
void edid_state::detailed_block(const unsigned char *x)
{
	static const unsigned char zero_descr[18] = { 0 };
	unsigned cnt;
	unsigned i;

	base.detailed_block_cnt++;
	if (x[0] || x[1]) {
		detailed_timings("    ", x);
		if (base.seen_non_detailed_descriptor)
			fail("Invalid detailed timing descriptor ordering.\n");
		return;
	}

	data_block = "Display Descriptor #" + std::to_string(base.detailed_block_cnt);
	/* Monitor descriptor block, not detailed timing descriptor. */
	if (x[2] != 0) {
		/* 1.3, 3.10.3 */
		fail("Monitor descriptor block has byte 2 nonzero (0x%02x).\n", x[2]);
	}
	if ((base.edid_minor < 4 || x[3] != 0xfd) && x[4] != 0x00) {
		/* 1.3, 3.10.3 */
		fail("Monitor descriptor block has byte 4 nonzero (0x%02x).\n", x[4]);
	}

	base.seen_non_detailed_descriptor = true;
	if (base.edid_minor == 0)
		fail("Has descriptor blocks other than detailed timings.\n");

	if (!memcmp(x, zero_descr, sizeof(zero_descr))) {
		data_block = "Empty Descriptor";
		printf("    %s\n", data_block.c_str());
		fail("Use Dummy Descriptor instead of all zeroes.\n");
		return;
	}

	switch (x[3]) {
	case 0x0e:
		detailed_epi(x);
		return;
	case 0x10:
		data_block = "Dummy Descriptor";
		printf("    %s:\n", data_block.c_str());
		for (i = 5; i < 18; i++) {
			if (x[i]) {
				fail("Dummy block filled with garbage.\n");
				break;
			}
		}
		return;
	case 0xf7:
		data_block = "Established timings III";
		printf("    %s:\n", data_block.c_str());
		for (i = 0; i < ARRAY_SIZE(established_timings3_dmt_ids); i++)
			if (x[6 + i / 8] & (1 << (7 - i % 8))) {
				unsigned char dmt_id = established_timings3_dmt_ids[i];
				char type[16];

				sprintf(type, "DMT 0x%02x", dmt_id);
				print_timings("      ", find_dmt_id(dmt_id), type);
			}
		return;
	case 0xf8:
		data_block = "CVT 3 Byte Timing Codes";
		printf("    %s:\n", data_block.c_str());
		if (x[5] != 0x01) {
			fail("Invalid version number %u.\n", x[5]);
			return;
		}
		for (i = 0; i < 4; i++)
			detailed_cvt_descriptor("      ", x + 6 + (i * 3), !i);
		return;
	case 0xf9:
		data_block = "Display Color Management Data";
		printf("    %s:\n", data_block.c_str());
		printf("      Version : %d\n", x[5]);
		printf("      Red a3  : %.2f\n", (short)(x[6] | (x[7] << 8)) / 100.0);
		printf("      Red a2  : %.2f\n", (short)(x[8] | (x[9] << 8)) / 100.0);
		printf("      Green a3: %.2f\n", (short)(x[10] | (x[11] << 8)) / 100.0);
		printf("      Green a2: %.2f\n", (short)(x[12] | (x[13] << 8)) / 100.0);
		printf("      Blue a3 : %.2f\n", (short)(x[14] | (x[15] << 8)) / 100.0);
		printf("      Blue a2 : %.2f\n", (short)(x[16] | (x[17] << 8)) / 100.0);
		return;
	case 0xfa:
		data_block = "Standard Timing Identifications";
		printf("    %s:\n", data_block.c_str());
		for (cnt = i = 0; i < 6; i++) {
			if (x[5 + i * 2] != 0x01 || x[5 + i * 2 + 1] != 0x01)
				cnt++;
			print_standard_timing("      ", x[5 + i * 2], x[5 + i * 2 + 1]);
		}
		if (!cnt)
			warn("%s block without any timings.\n", data_block.c_str());
		return;
	case 0xfb: {
		unsigned w_x, w_y;
		unsigned gamma;

		data_block = "Color Point Data";
		printf("    %s:\n", data_block.c_str());
		w_x = (x[7] << 2) | ((x[6] >> 2) & 3);
		w_y = (x[8] << 2) | (x[6] & 3);
		gamma = x[9];
		printf("      Index: %u White: 0.%04u, 0.%04u", x[5],
		       (w_x * 10000) / 1024, (w_y * 10000) / 1024);
		if (gamma == 0xff)
			printf(" Gamma: is defined in an extension block");
		else
			printf(" Gamma: %.2f", ((gamma + 100.0) / 100.0));
		printf("\n");
		if (x[10] == 0)
			return;
		w_x = (x[12] << 2) | ((x[11] >> 2) & 3);
		w_y = (x[13] << 2) | (x[11] & 3);
		gamma = x[14];
		printf("      Index: %u White: 0.%04u, 0.%04u", x[10],
		       (w_x * 10000) / 1024, (w_y * 10000) / 1024);
		if (gamma == 0xff)
			printf(" Gamma: is defined in an extension block");
		else
			printf(" Gamma: %.2f", ((gamma + 100.0) / 100.0));
		printf("\n");
		return;
	}
	case 0xfc:
		data_block = "Display Product Name";
		base.has_name_descriptor = 1;
		printf("    %s: '%s'\n", data_block.c_str(), extract_string(x + 5, 13));
		return;
	case 0xfd:
		detailed_display_range_limits(x);
		return;
	case 0xfe:
		if (!base.has_spwg || base.detailed_block_cnt < 3) {
			data_block = "Alphanumeric Data String";
			printf("    %s: '%s'\n", data_block.c_str(),
			       extract_string(x + 5, 13));
			return;
		}
		if (base.detailed_block_cnt == 3) {
			char buf[6] = { 0 };

			data_block = "SPWG Descriptor #3";
			printf("    %s:\n", data_block.c_str());
			memcpy(buf, x + 5, 5);
			if (strlen(buf) != 5)
				fail("Invalid PC Maker P/N length.\n");
			printf("      SPWG PC Maker P/N: '%s'\n", buf);
			printf("      SPWG LCD Supplier EEDID Revision: %hhu\n", x[10]);
			printf("      SPWG Manufacturer P/N: '%s'\n", extract_string(x + 11, 7));
		} else {
			data_block = "SPWG Descriptor #4";
			printf("    %s:\n", data_block.c_str());
			printf("      SMBUS Values: 0x%02hhx 0x%02hhx 0x%02hhx 0x%02hhx"
			       " 0x%02hhx 0x%02hhx 0x%02hhx 0x%02hhx\n",
			       x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12]);
			printf("      LVDS Channels: %hhu\n", x[13]);
			printf("      Panel Self Test %sPresent\n", x[14] ? "" : "Not ");
			if (x[15] != 0x0a || x[16] != 0x20 || x[17] != 0x20)
				fail("Invalid trailing data.\n");
		}
		return;
	case 0xff: {
		data_block = "Display Product Serial Number";
		char *sn = extract_string(x + 5, 13);
		if (hide_serial_numbers)
			printf("    %s: ...\n", data_block.c_str());
		else
			printf("    %s: '%s'\n", data_block.c_str(), sn);
		base.has_serial_string = 1;
		return;
	}
	default:
		printf("    %s Display Descriptor (0x%02hhx):",
		       x[3] <= 0x0f ? "Manufacturer-Specified" : "Unknown", x[3]);
		hex_block(" ", x + 2, 16);
		if (x[3] > 0x0f)
			fail("Unknown Type 0x%02hhx.\n", x[3]);
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0xbc(%rdi), %ebp
incl %ebp
movl %ebp, 0xbc(%rdi)
cmpb $0x0, (%rsi)
jne 0xc083
cmpb $0x0, 0x1(%rbx)
je 0xc0c6
leaq 0x193bd(%rip), %rsi     # 0x25447
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xb374
cmpb $0x1, 0xc4(%r14)
jne 0xc369
leaq 0x1939d(%rip), %rsi     # 0x2544c
xorl %edi, %edi
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x37ec
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0xc114
movl $0x4, %eax
movl $0xd1b71759, %ecx       # imm = 0xD1B71759
movl %ebp, %edx
cmpl $0x63, %edx
jbe 0xc10d
cmpl $0x3e7, %edx            # imm = 0x3E7
jbe 0xc112
cmpl $0x2710, %edx           # imm = 0x2710
jb 0xc114
movl %edx, %esi
imulq %rcx, %rsi
shrq $0x2d, %rsi
addl $0x4, %eax
cmpl $0x1869f, %edx          # imm = 0x1869F
movl %esi, %edx
ja 0xc0dc
addl $-0x3, %eax
jmp 0xc114
addl $-0x2, %eax
jmp 0xc114
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x32a0
movq (%r15), %rdi
movl 0x8(%r15), %esi
movl %ebp, %edx
callq 0x8c91
leaq 0x19337(%rip), %rcx     # 0x2547a
movl $0x14, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3290
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc17b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xc184
movupd (%rcx), %xmm0
movupd %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rsp, %r12
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%r14), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x32d0
movq (%r12), %rdi
cmpq %rbp, %rdi
je 0xc1c4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0xc1db
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movzbl 0x2(%rbx), %edx
testl %edx, %edx
je 0xc1f3
leaq 0x192a5(%rip), %rsi     # 0x2548f
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
cmpl $0x4, 0x88(%r14)
jb 0xc203
cmpb $-0x3, 0x3(%rbx)
je 0xc21b
movzbl 0x4(%rbx), %edx
testl %edx, %edx
je 0xc21b
leaq 0x192b4(%rip), %rsi     # 0x254c6
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
movb $0x1, 0xc4(%r14)
cmpl $0x0, 0x88(%r14)
jne 0xc23d
leaq 0x192c9(%rip), %rsi     # 0x254fd
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
movzwl 0x10(%rbx), %eax
orq (%rbx), %rax
orq 0x8(%rbx), %rax
je 0xc32c
movzbl 0x3(%rbx), %edx
leal -0xf7(%rdx), %eax
cmpl $0x8, %eax
ja 0xc378
leaq 0x162a4(%rip), %rcx     # 0x2250c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1932a(%rip), %rsi     # 0x255a2
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x18b2f(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movq %rsp, %r12
leaq 0x162c5(%rip), %r13     # 0x22560
xorl %ebp, %ebp
movl %ebp, %eax
shrl $0x3, %eax
movzbl 0x6(%rbx,%rax), %eax
movl %ebp, %ecx
notb %cl
movzbl %cl, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0xc31d
leaq 0x183a3(%rip), %rax     # 0x24660
movzbl (%rbp,%rax), %r15d
movq %r12, %rdi
leaq 0x14602(%rip), %rsi     # 0x208cf
movl %r15d, %edx
xorl %eax, %eax
callq 0x3070
xorl %eax, %eax
cmpl %r15d, (%rax,%r13)
je 0xc2ef
addq $0x60, %rax
cmpq $0x2100, %rax           # imm = 0x2100
jne 0xc2d9
xorl %edx, %edx
jmp 0xc2f7
leaq (%rax,%r13), %rdx
addq $0xc, %rdx
subq $0x8, %rsp
movq %r14, %rdi
leaq 0x19140(%rip), %rsi     # 0x25445
movq %r12, %rcx
leaq 0x1496a(%rip), %r8      # 0x20c79
xorl %r9d, %r9d
pushq $0x1
callq 0x3ebe
addq $0x10, %rsp
incq %rbp
cmpq $0x2c, %rbp
jne 0xc29d
jmp 0xc369
movq 0x38(%r14), %rdx
leaq 0x191fa(%rip), %rcx     # 0x25531
movl $0x10, %r8d
movq %r15, %rdi
xorl %esi, %esi
callq 0x3390
movq 0x30(%r14), %rsi
leaq 0x1e3ad(%rip), %rdi     # 0x2a6ff
xorl %eax, %eax
callq 0x3030
leaq 0x191e2(%rip), %rsi     # 0x25542
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x10, %edx
je 0xc5e4
cmpl $0xe, %edx
jne 0xc71d
movq %r14, %rdi
movq %rbx, %rsi
callq 0xaf14
jmp 0xc369
leaq 0x19345(%rip), %rsi     # 0x256e3
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x18a09(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movzbl 0x7(%rbx), %eax
movzbl 0x6(%rbx), %ecx
movl %ecx, %edx
shrl $0x2, %edx
andl $0x3, %edx
leal (%rdx,%rax,4), %eax
movzbl 0x8(%rbx), %edx
andl $0x3, %ecx
leal (%rcx,%rdx,4), %ecx
movb 0x9(%rbx), %bpl
movzbl 0x5(%rbx), %esi
imull $0x2710, %eax, %edx     # imm = 0x2710
shrl $0xa, %edx
imull $0x2710, %ecx, %ecx     # imm = 0x2710
shrl $0xa, %ecx
leaq 0x192ff(%rip), %rdi     # 0x256f4
xorl %eax, %eax
callq 0x3030
cmpb $-0x1, %bpl
je 0xc7bc
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
movsd 0x13c02(%rip), %xmm1    # 0x20018
addsd %xmm1, %xmm0
divsd %xmm1, %xmm0
leaq 0x1931e(%rip), %rdi     # 0x25743
movb $0x1, %al
callq 0x3030
jmp 0xc7ca
leaq 0x191b6(%rip), %rsi     # 0x255ee
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x1896f(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %esi
leaq 0x191b0(%rip), %rdi     # 0x2560c
xorl %eax, %eax
callq 0x3030
movswl 0x6(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13ba2(%rip), %xmm0    # 0x20018
leaq 0x191a3(%rip), %rdi     # 0x25620
movb $0x1, %al
callq 0x3030
movswl 0x8(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13b81(%rip), %xmm0    # 0x20018
leaq 0x19198(%rip), %rdi     # 0x25636
movb $0x1, %al
callq 0x3030
movswl 0xa(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13b60(%rip), %xmm0    # 0x20018
leaq 0x1918d(%rip), %rdi     # 0x2564c
movb $0x1, %al
callq 0x3030
movswl 0xc(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13b3f(%rip), %xmm0    # 0x20018
leaq 0x19182(%rip), %rdi     # 0x25662
movb $0x1, %al
callq 0x3030
movswl 0xe(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13b1e(%rip), %xmm0    # 0x20018
leaq 0x19177(%rip), %rdi     # 0x25678
movb $0x1, %al
callq 0x3030
movswl 0x10(%rbx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x13afd(%rip), %xmm0    # 0x20018
leaq 0x1916c(%rip), %rdi     # 0x2568e
movb $0x1, %al
callq 0x3030
jmp 0xc369
leaq 0x1916f(%rip), %rsi     # 0x256a4
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x18872(%rip), %rdi     # 0x24db9
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x3030
leaq 0x18eed(%rip), %r12     # 0x25445
xorl %ebp, %ebp
movb 0x5(%rbx,%r13,2), %al
cmpb $0x1, %al
jne 0xc56b
cmpb $0x1, 0x6(%rbx,%r13,2)
je 0xc56d
incl %ebp
movzbl 0x6(%rbx,%r13,2), %ecx
movzbl %al, %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa252
incq %r13
cmpq $0x6, %r13
jne 0xc55a
testl %ebp, %ebp
jne 0xc369
movq (%r15), %rdx
leaq 0x19122(%rip), %rsi     # 0x256c4
movl $0x1, %edi
xorl %eax, %eax
callq 0x37ec
jmp 0xc369
cmpb $0x1, 0xb9(%r14)
jne 0xc5cd
movl 0xbc(%r14), %eax
cmpl $0x2, %eax
ja 0xc856
leaq 0x1919f(%rip), %rsi     # 0x25773
movq %r15, %rdi
callq 0x3300
movq (%r15), %r14
jmp 0xc69d
leaq 0x18f84(%rip), %rsi     # 0x2556f
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x187bc(%rip), %rdi     # 0x24db9
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x3030
cmpb $0x0, 0x5(%rbx,%r14)
jne 0xc779
incq %r14
cmpq $0xd, %r14
jne 0xc607
jmp 0xc369
leaq 0x18f92(%rip), %rsi     # 0x255ba
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x1877f(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %edx
cmpl $0x1, %edx
jne 0xc785
addq $0x6, %rbx
xorl %r12d, %r12d
leaq 0x18de9(%rip), %r15     # 0x25445
leaq (%rbx,%r12), %rdx
xorl %ecx, %ecx
testq %r12, %r12
sete %cl
movq %r14, %rdi
movq %r15, %rsi
callq 0x9e26
addq $0x3, %r12
cmpq $0xc, %r12
jne 0xc65c
jmp 0xc369
leaq 0x190c7(%rip), %rsi     # 0x25750
movq %r15, %rdi
callq 0x3300
movb $0x1, 0x8c(%r14)
movq 0x30(%r14), %r14
addq $0x5, %rbx
movq %rbx, %rdi
movl $0xd, %esi
callq 0xa108
leaq 0x190b0(%rip), %rdi     # 0x25765
leaq 0x3ab04(%rip), %rdx     # 0x471c0
movq %r14, %rsi
xorl %eax, %eax
callq 0x3030
jmp 0xc369
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa532
jmp 0xc369
leaq 0x19214(%rip), %rsi     # 0x258f6
movq %r15, %rdi
callq 0x3300
addq $0x5, %rbx
movq %rbx, %rdi
movl $0xd, %esi
callq 0xa108
movq 0x30(%r14), %rsi
cmpb $0x1, 0x52(%r14)
jne 0xc79a
leaq 0x19203(%rip), %rdi     # 0x25914
xorl %eax, %eax
callq 0x3030
jmp 0xc7af
leaq 0x2(%rbx), %r14
cmpb $0x10, %dl
leaq 0x1921c(%rip), %rax     # 0x25947
leaq 0x1922c(%rip), %rsi     # 0x2595e
cmovbq %rax, %rsi
leaq 0x191e4(%rip), %rdi     # 0x25921
xorl %eax, %eax
callq 0x3030
leaq 0x18cff(%rip), %rdi     # 0x2544a
movq %r14, %rsi
movl $0x10, %edx
movl $0x1, %ecx
movl $0x10, %r8d
callq 0x5bbb
movzbl 0x3(%rbx), %edx
cmpl $0x10, %edx
jb 0xc369
leaq 0x191ef(%rip), %rsi     # 0x25966
jmp 0xc78c
leaq 0x18e00(%rip), %rsi     # 0x25580
jmp 0xc360
leaq 0x18e46(%rip), %rsi     # 0x255d2
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
jmp 0xc369
leaq 0x18fc4(%rip), %rdi     # 0x25765
leaq 0x3aa18(%rip), %rdx     # 0x471c0
xorl %eax, %eax
callq 0x3030
movb $0x1, 0x8f(%r14)
jmp 0xc369
leaq 0x18f57(%rip), %rdi     # 0x2571a
xorl %eax, %eax
callq 0x3030
movl $0xa, %edi
callq 0x3310
movzbl 0xa(%rbx), %esi
testl %esi, %esi
je 0xc369
movzbl 0xc(%rbx), %eax
movzbl 0xb(%rbx), %ecx
movl %ecx, %edx
shrl $0x2, %edx
andl $0x3, %edx
leal (%rdx,%rax,4), %eax
movzbl 0xd(%rbx), %edx
andl $0x3, %ecx
leal (%rcx,%rdx,4), %ecx
movb 0xe(%rbx), %bl
imull $0x2710, %eax, %edx     # imm = 0x2710
shrl $0xa, %edx
imull $0x2710, %ecx, %ecx     # imm = 0x2710
shrl $0xa, %ecx
leaq 0x18edb(%rip), %rdi     # 0x256f4
xorl %eax, %eax
callq 0x3030
cmpb $-0x1, %bl
je 0xc909
movzbl %bl, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x137dd(%rip), %xmm1    # 0x20018
addsd %xmm1, %xmm0
divsd %xmm1, %xmm0
leaq 0x18ef9(%rip), %rdi     # 0x25743
movb $0x1, %al
callq 0x3030
jmp 0xc917
cmpl $0x3, %eax
jne 0xc926
movq %rsp, %r14
movw $0x0, 0x4(%r14)
movl $0x0, (%r14)
leaq 0x18f15(%rip), %rsi     # 0x2578c
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x18530(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movl 0x5(%rbx), %eax
movl %eax, (%r14)
movb 0x9(%rbx), %al
movb %al, 0x4(%r14)
movq %r14, %rdi
callq 0x3110
cmpq $0x5, %rax
je 0xc8bb
leaq 0x18eed(%rip), %rsi     # 0x2579f
xorl %edi, %edi
xorl %eax, %eax
callq 0x37ec
leaq 0x18efb(%rip), %rdi     # 0x257bd
movq %rsp, %rsi
xorl %eax, %eax
callq 0x3030
movzbl 0xa(%rbx), %esi
leaq 0x18f05(%rip), %rdi     # 0x257dc
xorl %eax, %eax
callq 0x3030
addq $0xb, %rbx
movq %rbx, %rdi
movl $0x7, %esi
callq 0xa108
leaq 0x18f14(%rip), %rdi     # 0x2580a
leaq 0x3a8c3(%rip), %rsi     # 0x471c0
xorl %eax, %eax
callq 0x3030
jmp 0xc369
leaq 0x18e0a(%rip), %rdi     # 0x2571a
xorl %eax, %eax
callq 0x3030
movl $0xa, %edi
callq 0x3310
jmp 0xc369
leaq 0x18f00(%rip), %rsi     # 0x2582d
movq %r15, %rdi
callq 0x3300
movq (%r15), %rsi
leaq 0x1847a(%rip), %rdi     # 0x24db9
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %esi
movzbl 0x6(%rbx), %edx
movzbl 0x7(%rbx), %ecx
movzbl 0x8(%rbx), %r8d
movzbl 0x9(%rbx), %r9d
movzbl 0xa(%rbx), %r10d
movzbl 0xb(%rbx), %r11d
movzbl 0xc(%rbx), %r14d
subq $0x8, %rsp
leaq 0x18eca(%rip), %rdi     # 0x25840
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
callq 0x3030
addq $0x20, %rsp
movzbl 0xd(%rbx), %esi
leaq 0x18f0b(%rip), %rdi     # 0x2589d
xorl %eax, %eax
callq 0x3030
cmpb $0x0, 0xe(%rbx)
leaq 0x18f35(%rip), %rax     # 0x258d9
leaq 0x142ce(%rip), %rsi     # 0x20c79
cmoveq %rax, %rsi
leaq 0x18f02(%rip), %rdi     # 0x258b8
xorl %eax, %eax
callq 0x3030
cmpb $0xa, 0xf(%rbx)
jne 0xc9d3
cmpb $0x20, 0x10(%rbx)
jne 0xc9d3
cmpb $0x20, 0x11(%rbx)
je 0xc369
leaq 0x18f04(%rip), %rsi     # 0x258de
jmp 0xc360
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0xc9f9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3400
nop