// File: /workspace/github_cpp_makefile_star2_O1/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 0x1817a(%rip), %rdi     # 0x2c70f
xorl %eax, %eax
callq 0x3030
cmpb $0x3, (%rbx)
jb 0x145d1
movzbl 0x1(%rbx), %esi
shrl $0x6, %esi
andl $0x1, %esi
leaq 0x18da1(%rip), %rdi     # 0x2d353
xorl %eax, %eax
callq 0x3030
movzbl 0x1(%rbx), %esi
shrl $0x5, %esi
andl $0x1, %esi
leaq 0x18da0(%rip), %rdi     # 0x2d36a
xorl %eax, %eax
callq 0x3030
movzbl 0x1(%rbx), %r14d
andl $0x1f, %r14d
leal -0x1(%r14), %eax
cmpl $0x13, %eax
ja 0x147dc
leaq 0x1244e(%rip), %rcx     # 0x26a3c
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 0x14a44
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 0x18e36(%rip), %xmm0    # 0x2d49a
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0x10(%rax)
jmp 0x14a37
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 0x18d67(%rip), %xmm0    # 0x2d419
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0xe(%rax)
jmp 0x14a37
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 0x18dd3(%rip), %xmm0    # 0x2d4d3
jmp 0x1499f
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 0x18cf3(%rip), %xmm0    # 0x2d430
movups %xmm0, (%rax)
movl $0x79616c70, 0x10(%rax) # imm = 0x79616C70
jmp 0x14a37
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 0x18d3e(%rip), %xmm0    # 0x2d4c2
movups %xmm0, 0xf(%rax)
movups 0x18d24(%rip), %xmm0    # 0x2d4b3
jmp 0x147d4
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 0x18c3f(%rip), %xmm0    # 0x2d408
movups %xmm0, 0xc(%rax)
movups 0x18c28(%rip), %xmm0    # 0x2d3fc
movups %xmm0, (%rax)
jmp 0x14a37
leaq 0x18d02(%rip), %rsi     # 0x2d4e5
xorl %edi, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x37ec
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 0x18cf8(%rip), %xmm0    # 0x2d521
movups %xmm0, 0xa(%rax)
movups 0x18ce3(%rip), %xmm0    # 0x2d517
movups %xmm0, (%rax)
movq %rcx, 0x8(%r12)
movq (%r12), %rax
movb $0x0, (%rax,%rcx)
movzbl %r14b, %esi
leaq 0x40(%rsp), %rdi
callq 0x59df
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0x14874
movq 0x70(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x14897
leaq 0x50(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x1488e
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x14ac4
movq 0x40(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x30b0
jmp 0x14ad2
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 0x18b06(%rip), %xmm0    # 0x2d3e9
jmp 0x14a2e
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 0x14a44
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 0x18af0(%rip), %xmm0    # 0x2d445
movups %xmm0, (%rax)
movabsq $0x7465736461656820, %rdx # imm = 0x7465736461656820
jmp 0x149f0
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 0x18abe(%rip), %xmm0    # 0x2d45d
movups %xmm0, (%rax)
movb $0x79, 0x10(%rax)
jmp 0x14a37
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 0x18a9f(%rip), %xmm0    # 0x2d482
movups %xmm0, (%rax)
movabsq $0x79616c7073696420, %rdx # imm = 0x79616C7073696420
movq %rdx, 0xf(%rax)
jmp 0x14a37
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 0x18a41(%rip), %xmm0    # 0x2d46f
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 0x18931(%rip), %rdi     # 0x2d385
movl %r14d, %esi
xorl %eax, %eax
callq 0x3030
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x14a74
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x2, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x58fa
movq (%r14), %rsi
leaq 0x18922(%rip), %rdi     # 0x2d3b4
xorl %eax, %eax
callq 0x3030
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x14ab3
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 0x14af6
movq %rsi, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x14afc
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 0x17d65(%rip), %rsi     # 0x2c885
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 0x14b50
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x14b56
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 0x14b89
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14ba4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x14a44
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x14a44
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14be7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x14be7
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14c07
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x14c07
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x14c1e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x3400