// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: audio_format[abi:cxx11](unsigned char)
static std::string audio_format(unsigned char x)
{
	switch (x) {
	case 1: return "Linear PCM";
	case 2: return "AC-3";
	case 3: return "MPEG 1 (Layers 1 & 2)";
	case 4: return "MPEG 1 Layer 3 (MP3)";
	case 5: return "MPEG2 (multichannel)";
	case 6: return "AAC LC";
	case 7: return "DTS";
	case 8: return "ATRAC";
	case 9: return "One Bit Audio";
	case 10: return "Enhanced AC-3 (DD+)";
	case 11: return "DTS-HD";
	case 12: return "MAT (MLP)";
	case 13: return "DST";
	case 14: return "WMA Pro";
	default: break;
	}
	fail("Unknown Audio Format 0x%02x.\n", x);
	return std::string("Unknown Audio Format (") + utohex(x) + ")";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xb0(%rbp)
movb %sil, %al
movq %rdi, %rcx
movq %rcx, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0xa0(%rbp)
subl $0xd, %eax
ja 0x1ef0d
movq -0xa0(%rbp), %rax
leaq 0x17554(%rip), %rcx     # 0x35fc0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0xa(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rdx
leaq 0x1de01(%rip), %rsi     # 0x3c89b
callq 0xb510
jmp 0x1eaa1
leaq -0xa(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0xa(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x1d(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xc0(%rbp), %rdx
leaq 0x1ddb8(%rip), %rsi     # 0x3c8a6
callq 0xb510
jmp 0x1eaf5
leaq -0x1d(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x1e(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x1dd69(%rip), %rsi     # 0x3c8ab
callq 0xb510
jmp 0x1eb49
leaq -0x1e(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1e(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x1f(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xd0(%rbp), %rdx
leaq 0x1dd2b(%rip), %rsi     # 0x3c8c1
callq 0xb510
jmp 0x1eb9d
leaq -0x1f(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1f(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x20(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xd8(%rbp), %rdx
leaq 0x1dcec(%rip), %rsi     # 0x3c8d6
callq 0xb510
jmp 0x1ebf1
leaq -0x20(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x21(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xe0(%rbp), %rdx
leaq 0x1ea4d(%rip), %rsi     # 0x3d68b
callq 0xb510
jmp 0x1ec45
leaq -0x21(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x22(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xe8(%rbp), %rdx
leaq 0x1dc59(%rip), %rsi     # 0x3c8eb
callq 0xb510
jmp 0x1ec99
leaq -0x22(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x22(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x23(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xf0(%rbp), %rdx
leaq 0x1dc09(%rip), %rsi     # 0x3c8ef
callq 0xb510
jmp 0x1eced
leaq -0x23(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x23(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x24(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x1dbbb(%rip), %rsi     # 0x3c8f5
callq 0xb510
jmp 0x1ed41
leaq -0x24(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x24(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x25(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0x100(%rbp), %rdx
leaq 0x1db75(%rip), %rsi     # 0x3c903
callq 0xb510
jmp 0x1ed95
leaq -0x25(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x25(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x26(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq 0x1db35(%rip), %rsi     # 0x3c917
callq 0xb510
jmp 0x1ede9
leaq -0x26(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x27(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0x110(%rbp), %rdx
leaq 0x1dae8(%rip), %rsi     # 0x3c91e
callq 0xb510
jmp 0x1ee3d
leaq -0x27(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x27(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x28(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0x118(%rbp), %rdx
leaq 0x1da9e(%rip), %rsi     # 0x3c928
callq 0xb510
jmp 0x1ee91
leaq -0x28(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4370
jmp 0x1f026
leaq -0x29(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x4560
movq -0xb0(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0x1da4e(%rip), %rsi     # 0x3c92c
callq 0xb510
jmp 0x1eee5
leaq -0x29(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x4370
jmp 0x1f026
jmp 0x1ef0f
movzbl -0x9(%rbp), %edx
leaq 0x1da1a(%rip), %rsi     # 0x3c934
xorl %edi, %edi
movb %dil, %al
callq 0x47d0
leaq -0x71(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x4560
movq -0x128(%rbp), %rdx
leaq 0x1da10(%rip), %rsi     # 0x3c952
leaq -0x70(%rbp), %rdi
callq 0xb510
jmp 0x1ef4d
movzbl -0x9(%rbp), %esi
leaq -0x98(%rbp), %rdi
callq 0x7530
jmp 0x1ef5f
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0xb7b0
jmp 0x1ef75
movq -0xb0(%rbp), %rdi
leaq 0x1d992(%rip), %rdx     # 0x3c915
leaq -0x50(%rbp), %rsi
callq 0xb4c0
jmp 0x1ef8e
leaq -0x50(%rbp), %rdi
callq 0x41f0
leaq -0x98(%rbp), %rdi
callq 0x41f0
leaq -0x70(%rbp), %rdi
callq 0x41f0
leaq -0x71(%rbp), %rdi
callq 0x4370
jmp 0x1f016
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1f00b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1f002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x1eff6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x41f0
leaq -0x98(%rbp), %rdi
callq 0x41f0
leaq -0x70(%rbp), %rdi
callq 0x41f0
leaq -0x71(%rbp), %rdi
callq 0x4370
jmp 0x1f026
movq -0xa8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4550
nop