// File: /workspace/github_cpp_makefile_star2_O1/rpavlik[P]edid-decode/parse-displayid-block.cpp
// Function: edid_state::product_type[abi:cxx11](unsigned char, bool)
std::string edid_state::product_type(unsigned char x, bool heading)
{
	std::string headingstr;

	if (dispid.version < 0x20) {
		headingstr = "Display Product Type";
		if (heading) return headingstr;
		dispid.is_display = x == 2 || x == 3 || x == 4 || x == 6;
		switch (x) {
		case 0: return "Extension Section";
		case 1: return "Test Structure; test equipment only";
		case 2: return "Display panel or other transducer, LCD or PDP module, etc.";
		case 3: return "Standalone display device";
		case 4: return "Television receiver";
		case 5: return "Repeater/translator";
		case 6: return "DIRECT DRIVE monitor";
		default: break;
		}
	} else {
		headingstr = "Display Product Primary Use Case";
		if (heading) return headingstr;
		dispid.is_display = x >= 2 && x <= 8;
		switch (x) {
		case 0: return "Same primary use case as the base section";
		case 1: return "Test Structure; test equipment only";
		case 2: return "None of the listed primary use cases; generic display";
		case 3: return "Television (TV) display";
		case 4: return "Desktop productivity display";
		case 5: return "Desktop gaming display";
		case 6: return "Presentation display";
		case 7: return "Head-mounted Virtual Reality (VR) display";
		case 8: return "Head-mounted Augmented Reality (AR) display";
		default: break;
		}
	}
	fail("Unknown %s 0x%02x.\n", headingstr.c_str(), x);
	return std::string("Unknown " + headingstr + " (") + utohex(x) + ")";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
cmpb $0x1f, 0x910(%rsi)
ja 0x1b182
leaq 0x14f4e(%rip), %rcx     # 0x30060
movq %rsp, %rdi
movl $0x14, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
testb %bpl, %bpl
jne 0x1b1a0
leal -0x2(%r14), %eax
cmpb $0x3, %al
setb %al
cmpb $0x6, %r14b
sete %cl
orb %al, %cl
movb %cl, 0x91d(%r15)
cmpb $0x6, %r14b
ja 0x1b251
movzbl %r14b, %eax
leaq 0x13635(%rip), %rcx     # 0x2e78c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14f07(%rip), %rsi     # 0x30075
leaq 0x14f11(%rip), %rdx     # 0x30086
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x14fb4(%rip), %rcx     # 0x3013d
movq %rsp, %rdi
movl $0x20, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3390
testb %bpl, %bpl
je 0x1b1be
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%rsp), %rcx
cmpq %r12, %rcx
je 0x1b205
movq %rcx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x1b20d
leal -0x2(%r14), %eax
cmpb $0x7, %al
setb 0x91d(%r15)
cmpb $0x8, %r14b
ja 0x1b251
movzbl %r14b, %eax
leaq 0x1358b(%rip), %rcx     # 0x2e768
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14f6a(%rip), %rsi     # 0x3015e
leaq 0x14f8c(%rip), %rdx     # 0x30187
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
movups (%r12), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r12, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1b23e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdx
movzbl %r14b, %ebp
leaq 0x14fcc(%rip), %rsi     # 0x3022c
xorl %edi, %edi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x37ec
leaq 0x14fce(%rip), %rsi     # 0x30240
leaq 0x80(%rsp), %rdi
movq %rsp, %rdx
callq 0x8a79
leaq 0x122a6(%rip), %rsi     # 0x2d52f
leaq 0x80(%rsp), %rdi
callq 0x3420
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1b4a0
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x1b4a7
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14e2e(%rip), %rsi     # 0x30100
leaq 0x14e3a(%rip), %rdx     # 0x30113
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14db7(%rip), %rsi     # 0x300ab
leaq 0x14dea(%rip), %rdx     # 0x300e5
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14dd0(%rip), %rsi     # 0x300e6
leaq 0x14de2(%rip), %rdx     # 0x300ff
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14d4f(%rip), %rsi     # 0x30087
leaq 0x14d6b(%rip), %rdx     # 0x300aa
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14dba(%rip), %rsi     # 0x30114
leaq 0x14dc6(%rip), %rdx     # 0x30127
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14dac(%rip), %rsi     # 0x30128
leaq 0x14db9(%rip), %rdx     # 0x3013c
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1205e(%rip), %rsi     # 0x2d3fc
leaq 0x12073(%rip), %rdx     # 0x2d418
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14dc8(%rip), %rsi     # 0x30188
leaq 0x14df6(%rip), %rdx     # 0x301bd
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14ddc(%rip), %rsi     # 0x301be
leaq 0x14dec(%rip), %rdx     # 0x301d5
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14dd2(%rip), %rsi     # 0x301d6
leaq 0x14df4(%rip), %rdx     # 0x301ff
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14c61(%rip), %rsi     # 0x30087
leaq 0x14c7d(%rip), %rdx     # 0x300aa
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x11fd1(%rip), %rsi     # 0x2d419
leaq 0x11fe0(%rip), %rdx     # 0x2d42f
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x11fc6(%rip), %rsi     # 0x2d430
leaq 0x11fd3(%rip), %rdx     # 0x2d444
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14d74(%rip), %rsi     # 0x30200
leaq 0x14d98(%rip), %rdx     # 0x3022b
movq %rbx, %rdi
callq 0x8f6e
jmp 0x1b228
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0x59df
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x68(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r14, %rcx
je 0x1b4ed
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1b50c
leaq 0x70(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1b507
movq 0x70(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1b51d
movq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x30b0
jmp 0x1b52b
leaq 0x60(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3290
leaq 0x30(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x1b54f
movq %rsi, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x1b555
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1130c(%rip), %rsi     # 0x2c885
leaq 0x20(%rsp), %rdi
callq 0x3420
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x1b5a5
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x1b5ab
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b5dd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b5f8
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b60f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b228
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1b228
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
jmp 0x1b70d
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b6ac
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1b6ac
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b6cc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1b6cc
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x1b6e8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1b6e8
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b710
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1b710
jmp 0x1b70d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1b726
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3400