// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: block_name[abi:cxx11](unsigned char)
std::string block_name(unsigned char block)
{
	char buf[10];

	switch (block) {
	case 0x00: return "Base EDID";
	case 0x02: return "CTA-861 Extension Block";
	case 0x10: return "Video Timing Extension Block";
	case 0x20: return "EDID 2.0 Extension Block";
	case 0x40: return "Display Information Extension Block";
	case 0x50: return "Localized String Extension Block";
	case 0x60: return "Microdisplay Interface Extension Block";
	case 0x70: return "DisplayID Extension Block";
	case 0xf0: return "Block Map Extension Block";
	case 0xff: return "Manufacturer-Specific Extension Block";
	default:
		sprintf(buf, " 0x%02x", block);
		return std::string("Unknown EDID Extension Block") + buf;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x68(%rbp)
movb %sil, %al
movq %rdi, %rcx
movq %rcx, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x58(%rbp)
testl %eax, %eax
je 0x7ac6
jmp 0x7a41
movl -0x58(%rbp), %eax
subl $0x2, %eax
je 0x7b11
jmp 0x7a4f
movl -0x58(%rbp), %eax
subl $0x10, %eax
je 0x7b5c
jmp 0x7a5d
movl -0x58(%rbp), %eax
subl $0x20, %eax
je 0x7ba7
jmp 0x7a6b
movl -0x58(%rbp), %eax
subl $0x40, %eax
je 0x7bf8
jmp 0x7a79
movl -0x58(%rbp), %eax
subl $0x50, %eax
je 0x7c49
jmp 0x7a87
movl -0x58(%rbp), %eax
subl $0x60, %eax
je 0x7c9a
jmp 0x7a95
movl -0x58(%rbp), %eax
subl $0x70, %eax
je 0x7ceb
jmp 0x7aa3
movl -0x58(%rbp), %eax
subl $0xf0, %eax
je 0x7d3c
jmp 0x7ab3
movl -0x58(%rbp), %eax
subl $0xff, %eax
je 0x7d8d
jmp 0x7dde
leaq -0x14(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x27b32(%rip), %rsi     # 0x2f614
callq 0xb510
jmp 0x7ae9
leaq -0x14(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x25(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x27af1(%rip), %rsi     # 0x2f61e
callq 0xb510
jmp 0x7b34
leaq -0x25(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x25(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x26(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rdx
leaq 0x27abe(%rip), %rsi     # 0x2f636
callq 0xb510
jmp 0x7b7f
leaq -0x26(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x27(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x88(%rbp), %rdx
leaq 0x27a8a(%rip), %rsi     # 0x2f653
callq 0xb510
jmp 0x7bd0
leaq -0x27(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x28(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x90(%rbp), %rdx
leaq 0x27a52(%rip), %rsi     # 0x2f66c
callq 0xb510
jmp 0x7c21
leaq -0x28(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x29(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0x98(%rbp), %rdx
leaq 0x27a25(%rip), %rsi     # 0x2f690
callq 0xb510
jmp 0x7c72
leaq -0x29(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x2a(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0xa0(%rbp), %rdx
leaq 0x279f5(%rip), %rsi     # 0x2f6b1
callq 0xb510
jmp 0x7cc3
leaq -0x2a(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x2b(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0xa8(%rbp), %rdx
leaq 0x279cb(%rip), %rsi     # 0x2f6d8
callq 0xb510
jmp 0x7d14
leaq -0x2b(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2b(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x2c(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0xb0(%rbp), %rdx
leaq 0x27994(%rip), %rsi     # 0x2f6f2
callq 0xb510
jmp 0x7d65
leaq -0x2c(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2c(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
leaq -0x2d(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x4560
movq -0x68(%rbp), %rdi
movq -0xb8(%rbp), %rdx
leaq 0x2795d(%rip), %rsi     # 0x2f70c
callq 0xb510
jmp 0x7db6
leaq -0x2d(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x2d(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
movzbl -0x9(%rbp), %edx
leaq 0x27cd3(%rip), %rsi     # 0x2fabc
xorl %eax, %eax
leaq -0x13(%rbp), %rdi
callq 0x40a0
leaq -0x51(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x4560
movq -0xc0(%rbp), %rdx
leaq 0x27920(%rip), %rsi     # 0x2f732
leaq -0x50(%rbp), %rdi
callq 0xb510
jmp 0x7e1d
movq -0x68(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x13(%rbp), %rdx
callq 0xb4c0
jmp 0x7e30
leaq -0x50(%rbp), %rdi
callq 0x41f0
leaq -0x51(%rbp), %rdi
callq 0x4370
jmp 0x7e72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x7e67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x41f0
leaq -0x51(%rbp), %rdi
callq 0x4370
jmp 0x7e7f
movq -0x60(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x4550
nopl (%rax,%rax)