LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: parse_cvt_subopt(char**, double*)
static int parse_cvt_subopt(char **subopt_str, double *value)
{
	int opt;
	char *opt_str;

	static const char * const subopt_list[] = {
		"w",
		"h",
		"fps",
		"interlaced",
		"overscan",
		"rb",
		"alt",
		nullptr
	};

	opt = getsubopt(subopt_str, (char* const*) subopt_list, &opt_str);

	if (opt == -1) {
		fprintf(stderr, "Invalid suboptions specified.\n");
		usage();
		std::exit(EXIT_FAILURE);
	}
	if (opt_str == nullptr && opt != CVT_INTERLACED && opt != CVT_ALT &&
	    opt != CVT_OVERSCAN) {
		fprintf(stderr, "No value given to suboption <%s>.\n",
				subopt_list[opt]);
		usage();
		std::exit(EXIT_FAILURE);
	}

	if (opt_str)
		*value = strtod(opt_str, nullptr);
	return opt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x40635(%rip), %rsi     # 0x4a690
leaq -0x20(%rbp), %rdx
callq 0x4310
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0xa094
movq 0x40f64(%rip), %rax     # 0x4afd8
movq (%rax), %rdi
leaq 0x2711d(%rip), %rsi     # 0x3119b
movb $0x0, %al
callq 0x4450
callq 0x9650
movl $0x1, %edi
callq 0x43c0
cmpq $0x0, -0x20(%rbp)
jne 0xa0e3
cmpl $0x3, -0x14(%rbp)
je 0xa0e3
cmpl $0x6, -0x14(%rbp)
je 0xa0e3
cmpl $0x4, -0x14(%rbp)
je 0xa0e3
movq 0x40f24(%rip), %rax     # 0x4afd8
movq (%rax), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x405ce(%rip), %rax     # 0x4a690
movq (%rax,%rcx,8), %rdx
leaq 0x270ed(%rip), %rsi     # 0x311ba
movb $0x0, %al
callq 0x4450
callq 0x9650
movl $0x1, %edi
callq 0x43c0
cmpq $0x0, -0x20(%rbp)
je 0xa0ff
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4260
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: parse_gtf_subopt(char**, double*)
static int parse_gtf_subopt(char **subopt_str, double *value)
{
	int opt;
	char *opt_str;

	static const char * const subopt_list[] = {
		"w",
		"h",
		"fps",
		"horfreq",
		"pixclk",
		"interlaced",
		"overscan",
		"secondary",
		"C",
		"M",
		"K",
		"J",
		nullptr
	};

	opt = getsubopt(subopt_str, (char * const *)subopt_list, &opt_str);

	if (opt == -1) {
		fprintf(stderr, "Invalid suboptions specified.\n");
		usage();
		std::exit(EXIT_FAILURE);
	}
	if (opt_str == nullptr && opt != GTF_INTERLACED && opt != GTF_OVERSCAN &&
	    opt != GTF_SECONDARY) {
		fprintf(stderr, "No value given to suboption <%s>.\n",
				subopt_list[opt]);
		usage();
		std::exit(EXIT_FAILURE);
	}

	if (opt == GTF_C2 || opt == GTF_J2)
		*value = round(2.0 * strtod(opt_str, nullptr));
	else if (opt_str)
		*value = strtod(opt_str, nullptr);
	return opt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x405a5(%rip), %rsi     # 0x4a6d0
leaq -0x20(%rbp), %rdx
callq 0x4310
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0xa164
movq 0x40e94(%rip), %rax     # 0x4afd8
movq (%rax), %rdi
leaq 0x2704d(%rip), %rsi     # 0x3119b
movb $0x0, %al
callq 0x4450
callq 0x9650
movl $0x1, %edi
callq 0x43c0
cmpq $0x0, -0x20(%rbp)
jne 0xa1b3
cmpl $0x5, -0x14(%rbp)
je 0xa1b3
cmpl $0x6, -0x14(%rbp)
je 0xa1b3
cmpl $0x7, -0x14(%rbp)
je 0xa1b3
movq 0x40e54(%rip), %rax     # 0x4afd8
movq (%rax), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x4053e(%rip), %rax     # 0x4a6d0
movq (%rax,%rcx,8), %rdx
leaq 0x2701d(%rip), %rsi     # 0x311ba
movb $0x0, %al
callq 0x4450
callq 0x9650
movl $0x1, %edi
callq 0x43c0
cmpl $0x8, -0x14(%rbp)
je 0xa1bf
cmpl $0xb, -0x14(%rbp)
jne 0xa1ea
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4260
movaps %xmm0, %xmm1
movsd 0x24e39(%rip), %xmm0    # 0x2f010
mulsd %xmm1, %xmm0
callq 0x4160
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xa208
cmpq $0x0, -0x20(%rbp)
je 0xa206
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4260
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
jmp 0xa208
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: extract_edid_hex(char const*, bool)
static bool extract_edid_hex(const char *s, bool require_two_digits = true)
{
	for (; *s; s++) {
		if (isspace(*s) || strchr(ignore_chars, *s))
			continue;

		if (*s == '0' && tolower(s[1]) == 'x') {
			s++;
			continue;
		}

		/* Read one or two hex digits from the log */
		if (!isxdigit(s[0])) {
			if (state.edid_size && state.edid_size % 128 == 0)
				break;
			return false;
		}
		if (require_two_digits && !isxdigit(s[1])) {
			odd_hex_digits = true;
			return false;
		}
		if (!edid_add_byte(s, isxdigit(s[1])))
			return false;
		if (isxdigit(s[1]))
			s++;
	}
	return state.edid_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0xa8af
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x4060
cmpl $0x0, %eax
jne 0xa7bb
movq 0x40ed7(%rip), %rdi     # 0x4b680
movq -0x10(%rbp), %rax
movsbl (%rax), %esi
callq 0x4120
cmpq $0x0, %rax
je 0xa7c0
jmp 0xa89e
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0xa7ef
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x4470
cmpl $0x78, %eax
jne 0xa7ef
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa89e
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
jne 0xa825
cmpl $0x0, 0x41349(%rip)     # 0x4bb50
je 0xa81c
movl 0x41341(%rip), %eax     # 0x4bb50
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0xa81c
jmp 0xa8af
movb $0x0, -0x1(%rbp)
jmp 0xa8be
testb $0x1, -0x11(%rbp)
je 0xa84a
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
jne 0xa84a
movb $0x1, 0x4dddc(%rip)     # 0x58620
movb $0x0, -0x1(%rbp)
jmp 0xa8be
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x40c0
movq -0x20(%rbp), %rdi
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xac30
testb $0x1, %al
jne 0xa87e
movb $0x0, -0x1(%rbp)
jmp 0xa8be
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
je 0xa89c
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa89e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xa784
cmpl $0x0, 0x4129a(%rip)     # 0x4bb50
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: extract_edid_quantumdata(char const*)
static bool extract_edid_quantumdata(const char *start)
{
	/* Parse QuantumData 980 EDID files */
	do {
		start = strstr(start, ">");
		if (!start)
			return false;
		start++;
		for (unsigned i = 0; start[i] && start[i + 1] && i < 256; i += 2)
			if (!edid_add_byte(start + i))
				return false;
		start = strstr(start, "<BLOCK");
	} while (start);
	return state.edid_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x26c05(%rip), %rsi     # 0x314ec
callq 0x40b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa900
movb $0x0, -0x1(%rbp)
jmp 0xa9af
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpb $0x0, (%rcx,%rdx)
movb %al, -0x15(%rbp)
je 0xa94d
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
xorl %eax, %eax
cmpb $0x0, (%rcx,%rdx)
movb %al, -0x15(%rbp)
je 0xa94d
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
setb %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
testb $0x1, %al
jne 0xa956
jmp 0xa981
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
addq %rax, %rdi
movl $0x1, %esi
callq 0xac30
testb $0x1, %al
jne 0xa974
movb $0x0, -0x1(%rbp)
jmp 0xa9af
jmp 0xa976
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0xa913
movq -0x10(%rbp), %rdi
leaq 0x269a9(%rip), %rsi     # 0x31335
callq 0x40b0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xa8dc
cmpl $0x0, 0x411a9(%rip)     # 0x4bb50
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: extract_edid_xrandr(char const*)
static bool extract_edid_xrandr(const char *start)
{
	static const char indentation1[] = "                ";
	static const char indentation2[] = "\t\t";
	/* Used to detect that we've gone past the EDID property */
	static const char half_indentation1[] = "        ";
	static const char half_indentation2[] = "\t";
	const char *indentation;
	const char *s;

	for (;;) {
		unsigned j;

		/* Get the next start of the line of EDID hex, assuming spaces for indentation */
		s = strstr(start, indentation = indentation1);
		/* Did we skip the start of another property? */
		if (s && s > strstr(start, half_indentation1))
			break;

		/* If we failed, retry assuming tabs for indentation */
		if (!s) {
			s = strstr(start, indentation = indentation2);
			/* Did we skip the start of another property? */
			if (s && s > strstr(start, half_indentation2))
				break;
		}

		if (!s)
			break;

		start = s + strlen(indentation);

		for (j = 0; j < 16; j++, start += 2) {
			/* Read a %02x from the log */
			if (!isxdigit(start[0]) || !isxdigit(start[1])) {
				if (j)
					break;
				return false;
			}
			if (!edid_add_byte(start))
				return false;
		}
	}
	return state.edid_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x24839(%rip), %rax     # 0x2f210
movq %rax, -0x18(%rbp)
leaq 0x2482e(%rip), %rsi     # 0x2f210
callq 0x40b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xaa1b
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2481f(%rip), %rsi     # 0x2f224
callq 0x40b0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jbe 0xaa1b
jmp 0xab12
cmpq $0x0, -0x20(%rbp)
jne 0xaa73
movq -0x10(%rbp), %rdi
leaq 0x247f4(%rip), %rax     # 0x2f221
movq %rax, -0x18(%rbp)
leaq 0x247e9(%rip), %rsi     # 0x2f221
callq 0x40b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xaa71
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x247d2(%rip), %rsi     # 0x2f22d
callq 0x40b0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jbe 0xaa71
jmp 0xab12
jmp 0xaa73
cmpq $0x0, -0x20(%rbp)
jne 0xaa7f
jmp 0xab12
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4180
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jae 0xab0d
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
je 0xaace
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
jne 0xaadc
cmpl $0x0, -0x24(%rbp)
je 0xaad6
jmp 0xab0d
movb $0x0, -0x1(%rbp)
jmp 0xab21
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xac30
testb $0x1, %al
jne 0xaaf4
movb $0x0, -0x1(%rbp)
jmp 0xab21
jmp 0xaaf6
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0xaaa5
jmp 0xa9cc
cmpl $0x0, 0x41037(%rip)     # 0x4bb50
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: extract_edid_xorg(char const*)
static bool extract_edid_xorg(const char *start)
{
	bool find_first_num = true;

	for (; *start; start++) {
		if (find_first_num) {
			const char *s;

			/* skip ahead to the : */
			s = strstr(start, ": \t");
			if (!s)
				s = strstr(start, ":     ");
			if (!s)
				break;
			start = s;
			/* and find the first number */
			while (!isxdigit(start[1]))
				start++;
			find_first_num = false;
			continue;
		} else {
			/* Read a %02x from the log */
			if (!isxdigit(*start)) {
				find_first_num = true;
				continue;
			}
			if (!edid_add_byte(start))
				return false;
			start++;
		}
	}
	return state.edid_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0xac13
testb $0x1, -0x11(%rbp)
je 0xabc5
movq -0x10(%rbp), %rdi
leaq 0x26848(%rip), %rsi     # 0x313a6
callq 0x40b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xab82
movq -0x10(%rbp), %rdi
leaq 0x26831(%rip), %rsi     # 0x313aa
callq 0x40b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xab8e
jmp 0xac13
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xabb1
jmp 0xabbf
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xab96
movb $0x0, -0x11(%rbp)
jmp 0xac02
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x40c0
cmpl $0x0, %eax
jne 0xabdc
movb $0x1, -0x11(%rbp)
jmp 0xac02
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xac30
testb $0x1, %al
jne 0xabf4
movb $0x0, -0x1(%rbp)
jmp 0xac22
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xac02
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xab40
cmpl $0x0, 0x40f36(%rip)     # 0x4bb50
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_add_byte(char const*, bool)
static bool edid_add_byte(const char *s, bool two_digits = true)
{
	char buf[3];

	if (state.edid_size == sizeof(edid))
		return false;
	buf[0] = s[0];
	buf[1] = two_digits ? s[1] : 0;
	buf[2] = 0;
	edid[state.edid_size++] = strtoul(buf, NULL, 16);
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movl 0x40f06(%rip), %eax     # 0x4bb50
cmpq $0x8000, %rax           # imm = 0x8000
jne 0xac58
movb $0x0, -0x1(%rbp)
jmp 0xacbc
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x14(%rbp)
testb $0x1, -0x11(%rbp)
je 0xac74
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
movl %eax, -0x18(%rbp)
jmp 0xac7b
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0xac7b
movl -0x18(%rbp), %eax
movb %al, -0x13(%rbp)
movb $0x0, -0x12(%rbp)
leaq -0x14(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x4100
movb %al, %dl
movl 0x40eb1(%rip), %eax     # 0x4bb50
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x40ea6(%rip)     # 0x4bb50
movl %eax, %eax
movl %eax, %ecx
leaq 0x4596b(%rip), %rax     # 0x50620
movb %dl, (%rax,%rcx)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: hexdumpedid(_IO_FILE*, unsigned char const*, unsigned int)
static void hexdumpedid(FILE *f, const unsigned char *edid, unsigned size)
{
	unsigned b, i, j;

	for (b = 0; b < size / 128; b++) {
		const unsigned char *buf = edid + 128 * b;

		if (b)
			fprintf(f, "\n");
		for (i = 0; i < 128; i += 0x10) {
			fprintf(f, "%02x", buf[i]);
			for (j = 1; j < 0x10; j++) {
				fprintf(f, " %02x", buf[i + j]);
			}
			fprintf(f, "\n");
		}
		if (!crc_ok(buf))
			fprintf(f, "Block %u has a checksum error (should be 0x%02x).\n",
				b, crc_calc(buf));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shrl $0x7, %ecx
cmpl %ecx, %eax
jae 0xadf7
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
shll $0x7, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0xad26
movq -0x8(%rbp), %rdi
leaq 0x24bea(%rip), %rsi     # 0x2f909
movb $0x0, %al
callq 0x4450
movl $0x0, -0x1c(%rbp)
cmpl $0x80, -0x1c(%rbp)
jae 0xadaa
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %edx
leaq 0x26671(%rip), %rsi     # 0x313bd
movb $0x0, %al
callq 0x4450
movl $0x1, -0x20(%rbp)
cmpl $0x10, -0x20(%rbp)
jae 0xad8d
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
leaq 0x26641(%rip), %rsi     # 0x313bc
movb $0x0, %al
callq 0x4450
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xad5a
movq -0x8(%rbp), %rdi
leaq 0x24b71(%rip), %rsi     # 0x2f909
movb $0x0, %al
callq 0x4450
movl -0x1c(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x1c(%rbp)
jmp 0xad2d
movq -0x28(%rbp), %rdi
callq 0xb080
cmpl $0x0, %eax
jne 0xade7
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xb0b0
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %edx
movzbl %al, %ecx
leaq 0x265e2(%rip), %rsi     # 0x313c2
movb $0x0, %al
callq 0x4450
jmp 0xade9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xacea
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: carraydumpedid(_IO_FILE*, unsigned char const*, unsigned int)
static void carraydumpedid(FILE *f, const unsigned char *edid, unsigned size)
{
	unsigned b, i, j;

	fprintf(f, "const unsigned char edid[] = {\n");
	for (b = 0; b < size / 128; b++) {
		const unsigned char *buf = edid + 128 * b;

		if (b)
			fprintf(f, "\n");
		for (i = 0; i < 128; i += 8) {
			fprintf(f, "\t0x%02x,", buf[i]);
			for (j = 1; j < 8; j++) {
				fprintf(f, " 0x%02x,", buf[i + j]);
			}
			fprintf(f, "\n");
		}
		if (!crc_ok(buf))
			fprintf(f, "\t/* Block %u has a checksum error (should be 0x%02x). */\n",
				b, crc_calc(buf));
	}
	fprintf(f, "};\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x265d7(%rip), %rsi     # 0x313f5
movb $0x0, %al
callq 0x4450
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shrl $0x7, %ecx
cmpl %ecx, %eax
jae 0xaf39
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
shll $0x7, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0xae68
movq -0x8(%rbp), %rdi
leaq 0x24aa8(%rip), %rsi     # 0x2f909
movb $0x0, %al
callq 0x4450
movl $0x0, -0x1c(%rbp)
cmpl $0x80, -0x1c(%rbp)
jae 0xaeec
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %edx
leaq 0x26587(%rip), %rsi     # 0x31415
movb $0x0, %al
callq 0x4450
movl $0x1, -0x20(%rbp)
cmpl $0x8, -0x20(%rbp)
jae 0xaecf
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl -0x20(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
leaq 0x26561(%rip), %rsi     # 0x3141e
movb $0x0, %al
callq 0x4450
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xae9c
movq -0x8(%rbp), %rdi
leaq 0x24a2f(%rip), %rsi     # 0x2f909
movb $0x0, %al
callq 0x4450
movl -0x1c(%rbp), %eax
addl $0x8, %eax
movl %eax, -0x1c(%rbp)
jmp 0xae6f
movq -0x28(%rbp), %rdi
callq 0xb080
cmpl $0x0, %eax
jne 0xaf29
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0xb0b0
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %edx
movzbl %al, %ecx
leaq 0x26505(%rip), %rsi     # 0x31427
movb $0x0, %al
callq 0x4450
jmp 0xaf2b
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xae2c
movq -0x8(%rbp), %rdi
leaq 0x2651d(%rip), %rsi     # 0x31461
movb $0x0, %al
callq 0x4450
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: xmldumpedid(_IO_FILE*, unsigned char const*, unsigned int)
static void xmldumpedid(FILE *f, const unsigned char *edid, unsigned size)
{
	fprintf(f, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
	fprintf(f, "<DATAOBJ>\n");
	fprintf(f, "    <HEADER TYPE=\"DID\" VERSION=\"1.0\"/>\n");
	fprintf(f, "    <DATA>\n");
	for (unsigned b = 0; b < size / 128; b++) {
		const unsigned char *buf = edid + 128 * b;

		fprintf(f, "        <BLOCK%u>", b);
		for (unsigned i = 0; i < 128; i++)
			fprintf(f, "%02X", buf[i]);
		fprintf(f, "</BLOCK%u>\n", b);
	}
	fprintf(f, "    </DATA>\n");
	fprintf(f, "</DATAOBJ>\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x264e7(%rip), %rsi     # 0x31465
movb $0x0, %al
callq 0x4450
movq -0x8(%rbp), %rdi
leaq 0x2650d(%rip), %rsi     # 0x3149d
movb $0x0, %al
callq 0x4450
movq -0x8(%rbp), %rdi
leaq 0x26506(%rip), %rsi     # 0x314a8
movb $0x0, %al
callq 0x4450
movq -0x8(%rbp), %rdi
leaq 0x2651c(%rip), %rsi     # 0x314d0
movb $0x0, %al
callq 0x4450
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shrl $0x7, %ecx
cmpl %ecx, %eax
jae 0xb056
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
shll $0x7, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq 0x264e8(%rip), %rsi     # 0x314dc
movb $0x0, %al
callq 0x4450
movl $0x0, -0x24(%rbp)
cmpl $0x80, -0x24(%rbp)
jae 0xb033
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %edx
leaq 0x245e1(%rip), %rsi     # 0x2f602
movb $0x0, %al
callq 0x4450
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xb002
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq 0x264ad(%rip), %rsi     # 0x314ee
movb $0x0, %al
callq 0x4450
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xafc2
movq -0x8(%rbp), %rdi
leaq 0x26499(%rip), %rsi     # 0x314fa
movb $0x0, %al
callq 0x4450
movq -0x8(%rbp), %rdi
leaq 0x26494(%rip), %rsi     # 0x31507
movb $0x0, %al
callq 0x4450
addq $0x30, %rsp
popq %rbp
retq
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: crc_calc(unsigned char const*)
static unsigned char crc_calc(const unsigned char *b)
{
	unsigned char sum = 0;
	unsigned i;

	for (i = 0; i < 127; i++)
		sum += b[i];
	return 256 - sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x7f, -0x10(%rbp)
jae 0xb0e8
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movzbl -0x9(%rbp), %eax
addl %ecx, %eax
movb %al, -0x9(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xb0c3
movzbl -0x9(%rbp), %ecx
movl $0x100, %eax            # imm = 0x100
subl %ecx, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: rpavlik[P]edid-decode/parse-base-block.cpp
// Function: find_dmt_id(unsigned char)
const struct timings *find_dmt_id(unsigned char dmt_id)
{
	unsigned i;

	for (i = 0; i < ARRAY_SIZE(dmt_timings); i++)
		if (dmt_timings[i].dmt_id == dmt_id)
			return &dmt_timings[i].t;
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpq $0x58, %rax
jae 0xe711
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x2305a(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movzbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jne 0xe704
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x2303d(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $0xc, %rax
movq %rax, -0x8(%rbp)
jmp 0xe719
jmp 0xe706
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xe6c1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-base-block.cpp
// Function: close_match_to_dmt(timings const&, unsigned int&)
const struct timings *close_match_to_dmt(const timings &t, unsigned &dmt)
{
	for (unsigned i = 0; i < ARRAY_SIZE(dmt_timings); i++) {
		if (timings_close_match(t, dmt_timings[i].t)) {
			dmt = dmt_timings[i].dmt_id;
			return &dmt_timings[i].t;
		}
	}
	dmt = 0;
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x58, %rax
jae 0xe979
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %eax
leaq 0x22e12(%rip), %rsi     # 0x31730
imulq $0x60, %rax, %rax
addq %rax, %rsi
addq $0xc, %rsi
callq 0x4f10
testb $0x1, %al
jne 0xe934
jmp 0xe96c
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x22df0(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x22dd5(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $0xc, %rax
movq %rax, -0x8(%rbp)
jmp 0xe98b
jmp 0xe96e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xe907
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-base-block.cpp
// Function: find_std_id(unsigned short, unsigned char&)
static const struct timings *find_std_id(unsigned short std_id, unsigned char &dmt_id)
{
	unsigned i;

	for (i = 0; i < ARRAY_SIZE(dmt_timings); i++)
		if (dmt_timings[i].std_id == std_id) {
			dmt_id = dmt_timings[i].dmt_id;
			return &dmt_timings[i].t;
		}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0xa(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x58, %rax
jae 0xfc14
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x21b75(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jne 0xfc07
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x21b57(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x21b3a(%rip), %rax     # 0x31730
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $0xc, %rax
movq %rax, -0x8(%rbp)
jmp 0xfc1c
jmp 0xfc09
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xfba6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-base-block.cpp
// Function: edid_state::preparse_detailed_block(unsigned char const*)
void edid_state::preparse_detailed_block(const unsigned char *x)
{
	if (x[0] || x[1])
		return;
	if (x[3] != 0xfd)
		return;

	switch (x[10]) {
	case 0x00: /* default gtf */
		base.supports_gtf = true;
		break;
	case 0x02: /* secondary gtf curve */
		base.supports_gtf = true;
		base.supports_sec_gtf = !memchk(x + 12, 6);
		base.sec_gtf_start_freq = x[12] * 2;
		base.C = x[13] / 2.0;
		base.M = (x[15] << 8) | x[14];
		base.K = x[16];
		base.J = x[17] / 2.0;
		break;
	case 0x04: /* cvt */
		if (base.edid_minor >= 4) {
			/* GTF is implied if CVT is signaled */
			base.supports_gtf = true;
			base.supports_cvt = true;
		}
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x11efb
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1(%rax)
je 0x11f00
jmp 0x12019
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0xfd, %eax
je 0x11f14
jmp 0x12019
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x11f40
jmp 0x11f25
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x11f50
jmp 0x11f2f
movl -0x1c(%rbp), %eax
subl $0x4, %eax
je 0x11ff8
jmp 0x12019
movq -0x18(%rbp), %rax
movb $0x1, 0x91(%rax)
jmp 0x12019
movq -0x18(%rbp), %rax
movb $0x1, 0x91(%rax)
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movl $0x6, %esi
xorl %edx, %edx
callq 0x7810
movb %al, %cl
movq -0x18(%rbp), %rax
xorb $0x1, %cl
movb %cl, 0x92(%rax)
movq -0x10(%rbp), %rcx
movzbl 0xc(%rcx), %ecx
addl %ecx, %ecx
movl %ecx, 0x94(%rax)
movq -0x10(%rbp), %rcx
movzbl 0xd(%rcx), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x1d076(%rip), %xmm1    # 0x2f018
mulsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rax)
movq -0x10(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0xa0(%rax)
movq -0x10(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0xa8(%rax)
movq -0x10(%rbp), %rcx
movzbl 0x11(%rcx), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x1d026(%rip), %xmm1    # 0x2f010
divsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rax)
jmp 0x12019
movq -0x18(%rbp), %rax
cmpl $0x4, 0x88(%rax)
jb 0x12017
movq -0x18(%rbp), %rax
movb $0x1, 0x91(%rax)
movb $0x1, 0xb8(%rax)
jmp 0x12019
addq $0x20, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-base-block.cpp
// Function: manufacturer_name(unsigned char const*)
static char *manufacturer_name(const unsigned char *x)
{
	static char name[4];

	name[0] = ((x[0] & 0x7c) >> 2) + '@';
	name[1] = ((x[0] & 0x03) << 3) + ((x[1] & 0xe0) >> 5) + '@';
	name[2] = (x[1] & 0x1f) + '@';
	name[3] = 0;

	if (!isupper(name[0]) || !isupper(name[1]) || !isupper(name[2]))
		fail("Manufacturer name field contains garbage.\n");

	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
andl $0x7c, %eax
sarl $0x2, %eax
addl $0x40, %eax
movb %al, 0x4454e(%rip)      # 0x586b0
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
andl $0x3, %eax
shll $0x3, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
andl $0xe0, %ecx
sarl $0x5, %ecx
addl %ecx, %eax
addl $0x40, %eax
movb %al, 0x44526(%rip)      # 0x586b1
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x1f, %eax
addl $0x40, %eax
movb %al, 0x44513(%rip)      # 0x586b2
movb $0x0, 0x4450d(%rip)     # 0x586b3
movsbl 0x44503(%rip), %edi     # 0x586b0
callq 0x4250
cmpl $0x0, %eax
je 0x141d9
movsbl 0x444f3(%rip), %edi     # 0x586b1
callq 0x4250
cmpl $0x0, %eax
je 0x141d9
movsbl 0x444e3(%rip), %edi     # 0x586b2
callq 0x4250
cmpl $0x0, %eax
jne 0x141e9
xorl %edi, %edi
leaq 0x217a0(%rip), %rsi     # 0x35982
movb $0x0, %al
callq 0x47d0
leaq 0x444c0(%rip), %rax     # 0x586b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: find_vic_id(unsigned char)
const struct timings *find_vic_id(unsigned char vic)
{
	if (vic > 0 && vic <= ARRAY_SIZE(edid_cta_modes1))
		return edid_cta_modes1 + vic - 1;
	if (vic >= 193 && vic < ARRAY_SIZE(edid_cta_modes2) + 193)
		return edid_cta_modes2 + vic - 193;
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0x0, %eax
jle 0x1550c
movzbl -0x9(%rbp), %eax
cmpq $0x7f, %rax
ja 0x1550c
movzbl -0x9(%rbp), %eax
movslq %eax, %rcx
leaq 0x20ba5(%rip), %rax     # 0x360a0
imulq $0x54, %rcx, %rcx
addq %rcx, %rax
addq $-0x54, %rax
movq %rax, -0x8(%rbp)
jmp 0x1554c
movzbl -0x9(%rbp), %eax
cmpl $0xc1, %eax
jl 0x15544
movzbl -0x9(%rbp), %eax
cmpq $0xdc, %rax
jae 0x15544
movzbl -0x9(%rbp), %eax
movslq %eax, %rcx
leaq 0x2351f(%rip), %rax     # 0x38a50
imulq $0x54, %rcx, %rcx
addq %rcx, %rax
addq $-0x3f54, %rax          # imm = 0xC0AC
movq %rax, -0x8(%rbp)
jmp 0x1554c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: cta_close_match_to_vic(timings const&, unsigned int&)
const struct timings *cta_close_match_to_vic(const timings &t, unsigned &vic)
{
	for (vic = 1; vic <= ARRAY_SIZE(edid_cta_modes1); vic++) {
		if (timings_close_match(t, edid_cta_modes1[vic - 1]))
			return &edid_cta_modes1[vic - 1];
	}
	for (vic = 193; vic < ARRAY_SIZE(edid_cta_modes2) + 193; vic++) {
		if (timings_close_match(t, edid_cta_modes1[vic - 193]))
			return &edid_cta_modes1[vic - 193];
	}
	vic = 0;
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpq $0x7f, %rax
ja 0x15641
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, %eax
leaq 0x20aa4(%rip), %rsi     # 0x360a0
imulq $0x54, %rax, %rax
addq %rax, %rsi
callq 0x4f10
testb $0x1, %al
jne 0x1560e
jmp 0x15632
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x20a7e(%rip), %rax     # 0x360a0
imulq $0x54, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x156c7
jmp 0x15634
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x155da
movq -0x18(%rbp), %rax
movl $0xc1, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpq $0xdc, %rax
jae 0x156b5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0xc1, %eax
movl %eax, %eax
leaq 0x20a2f(%rip), %rsi     # 0x360a0
imulq $0x54, %rax, %rax
addq %rax, %rsi
callq 0x4f10
testb $0x1, %al
jne 0x15683
jmp 0x156a6
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl $0xc1, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x20a07(%rip), %rax     # 0x360a0
imulq $0x54, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x156c7
jmp 0x156a8
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x1564b
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_list_vics()
void edid_state::cta_list_vics()
{
	char type[16];
	for (unsigned vic = 1; vic <= ARRAY_SIZE(edid_cta_modes1); vic++) {
		sprintf(type, "VIC %3u", vic);
		print_timings("", &edid_cta_modes1[vic - 1], type, "", false, false);
	}
	for (unsigned vic = 193; vic < ARRAY_SIZE(edid_cta_modes2) + 193; vic++) {
		sprintf(type, "VIC %3u", vic);
		print_timings("", &edid_cta_modes2[vic - 193], type, "", false, false);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpq $0x7f, %rax
ja 0x1575b
leaq -0x20(%rbp), %rdi
movl -0x24(%rbp), %edx
leaq 0x1a3cc(%rip), %rsi     # 0x2fade
movb $0x0, %al
callq 0x40a0
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
leaq 0x20974(%rip), %rdx     # 0x360a0
imulq $0x54, %rax, %rax
addq %rax, %rdx
leaq -0x20(%rbp), %rcx
leaq 0x1a77b(%rip), %r8      # 0x2feb9
xorl %r9d, %r9d
movq %r8, %rsi
movl $0x0, (%rsp)
callq 0x50c0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x156fb
movl $0xc1, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpq $0xdc, %rax
jae 0x157c6
leaq -0x20(%rbp), %rdi
movl -0x28(%rbp), %edx
leaq 0x1a363(%rip), %rsi     # 0x2fade
movb $0x0, %al
callq 0x40a0
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %eax
subl $0xc1, %eax
movl %eax, %eax
leaq 0x232b9(%rip), %rdx     # 0x38a50
imulq $0x54, %rax, %rax
addq %rax, %rdx
leaq -0x20(%rbp), %rcx
leaq 0x1a710(%rip), %r8      # 0x2feb9
xorl %r9d, %r9d
movq %r8, %rsi
movl $0x0, (%rsp)
callq 0x50c0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x15762
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_list_hdmi_vics()
void edid_state::cta_list_hdmi_vics()
{
	for (unsigned i = 0; i < ARRAY_SIZE(edid_hdmi_mode_map); i++) {
		unsigned vic = edid_hdmi_mode_map[i];
		char type[16];

		sprintf(type, "HDMI VIC %u", i + 1);
		print_timings("", find_vic_id(vic), type, "", false, false);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x4, %rax
jae 0x15859
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x20894(%rip), %rax     # 0x36094
movzbl (%rax,%rcx), %eax
movl %eax, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
movl -0xc(%rbp), %edx
addl $0x1, %edx
leaq 0x1a2e4(%rip), %rsi     # 0x2fafc
movb $0x0, %al
callq 0x40a0
movl -0x10(%rbp), %eax
movzbl %al, %edi
callq 0x154d0
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq -0x20(%rbp), %rcx
leaq 0x1a67d(%rip), %r8      # 0x2feb9
xorl %r9d, %r9d
movq %r8, %rsi
movl $0x0, (%rsp)
callq 0x50c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x157eb
addq $0x30, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::print_vic_index(char const*, unsigned int, char const*, bool)
void edid_state::print_vic_index(const char *prefix, unsigned idx, const char *suffix, bool ycbcr420)
{
	if (!suffix)
		suffix = "";
	if (idx < cta.preparsed_svds[0].size()) {
		unsigned char vic = cta.preparsed_svds[0][idx];
		const struct timings *t = find_vic_id(vic);
		char buf[16];

		sprintf(buf, "VIC %3u", vic);

		if (t) {
			struct timings tmp = *t;
			tmp.ycbcr420 = ycbcr420;
			print_timings(prefix, &tmp, buf, suffix);
		} else {
			printf("%sUnknown (%s%s%s)\n", prefix, buf,
			       *suffix ? ", " : "", suffix);
		}
	} else {
		// Should not happen!
		printf("%sSVD Index %u is out of range", prefix, idx + 1);
		if (*suffix)
			printf(" (%s)", suffix);
		printf("\n");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1617f
leaq 0x19d3e(%rip), %rax     # 0x2feb9
movq %rax, -0x20(%rbp)
movq -0xa0(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0xa8(%rbp)
addq $0x180, %rdi            # imm = 0x180
addq $0x760, %rdi            # imm = 0x760
callq 0x1ffc0
movq %rax, %rcx
movq -0xa8(%rbp), %rax
cmpq %rcx, %rax
jae 0x16285
movq -0xa0(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
addq $0x760, %rdi            # imm = 0x760
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x1ffe0
movb (%rax), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %edi
callq 0x154d0
movq %rax, -0x30(%rbp)
leaq -0x40(%rbp), %rdi
movzbl -0x22(%rbp), %edx
leaq 0x198e8(%rip), %rsi     # 0x2fade
movb $0x0, %al
callq 0x40a0
cmpq $0x0, -0x30(%rbp)
je 0x1624c
movq -0x30(%rbp), %rsi
leaq -0x94(%rbp), %rdi
movl $0x54, %edx
callq 0x42a0
movq -0xa0(%rbp), %rdi
movb -0x21(%rbp), %al
andb $0x1, %al
movb %al, -0x44(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x94(%rbp), %rdx
xorl %r9d, %r9d
movl $0x1, (%rsp)
callq 0x50c0
jmp 0x16283
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rax
movb (%rax), %dil
leaq 0x19c57(%rip), %rcx     # 0x2feb9
leaq 0x19a90(%rip), %rax     # 0x2fcf9
cmpb $0x0, %dil
cmovneq %rax, %rcx
movq -0x20(%rbp), %r8
leaq 0x23273(%rip), %rdi     # 0x394ef
movb $0x0, %al
callq 0x4050
jmp 0x162c6
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
leaq 0x2326d(%rip), %rdi     # 0x39503
movb $0x0, %al
callq 0x4050
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x162b8
movq -0x20(%rbp), %rsi
leaq 0x23271(%rip), %rdi     # 0x39522
movb $0x0, %al
callq 0x4050
leaq 0x1964a(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: hdmi_latency2s[abi:cxx11](unsigned char, bool)
static std::string hdmi_latency2s(unsigned char l, bool is_video)
{
	if (!l)
		return "Unknown";
	if (l == 0xff)
		return is_video ? "Video not supported" : "Audio not supported";
	return std::to_string(1 + 2 * l) + " ms";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x50(%rbp)
movb %dl, %al
movb %sil, %cl
movq %rdi, %rdx
movq %rdx, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
cmpb $0x0, -0x9(%rbp)
jne 0x16f78
leaq -0xb(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x4560
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq 0x1ddad(%rip), %rsi     # 0x34cf6
callq 0xb510
jmp 0x16f50
leaq -0xb(%rbp), %rdi
callq 0x4370
jmp 0x1703c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0xb(%rbp), %rdi
callq 0x4370
jmp 0x17049
movzbl -0x9(%rbp), %eax
cmpl $0xff, %eax
jne 0x16fed
testb $0x1, -0xa(%rbp)
je 0x16f96
leaq 0x243e0(%rip), %rax     # 0x3b370
movq %rax, -0x60(%rbp)
jmp 0x16fa3
leaq 0x243e7(%rip), %rax     # 0x3b384
movq %rax, -0x60(%rbp)
jmp 0x16fa3
movq -0x60(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x1d(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x4560
movq -0x50(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0xb510
jmp 0x16fcb
leaq -0x1d(%rbp), %rdi
callq 0x4370
jmp 0x1703c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x1d(%rbp), %rdi
callq 0x4370
jmp 0x17049
movzbl -0x9(%rbp), %ecx
movl %ecx, %eax
leal 0x1(%rax,%rax), %esi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x200a0
movq -0x50(%rbp), %rdi
movq -0x78(%rbp), %rsi
leaq 0x24385(%rip), %rdx     # 0x3b398
callq 0xb4c0
jmp 0x1701a
leaq -0x40(%rbp), %rdi
callq 0x41f0
jmp 0x1703c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x41f0
jmp 0x17049
movq -0x48(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x4550
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_preparse_sldb(unsigned char const*, unsigned int)
void edid_state::cta_preparse_sldb(const unsigned char *x, unsigned length)
{
	cta.has_sldb = true;
	while (length >= 2) {
		if (length >= 5 && (x[0] & 0x40)) {
			cta.preparsed_sld_has_coord = true;
			return;
		}
		length -= 2;
		x += 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $0x1, 0x2ce(%rax)
cmpl $0x2, -0x14(%rbp)
jb 0x183dd
cmpl $0x5, -0x14(%rbp)
jb 0x183c6
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x183c6
movq -0x20(%rbp), %rax
movb $0x1, 0x2cc(%rax)
jmp 0x183dd
movl -0x14(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x1839e
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_displayid_type_7(unsigned char const*, unsigned int)
void edid_state::cta_displayid_type_7(const unsigned char *x, unsigned length)
{
	check_displayid_datablock_revision(x[0], 0x00, 2);

	if (length < 21U + ((x[0] & 0x70) >> 4)) {
		fail("Empty Data Block with length %u.\n", length);
		return;
	}
	parse_displayid_type_1_7_timing(x + 1, true, 2, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rax
xorl %edx, %edx
movl $0x2, %ecx
movzbl (%rax), %esi
callq 0x21b00
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0x70, %ecx
sarl $0x4, %ecx
addl $0x15, %ecx
cmpl %ecx, %eax
jae 0x1875a
movl -0x14(%rbp), %edx
xorl %edi, %edi
leaq 0x20e5e(%rip), %rsi     # 0x395af
movb $0x0, %al
callq 0x47d0
jmp 0x18779
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x1, %rsi
movl $0x1, %r8d
movl $0x2, %ecx
movl %r8d, %edx
callq 0x22420
addq $0x20, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_displayid_type_8(unsigned char const*, unsigned int)
void edid_state::cta_displayid_type_8(const unsigned char *x, unsigned length)
{
	check_displayid_datablock_revision(x[0], 0xe8, 1);
	if (length < ((x[0] & 0x08) ? 3 : 2)) {
		fail("Empty Data Block with length %u.\n", length);
		return;
	}

	unsigned sz = (x[0] & 0x08) ? 2 : 1;
	unsigned type = x[0] >> 6;

	if (type) {
		fail("Only code type 0 is supported.\n");
		return;
	}

	if (x[0] & 0x20)
		printf("    Also supports YCbCr 4:2:0\n");

	x++;
	length--;
	for (unsigned i = 0; i < length / sz; i++) {
		unsigned id = x[i * sz];

		if (sz == 2)
			id |= x[i * sz + 1] << 8;
		parse_displayid_type_4_8_timing(type, id, true);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl $0xe8, %edx
movl $0x1, %ecx
movzbl (%rax), %esi
callq 0x21b00
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %esi
andl $0x8, %esi
movl $0x2, %ecx
movl $0x3, %edx
cmpl $0x0, %esi
cmovnel %edx, %ecx
cmpl %ecx, %eax
jae 0x187ea
movl -0x14(%rbp), %edx
xorl %edi, %edi
leaq 0x20dd1(%rip), %rsi     # 0x395af
movb $0x0, %al
callq 0x47d0
jmp 0x188dd
movq -0x10(%rbp), %rax
movzbl (%rax), %edx
andl $0x8, %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
sarl $0x6, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x1882f
xorl %edi, %edi
leaq 0x21c43(%rip), %rsi     # 0x3a466
movb $0x0, %al
callq 0x47d0
jmp 0x188dd
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1884c
leaq 0x21c41(%rip), %rdi     # 0x3a486
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl -0x18(%rbp)
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jae 0x188dd
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
imull -0x18(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
cmpl $0x2, -0x18(%rbp)
jne 0x188b6
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
imull -0x18(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
orl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %eax
movb %al, %dl
movl -0x24(%rbp), %eax
movl $0x1, %ecx
movzbl %dl, %esi
movzwl %ax, %edx
callq 0x237b0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x18868
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_displayid_type_10(unsigned char const*, unsigned int)
void edid_state::cta_displayid_type_10(const unsigned char *x, unsigned length)
{
	check_displayid_datablock_revision(x[0], 0x70);
	if (length < 7U + ((x[0] & 0x70) >> 4)) {
		fail("Empty Data Block with length %u.\n", length);
		return;
	}

	unsigned sz = 6U + ((x[0] & 0x70) >> 4);
	x++;
	length--;
	for (unsigned i = 0; i < length / sz; i++)
		parse_displayid_type_10_timing(x + i * sz, true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x70, %edx
xorl %ecx, %ecx
movzbl (%rax), %esi
callq 0x21b00
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0x70, %ecx
sarl $0x4, %ecx
addl $0x7, %ecx
cmpl %ecx, %eax
jae 0x1894a
movl -0x14(%rbp), %edx
xorl %edi, %edi
leaq 0x20c6e(%rip), %rsi     # 0x395af
movb $0x0, %al
callq 0x47d0
jmp 0x189b9
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x70, %eax
sarl $0x4, %eax
addl $0x6, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
xorl %edx, %edx
divl -0x18(%rbp)
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jae 0x189b9
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, %eax
addq %rax, %rsi
movl $0x1, %edx
callq 0x275f0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x18979
addq $0x30, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: cta_hdr10plus(unsigned char const*, unsigned int)
static void cta_hdr10plus(const unsigned char *x, unsigned length)
{
	printf("    Application Version: %u", x[0]);
	if (length > 1)
		hex_block("  ", x + 1, length - 1);
	else
		printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %esi
leaq 0x21bd1(%rip), %rdi     # 0x3b7ce
movb $0x0, %al
callq 0x4050
cmpl $0x1, -0xc(%rbp)
jbe 0x19c31
movq -0x8(%rbp), %rsi
addq $0x1, %rsi
movl -0xc(%rbp), %edx
subl $0x1, %edx
leaq 0x1abc2(%rip), %rdi     # 0x347e1
movl $0x1, %ecx
movl $0x10, %r8d
callq 0x7860
jmp 0x19c3f
leaq 0x15cd1(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)