LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: copymeta
local int copymeta(char *from, char *to) {
    struct stat st;
    struct timeval times[2];

    // get all of from's Unix meta data, return if not a regular file
    if (stat(from, &st) != 0 || (st.st_mode & S_IFMT) != S_IFREG)
        return -4;

    // set to's mode bits, ignore errors
    int ret = chmod(to, st.st_mode & 07777);

    // copy owner's user and group, ignore errors
    ret += chown(to, st.st_uid, st.st_gid);

    // copy access and modify times, ignore errors
    times[0].tv_sec = st.st_atime;
    times[0].tv_usec = 0;
    times[1].tv_sec = st.st_mtime;
    times[1].tv_usec = 0;
    ret += utimes(to, times);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x31b0
cmpl $0x0, %eax
jne 0xc3ca
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0xc3d6
movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC
jmp 0xc463
movq -0x18(%rbp), %rdi
movl -0x90(%rbp), %esi
andl $0xfff, %esi            # imm = 0xFFF
callq 0x3450
movl %eax, -0xd4(%rbp)
movq -0x18(%rbp), %rdi
movl -0x8c(%rbp), %esi
movl -0x88(%rbp), %edx
callq 0x3420
addl -0xd4(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq $0x0, -0xc8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x3300
addl -0xd4(%rbp), %eax
movl %eax, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: touch
local void touch(char *path, time_t t) {
    struct timeval times[2];

    times[0].tv_sec = t;
    times[0].tv_usec = 0;
    times[1].tv_sec = t;
    times[1].tv_usec = 0;
    (void)utimes(path, times);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3300
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: vmemcpy
local inline size_t vmemcpy(char **mem, size_t *size, size_t off,
                            void *cpy, size_t len) {
    size_t need;

    need = off + len;
    if (need < off)
        throw(ERANGE, "overflow");
    if (need > *size) {
        need = grow(need);
        if (off == 0) {
            RELEASE(*mem);
            *size = 0;
        }
        *mem = alloc(*mem, need);
        *size = need;
    }
    memcpy(*mem + off, cpy, len);
    return off + len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xc509
movl $0x22, %edi
leaq 0x10f1f(%rip), %rsi     # 0x1d41d
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x122d0
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jbe 0xc57f
movq -0x30(%rbp), %rdi
callq 0xc5b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xc55a
jmp 0xc52c
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xc54d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3050
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xc54f
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xac60
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x3360
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: grow
local inline size_t grow(size_t size) {
    size_t was, top;
    int shift;

    was = size;
    size += size >> 2;
    top = size;
    for (shift = 0; top > 7; shift++)
        top >>= 1;
    if (top == 7)
        size = (size_t)1 << (shift + 3);
    if (size < 16)
        size = 16;
    if (size <= was)
        size = (size_t)0 - 1;
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
shrq $0x2, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpq $0x7, -0x18(%rbp)
jbe 0xc5fc
movq -0x18(%rbp), %rax
shrq %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc5df
cmpq $0x7, -0x18(%rbp)
jne 0xc619
movl -0x1c(%rbp), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x8(%rbp)
cmpq $0x10, -0x8(%rbp)
jae 0xc628
movq $0x10, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
ja 0xc63a
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: load_wait
local void load_wait(void) {
    if (g.in_which == -1)
        return;
    possess(g.load_state);
    wait_for(g.load_state, TO_BE, 0);
    release(g.load_state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, 0x272c5(%rip)    # 0x33910
jne 0xc64f
jmp 0xc69e
movq 0x272c2(%rip), %rdi     # 0x33918
leaq 0xfbed(%rip), %rsi      # 0x1c24a
movl $0x9fd, %edx            # imm = 0x9FD
callq 0x11900
movq 0x272aa(%rip), %rdi     # 0x33918
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
leaq 0xfbcf(%rip), %rcx      # 0x1c24a
movl $0x9fe, %r8d            # imm = 0x9FE
callq 0x11a50
movq 0x2728b(%rip), %rdi     # 0x33918
leaq 0xfbb6(%rip), %rsi      # 0x1c24a
movl $0x9ff, %edx            # imm = 0x9FF
callq 0x11950
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: readn
local size_t readn(int desc, unsigned char *buf, size_t len) {
    ssize_t ret;
    size_t got;

    got = 0;
    while (len) {
        ret = read(desc, buf, len);
        if (ret < 0)
            throw(errno, "read error on %s (%s)", g.inf, strerror(errno));
        if (ret == 0)
            break;
        buf += ret;
        len -= (size_t)ret;
        got += (size_t)ret;
    }
    return got;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd034
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x32c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0xcfff
callq 0x3070
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq 0x167c6(%rip), %rax     # 0x23798
movq %rax, -0x30(%rbp)
callq 0x3070
movl (%rax), %edi
callq 0x3590
movl -0x34(%rbp), %edi
movq -0x30(%rbp), %rdx
movq %rax, %rcx
leaq 0x10272(%rip), %rsi     # 0x1d265
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x122d0
cmpq $0x0, -0x20(%rbp)
jne 0xd008
jmp 0xd034
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xcf9b
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: dos2time
local time_t dos2time(unsigned long dos) {
    struct tm tm;

    if (dos == 0)
        return time(NULL);
    tm.tm_year = ((int)(dos >> 25) & 0x7f) + 80;
    tm.tm_mon  = ((int)(dos >> 21) & 0xf) - 1;
    tm.tm_mday = (int)(dos >> 16) & 0x1f;
    tm.tm_hour = (int)(dos >> 11) & 0x1f;
    tm.tm_min  = (int)(dos >> 5) & 0x3f;
    tm.tm_sec  = (int)(dos << 1) & 0x3e;
    tm.tm_isdst = -1;           // figure out if DST or not
    return mktime(&tm);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xd2c2
xorl %eax, %eax
movl %eax, %edi
callq 0x3380
movq %rax, -0x8(%rbp)
jmp 0xd32f
movq -0x10(%rbp), %rax
shrq $0x19, %rax
andl $0x7f, %eax
addl $0x50, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
shrq $0x15, %rax
andl $0xf, %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
shrq $0x10, %rax
andl $0x1f, %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
shrq $0xb, %rax
andl $0x1f, %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
shrq $0x5, %rax
andl $0x3f, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
andl $0x3e, %eax
movl %eax, -0x48(%rbp)
movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF
leaq -0x48(%rbp), %rdi
callq 0x3400
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: crc32z
local unsigned long crc32z(unsigned long crc,
                           unsigned char const *buf, size_t len) {
    while (len > UINT_MAX && buf != NULL) {
        crc = crc32(crc, buf, UINT_MAX);
        buf += UINT_MAX;
        len -= UINT_MAX;
    }
    return crc32(crc, buf, (unsigned)len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, -0x18(%rbp)
movb %al, -0x19(%rbp)
jbe 0xdf9f
cmpq $0x0, -0x10(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xdfa8
jmp 0xdfe7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x3120
movq %rax, -0x8(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xdf84
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x3120
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: adler32z
local unsigned long adler32z(unsigned long adler,
                           unsigned char const *buf, size_t len) {
    while (len > UINT_MAX && buf != NULL) {
        adler = adler32(adler, buf, UINT_MAX);
        buf += UINT_MAX;
        len -= UINT_MAX;
    }
    return adler32(adler, buf, (unsigned)len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, -0x18(%rbp)
movb %al, -0x19(%rbp)
jbe 0xe05f
cmpq $0x0, -0x10(%rbp)
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xe068
jmp 0xe0a7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x3390
movq %rax, -0x8(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0xe044
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x3390
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: inb
local unsigned inb(void *desc, unsigned char **buf) {
    (void)desc;
    if (g.in_left == 0)
        load();
    *buf = g.in_next;
    unsigned len = g.in_left > UINT_MAX ? UINT_MAX : (unsigned)g.in_left;
    g.in_next += len;
    g.in_left -= len;
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, 0x1d7d8(%rip)     # 0x2b8b0
jne 0xe0df
callq 0xcd80
movq 0x1d7c2(%rip), %rcx     # 0x2b8a8
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, 0x1d7b7(%rip)     # 0x2b8b0
jbe 0xe105
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x18(%rbp)
jmp 0xe10f
movq 0x1d7a4(%rip), %rax     # 0x2b8b0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq 0x1d789(%rip), %rax     # 0x2b8a8
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x1d77d(%rip)     # 0x2b8a8
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq 0x1d779(%rip), %rax     # 0x2b8b0
subq %rcx, %rax
movq %rax, 0x1d76f(%rip)     # 0x2b8b0
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: adler32_comb
local unsigned long adler32_comb(unsigned long adler1, unsigned long adler2,
                                 size_t len2) {
    unsigned long sum1;
    unsigned long sum2;
    unsigned rem;

    // the derivation of this formula is left as an exercise for the reader
    rem = (unsigned)(len2 % BASE);
    sum1 = adler1 & LOW16;
    sum2 = (rem * sum1) % BASE;
    sum1 += (adler2 & LOW16) + BASE - 1;
    sum2 += ((adler1 >> 16) & LOW16) + ((adler2 >> 16) & LOW16) + BASE - rem;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
    if (sum2 >= BASE) sum2 -= BASE;
    return sum1 | (sum2 << 16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0xfff1, %ecx           # imm = 0xFFF1
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
imulq -0x20(%rbp), %rax
movl $0xfff1, %ecx           # imm = 0xFFF1
xorl %edx, %edx
divq %rcx
movq %rdx, -0x28(%rbp)
movq -0x10(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
addq $0xfff1, %rax           # imm = 0xFFF1
subq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
shrq $0x10, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movq -0x10(%rbp), %rcx
shrq $0x10, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
addq %rcx, %rax
addq $0xfff1, %rax           # imm = 0xFFF1
movl -0x2c(%rbp), %ecx
subq %rcx, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0xfff1, -0x20(%rbp)    # imm = 0xFFF1
jb 0xe1ff
movq -0x20(%rbp), %rax
subq $0xfff1, %rax           # imm = 0xFFF1
movq %rax, -0x20(%rbp)
cmpq $0xfff1, -0x20(%rbp)    # imm = 0xFFF1
jb 0xe217
movq -0x20(%rbp), %rax
subq $0xfff1, %rax           # imm = 0xFFF1
movq %rax, -0x20(%rbp)
cmpq $0x1ffe2, -0x28(%rbp)   # imm = 0x1FFE2
jb 0xe22f
movq -0x28(%rbp), %rax
subq $0x1ffe2, %rax          # imm = 0x1FFE2
movq %rax, -0x28(%rbp)
cmpq $0xfff1, -0x28(%rbp)    # imm = 0xFFF1
jb 0xe247
movq -0x28(%rbp), %rax
subq $0xfff1, %rax           # imm = 0xFFF1
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x10, %rcx
orq %rcx, %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: writen
local size_t writen(int desc, void const *buf, size_t len) {
    char const *next = buf;
    size_t left = len;

    while (left) {
        size_t const max = SSIZE_MAX;
        ssize_t ret = write(desc, next, left > max ? max : left);
        if (ret < 1)
            throw(errno, "write error on %s (%s)", g.outf, strerror(errno));
        next += ret;
        left -= (size_t)ret;
    }
    return len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xe3ab
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x28(%rbp)
jbe 0xe32a
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x50(%rbp)
jmp 0xe332
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %edi
movq -0x50(%rbp), %rdx
callq 0x3130
movq %rax, -0x38(%rbp)
cmpq $0x1, -0x38(%rbp)
jge 0xe38b
callq 0x3070
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movq 0x1544a(%rip), %rax     # 0x237a8
movq %rax, -0x58(%rbp)
callq 0x3070
movl (%rax), %edi
callq 0x3590
movl -0x5c(%rbp), %edi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
leaq 0xf05a(%rip), %rsi      # 0x1d3d9
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x122d0
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xe2e3
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: setup_jobs
local void setup_jobs(void) {
    // set up only if not already set up
    if (compress_have != NULL)
        return;

    // allocate locks and initialize lists
    compress_have = new_lock(0);
    compress_head = NULL;
    compress_tail = &compress_head;
    write_first = new_lock(-1);
    write_head = NULL;

    // initialize buffer pools (initial size for out_pool not critical, since
    // buffers will be grown in size if needed -- the initial size chosen to
    // make this unlikely, the same for lens_pool)
    new_pool(&in_pool, g.block, INBUFS(g.procs));
    new_pool(&out_pool, OUTPOOL(g.block), -1);
    new_pool(&dict_pool, DICT, -1);
    new_pool(&lens_pool, g.block >> (RSYNCBITS - 1), -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0x35174(%rip)     # 0x439b0
je 0xe843
jmp 0xe91f
xorl %eax, %eax
movl %eax, %edi
leaq 0xd9fc(%rip), %rsi      # 0x1c24a
movl $0x64a, %edx            # imm = 0x64A
callq 0x116a0
movq %rax, 0x35151(%rip)     # 0x439b0
movq $0x0, 0x35156(%rip) # 0x439c0
leaq 0x3514f(%rip), %rax     # 0x439c0
movq %rax, 0x35140(%rip)     # 0x439b8
movq $-0x1, %rdi
leaq 0xd9c4(%rip), %rsi      # 0x1c24a
movl $0x64d, %edx            # imm = 0x64D
callq 0x116a0
movq %rax, 0x35131(%rip)     # 0x439c8
movq $0x0, 0x3512e(%rip) # 0x439d0
movq 0x14f8f(%rip), %rsi     # 0x23838
movl 0x14f81(%rip), %edx     # 0x23830
shll %edx
addl $0x3, %edx
leaq 0x350ad(%rip), %rdi     # 0x43968
callq 0x10260
movq 0x14f71(%rip), %rsi     # 0x23838
movq 0x14f6a(%rip), %rax     # 0x23838
shrq $0x4, %rax
addq %rax, %rsi
addq $0x8000, %rsi           # imm = 0x8000
leaq 0x350f5(%rip), %rdi     # 0x439d8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10260
leaq 0x35094(%rip), %rdi     # 0x43988
movl $0x8000, %esi           # imm = 0x8000
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10260
movq 0x14f2e(%rip), %rsi     # 0x23838
shrq $0xb, %rsi
leaq 0x350e3(%rip), %rdi     # 0x439f8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x10260
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xcfd0(%rip), %rsi      # 0x1c24a
movl $0x5f0, %edx            # imm = 0x5F0
callq 0x11900
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x11be0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf29d
jmp 0xf2bc
leaq 0xe651(%rip), %rdi      # 0x1d8f5
leaq 0xcf9f(%rip), %rsi      # 0x1c24a
movl $0x5f2, %edx            # imm = 0x5F2
leaq 0xe647(%rip), %rcx      # 0x1d8fe
callq 0x3220
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
movl $0x1, %edx
leaq 0xcf76(%rip), %rcx      # 0x1c24a
movl $0x5f3, %r8d            # imm = 0x5F3
callq 0x119a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x10178
jmp 0x10257
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xc0c4(%rip), %rsi      # 0x1c24a
movl $0x5fd, %edx            # imm = 0x5FD
callq 0x11900
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x11be0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x101a9
jmp 0x101c8
leaq 0xd745(%rip), %rdi      # 0x1d8f5
leaq 0xc093(%rip), %rsi      # 0x1c24a
movl $0x5ff, %edx            # imm = 0x5FF
leaq 0xd807(%rip), %rcx      # 0x1d9ca
callq 0x3220
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
movq $-0x1, %rdx
leaq 0xc068(%rip), %rcx      # 0x1c24a
movl $0x600, %r8d            # imm = 0x600
callq 0x119a0
cmpq $0x1, -0x10(%rbp)
jne 0x10257
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0xc03c(%rip), %rsi      # 0x1c24a
movl $0x603, %edx            # imm = 0x603
callq 0x11900
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
movl $0x1, %edx
leaq 0xbffe(%rip), %rcx      # 0x1c24a
movl $0x606, %r8d            # imm = 0x606
callq 0x119a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: new_pool
local void new_pool(struct pool *pool, size_t size, int limit) {
    pool->have = new_lock(0);
    pool->head = NULL;
    pool->size = size;
    pool->limit = limit;
    pool->made = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0xbfcc(%rip), %rsi      # 0x1c24a
movl $0x5b2, %edx            # imm = 0x5B2
callq 0x116a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x111f0
xorl %eax, %eax
movl %eax, %edi
callq 0x3380
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x3060
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x50, 0x14(%rax)
jl 0x11214
movq -0x18(%rbp), %rax
cmpl $0xcf, 0x14(%rax)
jle 0x11221
movq $0x0, -0x8(%rbp)
jmp 0x112a7
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
subl $0x50, %eax
cltq
shlq $0x19, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
cltq
shlq $0x15, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rax
shlq $0x10, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rax
shlq $0xb, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq 0x4(%rax), %rax
shlq $0x5, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
cltq
shrq %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xc5b0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x11302
movl $0x22, %edi
leaq 0xc126(%rip), %rsi      # 0x1d41d
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0x122d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xac60
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1137b
movq -0x10(%rbp), %rdi
callq 0x112c0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
addq 0x18(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jae 0x113a7
movq -0x20(%rbp), %rax
movl %eax, -0x24(%rbp)
jmp 0x113b1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x113b1
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3240
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x11343
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x113fc
jmp 0x1141b
leaq 0xc57e(%rip), %rdi      # 0x1d981
leaq 0xae40(%rip), %rsi      # 0x1c24a
movl $0x691, %edx            # imm = 0x691
leaq 0xc57f(%rip), %rcx      # 0x1d995
callq 0x3220
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/pigz.c
// Function: finish_jobs
local void finish_jobs(void) {
    struct job job;
    int caught;

    // only do this once
    if (compress_have == NULL)
        return;

    // command all of the extant compress threads to return
    possess(compress_have);
    job.seq = -1;
    job.next = NULL;
    compress_head = &job;
    compress_tail = &(job.next);
    twist(compress_have, BY, +1);       // will wake them all up

    // join all of the compress threads, verify they all came back
    caught = join_all();
    Trace(("-- joined %d compress threads", caught));
    assert(caught == cthreads);
    cthreads = 0;

    // free the resources
    caught = free_pool(&lens_pool);
    Trace(("-- freed %d block lengths buffers", caught));
    caught = free_pool(&dict_pool);
    Trace(("-- freed %d dictionary buffers", caught));
    caught = free_pool(&out_pool);
    Trace(("-- freed %d output buffers", caught));
    caught = free_pool(&in_pool);
    Trace(("-- freed %d input buffers", caught));
    free_lock(write_first);
    free_lock(compress_have);
    compress_have = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
cmpq $0x0, 0x32570(%rip)     # 0x439b0
jne 0x11447
jmp 0x1156d
movq 0x32562(%rip), %rdi     # 0x439b0
leaq 0xadf5(%rip), %rsi      # 0x1c24a
movl $0x664, %edx            # imm = 0x664
callq 0x11900
movq $-0x1, -0x40(%rbp)
movq $0x0, -0x8(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, 0x32546(%rip)     # 0x439c0
leaq -0x40(%rbp), %rax
addq $0x38, %rax
movq %rax, 0x3252f(%rip)     # 0x439b8
movq 0x32520(%rip), %rdi     # 0x439b0
movl $0x1, %esi
movl $0x1, %edx
leaq 0xada9(%rip), %rcx      # 0x1c24a
movl $0x669, %r8d            # imm = 0x669
callq 0x119a0
leaq 0xad97(%rip), %rdi      # 0x1c24a
movl $0x66c, %esi            # imm = 0x66C
callq 0x11fc0
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl 0x324df(%rip), %eax     # 0x439a8
jne 0x114cd
jmp 0x114ec
leaq 0xc54f(%rip), %rdi      # 0x1da23
leaq 0xad6f(%rip), %rsi      # 0x1c24a
movl $0x66e, %edx            # imm = 0x66E
leaq 0xc54f(%rip), %rcx      # 0x1da36
callq 0x3220
movl $0x0, 0x324b2(%rip)     # 0x439a8
leaq 0x324fb(%rip), %rdi     # 0x439f8
callq 0x11580
movl %eax, -0x44(%rbp)
leaq 0x3247c(%rip), %rdi     # 0x43988
callq 0x11580
movl %eax, -0x44(%rbp)
leaq 0x324bd(%rip), %rdi     # 0x439d8
callq 0x11580
movl %eax, -0x44(%rbp)
leaq 0x3243e(%rip), %rdi     # 0x43968
callq 0x11580
movl %eax, -0x44(%rbp)
movq 0x3248f(%rip), %rdi     # 0x439c8
leaq 0xad0a(%rip), %rsi      # 0x1c24a
movl $0x67a, %edx            # imm = 0x67A
callq 0x11c00
movq 0x3245f(%rip), %rdi     # 0x439b0
leaq 0xacf2(%rip), %rsi      # 0x1c24a
movl $0x67b, %edx            # imm = 0x67B
callq 0x11c00
movq $0x0, 0x32443(%rip) # 0x439b0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xacb0(%rip), %rsi      # 0x1c24a
movl $0x610, %edx            # imm = 0x610
callq 0x11900
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x11606
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3050
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0xac62(%rip), %rsi      # 0x1c24a
movl $0x615, %edx            # imm = 0x615
callq 0x11c00
movq -0x18(%rbp), %rdi
callq 0x3050
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x115ab
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x11614
jmp 0x11633
leaq 0xc432(%rip), %rdi      # 0x1da4d
leaq 0xac28(%rip), %rsi      # 0x1c24a
movl $0x619, %edx            # imm = 0x619
leaq 0xc433(%rip), %rcx      # 0x1da61
callq 0x3220
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xac09(%rip), %rsi      # 0x1c24a
movl $0x61a, %edx            # imm = 0x61A
callq 0x11950
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq 0xabf1(%rip), %rsi      # 0x1c24a
movl $0x61b, %edx            # imm = 0x61B
callq 0x11c00
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x60, %edi
callq 0x11740
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x35c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x116f7
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xc433(%rip), %rcx      # 0x1db25
callq 0x11790
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x33a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x11728
movl -0x24(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xc40d(%rip), %rcx      # 0x1db30
callq 0x11790
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/yarn.c
// Function: my_malloc
local void *my_malloc(size_t size, char const *file, long line) {
    void *block;

    if ((block = my_malloc_f(size)) == NULL)
        fail(ENOMEM, file, line, "malloc");
    return block;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x11ffd(%rip), %rax     # 0x23758
movq -0x8(%rbp), %rdi
callq *%rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x11784
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0xc, %edi
leaq 0xc456(%rip), %rcx      # 0x1dbd5
callq 0x11790
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq 0x1184a(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
movq 0x11f98(%rip), %rdx     # 0x23750
leaq 0xb97c(%rip), %rsi      # 0x1d13b
xorl %eax, %eax
callq 0x3340
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x22, %eax
ja 0x1189c
movq -0x28(%rbp), %rax
leaq 0xc29f(%rip), %rcx      # 0x1da84
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x11803(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3dd(%rip), %rdi      # 0x1dbdc
callq 0x3230
jmp 0x118b7
movq 0x117e8(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3d3(%rip), %rdi      # 0x1dbed
callq 0x3230
jmp 0x118b7
movq 0x117cd(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3c7(%rip), %rdi      # 0x1dbfc
callq 0x3230
jmp 0x118b7
movq 0x117b5(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc4f2(%rip), %rdi      # 0x1dd3f
callq 0x3230
jmp 0x118b7
movq 0x1179d(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3a9(%rip), %rdi      # 0x1dc0e
callq 0x3230
jmp 0x118b7
movq 0x11785(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3af(%rip), %rdi      # 0x1dc2c
callq 0x3230
jmp 0x118b7
movq 0x1176d(%rip), %rax     # 0x22ff8
movq (%rax), %rsi
leaq 0xc3a7(%rip), %rdi      # 0x1dc3c
callq 0x3230
jmp 0x118b7
movq 0x11755(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
movl -0x4(%rbp), %edx
leaq 0xc3a1(%rip), %rsi      # 0x1dc51
movb $0x0, %al
callq 0x3340
movq 0x1173a(%rip), %rax     # 0x22ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq 0xc38f(%rip), %rsi      # 0x1dc63
movb $0x0, %al
callq 0x3340
cmpq $0x0, 0x3215d(%rip)     # 0x43a40
je 0x118f1
movq 0x32154(%rip), %rax     # 0x43a40
movl -0x4(%rbp), %edi
callq *%rax
movl -0x4(%rbp), %edi
callq 0x3540
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x119cf
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0x119e7
cmpl $0x1, -0xc(%rbp)
jne 0x119e5
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x58(%rax), %rcx
movq %rcx, 0x58(%rax)
jmp 0x119e7
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x30c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x11a14
movl -0x2c(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0xc143(%rip), %rcx      # 0x1db52
callq 0x11790
movq -0x8(%rbp), %rdi
callq 0x33c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x11a3d
movl -0x2c(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq 0xc10d(%rip), %rcx      # 0x1db45
callq 0x11790
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x11c1d
jmp 0x11c80
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0x34e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x11c4a
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xbf26(%rip), %rcx      # 0x1db6b
callq 0x11790
movq -0x8(%rbp), %rdi
callq 0x31e0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x11c73
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xbf0a(%rip), %rcx      # 0x1db78
callq 0x11790
movq 0x11ae6(%rip), %rax     # 0x23760
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x2d2(%rip), %rax       # 0x12100
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x35b0
movl %eax, -0x94(%rbp)
movslq -0x94(%rbp), %rax
cmpq $0x0, %rax
je 0x11e77
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rdi
callq *%rax
leaq -0x80(%rbp), %rdi
callq 0x3440
leaq -0x80(%rbp), %rdi
callq 0x3570
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
jmp 0x11e93
jmp 0x11e95
leaq -0x80(%rbp), %rdi
callq 0x31f0
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rdi
callq *%rax
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3580
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x11f04
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0xbcb9(%rip), %rcx      # 0x1dbb8
callq 0x11790
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x31b35(%rip), %rdi     # 0x43a48
callq 0x11900
leaq 0x31b89(%rip), %rax     # 0x43aa8
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x11f4e
movq -0x30(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x11f40
jmp 0x11f4e
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
jmp 0x11f23
cmpq $0x0, -0x30(%rbp)
jne 0x11f6e
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl $0x3, %edi
leaq 0xbc54(%rip), %rcx      # 0x1dbbd
callq 0x11790
movq -0x30(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x11f8a
movq 0x31b21(%rip), %rax     # 0x43aa0
addq $-0x1, %rax
movq %rax, 0x31b16(%rip)     # 0x43aa0
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x31aa0(%rip), %rdi     # 0x43a48
callq 0x11950
movq 0x117ac(%rip), %rax     # 0x23760
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x31a62(%rip), %rdi     # 0x43a48
callq 0x11900
cmpq $0x0, 0x31ab5(%rip)     # 0x43aa8
je 0x120d8
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x31a40(%rip), %rdi     # 0x43a48
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x11a50
leaq 0x31a8b(%rip), %rax     # 0x43aa8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1204c
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x1203e
jmp 0x1204c
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x12021
cmpq $0x0, -0x28(%rbp)
jne 0x1206c
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0xbb60(%rip), %rcx      # 0x1dbc7
callq 0x11790
movq -0x28(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3580
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1209c
movl -0x2c(%rbp), %edi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0xbb21(%rip), %rcx      # 0x1dbb8
callq 0x11790
movq 0x319fd(%rip), %rax     # 0x43aa0
addq $-0x1, %rax
movq %rax, 0x319f2(%rip)     # 0x43aa0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x1169c(%rip), %rax     # 0x23760
movq -0x28(%rbp), %rdi
callq *%rax
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x11feb
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x31961(%rip), %rdi     # 0x43a48
callq 0x11950
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
callq 0x34d0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x31914(%rip), %rdi     # 0x43a48
callq 0x11900
leaq 0x31968(%rip), %rax     # 0x43aa8
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1217a
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x34b0
cmpl $0x0, %eax
je 0x1216c
jmp 0x1217a
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
jmp 0x12144
cmpq $0x0, -0x28(%rbp)
jne 0x121a2
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movl $0x3, %edi
leaq 0xbad4(%rip), %rcx      # 0x1dc71
callq 0x11790
movq -0x28(%rbp), %rax
movl $0x1, 0x8(%rax)
movq 0x318f4(%rip), %rax     # 0x43aa8
cmpq -0x28(%rbp), %rax
je 0x121e3
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x318d8(%rip), %rcx     # 0x43aa8
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, 0x318c5(%rip)     # 0x43aa8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %r8
leaq 0x3184e(%rip), %rdi     # 0x43a48
movl $0x1, %esi
movl $0x1, %edx
callq 0x119a0
movq 0x11550(%rip), %rax     # 0x23760
movq -0x10(%rbp), %rdi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)