// File: /workspace/github_cpp_makefile_star2_O3/rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: cta_microsoft(unsigned char const*, unsigned int)
static void cta_microsoft(const unsigned char *x, unsigned length)
{
	// This VSDB is documented at:
	// https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-edid-extension
	printf("    Version: %u\n", x[0]);
	if (x[0] > 2) {
		// In version 1 and 2 these bits should always be set to 0.
		printf("    Desktop Usage: %u\n", (x[1] >> 6) & 1);
		printf("    Third-Party Usage: %u\n", (x[1] >> 5) & 1);
	}
	printf("    Display Product Primary Use Case: %u (%s)\n", x[1] & 0x1f,
	       display_use_case(x[1] & 0x1f).c_str());
	printf("    Container ID: %s\n", containerid2s(x + 2).c_str());
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movzbl (%rdi), %esi
leaq 0x1834a(%rip), %rdi     # 0x2c737
xorl %eax, %eax
callq 0x3030
cmpb $0x3, (%rbx)
jb 0x14429
movzbl 0x1(%rbx), %esi
shrl $0x6, %esi
andl $0x1, %esi
leaq 0x18f71(%rip), %rdi     # 0x2d37b
xorl %eax, %eax
callq 0x3030
movzbl 0x1(%rbx), %esi
shrl $0x5, %esi
andl $0x1, %esi
leaq 0x18f70(%rip), %rdi     # 0x2d392
xorl %eax, %eax
callq 0x3030
movzbl 0x1(%rbx), %r14d
andl $0x1f, %r14d
leal -0x1(%r14), %eax
cmpl $0x13, %eax
ja 0x14634
leaq 0x1261e(%rip), %rcx     # 0x26a64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x7571652074736554, %rcx # imm = 0x7571652074736554
movq %rcx, (%rax)
movabsq $0x746e656d70697571, %rcx # imm = 0x746E656D70697571
movq %rcx, 0x6(%rax)
movq $0xe, -0x8(%rax)
movb $0x0, 0xe(%rax)
jmp 0x1489b
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x18, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x19006(%rip), %xmm0    # 0x2d4c2
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0x10(%rax)
jmp 0x1488e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x16, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18f37(%rip), %xmm0    # 0x2d441
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0xe(%rax)
jmp 0x1488e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x11, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18fa3(%rip), %xmm0    # 0x2d4fb
jmp 0x147f6
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x14, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18ec3(%rip), %xmm0    # 0x2d458
movups %xmm0, (%rax)
movl $0x79616c70, 0x10(%rax) # imm = 0x79616C70
jmp 0x1488e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x1f, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18f0e(%rip), %xmm0    # 0x2d4ea
movups %xmm0, 0xf(%rax)
movups 0x18ef4(%rip), %xmm0    # 0x2d4db
jmp 0x1462c
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x1c, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18e0f(%rip), %xmm0    # 0x2d430
movups %xmm0, 0xc(%rax)
movups 0x18df8(%rip), %xmm0    # 0x2d424
movups %xmm0, (%rax)
jmp 0x1488e
leaq 0x18ed2(%rip), %rsi     # 0x2d50d
xorl %edi, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x37cc
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x40(%rsp), %r15
movq $0x1a, (%r15)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18ec8(%rip), %xmm0    # 0x2d549
movups %xmm0, 0xa(%rax)
movups 0x18eb3(%rip), %xmm0    # 0x2d53f
movups %xmm0, (%rax)
movq %rcx, 0x8(%r12)
movq (%r12), %rax
movb $0x0, (%rax,%rcx)
movzbl %r14b, %esi
leaq 0x40(%rsp), %rdi
callq 0x59f2
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0x146cc
movq 0x70(%rsp), %rdi
movq 0x40(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x146f3
leaq 0x50(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x146ea
movq 0x50(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x1491b
leaq 0x60(%rsp), %rdi
callq 0x30b0
jmp 0x14929
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x12, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18cd7(%rip), %xmm0    # 0x2d411
jmp 0x14885
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movabsq $0x20636972656e6547, %rcx # imm = 0x20636972656E6547
movq %rcx, (%rax)
movabsq $0x79616c7073696420, %rcx # imm = 0x79616C7073696420
movq %rcx, 0x7(%rax)
movq $0xf, -0x8(%rax)
movb $0x0, 0xf(%rax)
jmp 0x1489b
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x17, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18cc1(%rip), %xmm0    # 0x2d46d
movups %xmm0, (%rax)
movabsq $0x7465736461656820, %rdx # imm = 0x7465736461656820
jmp 0x14847
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x11, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18c8f(%rip), %xmm0    # 0x2d485
movups %xmm0, (%rax)
movb $0x79, 0x10(%rax)
jmp 0x1488e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x17, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18c70(%rip), %xmm0    # 0x2d4aa
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0xf(%rax)
jmp 0x1488e
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %r15
movq $0x12, (%r15)
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3410
movq %rax, (%r12)
movq (%r15), %rcx
movq %rcx, 0x10(%r12)
movups 0x18c12(%rip), %xmm0    # 0x2d497
movups %xmm0, (%rax)
movw $0x7961, 0x10(%rax)     # imm = 0x7961
movq %rcx, 0x8(%r12)
movq (%r12), %rax
movb $0x0, (%rax,%rcx)
leaq 0x10(%rsp), %r15
movq -0x10(%r15), %rdx
leaq 0x18b02(%rip), %rdi     # 0x2d3ad
movl %r14d, %esi
xorl %eax, %eax
callq 0x3030
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x148cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x2, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x590d
movq (%r14), %rsi
leaq 0x18af3(%rip), %rdi     # 0x2d3dc
xorl %eax, %eax
callq 0x3030
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1490a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x40(%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 0x1494d
movq %rsi, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x14953
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 0x17f36(%rip), %rsi     # 0x2c8ad
leaq 0x20(%rsp), %rdi
callq 0x3420
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x149a7
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x149ad
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149e0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149fb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x1489b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x1489b
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a3e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x14a3e
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14a5e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x14a5e
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x14a75
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3400
nop