// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: print_detailed_timing(unsigned int, timings const*)
static void print_detailed_timing(unsigned indent, const struct timings *t)
{
	printf("%*sHfront %4d Hsync %3u Hback %3d Hpol %s",
	       indent, "",
	       t->hfp, t->hsync, t->hbp, t->pos_pol_hsync ? "P" : "N");
	if (t->hborder)
		printf(" Hborder %u", t->hborder);
	printf("\n");

	printf("%*sVfront %4u Vsync %3u Vback %3d",
	       indent, "", t->vfp, t->vsync, t->vbp);
	if (!t->no_pol_vsync)
		printf(" Vpol %s", t->pos_pol_vsync ? "P" : "N");
	if (t->vborder)
		printf(" Vborder %u", t->vborder);
	if (t->even_vtotal) {
		printf(" Both Fields");
	} else if (t->interlaced) {
		printf(" Vfront +0.5 Odd Field\n");
		printf("%*sVfront %4d Vsync %3u Vback %3d",
		       indent, "", t->vfp, t->vsync, t->vbp);
		if (!t->no_pol_vsync)
			printf(" Vpol %s", t->pos_pol_vsync ? "P" : "N");
		if (t->vborder)
			printf(" Vborder %u", t->vborder);
		printf(" Vback  +0.5 Even Field");
	}
	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x28(%rax)
je 0x71ea
leaq 0x28d04(%rip), %rax     # 0x2fee8
movq %rax, -0x28(%rbp)
jmp 0x71f7
leaq 0x28048(%rip), %rax     # 0x2f239
movq %rax, -0x28(%rbp)
jmp 0x71f7
movl -0x14(%rbp), %r9d
movl -0x18(%rbp), %r8d
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %esi
movq -0x28(%rbp), %rax
leaq 0x28cae(%rip), %rdi     # 0x2febe
leaq 0x28ca2(%rip), %rdx     # 0x2feb9
movq %rax, (%rsp)
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
je 0x7241
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %esi
leaq 0x28cb0(%rip), %rdi     # 0x2feea
movb $0x0, %al
callq 0x4050
leaq 0x286c1(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
movl -0x4(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x30(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0x34(%rax), %r9d
leaq 0x28c86(%rip), %rdi     # 0x2fef6
leaq 0x28c42(%rip), %rdx     # 0x2feb9
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
testb $0x1, 0x45(%rax)
jne 0x72be
movq -0x10(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0x729f
leaq 0x28c4f(%rip), %rax     # 0x2fee8
movq %rax, -0x30(%rbp)
jmp 0x72ac
leaq 0x27f93(%rip), %rax     # 0x2f239
movq %rax, -0x30(%rbp)
jmp 0x72ac
movq -0x30(%rbp), %rsi
leaq 0x28c61(%rip), %rdi     # 0x2ff18
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0x72dd
movq -0x10(%rbp), %rax
movl 0x40(%rax), %esi
leaq 0x28c4b(%rip), %rdi     # 0x2ff21
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
testb $0x1, 0x44(%rax)
je 0x72fa
leaq 0x28c3f(%rip), %rdi     # 0x2ff2d
movb $0x0, %al
callq 0x4050
jmp 0x73b4
movq -0x10(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x73b2
leaq 0x28c2b(%rip), %rdi     # 0x2ff3a
movb $0x0, %al
callq 0x4050
movl -0x4(%rbp), %esi
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x30(%rax), %r8d
movq -0x10(%rbp), %rax
movl 0x34(%rax), %r9d
leaq 0x28c1b(%rip), %rdi     # 0x2ff52
leaq 0x28b7b(%rip), %rdx     # 0x2feb9
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
testb $0x1, 0x45(%rax)
jne 0x7385
movq -0x10(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0x7366
leaq 0x28b88(%rip), %rax     # 0x2fee8
movq %rax, -0x38(%rbp)
jmp 0x7373
leaq 0x27ecc(%rip), %rax     # 0x2f239
movq %rax, -0x38(%rbp)
jmp 0x7373
movq -0x38(%rbp), %rsi
leaq 0x28b9a(%rip), %rdi     # 0x2ff18
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0x73a4
movq -0x10(%rbp), %rax
movl 0x40(%rax), %esi
leaq 0x28b84(%rip), %rdi     # 0x2ff21
movb $0x0, %al
callq 0x4050
leaq 0x28bc9(%rip), %rdi     # 0x2ff74
movb $0x0, %al
callq 0x4050
jmp 0x73b4
leaq 0x2854e(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)