LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/GECompression.cpp
// Function: GECompression::UncompressType0(unsigned char*, int&)
bool GECompression::UncompressType0(unsigned char* returnBuffer, int& fileSize)
{
	// discard bits

	unsigned long discardBits = bitsRemain & 0x7;
	GetNBits(discardBits); // discard begins

	unsigned short copyLen = GetNBits(16);
	GetNBits(16); // discarded

	for (int x = 0; x < copyLen; x++)
	{
		if (fileSize >= maxByteSize)
		{
			fileSize = 0;
			return false;
		}
		returnBuffer[fileSize] = GetNBits(8);
		fileSize++;

		if (iterationCounter > 268435455)
		{
			fileSize = 0;
			return false;
		}
		iterationCounter++;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, -0x38(%rbp)
movq %rdi, %r15
movl 0x40(%rdi), %esi
andl $0x7, %esi
callq 0x3928
movq %r15, %rdi
movl $0x10, %esi
callq 0x3928
movq %rax, %r12
movq %r15, %rdi
movl $0x10, %esi
callq 0x3928
andl $0xffff, %r12d          # imm = 0xFFFF
sete %r13b
je 0x3d46
movl %r12d, %eax
negl %eax
movq %rax, -0x30(%rbp)
movl $0x1, %r14d
cmpl $0x7fffff, (%rbx)       # imm = 0x7FFFFF
jg 0x3d40
movq %r15, %rdi
movl $0x8, %esi
callq 0x3928
movslq (%rbx), %rcx
movq -0x38(%rbp), %rdx
movb %al, (%rdx,%rcx)
incl (%rbx)
movq 0x80(%r15), %rax
cmpq $0xfffffff, %rax        # imm = 0xFFFFFFF
ja 0x3d40
incq %rax
movq %rax, 0x80(%r15)
cmpl %r12d, %r14d
setae %r13b
movq -0x30(%rbp), %rax
addl %r14d, %eax
incl %eax
movl %r14d, %ecx
incl %ecx
movl %ecx, %r14d
cmpl $0x1, %eax
jne 0x3ce7
jmp 0x3d46
movl $0x0, (%rbx)
andb $0x1, %r13b
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: put_int(int)
void put_int(int i) {
    outbuf[outcnt++] = i & 0xFF;
    outbuf[outcnt++] = (i >> 8) & 0xFF;
    outbuf[outcnt++] = (i >> 16) & 0xFF;
    outbuf[outcnt++] = (i >> 24) & 0xFF;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
movslq 0x1008e74(%rip), %rcx   # 0x100db10
leaq 0x8e6d(%rip), %rdx      # 0xdb10
movb %al, (%rcx,%rdx)
movb %ah, 0x1(%rcx,%rdx)
movl %edi, %esi
shrl $0x10, %esi
movb %sil, 0x2(%rcx,%rdx)
shrl $0x18, %eax
leal 0x4(%rcx), %esi
movl %esi, 0x1008e50(%rip)   # 0x100db10
movb %al, 0x3(%rcx,%rdx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: updcrc(char*, unsigned int)
u32 updcrc(char* bytes, u32 numBytes) {
    u32 c;

    static u32 crc = 0xffffffff;

    if (bytes == NULL) {
        c = 0xffffffff;
    } else {
        c = crc;
        if (numBytes) do {
            c = crc_32_tab[((int)c ^ (*bytes++)) & 0xff] ^ (c >> 8);
        } while (--numBytes);
    }
    crc = c;
    return c ^ 0xffffffff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x4cff
movl 0x5eaf(%rip), %eax      # 0xab84
testl %esi, %esi
je 0x4d04
movl %esi, %ecx
xorl %edx, %edx
leaq 0x5a9c(%rip), %rsi      # 0xa780
movb (%rdi,%rdx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rsi,%r8,4), %eax
incq %rdx
cmpl %edx, %ecx
jne 0x4ce4
jmp 0x4d04
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x5e7a(%rip)      # 0xab84
notl %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: read_buf(char*, unsigned int)
int read_buf(char* buf, u32 size){
    u32 len;
    
    if(incnt + size >= inbufSize) {
        len = inbufSize - incnt;
    } else {
        len = size;
    }
    
    memcpy(buf, inbuf + incnt, len);

    crc = updcrc((char*)buf, len);
    incnt += (u32)len;
    return (int)len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movslq 0x1008e05(%rip), %rax   # 0x100db24
movl 0x1008dfb(%rip), %ecx   # 0x100db20
movl %ecx, %ebx
subl %eax, %ebx
leal (%rax,%rsi), %edx
cmpl %ecx, %edx
cmovbl %esi, %ebx
addq 0x1008de0(%rip), %rax   # 0x100db18
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2140
testq %r14, %r14
je 0x4d77
movl 0x5e36(%rip), %eax      # 0xab84
testl %ebx, %ebx
je 0x4d7c
movl %ebx, %ecx
xorl %edx, %edx
leaq 0x5a23(%rip), %rsi      # 0xa780
movb (%r14,%rdx), %dil
xorb %al, %dil
movzbl %dil, %edi
shrl $0x8, %eax
xorl (%rsi,%rdi,4), %eax
incq %rdx
cmpl %edx, %ecx
jne 0x4d5d
jmp 0x4d7c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x5e02(%rip)      # 0xab84
notl %eax
movl %eax, 0x1008da6(%rip)   # 0x100db30
addl %ebx, 0x1008d94(%rip)   # 0x100db24
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: send_bits(int, int)
void send_bits(int value, int length){
    // printf("send_bits(%d, %d);\n", value, length);
    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
     * unused bits in value.
     */
    if (bi_valid > (int)Buf_size - length) {
        bi_buf |= (value << bi_valid);
        put_short(bi_buf);
        bi_buf = (u16)value >> (Buf_size - bi_valid);
        bi_valid += length - Buf_size;
    } else {
        bi_buf |= value << bi_valid;
        bi_valid += length;
    }
}

// Assembly:
movl 0x5c6e(%rip), %eax      # 0xabd8
movl $0x10, %r8d
subl %esi, %r8d
movl %edi, %edx
movl %eax, %ecx
shll %cl, %edx
orw 0x5c54(%rip), %dx       # 0xabd4
movw %dx, 0x5c4d(%rip)       # 0xabd4
cmpl %r8d, %eax
jle 0x4fc9
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movzwl %di, %edi
movb $0x10, %cl
subb %al, %cl
shrl %cl, %edi
movslq 0x1008b6f(%rip), %rcx   # 0x100db10
leaq 0x8b68(%rip), %rbx      # 0xdb10
movb %dl, (%rcx,%rbx)
leal 0x2(%rcx), %r8d
movl %r8d, 0x1008b5a(%rip)   # 0x100db10
movb %dh, 0x1(%rcx,%rbx)
movw %di, 0x5c13(%rip)       # 0xabd4
leal -0x10(%rax,%rsi), %eax
popq %rbx
popq %rbp
jmp 0x4fcb
addl %esi, %eax
movl %eax, 0x5c07(%rip)      # 0xabd8
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: bi_reverse(unsigned int, int)
u32 bi_reverse(u32 code, int len) {
    u32 res = 0;
    do {
        res |= code & 1;
        code >>= 1, res <<= 1;
    } while (--len > 0);
    return res >> 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
incl %esi
xorl %ecx, %ecx
movl %edi, %eax
andl $0x1, %eax
orl %ecx, %eax
shrl %edi
leal (%rax,%rax), %ecx
decl %esi
cmpl $0x1, %esi
jg 0x4fda
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: gen_codes(ct_data*, int)
void gen_codes (ct_data* tree, int max_code) {
    u16 next_code[MAX_BITS+1]; /* next code value for each bit length */
    u16 code = 0;              /* running code value */
    int bits;                  /* bit index */
    int n;                     /* code index */

    /* The distribution counts are first used to generate the code values
     * without bit reversal.
     */
    for (bits = 1; bits <= MAX_BITS; bits++) {
        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
    }
    /* Check that the bit counts in bl_count are consistent. The last code
     * must be all ones.
     */
    // Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1, "inconsistent bit counts");
    // Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

    for (n = 0;  n <= max_code; n++) {
        int len = tree[n].Len;
        if (len == 0) continue;
        /* Now reverse the bits */
        tree[n].Code = bi_reverse(next_code[len]++, len);
        //Tracec(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x6b7f(%rip), %rcx      # 0xbb80
xorl %edx, %edx
andl $0xfffe, %edx           # imm = 0xFFFE
movzwl (%rax,%rcx), %r8d
addl %edx, %r8d
addl %r8d, %r8d
movw %r8w, -0x1e(%rbp,%rax)
addq $0x2, %rax
movl %r8d, %edx
cmpq $0x1e, %rax
jne 0x5003
testl %esi, %esi
js 0x5074
incl %esi
xorl %eax, %eax
movzwl 0x2(%rdi,%rax,4), %ecx
testl %ecx, %ecx
je 0x506c
movl %ecx, %r8d
movzwl -0x20(%rbp,%r8,2), %edx
leal 0x1(%rdx), %r9d
movw %r9w, -0x20(%rbp,%r8,2)
incl %ecx
xorl %r8d, %r8d
movl %edx, %r9d
andl $0x1, %r9d
orl %r8d, %r9d
shrl %edx
leal (%r9,%r9), %r8d
decl %ecx
cmpl $0x1, %ecx
jg 0x5050
movw %r9w, (%rdi,%rax,4)
incq %rax
cmpq %rsi, %rax
jne 0x502f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: init_block()
void init_block() {
    int n; /* iterates over tree elements */

    /* Initialize the trees. */
    for (n = 0; n < L_CODES;  n++) dyn_ltree[n].Freq = 0;
    for (n = 0; n < D_CODES;  n++) dyn_dtree[n].Freq = 0;
    for (n = 0; n < B_CODES; n++) bl_tree[n].Freq = 0;

    dyn_ltree[END_BLOCK].Freq = 1;
    opt_len = static_len = 0;
    last_lit = last_dist = last_flags = 0;
    flags = 0; 
    flag_bit = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x5b5d(%rip), %rcx      # 0xabe0
movw $0x0, (%rax,%rcx)
addq $0x4, %rax
cmpq $0x478, %rax            # imm = 0x478
jne 0x5083
xorl %eax, %eax
leaq 0x6442(%rip), %rcx      # 0xb4e0
movw $0x0, (%rax,%rcx)
addq $0x4, %rax
cmpq $0x78, %rax
jne 0x509e
xorl %eax, %eax
leaq 0x6a29(%rip), %rcx      # 0xbae0
movw $0x0, (%rax,%rcx)
addq $0x4, %rax
cmpq $0x4c, %rax
jne 0x50b7
movw $0x1, 0x5f10(%rip)      # 0xafe0
xorl %eax, %eax
movl %eax, 0x8a1c(%rip)      # 0xdaf4
movl %eax, 0x8a12(%rip)      # 0xdaf0
movl %eax, 0x8a04(%rip)      # 0xdae8
movl %eax, 0x89fa(%rip)      # 0xdae4
movl %eax, 0x89f0(%rip)      # 0xdae0
movb $0x0, 0x89f5(%rip)      # 0xdaec
movb $0x1, 0x89ef(%rip)      # 0xdaed
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: pqdownheap(ct_data*, int)
void pqdownheap(ct_data* tree, int k){
    int v = heap[k];
    int j = k << 1;  /* left son of k */
    while (j <= heap_len) {
        /* Set j to the smallest of the two sons: */
        if (j < heap_len && smaller(tree, heap[j+1], heap[j])) j++;

        /* Exit if v is smaller than both sons */
        if (smaller(tree, v, heap[j])) break;

        /* Exchange v with the smallest son */
        heap[k] = heap[j];  k = j;

        /* And continue down the tree, setting j to the left son of k */
        j <<= 1;
    }
    heap[k] = v;
}

// Assembly:
movslq %esi, %r10
leaq 0x6a96(%rip), %rax      # 0xbba0
movl (%rax,%r10,4), %ecx
movl 0x7380(%rip), %edx      # 0xc494
addl %r10d, %r10d
cmpl %edx, %r10d
jle 0x5124
movl %esi, %r11d
jmp 0x51b5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movslq %ecx, %r8
leaq 0x7369(%rip), %r9       # 0xc4a0
cmpl %edx, %r10d
jge 0x5172
movl %r10d, %ebx
orl $0x1, %ebx
movslq %ebx, %r11
movslq (%rax,%r11,4), %r11
movslq %r10d, %r14
movslq (%rax,%r14,4), %r14
movzwl (%rdi,%r14,4), %r15d
cmpw %r15w, (%rdi,%r11,4)
jae 0x5161
movl %ebx, %r11d
jmp 0x5175
jne 0x5172
movb (%r11,%r9), %r15b
movl %r10d, %r11d
cmpb (%r14,%r9), %r15b
jbe 0x515c
jmp 0x5175
movl %r10d, %r11d
movslq %r11d, %r10
movl (%rax,%r10,4), %r10d
movslq %r10d, %rbx
movzwl (%rdi,%rbx,4), %r14d
cmpw %r14w, (%rdi,%r8,4)
jb 0x51ac
jne 0x5197
movb (%r8,%r9), %r14b
cmpb (%rbx,%r9), %r14b
jbe 0x51ac
movslq %esi, %rsi
movl %r10d, (%rax,%rsi,4)
leal (%r11,%r11), %r10d
movl %r11d, %esi
cmpl %edx, %r10d
jle 0x5137
jmp 0x51af
movl %esi, %r11d
popq %rbx
popq %r14
popq %r15
popq %rbp
movslq %r11d, %rdx
movl %ecx, (%rax,%rdx,4)
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: scan_tree(ct_data*, int)
void scan_tree (ct_data* tree, int max_code){
    int n;                     /* iterates over all tree elements */
    int prevlen = -1;          /* last emitted length */
    int curlen;                /* length of current code */
    int nextlen = tree[0].Len; /* length of next code */
    int count = 0;             /* repeat count of the current code */
    int max_count = 7;         /* max repeat count */
    int min_count = 4;         /* min repeat count */

    if (nextlen == 0) max_count = 138, min_count = 3;
    tree[max_code+1].Len = (u16)0xffff; /* guard */

    for (n = 0; n <= max_code; n++) {
        curlen = nextlen; nextlen = tree[n+1].Len;
        if (++count < max_count && curlen == nextlen) {
            continue;
        } else if (count < min_count) {
            bl_tree[curlen].Freq += count;
        } else if (curlen != 0) {
            if (curlen != prevlen) bl_tree[curlen].Freq++;
            bl_tree[REP_3_6].Freq++;
        } else if (count <= 10) {
            bl_tree[REPZ_3_10].Freq++;
        } else {
            bl_tree[REPZ_11_138].Freq++;
        }
        count = 0; prevlen = curlen;
        if (nextlen == 0) {
            max_count = 138, min_count = 3;
        } else if (curlen == nextlen) {
            max_count = 6, min_count = 3;
        } else {
            max_count = 7, min_count = 4;
        }
    }
}

// Assembly:
movzwl 0x2(%rdi), %eax
movslq %esi, %rcx
movw $0xffff, 0x6(%rdi,%rcx,4) # imm = 0xFFFF
testl %ecx, %ecx
js 0x56a9
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %r9d, %r9d
testl %eax, %eax
setne %r9b
movl $0x8a, %ecx
movl $0x7, %r10d
cmovel %ecx, %r10d
addl $0x3, %r9d
incl %esi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
leaq 0x64d7(%rip), %rdx      # 0xbae0
xorl %r14d, %r14d
movl %eax, %r8d
movzwl 0x6(%rdi,%rcx,4), %eax
leal 0x1(%r14), %r11d
cmpl %r10d, %r11d
jge 0x5627
cmpl %eax, %r8d
jne 0x5627
movl %ebx, %r8d
jmp 0x5693
cmpl %r9d, %r11d
jge 0x5636
movl %r8d, %r9d
addw %r11w, (%rdx,%r9,4)
jmp 0x5667
testl %r8d, %r8d
je 0x5651
cmpl %ebx, %r8d
je 0x5648
movl %r8d, %r9d
incw (%rdx,%r9,4)
incw 0x64d1(%rip)            # 0xbb20
jmp 0x5667
cmpl $0x9, %r14d
jg 0x5660
incw 0x64c6(%rip)            # 0xbb24
jmp 0x5667
incw 0x64c1(%rip)            # 0xbb28
xorl %r11d, %r11d
testl %eax, %eax
je 0x5687
xorl %r10d, %r10d
cmpl %eax, %r8d
sete %r10b
movl $0x4, %r9d
subl %r10d, %r9d
xorl $0x7, %r10d
jmp 0x5693
movl $0x3, %r9d
movl $0x8a, %r10d
incq %rcx
movl %r11d, %r14d
movl %r8d, %ebx
cmpq %rcx, %rsi
jne 0x560c
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: build_bl_tree()
int build_bl_tree(){
    int max_blindex;  /* index of last bit length code of non zero freq */

    /* Determine the bit length frequencies for literal and distance trees */
    scan_tree((ct_data *)dyn_ltree, l_desc.max_code);
    scan_tree((ct_data *)dyn_dtree, d_desc.max_code);

    /* Build the bit length tree: */
    build_tree_1((tree_desc *)(&bl_desc));
    /* opt_len now includes the length of the tree representations, except
     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
     */

    /* Determine the number of bit length codes to send. The pkzip format
     * requires that at least 4 bit length codes be sent. (appnote.txt says
     * 3 but the actual value used is 4.)
     */
    for (max_blindex = B_CODES-1; max_blindex >= 3; max_blindex--) {
        if (bl_tree[bl_order[max_blindex]].Len != 0) break;
    }
    /* Update opt_len to include the bit length tree and counts */
    opt_len += 3*(max_blindex+1) + 5+5+4;
    //Tracev((stderr, "\ndyn trees: dyn %lu, stat %lu", opt_len, static_len));

    return max_blindex;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4d8b(%rip), %esi      # 0xa5b4
leaq 0x53b0(%rip), %rdi      # 0xabe0
callq 0x55c0
movl 0x4da1(%rip), %esi      # 0xa5dc
leaq 0x5c9e(%rip), %rdi      # 0xb4e0
callq 0x55c0
leaq 0x4d92(%rip), %rdi      # 0xa5e0
callq 0x53a2
movl $0x13, %ecx
leaq 0x4db1(%rip), %rdx      # 0xa610
leaq 0x627a(%rip), %rsi      # 0xbae0
leal -0x1(%rcx), %eax
movzbl (%rax,%rdx), %edi
cmpw $0x0, 0x2(%rsi,%rdi,4)
jne 0x5881
decl %ecx
cmpl $0x3, %ecx
ja 0x5866
movl $0x2, %eax
leal (%rax,%rax,2), %ecx
movl 0x8266(%rip), %edx      # 0xdaf0
addl %edx, %ecx
addl $0x11, %ecx
movl %ecx, 0x825b(%rip)      # 0xdaf0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: send_all_trees(int, int, int)
void send_all_trees(int lcodes, int dcodes, int blcodes){
    int rank;                    /* index in bl_order */

    //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
    //Assert (lcodes <= _CODES && dcodes <= D_CODES && blcodes <= B_CODES, "too many codes");
    //Tracev((stderr, "\nbl counts: "));
    send_bits(lcodes-257, 5); /* not +255 as stated in appnote.txt */
    send_bits(dcodes-1,   5);
    send_bits(blcodes-4,  4); /* not -3 as stated in appnote.txt */
    for (rank = 0; rank < blcodes; rank++) {
        //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
        send_bits(bl_tree[bl_order[rank]].Len, 3);
    }

    send_tree((ct_data *)dyn_ltree, lcodes-1); /* send the literal tree */

    send_tree((ct_data *)dyn_dtree, dcodes-1); /* send the distance tree */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movl %edi, %r14d
leal -0x101(%r14), %edi
movl $0x5, %esi
callq 0x4f64
decl %ebx
movl %ebx, -0x2c(%rbp)
movl %ebx, %edi
movl $0x5, %esi
callq 0x4f64
leal -0x4(%r15), %edi
movl $0x4, %esi
callq 0x4f64
testl %r15d, %r15d
jle 0x5912
movl %r15d, %r15d
xorl %r12d, %r12d
leaq 0x4d21(%rip), %r13      # 0xa610
leaq 0x61ea(%rip), %rbx      # 0xbae0
movzbl (%r12,%r13), %eax
movzwl 0x2(%rbx,%rax,4), %edi
movl $0x3, %esi
callq 0x4f64
incq %r12
cmpq %r12, %r15
jne 0x58f6
decl %r14d
leaq 0x52c4(%rip), %rdi      # 0xabe0
movl %r14d, %esi
callq 0x56aa
leaq 0x5bb5(%rip), %rdi      # 0xb4e0
movl -0x2c(%rbp), %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x56aa
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: bi_windup()
void bi_windup()
{
    if (bi_valid > 8) {
        put_short(bi_buf);
    } else if (bi_valid > 0) {
        put_byte(bi_buf);
    }
    bi_buf = 0;
    bi_valid = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x528d(%rip), %eax      # 0xabd8
cmpl $0x9, %eax
jl 0x5979
movzwl 0x527d(%rip), %eax      # 0xabd4
movslq 0x10081b2(%rip), %rdx   # 0x100db10
leal 0x1(%rdx), %ecx
movl %ecx, 0x10081a9(%rip)   # 0x100db10
leaq 0x81a2(%rip), %rsi      # 0xdb10
movb %al, (%rdx,%rsi)
shrl $0x8, %eax
addl $0x2, %edx
jmp 0x598d
testl %eax, %eax
jle 0x59a0
movzwl 0x5250(%rip), %eax      # 0xabd4
movl 0x1008186(%rip), %ecx   # 0x100db10
leal 0x1(%rcx), %edx
movl %edx, 0x100817d(%rip)   # 0x100db10
movslq %ecx, %rcx
leaq 0x8173(%rip), %rdx      # 0xdb10
movb %al, (%rcx,%rdx)
movw $0x0, 0x522b(%rip)      # 0xabd4
movl $0x0, 0x5225(%rip)      # 0xabd8
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: copy_block(char*, unsigned int, int)
void copy_block(char* buf, u32 len, int header){
    bi_windup();              /* align on byte boundary */

    if (header) {
        put_short((u16)len);   
        put_short((u16)~len);
    }
    while (len--) {
        put_byte(*buf++);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x5941
testl %r14d, %r14d
je 0x59fd
movslq 0x1008137(%rip), %rax   # 0x100db10
leaq 0x8130(%rip), %rcx      # 0xdb10
movl %r15d, %edx
movb %dl, (%rax,%rcx)
movb %dh, 0x1(%rax,%rcx)
notl %edx
movb %dl, 0x2(%rax,%rcx)
leal 0x4(%rax), %esi
movl %esi, 0x1008117(%rip)   # 0x100db10
movb %dh, 0x3(%rax,%rcx)
testl %r15d, %r15d
je 0x5a36
movslq 0x1008107(%rip), %rax   # 0x100db10
leal 0x1(%rax), %ecx
movl %r15d, %edx
xorl %esi, %esi
leaq 0x80f8(%rip), %rdi      # 0xdb10
movb (%rbx,%rsi), %r8b
leal (%rcx,%rsi), %r9d
movl %r9d, 0x10080e9(%rip)   # 0x100db10
leaq (%rax,%rsi), %r9
movb %r8b, (%rdi,%r9)
incq %rsi
cmpl %esi, %edx
jne 0x5a18
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: fill_window()
void fill_window() {
    u32 n, m;
    u32 more = (u32)(window_size - (u32)lookahead - (u32)strstart);
    /* Amount of free space at the end of the window. */
    
    // printf("more = %d\n", more);
    
    if (strstart >= WSIZE+MAX_DIST) {
        /* By the IN assertion, the window is not empty so we can't confuse
         * more == 0 with more == 64K on a 16 bit machine.
         */
        //Assert(window_size == (u32)2*WSIZE, "no sliding with BIG_MEM");
        
        memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
        match_start -= WSIZE;
        strstart    -= WSIZE; /* we now have strstart >= MAX_DIST: */
        if (rsync_chunk_end != 0xFFFFFFFF) {
            rsync_chunk_end -= WSIZE;
        }

        block_start -= (long) WSIZE;

        for (n = 0; n < HASH_SIZE; n++) {
            m = head[n];
            head[n] = (Pos)(m >= WSIZE ? m-WSIZE : NIL);
        }
        for (n = 0; n < WSIZE; n++) {
            m = prev[n];
            prev[n] = (Pos)(m >= WSIZE ? m-WSIZE : NIL);
            /* If n is not on any hash chain, prev[n] is garbage but
             * its value will never be used.
             */
        }
        more += WSIZE;
    }
    
    n = read_buf((char*)window+strstart+lookahead, more);
    if (n == 0) { // No more input
        return;
    } else {
        lookahead += n;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x44f2(%rip), %ebx      # 0xa3e0
movl 0x4cbf(%rip), %r14d     # 0xabb4
movl 0x4cb0(%rip), %r15d     # 0xabac
subl %r14d, %ebx
subl %r15d, %ebx
cmpl $0xfefa, %r15d          # imm = 0xFEFA
jb 0x5fb8
leaq 0x1007c2a(%rip), %rdi   # 0x100db40
leaq 0x100fc23(%rip), %rsi   # 0x1015b40
movl $0x8000, %edx           # imm = 0x8000
callq 0x2140
movl $0xffff8000, %eax       # imm = 0xFFFF8000
addl %eax, 0x4c7e(%rip)      # 0xabb0
addl %eax, %r15d
movl %r15d, 0x4c70(%rip)     # 0xabac
movl 0x4c8a(%rip), %eax      # 0xabcc
cmpl $-0x1, %eax
je 0x5f52
addl $0xffff8000, %eax       # imm = 0xFFFF8000
movl %eax, 0x4c7a(%rip)      # 0xabcc
addl $0xffff8000, 0x4c44(%rip) # imm = 0xFFFF8000
xorl %ecx, %ecx
leaq 0x1017bdb(%rip), %rax   # 0x101db40
movswl 0x10000(%rax,%rcx,2), %edx
movl %edx, %esi
xorl $0xffff8000, %esi       # imm = 0xFFFF8000
sarl $0xf, %edx
andl %esi, %edx
movw %dx, 0x10000(%rax,%rcx,2)
incq %rcx
cmpq $0x8000, %rcx           # imm = 0x8000
jne 0x5f65
xorl %ecx, %ecx
movswl (%rcx,%rax), %edx
movl %edx, %esi
xorl $0xffff8000, %esi       # imm = 0xFFFF8000
sarl $0xf, %edx
andl %esi, %edx
movw %dx, (%rcx,%rax)
addq $0x2, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jne 0x5f90
addl $0x8000, %ebx           # imm = 0x8000
movl 0x4bee(%rip), %eax      # 0xabac
leaq 0x1007b7b(%rip), %rdi   # 0x100db40
addq %rax, %rdi
addq %r14, %rdi
movl %ebx, %esi
callq 0x4d0e
testl %eax, %eax
je 0x5fdc
addl %eax, 0x4bd8(%rip)      # 0xabb4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: rsync_roll(unsigned int, unsigned int)
void rsync_roll(u32 start, u32 num) {
    unsigned i;

    if (start < RSYNC_WIN) {
        /* before window fills. */
        for (i = start; i < RSYNC_WIN; i++) {
            if (i == start + num) return;
            rsync_sum += (u32)window[i];
        }
        num -= (RSYNC_WIN - start);
        start = RSYNC_WIN;
    }

    /* buffer after window full */
    for (i = start; i < start+num; i++) {
        /* New character in */
        rsync_sum += (u32)window[i];
        /* Old character out */
        rsync_sum -= (u32)window[i - RSYNC_WIN];
        if (rsync_chunk_end == 0xFFFFFFFF && RSYNC_SUM_MATCH(rsync_sum)) {
            rsync_chunk_end = i;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
movl %esi, %ecx
cmpl $0xfff, %edi            # imm = 0xFFF
ja 0x6039
movl 0x4bcb(%rip), %eax      # 0xabc8
leal (%rsi,%rdi), %ecx
movl %edi, %edx
leaq 0x1007b37(%rip), %r8    # 0x100db40
cmpq %rdx, %rcx
je 0x60b0
movzbl (%rdx,%r8), %r9d
addl %r9d, %eax
movl %eax, 0x4ba8(%rip)      # 0xabc8
incq %rdx
cmpl $0x1000, %edx           # imm = 0x1000
jne 0x6009
leal (%rsi,%rdi), %ecx
addl $0xfffff000, %ecx       # imm = 0xFFFFF000
movl $0x1000, %eax           # imm = 0x1000
addl %eax, %ecx
cmpl %ecx, %eax
jae 0x60b0
movl 0x4b87(%rip), %ecx      # 0xabcc
movl 0x4b7d(%rip), %eax      # 0xabc8
cmpl $0x1001, %edi           # imm = 0x1001
movl $0x1000, %r8d           # imm = 0x1000
movl $0x1000, %edx           # imm = 0x1000
cmovael %edi, %edx
cmpl %r8d, %edi
cmovbl %edi, %r8d
addl %r8d, %esi
addl $0xfffff000, %esi       # imm = 0xFFFFF000
leaq 0x1007aca(%rip), %rdi   # 0x100db40
movzbl (%rdx,%rdi), %r8d
addl %r8d, %eax
movzbl -0x1000(%rdx,%rdi), %r8d
subl %r8d, %eax
cmpl $-0x1, %ecx
jne 0x60a3
movl %eax, %r8d
andl $0xfff, %r8d            # imm = 0xFFF
jne 0x60a3
movl %edx, 0x4b2b(%rip)      # 0xabcc
movl %edx, %ecx
incq %rdx
decl %esi
jne 0x6076
movl %eax, 0x4b18(%rip)      # 0xabc8
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: zip()
void zip() {
    u16 deflate_flags = 0;
    
    outcnt = 0;
    incnt = 0;
    
    put_byte(GZIP_MAGIC[0]);
    put_byte(GZIP_MAGIC[1]);
    put_byte(DEFATED);
    put_byte(0); // flags
    put_int(0); // Timestamp
    
    u32 crc = updcrc(NULL, 0);
    
    bi_init();
    ct_init();
    lm_init(&deflate_flags);
    
    put_byte(deflate_flags); /* extra flags */
    put_byte(0x03); /* OS identifier, 0x03 = Unix */
    
    deflate();
    
    put_int(crc);
    put_int(incnt); // was bytes_in
    
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq -0x1a(%rbp), %r14
movw %r15w, (%r14)
movl %r15d, 0x10072ff(%rip)  # 0x100db24
movb $0x37, 0x72e4(%rip)     # 0xdb10
leaq 0x72dd(%rip), %rbx      # 0xdb10
movw $0x88b, 0x72d5(%rip)    # imm = 0x88B
movl %r15d, 0x72d0(%rip)     # 0xdb13
movl $0x8, 0x10072c3(%rip)   # 0x100db10
movb $0x0, 0x72c3(%rip)      # 0xdb17
movl $0xffffffff, 0x4326(%rip) # imm = 0xFFFFFFFF
movw %r15w, 0x436e(%rip)     # 0xabd4
movl %r15d, 0x436b(%rip)     # 0xabd8
callq 0x6473
movq %r14, %rdi
callq 0x66e4
movb (%r14), %al
movslq 0x100728c(%rip), %rcx   # 0x100db10
movb %al, (%rcx,%rbx)
leal 0x2(%rcx), %eax
movl %eax, 0x1007280(%rip)   # 0x100db10
movb $0x3, 0x1(%rcx,%rbx)
callq 0x60b2
movslq 0x100726f(%rip), %rax   # 0x100db10
movl %r15d, (%rax,%rbx)
movl 0x1007279(%rip), %ecx   # 0x100db24
movb %cl, 0x4(%rax,%rbx)
movb %ch, 0x5(%rax,%rbx)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, 0x6(%rax,%rbx)
shrl $0x18, %ecx
leal 0x8(%rax), %edx
movl %edx, 0x1007248(%rip)   # 0x100db10
movb %cl, 0x7(%rax,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]DKR-Decompressor/DKRGzip.c
// Function: dkr_gzip_compress
unsigned char* dkr_gzip_compress(unsigned char* input, int inputSize, int gzipLevel, int* outputSize) {
    if(inputSize > OUTPUT_BUFFER_SIZE) {
        printf("rare_gzip Error: Input file is too large, make sure it is under %d MiB.\n", OUTPUT_BUFFER_SIZE / 1024 / 1024);
        return NULL;
    }
    
    if(level < 4) {
        printf("rare_gzip Error: Currently only compression levels 4 to 9 are supported.\n");
        return NULL;
    }
    
    inbuf = input;
    inbufSize = inputSize;
    level = gzipLevel;
    
    zip();
    
    *outputSize = outcnt;
    return outbuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x1000001, %esi        # imm = 0x1000001
jl 0x68fc
leaq 0x9d6(%rip), %rdi       # 0x72c2
xorl %ebx, %ebx
movl $0x10, %esi
xorl %eax, %eax
callq 0x2060
jmp 0x693f
cmpl $0x3, 0x427d(%rip)      # 0xab80
jg 0x6915
leaq 0xa0e(%rip), %rdi       # 0x731a
callq 0x2260
xorl %ebx, %ebx
jmp 0x693f
movq %rcx, %rbx
movq %rdi, 0x10071f9(%rip)   # 0x100db18
movl %esi, 0x10071fb(%rip)   # 0x100db20
movl %edx, 0x4255(%rip)      # 0xab80
callq 0x6809
movl 0x10071da(%rip), %eax   # 0x100db10
movl %eax, (%rbx)
leaq 0x71d1(%rip), %rbx      # 0xdb10
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: print_test_summary
void print_test_summary(size_t tgt_tests, size_t passed, double elapsed) {
    elapsed = (elapsed / 1e3);
    if (tgt_tests == passed) {
        (void)printf(SIR_EOL SIR_WHITEB("done: ")
            SIR_GREENB("%s%zu " SIR_ULINE("libsir") " %s " SIR_EMPH("passed") " in %.03fsec!")
            SIR_EOL SIR_EOL, tgt_tests > 1 ? "all " : "", tgt_tests, TEST_S(tgt_tests), elapsed);
    } else {
        (void)printf(SIR_EOL SIR_WHITEB("done: ")
            SIR_REDB("%zu of %zu " SIR_ULINE("libsir") " %s " SIR_EMPH("failed") " in %.03fsec")
            SIR_EOL SIR_EOL, tgt_tests - passed, tgt_tests, TEST_S(tgt_tests), elapsed);
    }
}

// Assembly:
movq %rdi, %rcx
divsd 0xd874(%rip), %xmm0     # 0x11008
movq %rdi, %rdx
subq %rsi, %rdx
jne 0x37cd
cmpq $0x2, %rcx
leaq 0xd9a8(%rip), %rax      # 0x1114f
leaq 0xdb19(%rip), %rdx      # 0x112c7
cmovaeq %rax, %rdx
leaq 0xfcda(%rip), %rax      # 0x13493
leaq 0x10f8f(%rip), %r8      # 0x1474f
cmovaeq %rax, %r8
leaq 0xd91d(%rip), %rsi      # 0x110e8
jmp 0x37ea
cmpq $0x2, %rcx
leaq 0xfcbb(%rip), %rax      # 0x13493
leaq 0x10f70(%rip), %r8      # 0x1474f
cmovaeq %rax, %r8
leaq 0xd96a(%rip), %rsi      # 0x11154
movl $0x1, %edi
movb $0x1, %al
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: mark_test_to_run
bool mark_test_to_run(const char* const name, sir_test* tests, size_t num_tests) {
    bool found = false;
    for (size_t t = 0; t < num_tests; t++) {
        if (_sir_strsame(name, tests[t].name, strnlen(name, SIR_MAXTESTNAME))) {
            found = tests[t].run = true;
            break;
        }
    }
    return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
setne %bpl
je 0x38a9
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl $0x20, %esi
callq 0x3210
movq %rax, %r12
movq (%rbx), %rsi
movq %r15, %rdi
movq %rax, %rdx
callq 0x30a0
testl %eax, %eax
je 0x38a1
leaq -0x1(%r14), %rbp
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x38a7
movq 0x18(%rbx), %rsi
addq $0x18, %rbx
movq %r15, %rdi
movq %r12, %rdx
callq 0x30a0
incq %r13
testl %eax, %eax
jne 0x387b
cmpq %r14, %r13
setb %bpl
movb $0x1, 0x10(%rbx)
jmp 0x38a9
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: print_test_list
void print_test_list(const sir_test* tests, size_t num_tests) {
    static const size_t tab_size = 4;

    size_t longest = 0;
    for (size_t i = 0; i < num_tests; i++) {
        size_t len = strnlen(tests[i].name, SIR_MAXTESTNAME);
        if (len > longest)
            longest = len;
    }

    (void)printf(SIR_EOL SIR_WHITE("Available tests:") SIR_EOL SIR_EOL);

    for (size_t i = 0; i < num_tests; i++) {
        (void)printf("\t%s", tests[i].name);

        size_t len = strnlen(tests[i].name, SIR_MAXTESTNAME);
        if (len < longest + tab_size) {
            for (size_t n = len; n < longest + tab_size; n++)
                (void)printf(" ");
        }

        if ((i % 2) != 0 || i == num_tests - 1)
            (void)printf(SIR_EOL);
    }

    (void)printf(SIR_EOL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r14
testq %rsi, %rsi
je 0x38fb
xorl %ebx, %ebx
movq %r14, %r15
movq %r13, %r12
movq (%r15), %rdi
movl $0x20, %esi
callq 0x3210
cmpq %rbx, %rax
cmovaq %rax, %rbx
addq $0x18, %r15
decq %r12
jne 0x38d8
addq $0x4, %rbx
jmp 0x3900
movl $0x4, %ebx
leaq 0xd8f8(%rip), %rsi      # 0x111ff
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
testq %r13, %r13
je 0x39a0
leaq -0x1(%r13), %rax
movq %rax, (%rsp)
leaq 0x11d0d(%rip), %r12     # 0x15638
xorl %r15d, %r15d
leaq (%r15,%r15,2), %rbp
movq (%r14,%rbp,8), %rdx
movl $0x1, %edi
leaq 0xd8e5(%rip), %rsi      # 0x11227
xorl %eax, %eax
callq 0x3400
movq (%r14,%rbp,8), %rdi
movl $0x20, %esi
callq 0x3210
movq %rbx, %rbp
subq %rax, %rbp
jbe 0x3973
movl $0x1, %edi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3400
decq %rbp
jne 0x395f
testb $0x1, %r15b
sete %al
cmpq (%rsp), %r15
setne %cl
testb %al, %cl
jne 0x3998
movl $0x1, %edi
leaq 0xd935(%rip), %rsi      # 0x112c6
xorl %eax, %eax
callq 0x3400
incq %r15
cmpq %r13, %r15
jne 0x392e
leaq 0xd91f(%rip), %rsi      # 0x112c6
movl $0x1, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3400
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: print_usage_info
void print_usage_info(const sir_cl_arg* args, size_t num_args) {
    size_t longest = 0;
    for (size_t i = 0; i < num_args; i++) {
        size_t len = strnlen(args[i].flag, SIR_CL_MAXFLAG);
        if (len > longest)
            longest = len;
    }

    (void)fprintf(stderr, SIR_EOL SIR_WHITE("  Usage:") SIR_EOL SIR_EOL);

    for (size_t i = 0; i < num_args; i++) {
        (void)fprintf(stderr, "\t%s ", args[i].flag);

        size_t len = strnlen(args[i].flag, SIR_CL_MAXFLAG);
        if (len < longest)
            for (size_t n = len; n < longest; n++)
                (void)fprintf(stderr, " ");

        (void)fprintf(stderr, "%s%s%s" SIR_EOL, args[i].usage,
            strnlen(args[i].usage, SIR_CL_MAXUSAGE) > 0 ? " " : "", args[i].desc);
    }

    (void)fprintf(stderr, SIR_EOL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbp
testq %rsi, %rsi
movq %rdi, (%rsp)
je 0x3a03
xorl %r14d, %r14d
movq %rdi, %rbx
movq %rbp, %r15
movq (%rbx), %rdi
movl $0x20, %esi
callq 0x3210
cmpq %r14, %rax
cmovaq %rax, %r14
addq $0x18, %rbx
decq %r15
jne 0x39e4
jmp 0x3a06
xorl %r14d, %r14d
movq %r14, 0x10(%rsp)
movq 0x175e6(%rip), %r15     # 0x1aff8
movq (%r15), %rdi
leaq 0xd80f(%rip), %rdx      # 0x1122b
movl $0x1, %esi
xorl %eax, %eax
callq 0x3510
testq %rbp, %rbp
movq (%rsp), %r14
je 0x3ae0
leaq 0x11bfc(%rip), %r12     # 0x15638
xorl %r13d, %r13d
movq %rbp, 0x8(%rsp)
movq (%r15), %rdi
leaq (,%r13,2), %rbx
addq %r13, %rbx
movq (%r14,%rbx,8), %rcx
movl $0x1, %esi
leaq 0xd7e9(%rip), %rdx      # 0x1124b
xorl %eax, %eax
callq 0x3510
movq (%r14,%rbx,8), %rdi
movl $0x20, %esi
callq 0x3210
movq 0x10(%rsp), %rbp
subq %rax, %rbp
jbe 0x3a98
movq (%r15), %rdi
movl $0x1, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3510
decq %rbp
jne 0x3a81
movq (%rsp), %r14
leaq (%r14,%rbx,8), %rax
movq (%r15), %rdi
movq 0x8(%rax), %rcx
cmpb $0x0, (%rcx)
movq 0x10(%rax), %r9
movq %r12, %r8
leaq 0xd80f(%rip), %rax      # 0x112c7
cmoveq %rax, %r8
movl $0x1, %esi
leaq 0xd788(%rip), %rdx      # 0x11250
xorl %eax, %eax
callq 0x3510
incq %r13
movq 0x8(%rsp), %rbp
cmpq %rbp, %r13
jne 0x3a44
movq (%r15), %rdi
leaq 0xd7dc(%rip), %rdx      # 0x112c6
movl $0x1, %esi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3510
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: print_test_error
bool print_test_error(bool result, bool expected) {
    char msg[SIR_MAXERROR] = {0};
    uint16_t code          = sir_geterror(msg);
    if (SIR_E_NOERROR != code) {
        if (!expected && !result)
            TEST_MSG(SIR_RED("!! Unexpected (%" PRIu16 ", %s)"), code, msg);
        else if (expected)
            TEST_MSG(SIR_GREEN("Expected (%" PRIu16 ", %s)"), code, msg);
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movl %esi, %ebp
movl %edi, %ebx
movq %rsp, %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movq %r14, %rdi
callq 0x9a40
cmpw $0x1, %ax
sete %cl
movl %ebx, %edx
xorb $0x1, %dl
orb %bpl, %dl
xorb $0x1, %dl
orb %cl, %dl
jne 0x3b70
leaq 0xd73b(%rip), %rcx      # 0x11285
leaq 0xd707(%rip), %rsi      # 0x11258
testb %bpl, %bpl
cmovneq %rcx, %rsi
movzwl %ax, %edx
testb %bl, %bl
cmovneq %rcx, %rsi
movq %rsp, %rcx
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
movl %ebx, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: find_cl_arg
const sir_cl_arg* find_cl_arg(const char* flag, const sir_cl_arg* args, size_t num_args) {
    for (size_t n = 0; n < num_args; n++) {
        const sir_cl_arg* arg = &args[n];
        if (_sir_strsame(flag, arg->flag, strnlen(arg->flag, SIR_CL_MAXFLAG)))
            return arg;
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x3bfd
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq (%r15), %r13
movl $0x20, %esi
movq %r13, %rdi
callq 0x3210
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x30a0
testl %eax, %eax
cmoveq %r15, %r14
je 0x3c00
addq $0x18, %r15
decq %rbx
jne 0x3bce
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: wait_for_keypress
void wait_for_keypress(void) {
    (void)printf(SIR_WHITEB(SIR_EMPH("press any key to exit...")) SIR_EOL);
    char ch = '\0';
    (void)_sir_getchar(&ch);
    SIR_UNUSED(ch);
}

// Assembly:
pushq %rax
leaq 0xd461(%rip), %rsi      # 0x113a8
movl $0x1, %edi
xorl %eax, %eax
callq 0x3400
leaq 0x7(%rsp), %rdi
movb $0x0, (%rdi)
callq 0xcb1a
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: sir_readline
size_t sir_readline(FILE* f, char* buf, size_t size) {
    if (!f || !buf || 0 == size)
        return 0;

    size_t idx = 0;

    while (idx < size) {
        int ch = getc(f);
        if (EOF == ch || '\r' == ch || '\n' == ch)
            break;
        buf[idx++] = (char)ch;
    }

    return (0 == ferror(f)) ? idx : 0;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
je 0x3fe0
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorl %r12d, %r12d
movl $0x4801, %ebp           # imm = 0x4801
cmpq %r14, %r12
jae 0x4024
movq %rbx, %rdi
callq 0x3590
leal 0x1(%rax), %ecx
cmpl $0xe, %ecx
ja 0x4017
btl %ecx, %ebp
jae 0x4017
xorl %eax, %eax
jmp 0x4020
movb %al, (%r15,%r12)
incq %r12
movb $0x1, %al
testb %al, %al
jne 0x3ff9
movq %rbx, %rdi
callq 0x30e0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmoveq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: rmfile
void rmfile(const char* filename, bool leave_logs) {
    /* skip if leave_logs is true. */
    if (leave_logs) {
        TEST_MSG(SIR_WHITE("skipping deletion of '%s' (%s)"), filename, SIR_CL_LEAVELOGSFLAG);
        return;
    }

    struct stat st;
    if (0 != stat(filename, &st)) {
        /* ignore errors if the file doesn't exist. */
        if (ENOENT == errno)
            return;
        HANDLE_OS_ERROR(true, "failed to stat %s!", filename);
        return;
    }

    if (!_sir_deletefile(filename))
        HANDLE_OS_ERROR(false, "failed to delete %s!", filename);
    else
        TEST_MSG(SIR_DGRAY("deleted %s (%ld bytes)"), filename, (long)st.st_size);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x4087
leaq 0xd376(%rip), %rsi      # 0x113df
leaq 0xd313(%rip), %rcx      # 0x11383
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
jmp 0x3400
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x32e0
testl %eax, %eax
je 0x40ab
callq 0x3080
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x40c5
addq $0x90, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0xc5be
testb %al, %al
je 0x40e6
movq 0x30(%rsp), %rcx
leaq 0xd3ae(%rip), %rsi      # 0x11471
jmp 0x4070
leaq 0xd348(%rip), %rsi      # 0x11414
leaq 0xd239(%rip), %rdx      # 0x1130c
movl $0x133, %ecx            # imm = 0x133
callq 0xa444
leaq 0xd337(%rip), %rsi      # 0x1141b
jmp 0x410c
callq 0x3080
movl (%rax), %edi
leaq 0xd320(%rip), %rsi      # 0x11414
leaq 0xd211(%rip), %rdx      # 0x1130c
movl $0x138, %ecx            # imm = 0x138
callq 0xa444
leaq 0xd339(%rip), %rsi      # 0x11445
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3400
xorl %edi, %edi
xorl %esi, %esi
addq $0x90, %rsp
popq %rbx
jmp 0x3b04
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests_shared.c
// Function: enumfiles
bool enumfiles(const char* path, const char* search, bool del, unsigned* count) {
#if !defined(__WIN__)
    DIR* d = opendir(path);
    if (!d)
        return print_test_error(false, false);

    rewinddir(d);
    const struct dirent* di = readdir(d);
    if (!di) {
        (void)closedir(d);
        return print_test_error(false, false);
    }

    while (NULL != di) {
        if (strstr(di->d_name, search)) {
            if (del) {
                char filepath[SIR_MAXPATH];
                _sir_snprintf_trunc(filepath, SIR_MAXPATH, "%s%s", path, di->d_name);
                rmfile(filepath, false);
            }
            (*count)++;
        }
        di = readdir(d);
    }

    (void)closedir(d);
    d = NULL;
#else /* __WIN__ */
    WIN32_FIND_DATA finddata = {0};
    char buf[SIR_MAXPATH]    = {0};

    (void)snprintf(buf, SIR_MAXPATH, "%s/*", path);

    HANDLE enumerator = FindFirstFile(buf, &finddata);
    if (INVALID_HANDLE_VALUE == enumerator)
        return false;

    do {
        if (strstr(finddata.cFileName, search)) {
            if (del) {
                char filepath[SIR_MAXPATH];
                _sir_snprintf_trunc(filepath, SIR_MAXPATH, "%s%s", path, finddata.cFileName);
                rmfile(filepath, false);
            }
            (*count)++;
        }
    } while (FindNextFile(enumerator, &finddata) > 0);

    FindClose(enumerator);
    enumerator = NULL;
#endif
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x3150
testq %rax, %rax
je 0x41fc
movq %rax, %r12
movq %rax, %rdi
callq 0x3230
movq %r12, %rdi
callq 0x3370
testq %rax, %rax
je 0x41f4
movq %rax, %r13
addq $0x13, %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x35a0
testq %rax, %rax
je 0x41d8
testb %bpl, %bpl
je 0x41d6
movq $0x1000, 0x8(%rsp)      # imm = 0x1000
movq 0x8(%rsp), %rsi
movq %r13, (%rsp)
movl $0x1000, %ecx           # imm = 0x1000
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl $0x1, %edx
leaq 0xee96(%rip), %r8       # 0x1304f
movq %r15, %r9
xorl %eax, %eax
callq 0x3040
testl %eax, %eax
jne 0x41cc
movq 0x8(%rsp), %rax
movq %r13, %rdi
xorl %esi, %esi
callq 0x4053
incl (%rbx)
movq %r12, %rdi
callq 0x3370
movq %rax, %r13
testq %rax, %rax
jne 0x4175
movq %r12, %rdi
callq 0x3240
movb $0x1, %bl
jmp 0x4207
movq %r12, %rdi
callq 0x3240
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x3b04
movl %ebx, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests.c
// Function: sirtest_exceedmaxsize
bool sirtest_exceedmaxsize(void) {
    INIT(si, SIRL_ALL, 0, 0, 0);
    bool pass = si_init;

    char toobig[SIR_MAXMESSAGE + 100] = {0};
    (void)memset(toobig, 'a', SIR_MAXMESSAGE + 100);
    toobig[SIR_MAXMESSAGE + 99] = '\0';

    _sir_eqland(pass, sir_info("%s", toobig));

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1180, %rsp           # imm = 0x1180
leaq 0x8(%rsp), %rbx
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw $0xff, (%rbx)
movl %eax, 0xc(%rbx)
movw $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x9a31
movl %eax, %ebx
leaq 0x110(%rsp), %r14
movl $0x1064, %edx           # imm = 0x1064
movq %r14, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x1064, %edx           # imm = 0x1064
movq %r14, %rdi
movl $0x61, %esi
callq 0x31f0
movb $0x0, 0x1063(%r14)
leaq 0xcdec(%rip), %rdi      # 0x11228
movq %r14, %rsi
xorl %eax, %eax
callq 0x9b13
movl %eax, %ebp
callq 0x9a36
andb %bpl, %al
andb %bl, %al
movzbl %al, %edi
xorl %esi, %esi
callq 0x3b04
addq $0x1180, %rsp           # imm = 0x1180
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/aremmell[P]libsir/tests/tests.c
// Function: sirtest_failnooutputdest
bool sirtest_failnooutputdest(void) {
    INIT(si, 0, 0, 0, 0);
    bool pass = si_init;

    _sir_eqland(pass, !sir_notice("this goes nowhere!"));

    if (pass) {
        static const char* logfilename = MAKE_LOG_NAME("nodestination.log");
        PRINT_EXPECTED_ERROR();

        _sir_eqland(pass, sir_stdoutlevels(SIRL_INFO));
        _sir_eqland(pass, sir_info("this goes to stdout"));
        _sir_eqland(pass, sir_stdoutlevels(SIRL_NONE));

        sirfileid fid = sir_addfile(logfilename, SIRL_INFO, SIRO_DEFAULT);
        _sir_eqland(pass, 0U != fid);
        _sir_eqland(pass, sir_info("this goes to %s", logfilename));
        _sir_eqland(pass, sir_filelevels(fid, SIRL_NONE));
        _sir_eqland(pass, !sir_notice("this goes nowhere!"));

        if (0U != fid)
            _sir_eqland(pass, sir_remfile(fid));

        rmfile(logfilename, cl_cfg.leave_logs);
    }

    _sir_eqland(pass, sir_cleanup());
    return PRINT_RESULT_RETURN(pass);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0x10(%rsp), %rbx
xorl %ebp, %ebp
movl $0x108, %edx            # imm = 0x108
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31f0
movl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x4(%rbx)
movw %bp, (%rbx)
movl %eax, 0xc(%rbx)
movw %bp, 0x8(%rbx)
movq %rbx, %rdi
callq 0x9a31
movl %eax, %ebp
leaq 0xd02b(%rip), %rdi      # 0x119b5
xorl %eax, %eax
callq 0x9bd1
movl %eax, %ebx
xorb $0x1, %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x4a61
movl $0x1, %edi
movl $0x1, %esi
callq 0x3b04
movl $0x40, %edi
callq 0xa11b
movb %al, 0xf(%rsp)
leaq 0xd01b(%rip), %rdi      # 0x119e1
xorl %eax, %eax
callq 0x9b13
movl %eax, %ebx
xorl %edi, %edi
callq 0xa11b
movl %eax, %r15d
leaq 0xcfe8(%rip), %r12      # 0x119c8
movq %r12, %rdi
movl $0x40, %esi
movl $0x100000, %edx         # imm = 0x100000
callq 0xa045
movl %eax, %r14d
testl %eax, %eax
setne %bpl
leaq 0xcff3(%rip), %rdi      # 0x119f5
movq %r12, %rsi
xorl %eax, %eax
callq 0x9b13
movl %eax, %r12d
movl %r14d, %edi
xorl %esi, %esi
callq 0xa059
movl %eax, %r13d
leaq 0xcf92(%rip), %rdi      # 0x119b5
xorl %eax, %eax
callq 0x9bd1
notb %al
andb %r13b, %al
andb %r12b, %al
andb %r15b, %bpl
andb %al, %bpl
andb 0xf(%rsp), %bl
andb %bpl, %bl
testl %r14d, %r14d
je 0x4a4e
movl %r14d, %edi
callq 0xa04a
andb %al, %bl
movzbl 0x16ea3(%rip), %esi     # 0x1b8f8
leaq 0xcf6c(%rip), %rdi      # 0x119c8
callq 0x4053
callq 0x9a36
andb %bl, %al
movzbl %al, %edi
xorl %esi, %esi
callq 0x3b04
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq