// File: /workspace/github_cpp_makefile_star2_O2/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 0x123f0
pushq $0xa
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
xorl %ecx, %ecx
callq 0x126fe
testb %al, %al
je 0x141c2
movb $0x1, 0x921(%r14)
leaq 0x12272(%rip), %rdi     # 0x26121
xorl %eax, %eax
callq 0x3030
movzbl 0x3(%rbx), %eax
movl %eax, %ecx
shrl $0x4, %ecx
cmpl $0xb, %ecx
ja 0x13eec
leaq 0x14805(%rip), %rdx     # 0x286d0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
andl $0xf, %eax
cmpl $0x3, %eax
jae 0x13eec
leaq 0x14c55(%rip), %rcx     # 0x28b38
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x13f56
leaq 0x176cd(%rip), %rdi     # 0x2b5c0
jmp 0x13f56
leaq 0x17486(%rip), %rdi     # 0x2b382
jmp 0x13f56
leaq 0x174c9(%rip), %rdi     # 0x2b3ce
jmp 0x13f56
leaq 0x1749e(%rip), %rdi     # 0x2b3ac
jmp 0x13f56
leaq 0xc71f(%rip), %rdi      # 0x20636
jmp 0x13f56
leaq 0x174b4(%rip), %rdi     # 0x2b3d4
jmp 0x13f56
leaq 0x1226b(%rip), %rdi     # 0x26194
jmp 0x13f56
leaq 0x174a7(%rip), %rdi     # 0x2b3d9
jmp 0x13f56
leaq 0x17485(%rip), %rdi     # 0x2b3c0
jmp 0x13f56
leaq 0x1746d(%rip), %rdi     # 0x2b3b1
jmp 0x13f56
leaq 0x17453(%rip), %rdi     # 0x2b3a0
jmp 0x13f56
leaq 0x12245(%rip), %rdi     # 0x2619b
callq 0x33b0
movzbl 0x3(%rbx), %esi
cmpl $0x10, %esi
jb 0x13f75
andl $0xf, %esi
leaq 0x15449(%rip), %rdi     # 0x293b7
xorl %eax, %eax
callq 0x3030
movzbl 0x4(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x1226e(%rip), %rdi     # 0x261f6
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %esi
leaq 0x15436(%rip), %rdi     # 0x293d0
leaq 0x2064f(%rip), %r14     # 0x345f0
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1424a
movzbl 0x6(%rbx), %esi
leaq 0x1543d(%rip), %rdi     # 0x293f3
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1424a
movzbl 0x7(%rbx), %esi
leaq 0x15453(%rip), %rdi     # 0x2941e
leaq 0x2065e(%rip), %rdx     # 0x34630
xorl %ecx, %ecx
callq 0x1424a
leaq 0x15469(%rip), %rdi     # 0x29449
xorl %eax, %eax
callq 0x3030
movzbl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x3, %eax
ja 0x1402c
leaq 0x14706(%rip), %rcx     # 0x28700
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x192fa(%rip), %rdi     # 0x2d304
callq 0x33b0
jmp 0x1403a
leaq 0x1545a(%rip), %rdi     # 0x29472
jmp 0x14033
leaq 0x15457(%rip), %rdi     # 0x29478
jmp 0x14033
leaq 0x15442(%rip), %rdi     # 0x2946c
jmp 0x14033
leaq 0x1544b(%rip), %rdi     # 0x2947e
xorl %eax, %eax
callq 0x3030
testb $0xf, 0x8(%rbx)
je 0x1405a
movzbl 0x9(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x17b8a(%rip), %rdi     # 0x2bbdd
xorl %eax, %eax
callq 0x3030
movb 0xa(%rbx), %bpl
andb $0xf, %bpl
leaq 0x1541f(%rip), %rdi     # 0x29488
xorl %eax, %eax
callq 0x3030
movzbl 0xa(%rbx), %eax
shrl $0x6, %eax
leaq 0x14692(%rip), %rcx     # 0x28710
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x19276(%rip), %rdi     # 0x2d304
jmp 0x140b0
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x14590(%rip), %xmm0    # 0x28630
leaq 0x1540b(%rip), %rdi     # 0x294b2
jmp 0x140ce
leaq 0x17510(%rip), %rdi     # 0x2b5c0
callq 0x33b0
jmp 0x140d5
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x14569(%rip), %xmm0    # 0x28630
leaq 0x153d0(%rip), %rdi     # 0x2949e
movb $0x1, %al
callq 0x3030
movzbl 0x3(%rbx), %eax
shrl $0x4, %eax
cmpl $0xb, %eax
je 0x141c7
cmpl $0x1, %eax
jne 0x141c2
testb $0x10, 0xb(%rbx)
leaq 0xaef3(%rip), %rax      # 0x1efec
leaq 0x153e9(%rip), %rsi     # 0x294e9
cmoveq %rax, %rsi
leaq 0x153bd(%rip), %rdi     # 0x294c8
xorl %eax, %eax
callq 0x3030
movb 0xb(%rbx), %al
testb $0x8, %al
je 0x14128
leaq 0x172fb(%rip), %rdi     # 0x2b41b
callq 0x33b0
movb 0xb(%rbx), %al
testb $0x4, %al
je 0x1413b
leaq 0x172ff(%rip), %rdi     # 0x2b432
callq 0x33b0
movb 0xb(%rbx), %al
testb $0x2, %al
je 0x1414e
leaq 0x17302(%rip), %rdi     # 0x2b448
callq 0x33b0
movb 0xb(%rbx), %al
testb $0x1, %al
je 0x1415e
leaq 0x17304(%rip), %rdi     # 0x2b45d
callq 0x33b0
leaq 0xc(%rbx), %r14
testb $0x4, 0xc(%rbx)
leaq 0x1539f(%rip), %rax     # 0x2950c
leaq 0x1394f(%rip), %rsi     # 0x27ac3
cmoveq %rax, %rsi
leaq 0x1537b(%rip), %rdi     # 0x294fa
xorl %eax, %eax
callq 0x3030
movzbl 0xc(%rbx), %eax
testb $0x2, %al
leaq 0x1539a(%rip), %rcx     # 0x2952d
leaq 0x1538f(%rip), %rsi     # 0x29529
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x1538b(%rip), %rax     # 0x29532
leaq 0x15361(%rip), %rdi     # 0x2950f
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x15392(%rip), %rdi     # 0x29552
jmp 0x14229
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb(%rbx), %r14
testb $0x4, 0xb(%rbx)
leaq 0x15336(%rip), %rax     # 0x2950c
leaq 0x138e6(%rip), %rsi     # 0x27ac3
cmoveq %rax, %rsi
leaq 0x153a6(%rip), %rdi     # 0x2958e
xorl %eax, %eax
callq 0x3030
movzbl 0xb(%rbx), %eax
testb $0x2, %al
leaq 0x15331(%rip), %rcx     # 0x2952d
leaq 0x15326(%rip), %rsi     # 0x29529
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x153a8(%rip), %rax     # 0x295b8
leaq 0x15388(%rip), %rdi     # 0x2959f
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x153ae(%rip), %rdi     # 0x295d7
testb $0x1, (%r14)
leaq 0x15352(%rip), %rax     # 0x29586
leaq 0x15344(%rip), %rsi     # 0x2957f
cmoveq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3030