// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d348(%rip), %rdi     # 0x26388
callq 0x3380
leaq 0x305c4(%rip), %rax     # 0x39610
leaq 0x10(%rsp), %r13
leaq 0x19508(%rip), %r12     # 0x22560
xorl %r15d, %r15d
leaq (%r15,%r15,2), %r14
shlq $0x5, %r14
movzbl (%r14,%rax), %ebp
testl %ebp, %ebp
je 0x9098
movq %r13, %rdi
leaq 0x17859(%rip), %rsi     # 0x208cf
movl %ebp, %edx
xorl %eax, %eax
callq 0x3070
xorl %eax, %eax
cmpl %ebp, (%rax,%r12)
je 0x90b6
addq $0x60, %rax
cmpq $0x2100, %rax           # imm = 0x2100
jne 0x9081
xorl %r14d, %r14d
jmp 0x90be
addq %rax, %r14
movq 0x58(%r14), %rdx
addq $0x4, %r14
movq %r13, %rdi
leaq 0x1b623(%rip), %rsi     # 0x246d0
xorl %eax, %eax
callq 0x3070
jmp 0x90be
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 0x1b5ff(%rip), %rdi     # 0x246d5
xorl %eax, %eax
callq 0x3030
movl $0x0, (%rsp)
movq %rbx, %rdi
leaq 0x17b8b(%rip), %rsi     # 0x20c79
movq %r14, %rdx
movq %r13, %rcx
movq %rsi, %r8
xorl %r9d, %r9d
callq 0x3ebe
incq %r15
cmpq $0x11, %r15
leaq 0x30503(%rip), %rax     # 0x39610
jne 0x905b
leaq 0x1d2a7(%rip), %rdi     # 0x263c1
callq 0x3380
leaq 0x10(%rsp), %r15
leaq 0x17b4e(%rip), %r13     # 0x20c79
xorl %r14d, %r14d
leaq 0x1b52b(%rip), %rax     # 0x24660
movzbl (%r14,%rax), %ebp
movq %r15, %rdi
leaq 0x1778b(%rip), %rsi     # 0x208cf
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 0x1b570(%rip), %rdi     # 0x246d5
xorl %eax, %eax
callq 0x3030
xorl %eax, %eax
cmpl %ebp, (%rax,%r12)
je 0x9184
addq $0x60, %rax
cmpq $0x2100, %rax           # imm = 0x2100
jne 0x916e
xorl %edx, %edx
jmp 0x918c
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 0x3ebe
incq %r14
cmpq $0x2c, %r14
jne 0x912e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq