LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/maniac/chance.cpp
// Function: build_table(unsigned short (*) [2], unsigned int, unsigned int)
void build_table(uint16_t newchances[4096][2], uint32_t factor, unsigned int max_p) {
    const int64_t one = 1LL << 32;
    const int size = 4096;
    int64_t p;
    unsigned int last_p8, p8;
    unsigned int i;

    memset(newchances,0,sizeof(uint16_t) * size * 2);

    last_p8 = 0;
    p = one / 2;
    for (i = 0; i < size / 2; i++) {
        p8 = (size * p + one / 2) >> 32; //FIXME try without the one
        if (p8 <= last_p8) p8 = last_p8 + 1;
        if (last_p8 && last_p8 < size && p8 <= max_p) newchances[last_p8][1] = p8;

        p += ((one - p) * factor + one / 2) >> 32;
        last_p8 = p8;
    }

    for (i = size - max_p; i <= max_p; i++) {
        if (newchances[i][1]) continue;

        p = (i * one + size / 2) / size;
        p += ((one - p) * factor + one / 2) >> 32;
        p8 = (size * p + one / 2) >> 32; //FIXME try without the one
        if (p8 <= i) p8 = i + 1;
        if (p8 > max_p) p8 = max_p;
        newchances[i][1] = p8;
    }

    for (i = 1; i < size; i++)
        newchances[i][0] = size - newchances[size - i][1];

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movabsq $0x100000000, %r15      # imm = 0x100000000
xorl %r12d, %r12d
movl $0x4000, %edx           # imm = 0x4000
xorl %esi, %esi
callq 0x31a0
movl %r14d, %eax
movl $0x80000000, %ecx       # imm = 0x80000000
movl $0x800, %edx            # imm = 0x800
subl $0x1, %edx
jb 0xc3ae
movq %rcx, %rdi
shlq $0xc, %rdi
subq $-0x80000000, %rdi      # imm = 0x80000000
shrq $0x20, %rdi
leal 0x1(%r12), %esi
cmpl %edi, %r12d
cmovbl %edi, %esi
leal -0x1000(%r12), %edi
cmpl $0xfffff001, %edi       # imm = 0xFFFFF001
setb %dil
cmpl %ebp, %esi
seta %r8b
orb %dil, %r8b
jne 0xc391
movl %r12d, %edi
movw %si, 0x2(%rbx,%rdi,4)
movq %r15, %rdi
subq %rcx, %rdi
imulq %rax, %rdi
subq $-0x80000000, %rdi      # imm = 0x80000000
sarq $0x20, %rdi
addq %rdi, %rcx
movl %esi, %r12d
jmp 0xc34a
movl $0x1000, %ecx           # imm = 0x1000
subl %ebp, %ecx
cmpl %ebp, %ecx
ja 0xc40d
movl %ecx, %edx
cmpw $0x0, 0x2(%rbx,%rdx,4)
je 0xc3c7
incl %ecx
jmp 0xc3b5
movq %rdx, %rdi
shlq $0x14, %rdi
movq %r15, %rsi
subq %rdi, %rsi
imulq %rax, %rsi
subq $-0x80000000, %rsi      # imm = 0x80000000
sarq $0x20, %rsi
addq %rdi, %rsi
shlq $0xc, %rsi
subq $-0x80000000, %rsi      # imm = 0x80000000
shrq $0x20, %rsi
leal 0x1(%rcx), %edi
cmpl %esi, %ecx
jb 0xc3fe
movl %edi, %esi
cmpl %ebp, %esi
jb 0xc404
movl %ebp, %esi
movw %si, 0x2(%rbx,%rdx,4)
movl %edi, %ecx
jmp 0xc3b5
addq $0x3ffe, %rbx           # imm = 0x3FFE
movq $-0x3ffc, %rax          # imm = 0xC004
movq %rbx, %rcx
testq %rax, %rax
je 0xc439
movw $0x1000, %dx            # imm = 0x1000
subw (%rcx), %dx
movw %dx, 0x2(%rbx,%rax)
addq $0x4, %rax
addq $-0x4, %rcx
jmp 0xc41e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movl %edx, %r9d
movl %esi, %r8d
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
movl %edi, %ecx
movl %edi, %eax
negl %eax
movswl %dx, %esi
cmpl %eax, %esi
cmovgel %edx, %eax
testl %r9d, %r9d
jle 0xcd11
movl %r8d, %edx
subl %ecx, %edx
movswl %ax, %esi
cmpl %esi, %edx
cmovlel %eax, %edx
movl %ecx, %esi
subl %r8d, %esi
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movswl %dx, %esi
cmpl %esi, %eax
cmovlel %edx, %eax
pushq %rbx
movl %eax, %edx
shll $0x10, %edx
cwtl
bsrl %eax, %ebx
testl %edx, %edx
cmovel %edx, %ebx
cmpl $0xf, %ebx
jb 0xcd39
leal 0x1(%rbx), %edx
leaq 0x116e9(%rip), %rdi     # 0x1e418
pushq $0xf
popq %rsi
xorl %eax, %eax
callq 0x16b80
cmpl $0xf, %ebx
setb %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/encoding.cpp
// Function: inv_permute_meta(Image&)
void inv_permute_meta(Image &input) {
    v_printf(5,"Permutation (Meta): ");
    std::vector<Channel> inchannel = input.channel;
    for (int i=0; i<input.channel[0].w; i++) {
        int c = input.channel[0].value(0,i);
        if (c < 0 || c >= input.channel[0].w) {
            e_printf("Invalid permutation: %i is not a channel number\n",c);
            input.error=true;
            return;
        }
        for (int j=0; j<i; j++) if (input.channel[0].value(0,i) == input.channel[0].value(0,j)) {
            e_printf("Invalid permutation: both %i and %i map from channel number %i\n",i,j,input.channel[0].value(0,i));
            input.error=true;
            return;
        }
        input.channel[input.nb_meta_channels+c] = inchannel[input.nb_meta_channels+i];
        v_printf(5,"[%i -> %i] ",i,c);
    }
    v_printf(5,"\n");
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x1166a(%rip), %rsi     # 0x1e510
pushq $0x5
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x16c30
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xaa0e
leaq 0x110f5(%rip), %r15     # 0x1dfbb
xorl %r14d, %r14d
movq (%rbx), %rdi
movslq 0x18(%rdi), %rdx
cmpq %rdx, %r14
jge 0xcf9b
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
sarq %rcx
leaq 0x24(%rdi), %rsi
cmpq %r14, %rcx
leaq (%rax,%r14,2), %r8
cmovbeq %rsi, %r8
movswl (%r8), %r12d
testl %r12d, %r12d
js 0xcfae
cmpl %r12d, %edx
jle 0xcfae
xorl %edx, %edx
cmpq %rdx, %r14
je 0xcf2b
cmpq %rdx, %rcx
movq %rsi, %r8
cmovaq %rax, %r8
cmpw (%r8), %r12w
je 0xcf69
incq %rdx
addq $0x2, %rax
jmp 0xcf0d
movl 0x6c(%rbx), %eax
leal (%rax,%r14), %ecx
movslq %ecx, %rsi
shlq $0x6, %rsi
addq 0x8(%rsp), %rsi
addl %r12d, %eax
cltq
shlq $0x6, %rax
addq %rax, %rdi
callq 0xa526
movl %ebp, %edi
movq %r15, %rsi
movl %r14d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x16c30
incq %r14
jmp 0xcec9
leaq 0x1100b(%rip), %rdi     # 0x1df7b
movl %r14d, %esi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x16b80
movb $0x1, 0xa8(%rbx)
leaq 0x8(%rsp), %rdi
callq 0xaa62
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12994(%rip), %rsi     # 0x1f936
pushq $0x5
popq %rdi
xorl %eax, %eax
callq 0x16c30
jmp 0xcf84
leaq 0x110b8(%rip), %rdi     # 0x1e06d
movl %r12d, %esi
xorl %eax, %eax
callq 0x16b80
jmp 0xcf7d
jmp 0xcfc7
jmp 0xcfc7
jmp 0xcfc7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xaa62
movq %rbx, %rdi
callq 0x35d0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x2d, (%rdi)
jne 0xcffa
cmpb $0x0, 0x1(%r15)
je 0xd05a
leaq 0x11a08(%rip), %rsi     # 0x1ea09
movq %r15, %rdi
callq 0x33a0
testq %rax, %rax
je 0xd04c
movq 0x1ef93(%rip), %rcx     # 0x2bfa8
cmpq (%rcx), %rax
leaq 0x119ed(%rip), %rcx     # 0x1ea0c
cmoveq %rcx, %r15
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %r15, 0x8(%rdi)
orl $-0x1, 0x10(%rdi)
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd1ec
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x12300
jmp 0xd04e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x1ef47(%rip), %rax     # 0x2bfa8
movq (%rax), %rax
jmp 0xd009
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x12300
movq %rbx, %rdi
callq 0x35d0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0xec3a
movq %r14, %rdi
callq 0x5218
cmpb $0x1, 0x24(%rbx)
jne 0xd0ac
leaq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x1230e
movq 0x30(%r14), %rax
movq %rax, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpb $0x2d, (%rdi)
jne 0xd0d9
cmpb $0x0, 0x1(%r15)
je 0xd159
leaq 0x1193f(%rip), %rsi     # 0x1ea1f
movq %r15, %rdi
callq 0x33a0
testq %rax, %rax
je 0xd148
movq 0x1eedc(%rip), %rcx     # 0x2bfd0
cmpq (%rcx), %rax
leaq 0x11924(%rip), %rcx     # 0x1ea22
cmoveq %rcx, %r15
movq %rax, 0x8(%rsp)
movq %r15, 0x10(%rsp)
orl $-0x1, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x123d8
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0xf5dc
movl %eax, %ebx
leaq 0x20(%rsp), %rdi
callq 0xd1d2
leaq 0x8(%rsp), %rdi
callq 0x12300
jmp 0xd14a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
movq 0x1ee70(%rip), %rax     # 0x2bfd0
movq (%rax), %rax
jmp 0xd0e8
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xd1d2
jmp 0xd177
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x12300
movq %rbx, %rdi
callq 0x35d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, %r14d
andl $0x7f, %r14d
cmpq $0x7f, %rsi
jbe 0xdacf
shrq $0x7, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xdaa6
movq %r14, %rsi
jmp 0xdab6
movl %esi, %eax
orl $0x80, %eax
testb %bpl, %bpl
cmovnel %esi, %eax
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xec84
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rbx)
je 0xf590
movq 0x18(%r14), %rsi
incq %rsi
movq %r14, %rdi
callq 0x12564
movb (%rbx), %al
movq (%r14), %rcx
movq 0x18(%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x18(%r14)
movb %al, (%rcx,%rdx)
movq 0x18(%r14), %rax
cmpq %rax, 0x10(%r14)
jae 0xf58b
incq %rax
movq %rax, 0x10(%r14)
incq %rbx
jmp 0xf552
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x18(%rdi), %rsi
incq %rsi
callq 0x12564
movq (%r14), %rax
movq 0x18(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r14)
movb %bl, (%rax,%rcx)
movq 0x18(%r14), %rax
cmpq %rax, 0x10(%r14)
jae 0xf5d2
incq %rax
movq %rax, 0x10(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0xa
popq %r15
subl $0x1, %r15d
jb 0xfe22
movq %rbx, %rdi
callq 0x1573a
testl %eax, %eax
js 0xfe22
movl %eax, %ebp
cmpl $0x7f, %eax
jbe 0xfe41
addl %ebp, %r14d
shll $0x7, %r14d
addl $0xffffc000, %r14d      # imm = 0xFFFFC000
jmp 0xfdf9
movq %rbx, %rdi
callq 0x100ca
pushq $-0x1
popq %rbp
testb %al, %al
jne 0xfe44
leaq 0xeda6(%rip), %rdi      # 0x1ebde
xorl %eax, %eax
callq 0x16b80
jmp 0xfe44
orl %r14d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movslq %edx, %rcx
decq %rcx
xorl %edx, %edx
movq 0x10(%rdi), %rax
cmpq 0x8(%rdi), %rax
jae 0x11632
cmpq %rcx, %rdx
jge 0x11632
movq (%rdi), %r8
leaq 0x1(%rax), %r9
movq %r9, 0x10(%rdi)
movb (%r8,%rax), %al
movb %al, (%rsi,%rdx)
incq %rdx
jmp 0x1160c
xorl %eax, %eax
cmpq %rcx, %rdx
movb $0x0, (%rsi,%rcx)
cmovgeq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x8(%rdi), %rax
cmpq %rsi, %rax
ja 0x125e7
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq (%rax,%rax,2), %rax
shrq %rax
cmpq %rax, %rsi
cmovaq %rsi, %rax
cmpq $0x1001, %rax           # imm = 0x1001
movl $0x1000, %r14d          # imm = 0x1000
cmovaeq %rax, %r14
movq %r14, %rdi
callq 0x3040
movq %rax, %r15
movq (%rbx), %r12
movq 0x10(%rbx), %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x3280
movq 0x18(%rbx), %rax
cmpq %rax, %r13
jae 0x125ca
movb $0x0, (%r15,%r13)
incq %r13
jmp 0x125bb
testq %r12, %r12
je 0x125d7
movq %r12, %rdi
callq 0x33e0
movq %r15, (%rbx)
movq %r14, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
pushq $0x2
popq %r13
pushq $0x1
popq %r15
subl %r12d, %ebp
je 0x129af
subl %r12d, %ebx
movl %ebp, %eax
cltd
idivl %r13d
movq (%r14), %rdi
movl %eax, %r12d
cmpl %eax, %ebx
jle 0x129a0
movl %r15d, %esi
callq 0x12a04
incl %r12d
jmp 0x1297b
movl %r12d, %ebp
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x12a04
jmp 0x1297b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xffff, %r14d          # imm = 0xFFFF
addq %r14, 0x10(%rdi)
movq %r14, 0x8(%rdi)
callq 0x12a30
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
callq 0x12a30
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
callq 0x12a30
movq %r14, 0x8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x12a30
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq $0x10000, %rax          # imm = 0x10000
ja 0x12ae5
movq 0x10(%rbx), %rcx
movq %rcx, %r14
shrq $0x10, %r14
movl 0x18(%rbx), %esi
testl %esi, %esi
js 0x12a8a
addq %rcx, %rax
cmpq $0xffffff, %rax         # imm = 0xFFFFFF
ja 0x12aa9
movq (%rbx), %rdi
callq 0xf59a
movl 0x1c(%rbx), %eax
testl %eax, %eax
je 0x12a8a
movq (%rbx), %rdi
movl $0xff, %esi
callq 0xf59a
movl 0x1c(%rbx), %eax
decl %eax
movl %eax, 0x1c(%rbx)
jmp 0x12a6f
movl %r14d, 0x18(%rbx)
movl 0x10(%rbx), %eax
movzwl %ax, %eax
shll $0x8, %eax
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rax
shlq $0x8, %rax
movq %rax, 0x8(%rbx)
jmp 0x12a3b
cmpq $0x1000000, %rcx        # imm = 0x1000000
jb 0x12ad7
movq (%rbx), %rdi
incl %esi
callq 0xf59a
movl 0x1c(%rbx), %eax
testl %eax, %eax
je 0x12adc
movq (%rbx), %rdi
xorl %esi, %esi
callq 0xf59a
movl 0x1c(%rbx), %eax
decl %eax
movl %eax, 0x1c(%rbx)
jmp 0x12abf
incl 0x1c(%rbx)
jmp 0x12a8e
movzbl %r14b, %eax
movl %eax, 0x18(%rbx)
jmp 0x12a8e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %r9d, %ebp
movl %r8d, %r12d
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %r14
movl 0xe0(%rsp), %eax
movl 0xe8(%rsp), %edx
movq %rsi, (%rdi)
movq %rsi, 0x8(%rdi)
addq $0x10, %rdi
movl %eax, %esi
callq 0x12f36
leaq 0x4018(%r14), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12cce
movq 0x4020(%r14), %rsi
subq 0x4018(%r14), %rsi
shrq $0x3, %rsi
movl %esi, 0x4030(%r14)
movzwl %r12w, %edx
leaq 0x10(%rsp), %rdi
callq 0x12d1e
leaq 0x4038(%r14), %r12
pushq $0x1
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
callq 0x12e36
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x12e8c
movq %r15, 0x4050(%r14)
leaq 0x4058(%r14), %rdi
movl 0x4030(%r14), %esi
movb $0x0, (%r13)
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x12eb0
movl %ebp, 0x4080(%r14)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x12f14
jmp 0x12c1f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x12e8c
jmp 0x12c1f
movq %rax, %r14
movq %rbx, %rdi
callq 0xc00e
movq %r14, %rdi
callq 0x35d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: PropertySymbolCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::set_selection_and_update_property_sums(std::vector<int, std::allocator<int>> const&, CompoundSymbolChances<SimpleBitChance, 15>&, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&)
void inline set_selection_and_update_property_sums(const Properties &properties, CompoundSymbolChances<BitChance,bits> &chances, const Ranges &crange) {
        chances.count++;
        for(unsigned int i=0; i<nb_properties; i++) {
            assert(properties[i] >= range[i].first);
            assert(properties[i] <= range[i].second);
            chances.virtPropSum[i] += properties[i];
//            PropertyVal splitval = div_down(chances.virtPropSum[i],chances.count);
            PropertyVal splitval = compute_splitval(chances,i,crange);
            selection[i] = (properties[i] > splitval);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
incl 0x90(%rdx)
movq %rsi, %r15
movq %rdi, %r12
leaq 0x4058(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movl 0x4030(%r12), %eax
cmpq %rax, %rbp
jae 0x13ec3
movq (%r15), %rax
movslq (%rax,%rbp,4), %rax
movq 0x78(%r14), %rcx
addq %rax, (%rcx,%rbp,8)
movswl %bp, %edx
movq %r12, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rcx
callq 0x13ed2
movl %eax, %ebx
movq (%r15), %rax
movl (%rax,%rbp,4), %r13d
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x13fa4
cmpl %ebx, %r13d
jle 0x13eb5
orq (%rax), %rdx
jmp 0x13ebb
notq %rdx
andq (%rax), %rdx
movq %rdx, (%rax)
incq %rbp
jmp 0x13e66
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: PropertySymbolCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::compute_splitval(CompoundSymbolChances<SimpleBitChance, 15> const&, short, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&) const
inline PropertyVal compute_splitval(const CompoundSymbolChances<BitChance,bits> &ch, int16_t p, const Ranges &crange) const {
        // encourage making initial branches for > 0, == 0, < 0
/*
        if (ch.range[p].first <= 0 && ch.range[p].second >= 0) {
            if (ch.range[p].second > 0) return 0;
            if (ch.range[p].first < 0) return -1;
        }
*/
        // make first branch on > 0
/*
        if (ch.range[p].first < 0 && ch.range[p].second > 0) {
            return 0;
        }
*/
        if (crange[p].first < 0 && crange[p].second > 0) {
            return 0;
        }
        PropertyVal splitval = div_down(ch.virtPropSum[p],ch.count);
//        if (splitval >= ch.range[p].second)
//             splitval = ch.range[p].second-1; // == does happen because of rounding and running average
        if (splitval >= crange[p].second)
             splitval = crange[p].second-1; // == does happen because of rounding and running average
        return splitval;
    }

// Assembly:
movslq %edx, %rdi
movq (%rcx), %r8
cmpl $0x0, (%r8,%rdi,8)
js 0x13efa
movq 0x78(%rsi), %rax
movq (%rax,%rdi,8), %rax
movslq 0x90(%rsi), %rcx
testq %rax, %rax
js 0x13f06
cqto
idivq %rcx
jmp 0x13f13
xorl %ecx, %ecx
cmpl $0x0, 0x4(%r8,%rdi,8)
jg 0x13f20
jmp 0x13edf
notq %rax
addq %rcx, %rax
cqto
idivq %rcx
negl %eax
movl 0x4(%r8,%rdi,8), %edx
leal -0x1(%rdx), %ecx
cmpl %edx, %eax
cmovll %eax, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: CompoundSymbolChances<SimpleBitChance, 15>::resetCounters()
void resetCounters() {
        best_property = -1;
        realSize = 0;
        count = 0;
        virtPropSum.assign(virtPropSum.size(),0);
        virtSize.assign(virtSize.size(),0);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
orw $-0x1, 0x94(%rdi)
andq $0x0, 0x58(%rdi)
andl $0x0, 0x90(%rdi)
addq $0x78, %rdi
movq 0x80(%rbx), %rsi
subq 0x78(%rbx), %rsi
sarq $0x3, %rsi
movq %rsp, %r14
andq $0x0, (%r14)
movq %r14, %rdx
callq 0x140dc
leaq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rsi
subq 0x60(%rbx), %rsi
sarq $0x3, %rsi
andq $0x0, (%r14)
movq %rsp, %rdx
callq 0x141e2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: CompoundSymbolBitCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::bestChance(SymbolChanceBitType, int)
BitChance inline & bestChance(SymbolChanceBitType type, int i = 0) {
        signed short int p = chances.best_property;
        return (p == -1 ? chances.realChances.bit(type,i)
                : ((select)[p] ? chances.virtChances[p].first.bit(type,i)
                   : chances.virtChances[p].second.bit(type,i) ));
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq 0x10(%rdi), %rax
movswq 0x94(%rax), %r14
cmpq $-0x1, %r14
je 0x14708
movq %rdi, %r15
movq 0x18(%rdi), %rdi
movq %r14, %rsi
callq 0x13fa4
movq %rax, %rcx
movq 0x10(%r15), %rax
movq 0x40(%rax), %rax
testq %rdx, (%rcx)
je 0x146fd
imulq $0x7c, %r14, %rcx
addq %rcx, %rax
jmp 0x14708
imulq $0x7c, %r14, %rcx
addq %rcx, %rax
addq $0x3e, %rax
cmpl $0x3, %ebp
je 0x1472a
cmpl $0x2, %ebp
je 0x1471d
cmpl $0x1, %ebp
jne 0x14735
addq $0x2, %rax
jmp 0x14735
movslq %ebx, %rcx
leaq (%rax,%rcx,2), %rax
addq $0x4, %rax
jmp 0x14735
movslq %ebx, %rcx
leaq (%rax,%rcx,2), %rax
addq $0x20, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: CompoundSymbolBitCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::updateChances(SymbolChanceBitType, int, bool)
void inline updateChances(SymbolChanceBitType type, int i, bool bit) {
        BitChance& real = chances.realChances.bit(type,i);
        real.estim(bit, chances.realSize);
        real.put(bit, table);

        int16_t best_property = -1;
        uint64_t best_size = chances.realSize;
        for (unsigned int j=0; j<chances.virtChances.size(); j++) {
            BitChance& virt = (select)[j] ? chances.virtChances[j].first.bit(type,i)
                              : chances.virtChances[j].second.bit(type,i);
            virt.estim(bit, chances.virtSize[j]);
            virt.put(bit, table);
            if (chances.virtSize[j] < best_size) {
                best_size = chances.virtSize[j];
                best_property = j;
            }
        }
        chances.best_property = best_property;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x14(%rsp)
movl %esi, %ebp
movq %rdi, %r14
movq 0x10(%rdi), %rcx
movslq %edx, %rax
movq %rax, 0x8(%rsp)
cmpl $0x3, %esi
je 0x1478a
cmpl $0x2, %ebp
je 0x1477b
movq %rcx, %rax
cmpl $0x1, %ebp
jne 0x14797
leaq 0x2(%rcx), %rax
jmp 0x14797
movq 0x8(%rsp), %rax
leaq (%rcx,%rax,2), %rax
addq $0x4, %rax
jmp 0x14797
movq 0x8(%rsp), %rax
leaq (%rcx,%rax,2), %rax
addq $0x20, %rax
movzwl (%rax), %edx
movl $0x1000, %esi           # imm = 0x1000
subq %rdx, %rsi
movl 0x14(%rsp), %edi
testb %dil, %dil
cmovneq %rdx, %rsi
leaq 0x17e9c(%rip), %r8      # 0x2c650
movzwl (%r8,%rsi,2), %r12d
addq 0x58(%rcx), %r12
movq %r12, 0x58(%rcx)
movzbl %dil, %r13d
shlq $0x2, %rdx
addq (%r14), %rdx
movzwl (%rdx,%r13,2), %edx
movw %dx, (%rax)
movw $0xffff, %bx            # imm = 0xFFFF
xorl %eax, %eax
movl %eax, %r15d
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
cqto
pushq $0x7c
popq %rsi
idivq %rsi
cmpq %r15, %rax
jbe 0x148a3
movq 0x18(%r14), %rdi
movq %r15, %rsi
callq 0x13fa4
movq 0x10(%r14), %rcx
movq 0x40(%rcx), %rsi
testq %rdx, (%rax)
je 0x14818
imulq $0x7c, %r15, %rax
addq %rax, %rsi
jmp 0x14823
imulq $0x7c, %r15, %rax
addq %rax, %rsi
addq $0x3e, %rsi
cmpl $0x3, %ebp
je 0x14847
cmpl $0x2, %ebp
je 0x14838
cmpl $0x1, %ebp
jne 0x14854
addq $0x2, %rsi
jmp 0x14854
movq 0x8(%rsp), %rax
leaq (%rsi,%rax,2), %rsi
addq $0x4, %rsi
jmp 0x14854
movq 0x8(%rsp), %rax
leaq (%rsi,%rax,2), %rsi
addq $0x20, %rsi
movzwl (%rsi), %eax
movl $0x1000, %edx           # imm = 0x1000
subq %rax, %rdx
cmpb $0x0, 0x14(%rsp)
cmovneq %rax, %rdx
movq 0x60(%rcx), %rdi
leaq 0x17ddd(%rip), %r8      # 0x2c650
movzwl (%r8,%rdx,2), %edx
addq (%rdi,%r15,8), %rdx
movq %rdx, (%rdi,%r15,8)
shlq $0x2, %rax
addq (%r14), %rax
movzwl (%rax,%r13,2), %eax
cmpq %r12, %rdx
cmovbq %rdx, %r12
movw %ax, (%rsi)
cmovbl %r15d, %ebx
leal 0x1(%r15), %eax
jmp 0x147da
movw %bx, 0x94(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: PropertySymbolCoder<SimpleBitChance, RacDummy<DummyIO>, 15>::kill_children(int)
void kill_children(int pos) {
        PropertyDecisionNode &n = inner_node[pos];
        if (n.property == -1) n.property = 0;
        else kill_children(n.childID);
        PropertyDecisionNode &n1 = inner_node[pos+1];
        if (n1.property == -1) n1.property = 0;
        else kill_children(n1.childID);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x4050(%rdi), %rax
movq (%rax), %rax
movslq %esi, %r14
cmpw $-0x1, (%rax,%r14,8)
je 0x14b22
movzwl 0x2(%rax,%r14,8), %esi
movq %rbx, %rdi
callq 0x14aec
movq 0x4050(%rbx), %rax
movq (%rax), %rax
jmp 0x14b28
andw $0x0, (%rax,%r14,8)
cmpw $-0x1, 0x8(%rax,%r14,8)
je 0x14b39
movzwl 0xa(%rax,%r14,8), %esi
jmp 0x14afd
andw $0x0, 0x8(%rax,%r14,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: MetaPropertySymbolCoder<SimpleBitChance, RacOutput24<BlobIO>>::write_subtree(int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&, Tree const&)
void MetaPropertySymbolCoder<BitChance,RAC>::write_subtree(int pos, Ranges &subrange, const Tree &tree) {
        const PropertyDecisionNode &n = tree[pos];
        int p = n.property;
        coder[0].write_int2(0,nb_properties,p+1);
        if (p != -1) {
//            coder[1].write_int2(CONTEXT_TREE_MIN_COUNT, CONTEXT_TREE_MAX_COUNT, n.count);
//            printf("From properties 0..%i, split node at PROPERTY %i\n",nb_properties-1,p);
            int oldmin = subrange[p].first;
            int oldmax = subrange[p].second;
            assert(oldmin < oldmax);
            coder[2].write_int2(oldmin, oldmax-1, n.splitval);
//            e_printf( "Pos %i: prop %i splitval %i in [%i..%i]\n", pos, n.property, n.splitval, oldmin, oldmax-1);
            // > splitval
            subrange[p].first = n.splitval+1;
            write_subtree(n.childID, subrange, tree);

            // <= splitval
            subrange[p].first = oldmin;
            subrange[p].second = n.splitval;
            write_subtree(n.childID+1, subrange, tree);

            subrange[p].second = oldmax;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
movslq %esi, %r12
movq (%rcx), %r13
movswl (%r13,%r12,8), %ebp
movq (%rdi), %rdi
movl 0x30(%r15), %edx
leal 0x1(%rbp), %ecx
xorl %esi, %esi
callq 0x14fea
cmpl $-0x1, %ebp
je 0x14fda
movslq %ebp, %rbp
movq (%rbx), %rax
movl (%rax,%rbp,8), %esi
movl %esi, 0xc(%rsp)
movl 0x4(%rax,%rbp,8), %eax
movq %rax, 0x10(%rsp)
movl $0x80a0, %edi           # imm = 0x80A0
addq (%r15), %rdi
leal -0x1(%rax), %edx
movl 0x4(%r13,%r12,8), %ecx
callq 0x14fea
movl 0x4(%r13,%r12,8), %eax
incl %eax
movq (%rbx), %rcx
movl %eax, (%rcx,%rbp,8)
movzwl 0x2(%r13,%r12,8), %esi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x14f1c
movq (%rbx), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax,%rbp,8)
movl 0x4(%r13,%r12,8), %ecx
movl %ecx, 0x4(%rax,%rbp,8)
movzwl 0x2(%r13,%r12,8), %esi
incl %esi
movq %r15, %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x14f1c
movq (%rbx), %rax
movq 0x10(%rsp), %rcx
movl %ecx, 0x4(%rax,%rbp,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound_enc.h
// Function: FinalPropertySymbolCoder<SimpleBitChance, RacOutput24<BlobIO>, 15>::find_leaf_readonly(std::vector<int, std::allocator<int>> const&)
FinalCompoundSymbolChances<BitChance,bits> inline & FinalPropertySymbolCoder<BitChance,RAC,bits>::find_leaf_readonly(const Properties &properties) {
        Tree::size_type pos = 0;
//        while(inner_node[pos].property != -1 && inner_node[pos].count < 0) {
        while(inner_node[pos].property != -1) { // && inner_node[pos].count < 0) {
                if (properties[inner_node[pos].property] > inner_node[pos].splitval) {
                  pos = inner_node[pos].childID;
                } else {
                  pos = inner_node[pos].childID+1;
                }
        }
//        return leaf_node[inner_node[pos].leafID];
        return leaf_node[inner_node[pos].childID];
    }

// Assembly:
movq 0x4030(%rdi), %rax
movq (%rax), %rax
movq (%rsi), %rcx
xorl %edx, %edx
movswq (%rax,%rdx,8), %rsi
cmpq $-0x1, %rsi
je 0x1539b
movl (%rcx,%rsi,4), %esi
xorl %r8d, %r8d
cmpl 0x4(%rax,%rdx,8), %esi
setle %r8b
movzwl 0x2(%rax,%rdx,8), %edx
addq %rdx, %r8
movq %r8, %rdx
jmp 0x15375
movzwl 0x2(%rax,%rdx,8), %eax
imulq $0x3e, %rax, %rax
addq 0x4018(%rdi), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/encoding.cpp
// Function: bool corrupt_or_truncated<FileIO>(FileIO&, Channel&, unsigned long)
bool corrupt_or_truncated(IO& io, Channel &channel, size_t bytes_to_load) {
    if (io.isEOF() || (bytes_to_load && io.ftell() >= bytes_to_load)) {
        v_printf(3,"Premature end-of-file detected.\n");
        channel.data = std::vector<pixel_type>(channel.w * channel.h, 0);
        return true;
    } else {
        v_printf(3,"Corruption detected.\n");
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
callq 0x100ca
testb %al, %al
jne 0x157b5
testq %r14, %r14
je 0x157a0
movq %r15, %rdi
callq 0xfe52
cmpq %r14, %rax
jae 0x157b5
leaq 0x9650(%rip), %rsi      # 0x1edf7
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x16c30
jmp 0x15802
leaq 0x961a(%rip), %rsi      # 0x1edd6
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x16c30
movslq 0x18(%rbx), %rax
movslq 0x1c(%rbx), %rsi
imulq %rax, %rsi
leaq 0x6(%rsp), %rdx
andw $0x0, (%rdx)
leaq 0x8(%rsp), %r14
leaq 0x5(%rsp), %rcx
movq %r14, %rdi
callq 0xab22
movq %rbx, %rdi
movq %r14, %rsi
callq 0xba76
movq %r14, %rdi
callq 0xabc2
movb $0x1, %bl
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/symbol.h
// Function: UniformSymbolCoder<RacInput24<FileIO>>::read_int(int, int)
int read_int(int min, int len) {
        assert(len >= 0);
        if (len == 0) return min;

        // split in [0..med] [med+1..len]
        int med = len/2;
        bool bit = rac.read_bit();
        if (bit) {
            return read_int(min+med+1, len-(med+1));
        } else {
            return read_int(min, med);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
pushq $0x2
popq %r12
testl %r15d, %r15d
je 0x15850
movl %r15d, %ebp
movl %r15d, %eax
cltd
idivl %r12d
movl %eax, %r15d
movq (%r14), %rdi
callq 0x15abe
testb %al, %al
je 0x15822
addl %r15d, %ebx
incl %ebx
notl %r15d
addl %r15d, %ebp
movl %ebp, %r15d
jmp 0x15822
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound.h
// Function: MetaPropertySymbolCoder<SimpleBitChance, RacInput24<FileIO>>::read_tree(Tree&)
bool read_tree(Tree &tree) {
          Ranges rootrange(range);
          tree.clear();
          tree.push_back(PropertyDecisionNode());
          int depth=0;
          if (read_subtree(0, rootrange, tree, depth, 0)) {
            int neededdepth = maniac::util::ilog2(tree.size())+1;
            v_printf(8,"Read MANIAC tree with %u nodes and depth %i (with better balance, depth %i might have been enough).\n",(unsigned int) tree.size(),depth,neededdepth);
            return true;
          } else return false;
          //return read_subtree(0, rootrange, tree);
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x12cce
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x158f7
movq %rax, 0x8(%rbx)
movq %rsp, %rsi
movq $0xffff, (%rsi)         # imm = 0xFFFF
movq %rbx, %rdi
callq 0x15e84
movq %rsp, %r8
andl $0x0, (%r8)
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r9d, %r9d
callq 0x15cfc
movl %eax, %ebp
testb %al, %al
je 0x1595d
movq 0x8(%rbx), %rdx
subq (%rbx), %rdx
shrq $0x3, %rdx
bsrl %edx, %eax
xorl $-0x20, %eax
addl $0x21, %eax
testl %edx, %edx
pushq $0x1
popq %r8
cmovnel %eax, %r8d
movl (%rsp), %ecx
leaq 0x94ba(%rip), %rsi      # 0x1ee0d
pushq $0x8
popq %rdi
xorl %eax, %eax
callq 0x16c30
leaq 0x8(%rsp), %rdi
callq 0xc00e
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x15976
jmp 0x15976
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc00e
movq %rbx, %rdi
callq 0x35d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/rac.h
// Function: RacInput<RacConfig24, FileIO>::RacInput(FileIO&)
explicit RacInput(IO& ioin) : io(ioin), range(Config::BASE_RANGE), low(0) {
        rac_t r = Config::BASE_RANGE;
        while (r > 1) {
            low <<= 8;
            low |= read_catch_eof();
            r >>= 8;
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $0x1000000, 0x8(%rdi)   # imm = 0x1000000
andq $0x0, 0x10(%rdi)
movl $0x1000000, %r14d       # imm = 0x1000000
xorl %eax, %eax
cmpq $0x2, %r14
jb 0x15aa7
shlq $0x8, %rax
movq %rax, 0x10(%rbx)
movq %rbx, %rdi
callq 0x15ab0
orq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
shrq $0x8, %r14
jmp 0x15a83
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/rac.h
// Function: RacInput<RacConfig24, FileIO>::input()
void inline input() {
        if (range <= Config::MIN_RANGE) {
            low <<= 8;
            range <<= 8;
            low |= read_catch_eof();
        }
        if (range <= Config::MIN_RANGE) {
            low <<= 8;
            range <<= 8;
            low |= read_catch_eof();
        }
    }

// Assembly:
movq 0x8(%rdi), %rax
cmpq $0x10000, %rax          # imm = 0x10000
ja 0x15b50
pushq %rbx
movq %rdi, %rbx
shlq $0x8, 0x10(%rdi)
shlq $0x8, %rax
movq %rax, 0x8(%rdi)
callq 0x15ab0
orq 0x10(%rbx), %rax
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
ja 0x15b4f
shlq $0x8, %rax
movq %rax, 0x10(%rbx)
shlq $0x8, %rcx
movq %rcx, 0x8(%rbx)
movq %rbx, %rdi
callq 0x15ab0
orq %rax, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/symbol.h
// Function: SimpleSymbolBitCoder<SimpleBitChance, RacInput24<FileIO>, 15>::read(SymbolChanceBitType, int)
bool read(SymbolChanceBitType typ, int i = 0) {
        BitChance& bch = ctx.bit(typ, i);
        bool bit = rac.read_12bit_chance(bch.get_12bit());
        bch.put(bit, table);
        return bit;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r14
cmpl $0x3, %esi
je 0x1601b
cmpl $0x2, %esi
je 0x1600e
cmpl $0x1, %esi
jne 0x16026
addq $0x2, %r14
jmp 0x16026
movslq %edx, %rax
leaq (%r14,%rax,2), %r14
addq $0x4, %r14
jmp 0x16026
movslq %edx, %rax
leaq (%r14,%rax,2), %r14
addq $0x20, %r14
movq 0x10(%rbx), %rdi
movzwl (%r14), %esi
callq 0x4a44
movzwl (%r14), %ecx
shlq $0x2, %rcx
addq (%rbx), %rcx
movzbl %al, %eax
movzwl (%rcx,%rax,2), %ecx
movw %cx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/encoding/../maniac/compound.h
// Function: FinalCompoundSymbolBitCoder<SimpleBitChance, RacInput24<FileIO>, 15>::read(SymbolChanceBitType, int)
bool inline read(const SymbolChanceBitType type, const int i = 0) {
        BitChance& ch = chances.realChances.bit(type, i);
        bool bit = rac.read_12bit_chance(ch.get_12bit());
        updateChances(type, i, bit);
        return bit;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0x10(%rdi), %rax
cmpl $0x3, %esi
je 0x160b0
cmpl $0x2, %ebp
je 0x160a3
cmpl $0x1, %ebp
jne 0x160bb
addq $0x2, %rax
jmp 0x160bb
movslq %ebx, %rcx
leaq (%rax,%rcx,2), %rax
addq $0x4, %rax
jmp 0x160bb
movslq %ebx, %rcx
leaq (%rax,%rcx,2), %rax
addq $0x20, %rax
movq 0x8(%r14), %rdi
movzwl (%rax), %esi
callq 0x4a44
movzbl %al, %r15d
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r15d, %ecx
callq 0x160e8
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/io.cpp
// Function: e_printf(char const*, ...)
void e_printf(const char *format, ...) {
    va_list args;
    va_start(args, format);
    vfprintf(stderr, format, args);
    fflush(stderr);
    va_end(args);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x16bdf
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %rdi, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x153d2(%rip), %rbx     # 0x2bfd8
movq (%rbx), %rdi
movq %r10, %rsi
callq 0x3400
movq (%rbx), %rdi
callq 0x3390
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/io.cpp
// Function: v_printf(int, char const*, ...)
void v_printf(const int v, const char *format, ...) {
    if (verbosity < v) return;
    va_list args;
    va_start(args, format);
    vfprintf(my_stdout, format, args);
    fflush(my_stdout);
    va_end(args);
}

// Assembly:
subq $0xd8, %rsp
testb %al, %al
je 0x16c72
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpl %edi, 0x156ac(%rip)     # 0x2c338
jl 0x16ccb
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x17a8e(%rip), %rdi     # 0x2e748
callq 0x3400
movq 0x17a82(%rip), %rdi     # 0x2e748
callq 0x3390
addq $0xd8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cloudinary[P]fuif/io.cpp
// Function: v_printf_tty(int, char const*, ...)
void v_printf_tty(const int v, const char *format, ...) {
    if (verbosity < v) return;
#ifdef _WIN32
    if(!_isatty(_fileno(my_stdout))) return;
#else
    if(!isatty(fileno(my_stdout))) return;
#endif
    va_list args;
    va_start(args, format);
    vfprintf(my_stdout, format, args);
    fflush(my_stdout);
    va_end(args);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0x16d16
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpl %edi, 0x15608(%rip)     # 0x2c338
jl 0x16d8c
movq %rsi, %rbx
movq 0x17a0c(%rip), %rdi     # 0x2e748
callq 0x3320
movl %eax, %edi
callq 0x35b0
testl %eax, %eax
je 0x16d8c
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x179d0(%rip), %rdi     # 0x2e748
movq %rbx, %rsi
callq 0x3400
movq 0x179c1(%rip), %rdi     # 0x2e748
callq 0x3390
addq $0xd0, %rsp
popq %rbx
retq