// File: /workspace/github_cpp_makefile_star2_O3/rpavlik[P]edid-decode/parse-base-block.cpp
// Function: edid_state::list_established_timings()
void edid_state::list_established_timings()
{
	printf("Established Timings I & II, 'Byte' is the EDID address:\n\n");
	for (unsigned i = 0; i < ARRAY_SIZE(established_timings12); i++) {
		unsigned char dmt_id = established_timings12[i].dmt_id;
		const struct timings *t;
		char type[16];

		if (dmt_id) {
			sprintf(type, "DMT 0x%02x", dmt_id);
			t = find_dmt_id(dmt_id);
		} else {
			t = &established_timings12[i].t;
			sprintf(type, "%-8s", established_timings12[i].type);
		}
		printf("Byte 0x%02x, Bit %u: ", 0x23 + i / 8, 7 - i % 8);
		print_timings("", t, type, "", false, false);
	}
	printf("\nEstablished timings III, 'Byte' is the offset from the start of the descriptor:\n\n");
	for (unsigned i = 0; i < ARRAY_SIZE(established_timings3_dmt_ids); i++) {
		unsigned char dmt_id = established_timings3_dmt_ids[i];
		char type[16];

		sprintf(type, "DMT 0x%02x", dmt_id);
		printf("Byte 0x%02x, Bit %u: ", 6 + i / 8, 7 - i % 8);
		print_timings("", find_dmt_id(dmt_id), type, "", false, false);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x1d5a8(%rip), %rdi     # 0x263d8
callq 0x3380
leaq 0x307d4(%rip), %rax     # 0x39610
leaq 0x10(%rsp), %r13
leaq 0x19728(%rip), %r12     # 0x22570
xorl %r15d, %r15d
leaq (%r15,%r15,2), %r14
shlq $0x5, %r14
movzbl (%r14,%rax), %ebp
testl %ebp, %ebp
je 0x8e88
movq %r13, %rdi
leaq 0x17a79(%rip), %rsi     # 0x208df
movl %ebp, %edx
xorl %eax, %eax
callq 0x3070
xorl %eax, %eax
cmpl %ebp, (%rax,%r12)
je 0x8ea6
addq $0x60, %rax
cmpq $0x2100, %rax           # imm = 0x2100
jne 0x8e71
xorl %r14d, %r14d
jmp 0x8eae
addq %rax, %r14
movq 0x58(%r14), %rdx
addq $0x4, %r14
movq %r13, %rdi
leaq 0x1b883(%rip), %rsi     # 0x24720
xorl %eax, %eax
callq 0x3070
jmp 0x8eae
leaq (%rax,%r12), %r14
addq $0xc, %r14
movl %r15d, %edx
notl %edx
movl %r15d, %esi
shrl $0x3, %esi
addl $0x23, %esi
andl $0x7, %edx
leaq 0x1b85f(%rip), %rdi     # 0x24725
xorl %eax, %eax
callq 0x3030
movl $0x0, (%rsp)
movq %rbx, %rdi
leaq 0x17dab(%rip), %rsi     # 0x20c89
movq %r14, %rdx
movq %r13, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
callq 0x3e8c
incq %r15
cmpq $0x11, %r15
leaq 0x30713(%rip), %rax     # 0x39610
jne 0x8e4b
leaq 0x1d507(%rip), %rdi     # 0x26411
callq 0x3380
leaq 0x10(%rsp), %r15
leaq 0x17d6e(%rip), %r13     # 0x20c89
xorl %r14d, %r14d
leaq 0x1b74b(%rip), %rax     # 0x24670
movzbl (%r14,%rax), %ebp
movq %r15, %rdi
leaq 0x179ab(%rip), %rsi     # 0x208df
movl %ebp, %edx
xorl %eax, %eax
callq 0x3070
movl %r14d, %edx
notl %edx
movl %r14d, %esi
shrl $0x3, %esi
addl $0x6, %esi
andl $0x7, %edx
leaq 0x1b7d0(%rip), %rdi     # 0x24725
xorl %eax, %eax
callq 0x3030
xorl %eax, %eax
cmpl %ebp, (%rax,%r12)
je 0x8f74
addq $0x60, %rax
cmpq $0x2100, %rax           # imm = 0x2100
jne 0x8f5e
xorl %edx, %edx
jmp 0x8f7c
leaq (%rax,%r12), %rdx
addq $0xc, %rdx
movl $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x3e8c
incq %r14
cmpq $0x2c, %r14
jne 0x8f1e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq