// File: /workspace/github_cpp_makefile_star2_O3/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 0x1611c
movq %rbx, %rdi
movl $0xa, %esi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1644b
testb %al, %al
je 0x184df
movb $0x1, 0x921(%r14)
leaq 0x13f55(%rip), %rdi     # 0x2c121
xorl %eax, %eax
callq 0x3030
movzbl 0x3(%rbx), %eax
movl %eax, %ecx
shrl $0x4, %ecx
cmpl $0xb, %ecx
ja 0x18209
leaq 0x164e0(%rip), %rdx     # 0x2e6c8
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
andl $0xf, %eax
cmpl $0x3, %eax
jae 0x18209
leaq 0x16930(%rip), %rcx     # 0x2eb30
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmp 0x18273
leaq 0x193b0(%rip), %rdi     # 0x315c0
jmp 0x18273
leaq 0x19169(%rip), %rdi     # 0x31382
jmp 0x18273
leaq 0x191ac(%rip), %rdi     # 0x313ce
jmp 0x18273
leaq 0x19181(%rip), %rdi     # 0x313ac
jmp 0x18273
leaq 0xe402(%rip), %rdi      # 0x26636
jmp 0x18273
leaq 0x19197(%rip), %rdi     # 0x313d4
jmp 0x18273
leaq 0x13f4e(%rip), %rdi     # 0x2c194
jmp 0x18273
leaq 0x1918a(%rip), %rdi     # 0x313d9
jmp 0x18273
leaq 0x19168(%rip), %rdi     # 0x313c0
jmp 0x18273
leaq 0x19150(%rip), %rdi     # 0x313b1
jmp 0x18273
leaq 0x19136(%rip), %rdi     # 0x313a0
jmp 0x18273
leaq 0x13f28(%rip), %rdi     # 0x2c19b
callq 0x3380
movzbl 0x3(%rbx), %esi
cmpl $0x10, %esi
jb 0x18292
andl $0xf, %esi
leaq 0x1712c(%rip), %rdi     # 0x2f3b7
xorl %eax, %eax
callq 0x3030
movzbl 0x4(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x13f51(%rip), %rdi     # 0x2c1f6
xorl %eax, %eax
callq 0x3030
movzbl 0x5(%rbx), %esi
leaq 0x17119(%rip), %rdi     # 0x2f3d0
leaq 0x22312(%rip), %r14     # 0x3a5d0
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x18567
movzbl 0x6(%rbx), %esi
leaq 0x17120(%rip), %rdi     # 0x2f3f3
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x18567
movzbl 0x7(%rbx), %esi
leaq 0x17136(%rip), %rdi     # 0x2f41e
leaq 0x22321(%rip), %rdx     # 0x3a610
xorl %ecx, %ecx
callq 0x18567
leaq 0x1714c(%rip), %rdi     # 0x2f449
xorl %eax, %eax
callq 0x3030
movzbl 0x8(%rbx), %eax
andl $0xf, %eax
cmpl $0x3, %eax
ja 0x18349
leaq 0x163e1(%rip), %rcx     # 0x2e6f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1afdd(%rip), %rdi     # 0x33304
callq 0x3380
jmp 0x18357
leaq 0x1713d(%rip), %rdi     # 0x2f472
jmp 0x18350
leaq 0x1713a(%rip), %rdi     # 0x2f478
jmp 0x18350
leaq 0x17125(%rip), %rdi     # 0x2f46c
jmp 0x18350
leaq 0x1712e(%rip), %rdi     # 0x2f47e
xorl %eax, %eax
callq 0x3030
testb $0xf, 0x8(%rbx)
je 0x18377
movzbl 0x9(%rbx), %edx
movl %edx, %esi
shrl $0x4, %esi
andl $0xf, %edx
leaq 0x1986d(%rip), %rdi     # 0x31bdd
xorl %eax, %eax
callq 0x3030
movb 0xa(%rbx), %bpl
andb $0xf, %bpl
leaq 0x17102(%rip), %rdi     # 0x2f488
xorl %eax, %eax
callq 0x3030
movzbl 0xa(%rbx), %eax
shrl $0x6, %eax
leaq 0x1636d(%rip), %rcx     # 0x2e708
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1af59(%rip), %rdi     # 0x33304
jmp 0x183cd
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x1626b(%rip), %xmm0    # 0x2e628
leaq 0x170ee(%rip), %rdi     # 0x2f4b2
jmp 0x183eb
leaq 0x191f3(%rip), %rdi     # 0x315c0
callq 0x3380
jmp 0x183f2
movzbl %bpl, %eax
cvtsi2sd %eax, %xmm0
divsd 0x16244(%rip), %xmm0    # 0x2e628
leaq 0x170b3(%rip), %rdi     # 0x2f49e
movb $0x1, %al
callq 0x3030
movzbl 0x3(%rbx), %eax
shrl $0x4, %eax
cmpl $0xb, %eax
je 0x184e4
cmpl $0x1, %eax
jne 0x184df
testb $0x10, 0xb(%rbx)
leaq 0xcbd6(%rip), %rax      # 0x24fec
leaq 0x170cc(%rip), %rsi     # 0x2f4e9
cmoveq %rax, %rsi
leaq 0x170a0(%rip), %rdi     # 0x2f4c8
xorl %eax, %eax
callq 0x3030
movb 0xb(%rbx), %al
testb $0x8, %al
je 0x18445
leaq 0x18fde(%rip), %rdi     # 0x3141b
callq 0x3380
movb 0xb(%rbx), %al
testb $0x4, %al
je 0x18458
leaq 0x18fe2(%rip), %rdi     # 0x31432
callq 0x3380
movb 0xb(%rbx), %al
testb $0x2, %al
je 0x1846b
leaq 0x18fe5(%rip), %rdi     # 0x31448
callq 0x3380
movb 0xb(%rbx), %al
testb $0x1, %al
je 0x1847b
leaq 0x18fe7(%rip), %rdi     # 0x3145d
callq 0x3380
leaq 0xc(%rbx), %r14
testb $0x4, 0xc(%rbx)
leaq 0x17082(%rip), %rax     # 0x2f50c
leaq 0x1562d(%rip), %rsi     # 0x2dabe
cmoveq %rax, %rsi
leaq 0x1705e(%rip), %rdi     # 0x2f4fa
xorl %eax, %eax
callq 0x3030
movzbl 0xc(%rbx), %eax
testb $0x2, %al
leaq 0x1707d(%rip), %rcx     # 0x2f52d
leaq 0x17072(%rip), %rsi     # 0x2f529
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x1706e(%rip), %rax     # 0x2f532
leaq 0x17044(%rip), %rdi     # 0x2f50f
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x17075(%rip), %rdi     # 0x2f552
jmp 0x18546
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xb(%rbx), %r14
testb $0x4, 0xb(%rbx)
leaq 0x17019(%rip), %rax     # 0x2f50c
leaq 0x155c4(%rip), %rsi     # 0x2dabe
cmoveq %rax, %rsi
leaq 0x17089(%rip), %rdi     # 0x2f58e
xorl %eax, %eax
callq 0x3030
movzbl 0xb(%rbx), %eax
testb $0x2, %al
leaq 0x17014(%rip), %rcx     # 0x2f52d
leaq 0x17009(%rip), %rsi     # 0x2f529
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0x1708b(%rip), %rax     # 0x2f5b8
leaq 0x1706b(%rip), %rdi     # 0x2f59f
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x3030
leaq 0x17091(%rip), %rdi     # 0x2f5d7
testb $0x1, (%r14)
leaq 0x17035(%rip), %rax     # 0x2f586
leaq 0x17027(%rip), %rsi     # 0x2f57f
cmoveq %rax, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x3030