LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw32
static void
bmw32(sph_bmw_small_context *sc, const void *data, size_t len)
{
	unsigned char *buf;
	size_t ptr;
	sph_u32 htmp[16];
	sph_u32 *h1, *h2;
#if !SPH_64
	sph_u32 tmp;
#endif

#if SPH_64
	sc->bit_count += (sph_u64)len << 3;
#else
	tmp = sc->bit_count_low;
	sc->bit_count_low = SPH_T32(tmp + ((sph_u32)len << 3));
	if (sc->bit_count_low < tmp)
		sc->bit_count_high ++;
	sc->bit_count_high += len >> 29;
#endif
	buf = sc->buf;
	ptr = sc->ptr;
	h1 = sc->H;
	h2 = htmp;
	while (len > 0) {
		size_t clen;

		clen = (sizeof sc->buf) - ptr;
		if (clen > len)
			clen = len;
		memcpy(buf + ptr, data, clen);
		data = (const unsigned char *)data + clen;
		len -= clen;
		ptr += clen;
		if (ptr == sizeof sc->buf) {
			sph_u32 *ht;

			compress_small(buf, h1, h2);
			ht = h1;
			h1 = h2;
			h2 = ht;
			ptr = 0;
		}
	}
	sc->ptr = ptr;
	if (h1 != sc->H)
		memcpy(sc->H, h1, sizeof sc->H);
}

// Assembly:
leaq (,%rdx,8), %rax
addq %rax, 0x88(%rdi)
testq %rdx, %rdx
je 0x11184
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x48(%rdi), %r13
movq 0x40(%rdi), %r12
leaq -0x90(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %r13, -0x40(%rbp)
movq %r13, -0x30(%rbp)
movq %rdi, -0x48(%rbp)
movl $0x40, %r14d
subq %r12, %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
movq %rdi, %r13
addq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10b0
addq %r14, %r12
cmpq $0x40, %r12
jne 0x11136
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0x117b8
xorl %r12d, %r12d
movq -0x30(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq %r13, -0x30(%rbp)
jmp 0x1113a
movq -0x30(%rbp), %r13
addq %r14, %r15
subq %r14, %rbx
movq -0x48(%rbp), %rdi
jne 0x110e8
movq %r12, 0x40(%rdi)
movq -0x40(%rbp), %rcx
cmpq %rcx, %r13
je 0x11176
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups 0x30(%r13), %xmm3
movups %xmm3, 0x30(%rcx)
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw32_close
static void
bmw32_close(sph_bmw_small_context *sc, unsigned ub, unsigned n,
	void *dst, size_t out_size_w32)
{
	unsigned char *buf, *out;
	size_t ptr, u, v;
	unsigned z;
	sph_u32 h1[16], h2[16], *h;

	buf = sc->buf;
	ptr = sc->ptr;
	z = 0x80 >> n;
	buf[ptr ++] = ((ub & -z) | z) & 0xFF;
	h = sc->H;
	if (ptr > (sizeof sc->buf) - 8) {
		memset(buf + ptr, 0, (sizeof sc->buf) - ptr);
		compress_small(buf, h, h1);
		ptr = 0;
		h = h1;
	}
	memset(buf + ptr, 0, (sizeof sc->buf) - 8 - ptr);
#if SPH_64
	sph_enc64le_aligned(buf + (sizeof sc->buf) - 8,
		SPH_T64(sc->bit_count + n));
#else
	sph_enc32le_aligned(buf + (sizeof sc->buf) - 8,
		sc->bit_count_low + n);
	sph_enc32le_aligned(buf + (sizeof sc->buf) - 4,
		SPH_T32(sc->bit_count_high));
#endif
	compress_small(buf, h, h2);
	for (u = 0; u < 16; u ++)
		sph_enc32le_aligned(buf + 4 * u, h2[u]);
	compress_small(buf, final_s, h1);
	out = dst;
	for (u = 0, v = 16 - out_size_w32; u < out_size_w32; u ++, v ++)
		sph_enc32le(out + 4 * u, h1[v]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %rbx
movq %rcx, -0x30(%rbp)
movl %edx, %r12d
movq %rdi, %r15
movq 0x40(%rdi), %rax
movl $0x80, %edx
movl %r12d, %ecx
shrl %cl, %edx
movl %edx, %ecx
negl %ecx
andl %esi, %ecx
orl %edx, %ecx
leaq 0x1(%rax), %rdi
movb %cl, (%r15,%rax)
leaq 0x48(%r15), %r13
cmpq $0x39, %rdi
jb 0x112a6
addq %r15, %rdi
movl $0x3f, %edx
subq %rax, %rdx
xorl %esi, %esi
callq 0x1080
leaq -0x70(%rbp), %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x117b8
xorl %edi, %edi
movq %r14, %r13
leaq (%r15,%rdi), %rax
movl $0x38, %edx
subq %rdi, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1080
movl %r12d, %eax
addq 0x88(%r15), %rax
movq %rax, 0x38(%r15)
leaq -0xb0(%rbp), %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x117b8
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movaps 0x20(%r14), %xmm2
movaps 0x30(%r14), %xmm3
movups %xmm3, 0x30(%r15)
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
leaq 0x12fb4(%rip), %rsi     # 0x242c0
leaq -0x70(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x117b8
testq %rbx, %rbx
je 0x1133a
shlq $0x2, %rbx
subq %rbx, %r12
addq $0x40, %r12
movq -0x30(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10b0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw64
static void
bmw64(sph_bmw_big_context *sc, const void *data, size_t len)
{
	unsigned char *buf;
	size_t ptr;
	sph_u64 htmp[16];
	sph_u64 *h1, *h2;

	sc->bit_count += (sph_u64)len << 3;
	buf = sc->buf;
	ptr = sc->ptr;
	h1 = sc->H;
	h2 = htmp;
	while (len > 0) {
		size_t clen;

		clen = (sizeof sc->buf) - ptr;
		if (clen > len)
			clen = len;
		memcpy(buf + ptr, data, clen);
		data = (const unsigned char *)data + clen;
		len -= clen;
		ptr += clen;
		if (ptr == sizeof sc->buf) {
			sph_u64 *ht;

			compress_big(buf, h1, h2);
			ht = h1;
			h1 = h2;
			h2 = ht;
			ptr = 0;
		}
	}
	sc->ptr = ptr;
	if (h1 != sc->H)
		memcpy(sc->H, h1, sizeof sc->H);
}

// Assembly:
leaq (,%rdx,8), %rax
addq %rax, 0x108(%rdi)
testq %rdx, %rdx
je 0x11560
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r13
leaq 0x88(%rdi), %rax
movq 0x80(%rdi), %r12
leaq -0xd0(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movq %rdi, -0x48(%rbp)
movl $0x80, %r14d
subq %r12, %r14
cmpq %rbx, %r14
cmovaeq %rbx, %r14
leaq (%r12,%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10b0
addq %r14, %r12
movl $0x80, %eax
cmpq %rax, %r12
jne 0x11527
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0x12f73
xorl %r12d, %r12d
movq %r13, %rsi
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %r13, -0x30(%rbp)
jmp 0x1152b
movq -0x30(%rbp), %rsi
addq %r14, %r15
subq %r14, %rbx
movq -0x48(%rbp), %r13
jne 0x114d4
movq %r12, 0x80(%r13)
movq -0x40(%rbp), %rdi
cmpq %rdi, %rsi
je 0x1154f
movl $0x10, %ecx
rep  movsq (%rsi), %es:(%rdi)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw64_close
static void
bmw64_close(sph_bmw_big_context *sc, unsigned ub, unsigned n,
	void *dst, size_t out_size_w64)
{
	unsigned char *buf, *out;
	size_t ptr, u, v;
	unsigned z;
	sph_u64 h1[16], h2[16], *h;

	buf = sc->buf;
	ptr = sc->ptr;
	z = 0x80 >> n;
	buf[ptr ++] = ((ub & -z) | z) & 0xFF;
	h = sc->H;
	if (ptr > (sizeof sc->buf) - 8) {
		memset(buf + ptr, 0, (sizeof sc->buf) - ptr);
		compress_big(buf, h, h1);
		ptr = 0;
		h = h1;
	}
	memset(buf + ptr, 0, (sizeof sc->buf) - 8 - ptr);
	sph_enc64le_aligned(buf + (sizeof sc->buf) - 8,
		SPH_T64(sc->bit_count + n));
	compress_big(buf, h, h2);
	for (u = 0; u < 16; u ++)
		sph_enc64le_aligned(buf + 8 * u, h2[u]);
	compress_big(buf, final_b, h1);
	out = dst;
	for (u = 0, v = 16 - out_size_w64; u < out_size_w64; u ++, v ++)
		sph_enc64le(out + 8 * u, h1[v]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rcx, -0x30(%rbp)
movl %edx, %r12d
movq %rdi, %r15
movq 0x80(%rdi), %rax
movl $0x80, %edx
movl %r12d, %ecx
shrl %cl, %edx
movl %edx, %ecx
negl %ecx
andl %esi, %ecx
orl %edx, %ecx
leaq 0x1(%rax), %rdi
movb %cl, (%r15,%rax)
leaq 0x88(%r15), %r13
cmpq $0x79, %rdi
jb 0x11665
addq %r15, %rdi
movl $0x7f, %edx
subq %rax, %rdx
xorl %esi, %esi
callq 0x1080
leaq -0xb0(%rbp), %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x12f73
xorl %edi, %edi
movq %r14, %r13
leaq (%r15,%rdi), %rax
movl $0x78, %edx
subq %rdi, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x1080
movl %r12d, %eax
addq 0x108(%r15), %rax
movq %rax, 0x78(%r15)
leaq -0x130(%rbp), %r14
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x12f73
movl $0x10, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x12c4d(%rip), %rsi     # 0x24300
leaq -0xb0(%rbp), %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x12f73
testq %rbx, %rbx
je 0x116e4
shlq $0x3, %rbx
subq %rbx, %r12
subq $-0x80, %r12
movq -0x30(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10b0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/aes-core.c
// Function: aesc_keyexp
void aesc_keyexp(const uint8_t key[], uint8_t key_sched[])
{
	uint8_t key_sched_0, key_sched_1, key_sched_2, key_sched_3, tmp;
	
	unsigned int i;
	
	block_copy(key_sched, key);
	
	for (i = 16; i < 176; i += 4) {		
		key_sched_0 = key_sched[i - 4];
		key_sched_1 = key_sched[i - 3];
		key_sched_2 = key_sched[i - 2];
		key_sched_3 = key_sched[i - 1];
		
		if (!(i & 0x0f)) {
			tmp = key_sched_0;
			key_sched_0 = sbox(key_sched_1) ^ rcon(i >> 4);
			key_sched_1 = sbox(key_sched_2);
			key_sched_2 = sbox(key_sched_3);
			key_sched_3 = sbox(tmp);
		}
		
		key_sched[i] = key_sched[i - 16] ^ key_sched_0;
		key_sched[i + 1] = key_sched[i - 15] ^ key_sched_1;
		key_sched[i + 2] = key_sched[i - 14] ^ key_sched_2;
		key_sched[i + 3] = key_sched[i - 13] ^ key_sched_3;
	}
}

// Assembly:
pushq %rbx
vmovups (%rdi), %xmm0
vmovups %xmm0, (%rsi)
movb 0xc(%rsi), %dil
movl $0xc, %edx
leaq 0x1e3b(%rip), %rax      # 0x3020
leaq 0x1f34(%rip), %rcx      # 0x3120
leaq 0x4(%rdx), %r8
movb 0x1(%rsi,%rdx), %r11b
movb 0x2(%rsi,%rdx), %r10b
movb 0x3(%rsi,%rdx), %r9b
testb $0xc, %r8b
jne 0x1231
movzbl %r11b, %r11d
movzbl %r10b, %r10d
movq %r8, %rbx
shrq $0x4, %rbx
movzbl %dil, %edi
movb (%rbx,%rcx), %bl
movzbl %r9b, %r9d
xorb (%r11,%rax), %bl
movb (%r10,%rax), %r11b
movb (%r9,%rax), %r10b
movb (%rdi,%rax), %r9b
movl %ebx, %edi
xorb -0xc(%rsi,%rdx), %dil
movb %dil, 0x4(%rsi,%rdx)
xorb -0xb(%rsi,%rdx), %r11b
movb %r11b, 0x5(%rsi,%rdx)
xorb -0xa(%rsi,%rdx), %r10b
movb %r10b, 0x6(%rsi,%rdx)
xorb -0x9(%rsi,%rdx), %r9b
movb %r9b, 0x7(%rsi,%rdx)
movq %r8, %rdx
cmpq $0xac, %r8
jb 0x11ec
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/encrypt.c
// Function: gf128_mul7
static void gf128_mul2(block_t res, const block_t x)
{
	int msb = x[0] & 0x80;
	shl_block(res, x);
	if (msb) {
		res[15] ^= 0x87;
	}
}

// Assembly:
movb (%rsi), %al
vmovd %eax, %xmm0
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%rsi), %xmm1 {%k1} {z}
vpbroadcastb %xmm0, %xmm0
vpalignr $0xf, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
vpaddw %xmm0, %xmm0, %xmm0
vpsrlw $0x7, %xmm1, %xmm1
vpbroadcastd 0x1496(%rip), %xmm2 # 0x3830
vpternlogd $0xb8, %xmm0, %xmm2, %xmm1
vmovdqu8 %xmm1, -0x18(%rsp) {%k1}
movb 0xf(%rsi), %cl
addb %cl, %cl
movzbl %cl, %edx
xorb $-0x79, %cl
testb %al, %al
movzbl %cl, %eax
cmovnsl %edx, %eax
movb %al, -0x9(%rsp)
movb -0x18(%rsp), %cl
vmovd %ecx, %xmm0
vpbroadcastb %xmm0, %xmm0
vmovdqu8 -0x17(%rsp), %xmm1 {%k1} {z}
vpalignr $0xf, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
vpaddw %xmm0, %xmm0, %xmm0
vpsrlw $0x7, %xmm1, %xmm1
vpternlogd $0xb8, %xmm0, %xmm2, %xmm1
vmovdqu8 %xmm1, -0x28(%rsp) {%k1}
addb %al, %al
movzbl %al, %edx
xorb $-0x79, %al
testb %cl, %cl
movzbl %al, %eax
cmovnsl %edx, %eax
vmovaps -0x18(%rsp), %xmm0
movb %al, -0x19(%rsp)
vxorps -0x28(%rsp), %xmm0, %xmm0
vmovaps %xmm0, -0x28(%rsp)
xorl %eax, %eax
movb (%rsi,%rax), %cl
xorb -0x28(%rsp,%rax), %cl
movb %cl, (%rdi,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x2423
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/wrapper.c
// Function: wrapper_destroy
void wrapper_destroy(wrapper* w) {
    if (w == NULL)
        return;

    switch (w->type) {
        case LZ78_ALGORITHM:
            lz78_destroy(w->data);
            break;

        default:
            return;
    }
    free(w);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x16f7
movq %rdi, %rbx
cmpb $0x1, (%rdi)
jne 0x16f7
movq 0x8(%rbx), %rdi
callq 0x2142
movq %rbx, %rdi
popq %rbx
jmp 0x1030
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: dictionary_update
void dictionary_update(dictionary* d, uint32_t code) {
    uint32_t d_size = d->d_size - 1;
    uint32_t d_next = d->d_next;
    uint32_t d_min = d->d_min;
    uint32_t i = d_size;
    uint32_t p = code;

    /* Recover original sequence */
    while (1) {
        d->bytebuf[i--] = d->root[p].label;
        if (p < DICT_SIZE_MIN || i == 0)
            break;
        p = d->root[p].parent;
    }

    /* Fill last char with the first char of the sequence */
    if (code >= d_min && code == d_next - 1)
        d->bytebuf[d_size] = d->bytebuf[i + 1];

    /* Update last incomplete entry of the dictionary */
    if (d_next > d_min)
        d->root[d_next - 1].label = d->bytebuf[i + 1];

    /* Update */
    d->n_bytes = d_size - i;
    d->offset = d_size + 1 - d->n_bytes;
    d->root[d_next].parent = code;
    ++(d->d_next);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %ecx
leal -0x1(%rcx), %r9d
movl 0x14(%rdi), %eax
movl 0x10(%rdi), %r8d
movq (%rdi), %rdx
movl %esi, %ebx
movb 0x4(%rdx,%rbx,8), %r10b
cmpl $0x104, %esi            # imm = 0x104
setb %r11b
movl %ecx, %r14d
addl $-0x2, %r14d
movb %r10b, 0x20(%rdi,%r9)
sete %bpl
orb %r11b, %bpl
movq %r9, %r11
movl %r9d, %ebp
jne 0x1b3e
movl %r14d, %r14d
decq %r14
movl (%rdx,%rbx,8), %ebx
leaq -0x1(%r14), %r11
movb 0x4(%rdx,%rbx,8), %r10b
movb %r10b, 0x21(%rdi,%r14)
cmpq $0x104, %rbx            # imm = 0x104
jb 0x1b37
movl %r14d, %r15d
movq %r11, %r14
testq %r15, %r15
jne 0x1b12
addq $0x2, %r11
movl %r11d, %ebp
leal -0x1(%rax), %ebx
cmpl %esi, %r8d
ja 0x1b4f
cmpl %esi, %ebx
jne 0x1b4f
movb %r10b, 0x20(%rdi,%r9)
cmpl %r8d, %eax
jbe 0x1b63
movsbl 0x20(%rdi,%r11), %r8d
movl %ebx, %r9d
movw %r8w, 0x4(%rdx,%r9,8)
subl %ebp, %ecx
movl %ecx, 0x18(%rdi)
movl %ebp, 0x1c(%rdi)
movl %esi, (%rdx,%rax,8)
incl %eax
movl %eax, 0x14(%rdi)
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: compress_byte
void compress_byte(lz78_c* o, int c_in) {
    /* Optimization pointers */
    ht_dictionary* d_main = o->main;
    ht_dictionary* d_sec = o->secondary;

    switch(d_main->cur_node) {
    case DICT_CODE_START:
            o->bitbuf = d_main->d_size;
            o->n_bits = bitlen(DICT_SIZE_MAX);
            d_main->cur_node = -1;
            break;
    case DICT_CODE_EOF:
            o->bitbuf = d_main->cur_node;
            o->n_bits = bitlen(d_main->d_next);
            d_main->cur_node = DICT_CODE_STOP;
            return;
        case DICT_CODE_STOP:
            o->completed = 1;
            return;
    default:
            break;
    }

    c_in = c_in == EOF ? DICT_CODE_EOF : c_in;
    /* Dictonaries update */
    if (ht_dictionary_update(d_main, c_in) != 0) {
        if (d_main->d_next >= d_main->d_thr)
            ht_dictionary_update(d_sec, c_in);
        return;
    }

    o->bitbuf = d_main->prev_node;
    o->n_bits = bitlen(d_main->d_next - 1);

    /* Dictonaries swap */
    if (d_main->d_next == d_main->d_size) {
        o->main = o->secondary;
        o->secondary = d_main;
        d_main = d_sec;
        d_sec = o->secondary;
        d_main->cur_node = c_in;
        ht_dictionary_reset(d_sec);
    }
    /* Update of secondary if threshold is reached */
    if (d_main->d_next >= d_main->d_thr)
        ht_dictionary_update(d_sec, c_in);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rbx
movl 0x8(%rbx), %eax
cmpl $0x100, %eax            # imm = 0x100
je 0x1c21
cmpl $0x103, %eax            # imm = 0x103
je 0x1c18
movq 0x10(%r15), %r14
cmpl $0x102, %eax            # imm = 0x102
jne 0x1be5
movl 0x10(%rbx), %eax
movl %eax, 0x18(%r15)
movl $0x15, 0x1c(%r15)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
cmpl $-0x1, %esi
movl $0x100, %r12d           # imm = 0x100
cmovnel %esi, %r12d
movzwl %r12w, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1940
testl %eax, %eax
je 0x1c47
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jb 0x1cab
movq %r14, %rdi
jmp 0x1cb7
movb $0x1, (%r15)
jmp 0x1cab
movl $0x100, 0x18(%r15)      # imm = 0x100
movl 0x18(%rbx), %eax
bsrl %eax, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
testl %eax, %eax
cmovel %eax, %ecx
movl %ecx, 0x1c(%r15)
movl $0x103, 0x8(%rbx)       # imm = 0x103
jmp 0x1cab
movl 0xc(%rbx), %eax
movl %eax, 0x18(%r15)
movl 0x18(%rbx), %edx
leal -0x1(%rdx), %eax
bsrl %eax, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
testl %eax, %eax
cmovel %eax, %ecx
movl %ecx, 0x1c(%r15)
cmpl 0x10(%rbx), %edx
jne 0x1ca0
movq 0x10(%r15), %rax
movq %rax, 0x8(%r15)
movq %rbx, 0x10(%r15)
movl %r12d, 0x8(%r14)
movq (%rbx), %rdi
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x1070
movl $0x104, 0x18(%rbx)      # imm = 0x104
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movl 0x18(%r14), %edx
movq %r14, %rax
jmp 0x1ca6
movq %rbx, %rax
movq %r14, %rbx
cmpl 0x14(%rax), %edx
jae 0x1cb4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1940
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: lz78_new
lz78_instance* lz78_new(uint8_t cmode, uint32_t dsize) {
    lz78_instance* i;
    lz78_c* c;
    lz78_d* d;

    int max_dim = (sizeof(lz78_c) > sizeof(lz78_d)) ? sizeof(lz78_c) : sizeof(lz78_d);
    i = malloc(sizeof(lz78_instance) + max_dim);
    if (i == NULL)
        return NULL;
    i->mode = cmode;

    switch (cmode) {
        case LZ78_MODE_COMPRESS:
            c = (lz78_c*)&i->state; 
            dsize = (dsize == 0) ? DICT_SIZE_DEFAULT : dsize;
            c->d_size = DICT_LIMIT(dsize);
            c->completed = 0;
            c->main = ht_dictionary_new(c->d_size);
            if (c->main == NULL) {
                free(i);
                return NULL;
            }
            c->secondary = ht_dictionary_new(c->d_size);
            if (c->secondary == NULL) {
                ht_dictionary_destroy(c->main);
                free(i);
                return NULL;
            }
            c->bitbuf = DICT_CODE_START;
            c->n_bits = bitlen(DICT_SIZE_MIN);
            c->main->cur_node = DICT_CODE_START;
            return i;

        case LZ78_MODE_DECOMPRESS:
            d = (lz78_d*)&i->state; 
            d->completed = 0;
            d->main = dictionary_new(DICT_SIZE_MIN);
            if (d->main == NULL) {
                free(i);
                return NULL;
            }
            return i;

        default:
            return NULL;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x21, %edi
callq 0x10f0
testq %rax, %rax
je 0x1eec
movq %rax, %rbx
movb %r14b, (%rax)
cmpb $0x1, %r14b
je 0x1ec3
movzbl %r14b, %eax
testl %eax, %eax
jne 0x1eec
movl $0x100000, %eax         # imm = 0x100000
cmpl %eax, %ebp
cmovbl %ebp, %eax
cmpl $0x106, %eax            # imm = 0x106
movl $0x105, %ecx            # imm = 0x105
cmovael %eax, %ecx
testl %ebp, %ebp
movl $0x1000, %ebp           # imm = 0x1000
cmovnel %ecx, %ebp
movl %ebp, 0x5(%rbx)
movb $0x0, 0x1(%rbx)
movl %ebp, %edi
callq 0x18bf
movq %rax, 0x9(%rbx)
testq %rax, %rax
je 0x1ee4
movq %rax, %r14
movl %ebp, %edi
callq 0x18bf
movq %rax, 0x11(%rbx)
testq %rax, %rax
je 0x1edc
movabsq $0x900000102, %rax      # imm = 0x900000102
movq %rax, 0x19(%rbx)
movl $0x102, 0x8(%r14)       # imm = 0x102
jmp 0x1eee
movb $0x0, 0x1(%rbx)
movl $0x104, %edi            # imm = 0x104
callq 0x1a25
movq %rax, 0x9(%rbx)
testq %rax, %rax
jne 0x1eee
jmp 0x1ee4
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: lz78_compress
uint8_t lz78_compress(lz78_instance* lz78, int fd_in, int fd_out) {
    FILE* in;
    bit_file* out;
    lz78_c* o;
    int bits;
    int c_in;

    if (lz78 == NULL)
        return LZ78_ERROR_INITIALIZATION;

    if (lz78->mode != LZ78_MODE_COMPRESS)
        return LZ78_ERROR_MODE;

    in = fdopen(fd_in, "r");
    if (in == NULL)
        return LZ78_ERROR_READ;

    out = bit_open(fd_out, ACCESS_WRITE, B_SIZE_DEFAULT);
    if (out == NULL)
        return LZ78_ERROR_WRITE;

    o = (lz78_c*)&lz78->state;

    for (;;) {

        if (o->n_bits > 0) {
            bits = bit_write(out, (char*) &o->bitbuf, o->n_bits, 0);
            if (bits == -1)
                return LZ78_ERROR_WRITE;

            o->bitbuf >>= bits;
            o->n_bits -= bits;

            if (o->n_bits > 0)
                return LZ78_ERROR_EAGAIN;
        }

        c_in = fgetc(in);
        if (c_in == EOF) {
            if (errno == EAGAIN) {
                errno = 0;
                return LZ78_ERROR_EAGAIN;
            } else if (errno != 0) {
                return LZ78_ERROR_READ;
            }
        }

        compress_byte(o, c_in);
        if (o->completed == 1) {
            bit_close(out);
            return LZ78_SUCCESS;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1fc1
movq %rdi, %r14
movb $0x8, %bl
cmpb $0x0, (%rdi)
jne 0x1fc3
movl %edx, %ebp
leaq 0x1476(%rip), %rax      # 0x3397
movl %esi, %edi
movq %rax, %rsi
callq 0x1110
movb $0x2, %bl
testq %rax, %rax
je 0x1fc3
movq %rax, %r15
movl %ebp, %edi
movl $0xa41, %esi            # imm = 0xA41
movl $0x100000, %edx         # imm = 0x100000
callq 0x218e
testq %rax, %rax
je 0x1fd4
movq %rax, %r12
leaq 0x1(%r14), %r13
leaq 0x19(%r14), %rbp
movl 0x1d(%r14), %edx
testl %edx, %edx
je 0x1f84
movq %r12, %rdi
movq %rbp, %rsi
xorl %ecx, %ecx
callq 0x23f5
cmpl $-0x1, %eax
je 0x1fd4
movl %eax, %ecx
shrl %cl, 0x19(%r14)
subl %eax, 0x1d(%r14)
jne 0x1fe3
movq %r15, %rdi
callq 0x1080
cmpl $-0x1, %eax
jne 0x1fa4
callq 0x1040
movq %rax, %rcx
movl (%rax), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %edx, %edx
jne 0x1fd8
movq %r13, %rdi
movl %eax, %esi
callq 0x1ba4
cmpb $0x1, (%r13)
jne 0x1f5e
movq %r12, %rdi
callq 0x2635
xorl %ebx, %ebx
jmp 0x1fc3
movb $0x7, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x3, %bl
jmp 0x1fc3
cmpl $0xb, %edx
jne 0x1fc3
movl $0x0, (%rcx)
movb $0x4, %bl
jmp 0x1fc3
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: lz78_destroy
void lz78_destroy(lz78_instance *lz78) {
    lz78_c *c;
    lz78_d *d;
    if (lz78 != NULL) {
        switch (lz78->mode) {
            case LZ78_MODE_COMPRESS:
                c = (lz78_c*)&lz78->state;
                if (c != NULL) {
                    ht_dictionary_destroy(c->main);
                    ht_dictionary_destroy(c->secondary);
                }
                break;

            case LZ78_MODE_DECOMPRESS:
                d = (lz78_d*)&lz78->state;
                if (d != NULL) {
                    dictionary_destroy(d->main);
                    ht_dictionary_destroy(d->secondary);
                }
                break;
        }

        free(lz78);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x2167
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
cmpl $0x1, %eax
je 0x2168
testl %eax, %eax
jne 0x217f
movq 0x9(%rbx), %rdi
testq %rdi, %rdi
je 0x2171
callq 0x1030
jmp 0x2171
retq
movq 0x9(%rbx), %rdi
callq 0x1b89
movq 0x11(%rbx), %rdi
testq %rdi, %rdi
je 0x217f
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/bitio.c
// Function: bit_open
bit_file* bit_open(int fd, int mode, UINTMAX_T buff_size) {

    bit_file* bfp;
    int ret;

    if (mode != ACCESS_READ && mode != ACCESS_WRITE)
        return NULL;
    
    if (mode == ACCESS_READ)
        ret = read(fd, NULL, 0);
    else /* mode == ACCESS_WRITE */
        ret = write(fd, NULL, 0);

    if(ret != 0)
        return NULL;

    if (buff_size % 8 != 0)
        return NULL;

    buff_size = (buff_size > max_index()) ? max_index() : buff_size;

    /* Buffer allocation */
    bfp = (bit_file*) calloc(1, sizeof(bit_file) + buff_size / 8);
    if (bfp == NULL) {
        close(fd);
    } else {
        bfp->fd = fd;
        bfp->mode = mode;
        bfp->buff_size = buff_size;
        /* bfp->w_start and bfp->w_len are initialized by calloc */
    }

    return bfp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebp
movl %edi, %ebx
cmpl $0xa41, %esi            # imm = 0xA41
je 0x21b9
cmpl $0x800, %ebp            # imm = 0x800
jne 0x220d
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10a0
jmp 0x21c4
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1050
movq %rax, %rcx
xorl %eax, %eax
testb $0x7, %r14b
jne 0x220f
movl %ecx, %ecx
testq %rcx, %rcx
jne 0x220f
movl $0x1fffffff, %r15d      # imm = 0x1FFFFFFF
cmpl %r15d, %r14d
cmovbl %r14d, %r15d
movl %r15d, %esi
shrl $0x3, %esi
addl $0x14, %esi
movl $0x1, %edi
callq 0x10b0
testq %rax, %rax
je 0x2206
movl %ebx, (%rax)
movl %ebp, 0x4(%rax)
movl %r15d, 0x8(%rax)
jmp 0x220f
movl %ebx, %edi
callq 0x1090
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/bitio.c
// Function: bit_flush
int bit_flush(bit_file* bfp) {
    UINTMAX_T count;
    UINTMAX_T written;
    UINTMAX_T n;
    uint8_t* base;

    if (bfp == NULL)
        return -1;

    count = bfp->w_len / 8;
    written = 0;
    base = (uint8_t*) bfp->buff + bfp->w_start / 8;

    while (count > 0) {
        n = write(bfp->fd, base, count);
        if (n == -1) {
            if (errno == EAGAIN) {
                errno = 0;
                break;
            } else {
                return -1;
            }
        }
        base += n;
        written += n;
        count -= n;
    }

    bfp->w_start = (bfp->w_start + written * 8) % bfp->buff_size;
    bfp->w_len -= written * 8;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x262a
movq %rdi, %rbx
movl 0x10(%rdi), %r12d
xorl %r15d, %r15d
cmpl $0x8, %r12d
jb 0x2612
movl 0xc(%rbx), %eax
shrl $0x3, %eax
leaq (%rbx,%rax), %r14
addq $0x14, %r14
shrl $0x3, %r12d
xorl %r15d, %r15d
movl (%rbx), %edi
movl %r12d, %edx
movq %r14, %rsi
callq 0x1050
cmpl $-0x1, %eax
je 0x2602
movl %eax, %ecx
addq %rcx, %r14
addl %eax, %r15d
subl %eax, %r12d
jne 0x25e1
jmp 0x2612
callq 0x1040
cmpl $0xb, (%rax)
jne 0x262a
movl $0x0, (%rax)
shll $0x3, %r15d
movl 0xc(%rbx), %eax
addl %r15d, %eax
xorl %edx, %edx
divl 0x8(%rbx)
movl %edx, 0xc(%rbx)
subl %r15d, 0x10(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ijleesw[P]data-compression/src/lz78/bitio.c
// Function: bit_close
int bit_close(bit_file* bfp) {
    int fd;

    if (bfp == NULL)
        return -1;

    fd = bfp->fd;

    if (bfp->w_len % 8)
        bfp->w_len += 8 - (bfp->w_len % 8);

    bit_flush(bfp);
    free(bfp);
    close(fd);
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x2675
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ebx
movl 0x10(%rdi), %eax
testb $0x7, %al
je 0x2654
andl $-0x8, %eax
addl $0x8, %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x25aa
movq %r14, %rdi
callq 0x1030
movl %ebx, %edi
callq 0x1090
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/pushbits/../../spipe/pushbits.c
// Function: pushbits
int
pushbits(int in, int out, pthread_t * thr)
{
	struct push * P;
	int rc;

	/* Allocate structure. */
	if ((P = malloc(sizeof(struct push))) == NULL)
		goto err0;
	P->in = in;
	P->out = out;

	/* Create thread. */
	if ((rc = pthread_create_blocking_np(thr, NULL, workthread, P)) != 0) {
		warn0("pthread_create_blocking_np: %s", strerror(rc));
		goto err1;
	}

	/* Success! */
	return (0);

err1:
	free(P);
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movl %esi, %ebp
movl %edi, %r12d
movl $0x2008, %edi           # imm = 0x2008
callq 0x21e0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x35d1
movq %rax, %rbx
movl %r12d, 0x2000(%rax)
movl %ebp, 0x2004(%rax)
leaq 0x51(%rip), %rdx        # 0x35dd
xorl %r14d, %r14d
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x414c
testl %eax, %eax
je 0x35d1
movl %eax, %edi
callq 0x22b0
leaq 0x1c54(%rip), %rdi      # 0x5202
movq %rax, %rsi
xorl %eax, %eax
callq 0x4027
callq 0x2080
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x2030
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/pushbits/../../spipe/pushbits.c
// Function: workthread
static void *
workthread(void * cookie)
{
	struct push * P = cookie;
	ssize_t readlen;

	/* Set up cleanup function. */
	pthread_cleanup_push(workthread_cleanup, P);

	/* Infinite loop unless we hit EOF or an error. */
	do {
		/* Read data and die on error. */
		if ((readlen = read(P->in, P->buf, BUFSIZ)) == -1) {
			if (errno == EINTR)
				continue;
			warnp("Error reading");
			exit(1);
		}

		/* If we hit EOF, exit the loop. */
		if (readlen == 0)
			break;

		/* Write the data back out. */
		if (noeintr_write(P->out, &P->buf, (size_t)readlen)
		    != readlen) {
			warnp("Error writing");
			exit(1);
		}
	} while (1);

	/* Clean up. */
	pthread_cleanup_pop(1);

	/* We're done. */
	return (NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x22c0
testl %eax, %eax
jne 0x3671
movq %rsp, %rdi
callq 0x2280
movl $0x2000, %r14d          # imm = 0x2000
movl 0x2000(%rbx), %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2170
cmpq $-0x1, %rax
je 0x363c
movq %rax, %r15
testq %rax, %rax
je 0x3655
movq %r15, %rdx
movl 0x2004(%rbx), %edi
movq %rbx, %rsi
callq 0x3dc8
cmpq %r15, %rax
je 0x3605
jmp 0x3681
callq 0x2080
movl (%rax), %ecx
cmpl $0x4, %ecx
je 0x3605
testl %ecx, %ecx
jne 0x369b
leaq 0x1bce(%rip), %rdi      # 0x5221
jmp 0x3692
movq %rsp, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x36c8
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x36c8
movq %rsp, %rdi
callq 0x2200
callq 0x2080
cmpl $0x0, (%rax)
jne 0x36a7
leaq 0x1b9d(%rip), %rdi      # 0x522f
xorl %eax, %eax
callq 0x4027
jmp 0x36be
movq %rax, %rbx
leaq 0x1b7c(%rip), %rdi      # 0x5221
jmp 0x36b1
movq %rax, %rbx
leaq 0x1b7e(%rip), %rdi      # 0x522f
xorl %eax, %eax
callq 0x3f08
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]spiped/tests/pushbits/../../spipe/pushbits.c
// Function: workthread_cleanup
static void
workthread_cleanup(void * cookie)
{
	struct push * P = cookie;

	/*
	 * Try to shut down the descriptor we're writing to.  Ignore ENOTSOCK,
	 * since it might, indeed, not be a socket.
	 */
	if (shutdown(P->out, SHUT_WR)) {
		if (errno != ENOTSOCK) {
			warnp("Error shutting down socket");
			exit(1);
		}
	}

	/* Free our parameters. */
	free(P);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2004(%rdi), %edi
movl $0x1, %esi
callq 0x20d0
testl %eax, %eax
je 0x36f2
callq 0x2080
movq %rax, %r14
movl (%rax), %eax
cmpl $0x58, %eax
jne 0x3701
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
leaq 0x1b35(%rip), %rdi      # 0x523d
testl %eax, %eax
jne 0x3715
xorl %eax, %eax
callq 0x4027
jmp 0x3723
xorl %eax, %eax
callq 0x3f08
movl $0x0, (%r14)
movl $0x1, %edi
callq 0x2260
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_11/getop.c
// Function: getop
int getop(char s[])
{
  int i = 0, c;
  static int buf = EOF;

  while ((s[0] = c = getchar()) == ' ' || c == '\t')
    ;

  s[1] = '\0';

  if (!isdigit(c) && c != '.' && c != '-')
  {
    return c;
  }

  if (c == '-')
  {
    int next = getchar();
    if (!isdigit(next) && next != '.')
    {
      return next;
    }

    s[i] = c;
    c = next = buf;
  }
  else
  {
    c = getchar();
  }

  if (isdigit(c))
  {
    while (isdigit(s[++i] = c = getchar()))
      ;
  }

  if (c == '.')
  {
    while (isdigit(s[++i] = c = getchar()))
      ;
  }

  if (c != EOF)
  {
    buf = c;
  }

  return NUMBER;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1060
movl %eax, %r15d
movb %r15b, (%rbx)
cmpb $0x20, %r15b
sete %al
cmpl $0x9, %r15d
sete %cl
orb %al, %cl
jne 0x14ec
movb $0x0, 0x1(%rbx)
callq 0x1070
movq %rax, %r14
leal -0x2f(%r15), %eax
cmpl $-0x3, %eax
ja 0x1537
movq (%r14), %rax
movslq %r15d, %rcx
movzwl (%rax,%rcx,2), %ecx
movl %r15d, %eax
andl $0x800, %ecx            # imm = 0x800
je 0x15e2
callq 0x1060
cmpl $0x2d, %r15d
jne 0x1566
cmpl $0x2e, %eax
je 0x155d
movq (%r14), %rcx
movslq %eax, %rdx
movzwl (%rcx,%rdx,2), %ecx
andl $0x800, %ecx            # imm = 0x800
je 0x15e2
movb %r15b, (%rbx)
movl 0x2aea(%rip), %eax      # 0x4050
movq (%r14), %rcx
movslq %eax, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0x1578
xorl %r15d, %r15d
jmp 0x15aa
leaq 0x1(%rbx), %r12
xorl %r15d, %r15d
movabsq $0x100000000, %r13      # imm = 0x100000000
addq %r13, %r15
movq (%r14), %rbp
callq 0x1060
movb %al, (%r12)
movsbq %al, %rcx
incq %r12
testb $0x8, 0x1(%rbp,%rcx,2)
jne 0x1589
sarq $0x20, %r15
movl %eax, %ecx
cmpl $0x2e, %eax
jne 0x15d2
addq %r15, %rbx
incq %rbx
movq (%r14), %r15
callq 0x1060
movl %eax, %ecx
movb %cl, (%rbx)
movsbq %cl, %rax
incq %rbx
testb $0x8, 0x1(%r15,%rax,2)
jne 0x15b7
movl $0x30, %eax
cmpl $-0x1, %ecx
je 0x15e2
movl %ecx, 0x2a6e(%rip)      # 0x4050
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/bench/bulk_insert/main.c
// Function: sendbatch
static int
sendbatch(struct bulkinsert_state * C)
{

	while (C->Nip < 4096) {
		/* Try to read a key-value pair. */
		if (fread(C->key->buf, 40, 1, C->f) < 1)
			break;
		if (fread(C->val->buf, 40, 1, C->f) < 1)
			break;

		/* Send the request. */
		if (proto_kvlds_request_set(C->Q, C->key, C->val,
		    callback_done, C))
			goto err0;
		C->Nip += 1;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
cmpq $0xfff, 0x10(%rdi)      # imm = 0xFFF
ja 0x27e8
movq %rdi, %r14
leaq 0x7a(%rip), %r15        # 0x27f0
movq 0x8(%r14), %rcx
movq 0x40(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20b0
testq %rax, %rax
je 0x27e8
movq 0x8(%r14), %rcx
movq 0x48(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20b0
testq %rax, %rax
je 0x27e8
movq (%r14), %rdi
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x555d
testl %eax, %eax
jne 0x27e3
movq 0x10(%r14), %rax
incq %rax
movq %rax, 0x10(%r14)
cmpq $0x1000, %rax           # imm = 0x1000
jb 0x2776
jmp 0x27e8
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/bench/bulk_insert/main.c
// Function: callback_done
static int
callback_done(void * cookie, int failed)
{
	struct bulkinsert_state * C = cookie;
	struct timeval tv_now;

	/* This request is no longer in progress. */
	C->Nip -= 1;

	/* This request is done. */
	C->Ndone += 1;

	/* Did we fail? */
	if (failed) {
		C->done = 1;
		C->failed = 1;
	}

	/* Store new power-of-two timestamp? */
	if ((C->Ndone & (C->Ndone - 1)) == 0) {
		/* If we have a saved timestamp, print results. */
		if (C->Ndone_saved)
			printperf(C);

		/* Store new timestamp. */
		C->Ndone_saved = C->Ndone;
		if (monoclock_get(&C->tv_saved)) {
			warnp("Error reading clock");
			goto err0;
		}
	}

	/* Has it been 1s since the stored timestamp? */
	if (C->Ndone_saved) {
		if (monoclock_get(&tv_now)) {
			warnp("Error reading clock");
			goto err0;
		}
		if ((tv_now.tv_sec >= C->tv_saved.tv_sec + 10) &&
		    ((tv_now.tv_sec > C->tv_saved.tv_sec + 10) ||
		     (tv_now.tv_usec > C->tv_saved.tv_usec)))
			printperf(C);
	}

	/* Send more requests if possible. */
	if (sendbatch(C))
		goto err0;

	/* Are we done? */
	if (C->Nip == 0)
		C->done = 1;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
decq 0x10(%rdi)
movq 0x20(%rdi), %rax
incq %rax
movq %rax, 0x20(%rdi)
testl %esi, %esi
je 0x2819
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x18(%rbx)
leaq -0x1(%rax), %rcx
testq %rcx, %rax
jne 0x2846
cmpq $0x0, 0x28(%rbx)
je 0x2835
movq %rbx, %rdi
callq 0x28dd
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
leaq 0x30(%rbx), %rdi
callq 0x3e2c
testl %eax, %eax
jne 0x2859
cmpq $0x0, 0x28(%rbx)
je 0x28b4
movq %rsp, %rdi
callq 0x3e2c
testl %eax, %eax
je 0x2891
callq 0x2090
cmpl $0x0, (%rax)
je 0x287c
movq %rax, %rbx
leaq 0x7868(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x50ec
movl $0x0, (%rbx)
jmp 0x288a
leaq 0x7852(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x520b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x28d7
movq 0x30(%rbx), %rax
addq $0xa, %rax
cmpq %rax, (%rsp)
jl 0x28b4
jg 0x28ac
movq 0x8(%rsp), %rax
cmpq 0x38(%rbx), %rax
jle 0x28b4
movq %rbx, %rdi
callq 0x28dd
movq %rbx, %rdi
callq 0x275b
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x28d7
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx)
jne 0x28d7
movl $0x1, 0x1c(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]kivaloo/bench/bulk_insert/main.c
// Function: printperf
static void
printperf(struct bulkinsert_state * C)
{
	struct timeval tv_now;
	double T;
	uint64_t N;

	/* Get current time. */
	if (monoclock_get(&tv_now)) {
		warnp("Error reading clock");
		return;
	}

	/* Compute time difference. */
	T = timeval_diff(C->tv_saved, tv_now);

	/* Compute number of requests between then and now. */
	N = C->Ndone - C->Ndone_saved;

	/* Everything completed before now was before 10 s. */
	if (T > 10.0) {
		T = 10.0;
		N -= 1;
	}

	/* Avoid microsecond precision rounding resulting in divide-by-0. */
	if (T < 0.000001)
		T = 0.000001;

	/*
	 * Print requests per second.  Skip this if we handled less than 4096
	 * requests, since that could be a burst of responses from a single
	 * bundle.
	 */
	if (N >= 4096)
		printf("%zu %.0f\n", C->Ndone_saved, (double)N / T);

	/* We've printed this performance point. */
	C->Ndone_saved = 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3e2c
testl %eax, %eax
je 0x291b
callq 0x2090
cmpl $0x0, (%rax)
je 0x29ba
movq %rax, %rbx
leaq 0x77cc(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x50ec
movl $0x0, (%rbx)
jmp 0x29c8
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq 0x30(%rbx), %rax
cvtsi2sd %rax, %xmm1
subq 0x38(%rbx), %rcx
cvtsi2sd %rcx, %xmm0
mulsd 0x76ca(%rip), %xmm0     # 0xa008
addsd %xmm1, %xmm0
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rsi
subq %rsi, %rax
xorl %ecx, %ecx
ucomisd 0x76b9(%rip), %xmm0     # 0xa010
seta %cl
subq %rcx, %rax
cmpq $0x1000, %rax           # imm = 0x1000
jb 0x29b0
movsd 0x76a3(%rip), %xmm1     # 0xa010
minsd %xmm0, %xmm1
movsd 0x768f(%rip), %xmm2     # 0xa008
maxsd %xmm1, %xmm2
movq %rax, %xmm1
punpckldq 0x7696(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x769e(%rip), %xmm1     # 0xa030
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd %xmm2, %xmm0
leaq 0x7740(%rip), %rdi      # 0xa0e9
movb $0x1, %al
callq 0x2130
movq $0x0, 0x28(%rbx)
jmp 0x29c8
leaq 0x7714(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x520b
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: read_piped_input
void read_piped_input ()
{
    int read_bytes;

    piped_input_len = 0;

    int flags = fcntl(0, F_GETFD, 0);
    fcntl(0, F_SETFL, flags | O_NONBLOCK);

    while (piped_input_len < PIPED_INPUT_SIZE) {
        read_bytes = read(0,
                          &(piped_input[piped_input_len]),
                          PIPED_INPUT_SIZE - piped_input_len);
        if (read_bytes <= 0)
            break;
        piped_input_len += read_bytes;
    }

    fclose(stdin);
    freopen("/dev/tty", "r+b", stdin);
}

// Assembly:
pushq %rbx
movq $0x0, 0x6d98(%rip) # 0x9190
xorl %edi, %edi
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20e0
orl $0x800, %eax            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x20e0
movq 0x6d6c(%rip), %rax      # 0x9190
cmpq $0x1fff, %rax           # imm = 0x1FFF
ja 0x2465
leaq 0x6d6d(%rip), %rbx      # 0x91a0
leaq (%rbx,%rax), %rsi
movl $0x2000, %edx           # imm = 0x2000
subq %rax, %rdx
xorl %edi, %edi
callq 0x2190
testl %eax, %eax
jle 0x2465
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq 0x6d3a(%rip), %rax      # 0x9190
movq %rax, 0x6d33(%rip)      # 0x9190
cmpq $0x2000, %rax           # imm = 0x2000
jb 0x2433
movq 0x6b64(%rip), %rbx      # 0x8fd0
movq (%rbx), %rdi
callq 0x2100
movq (%rbx), %rdx
leaq 0x3b86(%rip), %rdi      # 0x6004
leaq 0x3b88(%rip), %rsi      # 0x600d
popq %rbx
jmp 0x2150
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: debug_step
int debug_step (struct _vm * vm)
{
    int depth = 0;
    int error = 0;

    if (vm_opcode(vm) == OP_CALL)
        depth = 1;
    else
        return debug_next(vm);

    while (depth > 0) {
        error = debug_next(vm);
        if (error)
            return error;
        if (vm_opcode(vm) == OP_CALL)
            depth++;
        else if (vm_opcode(vm) == OP_RET)
            depth--;
    }

    return debug_next(vm);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5079
cmpb $0x27, %al
jne 0x2532
movl $0x1, %ebp
movq %rbx, %rdi
callq 0x24c1
testl %eax, %eax
jne 0x2540
movq %rbx, %rdi
callq 0x5079
movl $0x1, %ecx
cmpb $0x27, %al
je 0x252e
movq %rbx, %rdi
callq 0x5079
xorl %ecx, %ecx
cmpb $0x29, %al
sete %cl
negl %ecx
addl %ecx, %ebp
jg 0x2500
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x24c1
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: debug_memory
int debug_memory (struct _vm * vm, const char * command)
{
    int address = vm->regs[REG_SP];
    int length  = 8;
    int matched;
    int i;

    matched = sscanf(command, "m %x %d", &address, &length);
    if (matched == -1) {
        matched = sscanf(command, "memory %x %d", &address, &length);
    }

    printf("%04x: ", address);
    for (i = 0; i < length; i++) {
        if (address + i >= 0x10000)
            break;
        printf("%02x", vm->mem[address + i]);
        if (((i + 1) % 16 == 0) && (i + 1 < length))
            printf("\n%04x: ", address + i + 1);
        else if ((i + 1) % 8 == 0)
            printf("  ");
        else if ((i + 1) % 2 == 0)
            printf(" ");
    }

    printf("\n");

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x1a(%rdi), %eax
leaq 0x4(%rsp), %rdx
movl %eax, (%rdx)
movq %rsp, %rcx
movl $0x8, (%rcx)
leaq 0x3a9e(%rip), %rsi      # 0x6011
movq %r14, %rdi
xorl %eax, %eax
callq 0x2210
cmpl $-0x1, %eax
jne 0x259b
leaq 0x3a90(%rip), %rsi      # 0x6019
leaq 0x4(%rsp), %rdx
movq %rsp, %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2210
movl 0x4(%rsp), %esi
leaq 0x3a86(%rip), %rdi      # 0x602c
xorl %eax, %eax
callq 0x2130
cmpl $0x0, (%rsp)
jle 0x2642
leaq 0x3a68(%rip), %r14      # 0x6026
leaq 0x3a66(%rip), %r15      # 0x602b
leaq 0x3a67(%rip), %r12      # 0x6033
xorl %r13d, %r13d
movslq 0x4(%rsp), %rax
leal (%rax,%r13), %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
jg 0x2642
movq %r13, %rbp
addq (%rbx), %rax
movzbl (%r13,%rax), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2130
incq %r13
testb $0xf, %r13b
jne 0x261a
cmpl (%rsp), %r13d
jge 0x261a
movl 0x4(%rsp), %eax
leal (%rax,%rbp), %esi
incl %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2130
jmp 0x263c
testb $0x7, %r13b
je 0x2632
testb $0x1, %bpl
je 0x263c
movl $0x20, %edi
callq 0x2050
jmp 0x263c
movq %r12, %rdi
xorl %eax, %eax
callq 0x2130
cmpl (%rsp), %r13d
jl 0x25cf
movl $0xa, %edi
callq 0x2050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: set_breakpoint
void set_breakpoint (const char * command)
{
    int break_i;
    uint16_t addr;

    if (    (sscanf(command, "b %hx", &addr) == -1)
         && (sscanf(command, "break %hx", &addr) == -1))
        return;

    for (break_i = 0; break_i < BREAKPOINTS_SIZE; break_i++) {
        if (breakpoints[break_i] == -1) {
            breakpoints[break_i] = addr;
            printf("breakpoint set: %hx\n", addr);
            if (break_i < BREAKPOINTS_SIZE - 1)
                breakpoints[break_i + 1] = -1;
            return;
        }
    }

    printf("breakpoint not set, max breakpoints already set\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x39cb(%rip), %rsi      # 0x6036
leaq 0x6(%rsp), %rdx
xorl %eax, %eax
callq 0x2210
cmpl $-0x1, %eax
jne 0x2697
leaq 0x39b9(%rip), %rsi      # 0x603c
leaq 0x6(%rsp), %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2210
cmpl $-0x1, %eax
je 0x26e4
xorl %ebx, %ebx
leaq 0x8b10(%rip), %r14      # 0xb1b0
cmpl $-0x1, (%r14,%rbx,4)
je 0x26be
incq %rbx
cmpq $0x20, %rbx
jne 0x26a0
leaq 0x3a2a(%rip), %rdi      # 0x60e1
callq 0x20b0
jmp 0x26e4
movzwl 0x6(%rsp), %esi
movl %esi, (%r14,%rbx,4)
leaq 0x3978(%rip), %rdi      # 0x6046
xorl %eax, %eax
callq 0x2130
cmpq $0x1f, %rbx
je 0x26e4
movl $0xffffffff, 0x4(%r14,%rbx,4) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: debug_continue
void debug_continue (struct _vm * vm)
{
    int break_i;
    int breakpoint_found = 0;

    if (vm->halted) {
        printf("VM Halted\n");
        return;
    }
    while ((vm->halted == 0) && (breakpoint_found == 0)) {
        vm_step(vm);
        for (break_i = 0; break_i < BREAKPOINTS_SIZE; break_i++) {
            if (breakpoints[break_i] == -1)
                break;
            if (breakpoints[break_i] == vm->regs[REG_IP]) {
                printf("breakpoint: %s\n", vm_ins_str(vm));
                breakpoint_found = 1;
                break;
            }
        }
    }
}

// Assembly:
cmpl $0x0, 0x24(%rdi)
je 0x26fe
leaq 0x3a18(%rip), %rdi      # 0x6111
jmp 0x20b0
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8aa3(%rip), %r15      # 0xb1b0
leaq 0x3947(%rip), %r14      # 0x605b
movq %rbx, %rdi
callq 0x5084
xorl %ecx, %ecx
movl (%rcx,%r15), %edx
xorl %eax, %eax
cmpl $-0x1, %edx
je 0x275a
movzwl 0x16(%rbx), %esi
cmpl %esi, %edx
je 0x2740
addq $0x4, %rcx
cmpq $0x80, %rcx
jne 0x271e
jmp 0x275a
movq %rbx, %rdi
callq 0x5026
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x2130
movl $0x1, %eax
orl 0x24(%rbx), %eax
je 0x2714
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/endeav0r[P]hvm/src/debugger.c
// Function: dump_core
void dump_core (struct _vm * vm)
{
    FILE * fh;

    fh = fopen("core", "wb");
    if (fh == NULL) {
        fprintf(stderr, "could not open file core\n");
        return;
    }

    fwrite (vm->mem, 1, 65536, fh);

    fclose(fh);

    printf("core written to file 'core'\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x38f8(%rip), %rdi      # 0x606b
leaq 0x38f6(%rip), %rsi      # 0x6070
callq 0x2280
testq %rax, %rax
je 0x27b7
movq %rax, %rbx
movq (%r14), %rdi
movl $0x1, %esi
movl $0x10000, %edx          # imm = 0x10000
movq %rax, %rcx
callq 0x22a0
movq %rbx, %rdi
callq 0x2100
leaq 0x3970(%rip), %rdi      # 0x611b
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20b0
callq 0x22e0
addq $0x8, %rsp
popq %rbx
popq %r14
retq