LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/./dimacs-parsing.h
// Function: loadSatProblem(char const*, Lawa&)
bool loadSatProblem(const char* filename, Lawa& lawa) {
    FILE* f = fopen(filename, "r");
    if (f == NULL) {
        return false;
    }
    int c = 0;
    bool neg = false;
    int clauseInd = 0;
    vector<int> tmpClause;
    while (c != EOF) {
        c = fgetc(f);

        // comment line
        if (c == 'c') {
            readLine(f);
            continue;
        }
        // problem lines
        if (c == 'p') {
            continue;
        }
        // whitespace
        if (isspace(c)) {
            continue;
        }
        // negative
        if (c == '-') {
            neg = true;
            continue;
        }

        // number
        if (isdigit(c)) {
            int num = readNextNumber(f, c);
            if (neg) {
                num *= -1;
            }
            neg = false;
            lawa.addLiteral(num);
        }
    }
    fclose(f);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
leaq 0x8ac(%rip), %rsi       # 0x30b9
callq 0x1110
movq %rax, %rbx
testq %rax, %rax
je 0x28a5
andq $0x0, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movq %rbx, %rdi
cmpl $-0x1, %ebp
je 0x2898
callq 0x1180
movl %eax, %ebp
cmpl $0x70, %eax
je 0x2830
cmpl $0x63, %ebp
jne 0x2853
movq %rbx, %rdi
callq 0x27e4
jmp 0x2830
movl %ebp, %edi
callq 0x1050
testl %eax, %eax
jne 0x2830
cmpl $0x2d, %ebp
sete %r12b
je 0x2893
movl %ebp, %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x2830
movq %rbx, %rdi
movl %ebp, %esi
callq 0x27a8
movl %eax, %esi
negl %esi
testb $0x1, %r15b
cmovel %eax, %esi
movq %r14, %rdi
callq 0x1548
movl %r12d, %r15d
jmp 0x2830
movl %r12d, %r15d
jmp 0x2830
callq 0x10e0
movq %rsp, %rdi
callq 0x1e3a
testq %rbx, %rbx
setne %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1e3a
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/biotomas[P]ipasir/sat/lawa/lawa-main.cpp
// Function: main
int main(int argc, char** argv) {
    printf("c This is lawa - lazy walksat local search satisfiability solver\n");
    printf("c USAGE: ./lawa <cnf-formula-in-dimacs-format> [assumptions...]\n");
    Lawa lawa;
    if (!loadSatProblem(argv[1], lawa)) {
        printf("ERROR: problem not loaded\n");
        return 1;
    }
    for (int i = 2; i < argc; i++) {
        lawa.addAssumption(atoi(argv[i]));
    }
    srand(2018);
    if (lawa.search() == 10) {
        printf("s SATISFIABLE\nv ");
        lawa.printModel();
    } else {
        printf("s UNSATISFIABLE\n");
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x794(%rip), %rdi       # 0x307a
callq 0x1160
leaq 0x7c9(%rip), %rdi       # 0x30bb
callq 0x1160
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x58(%rsi)
movb $0x1, 0x68(%rsi)
movups %xmm0, 0x70(%rsi)
movups %xmm0, 0x80(%rsi)
andq $0x0, 0x90(%rsi)
movq 0x8(%rbx), %rdi
callq 0x27f7
testb %al, %al
je 0x2967
movslq %ebp, %r15
pushq $0x2
popq %r12
leaq 0x8(%rsp), %r14
cmpq %r15, %r12
jge 0x2973
movq (%rbx,%r12,8), %rdi
callq 0x1170
movq %r14, %rdi
movl %eax, %esi
callq 0x15f6
incq %r12
jmp 0x294a
pushq $0x1
popq %rbx
leaq 0x78a(%rip), %rdi       # 0x30fb
jmp 0x29b1
movl $0x7e2, %edi            # imm = 0x7E2
callq 0x10d0
leaq 0x8(%rsp), %rdi
callq 0x1aa8
cmpl $0xa, %eax
jne 0x29a8
leaq 0x6d6(%rip), %rdi       # 0x3069
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1040
leaq 0x8(%rsp), %rdi
callq 0x161c
jmp 0x29b6
xorl %ebx, %ebx
leaq 0x764(%rip), %rdi       # 0x3115
callq 0x1160
leaq 0x8(%rsp), %rdi
callq 0x16ba
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29d4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x16ba
movq %rbx, %rdi
callq 0x11b0
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: do_checksum(char const*, unsigned char const*, unsigned long)
void do_checksum(const char *prefix, const unsigned char *x, size_t len)
{
	unsigned char check = x[len - 1];
	unsigned char sum = 0;
	unsigned i;

	printf("%sChecksum: 0x%02hhx", prefix, check);

	for (i = 0; i < len-1; i++)
		sum += x[i];

	if ((unsigned char)(check + sum) != 0) {
		printf(" (should be 0x%02x)\n", -sum & 0xff);
		fail("Invalid checksum 0x%02x (should be 0x%02x).\n",
		     check, -sum & 0xff);
		return;
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
movzbl -0x1(%r15,%rdx), %ebx
decq %r14
leaq 0x16878(%rip), %rdi     # 0x1a10e
xorl %ebp, %ebp
movl %ebx, %edx
xorl %eax, %eax
callq 0x3030
xorl %eax, %eax
movl %eax, %eax
cmpq %rax, %r14
jbe 0x38b2
addb (%r15,%rax), %bpl
incl %eax
jmp 0x38a3
negb %bpl
cmpb %bpl, %bl
jne 0x38cc
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3340
movzbl %bpl, %ebp
leaq 0x1684c(%rip), %rdi     # 0x1a123
movl %ebp, %esi
xorl %eax, %eax
callq 0x3030
leaq 0x16851(%rip), %rsi     # 0x1a138
xorl %edi, %edi
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x362c
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: calc_ratio(timings*)
void calc_ratio(struct timings *t)
{
	unsigned d = gcd(t->hact, t->vact);

	if (d == 0) {
		t->hratio = t->vratio = 0;
		return;
	}
	t->hratio = t->hact / d;
	t->vratio = t->vact / d;
}

// Assembly:
movl (%rdi), %esi
movl 0x4(%rdi), %ecx
movl %ecx, %edx
movl %esi, %r8d
testl %edx, %edx
je 0x391c
movl %edx, %r9d
movl %r8d, %eax
xorl %edx, %edx
divl %r9d
movl %r9d, %r8d
jmp 0x3908
testl %r8d, %r8d
je 0x3933
movl %esi, %eax
xorl %edx, %edx
divl %r8d
movl %eax, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %r8d
jmp 0x3937
xorl %eax, %eax
xorl %esi, %esi
movl %eax, 0xc(%rdi)
movl %esi, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_state::dtd_type[abi:cxx11](unsigned int)
std::string edid_state::dtd_type(unsigned cnt)
{
	unsigned len = std::to_string(cta.preparsed_total_dtds).length();
	char buf[16];
	sprintf(buf, "DTD %*u", len, cnt);
	return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movl 0x180(%rsi), %esi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7675
movl 0x8(%r14), %r15d
movq %r14, %rdi
callq 0x3130
leaq 0x167f2(%rip), %rsi     # 0x1a165
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r15d, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3070
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75c4
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: timings_close_match(timings const&, timings const&)
bool timings_close_match(const timings &t1, const timings &t2)
{
	// We don't want to deal with borders, you're on your own
	// if you are using those.
	if (t1.hborder || t1.vborder ||
	    t2.hborder || t2.vborder)
		return false;
	if (t1.hact != t2.hact || t1.vact != t2.vact ||
	    t1.interlaced != t2.interlaced ||
	    t1.pixclk_khz != t2.pixclk_khz ||
	    t1.hfp + t1.hsync + t1.hbp != t2.hfp + t2.hsync + t2.hbp ||
	    t1.vfp + t1.vsync + t1.vbp != t2.vfp + t2.vsync + t2.vbp)
		return false;
	if (t1.hfp == t2.hfp &&
	    t1.hsync == t2.hsync &&
	    t1.hbp == t2.hbp &&
	    t1.pos_pol_hsync == t2.pos_pol_hsync &&
	    t1.vfp == t2.vfp &&
	    t1.vsync == t2.vsync &&
	    t1.vbp == t2.vbp &&
	    t1.pos_pol_vsync == t2.pos_pol_vsync)
		return false;
	return true;
}

// Assembly:
movdqu 0x3c(%rdi), %xmm0
movdqu 0x3c(%rsi), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
xorl $0xf, %eax
jne 0x3ae0
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0x3ae0
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0x3ae0
movb 0x18(%rdi), %al
cmpb 0x18(%rsi), %al
jne 0x3ae0
movl 0x10(%rdi), %eax
cmpl 0x10(%rsi), %eax
jne 0x3ae0
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x1c(%rdi), %ecx
movl 0x20(%rdi), %eax
leal (%rax,%rcx), %r8d
movl 0x24(%rdi), %edx
addl %edx, %r8d
movl 0x1c(%rsi), %r14d
movl 0x20(%rsi), %r11d
leal (%r11,%r14), %r9d
movl 0x24(%rsi), %r10d
addl %r10d, %r9d
cmpl %r9d, %r8d
jne 0x3adc
movl 0x2c(%rdi), %r8d
movl 0x30(%rdi), %r9d
movq %r8, -0x8(%rsp)
leal (%r9,%r8), %r13d
movl 0x34(%rdi), %ebp
addl %ebp, %r13d
movl 0x2c(%rsi), %ebx
movl 0x30(%rsi), %r15d
leal (%r15,%rbx), %r8d
movl 0x34(%rsi), %r12d
addl %r12d, %r8d
cmpl %r8d, %r13d
jne 0x3adc
xorl %r14d, %ecx
xorl %r11d, %eax
orl %ecx, %eax
xorl %r10d, %edx
orl %eax, %edx
jne 0x3ae3
cmpl %r12d, %ebp
jne 0x3ae3
cmpl %r15d, %r9d
jne 0x3ae3
cmpl %ebx, -0x8(%rsp)
jne 0x3ae3
movb 0x28(%rsi), %al
cmpb %al, 0x28(%rdi)
jne 0x3ae3
movb 0x38(%rdi), %al
cmpb 0x38(%rsi), %al
jne 0x3ae3
xorl %eax, %eax
jmp 0x3ae5
xorl %eax, %eax
retq
movb $0x1, %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/./edid-decode.h
// Function: add_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static inline void add_str(std::string &s, const std::string &add)
{
	if (s.empty())
		s = add;
	else if (!add.empty())
		s = s + ", " + add;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x4d31
cmpq $0x0, 0x8(%r14)
je 0x4d27
leaq 0x15e35(%rip), %rdx     # 0x1ab1e
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7a65
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7a46
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32f0
movq %r14, %rdi
callq 0x3130
movq %rsp, %rdi
callq 0x3130
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3160
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: containerid2s[abi:cxx11](unsigned char const*)
std::string containerid2s(const unsigned char *x)
{
	char buf[40];

	sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
		x[0], x[1], x[2], x[3],
		x[4], x[5],
		x[6], x[7],
		x[8], x[9],
		x[10], x[11], x[12], x[13], x[14], x[15]);
	return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movzbl (%rsi), %edx
movzbl 0x1(%rsi), %ecx
movzbl 0x2(%rsi), %r8d
movzbl 0x3(%rsi), %r9d
movzbl 0x4(%rsi), %eax
movq %rax, 0x28(%rsp)
movzbl 0x5(%rsi), %eax
movq %rax, 0x20(%rsp)
movzbl 0x6(%rsi), %eax
movq %rax, 0x18(%rsp)
movzbl 0x7(%rsi), %eax
movq %rax, 0x10(%rsp)
movzbl 0x8(%rsi), %eax
movq %rax, 0x8(%rsp)
movzbl 0x9(%rsi), %ebp
movzbl 0xa(%rsi), %r14d
movzbl 0xb(%rsi), %r10d
movzbl 0xc(%rsi), %r11d
movzbl 0xd(%rsi), %r15d
movzbl 0xe(%rsi), %r12d
movzbl 0xf(%rsi), %r13d
leaq 0x15661(%rip), %rsi     # 0x1a431
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %r15
pushq %r11
pushq %r10
pushq %r14
pushq %rbp
pushq 0x40(%rsp)
pushq 0x50(%rsp)
pushq 0x60(%rsp)
pushq 0x70(%rsp)
pushq 0x80(%rsp)
callq 0x3070
addq $0x60, %rsp
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
leaq 0x30(%rsp), %rsi
callq 0x75c4
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: hex_block(char const*, unsigned char const*, unsigned int, bool, unsigned int)
void hex_block(const char *prefix, const unsigned char *x,
	       unsigned length, bool show_ascii, unsigned step)
{
	unsigned i, j;

	if (!length)
		return;

	for (i = 0; i < length; i += step) {
		unsigned len = min(step, length - i);

		printf("%s", prefix);
		for (j = 0; j < len; j++)
			printf("%s%02x", j ? " " : "", x[i + j]);

		if (show_ascii) {
			for (j = len; j < step; j++)
				printf("   ");
			printf(" '");
			for (j = 0; j < len; j++)
				printf("%c", x[i + j] >= ' ' && x[i + j] <= '~' ? x[i + j] : '.');
			printf("'");
		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, (%rsp)
movq %rdi, 0x10(%rsp)
movl %edx, 0x4(%rsp)
testl %edx, %edx
je 0x50cb
movl %r8d, %ebx
movq %rsi, %r15
movl %r8d, %eax
movq %rax, 0x8(%rsp)
leaq 0x154d8(%rip), %r13     # 0x1a4d0
xorl %ebp, %ebp
movl 0x4(%rsp), %eax
movl %eax, %r12d
subl %ebp, %r12d
jbe 0x50cb
cmpl %ebx, %r12d
cmovael %ebx, %r12d
leaq 0x15d5a(%rip), %rdi     # 0x1ad72
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x3030
xorl %r14d, %r14d
cmpq %r12, %r14
jae 0x5059
testq %r14, %r14
leaq 0x1a464(%rip), %rsi     # 0x1f49a
leaq 0x15c4c(%rip), %rax     # 0x1ac89
cmoveq %rax, %rsi
leal (%r14,%rbp), %eax
movzbl (%r15,%rax), %edx
movq %r13, %rdi
xorl %eax, %eax
callq 0x3030
incq %r14
jmp 0x5027
cmpb $0x0, (%rsp)
je 0x50b9
movl %r12d, %r14d
cmpl %ebx, %r14d
jae 0x507a
leaq 0x1a42a(%rip), %rdi     # 0x1f498
xorl %eax, %eax
callq 0x3030
incl %r14d
jmp 0x5062
leaq 0x15456(%rip), %rdi     # 0x1a4d7
xorl %eax, %eax
callq 0x3030
xorl %r14d, %r14d
cmpq %r12, %r14
jae 0x50b1
leal (%r14,%rbp), %eax
movzbl (%r15,%rax), %eax
leal -0x20(%rax), %ecx
cmpb $0x5f, %cl
jb 0x50a4
pushq $0x2e
popq %rax
movzbl %al, %edi
callq 0x3340
incq %r14
jmp 0x508b
pushq $0x27
popq %rdi
callq 0x3340
pushq $0xa
popq %rdi
callq 0x3340
addq 0x8(%rsp), %rbp
jmp 0x4ffa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: block_name[abi:cxx11](unsigned char)
std::string block_name(unsigned char block)
{
	char buf[10];

	switch (block) {
	case 0x00: return "Base EDID";
	case 0x02: return "CTA-861 Extension Block";
	case 0x10: return "Video Timing Extension Block";
	case 0x20: return "EDID 2.0 Extension Block";
	case 0x40: return "Display Information Extension Block";
	case 0x50: return "Localized String Extension Block";
	case 0x60: return "Microdisplay Interface Extension Block";
	case 0x70: return "DisplayID Extension Block";
	case 0xf0: return "Block Map Extension Block";
	case 0xff: return "Manufacturer-Specific Extension Block";
	default:
		sprintf(buf, " 0x%02x", block);
		return std::string("Unknown EDID Extension Block") + buf;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpl $0xff, %esi
je 0x51ce
cmpl $0x2, %esi
je 0x5145
cmpl $0x10, %esi
je 0x51d7
cmpl $0x20, %esi
je 0x5166
cmpl $0x40, %esi
je 0x51c5
cmpl $0x50, %esi
je 0x51bc
cmpl $0x60, %esi
je 0x5139
cmpl $0x70, %esi
je 0x515d
cmpl $0xf0, %esi
je 0x5151
testl %esi, %esi
jne 0x516f
leaq 0x153a6(%rip), %rsi     # 0x1a4da
jmp 0x51de
leaq 0x15437(%rip), %rsi     # 0x1a577
jmp 0x51de
leaq 0x15398(%rip), %rsi     # 0x1a4e4
jmp 0x51de
leaq 0x15460(%rip), %rsi     # 0x1a5b8
jmp 0x51de
leaq 0x1543a(%rip), %rsi     # 0x1a59e
jmp 0x51de
leaq 0x153ac(%rip), %rsi     # 0x1a519
jmp 0x51de
movzbl %sil, %edx
leaq 0x15768(%rip), %rsi     # 0x1a8e2
leaq 0x36(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x3070
leaq 0x15468(%rip), %rsi     # 0x1a5f8
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x75c4
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x75a4
leaq 0x10(%rsp), %rdi
callq 0x3130
jmp 0x51eb
leaq 0x15393(%rip), %rsi     # 0x1a556
jmp 0x51de
leaq 0x15366(%rip), %rsi     # 0x1a532
jmp 0x51de
leaq 0x153fd(%rip), %rsi     # 0x1a5d2
jmp 0x51de
leaq 0x1531e(%rip), %rsi     # 0x1a4fc
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x75c4
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3430
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_state::parse_extension(unsigned char const*)
void edid_state::parse_extension(const unsigned char *x)
{
	block = block_name(x[0]);
	data_block.clear();

	printf("\n");
	if (block_nr && x[0] == 0)
		block = "Unknown EDID Extension Block 0x00";
	printf("Block %u, %s:\n", block_nr, block.c_str());

	switch (x[0]) {
	case 0x02:
		parse_cta_block(x);
		break;
	case 0x10:
		parse_vtb_ext_block(x);
		break;
	case 0x20:
		fail("Deprecated extension block for EDID 2.0, do not use.\n");
		break;
	case 0x40:
		parse_di_ext_block(x);
		break;
	case 0x50:
		parse_ls_ext_block(x);
		break;
	case 0x70:
		parse_displayid_block(x);
		break;
	case 0xf0:
		parse_block_map(x);
		if (block_nr != 1 && block_nr != 128)
			fail("Must be used in block 1 and 128.\n");
		break;
	default:
		hex_block("  ", x, EDID_PAGE_SIZE);
		fail("Unknown Extension Block.\n");
		break;
	}

	data_block.clear();
	do_checksum("", x, EDID_PAGE_SIZE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rsi), %esi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x50da
leaq 0x10(%r14), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x32f0
movq %r12, %rdi
callq 0x3130
andq $0x0, 0x38(%r14)
movq 0x30(%r14), %rax
movb $0x0, (%rax)
pushq $0xa
popq %rdi
callq 0x3340
movl 0x8(%r14), %esi
testl %esi, %esi
je 0x5458
cmpb $0x0, (%rbx)
jne 0x545a
leaq 0x152bc(%rip), %rsi     # 0x1a706
movq %r15, %rdi
callq 0x3460
movl 0x8(%r14), %esi
jmp 0x545a
xorl %esi, %esi
movq (%r15), %rdx
leaq 0x152c4(%rip), %rdi     # 0x1a728
xorl %eax, %eax
callq 0x3030
movzbl (%rbx), %eax
cmpl $0xf0, %eax
je 0x54d2
cmpl $0x10, %eax
je 0x552c
cmpl $0x20, %eax
je 0x551a
cmpl $0x40, %eax
je 0x54ab
cmpl $0x50, %eax
je 0x54c5
cmpl $0x70, %eax
je 0x54b8
cmpl $0x2, %eax
jne 0x54f6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x113c4
jmp 0x5537
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1908a
jmp 0x5537
movq %r14, %rdi
movq %rbx, %rsi
callq 0x16464
jmp 0x5537
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17ada
jmp 0x5537
movq %r14, %rdi
movq %rbx, %rsi
callq 0x520e
movl 0x8(%r14), %eax
cmpl $0x1, %eax
je 0x5537
cmpl $0x80, %eax
je 0x5537
leaq 0x15279(%rip), %rsi     # 0x1a76d
jmp 0x5521
leaq 0x19f9c(%rip), %rdi     # 0x1f499
pushq $0x1
popq %rcx
pushq $0x10
popq %r8
movq %rbx, %rsi
movl $0x80, %edx
callq 0x4fc1
leaq 0x15277(%rip), %rsi     # 0x1a78f
jmp 0x5521
leaq 0x15216(%rip), %rsi     # 0x1a737
xorl %edi, %edi
xorl %eax, %eax
callq 0x362c
jmp 0x5537
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19158
andq $0x0, 0x38(%r14)
movq 0x30(%r14), %rax
movb $0x0, (%rax)
leaq 0x1573f(%rip), %rdi     # 0x1ac89
movl $0x80, %edx
movq %rbx, %rsi
callq 0x3876
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: show_msgs(bool)
static void show_msgs(bool is_warn)
{
	printf("\n%s:\n\n", is_warn ? "Warnings" : "Failures");
	for (unsigned i = 0; i < state.num_blocks; i++) {
		if (s_msgs[i][is_warn].empty())
			continue;
		printf("Block %u, %s:\n%s",
		       i, block_name(edid[i * EDID_PAGE_SIZE]).c_str(),
		       s_msgs[i][is_warn].c_str());
	}
	if (s_msgs[EDID_MAX_BLOCKS][is_warn].empty())
		return;
	printf("EDID:\n%s",
	       s_msgs[EDID_MAX_BLOCKS][is_warn].c_str());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leaq 0x152e3(%rip), %rax     # 0x1ad49
leaq 0x152e5(%rip), %rsi     # 0x1ad52
testl %edi, %edi
cmovneq %rax, %rsi
leaq 0x152c8(%rip), %rdi     # 0x1ad42
xorl %eax, %eax
callq 0x3030
movl %ebx, %eax
movq %rax, (%rsp)
movl 0x2ec77(%rip), %eax     # 0x34704
shll $0x5, %ebx
leaq 0x2f5e9(%rip), %rcx     # 0x35080
leaq (%rbx,%rcx), %rbp
addq $0x8, %rbp
leaq 0x3372a(%rip), %r13     # 0x391d0
leaq 0x8(%rsp), %rbx
leaq 0x152a9(%rip), %r14     # 0x1ad5b
xorl %r12d, %r12d
xorl %r15d, %r15d
movl %eax, %ecx
cmpq %rcx, %r15
jae 0x5b0a
cmpq $0x0, (%rbp)
je 0x5afd
movl %r12d, %eax
andl $-0x80, %eax
movzbl (%rax,%r13), %esi
movq %rbx, %rdi
callq 0x50da
movq 0x8(%rsp), %rdx
movq -0x8(%rbp), %rcx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x3030
movq %rbx, %rdi
callq 0x3130
movl 0x2ec07(%rip), %eax     # 0x34704
incq %r15
subq $-0x80, %r12
addq $0x40, %rbp
jmp 0x5ab8
movq (%rsp), %rax
shll $0x5, %eax
leaq 0x2f568(%rip), %rcx     # 0x35080
cmpq $0x0, 0x4008(%rax,%rcx)
je 0x5b3d
addq %rcx, %rax
addq $0x4000, %rax           # imm = 0x4000
movq (%rax), %rsi
leaq 0x15236(%rip), %rdi     # 0x1ad6c
xorl %eax, %eax
callq 0x3030
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/edid-decode.cpp
// Function: or_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int&)
static void or_str(std::string &s, const std::string &flag, unsigned &num_flags)
{
	if (!num_flags)
		s = flag;
	else if (num_flags % 2 == 0)
		s = s + " | \\\n\t\t" + flag;
	else
		s = s + " | " + flag;
	num_flags++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl (%rdx), %eax
testl %eax, %eax
je 0x714f
testb $0x1, %al
jne 0x715c
leaq 0x13b55(%rip), %rdx     # 0x1ac82
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a65
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7a46
jmp 0x7183
movq %r14, %rdi
movq %r15, %rsi
callq 0x3160
jmp 0x71a5
leaq 0x13b27(%rip), %rdx     # 0x1ac8a
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7a65
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7a46
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x32f0
movq %r15, %rdi
callq 0x3130
leaq 0x8(%rsp), %rdi
callq 0x3130
incl (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x71b5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x13f0e(%rip), %r15     # 0x1b0ec
pushq $0x4
popq %r12
movsbl (%r14), %ebp
testl %ebp, %ebp
je 0x7273
movl %ebp, %edi
callq 0x3040
testl %eax, %eax
jne 0x726b
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x32b0
testq %rax, %rax
jne 0x726b
cmpb $0x30, %bpl
jne 0x7220
movsbl 0x1(%r14), %edi
callq 0x3380
cmpl $0x78, %eax
je 0x7268
movl %ebp, %edi
callq 0x3090
testl %eax, %eax
je 0x7286
movsbl 0x1(%r14), %ebp
testb %bl, %bl
je 0x723f
movl %ebp, %edi
callq 0x3090
testl %eax, %eax
je 0x729a
movl %ebp, %edi
callq 0x3090
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %r14, %rdi
callq 0x72a5
testb %al, %al
je 0x72a1
movsbl 0x1(%r14), %edi
callq 0x3090
testl %eax, %eax
je 0x726b
incq %r14
incq %r14
jmp 0x71e2
cmpl $0x0, 0x2d486(%rip)     # 0x34700
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x2d474(%rip), %eax     # 0x34700
testl %eax, %eax
setne %cl
testb $0x7f, %al
sete %al
andb %cl, %al
jmp 0x727d
movb $0x1, 0x39f2f(%rip)     # 0x411d0
xorl %eax, %eax
jmp 0x727d
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x10, %rsp
movl 0x2d450(%rip), %ebx     # 0x34700
cmpl $0x8000, %ebx           # imm = 0x8000
je 0x72f9
movb (%rdi), %al
movb %al, 0xd(%rsp)
testb %sil, %sil
je 0x72c8
movb 0x1(%rdi), %al
jmp 0x72ca
xorl %eax, %eax
leaq 0xd(%rsp), %rdi
movb %al, 0x1(%rdi)
movb $0x0, 0x2(%rdi)
pushq $0x10
popq %rdx
xorl %esi, %esi
callq 0x30c0
movl 0x2d41a(%rip), %ecx     # 0x34700
leal 0x1(%rcx), %edx
movl %edx, 0x2d411(%rip)     # 0x34700
leaq 0x31eda(%rip), %rdx     # 0x391d0
movb %al, (%rcx,%rdx)
cmpl $0x8000, %ebx           # imm = 0x8000
setne %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %ecx, %ecx
xorl %eax, %eax
cmpq $0x7f, %rcx
je 0x732f
addb (%rdi,%rcx), %al
incq %rcx
jmp 0x7321
negb %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
xorl %eax, %eax
leaq 0x147ef(%rip), %rcx     # 0x1c570
xorl %edx, %edx
leaq 0x60(%rdx), %rsi
cmpq $0x2160, %rsi           # imm = 0x2160
je 0x7da0
cmpl %edi, (%rdx,%rcx)
movq %rsi, %rdx
jne 0x7d83
leaq (%rsi,%rcx), %rax
addq $-0x54, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1861e(%rip), %rdi     # 0x203d8
callq 0x33b0
leaq 0x2b84a(%rip), %rbp     # 0x33610
leaq 0x10(%rsp), %r15
leaq 0x12eb7(%rip), %r13     # 0x1ac89
xorl %r12d, %r12d
cmpq $0x11, %r12
je 0x7e6a
movl (%rbp), %eax
testb %al, %al
je 0x7e0b
movzbl %al, %r14d
movq %r15, %rdi
leaq 0x12aeb(%rip), %rsi     # 0x1a8df
movl %r14d, %edx
xorl %eax, %eax
callq 0x3070
movl %r14d, %edi
callq 0x7d78
movq %rax, %r14
jmp 0x7e24
leaq 0x4(%rbp), %r14
movq 0x58(%rbp), %rdx
movq %r15, %rdi
leaq 0x16903(%rip), %rsi     # 0x1e720
xorl %eax, %eax
callq 0x3070
movl %r12d, %edx
notl %edx
movl %r12d, %esi
shrl $0x3, %esi
addl $0x23, %esi
andl $0x7, %edx
leaq 0x168e9(%rip), %rdi     # 0x1e725
xorl %eax, %eax
callq 0x3030
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x3af0
incq %r12
addq $0x60, %rbp
jmp 0x7dd5
leaq 0x185a0(%rip), %rdi     # 0x20411
callq 0x33b0
leaq 0x10(%rsp), %r15
leaq 0x168a3(%rip), %r12     # 0x1e725
leaq 0x12e00(%rip), %r13     # 0x1ac89
xorl %r14d, %r14d
cmpq $0x2c, %r14
je 0x7ef3
leaq 0x167d7(%rip), %rax     # 0x1e670
movzbl (%r14,%rax), %ebp
movq %r15, %rdi
leaq 0x12a37(%rip), %rsi     # 0x1a8df
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
movq %r12, %rdi
xorl %eax, %eax
callq 0x3030
movl %ebp, %edi
callq 0x7d78
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x3af0
incq %r14
jmp 0x7e8c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x59
popq %r12
leaq 0x14661(%rip), %rsi     # 0x1c57c
decq %r12
je 0x7f3d
leaq 0x60(%rsi), %r15
movq %r14, %rdi
callq 0x39fd
movq %r15, %rsi
testb %al, %al
je 0x7f1b
movl -0x6c(%r15), %eax
addq $-0x60, %r15
jmp 0x7f42
xorl %eax, %eax
xorl %r15d, %r15d
movl %eax, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/parse-base-block.cpp
// Function: extract_string(unsigned char const*, unsigned int)
char *extract_string(const unsigned char *x, unsigned len)
{
	static char s[EDID_PAGE_SIZE];
	int seen_newline = 0;
	unsigned i;

	memset(s, 0, sizeof(s));

	for (i = 0; i < len; i++) {
		if (isgraph(x[i])) {
			s[i] = x[i];
		} else if (!seen_newline) {
			if (x[i] == 0x0a) {
				seen_newline = 1;
				if (!i)
					fail("Empty string.\n");
				else if (s[i - 1] == 0x20)
					fail("One or more trailing spaces.\n");
			} else if (x[i] == 0x20) {
				s[i] = x[i];
			} else {
				fail("Non-printable character.\n");
				return s;
			}
		} else if (x[i] != 0x20) {
			fail("Non-space after newline.\n");
			return s;
		}
	}
	/* Does the string end with a space? */
	if (!seen_newline && s[len - 1] == 0x20)
		fail("One or more trailing spaces.\n");

	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x38b81(%rip)    # 0x41250
movaps %xmm0, 0x38b6a(%rip)    # 0x41240
movaps %xmm0, 0x38b53(%rip)    # 0x41230
movaps %xmm0, 0x38b3c(%rip)    # 0x41220
movaps %xmm0, 0x38b25(%rip)    # 0x41210
movaps %xmm0, 0x38b0e(%rip)    # 0x41200
movaps %xmm0, 0x38af7(%rip)    # 0x411f0
movaps %xmm0, 0x38ae0(%rip)    # 0x411e0
movq %rsi, 0x10(%rsp)
movl %esi, %r12d
leaq 0x16144(%rip), %rax     # 0x1e853
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq %rbx, %r12
je 0x87ab
movb (%r15,%rbx), %r13b
movzbl %r13b, %ebp
movl %ebp, %edi
callq 0x3240
testl %eax, %eax
je 0x8742
leaq 0x38aa4(%rip), %rax     # 0x411e0
movb %r13b, (%rbx,%rax)
jmp 0x87a3
testl %r14d, %r14d
je 0x8753
pushq $0x1
popq %r14
cmpb $0x20, %r13b
je 0x87a3
jmp 0x87c6
cmpl $0x20, %ebp
je 0x877f
cmpl $0xa, %ebp
jne 0x87cf
testq %rbx, %rbx
je 0x878f
leaq 0x38a77(%rip), %rax     # 0x411e0
cmpb $0x20, -0x1(%rbx,%rax)
pushq $0x1
popq %r14
jne 0x87a3
xorl %edi, %edi
leaq 0x160d6(%rip), %rsi     # 0x1e853
jmp 0x8798
leaq 0x38a5a(%rip), %rax     # 0x411e0
movb $0x20, (%rbx,%rax)
xorl %r14d, %r14d
jmp 0x87a3
xorl %edi, %edi
leaq 0x160ac(%rip), %rsi     # 0x1e844
xorl %eax, %eax
callq 0x362c
pushq $0x1
popq %r14
incq %rbx
jmp 0x8719
testl %r14d, %r14d
jne 0x87e9
movq 0x10(%rsp), %rax
decl %eax
leaq 0x38a22(%rip), %rcx     # 0x411e0
cmpb $0x20, (%rax,%rcx)
je 0x87db
jmp 0x87e9
leaq 0x160be(%rip), %rax     # 0x1e88b
jmp 0x87d6
leaq 0x1609b(%rip), %rax     # 0x1e871
movq %rax, 0x8(%rsp)
xorl %edi, %edi
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x362c
leaq 0x389f0(%rip), %rax     # 0x411e0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpb $0x0, (%rsi)
je 0xa02c
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x0, 0x1(%rsi)
jne 0xa109
cmpb $-0x3, 0x3(%r14)
jne 0xa109
movq %rdi, %rbx
movzbl 0xa(%r14), %eax
cmpl $0x4, %eax
je 0xa0f2
cmpl $0x2, %eax
je 0xa072
testl %eax, %eax
jne 0xa109
movb $0x1, 0x91(%rbx)
jmp 0xa109
movb $0x1, 0x91(%rbx)
leaq 0xc(%r14), %rdi
pushq $0x6
popq %rsi
xorl %edx, %edx
callq 0x4fa5
xorb $0x1, %al
movb %al, 0x92(%rbx)
movzbl 0xc(%r14), %eax
addl %eax, %eax
movl %eax, 0x94(%rbx)
movzbl 0xd(%r14), %eax
cvtsi2sd %eax, %xmm0
movsd 0xff63(%rip), %xmm1     # 0x1a010
mulsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rbx)
movzwl 0xe(%r14), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0xa0(%rbx)
movzbl 0x10(%r14), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0xa8(%rbx)
movzbl 0x11(%r14), %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rbx)
jmp 0xa109
cmpl $0x4, 0x88(%rbx)
jb 0xa109
movb $0x1, %al
movb %al, 0x91(%rbx)
movb %al, 0xb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
testb %dil, %dil
jle 0xbf47
movzbl %dil, %eax
imulq $0x54, %rax, %rax
leaq 0x14bb1(%rip), %rcx     # 0x20af0
addq %rcx, %rax
addq $-0x54, %rax
retq
leal 0x3f(%rdi), %eax
cmpb $0x1a, %al
ja 0xbf67
movzbl %dil, %eax
imulq $0x54, %rax, %rax
leaq 0x17543(%rip), %rcx     # 0x234a0
addq %rcx, %rax
addq $-0x3f54, %rax          # imm = 0xC0AC
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rcx
leaq 0x14b51(%rip), %rbx     # 0x20af0
movl %ecx, (%r14)
cmpl $0x80, %ecx
jae 0xbfc6
decl %ecx
imulq $0x54, %rcx, %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq 0x39fd
movl (%r14), %ecx
testb %al, %al
jne 0xbff6
incl %ecx
jmp 0xbf9f
movl $0xc1, %ecx
movl %ecx, (%r14)
cmpl $0xdb, %ecx
ja 0xbffa
addl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
imulq $0x54, %rcx, %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq 0x39fd
movl (%r14), %ecx
testb %al, %al
jne 0xc002
incl %ecx
jmp 0xbfcb
decl %ecx
jmp 0xc008
andl $0x0, (%r14)
xorl %ebx, %ebx
jmp 0xc00f
addl $0xffffff3f, %ecx       # imm = 0xFFFFFF3F
imulq $0x54, %rcx, %rax
addq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
pushq $-0x7f
popq %rbp
leaq 0x14abd(%rip), %r14     # 0x20af0
leaq 0xe8ca(%rip), %r15      # 0x1a904
leaq 0x10(%rsp), %r12
leaq 0xec43(%rip), %r13      # 0x1ac89
testq %rbp, %rbp
je 0xc082
leal 0x80(%rbp), %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3070
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x3af0
incq %rbp
addq $0x54, %r14
jmp 0xc046
pushq $-0x1b
popq %rbp
leaq 0x17414(%rip), %r14     # 0x234a0
leaq 0xe871(%rip), %r15      # 0x1a904
leaq 0x10(%rsp), %r12
leaq 0xebea(%rip), %r13      # 0x1ac89
testq %rbp, %rbp
je 0xc0db
leal 0xdc(%rbp), %edx
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3070
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
xorl %r9d, %r9d
callq 0x3af0
incq %rbp
addq $0x54, %r14
jmp 0xc09f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xe820(%rip), %r14      # 0x1a922
leaq 0x10(%rsp), %r15
leaq 0xeb7b(%rip), %r12      # 0x1ac89
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0xc15b
leaq 0x17e72(%rip), %rax     # 0x23f90
movzbl (%r13,%rax), %ebp
incq %r13
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x3070
movl %ebp, %edi
callq 0xbf2b
andl $0x0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x3af0
jmp 0xc111
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rsi, %r14
testq %rcx, %rcx
leaq 0xe633(%rip), %rax      # 0x1ac89
cmoveq %rax, %rbx
movl %edx, %eax
movq 0x8e0(%rdi), %rcx
movq 0x8e8(%rdi), %rsi
subq %rcx, %rsi
cmpq %rax, %rsi
jbe 0xc6d6
movl %r8d, %ebp
movq %rdi, %r15
movzbl (%rcx,%rax), %r13d
movl %r13d, %edi
callq 0xbf2b
movq %rax, %r12
leaq 0xe275(%rip), %rsi      # 0x1a904
leaq 0x10(%rsp), %rdi
movl %r13d, %edx
xorl %eax, %eax
callq 0x3070
testq %r12, %r12
je 0xc715
pushq $0x15
popq %rcx
leaq 0x24(%rsp), %rdx
movq %rdx, %rdi
movq %r12, %rsi
rep  movsl (%rsi), %es:(%rdi)
movb %bpl, 0x50(%rdx)
movl $0x1, (%rsp)
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x3af0
jmp 0xc743
incl %edx
leaq 0x179f0(%rip), %rdi     # 0x240cf
movq %r14, %rsi
xorl %eax, %eax
callq 0x3030
cmpb $0x0, (%rbx)
je 0xc6ff
leaq 0x179f9(%rip), %rdi     # 0x240ee
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3030
pushq $0xa
popq %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3340
cmpb $0x0, (%rbx)
leaq 0xe3ff(%rip), %rcx      # 0x1ab1e
leaq 0xe563(%rip), %rax      # 0x1ac89
cmoveq %rax, %rcx
leaq 0x1798a(%rip), %rdi     # 0x240bb
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
movq %rbx, %r8
xorl %eax, %eax
callq 0x3030
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rpavlik[P]edid-decode/parse-cta-block.cpp
// Function: edid_state::cta_y420cmdb(unsigned char const*, unsigned int)
void edid_state::cta_y420cmdb(const unsigned char *x, unsigned length)
{
	unsigned max_idx = 0;
	unsigned i;

	if (!length) {
		printf("    All VDB SVDs\n");
		return;
	}

	if (memchk(x, length)) {
		printf("    Empty Capability Map\n");
		fail("Empty Capability Map.\n");
		return;
	}

	for (i = 0; i < length; i++) {
		unsigned char v = x[i];
		unsigned j;

		for (j = 0; j < 8; j++) {
			if (!(v & (1 << j)))
				continue;

			print_vic_index("    ", i * 8 + j, "", true);
			max_idx = i * 8 + j;
			if (max_idx < cta.preparsed_svds[0].size()) {
				unsigned vic = cta.preparsed_svds[0][max_idx];
				if (cta.preparsed_has_vic[1][vic])
					fail("VIC %u is also a YCbCr 4:2:0-only VIC.\n", vic);
			}
		}
	}
	if (max_idx >= cta.preparsed_svds[0].size())
		fail("Max index %u > %u (#SVDs).\n",
		     max_idx + 1, cta.preparsed_svds[0].size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edx, %edx
je 0xc7a6
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x4fa5
testb %al, %al
je 0xc7c0
leaq 0x1ae30(%rip), %rdi     # 0x275b3
callq 0x33b0
leaq 0x17965(%rip), %rsi     # 0x240f4
xorl %edi, %edi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x362c
leaq 0x1adf5(%rip), %rdi     # 0x275a2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33b0
movl %ebp, %eax
movq %rax, 0x8(%rsp)
pushq $0x1
popq %rbp
xorl %eax, %eax
xorl %edx, %edx
movq %r15, (%rsp)
cmpq 0x8(%rsp), %rax
je 0xc86f
leal (,%rax,8), %r14d
movq %rax, 0x10(%rsp)
movzbl (%r15,%rax), %r13d
xorl %r15d, %r15d
pushq $0x8
popq %r12
subq $0x1, %r12
jb 0xc85e
btl %r15d, %r13d
jae 0xc856
movq %rbx, %rdi
leaq 0x12c8b(%rip), %rsi     # 0x1f497
movl %r14d, %edx
leaq 0xe473(%rip), %rcx      # 0x1ac89
movl %ebp, %r8d
callq 0xc638
movq 0x8e0(%rbx), %rax
movq 0x8e8(%rbx), %rcx
subq %rax, %rcx
cmpq %r14, %rcx
jbe 0xc853
movzbl (%rax,%r14), %edx
cmpb $0x0, 0x7e0(%rbx,%rdx)
je 0xc853
xorl %edi, %edi
leaq 0x178bf(%rip), %rsi     # 0x2410b
xorl %eax, %eax
callq 0x362c
movl %r14d, %edx
incq %r14
incl %r15d
jmp 0xc7f6
movq 0x10(%rsp), %rax
incq %rax
movq (%rsp), %r15
jmp 0xc7d2
movl %edx, %eax
movq 0x8e8(%rbx), %rcx
subq 0x8e0(%rbx), %rcx
cmpq %rax, %rcx
jbe 0xc893
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl %edx
leaq 0x17897(%rip), %rsi     # 0x24133
xorl %edi, %edi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x362c
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0xff, %esi
je 0xce15
testl %esi, %esi
jne 0xce38
leaq 0x12b9b(%rip), %rsi     # 0x1f9ae
jmp 0xce29
leaq 0x18c15(%rip), %rax     # 0x25a31
leaq 0x18c22(%rip), %rsi     # 0x25a45
testb %dl, %dl
cmovneq %rax, %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x75c4
jmp 0xce6c
movzbl %sil, %eax
leal 0x1(,%rax,2), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x11ea0
leaq 0x18c02(%rip), %rdx     # 0x25a59
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75a4
leaq 0x8(%rsp), %rdi
callq 0x3130
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3430
// File: /workspace/github_cpp_makefile_star2_O2/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:
movb $0x1, 0x2ce(%rdi)
cmpl $0x2, %edx
jb 0xdb4e
cmpl $0x5, %edx
jb 0xdb3e
testb $0x40, (%rsi)
jne 0xdb47
addl $-0x2, %edx
addq $0x2, %rsi
jmp 0xdb2f
movb $0x1, 0x2cc(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movzbl (%rsi), %esi
pushq $0x2
popq %rcx
xorl %edx, %edx
callq 0x123f0
movzbl (%r14), %eax
shrl $0x4, %eax
andl $0x7, %eax
addl $0x15, %eax
cmpl %ebx, %eax
jbe 0xdd96
leaq 0x163c9(%rip), %rsi     # 0x2414f
xorl %edi, %edi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x362c
incq %r14
pushq $0x2
popq %rcx
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
movl %edx, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x1295a