LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: cloudinary[P]fuif/transform/2dmatch.h
// Function: meta_match(Image&, std::vector<int, std::allocator<int>>&)
void meta_match(Image &input, std::vector<int> &parameters) {
    if (!parameters.size()) default_match_parameters(parameters,input);
    if (parameters.size() < 3) {
        e_printf("Error: match transform with incorrect parameters.\n");
        input.error = true; return;
    }
    int begin_c = input.nb_meta_channels+parameters[0];
    int end_c = input.nb_meta_channels+parameters[1];
    if (begin_c > end_c || end_c >= input.channel.size()) {
        e_printf("Error: match transform with incorrect parameters.\n");
        input.error = true; return;
    }
    input.nb_meta_channels++;
    Channel mch(input.channel[begin_c].w,input.channel[begin_c].h, 0, 1);
    input.channel.insert(input.channel.begin(),mch);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xc8(%rsp), %rdi
callq 0x4d50
cmpq $0x0, %rax
jne 0xecff
movq 0xc8(%rsp), %rdi
movq 0xd0(%rsp), %rsi
callq 0xe260
movq 0xc8(%rsp), %rdi
callq 0x4d50
cmpq $0x3, %rax
jae 0xed34
leaq 0x3800e(%rip), %rdi     # 0x46d27
movb $0x0, %al
callq 0x3a670
movq 0xd0(%rsp), %rax
movb $0x1, 0xa8(%rax)
jmp 0xeec9
movq 0xd0(%rsp), %rax
movl 0x6c(%rax), %eax
movl %eax, 0x50(%rsp)
movq 0xc8(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
movq %rax, %rcx
movl 0x50(%rsp), %eax
addl (%rcx), %eax
movl %eax, 0xc4(%rsp)
movq 0xd0(%rsp), %rax
movl 0x6c(%rax), %eax
movl %eax, 0x54(%rsp)
movq 0xc8(%rsp), %rdi
movl $0x1, %esi
callq 0x12190
movq %rax, %rcx
movl 0x54(%rsp), %eax
addl (%rcx), %eax
movl %eax, 0xc0(%rsp)
movl 0xc4(%rsp), %eax
cmpl 0xc0(%rsp), %eax
jg 0xedcc
movslq 0xc0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xd0(%rsp), %rdi
callq 0x4b80
movq %rax, %rcx
movq 0x48(%rsp), %rax
cmpq %rcx, %rax
jb 0xedee
leaq 0x37f54(%rip), %rdi     # 0x46d27
movb $0x0, %al
callq 0x3a670
movq 0xd0(%rsp), %rax
movb $0x1, 0xa8(%rax)
jmp 0xeec9
movq 0xd0(%rsp), %rax
movl 0x6c(%rax), %ecx
incl %ecx
movl %ecx, 0x6c(%rax)
movq 0xd0(%rsp), %rdi
movslq 0xc4(%rsp), %rsi
callq 0x4ba0
movl 0x18(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0xd0(%rsp), %rdi
movslq 0xc4(%rsp), %rsi
callq 0x4ba0
movl 0x2c(%rsp), %esi
movl 0x1c(%rax), %edx
movq %rsp, %rax
movl $0x0, 0x18(%rax)
movl $0x0, 0x10(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, (%rax)
leaq 0x80(%rsp), %rdi
movq %rdi, 0x38(%rsp)
xorl %ecx, %ecx
movl $0x1, %r9d
movl %r9d, %r8d
callq 0x12200
movq 0xd0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x127d0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x12840
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rdx
movq 0x78(%rsp), %rsi
callq 0x12c20
movq %rax, 0x40(%rsp)
jmp 0xeeb2
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x12380
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x12380
movq 0x68(%rsp), %rdi
callq 0x36a0
nopw %cs:(%rax,%rax)
// File: cloudinary[P]fuif/transform/2dmatch.h
// Function: matches(Image&, int, int, int, int, int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&, bool)
bool matches(Image &img, int c0, int cn, int x, int y, int z, offsets &ot, bool newmatch) {
    int x2 = x+ot[z].first;
    int y2 = y+ot[z].second;
    if (y2<0 || x2<0) return false;
    if (x2 >= img.channel[c0].w) return false;
    if (newmatch && img.channel[0].value(y,x)) return false;
    for (int c=c0; c<=cn; c++)
        if (img.channel[c].value(y,x) != img.channel[c].value(y2,x2)) return false;
    return true;
}

// Assembly:
subq $0x48, %rsp
movb 0x58(%rsp), %al
movq 0x50(%rsp), %r10
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movl %r8d, 0x28(%rsp)
movl %r9d, 0x24(%rsp)
andb $0x1, %al
movb %al, 0x23(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x13420
movq %rax, %rcx
movl 0xc(%rsp), %eax
addl (%rcx), %eax
movl %eax, 0x1c(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
movslq 0x24(%rsp), %rsi
callq 0x13420
movq %rax, %rcx
movl 0x10(%rsp), %eax
addl 0x4(%rcx), %eax
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
jl 0xef85
cmpl $0x0, 0x1c(%rsp)
jge 0xef8f
movb $0x0, 0x47(%rsp)
jmp 0xf071
movl 0x1c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x4ba0
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl 0x18(%rcx), %eax
jl 0xefbc
movb $0x0, 0x47(%rsp)
jmp 0xf071
testb $0x1, 0x23(%rsp)
je 0xeff1
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4ba0
movq %rax, %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
callq 0x12110
cmpw $0x0, (%rax)
je 0xeff1
movb $0x0, 0x47(%rsp)
jmp 0xf071
movl 0x34(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x30(%rsp), %eax
jg 0xf06c
movq 0x38(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x4ba0
movq %rax, %rdi
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
callq 0x12110
movswl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x4ba0
movq %rax, %rdi
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
callq 0x12110
movq %rax, %rcx
movl 0x4(%rsp), %eax
movswl (%rcx), %ecx
cmpl %ecx, %eax
je 0xf05d
movb $0x0, 0x47(%rsp)
jmp 0xf071
jmp 0xf05f
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xeff9
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/transform/approximate.h
// Function: meta_approximate(Image&, std::vector<int, std::allocator<int>>&)
void meta_approximate(Image &image, std::vector<int> &parameters) {
    if (parameters.size() < 3) {
        e_printf("Incorrect number of parameters for Approximation transform.\n");
        image.error = true;
        return;
    }
    int nb = parameters[1] - parameters[0] + 1;
    if (nb < 1 || parameters[0] < 0 || parameters[1] >= image.channel.size()) {
        e_printf("Incorrect parameters for Approximation transform.\n");
        image.error = true;
        return;
    }
    for (int c = parameters[0]; c <= parameters[1]; c++) {
        int q = (c+2-parameters[0] < parameters.size() ? parameters[c+2-parameters[0]] : parameters.back());
        if (q) image.channel.push_back(image.channel[c]);
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x4d50
cmpq $0x3, %rax
jae 0x1189d
leaq 0x35878(%rip), %rdi     # 0x470fd
movb $0x0, %al
callq 0x3a670
movq 0x50(%rsp), %rax
movb $0x1, 0xa8(%rax)
jmp 0x11a47
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x12190
movl (%rax), %eax
movl %eax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
movq %rax, %rcx
movl 0x38(%rsp), %eax
subl (%rcx), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
cmpl $0x1, 0x44(%rsp)
jl 0x11918
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
cmpl $0x0, (%rax)
jl 0x11918
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x12190
movslq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
callq 0x4b80
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jb 0x11937
leaq 0x3581b(%rip), %rdi     # 0x4713a
movb $0x0, %al
callq 0x3a670
movq 0x50(%rsp), %rax
movb $0x1, 0xa8(%rax)
jmp 0x11a47
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
movl (%rax), %eax
movl %eax, 0x40(%rsp)
movl 0x40(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq 0x12190
movq %rax, %rcx
movl 0x2c(%rsp), %eax
cmpl (%rcx), %eax
jg 0x11a47
movl 0x40(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x1c(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
movq %rax, %rcx
movl 0x1c(%rsp), %eax
subl (%rcx), %eax
cltq
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
callq 0x4d50
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x119f2
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x40(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x14(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12190
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl 0x14(%rsp), %eax
subl (%rcx), %eax
movslq %eax, %rsi
callq 0x12190
movl (%rax), %eax
movl %eax, 0x18(%rsp)
jmp 0x11a02
movq 0x48(%rsp), %rdi
callq 0x12b00
movl (%rax), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x11a35
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
movslq 0x40(%rsp), %rsi
callq 0x4ba0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x12660
jmp 0x11a37
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x1194b
addq $0x58, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/transform/transform.cpp
// Function: Transform::meta_apply(Image&)
void Transform::meta_apply(Image &input) {
    switch(ID) {
        case TRANSFORM_YCbCr: return;
        case TRANSFORM_YCoCg: return;
//        case TRANSFORM_XYB: return;
        case TRANSFORM_ChromaSubsample: meta_subsample(input, parameters); return;
        case TRANSFORM_DCT: meta_DCT(input, parameters); return;
        case TRANSFORM_QUANTIZE: return;
        case TRANSFORM_SQUEEZE: meta_squeeze(input, parameters); return;
        case TRANSFORM_PALETTE: meta_palette(input, parameters); return;
        case TRANSFORM_2DMATCH: meta_match(input, parameters); return;
        case TRANSFORM_PERMUTE: meta_permute(input, parameters); return;
        case TRANSFORM_APPROXIMATE: meta_approximate(input, parameters); return;
        default: e_printf("Unknown transformation (ID=%i)\n",ID); return;
    }
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movl (%rax), %eax
movq %rax, 0x30(%rsp)
subq $0xa, %rax
ja 0x120df
movq 0x30(%rsp), %rax
leaq 0x3428e(%rip), %rcx     # 0x4622c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x120f4
jmp 0x120f4
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
addq $0x8, %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x4c50
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x7c10
jmp 0x11fe4
leaq 0x60(%rsp), %rdi
callq 0x54f0
jmp 0x120f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x54f0
jmp 0x120fc
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x8, %rsi
callq 0x8540
jmp 0x120f4
jmp 0x120f4
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x8, %rsi
callq 0xd5e0
jmp 0x120f4
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4c50
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xa940
jmp 0x12078
leaq 0x38(%rsp), %rdi
callq 0x54f0
jmp 0x120f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x54f0
jmp 0x120fc
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x8, %rsi
callq 0xecc0
jmp 0x120f4
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x10a30
jmp 0x120f4
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rdi
addq $0x8, %rsi
callq 0x11860
jmp 0x120f4
movq 0x28(%rsp), %rax
movl (%rax), %esi
leaq 0x35111(%rip), %rdi     # 0x471fe
movb $0x0, %al
callq 0x3a670
addq $0x88, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x36a0
nopw %cs:(%rax,%rax)
// File: cloudinary[P]fuif/transform/squeeze.h
// Function: smooth_tendency(short, short, short)
inline pixel_type smooth_tendency(pixel_type B, pixel_type a, pixel_type n) {
    pixel_type diff = 0;
    if (B >= a && a >= n) {
        diff = (4*B - 3*n - a + 6)/12;
//      2C = a<<1 + diff - diff&1 <= 2B  so diff - diff&1 <= 2B - 2a
//      2D = a<<1 - diff - diff&1 >= 2n  so diff + diff&1 <= 2a - 2n
        if (diff-(diff&1) > 2*(B-a)) diff = 2*(B-a)+1;
        if (diff+(diff&1) > 2*(a-n)) diff = 2*(a-n);
    } else if (B <= a && a <= n) {
        diff = (4*B - 3*n - a - 6)/12;
//      2C = a<<1 + diff + diff&1 >= 2B  so diff + diff&1 >= 2B - 2a
//      2D = a<<1 - diff + diff&1 <= 2n  so diff - diff&1 >= 2a - 2n
        if (diff+(diff&1) < 2*(B-a)) diff = 2*(B-a)-1;
        if (diff-(diff&1) < 2*(a-n)) diff = 2*(a-n);
    }
    return diff;
}

// Assembly:
movw %dx, %ax
movw %si, %cx
movw %di, %dx
movw %dx, -0x2(%rsp)
movw %cx, -0x4(%rsp)
movw %ax, -0x6(%rsp)
movw $0x0, -0x8(%rsp)
movswl -0x2(%rsp), %eax
movswl -0x4(%rsp), %ecx
cmpl %ecx, %eax
jl 0x132cc
movswl -0x4(%rsp), %eax
movswl -0x6(%rsp), %ecx
cmpl %ecx, %eax
jl 0x132cc
movswl -0x2(%rsp), %eax
shll $0x2, %eax
movswl -0x6(%rsp), %ecx
imull $0x3, %ecx, %ecx
subl %ecx, %eax
movswl -0x4(%rsp), %ecx
subl %ecx, %eax
addl $0x6, %eax
movl $0xc, %ecx
cltd
idivl %ecx
movw %ax, -0x8(%rsp)
movswl -0x8(%rsp), %eax
movswl -0x8(%rsp), %ecx
andl $0x1, %ecx
subl %ecx, %eax
movswl -0x2(%rsp), %ecx
movswl -0x4(%rsp), %edx
subl %edx, %ecx
shll %ecx
cmpl %ecx, %eax
jle 0x13293
movswl -0x2(%rsp), %eax
movswl -0x4(%rsp), %ecx
subl %ecx, %eax
shll %eax
addl $0x1, %eax
movw %ax, -0x8(%rsp)
movswl -0x8(%rsp), %eax
movswl -0x8(%rsp), %ecx
andl $0x1, %ecx
addl %ecx, %eax
movswl -0x4(%rsp), %ecx
movswl -0x6(%rsp), %edx
subl %edx, %ecx
shll %ecx
cmpl %ecx, %eax
jle 0x132c7
movswl -0x4(%rsp), %eax
movswl -0x6(%rsp), %ecx
subl %ecx, %eax
shll %eax
movw %ax, -0x8(%rsp)
jmp 0x13388
movswl -0x2(%rsp), %eax
movswl -0x4(%rsp), %ecx
cmpl %ecx, %eax
jg 0x13386
movswl -0x4(%rsp), %eax
movswl -0x6(%rsp), %ecx
cmpl %ecx, %eax
jg 0x13386
movswl -0x2(%rsp), %eax
shll $0x2, %eax
movswl -0x6(%rsp), %ecx
imull $0x3, %ecx, %ecx
subl %ecx, %eax
movswl -0x4(%rsp), %ecx
subl %ecx, %eax
subl $0x6, %eax
movl $0xc, %ecx
cltd
idivl %ecx
movw %ax, -0x8(%rsp)
movswl -0x8(%rsp), %eax
movswl -0x8(%rsp), %ecx
andl $0x1, %ecx
addl %ecx, %eax
movswl -0x2(%rsp), %ecx
movswl -0x4(%rsp), %edx
subl %edx, %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x13350
movswl -0x2(%rsp), %eax
movswl -0x4(%rsp), %ecx
subl %ecx, %eax
shll %eax
subl $0x1, %eax
movw %ax, -0x8(%rsp)
movswl -0x8(%rsp), %eax
movswl -0x8(%rsp), %ecx
andl $0x1, %ecx
subl %ecx, %eax
movswl -0x4(%rsp), %ecx
movswl -0x6(%rsp), %edx
subl %edx, %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x13384
movswl -0x4(%rsp), %eax
movswl -0x6(%rsp), %ecx
subl %ecx, %eax
shll %eax
movw %ax, -0x8(%rsp)
jmp 0x13386
jmp 0x13388
movw -0x8(%rsp), %ax
retq
nop
// File: cloudinary[P]fuif/maniac/chance.cpp
// Function: log4kf(int, unsigned int)
static uint32_t log4kf(int x, uint32_t base) {
    int bits = 8 * sizeof(int) - __builtin_clz(x);
    uint64_t y = ((uint64_t)x) << (32 - bits);
    uint32_t res = base * (13 - bits);
    uint32_t add = base;
    while ((add > 1) && ((y & 0x7FFFFFFF) != 0)) {
        y = (((uint64_t)y) * y + 0x40000000) >> 31;
        add >>= 1;
        if ((y >> 32) != 0) {
            res -= add;
            y >>= 1;
        }
    }
    return res;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movl -0x4(%rsp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
movslq %eax, %rcx
movl $0x20, %eax
subq %rcx, %rax
movl %eax, -0xc(%rsp)
movslq -0x4(%rsp), %rax
movl $0x20, %ecx
subl -0xc(%rsp), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x18(%rsp)
movl -0x8(%rsp), %eax
movl $0xd, %ecx
subl -0xc(%rsp), %ecx
imull %ecx, %eax
movl %eax, -0x1c(%rsp)
movl -0x8(%rsp), %eax
movl %eax, -0x20(%rsp)
xorl %eax, %eax
cmpl $0x1, -0x20(%rsp)
movb %al, -0x21(%rsp)
jbe 0x1cf18
movq -0x18(%rsp), %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
cmpq $0x0, %rax
setne %al
movb %al, -0x21(%rsp)
movb -0x21(%rsp), %al
testb $0x1, %al
jne 0x1cf22
jmp 0x1cf72
movq -0x18(%rsp), %rax
imulq -0x18(%rsp), %rax
addq $0x40000000, %rax       # imm = 0x40000000
shrq $0x1f, %rax
movq %rax, -0x18(%rsp)
movl -0x20(%rsp), %eax
shrl %eax
movl %eax, -0x20(%rsp)
movq -0x18(%rsp), %rax
shrq $0x20, %rax
cmpq $0x0, %rax
je 0x1cf70
movl -0x20(%rsp), %ecx
movl -0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movq -0x18(%rsp), %rax
shrq %rax
movq %rax, -0x18(%rsp)
jmp 0x1cef5
movl -0x1c(%rsp), %eax
retq
nopw (%rax,%rax)
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: check_bit_depth(short, short, int)
bool check_bit_depth(pixel_type minv, pixel_type maxv, int predictor) {
    pixel_type maxav = abs(maxv);
    if (-minv > maxav) maxav = -minv;
    if (predictor>0 && maxv-minv > maxav) maxav = maxv-minv;
    if (predictor>0 && abs(minv-maxv) > maxav) maxav = abs(minv-maxv);
    if (maniac::util::ilog2(maxav)+1 > MAX_BIT_DEPTH) {
        e_printf("Erorr: this FUIF is compiled for a maximum bit depth of %i, while %i bits are needed to encode this channel (range=%i..%i, predictor=%i)\n",
                MAX_BIT_DEPTH, maniac::util::ilog2(maxav)+1, minv, maxv, predictor);
        return false;
    }
    return true;
}

// Assembly:
subq $0x18, %rsp
movw %si, %ax
movw %di, %cx
movw %cx, 0x14(%rsp)
movw %ax, 0x12(%rsp)
movl %edx, 0xc(%rsp)
movswl 0x12(%rsp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movw %ax, 0xa(%rsp)
movswl 0x14(%rsp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movswl 0xa(%rsp), %ecx
cmpl %ecx, %eax
jle 0x1eb09
movswl 0x14(%rsp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movw %ax, 0xa(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x1eb36
movswl 0x12(%rsp), %eax
movswl 0x14(%rsp), %ecx
subl %ecx, %eax
movswl 0xa(%rsp), %ecx
cmpl %ecx, %eax
jle 0x1eb36
movswl 0x12(%rsp), %eax
movswl 0x14(%rsp), %ecx
subl %ecx, %eax
movw %ax, 0xa(%rsp)
cmpl $0x0, 0xc(%rsp)
jle 0x1eb71
movswl 0x14(%rsp), %eax
movswl 0x12(%rsp), %ecx
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movswl 0xa(%rsp), %ecx
cmpl %ecx, %eax
jle 0x1eb71
movswl 0x14(%rsp), %eax
movswl 0x12(%rsp), %ecx
subl %ecx, %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
movw %ax, 0xa(%rsp)
movswl 0xa(%rsp), %edi
callq 0x1ebd0
addl $0x1, %eax
cmpl $0xf, %eax
jle 0x1ebbc
movswl 0xa(%rsp), %edi
callq 0x1ebd0
movl %eax, %edx
addl $0x1, %edx
movswl 0x14(%rsp), %ecx
movswl 0x12(%rsp), %r8d
movl 0xc(%rsp), %r9d
leaq 0x287bb(%rip), %rdi     # 0x47364
movl $0xf, %esi
movb $0x0, %al
callq 0x3a670
movb $0x0, 0x17(%rsp)
jmp 0x1ebc1
movb $0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: fuif_encode_file(char const*, Image const&, fuif_options&)
bool fuif_encode_file(const char * filename, const Image &image, fuif_options &options) {
    FILE *file = NULL;
    if (!strcmp(filename,"-")) file = stdout;
    else file = fopen(filename,"wb");
    if (!file) return false;
    FileIO fio(file, (file == stdout? "to standard output" : filename));
    bool result = fuif_encode(fio, image, options);
    return result;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x286fd(%rip), %rsi     # 0x47955
callq 0x34e0
cmpl $0x0, %eax
jne 0x1f273
movq 0x3ad3f(%rip), %rax     # 0x59fa8
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x1f289
movq 0x68(%rsp), %rdi
leaq 0x286d8(%rip), %rsi     # 0x47957
callq 0x3460
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x1f29b
movb $0x0, 0x77(%rsp)
jmp 0x1f339
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq 0x3acf7(%rip), %rcx     # 0x59fa8
cmpq (%rcx), %rax
jne 0x1f2c4
leaq 0x2869d(%rip), %rax     # 0x4795a
movq %rax, 0x10(%rsp)
jmp 0x1f2ce
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x38(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x29ac0
movq (%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x1f830
movb %al, 0xf(%rsp)
jmp 0x1f2ff
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
movb %al, 0x77(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x29af0
jmp 0x1f339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x29af0
jmp 0x1f344
movb 0x77(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x36a0
nop
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: fuif_prepare_encode(Image&, fuif_options&)
void fuif_prepare_encode(Image &image, fuif_options &options) {
    // ensure that the ranges are correct and tight
    image.recompute_minmax();
    // inspect the cumulative channel hshift/vshift to find the right spots to put the truncation offsets
    image.recompute_downscales();
    if (options.debug) {options.heatmap.channel = image.channel; options.heatmap.w = image.w; options.heatmap.h = image.h;}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22e20
movq 0x10(%rsp), %rdi
callq 0x48b0
movq 0x8(%rsp), %rax
testb $0x1, 0x24(%rax)
je 0x1f3b0
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
callq 0x29b30
movq 0x10(%rsp), %rax
movl 0x30(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x70(%rax)
movq 0x10(%rsp), %rax
movl 0x34(%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x74(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: fuif_decode_file(char const*, Image&, fuif_options)
bool fuif_decode_file(const char * filename, Image &image, fuif_options options) {
    FILE *file = NULL;
    if (!strcmp(filename,"-")) file = stdin;
    else file = fopen(filename,"rb");
    if(!file) return false;
    FileIO fio(file, (file==stdin ? "from standard input" : filename));
    bool result = fuif_decode(fio, image, options);
    return result;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdx, 0x28(%rsp)
movq %rdi, 0x168(%rsp)
movq %rsi, 0x160(%rsp)
movq %rdx, 0x158(%rsp)
movq $0x0, 0x150(%rsp)
movq 0x168(%rsp), %rdi
leaq 0x28556(%rip), %rsi     # 0x47955
callq 0x34e0
cmpl $0x0, %eax
jne 0x1f41d
movq 0x3abc0(%rip), %rax     # 0x59fd0
movq (%rax), %rax
movq %rax, 0x150(%rsp)
jmp 0x1f439
movq 0x168(%rsp), %rdi
leaq 0x28541(%rip), %rsi     # 0x4796d
callq 0x3460
movq %rax, 0x150(%rsp)
cmpq $0x0, 0x150(%rsp)
jne 0x1f451
movb $0x0, 0x177(%rsp)
jmp 0x1f54c
movq 0x150(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x150(%rsp), %rax
movq 0x3ab63(%rip), %rcx     # 0x59fd0
cmpq (%rcx), %rax
jne 0x1f480
leaq 0x284f7(%rip), %rax     # 0x47970
movq %rax, 0x18(%rsp)
jmp 0x1f48d
movq 0x168(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x138(%rsp), %rdi
callq 0x29ac0
movq 0x28(%rsp), %rsi
movq 0x160(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x29df0
jmp 0x1f4c2
movq 0x10(%rsp), %rsi
leaq 0x138(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x243a0
movb %al, 0xf(%rsp)
jmp 0x1f4df
leaq 0x40(%rsp), %rdi
callq 0x1f610
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x137(%rsp)
movb 0x137(%rsp), %al
andb $0x1, %al
movb %al, 0x177(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x29af0
jmp 0x1f54c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x1f53d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1f610
leaq 0x138(%rsp), %rdi
callq 0x29af0
jmp 0x1f55d
movb 0x177(%rsp), %al
andb $0x1, %al
addq $0x178, %rsp            # imm = 0x178
retq
movq 0x38(%rsp), %rdi
callq 0x36a0
nopw (%rax,%rax)
// File: cloudinary[P]fuif/encoding/context_predict.h
// Function: slog(short)
inline pixel_type slog(pixel_type x) {
//    pixel_type a = foolog(abs(x));
//    if (x >= 0) return a; else return -a;
//    printf("value %i, foolog %i\n",x,foolog(abs(x)));
    if (x == 0) return 0;
    else if (x > 0) return (sizeof(unsigned int) * 8 - __builtin_clz(x));
    else return -(sizeof(unsigned int) * 8 - __builtin_clz(-x));
}

// Assembly:
movw %di, %ax
movw %ax, -0x4(%rsp)
movswl -0x4(%rsp), %eax
cmpl $0x0, %eax
jne 0x1f6bb
movw $0x0, -0x2(%rsp)
jmp 0x1f705
movswl -0x4(%rsp), %eax
cmpl $0x0, %eax
jle 0x1f6e2
movswl -0x4(%rsp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
movslq %eax, %rcx
movl $0x20, %eax
subq %rcx, %rax
movw %ax, -0x2(%rsp)
jmp 0x1f705
movswl -0x4(%rsp), %ecx
xorl %eax, %eax
subl %ecx, %eax
bsrl %eax, %eax
xorl $0x1f, %eax
cltq
movl $0x20, %ecx
subq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movw %ax, -0x2(%rsp)
movw -0x2(%rsp), %ax
retq
nopl (%rax,%rax)
// File: cloudinary[P]fuif/encoding/../util.h
// Function: short median3<short>(short, short, short)
I inline median3(I a, I b, I c) {
    if (a < b) {
        if (b < c) {
          return b;
        } else {
          return a < c ? c : a;
        }
    } else {
       if (a < c) {
          return a;
       } else {
          return b < c ? c : b;
       }
    }
}

// Assembly:
movw %dx, %ax
movw %si, %cx
movw %di, %dx
movw %dx, -0x4(%rsp)
movw %cx, -0x6(%rsp)
movw %ax, -0x8(%rsp)
movswl -0x4(%rsp), %eax
movswl -0x6(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1f7e0
movswl -0x6(%rsp), %eax
movswl -0x8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1f7b0
movw -0x6(%rsp), %ax
movw %ax, -0x2(%rsp)
jmp 0x1f828
movswl -0x4(%rsp), %eax
movswl -0x8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1f7ca
movw -0x8(%rsp), %ax
movw %ax, -0xa(%rsp)
jmp 0x1f7d4
movw -0x4(%rsp), %ax
movw %ax, -0xa(%rsp)
movw -0xa(%rsp), %ax
movw %ax, -0x2(%rsp)
jmp 0x1f828
movswl -0x4(%rsp), %eax
movswl -0x8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1f7fa
movw -0x4(%rsp), %ax
movw %ax, -0x2(%rsp)
jmp 0x1f828
movswl -0x6(%rsp), %eax
movswl -0x8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1f814
movw -0x8(%rsp), %ax
movw %ax, -0xc(%rsp)
jmp 0x1f81e
movw -0x6(%rsp), %ax
movw %ax, -0xc(%rsp)
movw -0xc(%rsp), %ax
movw %ax, -0x2(%rsp)
movw -0x2(%rsp), %ax
retq
nop
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: void write_big_endian_varint<FileIO>(FileIO&, unsigned long, bool)
void write_big_endian_varint(IO& io, size_t number, bool done = true) {
    if (number < 128) {
        if (done) io.fputc(number);
        else io.fputc(number + 128);
    } else {
        size_t lsb = (number & 127);
        number >>= 7;
        write_big_endian_varint(io, number, false);
        write_big_endian_varint(io, lsb, done);
    }
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
cmpq $0x80, 0x18(%rsp)
jae 0x20bd4
testb $0x1, 0x17(%rsp)
je 0x20bbb
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movl %eax, %esi
callq 0x22f10
jmp 0x20bd2
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
addq $0x80, %rax
movl %eax, %esi
callq 0x22f10
jmp 0x20c19
movq 0x18(%rsp), %rax
andq $0x7f, %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
shrq $0x7, %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x20b80
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movb 0x17(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x20b80
addq $0x28, %rsp
retq
nop
// File: cloudinary[P]fuif/encoding/../image/../transform/transform.h
// Function: Transform::has_parameters() const
bool has_parameters() const {
        switch(ID) {
            case TRANSFORM_ChromaSubsample:
            case TRANSFORM_PALETTE: // stores palette itself as meta-channel, but parameter says which channel(s)
            case TRANSFORM_SQUEEZE:
            case TRANSFORM_DCT:
            case TRANSFORM_2DMATCH:
            case TRANSFORM_PERMUTE:  // stores permutation as meta-channel, or in parameters
            case TRANSFORM_APPROXIMATE:
                return true;
            case TRANSFORM_YCbCr: //
            case TRANSFORM_YCoCg: // color transforms always work on channels 0-2
            case TRANSFORM_ICtCp: //
            case TRANSFORM_XYB:   //
            default:
                return false;
        }
    }

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rsp)
subl $0x3, %eax
jb 0x20d65
jmp 0x20d37
movl -0x14(%rsp), %eax
addl $-0x3, %eax
subl $0x2, %eax
jb 0x20d5e
jmp 0x20d45
movl -0x14(%rsp), %eax
addl $-0x6, %eax
subl $0x5, %eax
jb 0x20d5e
jmp 0x20d53
movl -0x14(%rsp), %eax
subl $0xb, %eax
je 0x20d65
jmp 0x20d67
movb $0x1, -0x1(%rsp)
jmp 0x20d6c
jmp 0x20d67
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../fileio.h
// Function: BlobIO::fseek(long, int)
void fseek(long offset, int where) {
        switch(where) {
        case SEEK_SET:
            seek_pos = offset;
            break;
        case SEEK_CUR:
            seek_pos += offset;
            break;
        case SEEK_END:
            seek_pos = long(bytes_used) + offset;
            break;
        }
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x14(%rsp), %eax
movl %eax, -0x18(%rsp)
testl %eax, %eax
je 0x22dcc
jmp 0x22db6
movl -0x18(%rsp), %eax
subl $0x1, %eax
je 0x22ddc
jmp 0x22dc1
movl -0x18(%rsp), %eax
subl $0x2, %eax
je 0x22df0
jmp 0x22e02
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x22e02
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x22e02
movq -0x20(%rsp), %rax
movq 0x10(%rax), %rcx
addq -0x10(%rsp), %rcx
movq %rcx, 0x18(%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../fileio.h
// Function: BlobIO::fputs(char const*)
int fputs(const char *s) {
        size_t i = 0;
        // null-terminated string
        while(s[i])
        {
            grow(seek_pos + 1);
            data[seek_pos++] = s[i++];
            if(bytes_used < seek_pos)
                bytes_used = seek_pos+1;
        }
        return 0;
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x24325
movq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rsi
addq $0x1, %rsi
callq 0x2a790
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, 0x10(%rsp)
movb (%rax,%rdx), %sil
movq (%rcx), %rax
movq 0x18(%rcx), %rdx
movq %rdx, %rdi
addq $0x1, %rdi
movq %rdi, 0x18(%rcx)
movb %sil, (%rax,%rdx)
movq 0x10(%rcx), %rax
cmpq 0x18(%rcx), %rax
jae 0x24323
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x242b1
xorl %eax, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../fileio.h
// Function: BlobIO::fputc(int)
int fputc(int c) {
        grow(seek_pos + 1);

        data[seek_pos++] = static_cast<uint8_t>(c);
        if(bytes_used < seek_pos)
            bytes_used = seek_pos+1;
        return c;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rdi), %rsi
addq $0x1, %rsi
callq 0x2a790
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
movb %al, %sil
movq (%rcx), %rax
movq 0x18(%rcx), %rdx
movq %rdx, %rdi
addq $0x1, %rdi
movq %rdi, 0x18(%rcx)
movb %sil, (%rax,%rdx)
movq 0x10(%rcx), %rax
cmpq 0x18(%rcx), %rax
jae 0x2438e
movq (%rsp), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: cloudinary[P]fuif/encoding/encoding.cpp
// Function: int read_big_endian_varint<FileIO>(FileIO&)
int read_big_endian_varint(IO& io) {
    int result = 0;
    int bytes_read = 0;
    while (bytes_read++ < 10) {
      int number = io.get_c();
      if (number < 0) break;
      if (number < 128) return result+number;
      number -= 128;
      result += number;
      result <<= 7;
    }
    if (!io.isEOF()) e_printf("Invalid number encountered!\n");
    return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rsp)
cmpl $0xa, %eax
jge 0x253e0
movq 0x18(%rsp), %rdi
callq 0x35e30
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x253a2
jmp 0x253e0
cmpl $0x80, 0xc(%rsp)
jge 0x253ba
movl 0x14(%rsp), %eax
addl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x25404
movl 0xc(%rsp), %eax
subl $0x80, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
shll $0x7, %eax
movl %eax, 0x14(%rsp)
jmp 0x25379
movq 0x18(%rsp), %rdi
callq 0x25a20
testb $0x1, %al
jne 0x253fc
leaq 0x22737(%rip), %rdi     # 0x47b2c
movb $0x0, %al
callq 0x3a670
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../fileio.h
// Function: BlobReader::gets(char*, int)
char * gets(char *buf, int n) {
        int i = 0;
        const int max_write = n-1;
        while(seek_pos < data_array_size && i < max_write)
            buf[i++] = data[seek_pos++];
        buf[n-1] = '\0';

        if(i < max_write)
            return 0;
        else
            return buf;
    }

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movl %edx, -0x1c(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x20(%rsp)
movl -0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x24(%rsp)
movq -0x30(%rsp), %rdx
movq 0x10(%rdx), %rcx
xorl %eax, %eax
cmpq 0x8(%rdx), %rcx
movb %al, -0x31(%rsp)
jae 0x281cf
movl -0x20(%rsp), %eax
cmpl -0x24(%rsp), %eax
setl %al
movb %al, -0x31(%rsp)
movb -0x31(%rsp), %al
testb $0x1, %al
jne 0x281d9
jmp 0x2820d
movq -0x30(%rsp), %rdx
movq (%rdx), %rax
movq 0x10(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x10(%rdx)
movb (%rax,%rcx), %dl
movq -0x18(%rsp), %rax
movl -0x20(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rsp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x281ab
movq -0x18(%rsp), %rax
movl -0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl -0x20(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x28235
movq $0x0, -0x8(%rsp)
jmp 0x2823f
movq -0x18(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
nop
// File: cloudinary[P]fuif/encoding/../fileio.h
// Function: BlobIO::grow(unsigned long)
void grow(size_t necessary_size) {
        if(necessary_size < data_array_size)
            return;

        size_t new_size = necessary_size;
        // start with reasonably large array
        if(new_size < 4096)
            new_size = 4096;

        if(new_size < data_array_size * 3 / 2)
            new_size = data_array_size * 3 / 2;
        uint8_t* new_data = new uint8_t[new_size];

        memcpy(new_data, data, bytes_used);
        // if seek_pos has been moved beyond the written bytes,
        // fill the empty space with zeroes
        for(size_t i = bytes_used; i < seek_pos; ++i)
            new_data[i] = 0;
        delete [] data;
        data = new_data;
        std::swap(data_array_size, new_size);
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x8(%rcx), %rax
jae 0x2a7b8
jmp 0x2a899
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x1000, 0x20(%rsp)     # imm = 0x1000
jae 0x2a7d6
movq $0x1000, 0x20(%rsp)     # imm = 0x1000
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
imulq $0x3, 0x8(%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jae 0x2a7ff
movq 0x8(%rsp), %rax
imulq $0x3, 0x8(%rax), %rax
shrq %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x3040
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq (%rax), %rsi
movq 0x10(%rax), %rdx
callq 0x3300
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x2a863
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x2a835
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x2a87e
movq (%rsp), %rdi
callq 0x34b0
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2a8a0
addq $0x38, %rsp
retq
nop
// File: cloudinary[P]fuif/encoding/../maniac/symbol_enc.h
// Function: UniformSymbolCoder<RacOutput24<BlobIO>>::write_int(int, int, int)
void UniformSymbolCoder<RAC>::write_int(int min, int max, int val) {
        assert(max >= min);
        if (min != 0) {
            max -= min;
            val -= min;
        }
        if (max == 0) return;

        // split in [0..med] [med+1..max]
        int med = max/2;
        if (val > med) {
            rac.write_bit(true);
            write_int(med+1, max, val);
        } else {
            rac.write_bit(false);
            write_int(0, med, val);
        }
        return;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x1c(%rsp)
je 0x2bbf2
movl 0x1c(%rsp), %ecx
movl 0x18(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %ecx
movl 0x14(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x2bbfb
jmp 0x2bc67
movl 0x18(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x10(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jle 0x2bc42
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x2bd70
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %esi
addl $0x1, %esi
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %ecx
callq 0x2bbb0
jmp 0x2bc65
movq 0x8(%rsp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2bd70
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %ecx
xorl %esi, %esi
callq 0x2bbb0
jmp 0x2bc67
addq $0x28, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../maniac/rac_enc.h
// Function: RacOutput<RacConfig24, BlobIO>::flush()
void inline flush() {
        low += (Config::MIN_RANGE - 1);
        // is this the correct way to reliably flush?
          range = Config::MIN_RANGE - 1;
          output();
          range = Config::MIN_RANGE - 1;
          output();
          range = Config::MIN_RANGE - 1;
          output();
          range = Config::MIN_RANGE - 1;
          output();
        io.flush();
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x10(%rdi), %rax
addq $0xffff, %rax           # imm = 0xFFFF
movq %rax, 0x10(%rdi)
movq $0xffff, 0x8(%rdi)      # imm = 0xFFFF
callq 0x2be20
movq 0x8(%rsp), %rdi
movq $0xffff, 0x8(%rdi)      # imm = 0xFFFF
callq 0x2be20
movq 0x8(%rsp), %rdi
movq $0xffff, 0x8(%rdi)      # imm = 0xFFFF
callq 0x2be20
movq 0x8(%rsp), %rdi
movq $0xffff, 0x8(%rdi)      # imm = 0xFFFF
callq 0x2be20
callq 0x2bce0
addq $0x18, %rsp
retq
nop
// File: cloudinary[P]fuif/encoding/../maniac/rac_enc.h
// Function: RacOutput<RacConfig24, BlobIO>::put(unsigned long, bool)
void inline put(rac_t chance, bool bit) {
        assert(chance >= 0);
        assert(chance < range);
        if (bit) {
            low += range - chance;
            range = chance;
        } else {
            range -= chance;
        }
        output();
    }

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
testb $0x1, 0x17(%rsp)
je 0x2bdf8
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
subq 0x18(%rsp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x2be0d
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rdx
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rdi
callq 0x2be20
addq $0x28, %rsp
retq
nopl (%rax)
// File: cloudinary[P]fuif/encoding/../maniac/rac_enc.h
// Function: RacOutput<RacConfig24, BlobIO>::output()
void inline output() {
        while (range <= Config::MIN_RANGE) {
            int byte = low >> Config::MIN_RANGE_BITS;
            if (delayed_byte < 0) { // first generated byte
                delayed_byte = byte;
            } else if (((low + range) >> 8) < Config::MIN_RANGE) { // definitely no overflow
                io.fputc(delayed_byte);
                while (delayed_count) {
                    io.fputc(0xFF);
                    delayed_count--;
                }
                delayed_byte = byte;
            } else if ((low >> 8) >= Config::MIN_RANGE) { // definitely overflow
                io.fputc(delayed_byte + 1);
                while (delayed_count) {
                    io.fputc(0);
                    delayed_count--;
                }
                delayed_byte = byte & 0xFF;
            } else {
                delayed_count++;
            }
            low = (low & (Config::MIN_RANGE - 1)) << 8;
            range <<= 8;
        }
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq $0x10000, 0x8(%rax)     # imm = 0x10000
ja 0x2bf61
movq (%rsp), %rax
movq 0x10(%rax), %rcx
shrq $0x10, %rcx
movl %ecx, 0xc(%rsp)
cmpl $0x0, 0x18(%rax)
jge 0x2be6a
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x2bf39
movq (%rsp), %rcx
movq 0x10(%rcx), %rax
addq 0x8(%rcx), %rax
shrq $0x8, %rax
cmpq $0x10000, %rax          # imm = 0x10000
jae 0x2bec8
movq (%rsp), %rax
movq (%rax), %rdi
movl 0x18(%rax), %esi
callq 0x24330
movq (%rsp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x2bebb
movq (%rsp), %rax
movq (%rax), %rdi
movl $0xff, %esi
callq 0x24330
movq (%rsp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
jmp 0x2be91
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, 0x18(%rax)
jmp 0x2bf37
movq (%rsp), %rax
movq 0x10(%rax), %rax
shrq $0x8, %rax
cmpq $0x10000, %rax          # imm = 0x10000
jb 0x2bf28
movq (%rsp), %rax
movq (%rax), %rdi
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x24330
movq (%rsp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x2bf15
movq (%rsp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x24330
movq (%rsp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
jmp 0x2beee
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
andl $0xff, %ecx
movl %ecx, 0x18(%rax)
jmp 0x2bf35
movq (%rsp), %rax
movl 0x1c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1c(%rax)
jmp 0x2bf37
jmp 0x2bf39
movq (%rsp), %rax
movq 0x10(%rax), %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
shlq $0x8, %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rax), %rcx
shlq $0x8, %rcx
movq %rcx, 0x8(%rax)
jmp 0x2be32
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: PropertySymbolCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::PropertySymbolCoder(RacDummy<DummyIO>&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&, Tree&, int, int, int, int)
PropertySymbolCoder(RAC& racIn, Ranges &rangeIn, Tree &treeIn, int zero_chance=ZERO_CHANCE, int st=CONTEXT_TREE_SPLIT_THRESHOLD, int cut = 2, int alpha = 0xFFFFFFFF / 19) :
        rac(racIn),
        coder(racIn, cut, alpha),
        range(rangeIn),
        nb_properties(range.size()),
        leaf_node(1,CompoundSymbolChances<BitChance,bits>(nb_properties,zero_chance)),
        inner_node(treeIn),
        selection(nb_properties,false),
        split_threshold(st) {

/*        leaf_node[0].realChances.bitZero().set_12bit(zero_chance);
        for(unsigned int i=0; i<nb_properties; i++) {
            leaf_node[0].virtChances[i].first.bitZero().set_12bit(zero_chance);
            leaf_node[0].virtChances[i].second.bitZero().set_12bit(zero_chance);
        }
*/
    }

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movl 0x118(%rsp), %eax
movl 0x110(%rsp), %eax
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rcx, 0xe8(%rsp)
movl %r8d, 0xe4(%rsp)
movl %r9d, 0xe0(%rsp)
movq 0x100(%rsp), %rdi
movq %rdi, 0x28(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq 0xf8(%rsp), %rsi
movl 0x110(%rsp), %edx
movl 0x118(%rsp), %ecx
callq 0x2c460
movq 0x28(%rsp), %rdi
addq $0x4018, %rdi           # imm = 0x4018
movq %rdi, 0x20(%rsp)
movq 0xf0(%rsp), %rsi
callq 0x2c4a0
movq 0x20(%rsp), %rdi
callq 0x13400
movq %rax, %rcx
movq 0x28(%rsp), %rax
movl %ecx, 0x4030(%rax)
movq %rax, %rcx
addq $0x4038, %rcx           # imm = 0x4038
movq %rcx, 0x30(%rsp)
movl 0x4030(%rax), %esi
movzwl 0xe4(%rsp), %edx
leaq 0x48(%rsp), %rdi
callq 0x2c5a0
jmp 0x2c10b
leaq 0x3b(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2c7b0
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rcx
movl $0x1, %esi
leaq 0x48(%rsp), %rdx
callq 0x2c7c0
jmp 0x2c135
leaq 0x3b(%rsp), %rdi
callq 0x2c840
leaq 0x48(%rsp), %rdi
callq 0x2c850
movq 0x28(%rsp), %rax
movq 0xe8(%rsp), %rcx
movq %rcx, 0x4050(%rax)
movq %rax, %rcx
addq $0x4058, %rcx           # imm = 0x4058
movq %rcx, (%rsp)
movl 0x4030(%rax), %eax
movq %rax, 0x8(%rsp)
movb $0x0, 0x3a(%rsp)
leaq 0x39(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2c890
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
leaq 0x3a(%rsp), %rdx
callq 0x2c8a0
jmp 0x2c1a4
leaq 0x39(%rsp), %rdi
callq 0x2c920
movq 0x28(%rsp), %rax
movl 0xe0(%rsp), %ecx
movl %ecx, 0x4080(%rax)
addq $0x108, %rsp            # imm = 0x108
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0x2c21e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x3b(%rsp), %rdi
callq 0x2c840
leaq 0x48(%rsp), %rdi
callq 0x2c850
jmp 0x2c21e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x39(%rsp), %rdi
callq 0x2c920
movq 0x30(%rsp), %rdi
callq 0x2c930
movq 0x20(%rsp), %rdi
callq 0x134e0
movq 0x40(%rsp), %rdi
callq 0x36a0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: cloudinary[P]fuif/encoding/context_predict.h
// Function: predict_and_compute_properties_with_precomputed_reference(std::vector<int, std::allocator<int>>&, Channel const&, int, int, int, Image const&, int, fuif_options&, Channel const&)
inline pixel_type predict_and_compute_properties_with_precomputed_reference(Properties &p, const Channel &ch, int x, int y, int predictor, const Image &image, int i, fuif_options &options, const Channel &references) {
    int offset;
    for (offset=0; offset<references.w; ) {
        p[offset] = references.value_nocheck(x,offset); offset++;
        p[offset] = references.value_nocheck(x,offset); offset++;
    }
    return predict_and_compute_properties(p,ch,x,y,predictor,offset);
}

// Assembly:
subq $0x38, %rsp
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rax
movl 0x40(%rsp), %eax
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl %ecx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movq %r9, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x2c2f4
movq 0x50(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x131b0
cwtl
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x12190
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x131b0
cwtl
movl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movslq 0xc(%rsp), %rsi
callq 0x12190
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2c276
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x24(%rsp), %edx
movl 0x20(%rsp), %ecx
movl 0x1c(%rsp), %r8d
movl 0xc(%rsp), %r9d
callq 0x1da40
addq $0x38, %rsp
retq
nopw (%rax,%rax)