LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: zhangk145[P]video_envalue/Envaluer.cpp
// Function: Envaluer::ssim_end1(int, int, int, int)
float Envaluer::ssim_end1( int s1, int s2, int ss, int s12 )
{
    static const int ssim_c1 = (int)(.01*.01*255*255*64 + .5);
    static const int ssim_c2 = (int)(.03*.03*255*255*64*63 + .5);
    int vars = ss*64 - s1*s1 - s2*s2;
    int covar = s12*64 - s1*s2;
    return (float)(2*s1*s2 + ssim_c1) * (float)(2*covar + ssim_c2)\
           / ((float)(s1*s1 + s2*s2 + ssim_c1) * (float)(vars + ssim_c2));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl -0x14(%rbp), %eax
shll $0x6, %eax
movl -0xc(%rbp), %ecx
imull -0xc(%rbp), %ecx
subl %ecx, %eax
movl -0x10(%rbp), %ecx
imull -0x10(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
shll $0x6, %eax
movl -0xc(%rbp), %ecx
imull -0x10(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
shll %eax
imull -0x10(%rbp), %eax
addl $0x1a0, %eax            # imm = 0x1A0
cvtsi2ss %eax, %xmm0
movl -0x20(%rbp), %eax
shll %eax
addl $0x399bb, %eax          # imm = 0x399BB
cvtsi2ss %eax, %xmm1
mulss %xmm1, %xmm0
movl -0xc(%rbp), %eax
imull -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
imull -0x10(%rbp), %ecx
addl %ecx, %eax
addl $0x1a0, %eax            # imm = 0x1A0
cvtsi2ss %eax, %xmm1
movl -0x1c(%rbp), %eax
addl $0x399bb, %eax          # imm = 0x399BB
cvtsi2ss %eax, %xmm2
mulss %xmm2, %xmm1
divss %xmm1, %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: zhangk145[P]video_envalue/Envaluer.cpp
// Function: Envaluer::ssim_end4(int (*) [4], int (*) [4], int)
float Envaluer::ssim_end4( int sum0[5][4], int sum1[5][4], int width )
{
    int i;
    float ssim = 0.0;
    for( i = 0; i < width; i++ )
        ssim += ssim_end1( sum0[i][0] + sum0[i+1][0] + sum1[i][0] + sum1[i+1][0],
                           sum0[i][1] + sum0[i+1][1] + sum1[i][1] + sum1[i+1][1],
                           sum0[i][2] + sum0[i+1][2] + sum1[i][2] + sum1[i+1][2],
                           sum0[i][3] + sum0[i+1][3] + sum1[i][3] + sum1[i+1][3] );
    return ssim;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x332b
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl (%rax), %esi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl (%rax), %esi
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl (%rax), %esi
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl 0x4(%rax), %edx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl 0x4(%rax), %edx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addl 0x4(%rax), %edx
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %r8d
addl $0x1, %r8d
movslq %r8d, %r8
shlq $0x4, %r8
addq %r8, %rax
addl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %r8
shlq $0x4, %r8
addq %r8, %rax
addl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %r8d
addl $0x1, %r8d
movslq %r8d, %r8
shlq $0x4, %r8
addq %r8, %rax
addl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %r8
shlq $0x4, %r8
addq %r8, %rax
movl 0xc(%rax), %r8d
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %r9d
addl $0x1, %r9d
movslq %r9d, %r9
shlq $0x4, %r9
addq %r9, %rax
addl 0xc(%rax), %r8d
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %r9
shlq $0x4, %r9
addq %r9, %rax
addl 0xc(%rax), %r8d
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %r9d
addl $0x1, %r9d
movslq %r9d, %r9
shlq $0x4, %r9
addq %r9, %rax
addl 0xc(%rax), %r8d
callq 0x30e0
addss -0x24(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31ae
movss -0x24(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: zhangk145[P]video_envalue/Main.cpp
// Function: psnr_write(double, void*)
static int psnr_write(double v, void *usr) {
    Context *c = (Context *)usr;
    FILE *fp = c->psnr_file;
    char str[10] = {0};
    sprintf(str, "%.3f\n", v);
    int len = fwrite(str, sizeof(char), strlen(str), fp);
    // printf("[%s:%d]==len:%d\n", __FUNCTION__, __LINE__, len);
    fflush(fp);
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x2a(%rbp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x20b0
leaq -0x2a(%rbp), %rdi
movsd -0x8(%rbp), %xmm0
leaq 0x1195(%rip), %rsi      # 0x52f9
movb $0x1, %al
callq 0x2290
leaq -0x2a(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x20d0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x22c0
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2120
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: zhangk145[P]video_envalue/Main.cpp
// Function: ssim_write(double, void*)
static int ssim_write(double v, void *usr) {
    Context *c = (Context *)usr;
    FILE *fp = c->ssim_file;
    char str[10] = {0};
    sprintf(str, "%.3f\n", v);
    int len = fwrite(str, sizeof(char), strlen(str), fp);
    // printf("[%s:%d]==len:%d\n", __FUNCTION__, __LINE__, len);
    fflush(fp);
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movsd %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x2a(%rbp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x20b0
leaq -0x2a(%rbp), %rdi
movsd -0x8(%rbp), %xmm0
leaq 0x1104(%rip), %rsi      # 0x52f9
movb $0x1, %al
callq 0x2290
leaq -0x2a(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x2a(%rbp), %rdi
callq 0x20d0
movq -0x38(%rbp), %rdi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x22c0
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2120
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::computeMakeScore(int)
int Lawa::computeMakeScore(int lit) {
    int score = 0;
    vector<int>& occList = lit > 0 ? posOccList[lit] : negOccList[-lit];
    for (int cid : occList) {
        if (clauses[cid].satLits == 0) {
            score++;
        }
    }
    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x13fd
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x1418
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2900
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2930
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2960
testb $0x1, %al
jne 0x1455
jmp 0x1493
leaq -0x28(%rbp), %rdi
callq 0x29a0
movq -0x40(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x34(%rbp)
addq $0x10, %rdi
movslq -0x34(%rbp), %rsi
callq 0x29c0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x1486
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1488
leaq -0x28(%rbp), %rdi
callq 0x29e0
jmp 0x1442
movl -0x10(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::computeBreakScore(int)
int Lawa::computeBreakScore(int lit) {
    int score = 0;
    vector<int>& occList = lit > 0 ? negOccList[lit] : posOccList[-lit];
    for (int cid : occList) {
        if (clauses[cid].satLits == 1) {
            score++;
        }
    }
    return score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x14dd
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x14f8
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
xorl %ecx, %ecx
subl -0xc(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2900
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2930
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2960
testb $0x1, %al
jne 0x1535
jmp 0x1573
leaq -0x28(%rbp), %rdi
callq 0x29a0
movq -0x40(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x34(%rbp)
addq $0x10, %rdi
movslq -0x34(%rbp), %rsi
callq 0x29c0
movsbl 0x1(%rax), %eax
cmpl $0x1, %eax
jne 0x1566
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x1568
leaq -0x28(%rbp), %rdi
callq 0x29e0
jmp 0x1522
movl -0x10(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::flipLiteral(int)
void Lawa::flipLiteral(int lit) {
    int var = abs(lit);
    vector<int>& decOccList = lit > 0 ? negOccList[var] : posOccList[var];
    vector<int>& incOccList = lit > 0 ? posOccList[var] : negOccList[var];

    for (int cid : decOccList) {
        clauses[cid].satLits--;
        if (clauses[cid].satLits == 0) {
            unsatClauseIds.push_back(cid);
        }
    }
    for (int cid : incOccList) {
        clauses[cid].satLits++;
    }

    tvalues[var] = lit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x15c6
movq -0x68(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x15dd
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x1604
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x161b
movq -0x68(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2900
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2930
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2960
testb $0x1, %al
jne 0x1658
jmp 0x16b8
leaq -0x30(%rbp), %rdi
callq 0x29a0
movq -0x68(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
addq $0x10, %rdi
movslq -0x3c(%rbp), %rsi
callq 0x29c0
movq -0x68(%rbp), %rdi
movb 0x1(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x1(%rax)
addq $0x10, %rdi
movslq -0x3c(%rbp), %rsi
callq 0x29c0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x16ab
movq -0x68(%rbp), %rdi
addq $0x38, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x2a00
jmp 0x16ad
leaq -0x30(%rbp), %rdi
callq 0x29e0
jmp 0x1645
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2900
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2930
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2960
testb $0x1, %al
jne 0x16ed
jmp 0x1720
leaq -0x50(%rbp), %rdi
callq 0x29a0
movq -0x68(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
addq $0x10, %rdi
movslq -0x5c(%rbp), %rsi
callq 0x29c0
movb 0x1(%rax), %cl
addb $0x1, %cl
movb %cl, 0x1(%rax)
leaq -0x50(%rbp), %rdi
callq 0x29e0
jmp 0x16da
movq -0x68(%rbp), %rax
movl -0xc(%rbp), %edx
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::deallocateMemory()
void Lawa::deallocateMemory() {
    if (tvalues != nullptr) {
        delete[] tvalues;
        delete[] posOccList;
        delete[] negOccList;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, 0x8(%rax)
je 0x1862
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x177a
movq -0x18(%rbp), %rdi
callq 0x1130
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x17ed
movq -0x20(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rcx), %rax
movq %rax, -0x30(%rbp)
imulq $0x18, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x28(%rbp)
je 0x17d8
movq -0x28(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x40(%rbp)
callq 0x2a70
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x28(%rbp)
jne 0x17b6
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
imulq $0x18, %rax, %rsi
addq $0x8, %rsi
callq 0x11b0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x1860
movq -0x48(%rbp), %rcx
movq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rcx), %rax
movq %rax, -0x58(%rbp)
imulq $0x18, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
cmpq %rax, %rcx
movq %rax, -0x50(%rbp)
je 0x184b
movq -0x50(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x68(%rbp)
callq 0x2a70
movq -0x48(%rbp), %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x50(%rbp)
jne 0x1829
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rax
imulq $0x18, %rax, %rsi
addq $0x8, %rsi
callq 0x11b0
jmp 0x1862
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::addLiteral(int)
void Lawa::addLiteral(int lit) {
    int var = abs(lit);
    if (var > numVariables) {
        numVariables = var;
    }
    if (lit == 0) {
        clauses.push_back(makeClause(currentAddedClause));
        currentAddedClause.clear();
    } else {
        currentAddedClause.push_back(lit);
    }
    clausesAdded = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x60(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %edx
negl %edx
cmovnsl %edx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl (%rcx), %eax
jle 0x18a4
movq -0x60(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, (%rax)
cmpl $0x0, -0xc(%rbp)
jne 0x193b
movq -0x60(%rbp), %rsi
movq %rsi, %rax
addq $0x10, %rax
movq %rax, -0x70(%rbp)
addq $0x50, %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x2b00
movq -0x68(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x12c0
jmp 0x18dd
movq -0x70(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2ad0
jmp 0x18ec
leaq -0x30(%rbp), %rdi
callq 0x28a0
leaq -0x48(%rbp), %rdi
callq 0x2a70
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
callq 0x2bf0
jmp 0x194c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1930
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x28a0
leaq -0x48(%rbp), %rdi
callq 0x2a70
jmp 0x195a
movq -0x60(%rbp), %rdi
addq $0x50, %rdi
leaq -0xc(%rbp), %rsi
callq 0x2a00
movq -0x60(%rbp), %rax
movb $0x1, 0x68(%rax)
addq $0x70, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x11a0
nopw %cs:(%rax,%rax)
// File: biotomas[P]ipasir/sat/lawa/lawa.cpp
// Function: Lawa::printDebug()
void Lawa::printDebug() {
    for (int ci = 0; ci < clauses.size(); ci++) {
        printf("%d: ",ci);
        printClause(clauses[ci]);
    }
    printModel();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x10, %rdi
callq 0x2c10
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x1ab1
movl -0xc(%rbp), %esi
leaq 0x658a(%rip), %rdi      # 0x8010
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movslq -0xc(%rbp), %rsi
callq 0x29c0
movq %rax, %rdi
callq 0x1340
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1a5b
movq -0x18(%rbp), %rdi
callq 0x19d0
addq $0x20, %rsp
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa93(%rip), %rsi       # 0x806e
callq 0x1120
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x75f4
movb $0x0, -0x1(%rbp)
jmp 0x76df
movl $0x0, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
movl $0x0, -0x2c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2c90
cmpl $-0x1, -0x24(%rbp)
je 0x76c7
movq -0x20(%rbp), %rdi
callq 0x1170
movl %eax, -0x5c(%rbp)
jmp 0x7627
movl -0x5c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x63, -0x24(%rbp)
jne 0x765a
movq -0x20(%rbp), %rdi
callq 0x7580
jmp 0x763e
jmp 0x760f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2a70
jmp 0x76ea
cmpl $0x70, -0x24(%rbp)
jne 0x7662
jmp 0x760f
movl -0x24(%rbp), %edi
callq 0x1050
cmpl $0x0, %eax
je 0x7671
jmp 0x760f
cmpl $0x2d, -0x24(%rbp)
jne 0x767d
movb $0x1, -0x25(%rbp)
jmp 0x760f
movl -0x24(%rbp), %edi
callq 0x10d0
cmpl $0x0, %eax
je 0x76c2
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x7510
movl %eax, -0x60(%rbp)
jmp 0x769b
movl -0x60(%rbp), %eax
movl %eax, -0x58(%rbp)
testb $0x1, -0x25(%rbp)
je 0x76ae
imull $-0x1, -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movb $0x0, -0x25(%rbp)
movq -0x18(%rbp), %rdi
movl -0x58(%rbp), %esi
callq 0x1870
jmp 0x76c0
jmp 0x76c2
jmp 0x760f
movq -0x20(%rbp), %rdi
callq 0x10f0
jmp 0x76d2
movb $0x1, -0x1(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2a70
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x11a0
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x950(%rip), %rdi       # 0x8070
xorl %eax, %eax
movb %al, -0xc9(%rbp)
callq 0x1040
movb -0xc9(%rbp), %al
leaq 0x978(%rip), %rdi       # 0x80b2
callq 0x1040
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x78a0
movq -0xc8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x75c0
movb %al, -0xbd(%rbp)
jmp 0x776e
movb -0xbd(%rbp), %al
testb $0x1, %al
jne 0x77c3
jmp 0x777a
leaq 0x972(%rip), %rdi       # 0x80f3
xorl %eax, %eax
callq 0x1040
jmp 0x778a
movl $0x1, -0x4(%rbp)
movl $0x1, -0xb8(%rbp)
jmp 0x787b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1ac0
jmp 0x7893
movl $0x2, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x780f
movq -0x10(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1160
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0x1970
jmp 0x77fc
jmp 0x77fe
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x77cd
movl $0x7e2, %edi            # imm = 0x7E2
callq 0x10e0
leaq -0xa8(%rbp), %rdi
callq 0x2370
movl %eax, -0xd0(%rbp)
jmp 0x782d
movl -0xd0(%rbp), %eax
cmpl $0xa, %eax
jne 0x7858
leaq 0x8cf(%rip), %rdi       # 0x810e
xorl %eax, %eax
callq 0x1040
jmp 0x7848
leaq -0xa8(%rbp), %rdi
callq 0x19d0
jmp 0x7856
jmp 0x786a
leaq 0x8c0(%rip), %rdi       # 0x811f
xorl %eax, %eax
callq 0x1040
jmp 0x7868
jmp 0x786a
movl $0x0, -0x4(%rbp)
movl $0x1, -0xb8(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x1ac0
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x11a0
nop
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movb $0x0, -0x1a(%rbp)
movq -0x8(%rbp), %rsi
movzbl -0x19(%rbp), %edx
leaq 0x2a6b7(%rip), %rdi     # 0x2f240
movb $0x0, %al
callq 0x4050
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x4bc6
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movzbl -0x1a(%rbp), %eax
addl %ecx, %eax
movb %al, -0x1a(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4b97
movzbl -0x19(%rbp), %eax
movzbl -0x1a(%rbp), %ecx
addl %ecx, %eax
movzbl %al, %eax
cmpl $0x0, %eax
je 0x4c18
movzbl -0x1a(%rbp), %eax
xorl %esi, %esi
subl %eax, %esi
andl $0xff, %esi
leaq 0x2a668(%rip), %rdi     # 0x2f255
movb $0x0, %al
callq 0x4050
movzbl -0x19(%rbp), %edx
movzbl -0x1a(%rbp), %eax
xorl %ecx, %ecx
subl %eax, %ecx
andl $0xff, %ecx
xorl %edi, %edi
leaq 0x2a65b(%rip), %rsi     # 0x2f26a
movb $0x0, %al
callq 0x47d0
jmp 0x4c26
leaq 0x2acea(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x4ca0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x4c6f
movq -0x8(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x4c98
movq -0x8(%rbp), %rax
movl (%rax), %eax
xorl %edx, %edx
divl -0xc(%rbp)
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
xorl %edx, %edx
divl -0xc(%rbp)
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: gcd(unsigned int, unsigned int)
static unsigned gcd(unsigned a, unsigned b)
{
	while (b) {
		unsigned t = b;

		b = a % b;
		a = t;
	}
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x4cc9
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
xorl %edx, %edx
divl -0x8(%rbp)
movl %edx, -0x8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4caa
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x180(%rax), %esi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0xb6d0
movq -0x90(%rbp), %rdi
callq 0x4490
movq -0x90(%rbp), %rdi
movl %eax, -0x84(%rbp)
callq 0x41f0
movl -0x84(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq 0x2a555(%rip), %rsi     # 0x2f297
xorl %eax, %eax
leaq -0x50(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x40a0
leaq -0x51(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x4560
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0xb510
jmp 0x4d71
leaq -0x51(%rbp), %rdi
callq 0x4370
movq -0x98(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x4370
movq -0x60(%rbp), %rdi
callq 0x4550
nopl (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_state::match_timings(timings const&, timings const&)
bool edid_state::match_timings(const timings &t1, const timings &t2)
{
	if (t1.hact != t2.hact ||
	    t1.vact != t2.vact ||
	    t1.rb != t2.rb ||
	    t1.interlaced != t2.interlaced ||
	    t1.hfp != t2.hfp ||
	    t1.hbp != t2.hbp ||
	    t1.hsync != t2.hsync ||
	    t1.pos_pol_hsync != t2.pos_pol_hsync ||
	    t1.hratio != t2.hratio ||
	    t1.vfp != t2.vfp ||
	    t1.vbp != t2.vbp ||
	    t1.vsync != t2.vsync ||
	    t1.pos_pol_vsync != t2.pos_pol_vsync ||
	    t1.vratio != t2.vratio ||
	    t1.pixclk_khz != t2.pixclk_khz)
		return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movb 0x18(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq -0x20(%rbp), %rcx
movb 0x18(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movb 0x28(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq -0x20(%rbp), %rcx
movb 0x28(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x2c(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x34(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x34(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x30(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movb 0x38(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq -0x20(%rbp), %rcx
movb 0x38(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x4ef1
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x4ef7
movb $0x0, -0x1(%rbp)
jmp 0x4efb
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4510
testb $0x1, %al
jne 0x605f
jmp 0x606e
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0x4040
jmp 0x60e0
movq -0x10(%rbp), %rdi
callq 0x4510
testb $0x1, %al
jne 0x60de
movq -0x8(%rbp), %rsi
leaq 0x29c73(%rip), %rdx     # 0x2fcf9
leaq -0x50(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0xca40
movq -0x68(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0xc9f0
jmp 0x60a6
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x43d0
leaq -0x30(%rbp), %rdi
callq 0x41f0
leaq -0x50(%rbp), %rdi
callq 0x41f0
jmp 0x60de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x41f0
jmp 0x60e6
jmp 0x60e0
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x4550
nop
// File: 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xb0(%rbp)
movzbl (%rax), %edx
movzbl 0x1(%rax), %ecx
movl %ecx, -0x94(%rbp)
movzbl 0x2(%rax), %r8d
movzbl 0x3(%rax), %r9d
movzbl 0x4(%rax), %esi
movzbl 0x5(%rax), %edi
movzbl 0x6(%rax), %r10d
movzbl 0x7(%rax), %r11d
movzbl 0x8(%rax), %ebx
movzbl 0x9(%rax), %r14d
movzbl 0xa(%rax), %r15d
movzbl 0xb(%rax), %r12d
movzbl 0xc(%rax), %r13d
movzbl 0xd(%rax), %ecx
movl %ecx, -0x98(%rbp)
movzbl 0xe(%rax), %ecx
movl %ecx, -0x9c(%rbp)
movzbl 0xf(%rax), %ecx
movq %rsp, %rax
movq %rax, -0xa8(%rbp)
movl %ecx, 0x58(%rax)
movl -0x9c(%rbp), %ecx
movl %ecx, 0x50(%rax)
movl -0x98(%rbp), %ecx
movl %ecx, 0x48(%rax)
movl -0x94(%rbp), %ecx
movl %r13d, 0x40(%rax)
movl %r12d, 0x38(%rax)
movl %r15d, 0x30(%rax)
movl %r14d, 0x28(%rax)
movl %ebx, 0x20(%rax)
movl %r11d, 0x18(%rax)
movl %r10d, 0x10(%rax)
movl %edi, 0x8(%rax)
movl %esi, (%rax)
leaq 0x280b6(%rip), %rsi     # 0x2f563
xorl %eax, %eax
leaq -0x60(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x40a0
leaq -0x61(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x4560
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xb510
jmp 0x74e5
leaq -0x61(%rbp), %rdi
callq 0x4370
movq -0xb8(%rbp), %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x4370
movq -0x70(%rbp), %rdi
callq 0x4550
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: oui_name(unsigned int, bool)
const char *oui_name(unsigned oui, bool reverse)
{
	if (reverse)
		oui = (oui >> 16) | (oui & 0xff00) | ((oui & 0xff) << 16);

	switch (oui) {
	case 0x00001a: return "AMD";
	case 0x000c03: return "HDMI";
	case 0x00044b: return "NVIDIA";
	case 0x000c6e: return "ASUS";
	case 0x0010fa: return "Apple";
	case 0x0014b9: return "MSTAR";
	case 0x00d046: return "Dolby";
	case 0x00e047: return "InFocus";
	case 0x3a0292: return "VESA";
	case 0x90848b: return "HDR10+";
	case 0xc45dd8: return "HDMI Forum";
	case 0xca125c: return "Microsoft";
	default: return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movl %edi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
je 0x75f7
movl -0xc(%rbp), %eax
shrl $0x10, %eax
movl -0xc(%rbp), %ecx
andl $0xff00, %ecx           # imm = 0xFF00
orl %ecx, %eax
movl -0xc(%rbp), %ecx
andl $0xff, %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
subl $0x1a, %eax
je 0x76bb
jmp 0x7608
movl -0x14(%rbp), %eax
subl $0x44b, %eax            # imm = 0x44B
je 0x76db
jmp 0x7618
movl -0x14(%rbp), %eax
subl $0xc03, %eax            # imm = 0xC03
je 0x76cb
jmp 0x7628
movl -0x14(%rbp), %eax
subl $0xc6e, %eax            # imm = 0xC6E
je 0x76e8
jmp 0x7638
movl -0x14(%rbp), %eax
subl $0x10fa, %eax           # imm = 0x10FA
je 0x76f5
jmp 0x7648
movl -0x14(%rbp), %eax
subl $0x14b9, %eax           # imm = 0x14B9
je 0x7702
jmp 0x7658
movl -0x14(%rbp), %eax
subl $0xd046, %eax           # imm = 0xD046
je 0x770f
jmp 0x7668
movl -0x14(%rbp), %eax
subl $0xe047, %eax           # imm = 0xE047
je 0x771c
jmp 0x7678
movl -0x14(%rbp), %eax
subl $0x3a0292, %eax         # imm = 0x3A0292
je 0x7729
jmp 0x7688
movl -0x14(%rbp), %eax
subl $0x90848b, %eax         # imm = 0x90848B
je 0x7736
jmp 0x7698
movl -0x14(%rbp), %eax
subl $0xc45dd8, %eax         # imm = 0xC45DD8
je 0x7743
jmp 0x76a8
movl -0x14(%rbp), %eax
subl $0xca125c, %eax         # imm = 0xCA125C
je 0x7750
jmp 0x775d
leaq 0x27ee6(%rip), %rax     # 0x2f5a8
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27eda(%rip), %rax     # 0x2f5ac
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27ecf(%rip), %rax     # 0x2f5b1
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27ec9(%rip), %rax     # 0x2f5b8
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27ec1(%rip), %rax     # 0x2f5bd
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27eba(%rip), %rax     # 0x2f5c3
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27eb3(%rip), %rax     # 0x2f5c9
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27eac(%rip), %rax     # 0x2f5cf
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27ea7(%rip), %rax     # 0x2f5d7
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27e9f(%rip), %rax     # 0x2f5dc
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27e99(%rip), %rax     # 0x2f5e3
movq %rax, -0x8(%rbp)
jmp 0x7765
leaq 0x27e97(%rip), %rax     # 0x2f5ee
movq %rax, -0x8(%rbp)
jmp 0x7765
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: memchk(unsigned char const*, unsigned int, unsigned char)
bool memchk(const unsigned char *x, unsigned len, unsigned char v)
{
	for (unsigned i = 0; i < len; i++)
		if (x[i] != v)
			return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb %al, -0x15(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x7855
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movzbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
je 0x7848
movb $0x0, -0x1(%rbp)
jmp 0x7859
jmp 0x784a
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7827
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movl %r8d, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x7889
jmp 0x79ff
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x79ff
movl -0x1c(%rbp), %eax
movl -0x14(%rbp), %ecx
subl -0x20(%rbp), %ecx
cmpl %ecx, %eax
jae 0x78b1
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x78ba
movl -0x14(%rbp), %eax
subl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x286f1(%rip), %rdi     # 0x2ffbc
movb $0x0, %al
callq 0x4050
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x7922
movl -0x24(%rbp), %ecx
leaq 0x285ce(%rip), %rsi     # 0x2feb9
leaq 0x2cef0(%rip), %rax     # 0x347e2
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %edx
leaq 0x27cf7(%rip), %rdi     # 0x2f607
movb $0x0, %al
callq 0x4050
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x78d9
testb $0x1, -0x15(%rbp)
je 0x79e3
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x7953
leaq 0x2ce9f(%rip), %rdi     # 0x347e0
movb $0x0, %al
callq 0x4050
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7932
leaq 0x27cb4(%rip), %rdi     # 0x2f60e
movb $0x0, %al
callq 0x4050
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x79d5
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jl 0x79af
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x7e, %eax
jg 0x79af
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x30(%rbp)
jmp 0x79b9
movl $0x2e, %eax
movl %eax, -0x30(%rbp)
jmp 0x79b9
movl -0x30(%rbp), %esi
leaq 0x27c4e(%rip), %rdi     # 0x2f611
movb $0x0, %al
callq 0x4050
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7968
leaq 0x27c33(%rip), %rdi     # 0x2f60f
movb $0x0, %al
callq 0x4050
leaq 0x27f1f(%rip), %rdi     # 0x2f909
movb $0x0, %al
callq 0x4050
movl -0x1c(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0x7890
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_state::preparse_extension(unsigned char const*)
void edid_state::preparse_extension(const unsigned char *x)
{
	switch (x[0]) {
	case 0x02:
		has_cta = true;
		preparse_cta_block(x);
		break;
	case 0x70:
		has_dispid = true;
		preparse_displayid_block(x);
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x14(%rbp)
subl $0x2, %eax
je 0x80e3
jmp 0x80d9
movl -0x14(%rbp), %eax
subl $0x70, %eax
je 0x80f6
jmp 0x8107
movq -0x20(%rbp), %rdi
movb $0x1, 0x50(%rdi)
movq -0x10(%rbp), %rsi
callq 0x1d720
jmp 0x8107
movq -0x20(%rbp), %rdi
movb $0x1, 0x51(%rdi)
movq -0x10(%rbp), %rsi
callq 0x28730
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
testb $0x1, -0x1(%rbp)
je 0x8a23
leaq 0x27576(%rip), %rax     # 0x2ff93
movq %rax, -0x40(%rbp)
jmp 0x8a30
leaq 0x27572(%rip), %rax     # 0x2ff9c
movq %rax, -0x40(%rbp)
jmp 0x8a30
movq -0x40(%rbp), %rsi
leaq 0x27551(%rip), %rdi     # 0x2ff8c
movb $0x0, %al
callq 0x4050
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x43102(%rip), %eax     # 0x4bb54
jae 0x8b1e
movl -0x8(%rbp), %eax
leaq 0x43a6e(%rip), %rdi     # 0x4c4d0
shlq $0x6, %rax
addq %rax, %rdi
movb -0x1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x4510
testb $0x1, %al
jne 0x8a83
jmp 0x8a85
jmp 0x8af9
movl -0x8(%rbp), %eax
movl %eax, -0x4c(%rbp)
shll $0x7, %eax
leaq 0x47b8b(%rip), %rcx     # 0x50620
movzbl (%rax,%rcx), %esi
leaq -0x28(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x7a10
movq -0x58(%rbp), %rdi
callq 0x4150
movq %rax, -0x48(%rbp)
movl -0x8(%rbp), %eax
shlq $0x6, %rax
leaq 0x43a0f(%rip), %rdi     # 0x4c4d0
addq %rax, %rdi
movzbl -0x1(%rbp), %eax
andl $0x1, %eax
shll $0x5, %eax
addq %rax, %rdi
callq 0x4150
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdx
movq %rax, %rcx
leaq 0x274be(%rip), %rdi     # 0x2ffa5
xorl %eax, %eax
callq 0x4050
jmp 0x8af0
leaq -0x28(%rbp), %rdi
callq 0x41f0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8a49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x41f0
jmp 0x8b81
movb -0x1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x439a3(%rip), %rdi     # 0x4c4d0
addq $0x4000, %rdi           # imm = 0x4000
shlq $0x5, %rax
addq %rax, %rdi
callq 0x4510
testb $0x1, %al
jne 0x8b46
jmp 0x8b48
jmp 0x8b7b
movb -0x1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
leaq 0x43979(%rip), %rdi     # 0x4c4d0
addq $0x4000, %rdi           # imm = 0x4000
shlq $0x5, %rax
addq %rax, %rdi
callq 0x4150
movq %rax, %rsi
leaq 0x27442(%rip), %rdi     # 0x2ffb6
movb $0x0, %al
callq 0x4050
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x4550
nopw (%rax,%rax)
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: show_gtf(gtf_parsed_data&)
static void show_gtf(gtf_parsed_data &data)
{
	timings t;

	t = state.calc_gtf_mode(data.w, data.h, data.freq, data.interlaced,
				data.ip_parm, data.overscan, data.secondary,
				data.C, data.M, data.K, data.J);
	calc_ratio(&t);
	state.print_timings("", &t, "GTF", "", true, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movb 0x31(%rax), %r8b
movq -0x8(%rbp), %rax
movl 0x34(%rax), %r9d
movq -0x8(%rbp), %rax
movb 0x30(%rax), %r10b
movq -0x8(%rbp), %rax
movb 0x32(%rax), %al
movq -0x8(%rbp), %rsi
movsd 0x10(%rsi), %xmm1
movq -0x8(%rbp), %rsi
movsd 0x18(%rsi), %xmm2
movq -0x8(%rbp), %rsi
movsd 0x20(%rsi), %xmm3
movq -0x8(%rbp), %rsi
movsd 0x28(%rsi), %xmm4
leaq -0xb0(%rbp), %rdi
leaq 0x41fca(%rip), %rsi     # 0x4bb50
andb $0x1, %r8b
andb $0x1, %r10b
andb $0x1, %al
movzbl %r8b, %r8d
movzbl %r10b, %r10d
movl %r10d, (%rsp)
movzbl %al, %eax
movl %eax, 0x8(%rsp)
callq 0x2cff0
leaq -0x5c(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x54, %edx
callq 0x42a0
leaq -0x5c(%rbp), %rdi
callq 0x4c30
leaq 0x41f83(%rip), %rdi     # 0x4bb50
leaq 0x262e5(%rip), %r8      # 0x2feb9
leaq -0x5c(%rbp), %rdx
leaq 0x2a00f(%rip), %rcx     # 0x33bee
movl $0x1, %r9d
xorl %eax, %eax
movq %r8, %rsi
movl $0x0, (%rsp)
callq 0x50c0
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: rpavlik[P]edid-decode/edid-decode.cpp
// Function: edid_to_file(char const*, output_format)
static int edid_to_file(const char *to_file, enum output_format out_fmt)
{
	FILE *out;

	if (!strcmp(to_file, "-")) {
		to_file = "stdout";
		out = stdout;
	} else if ((out = fopen(to_file, "w")) == NULL) {
		perror(to_file);
		return -1;
	}
	if (out_fmt == OUT_FMT_DEFAULT)
		out_fmt = out == stdout ? OUT_FMT_HEX : OUT_FMT_RAW;

	switch (out_fmt) {
	default:
	case OUT_FMT_HEX:
		hexdumpedid(out, edid, state.edid_size);
		break;
	case OUT_FMT_RAW:
		fwrite(edid, state.edid_size, 1, out);
		break;
	case OUT_FMT_CARRAY:
		carraydumpedid(out, edid, state.edid_size);
		break;
	case OUT_FMT_XML:
		xmldumpedid(out, edid, state.edid_size);
		break;
	}

	if (out != stdout)
		fclose(out);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x2a3d5(%rip), %rsi     # 0x3418f
callq 0x4440
cmpl $0x0, %eax
jne 0x9ddf
leaq 0x275ea(%rip), %rax     # 0x313b5
movq %rax, -0x10(%rbp)
movq 0x411da(%rip), %rax     # 0x4afb0
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x9e10
movq -0x10(%rbp), %rdi
leaq 0x25cc2(%rip), %rsi     # 0x2faac
callq 0x43b0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x9e0e
movq -0x10(%rbp), %rdi
callq 0x42b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9ee2
jmp 0x9e10
cmpl $0x0, -0x14(%rbp)
jne 0x9e37
movq -0x20(%rbp), %rdx
movq 0x4118f(%rip), %rax     # 0x4afb0
movq (%rax), %rsi
movl $0x2, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x9e5b
movq -0x28(%rbp), %rax
leaq 0x25396(%rip), %rcx     # 0x2f1e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x9e5d
movq -0x20(%rbp), %rdi
movl 0x41ce9(%rip), %edx     # 0x4bb50
leaq 0x467b2(%rip), %rsi     # 0x50620
callq 0xacd0
jmp 0x9ec2
movl 0x41cd5(%rip), %eax     # 0x4bb50
movl %eax, %esi
movq -0x20(%rbp), %rcx
leaq 0x46798(%rip), %rdi     # 0x50620
movl $0x1, %edx
callq 0x4590
jmp 0x9ec2
movq -0x20(%rbp), %rdi
movl 0x41cb2(%rip), %edx     # 0x4bb50
leaq 0x4677b(%rip), %rsi     # 0x50620
callq 0xae00
jmp 0x9ec2
movq -0x20(%rbp), %rdi
movl 0x41c9a(%rip), %edx     # 0x4bb50
leaq 0x46763(%rip), %rsi     # 0x50620
callq 0xaf60
movq -0x20(%rbp), %rax
movq 0x410e3(%rip), %rcx     # 0x4afb0
cmpq (%rcx), %rax
je 0x9edb
movq -0x20(%rbp), %rdi
callq 0x4320
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x9f22
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0x4040
jmp 0xa01c
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x9f9f
movq -0x8(%rbp), %rsi
leaq 0x25f77(%rip), %rdx     # 0x2feb2
leaq -0x58(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0xca40
movq -0xb0(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0xc9f0
jmp 0x9f61
movq -0x8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x43d0
leaq -0x38(%rbp), %rdi
callq 0x41f0
leaq -0x58(%rbp), %rdi
callq 0x41f0
jmp 0xa01a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x41f0
jmp 0xa030
movq -0x8(%rbp), %rsi
leaq 0x25f10(%rip), %rdx     # 0x2feba
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xca40
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0xc9f0
jmp 0x9fd6
movq -0x8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x43d0
leaq -0x88(%rbp), %rdi
callq 0x41f0
leaq -0xa8(%rbp), %rdi
callq 0x41f0
jmp 0xa01a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x41f0
jmp 0xa030
jmp 0xa01c
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0xc0, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x4550
nopl (%rax)