LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: use_space
local void use_space(struct space *space) {
    long use;

    possess(space->use);
    use = peek_lock(space->use);
    assert(use != 0);
    twist(space->use, BY, +1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x8bac(%rip), %rsi      # 0x15300
movl $0x5f0, %edx            # imm = 0x5F0
callq 0xdf23
movq (%rbx), %rdi
callq 0xe09e
testq %rax, %rax
je 0xc78b
movq (%rbx), %rdi
leaq 0x8b8b(%rip), %rcx      # 0x15300
movl $0x1, %edx
movl $0x5f3, %r8d            # imm = 0x5F3
movl $0x1, %esi
popq %rbx
jmp 0xdf81
leaq 0xa1fd(%rip), %rdi      # 0x1698f
leaq 0x8b67(%rip), %rsi      # 0x15300
leaq 0xa1f8(%rip), %rcx      # 0x16998
movl $0x5f2, %edx            # imm = 0x5F2
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: drop_space
local void drop_space(struct space *space) {
    long use;
    struct pool *pool;

    if (space == NULL)
        return;
    possess(space->use);
    use = peek_lock(space->use);
    assert(use != 0);
    twist(space->use, BY, -1);
    if (use == 1) {
        pool = space->pool;
        possess(pool->have);
        space->next = pool->head;
        pool->head = space;
        twist(pool->have, BY, +1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xd2c7
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x80c1(%rip), %rsi      # 0x15300
movl $0x5fd, %edx            # imm = 0x5FD
callq 0xdf23
movq (%rbx), %rdi
callq 0xe09e
testq %rax, %rax
je 0xd2cd
movq %rax, %r14
movq (%rbx), %rdi
leaq 0x809d(%rip), %rcx      # 0x15300
movl $0x600, %r8d            # imm = 0x600
movl $0x1, %esi
movq $-0x1, %rdx
callq 0xdf81
cmpq $0x1, %r14
jne 0xd2c7
movq 0x20(%rbx), %r15
movq (%r15), %rdi
leaq 0x8072(%rip), %r14      # 0x15300
movl $0x603, %edx            # imm = 0x603
movq %r14, %rsi
callq 0xdf23
movq 0x8(%r15), %rax
movq %rax, 0x28(%rbx)
movq %rbx, 0x8(%r15)
movq (%r15), %rdi
movl $0x1, %edx
movl $0x606, %r8d            # imm = 0x606
movl $0x1, %esi
movq %r14, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0xdf81
popq %rbx
popq %r14
popq %r15
retq
leaq 0x96bb(%rip), %rdi      # 0x1698f
leaq 0x8025(%rip), %rsi      # 0x15300
leaq 0x9782(%rip), %rcx      # 0x16a64
movl $0x5ff, %edx            # imm = 0x5FF
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: time2dos
local unsigned long time2dos(time_t t) {
    struct tm *tm;
    unsigned long dos;

    if (t == 0)
        t = time(NULL);
    tm = localtime(&t);
    if (tm->tm_year < 80 || tm->tm_year > 207)
        return 0;
    dos = (unsigned long)(tm->tm_year - 80) << 25;
    dos += (unsigned long)(tm->tm_mon + 1) << 21;
    dos += (unsigned long)tm->tm_mday << 16;
    dos += (unsigned long)tm->tm_hour << 11;
    dos += (unsigned long)tm->tm_min << 5;
    dos += (unsigned long)(tm->tm_sec + 1) >> 1;    // round to even seconds
    return dos;
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
jne 0xdb55
xorl %edi, %edi
callq 0x3380
movq %rax, (%rsp)
movq %rsp, %rdi
callq 0x3060
movl 0x14(%rax), %ecx
leal -0xd0(%rcx), %edx
cmpl $-0x80, %edx
jae 0xdb6f
xorl %eax, %eax
jmp 0xdbb4
addl $-0x50, %ecx
shlq $0x19, %rcx
movslq 0x10(%rax), %rdx
shlq $0x15, %rdx
movslq 0xc(%rax), %rsi
shlq $0x10, %rsi
addq %rdx, %rsi
addq %rcx, %rsi
movslq 0x8(%rax), %rcx
shlq $0xb, %rcx
movslq 0x4(%rax), %rdx
shlq $0x5, %rdx
addq %rcx, %rdx
addq %rsi, %rdx
movslq (%rax), %rax
incq %rax
shrq %rax
addq %rdx, %rax
addq $0x200000, %rax         # imm = 0x200000
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: grow_space
local void grow_space(struct space *space) {
    size_t more;

    // compute next size up
    more = grow(space->size);
    if (more == space->size)
        throw(ERANGE, "overflow");

    // reallocate the buffer
    space->buf = alloc(space->buf, more);
    space->size = more;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq %rax, %rdx
shrq $0x2, %rdx
addq %rax, %rdx
movl $0x3, %ecx
movq %rdx, %rsi
cmpq $0x8, %rdx
jb 0xdbee
movq %rdx, %rdi
movq %rdx, %rsi
shrq %rsi
incq %rcx
cmpq $0xf, %rdi
movq %rsi, %rdi
ja 0xdbdf
movl $0x1, %edi
shlq %cl, %rdi
cmpq $0x7, %rsi
cmoveq %rdi, %rdx
cmpq $0x11, %rdx
movl $0x10, %ecx
cmovaeq %rdx, %rcx
cmpq %rax, %rcx
movq $-0x1, %r14
cmovaq %rcx, %r14
cmpq %rax, %r14
je 0xdc3a
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x9af2
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x887a(%rip), %rsi      # 0x164bb
movl $0x22, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0xe575
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: deflate_engine
local void deflate_engine(z_stream *strm, struct space *out, int flush) {
    size_t room;

    do {
        room = out->size - out->len;
        if (room == 0) {
            grow_space(out);
            room = out->size - out->len;
        }
        strm->next_out = out->buf + out->len;
        strm->avail_out = room < UINT_MAX ? (unsigned)room : UINT_MAX;
        (void)deflate(strm, flush);
        out->len = (size_t)(strm->next_out - out->buf);
    } while (strm->avail_out == 0);
    assert(strm->avail_in == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq 0x10(%r15), %rax
subq 0x18(%r15), %rax
jne 0xdc7f
movq %r15, %rdi
callq 0xdbb6
movq 0x10(%r15), %rax
subq 0x18(%r15), %rax
movq 0x8(%r15), %rcx
addq 0x18(%r15), %rcx
movq %rcx, 0x18(%r14)
cmpq %r12, %rax
cmovaeq %r12, %rax
movl %eax, 0x20(%r14)
movq %r14, %rdi
movl %ebx, %esi
callq 0x3240
movq 0x18(%r14), %rax
subq 0x8(%r15), %rax
movq %rax, 0x18(%r15)
cmpl $0x0, 0x20(%r14)
je 0xdc65
cmpl $0x0, 0x8(%r14)
jne 0xdcc6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8d4e(%rip), %rdi      # 0x16a1b
leaq 0x762c(%rip), %rsi      # 0x15300
leaq 0x8d54(%rip), %rcx      # 0x16a2f
movl $0x691, %edx            # imm = 0x691
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/pigz.c
// Function: free_pool
local int free_pool(struct pool *pool) {
    int count;
    struct space *space;

    possess(pool->have);
    count = 0;
    while ((space = pool->head) != NULL) {
        pool->head = space->next;
        FREE(space->buf);
        free_lock(space->use);
        FREE(space);
        count++;
    }
    assert(count == pool->made);
    release(pool->have);
    free_lock(pool->have);
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x7607(%rip), %rsi      # 0x15300
movl $0x610, %edx            # imm = 0x610
callq 0xdf23
movq 0x8(%rbx), %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0xdd49
leaq 0x75eb(%rip), %r14      # 0x15300
movq 0x28(%r15), %rax
movq %rax, 0x8(%rbx)
movq 0x8(%r15), %rdi
callq 0x3050
movq (%r15), %rdi
movl $0x615, %edx            # imm = 0x615
movq %r14, %rsi
callq 0xe0a3
movq %r15, %rdi
callq 0x3050
incl %ebp
movq 0x8(%rbx), %r15
testq %r15, %r15
jne 0xdd15
cmpl 0x1c(%rbx), %ebp
jne 0xdd7f
movq (%rbx), %rdi
leaq 0x75a8(%rip), %r14      # 0x15300
movl $0x61a, %edx            # imm = 0x61A
movq %r14, %rsi
callq 0xdf52
movq (%rbx), %rdi
movl $0x61b, %edx            # imm = 0x61B
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe0a3
leaq 0x8d61(%rip), %rdi      # 0x16ae7
leaq 0x7573(%rip), %rsi      # 0x15300
leaq 0x8d67(%rip), %rcx      # 0x16afb
movl $0x619, %edx            # imm = 0x619
callq 0x3220
nop
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: new_lock_
lock *new_lock_(long initial, char const *file, long line) {
    lock *bolt = my_malloc(sizeof(struct lock_s), file, line);
    int ret = pthread_mutex_init(&(bolt->mutex), NULL);
    if (ret)
        fail(ret, file, line, "mutex_init");
    ret = pthread_cond_init(&(bolt->cond), NULL);
    if (ret)
        fail(ret, file, line, "cond_init");
    bolt->value = initial;
    return bolt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x60, %edi
callq *0xf555(%rip)           # 0x1d320
testq %rax, %rax
je 0xde07
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
callq 0x35d0
testl %eax, %eax
jne 0xde15
movq %r12, %rdi
addq $0x28, %rdi
xorl %esi, %esi
callq 0x33a0
testl %eax, %eax
jne 0xde1e
movq %r15, 0x58(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8dd3(%rip), %rcx      # 0x16be1
movl $0xc, %edi
jmp 0xde27
leaq 0x8d15(%rip), %rcx      # 0x16b31
jmp 0xde25
leaq 0x8d17(%rip), %rcx      # 0x16b3c
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: fail
local void fail(int err, char const *file, long line, char const *func) {
    fprintf(stderr, "%s: ", yarn_prefix);
    switch (err) {
        case EPERM:
            fputs("already unlocked", stderr);
            break;
        case ESRCH:
            fputs("no such thread", stderr);
            break;
        case EDEADLK:
            fputs("resource deadlock", stderr);
            break;
        case ENOMEM:
            fputs("out of memory", stderr);
            break;
        case EBUSY:
            fputs("can't destroy locked resource", stderr);
            break;
        case EINVAL:
            fputs("invalid request", stderr);
            break;
        case EAGAIN:
            fputs("resource unavailable", stderr);
            break;
        default:
            fprintf(stderr, "internal error %d", err);
    }
    fprintf(stderr, " (%s:%ld:%s)\n", file, line, func);
    if (yarn_abort != NULL)
        yarn_abort(err);
    exit(err);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebx
movq 0xf1a3(%rip), %r13      # 0x1cff0
movq (%r13), %rdi
movq 0xf4c0(%rip), %rdx      # 0x1d318
leaq 0x8392(%rip), %rsi      # 0x161f1
xorl %eax, %eax
callq 0x3340
movq (%r13), %rsi
cmpl $0xb, %ebx
jle 0xde87
cmpl $0x15, %ebx
jg 0xde9f
cmpl $0xc, %ebx
je 0xded3
cmpl $0x10, %ebx
jne 0xdebb
leaq 0x8d95(%rip), %rdi      # 0x16c1a
jmp 0xdeec
cmpl $0x1, %ebx
je 0xdeb2
cmpl $0x3, %ebx
je 0xdee5
cmpl $0xb, %ebx
jne 0xdebb
leaq 0x8dab(%rip), %rdi      # 0x16c48
jmp 0xdeec
cmpl $0x16, %ebx
je 0xdedc
cmpl $0x23, %ebx
jne 0xdebb
leaq 0x8d58(%rip), %rdi      # 0x16c08
jmp 0xdeec
leaq 0x8d2f(%rip), %rdi      # 0x16be8
jmp 0xdeec
leaq 0x8d9b(%rip), %rax      # 0x16c5d
movq %rsi, %rdi
movq %rax, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x3340
jmp 0xdef1
leaq 0x8e45(%rip), %rdi      # 0x16d1f
jmp 0xdeec
leaq 0x8d55(%rip), %rdi      # 0x16c38
jmp 0xdeec
leaq 0x8d0d(%rip), %rdi      # 0x16bf9
callq 0x3230
movq (%r13), %rdi
leaq 0x8d73(%rip), %rsi      # 0x16c6f
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x3340
movq 0x2f6ed(%rip), %rax     # 0x3d600
testq %rax, %rax
je 0xdf1c
movl %ebx, %edi
callq *%rax
movl %ebx, %edi
callq 0x3540
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: twist_
void twist_(lock *bolt, enum twist_op op, long val,
            char const *file, long line) {
    if (op == TO)
        bolt->value = val;
    else if (op == BY)
        bolt->value += val;
    int ret = pthread_cond_broadcast(&(bolt->cond));
    if (ret)
        fail(ret, file, line, "cond_broadcast");
    ret = pthread_mutex_unlock(&(bolt->mutex));
    if (ret)
        fail(ret, file, line, "mutex_unlock");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rcx, %r14
movq %rdi, %r15
cmpl $0x1, %esi
je 0xdf9e
testl %esi, %esi
jne 0xdfa2
movq %rdx, 0x58(%r15)
jmp 0xdfa2
addq %rdx, 0x58(%r15)
leaq 0x28(%r15), %rdi
callq 0x30c0
testl %eax, %eax
jne 0xdfc1
movq %r15, %rdi
callq 0x33c0
testl %eax, %eax
jne 0xdfca
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8b96(%rip), %rcx      # 0x16b5e
jmp 0xdfd1
leaq 0x8b80(%rip), %rcx      # 0x16b51
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: wait_for_
void wait_for_(lock *bolt, enum wait_op op, long val,
               char const *file, long line) {
    switch (op) {
        case TO_BE:
            until (bolt->value == val) {
                int ret = pthread_cond_wait(&(bolt->cond), &(bolt->mutex));
                if (ret)
                    fail(ret, file, line, "cond_wait");
            }
            break;
        case NOT_TO_BE:
            until (bolt->value != val) {
                int ret = pthread_cond_wait(&(bolt->cond), &(bolt->mutex));
                if (ret)
                    fail(ret, file, line, "cond_wait");
            }
            break;
        case TO_BE_MORE_THAN:
            until (bolt->value > val) {
                int ret = pthread_cond_wait(&(bolt->cond), &(bolt->mutex));
                if (ret)
                    fail(ret, file, line, "cond_wait");
            }
            break;
        case TO_BE_LESS_THAN:
            until (bolt->value < val) {
                int ret = pthread_cond_wait(&(bolt->cond), &(bolt->mutex));
                if (ret)
                    fail(ret, file, line, "cond_wait");
            }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x3, %esi
ja 0xe094
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movl %esi, %eax
leaq 0x8b17(%rip), %rcx      # 0x16b1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x28(%r12), %r13
cmpq %r15, 0x58(%r12)
je 0xe094
movq %r13, %rdi
movq %r12, %rsi
callq 0x3150
testl %eax, %eax
je 0xe013
jmp 0xe080
leaq 0x28(%r12), %r13
cmpq %r15, 0x58(%r12)
jg 0xe094
movq %r13, %rdi
movq %r12, %rsi
callq 0x3150
testl %eax, %eax
je 0xe030
jmp 0xe080
leaq 0x28(%r12), %r13
cmpq %r15, 0x58(%r12)
jl 0xe094
movq %r13, %rdi
movq %r12, %rsi
callq 0x3150
testl %eax, %eax
je 0xe04d
jmp 0xe080
leaq 0x28(%r12), %r13
cmpq %r15, 0x58(%r12)
jne 0xe094
movq %r13, %rdi
movq %r12, %rsi
callq 0x3150
testl %eax, %eax
je 0xe06a
leaq 0x8ae6(%rip), %rcx      # 0x16b6d
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: free_lock_
void free_lock_(lock *bolt, char const *file, long line) {
    if (bolt == NULL)
        return;
    int ret = pthread_cond_destroy(&(bolt->cond));
    if (ret)
        fail(ret, file, line, "cond_destroy");
    ret = pthread_mutex_destroy(&(bolt->mutex));
    if (ret)
        fail(ret, file, line, "mutex_destroy");
    my_free(bolt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xe0dd
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x28, %rdi
callq 0x34e0
testl %eax, %eax
jne 0xe0e3
movq %r15, %rdi
callq 0x31e0
testl %eax, %eax
jne 0xe0ec
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0xf24b(%rip)           # 0x1d328
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8a8d(%rip), %rcx      # 0x16b77
jmp 0xe0f3
leaq 0x8a91(%rip), %rcx      # 0x16b84
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: launch_
thread *launch_(void (*probe)(void *), void *payload,
                char const *file, long line) {
    // construct the requested call and argument for the ignition() routine
    // (allocated instead of automatic so that we're sure this will still be
    // there when ignition() actually starts up -- ignition() will free this
    // allocation)
    struct capsule *capsule = my_malloc(sizeof(struct capsule), file, line);
    capsule->probe = probe;
    capsule->payload = payload;
    capsule->file = file;
    capsule->line = line;

    // assure this thread is in the list before join_all() or ignition() looks
    // for it
    possess_(&(threads_lock), file, line);

    // create the thread and call ignition() from that thread
    thread *th = my_malloc(sizeof(struct thread_s), file, line);
    pthread_attr_t attr;
    int ret = pthread_attr_init(&attr);
    if (ret)
        fail(ret, file, line, "attr_init");
    ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
    if (ret)
        fail(ret, file, line, "attr_setdetachstate");
    ret = pthread_create(&(th->id), &attr, ignition, capsule);
    if (ret)
        fail(ret, file, line, "create");
    ret = pthread_attr_destroy(&attr);
    if (ret)
        fail(ret, file, line, "attr_destroy");

    // put the thread in the threads list for join_all()
    th->done = 0;
    th->next = threads;
    threads = th;
    release_(&(threads_lock), file, line);
    return th;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
movl $0x20, %edi
callq *0xf1fc(%rip)           # 0x1d320
testq %rax, %rax
je 0xe1f0
movq %rax, %r12
movq %r13, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
leaq 0x2f4c2(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf23
movl $0x18, %edi
callq *0xf1c4(%rip)           # 0x1d320
testq %rax, %rax
je 0xe1f0
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x32d0
testl %eax, %eax
jne 0xe1fe
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x33b0
testl %eax, %eax
jne 0xe207
leaq 0x9c(%rip), %rdx        # 0xe22d
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r12, %rcx
callq 0x3460
testl %eax, %eax
jne 0xe210
leaq 0x8(%rsp), %rdi
callq 0x3510
testl %eax, %eax
jne 0xe219
movl $0x0, 0x8(%r15)
movq 0x2f4a6(%rip), %rax     # 0x3d668
movq %rax, 0x10(%r15)
movq %r15, 0x2f49b(%rip)     # 0x3d668
leaq 0x2f434(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf52
movq %r15, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x89ea(%rip), %rcx      # 0x16be1
movl $0xc, %edi
jmp 0xe222
leaq 0x898d(%rip), %rcx      # 0x16b92
jmp 0xe220
leaq 0x898e(%rip), %rcx      # 0x16b9c
jmp 0xe220
leaq 0x8999(%rip), %rcx      # 0x16bb0
jmp 0xe220
leaq 0x8997(%rip), %rcx      # 0x16bb7
movl %eax, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: ignition
local void *ignition(void *arg) {
    struct capsule *capsule = arg;

    // run reenter() before leaving
    pthread_cleanup_push(reenter, arg);

    // execute the requested function with argument
    capsule->probe(capsule->payload);

    // mark this thread as done, letting join_all() know, and free capsule
    pthread_cleanup_pop(1);

    // exit thread
    return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x35c0
testl %eax, %eax
jne 0xe270
movq %rsp, %r14
movq %r14, %rdi
callq 0x3580
movq 0x8(%rbx), %rdi
callq *(%rbx)
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
callq 0xe424
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0xe424
movq %rsp, %rdi
callq 0x3440
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: join_
void join_(thread *ally, char const *file, long line) {
    // wait for thread to exit and return its resources
    int ret = pthread_join(ally->id, NULL);
    if (ret)
        fail(ret, file, line, "join");

    // find the thread in the threads list
    possess_(&(threads_lock), file, line);
    thread **prior = &(threads);
    thread *match;
    while ((match = *prior) != NULL) {
        if (match == ally)
            break;
        prior = &(match->next);
    }
    if (match == NULL)
        fail(ESRCH, file, line, "join lost");

    // remove thread from list and update exited count, free thread
    if (match->done)
        threads_lock.value--;
    *prior = match->next;
    release_(&(threads_lock), file, line);
    my_free(ally);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
xorl %esi, %esi
callq 0x3590
testl %eax, %eax
jne 0xe302
leaq 0x2f365(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf23
leaq 0x2f3b3(%rip), %rdx     # 0x3d668
movq %rdx, %rax
movq (%rdx), %rcx
testq %rcx, %rcx
je 0xe2c9
leaq 0x10(%rcx), %rdx
cmpq %r15, %rcx
jne 0xe2b5
testq %rcx, %rcx
je 0xe30d
cmpl $0x0, 0x8(%rcx)
je 0xe2db
decq 0x2f385(%rip)           # 0x3d660
movq 0x10(%rcx), %rcx
movq %rcx, (%rax)
leaq 0x2f31f(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf52
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0xf026(%rip)           # 0x1d328
leaq 0x88bb(%rip), %rcx      # 0x16bc4
movl %eax, %edi
jmp 0xe319
leaq 0x88b5(%rip), %rcx      # 0x16bc9
movl $0x3, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: join_all_
int join_all_(char const *file, long line) {
    // grab the threads list and initialize the joined count
    int count = 0;
    possess_(&(threads_lock), file, line);

    // do until threads list is empty
    while (threads != NULL) {
        // wait until at least one thread has reentered
        wait_for_(&(threads_lock), NOT_TO_BE, 0, file, line);

        // find the first thread marked done (should be at or near the top)
        thread **prior = &(threads);
        thread *match;
        while ((match = *prior) != NULL) {
            if (match->done)
                break;
            prior = &(match->next);
        }
        if (match == NULL)
            fail(ESRCH, file, line, "join_all lost");

        // join the thread (will be almost immediate), remove from the threads
        // list, update the reenter count, and free the thread
        int ret = pthread_join(match->id, NULL);
        if (ret)
            fail(ret, file, line, "join");
        threads_lock.value--;
        *prior = match->next;
        my_free(match);
        count++;
    }

    // let go of the threads list and return the number of threads joined
    release_(&(threads_lock), file, line);
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2f2cc(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf23
cmpq $0x0, 0x2f319(%rip)     # 0x3d668
je 0xe3db
xorl %r15d, %r15d
leaq 0x2f309(%rip), %r12     # 0x3d668
leaq 0x2f2a2(%rip), %rdi     # 0x3d608
movl $0x1, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rbx, %r8
callq 0xdfde
movq 0x2f2e9(%rip), %r13     # 0x3d668
testq %r13, %r13
je 0xe402
cmpl $0x0, 0x8(%r13)
movq %r12, %rbp
jne 0xe3a5
movq %r13, %rbp
movq 0x10(%r13), %r13
testq %r13, %r13
je 0xe402
cmpl $0x0, 0x8(%r13)
je 0xe38e
addq $0x10, %rbp
movq (%r13), %rdi
xorl %esi, %esi
callq 0x3590
testl %eax, %eax
jne 0xe419
decq 0x2f2a5(%rip)           # 0x3d660
movq 0x10(%r13), %rax
movq %rax, (%rbp)
movq %r13, %rdi
callq *0xef5c(%rip)           # 0x1d328
incl %r15d
cmpq $0x0, 0x2f291(%rip)     # 0x3d668
jne 0xe35f
jmp 0xe3de
xorl %r15d, %r15d
leaq 0x2f223(%rip), %rdi     # 0x3d608
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdf52
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x87ca(%rip), %rcx      # 0x16bd3
movl $0x3, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xde32
leaq 0x87a4(%rip), %rcx      # 0x16bc4
movl %eax, %edi
jmp 0xe40e
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/yarn.c
// Function: reenter
local void reenter(void *arg) {
    struct capsule *capsule = arg;

    // find this thread in the threads list by matching the thread id
    pthread_t me = pthread_self();
    possess_(&(threads_lock), capsule->file, capsule->line);
    thread **prior = &(threads);
    thread *match;
    while ((match = *prior) != NULL) {
        if (pthread_equal(match->id, me))
            break;
        prior = &(match->next);
    }
    if (match == NULL)
        fail(ESRCH, capsule->file, capsule->line, "reenter lost");

    // mark this thread as done and move it to the head of the list
    match->done = 1;
    if (threads != match) {
        *prior = match->next;
        match->next = threads;
        threads = match;
    }

    // update the count of threads to be joined and alert join_all()
    twist_(&(threads_lock), BY, +1, capsule->file, capsule->line);

    // free the capsule resource, even if the thread is cancelled (though yarn
    // doesn't use pthread_cancel() -- you never know)
    my_free(capsule);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x34d0
movq %rax, %r14
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
leaq 0x2f1c2(%rip), %rdi     # 0x3d608
callq 0xdf23
movq 0x2f216(%rip), %r15     # 0x3d668
testq %r15, %r15
je 0xe4ef
movq (%r15), %rdi
movq %r14, %rsi
callq 0x34b0
testl %eax, %eax
je 0xe473
leaq 0x2f1f7(%rip), %r12     # 0x3d668
jmp 0xe492
movq %r15, %r12
movq 0x10(%r15), %r15
testq %r15, %r15
je 0xe4ef
movq (%r15), %rdi
movq %r14, %rsi
callq 0x34b0
testl %eax, %eax
je 0xe473
addq $0x10, %r12
movl $0x1, 0x8(%r15)
cmpq %r15, 0x2f1c7(%rip)     # 0x3d668
je 0xe4bd
movq 0x10(%r15), %rax
movq %rax, (%r12)
movq 0x2f1b6(%rip), %rax     # 0x3d668
movq %rax, 0x10(%r15)
movq %r15, 0x2f1ab(%rip)     # 0x3d668
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
leaq 0x2f13c(%rip), %rdi     # 0x3d608
movl $0x1, %edx
movl $0x1, %esi
callq 0xdf81
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *0xee39(%rip)           # 0x1d328
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
leaq 0x877f(%rip), %rcx      # 0x16c7d
movl $0x3, %edi
callq 0xde32
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: ZopfliCalculateBlockSize
double ZopfliCalculateBlockSize(const ZopfliLZ77Store* lz77,
                                size_t lstart, size_t lend, int btype) {
  unsigned ll_lengths[ZOPFLI_NUM_LL];
  unsigned d_lengths[ZOPFLI_NUM_D];

  double result = 3; /* bfinal and btype bits */

  if (btype == 0) {
    size_t length = ZopfliLZ77GetByteRange(lz77, lstart, lend);
    size_t rem = length % 65535;
    size_t blocks = length / 65535 + (rem ? 1 : 0);
    /* An uncompressed block must actually be split into multiple blocks if it's
       larger than 65535 bytes long. Eeach block header is 5 bytes: 3 bits,
       padding, LEN and NLEN (potential less padding for first one ignored). */
    return blocks * 5 * 8 + length * 8;
  } if (btype == 1) {
    GetFixedTree(ll_lengths, d_lengths);
    result += CalculateBlockSymbolSize(
        ll_lengths, d_lengths, lz77, lstart, lend);
  } else {
    result += GetDynamicLengths(lz77, lstart, lend, ll_lengths, d_lengths);
  }

  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf10, %rsp            # imm = 0xF10
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x1, %ecx
je 0xea01
testl %ecx, %ecx
jne 0xea3c
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1196e
movq %rax, %rcx
movabsq $-0x7fff7fff7fff7fff, %rdx # imm = 0x8000800080008001
mulq %rdx
shrq $0xf, %rdx
movabsq $-0x1000100010001, %rax # imm = 0xFFFEFFFEFFFEFFFF
imulq %rcx, %rax
movabsq $0x1000100010001, %rsi  # imm = 0x1000100010001
xorl %edi, %edi
cmpq %rsi, %rax
seta %dil
addq %rdx, %rdi
leaq (%rdi,%rdi,4), %rax
shlq $0x3, %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, %xmm1
punpckldq 0x6638(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x6640(%rip), %xmm1     # 0x15030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0xeac8
leaq 0x190(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xead9
leaq 0x360(%rbx), %rax
cmpq %r14, %rax
jbe 0xea59
leaq 0x190(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0xfcf7
jmp 0xea9f
leaq 0x190(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xeb42
jmp 0xeac0
leaq 0x610(%rsp), %r12
leaq 0x90(%rsp), %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x119a2
movq %r14, (%rsp)
leaq 0x190(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %r8
movq %rbx, %r9
callq 0xfe16
movq %rax, %xmm1
punpckldq 0x6574(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x657c(%rip), %xmm1     # 0x15030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
addsd 0x82b0(%rip), %xmm0     # 0x16d78
addq $0xf10, %rsp            # imm = 0xF10
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: ZopfliCalculateBlockSizeAutoType
double ZopfliCalculateBlockSizeAutoType(const ZopfliLZ77Store* lz77,
                                        size_t lstart, size_t lend) {
  double uncompressedcost = ZopfliCalculateBlockSize(lz77, lstart, lend, 0);
  /* Don't do the expensive fixed cost calculation for larger blocks that are
     unlikely to use it. */
  double fixedcost = (lz77->size > 1000) ?
      uncompressedcost : ZopfliCalculateBlockSize(lz77, lstart, lend, 1);
  double dyncost = ZopfliCalculateBlockSize(lz77, lstart, lend, 2);
  return (uncompressedcost < fixedcost && uncompressedcost < dyncost)
      ? uncompressedcost
      : (fixedcost < dyncost ? fixedcost : dyncost);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x520, %rsp            # imm = 0x520
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1196e
movq %rax, %rcx
movabsq $-0x7fff7fff7fff7fff, %rdx # imm = 0x8000800080008001
mulq %rdx
shrq $0xf, %rdx
movabsq $-0x1000100010001, %rax # imm = 0xFFFEFFFEFFFEFFFF
imulq %rcx, %rax
movabsq $0x1000100010001, %rsi  # imm = 0x1000100010001
xorl %edi, %edi
cmpq %rsi, %rax
seta %dil
addq %rdx, %rdi
leaq (%rdi,%rdi,4), %rax
shlq $0x3, %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, %xmm0
punpckldq 0x620a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x6212(%rip), %xmm0     # 0x15030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cmpq $0x3e8, 0x10(%r15)      # imm = 0x3E8
movapd %xmm1, 0x10(%rsp)
movapd %xmm1, %xmm0
ja 0xee51
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xe95f
movapd %xmm0, (%rsp)
leaq 0xa0(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xeb42
movapd (%rsp), %xmm4
addsd 0x7efa(%rip), %xmm0     # 0x16d78
movapd 0x10(%rsp), %xmm3
movapd %xmm3, %xmm1
cmpltpd %xmm0, %xmm1
movapd %xmm3, %xmm2
cmpltpd %xmm4, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
testb $0x1, %al
jne 0xeeaa
minsd %xmm0, %xmm4
movapd %xmm4, %xmm3
movapd %xmm3, %xmm0
addq $0x520, %rsp            # imm = 0x520
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: ZopfliDeflate
void ZopfliDeflate(const ZopfliOptions* options, int btype, int final,
                   const unsigned char* in, size_t insize,
                   unsigned char* bp, unsigned char** out, size_t* outsize) {
 size_t offset = *outsize;
#if ZOPFLI_MASTER_BLOCK_SIZE == 0
  ZopfliDeflatePart(options, btype, final, in, 0, insize, bp, out, outsize);
#else
  size_t i = 0;
  do {
    int masterfinal = (i + ZOPFLI_MASTER_BLOCK_SIZE >= insize);
    int final2 = final && masterfinal;
    size_t size = masterfinal ? insize - i : ZOPFLI_MASTER_BLOCK_SIZE;
    ZopfliDeflatePart(options, btype, final2,
                      in, i, i + size, bp, out, outsize);
    i += size;
  } while (i < insize);
#endif
  if (options->verbose) {
    fprintf(stderr,
            "Original Size: %lu, Deflate: %lu, Compression: %f%% Removed\n",
            (unsigned long)insize, (unsigned long)(*outsize - offset),
            100.0 * (double)(insize - (*outsize - offset)) / (double)insize);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %r15
movq %rcx, 0x18(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, %r14d
movq %rdi, %r12
movq 0x68(%rsp), %rbp
movq (%rbp), %rax
movq %rax, 0x10(%rsp)
xorl %r8d, %r8d
movl $0xf4240, %r13d         # imm = 0xF4240
cmpl $0x0, 0xc(%rsp)
setne %al
leaq (%r8,%r13), %rcx
movq %r15, %rbx
subq %r8, %rbx
cmpq %r15, %rcx
cmovbq %r13, %rbx
setae %cl
andb %al, %cl
movzbl %cl, %edx
addq %r8, %rbx
subq $0x8, %rsp
movq %r12, %rdi
movl %r14d, %esi
movq 0x20(%rsp), %rcx
movq %rbx, %r9
pushq %rbp
pushq 0x70(%rsp)
pushq 0x38(%rsp)
callq 0xeebb
addq $0x20, %rsp
movq %rbx, %r8
cmpq %r15, %rbx
jb 0xfc7f
cmpl $0x0, (%r12)
jne 0xfce5
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
callq 0x3771
jmp 0xfcd6
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: CalculateBlockSymbolSizeSmall
static size_t CalculateBlockSymbolSizeSmall(const unsigned* ll_lengths,
                                            const unsigned* d_lengths,
                                            const ZopfliLZ77Store* lz77,
                                            size_t lstart, size_t lend) {
  size_t result = 0;
  size_t i;
  for (i = lstart; i < lend; i++) {
    assert(i < lz77->size);
    assert(lz77->litlens[i] < 259);
    if (lz77->dists[i] == 0) {
      result += ll_lengths[lz77->litlens[i]];
    } else {
      int ll_symbol = ZopfliGetLengthSymbol(lz77->litlens[i]);
      int d_symbol = ZopfliGetDistSymbol(lz77->dists[i]);
      result += ll_lengths[ll_symbol];
      result += d_lengths[d_symbol];
      result += ZopfliGetLengthSymbolExtraBits(ll_symbol);
      result += ZopfliGetDistSymbolExtraBits(d_symbol);
    }
  }
  result += ll_lengths[256]; /*end symbol*/
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movq %r8, 0x10(%rsp)
cmpq %r8, %rcx
jae 0xfdb9
movq %rcx, %r15
movq %rdx, %r12
xorl %r13d, %r13d
cmpq 0x10(%r12), %r15
jae 0xfdf7
movq (%r12), %rax
movzwl (%rax,%r15,2), %edi
cmpl $0x103, %edi            # imm = 0x103
jae 0xfdd8
movq 0x8(%r12), %rax
cmpw $0x0, (%rax,%r15,2)
je 0xfd9d
callq 0x14249
movl %eax, %ebp
movq 0x8(%r12), %rax
movzwl (%rax,%r15,2), %edi
callq 0x14208
movslq %ebp, %rdi
movq (%rsp), %rcx
movl (%rcx,%rdi,4), %ecx
addq %rcx, %r13
movslq %eax, %rbp
movq 0x8(%rsp), %rax
movl (%rax,%rbp,4), %ebx
callq 0x14257
movslq %eax, %r14
addq %rbx, %r14
addq %r13, %r14
movl %ebp, %edi
callq 0x14269
movslq %eax, %r13
addq %r14, %r13
jmp 0xfda9
movl %edi, %eax
movq (%rsp), %rcx
movl (%rcx,%rax,4), %eax
addq %rax, %r13
incq %r15
cmpq %r15, 0x10(%rsp)
jne 0xfd25
jmp 0xfdbc
xorl %r13d, %r13d
movq (%rsp), %rax
movl 0x400(%rax), %eax
addq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x708b(%rip), %rdi      # 0x16e6a
leaq 0x6fee(%rip), %rsi      # 0x16dd4
leaq 0x7003(%rip), %rcx      # 0x16df0
movl $0x164, %edx            # imm = 0x164
callq 0x3220
leaq 0x6fc7(%rip), %rdi      # 0x16dc5
leaq 0x6fcf(%rip), %rsi      # 0x16dd4
leaq 0x6fe4(%rip), %rcx      # 0x16df0
movl $0x163, %edx            # imm = 0x163
callq 0x3220
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: CalculateBlockSymbolSizeGivenCounts
static size_t CalculateBlockSymbolSizeGivenCounts(const size_t* ll_counts,
                                                  const size_t* d_counts,
                                                  const unsigned* ll_lengths,
                                                  const unsigned* d_lengths,
                                                  const ZopfliLZ77Store* lz77,
                                                  size_t lstart, size_t lend) {
  size_t result = 0;
  size_t i;
  if (lstart + ZOPFLI_NUM_LL * 3 > lend) {
    return CalculateBlockSymbolSizeSmall(
        ll_lengths, d_lengths, lz77, lstart, lend);
  } else {
    for (i = 0; i < 256; i++) {
      result += ll_lengths[i] * ll_counts[i];
    }
    for (i = 257; i < 286; i++) {
      result += ll_lengths[i] * ll_counts[i];
      result += ZopfliGetLengthSymbolExtraBits(i) * ll_counts[i];
    }
    for (i = 0; i < 30; i++) {
      result += d_lengths[i] * d_counts[i];
      result += ZopfliGetDistSymbolExtraBits(i) * d_counts[i];
    }
    result += ll_lengths[256]; /*end symbol*/
    return result;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq 0x40(%rsp), %rax
leaq 0x360(%r9), %rdx
cmpq %rax, %rdx
jbe 0xfe57
movq %r14, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfcf7
movq %rsi, %r15
movq %rdi, %r13
movq %rcx, (%rsp)
xorl %eax, %eax
xorl %r12d, %r12d
movl (%r14,%rax,4), %ecx
imulq (%r13,%rax,8), %rcx
addq %rcx, %r12
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0xfe66
movl $0x101, %ebp            # imm = 0x101
movl (%r14,%rbp,4), %ebx
imulq (%r13,%rbp,8), %rbx
movl %ebp, %edi
callq 0x14257
cltq
imulq (%r13,%rbp,8), %rax
addq %rax, %r12
addq %rbx, %r12
incq %rbp
cmpq $0x11e, %rbp            # imm = 0x11E
jne 0xfe83
xorl %r13d, %r13d
movq (%rsp), %rbp
movl (%rbp,%r13,4), %ebx
imulq (%r15,%r13,8), %rbx
movl %r13d, %edi
callq 0x14269
cltq
imulq (%r15,%r13,8), %rax
addq %rax, %r12
addq %rbx, %r12
incq %r13
cmpq $0x1e, %r13
jne 0xfeb5
movl 0x400(%r14), %eax
addq %rax, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/deflate.c
// Function: CalculateTreeSize
static size_t CalculateTreeSize(const unsigned* ll_lengths,
                                const unsigned* d_lengths) {
  size_t result = 0;
  int i;

  for(i = 0; i < 8; i++) {
    size_t size = EncodeTree(ll_lengths, d_lengths,
                             i & 1, i & 2, i & 4,
                             0, 0, 0);
    if (result == 0 || size < result) result = size;
  }

  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
xorl %ebp, %ebp
movq %rax, %r15
movl %ebp, %edx
andl $0x1, %edx
movl %ebp, %ecx
andl $0x2, %ecx
movl %ebp, %r8d
andl $0x4, %r8d
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0xff8c
leaq -0x1(%r15), %rcx
cmpq %rax, %rcx
cmovbq %r15, %rax
incl %ebp
cmpl $0x8, %ebp
jne 0xff46
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliCleanLZ77Store
void ZopfliCleanLZ77Store(ZopfliLZ77Store* store) {
  free(store->litlens);
  free(store->dists);
  free(store->pos);
  free(store->ll_symbol);
  free(store->d_symbol);
  free(store->ll_counts);
  free(store->d_counts);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3050
movq 0x8(%rbx), %rdi
callq 0x3050
movq 0x20(%rbx), %rdi
callq 0x3050
movq 0x28(%rbx), %rdi
callq 0x3050
movq 0x30(%rbx), %rdi
callq 0x3050
movq 0x38(%rbx), %rdi
callq 0x3050
movq 0x40(%rbx), %rdi
popq %rbx
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliAppendLZ77Store
void ZopfliAppendLZ77Store(const ZopfliLZ77Store* store,
                           ZopfliLZ77Store* target) {
  size_t i;
  for (i = 0; i < store->size; i++) {
    ZopfliStoreLitLenDist(store->litlens[i], store->dists[i],
                          store->pos[i], target);
  }
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x1196d
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%r14), %rax
movq 0x8(%r14), %rcx
movzwl (%rax,%r15,2), %edi
movzwl (%rcx,%r15,2), %esi
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdx
movq %rbx, %rcx
callq 0x1150d
incq %r15
cmpq 0x10(%r14), %r15
jb 0x1193e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliLZ77GetByteRange
size_t ZopfliLZ77GetByteRange(const ZopfliLZ77Store* lz77,
                              size_t lstart, size_t lend) {
  size_t l = lend - 1;
  if (lstart == lend) return 0;
  return lz77->pos[l] + ((lz77->dists[l] == 0) ?
      1 : lz77->litlens[l]) - lz77->pos[lstart];
}

// Assembly:
cmpq %rdx, %rsi
jne 0x11976
xorl %eax, %eax
retq
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rcx
movq -0x8(%rcx,%rdx,8), %r8
cmpw $0x0, -0x2(%rax,%rdx,2)
je 0x11995
movq (%rdi), %rax
movzwl -0x2(%rax,%rdx,2), %eax
jmp 0x1199a
movl $0x1, %eax
addq %r8, %rax
subq (%rcx,%rsi,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliLZ77GetHistogram
void ZopfliLZ77GetHistogram(const ZopfliLZ77Store* lz77,
                           size_t lstart, size_t lend,
                           size_t* ll_counts, size_t* d_counts) {
  size_t i;
  if (lstart + ZOPFLI_NUM_LL * 3 > lend) {
    memset(ll_counts, 0, sizeof(*ll_counts) * ZOPFLI_NUM_LL);
    memset(d_counts, 0, sizeof(*d_counts) * ZOPFLI_NUM_D);
    for (i = lstart; i < lend; i++) {
      ll_counts[lz77->ll_symbol[i]]++;
      if (lz77->dists[i] != 0) d_counts[lz77->d_symbol[i]]++;
    }
  } else {
    /* Subtract the cumulative histograms at the end and the start to get the
    histogram for this range. */
    ZopfliLZ77GetHistogramAt(lz77, lend - 1, ll_counts, d_counts);
    if (lstart > 0) {
      size_t ll_counts2[ZOPFLI_NUM_LL];
      size_t d_counts2[ZOPFLI_NUM_D];
      ZopfliLZ77GetHistogramAt(lz77, lstart - 1, ll_counts2, d_counts2);

      for (i = 0; i < ZOPFLI_NUM_LL; i++) {
        ll_counts[i] -= ll_counts2[i];
      }
      for (i = 0; i < ZOPFLI_NUM_D; i++) {
        d_counts[i] -= d_counts2[i];
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa00, %rsp            # imm = 0xA00
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
leaq 0x360(%rsi), %rax
cmpq %rdx, %rax
jbe 0x11a27
movl $0x900, %edx            # imm = 0x900
movq %r14, %rdi
xorl %esi, %esi
callq 0x3260
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3260
cmpq %r13, %r15
jae 0x11a85
movq 0x8(%r12), %rax
movq 0x28(%r12), %rcx
movzwl (%rcx,%r15,2), %edx
incq (%r14,%rdx,8)
cmpw $0x0, (%rax,%r15,2)
je 0x11a1d
movq 0x30(%r12), %rdx
movzwl (%rdx,%r15,2), %edx
incq (%rbx,%rdx,8)
incq %r15
cmpq %r15, %r13
jne 0x119fe
jmp 0x11a85
decq %r13
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x11a96
testq %r15, %r15
je 0x11a85
decq %r15
leaq 0x100(%rsp), %rdx
movq %rsp, %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x11a96
xorl %eax, %eax
movq 0x100(%rsp,%rax,8), %rcx
subq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0x120, %rax            # imm = 0x120
jne 0x11a5b
xorl %eax, %eax
movq (%rsp,%rax,8), %rcx
subq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x20, %rax
jne 0x11a74
addq $0xa00, %rsp            # imm = 0xA00
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliLZ77GetHistogramAt
static void ZopfliLZ77GetHistogramAt(const ZopfliLZ77Store* lz77, size_t lpos,
                                     size_t* ll_counts, size_t* d_counts) {
  /* The real histogram is created by using the histogram for this chunk, but
  all superfluous values of this chunk subtracted. */
  size_t llpos = ZOPFLI_NUM_LL * (lpos / ZOPFLI_NUM_LL);
  size_t dpos = ZOPFLI_NUM_D * (lpos / ZOPFLI_NUM_D);
  size_t i;
  for (i = 0; i < ZOPFLI_NUM_LL; i++) {
    ll_counts[i] = lz77->ll_counts[llpos + i];
  }
  for (i = lpos + 1; i < llpos + ZOPFLI_NUM_LL && i < lz77->size; i++) {
    ll_counts[lz77->ll_symbol[i]]--;
  }
  for (i = 0; i < ZOPFLI_NUM_D; i++) {
    d_counts[i] = lz77->d_counts[dpos + i];
  }
  for (i = lpos + 1; i < dpos + ZOPFLI_NUM_D && i < lz77->size; i++) {
    if (lz77->dists[i] != 0) d_counts[lz77->d_symbol[i]]--;
  }
}

// Assembly:
movq %rdx, %r8
movabsq $-0x1c71c71c71c71c71, %r11 # imm = 0xE38E38E38E38E38F
movq %rsi, %rax
mulq %r11
shrq $0x3, %rdx
andq $-0x20, %rdx
leaq (%rdx,%rdx,8), %rax
leaq (,%rax,8), %rdx
addq 0x38(%rdi), %rdx
xorl %r9d, %r9d
movq (%rdx,%r9,8), %r10
movq %r10, (%r8,%r9,8)
incq %r9
cmpq $0x120, %r9             # imm = 0x120
jne 0x11ac4
movq %rsi, %r10
andq $-0x20, %r10
leaq 0x1(%rsi), %r9
addq $0x120, %rax            # imm = 0x120
cmpq %rax, %r9
jae 0x11b2f
movq %rsi, %rax
mulq %r11
shrq $0x3, %rdx
andq $-0x20, %rdx
leaq (%rdx,%rdx,8), %rdx
movq $-0x11f, %rax           # imm = 0xFEE1
subq %rdx, %rax
movq %r9, %rdx
cmpq 0x10(%rdi), %rdx
jae 0x11b2f
movq 0x28(%rdi), %rsi
movzwl (%rsi,%rdx,2), %esi
decq (%r8,%rsi,8)
leaq (%rax,%rdx), %rsi
incq %rsi
incq %rdx
cmpq $0x1, %rsi
jne 0x11b0d
leaq (,%r10,8), %rax
addq 0x40(%rdi), %rax
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
movq %rsi, (%rcx,%rdx,8)
incq %rdx
cmpq $0x20, %rdx
jne 0x11b3d
leaq 0x20(%r10), %rax
cmpq %rax, %r9
jae 0x11b90
movq $-0x1f, %rax
subq %r10, %rax
cmpq 0x10(%rdi), %r9
jae 0x11b90
movq 0x8(%rdi), %rdx
cmpw $0x0, (%rdx,%r9,2)
je 0x11b80
movq 0x30(%rdi), %rdx
movzwl (%rdx,%r9,2), %edx
decq (%rcx,%rdx,8)
leaq (%rax,%r9), %rdx
incq %rdx
incq %r9
cmpq $0x1, %rdx
jne 0x11b61
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliInitBlockState
void ZopfliInitBlockState(const ZopfliOptions* options,
                          size_t blockstart, size_t blockend, int add_lmc,
                          ZopfliBlockState* s) {
  s->options = options;
  s->blockstart = blockstart;
  s->blockend = blockend;
#ifdef ZOPFLI_LONGEST_MATCH_CACHE
  if (add_lmc) {
    s->lmc = (ZopfliLongestMatchCache*)malloc(sizeof(ZopfliLongestMatchCache));
    ZopfliInitCache(blockend - blockstart, s->lmc);
  } else {
    s->lmc = 0;
  }
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rdi, (%r8)
movq %rsi, 0x10(%r8)
movq %rdx, 0x18(%r8)
testl %ecx, %ecx
je 0x11bcf
movq %rdx, %r14
movq %rsi, %r15
movl $0x18, %edi
callq 0x33d0
movq %rax, 0x8(%rbx)
subq %r15, %r14
movq %r14, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x126d4
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/lz77.c
// Function: ZopfliCleanBlockState
void ZopfliCleanBlockState(ZopfliBlockState* s) {
#ifdef ZOPFLI_LONGEST_MATCH_CACHE
  if (s->lmc) {
    ZopfliCleanCache(s->lmc);
    free(s->lmc);
  }
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x11bf9
callq 0x12775
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x3050
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/madler[P]pigz/zopfli/src/zopfli/cache.c
// Function: ZopfliInitCache
void ZopfliInitCache(size_t blocksize, ZopfliLongestMatchCache* lmc) {
  size_t i;
  lmc->length = (unsigned short*)malloc(sizeof(unsigned short) * blocksize);
  lmc->dist = (unsigned short*)malloc(sizeof(unsigned short) * blocksize);
  /* Rather large amount of memory. */
  lmc->sublen = (unsigned char*)malloc(ZOPFLI_CACHE_LENGTH * 3 * blocksize);
  if(lmc->sublen == NULL) {
    fprintf(stderr,
        "Error: Out of memory. Tried allocating %zu bytes of memory.\n",
        ZOPFLI_CACHE_LENGTH * 3 * blocksize);
    exit (EXIT_FAILURE);
  }

  /* length > 0 and dist 0 is invalid combination, which indicates on purpose
  that this cache value is not filled in yet. */
  for (i = 0; i < blocksize; i++) lmc->length[i] = 1;
  for (i = 0; i < blocksize; i++) lmc->dist[i] = 0;
  for (i = 0; i < ZOPFLI_CACHE_LENGTH * blocksize * 3; i++) lmc->sublen[i] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
leaq (%rdi,%rdi), %r15
movq %r15, %rdi
callq 0x33d0
movq %rax, %r13
movq %rax, (%rbx)
movq %r15, %rdi
callq 0x33d0
movq %rax, %rbp
movq %rax, 0x8(%rbx)
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %r14
movq %r14, %rdi
callq 0x33d0
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x1276d
testq %r12, %r12
je 0x12747
xorl %eax, %eax
movw $0x1, (%r13,%rax,2)
incq %rax
cmpq %rax, %r12
jne 0x1272a
movq %rbp, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x3260
testq %r14, %r14
je 0x1275e
xorl %eax, %eax
movq 0x10(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
cmpq %rax, %r14
jne 0x1274e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x38b1