// File: /workspace/github_cpp_makefile_star2_O3/rpavlik[P]edid-decode/parse-displayid-block.cpp
// Function: edid_state::parse_displayid_type_4_8_timing(unsigned char, unsigned short, bool)
void edid_state::parse_displayid_type_4_8_timing(unsigned char type, unsigned short id, bool is_cta)
{
	const struct timings *t = NULL;
	char type_name[16];

	switch (type) {
	case 0: t = find_dmt_id(id); sprintf(type_name, "DMT 0x%02x", id); break;
	case 1: t = find_vic_id(id); sprintf(type_name, "VIC %3u", id); break;
	case 2: t = find_hdmi_vic_id(id); sprintf(type_name, "HDMI VIC %u", id); break;
	default: break;
	}
	if (t)
		print_timings("    ", t, type_name);
	if (t && is_cta && !cta.t8vtdb.is_valid()) {
		timings_ext te(*t, type_name, "");
		cta.t8vtdb = te;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %ecx, %ebp
movl %edx, %r15d
movq %rdi, %rbx
cmpl $0x2, %esi
je 0x17823
cmpl $0x1, %esi
je 0x1780e
testl %esi, %esi
jne 0x179a9
movzbl %r15b, %edi
callq 0x8df0
movq %rax, %r14
leaq 0x90d3(%rip), %rsi      # 0x208df
jmp 0x17836
movzbl %r15b, %edi
callq 0xdfcf
movq %rax, %r14
leaq 0x90e3(%rip), %rsi      # 0x20904
jmp 0x17836
movzbl %r15b, %edi
callq 0xe00e
movq %rax, %r14
leaq 0x90ec(%rip), %rsi      # 0x20922
movzwl %r15w, %edx
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x3070
testq %r14, %r14
je 0x179a9
movl $0x1, (%rsp)
leaq 0xdc3a(%rip), %rsi      # 0x25497
leaq 0x9425(%rip), %r8       # 0x20c89
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rdx
xorl %r9d, %r9d
callq 0x3e8c
testb %bpl, %bpl
je 0x179a9
cmpl $0x0, 0x210(%rbx)
jne 0x179a9
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x3110
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x8d58
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x93c0(%rip), %rdx      # 0x20c89
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x8d58
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r14, %rsi
callq 0xdb20
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x17904
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x210(%rbx), %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x17922
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0x68(%rsp), %rax
movl $0xa, %ecx
movq %r14, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl 0x50(%rax), %eax
movl %eax, 0x50(%r14)
leaq 0x268(%rbx), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x3140
addq $0x288, %rbx            # imm = 0x288
leaq 0xe0(%rsp), %rsi
movq %rbx, %rdi
callq 0x3140
leaq 0xf0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17988
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x3260
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x179a9
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x3260
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x179d8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x179d8
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x17a03
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3260
jmp 0x17a03
movq %rax, %rbx
jmp 0x17a03
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xdbdc
movq %rbx, %rdi
callq 0x3400
nop