// File: /workspace/github_cpp_makefile_star2_O1/rpavlik[P]edid-decode/parse-displayid-block.cpp
// Function: edid_state::parse_displayid_display_intf(unsigned char const*)
void edid_state::parse_displayid_display_intf(const unsigned char *x)
{
	check_displayid_datablock_revision(x[1]);

	if (!check_displayid_datablock_length(x, 10, 10))
		return;

	dispid.has_display_interface_features = true;
	printf("    Interface Type: ");
	switch (x[3] >> 4) {
	case 0x00:
		switch (x[3] & 0xf) {
		case 0x00: printf("Analog 15HD/VGA\n"); break;
		case 0x01: printf("Analog VESA NAVI-V (15HD)\n"); break;
		case 0x02: printf("Analog VESA NAVI-D\n"); break;
		default: printf("Reserved\n"); break;
		}
		break;
	case 0x01: printf("LVDS\n"); break;
	case 0x02: printf("TMDS\n"); break;
	case 0x03: printf("RSDS\n"); break;
	case 0x04: printf("DVI-D\n"); break;
	case 0x05: printf("DVI-I, analog\n"); break;
	case 0x06: printf("DVI-I, digital\n"); break;
	case 0x07: printf("HDMI-A\n"); break;
	case 0x08: printf("HDMI-B\n"); break;
	case 0x09: printf("MDDI\n"); break;
	case 0x0a: printf("DisplayPort\n"); break;
	case 0x0b: printf("Proprietary Digital Interface\n"); break;
	default: printf("Reserved\n"); break;
	}
	if (x[3] >> 4)
		printf("    Number of Links: %u\n", x[3] & 0xf);
	printf("    Interface Standard Version: %u.%u\n",
	       x[4] >> 4, x[4] & 0xf);
	print_flags("    Supported bpc for RGB encoding", x[5], bpc444);
	print_flags("    Supported bpc for YCbCr 4:4:4 encoding", x[6], bpc444);
	print_flags("    Supported bpc for YCbCr 4:2:2 encoding", x[7], bpc4xx);
	printf("    Supported Content Protection: ");
	switch (x[8] & 0xf) {
	case 0x00: printf("None\n"); break;
	case 0x01: printf("HDCP "); break;
	case 0x02: printf("DTCP "); break;
	case 0x03: printf("DPCP "); break;
	default: printf("Reserved "); break;
	}
	if (x[8] & 0xf)
		printf("%u.%u\n", x[9] >> 4, x[9] & 0xf);
	unsigned char v = x[0x0a] & 0xf;
	printf("    Spread Spectrum: ");
	switch (x[0x0a] >> 6) {
	case 0x00: printf("None\n"); break;
	case 0x01: printf("Down Spread %.1f%%\n", v / 10.0); break;
	case 0x02: printf("Center Spread %.1f%%\n", v / 10.0); break;
	case 0x03: printf("Reserved\n"); break;
	}
	switch (x[3] >> 4) {
	case 0x01:
		printf("    LVDS Color Mapping: %s mode\n",
		       (x[0x0b] & 0x10) ? "6 bit compatible" : "normal");
		if (x[0x0b] & 0x08) printf("    LVDS supports 2.8V\n");
		if (x[0x0b] & 0x04) printf("    LVDS supports 12V\n");
		if (x[0x0b] & 0x02) printf("    LVDS supports 5V\n");
		if (x[0x0b] & 0x01) printf("    LVDS supports 3.3V\n");
		printf("    LVDS %s Mode\n", (x[0x0c] & 0x04) ? "Fixed" : "DE");
		if (x[0x0c] & 0x04)
			printf("    LVDS %s Signal Level\n", (x[0x0c] & 0x02) ? "Low" : "High");
		else
			printf("    LVDS DE Polarity Active %s\n", (x[0x0c] & 0x02) ? "Low" : "High");
		printf("    LVDS Shift Clock Data Strobe at %s Edge\n", (x[0x0c] & 0x01) ? "Rising" : "Falling");
		break;
	case 0x0b:
		printf("    PDI %s Mode\n", (x[0x0b] & 0x04) ? "Fixed" : "DE");
		if (x[0x0b] & 0x04)
			printf("    PDI %s Signal Level\n", (x[0x0b] & 0x02) ? "Low" : "High");
		else
			printf("    PDI DE Polarity Active %s\n", (x[0x0b] & 0x02) ? "Low" : "High");
		printf("    PDI Shift Clock Data Strobe at %s Edge\n", (x[0x0b] & 0x01) ? "Rising" : "Falling");
		break;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x1(%rsi), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1627c
movq %rbx, %rdi
movl $0xa, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x165ab
testb %al, %al
je 0x18631
movb $0x1, 0x921(%r14)
leaq 0x13dd7(%rip), %rdi     # 0x2c0f9
xorl %eax, %eax
callq 0x3030
movzbl 0x3(%rbx), %eax
movl %eax, %ecx
shrl $0x4, %ecx
cmpl $0xb, %ecx
ja 0x1835f
leaq 0x16362(%rip), %rdx     # 0x2e6a0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
andl $0xf, %eax
cmpl $0x3, %eax
jae 0x1835f
leaq 0x167b2(%rip), %rcx     # 0x2eb08
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x183c9
leaq 0x1921a(%rip), %rdi     # 0x31580
jmp 0x183c9
leaq 0x18fd3(%rip), %rdi     # 0x31342
jmp 0x183c9
leaq 0x19016(%rip), %rdi     # 0x3138e
jmp 0x183c9
leaq 0x18feb(%rip), %rdi     # 0x3136c
jmp 0x183c9
leaq 0xe25c(%rip), %rdi      # 0x265e6
jmp 0x183c9
leaq 0x19001(%rip), %rdi     # 0x31394
jmp 0x183c9
leaq 0x13dd0(%rip), %rdi     # 0x2c16c
jmp 0x183c9
leaq 0x18ff4(%rip), %rdi     # 0x31399
jmp 0x183c9
leaq 0x18fd2(%rip), %rdi     # 0x31380
jmp 0x183c9
leaq 0x18fba(%rip), %rdi     # 0x31371
jmp 0x183c9
leaq 0x18fa0(%rip), %rdi     # 0x31360
jmp 0x183c9
leaq 0x13daa(%rip), %rdi     # 0x2c173
callq 0x3380
movzbl 0x3(%rbx), %esi
cmpl $0x10, %esi
jb 0x183e8
andl $0xf, %esi
leaq 0x16f96(%rip), %rdi     # 0x2f377
xorl %eax, %eax
callq 0x3030
movzbl 0x4(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x13dd3(%rip), %rdi     # 0x2c1ce
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %esi
leaq 0x16f83(%rip), %rdi     # 0x2f390
leaq 0x221bc(%rip), %r14     # 0x3a5d0
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x186b9
movzbl 0x6(%rbx), %esi
leaq 0x16f8a(%rip), %rdi     # 0x2f3b3
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x186b9
movzbl 0x7(%rbx), %esi
leaq 0x16fa0(%rip), %rdi     # 0x2f3de
leaq 0x221cb(%rip), %rdx     # 0x3a610
xorl %ecx, %ecx
callq 0x186b9
leaq 0x16fb6(%rip), %rdi     # 0x2f409
xorl %eax, %eax
callq 0x3030
movzbl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x3, %eax
ja 0x1849f
leaq 0x16263(%rip), %rcx     # 0x2e6d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1ae47(%rip), %rdi     # 0x332c4
callq 0x3380
jmp 0x184ad
leaq 0x16fa7(%rip), %rdi     # 0x2f432
jmp 0x184a6
leaq 0x16fa4(%rip), %rdi     # 0x2f438
jmp 0x184a6
leaq 0x16f8f(%rip), %rdi     # 0x2f42c
jmp 0x184a6
leaq 0x16f98(%rip), %rdi     # 0x2f43e
xorl %eax, %eax
callq 0x3030
testb $0xf, 0x8(%rbx)
je 0x184cd
movzbl 0x9(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x196d7(%rip), %rdi     # 0x31b9d
xorl %eax, %eax
callq 0x3030
movb 0xa(%rbx), %bpl
andb $0xf, %bpl
leaq 0x16f6c(%rip), %rdi     # 0x2f448
xorl %eax, %eax
callq 0x3030
movzbl 0xa(%rbx), %eax
shrl $0x6, %eax
leaq 0x161ef(%rip), %rcx     # 0x2e6e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1adc3(%rip), %rdi     # 0x332c4
jmp 0x18523
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x160ed(%rip), %xmm0    # 0x2e600
leaq 0x16f58(%rip), %rdi     # 0x2f472
jmp 0x18541
leaq 0x1905d(%rip), %rdi     # 0x31580
callq 0x3380
jmp 0x18548
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x160c6(%rip), %xmm0    # 0x2e600
leaq 0x16f1d(%rip), %rdi     # 0x2f45e
movb $0x1, %al
callq 0x3030
movzbl 0x3(%rbx), %eax
shrl $0x4, %eax
cmpl $0xb, %eax
je 0x18636
cmpl $0x1, %eax
jne 0x18631
testb $0x10, 0xb(%rbx)
leaq 0xca30(%rip), %rax      # 0x24f9c
leaq 0x16f36(%rip), %rsi     # 0x2f4a9
cmoveq %rax, %rsi
leaq 0x16f0a(%rip), %rdi     # 0x2f488
xorl %eax, %eax
callq 0x3030
testb $0x8, 0xb(%rbx)
je 0x18597
leaq 0x18e49(%rip), %rdi     # 0x313db
callq 0x3380
testb $0x4, 0xb(%rbx)
je 0x185a9
leaq 0x18e4e(%rip), %rdi     # 0x313f2
callq 0x3380
testb $0x2, 0xb(%rbx)
je 0x185bb
leaq 0x18e52(%rip), %rdi     # 0x31408
callq 0x3380
testb $0x1, 0xb(%rbx)
je 0x185cd
leaq 0x18e55(%rip), %rdi     # 0x3141d
callq 0x3380
leaq 0xc(%rbx), %r14
testb $0x4, 0xc(%rbx)
leaq 0x16ef0(%rip), %rax     # 0x2f4cc
leaq 0x154b3(%rip), %rsi     # 0x2da96
cmoveq %rax, %rsi
leaq 0x16ecc(%rip), %rdi     # 0x2f4ba
xorl %eax, %eax
callq 0x3030
movzbl 0xc(%rbx), %eax
testb $0x2, %al
leaq 0x16eeb(%rip), %rcx     # 0x2f4ed
leaq 0x16ee0(%rip), %rsi     # 0x2f4e9
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x16edc(%rip), %rax     # 0x2f4f2
leaq 0x16eb2(%rip), %rdi     # 0x2f4cf
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x16ee3(%rip), %rdi     # 0x2f512
jmp 0x18698
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb(%rbx), %r14
testb $0x4, 0xb(%rbx)
leaq 0x16e87(%rip), %rax     # 0x2f4cc
leaq 0x1544a(%rip), %rsi     # 0x2da96
cmoveq %rax, %rsi
leaq 0x16ef7(%rip), %rdi     # 0x2f54e
xorl %eax, %eax
callq 0x3030
movzbl 0xb(%rbx), %eax
testb $0x2, %al
leaq 0x16e82(%rip), %rcx     # 0x2f4ed
leaq 0x16e77(%rip), %rsi     # 0x2f4e9
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x16ef9(%rip), %rax     # 0x2f578
leaq 0x16ed9(%rip), %rdi     # 0x2f55f
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x16eff(%rip), %rdi     # 0x2f597
testb $0x1, (%r14)
leaq 0x16ea3(%rip), %rax     # 0x2f546
leaq 0x16e95(%rip), %rsi     # 0x2f53f
cmoveq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3030