LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/aes-core.c
// Function: aes_subbytes_shiftrows
void aes_subbytes_shiftrows(uint8_t state[])
{
	uint8_t tmp;
	
	state[0] = sbox(state[0]);
	state[4] = sbox(state[4]);
	state[8] = sbox(state[8]);
	state[12] = sbox(state[12]);
	
	tmp = state[1];
	state[1] = sbox(state[5]);
	state[5] = sbox(state[9]);
	state[9] = sbox(state[13]);
	state[13] = sbox(tmp);
	
	tmp = state[2];
	state[2] = sbox(state[10]);
	state[10] = sbox(tmp);
	tmp = state[6];
	state[6] = sbox(state[14]);
	state[14] = sbox(tmp);
	
	tmp = state[3];
	state[3] = sbox(state[15]);
	state[15] = sbox(state[11]);
	state[11] = sbox(state[7]);
	state[7] = sbox(tmp);
}

// Assembly:
movzbl (%rdi), %ecx
leaq 0x1d87(%rip), %rax      # 0x3020
movb (%rcx,%rax), %cl
movb %cl, (%rdi)
movzbl 0x4(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rdi)
movzbl 0x8(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rdi)
movzbl 0xc(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rdi)
movzbl 0x1(%rdi), %ecx
movzbl 0x5(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x1(%rdi)
movzbl 0x9(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x5(%rdi)
movzbl 0xd(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x9(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0xd(%rdi)
movzbl 0x2(%rdi), %ecx
movzbl 0xa(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x2(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rdi)
movzbl 0x6(%rdi), %ecx
movzbl 0xe(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x6(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0xe(%rdi)
movzbl 0x3(%rdi), %ecx
movzbl 0xf(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x3(%rdi)
movzbl 0xb(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xf(%rdi)
movzbl 0x7(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xb(%rdi)
movb (%rcx,%rax), %al
movb %al, 0x7(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/aes-core.c
// Function: aesc_encrypt
void aesc_encrypt(const uint8_t plain_text[], uint8_t cipher_text[], const uint8_t key_sched[])
{
	uint8_t state[16];
	
	unsigned int i;
	
	aes_first_addroundkey(state, plain_text, key_sched);
	
	for (i = 1; i < 10; ++i) {
		aes_subbyte_shiftrows_mixcols(state);
		aes_addroundkey(state, key_sched + i * 16);
	}
	
	aes_subbytes_shiftrows(state);
	aes_last_addroundkey(cipher_text, state, key_sched + 10 * 16);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
vmovups (%rdx), %xmm0
vxorps (%rdi), %xmm0, %xmm0
movq %rsp, %r15
vmovaps %xmm0, (%r15)
movl $0x10, %r12d
movq %r15, %rdi
callq 0x1030
vmovaps (%rsp), %xmm0
vxorps (%rbx,%r12), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
addq $0x10, %r12
cmpq $0xa0, %r12
jne 0x15c1
movzbl (%rsp), %ecx
leaq 0x1a2f(%rip), %rax      # 0x3020
movb (%rcx,%rax), %cl
movb %cl, (%rsp)
movzbl 0x4(%rsp), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rsp)
movzbl 0x8(%rsp), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rsp)
movzbl 0xc(%rsp), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rsp)
movzbl 0x1(%rsp), %ecx
movzbl 0x5(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x1(%rsp)
movzbl 0x9(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x5(%rsp)
movzbl 0xd(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x9(%rsp)
movb (%rcx,%rax), %cl
movb %cl, 0xd(%rsp)
movzbl 0x2(%rsp), %ecx
movzbl 0xa(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x2(%rsp)
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rsp)
movzbl 0x6(%rsp), %ecx
movzbl 0xe(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x6(%rsp)
movb (%rcx,%rax), %cl
movb %cl, 0xe(%rsp)
movzbl 0x3(%rsp), %ecx
movzbl 0xf(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x3(%rsp)
movzbl 0xb(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xf(%rsp)
movzbl 0x7(%rsp), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xb(%rsp)
movb (%rcx,%rax), %al
movb %al, 0x7(%rsp)
xorl %eax, %eax
movb 0xa0(%rbx,%rax), %cl
xorb (%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x16ad
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/aes-core.c
// Function: aes_isubbytes_ishiftrows
void aes_isubbytes_ishiftrows(uint8_t state[])
{
	uint8_t tmp;
	
	state[0] = isbox(state[0]);
	state[4] = isbox(state[4]);
	state[8] = isbox(state[8]);
	state[12] = isbox(state[12]);
	
	tmp = state[13];
	state[13] = isbox(state[9]);
	state[9] = isbox(state[5]);
	state[5] = isbox(state[1]);
	state[1] = isbox(tmp);
	
	tmp = state[2];
	state[2] = isbox(state[10]);
	state[10] = isbox(tmp);
	tmp = state[6];
	state[6] = isbox(state[14]);
	state[14] = isbox(tmp);
	
	tmp = state[3];
	state[3] = isbox(state[7]);
	state[7] = isbox(state[11]);
	state[11] = isbox(state[15]);
	state[15] = isbox(tmp);
}

// Assembly:
movzbl (%rdi), %ecx
leaq 0x1c56(%rip), %rax      # 0x3330
movb (%rcx,%rax), %cl
movb %cl, (%rdi)
movzbl 0x4(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%rdi)
movzbl 0x8(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%rdi)
movzbl 0xc(%rdi), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%rdi)
movzbl 0xd(%rdi), %ecx
movzbl 0x9(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xd(%rdi)
movzbl 0x5(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x9(%rdi)
movzbl 0x1(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x5(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0x1(%rdi)
movzbl 0x2(%rdi), %ecx
movzbl 0xa(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x2(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0xa(%rdi)
movzbl 0x6(%rdi), %ecx
movzbl 0xe(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x6(%rdi)
movb (%rcx,%rax), %cl
movb %cl, 0xe(%rdi)
movzbl 0x3(%rdi), %ecx
movzbl 0x7(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x3(%rdi)
movzbl 0xb(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x7(%rdi)
movzbl 0xf(%rdi), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xb(%rdi)
movb (%rcx,%rax), %al
movb %al, 0xf(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/aes-core.c
// Function: aesc_decrypt
void aesc_decrypt(const uint8_t cipher_text[], uint8_t plain_text[], const uint8_t key_sched[])
{
	uint8_t state[16];
	
	unsigned int i;
	
	aes_first_addroundkey(state, cipher_text, key_sched + 10 * 16);
	aes_isubbytes_ishiftrows(state);
	
	for (i = 9; i > 0; --i) {
		aes_addroundkey(state, key_sched + i * 16);
		aes_isubbyte_ishiftrows_imixcols(state);
	}
	
	aes_last_addroundkey(plain_text, state, key_sched);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
vmovups 0xa0(%rdx), %xmm0
vxorps (%rdi), %xmm0, %xmm0
movq %rsi, %r14
movq %rsp, %r15
vmovaps %xmm0, (%r15)
movzbl (%r15), %ecx
leaq 0x1913(%rip), %rax      # 0x3330
movb (%rcx,%rax), %cl
movb %cl, (%r15)
movzbl 0x4(%r15), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x4(%r15)
movzbl 0x8(%r15), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0x8(%r15)
movzbl 0xc(%r15), %ecx
movb (%rcx,%rax), %cl
movb %cl, 0xc(%r15)
movzbl 0xd(%r15), %ecx
movzbl 0x9(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xd(%r15)
movzbl 0x5(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x9(%r15)
movzbl 0x1(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x5(%r15)
movb (%rcx,%rax), %cl
movb %cl, 0x1(%r15)
movzbl 0x2(%r15), %ecx
movzbl 0xa(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x2(%r15)
movb (%rcx,%rax), %cl
movb %cl, 0xa(%r15)
movzbl 0x6(%r15), %ecx
movzbl 0xe(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x6(%r15)
movb (%rcx,%rax), %cl
movb %cl, 0xe(%r15)
movzbl 0x3(%r15), %ecx
movzbl 0x7(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x3(%r15)
movzbl 0xb(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0x7(%r15)
movzbl 0xf(%r15), %edx
movb (%rdx,%rax), %dl
movb %dl, 0xb(%r15)
movb (%rcx,%rax), %al
movb %al, 0xf(%r15)
movl $0x90, %r12d
vmovaps (%rsp), %xmm0
vxorps (%rbx,%r12), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movq %r15, %rdi
callq 0x1080
addq $-0x10, %r12
jne 0x1add
xorl %eax, %eax
movb (%rbx,%rax), %cl
xorb (%rsp,%rax), %cl
movb %cl, (%r14,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x1afd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/aescopav2/ref/encrypt.c
// Function: gf128_mul7
static void gf128_mul7(block_t res, const block_t x)
{
	block_t x2, x4;

	gf128_mul2(x2, x);
	gf128_mul2(x4, x2);
	xor_block(x4, x4, x2);
	xor_block(res, x4, x);
}

// Assembly:
movw $0x7fff, %ax            # imm = 0x7FFF
kmovd %eax, %k1
vmovdqu8 (%rsi), %xmm0 {%k1} {z}
vmovdqu8 0x1(%rsi), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpbroadcastd 0x1528(%rip), %xmm2 # 0x3830
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
movb (%rsi), %al
vmovdqu8 %xmm0, -0x28(%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, -0x19(%rsp)
vmovdqa -0x28(%rsp), %xmm0
vmovdqu8 -0x27(%rsp), %xmm1 {%k1} {z}
vpsrlw $0x7, %xmm1, %xmm1
vpaddw %xmm0, %xmm0, %xmm0
vpternlogd $0xe2, %xmm1, %xmm2, %xmm0
addb %al, %al
movzbl %al, %ecx
xorb $-0x79, %al
cmpb $0x0, -0x28(%rsp)
vmovdqu8 %xmm0, -0x18(%rsp) {%k1}
movzbl %al, %eax
cmovnsl %ecx, %eax
vmovaps -0x28(%rsp), %xmm0
movb %al, -0x9(%rsp)
vxorps -0x18(%rsp), %xmm0, %xmm0
vmovaps %xmm0, -0x18(%rsp)
xorl %eax, %eax
movb (%rsi,%rax), %cl
xorb -0x18(%rsp,%rax), %cl
movb %cl, (%rdi,%rax)
incq %rax
cmpq $0x10, %rax
jne 0x2389
retq
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test13.c
// Function: main
void main()
{
    void* p;
    int i;
    for(i = 1; (p = malloc(i % 2 == 0 ? 1 : 30)) != NULL; i++){
        printf("%d items allocated\n", i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xea3(%rip), %rsi       # 0x2004
movl $0x1e, %r12d
movl $0x1e, %edi
movl $0x8, %edx
callq 0x11d4
testq %rax, %rax
je 0x11c2
movl $0x1, %r15d
leaq 0xe85(%rip), %rbx       # 0x200d
leaq 0xe75(%rip), %r14       # 0x2004
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1030
leal 0x1(%r15), %r13d
testb $0x1, %r15b
movl $0x1, %edi
cmovel %r12d, %edi
movq %r14, %rsi
movl $0x8, %edx
callq 0x11d4
movl %r13d, %r15d
testq %rax, %rax
jne 0x118f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/3-ProcessUser/system_implement_1.c
// Function: system_ver_3150
int system_ver_3150(const char *cmd_str) {
	if(cmd_str == NULL)
		return -1;
	if(fork() == 0) {
		//sleep(2);
		execl(cmd_str, cmd_str, NULL);
		fprintf(stderr, "%s: command not found\n", cmd_str);
		exit(-1);
	}
	return 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x11fa
movq %rdi, %rbx
callq 0x1090
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x11ff
movq %rbx, %rdi
callq 0x10b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/3-ProcessUser/system_implement_1.c
// Function: main
int main(void) {
	printf("\033[1;30m\033[1;42mbefore..\n\033[0m\n");
	printf("\033[1;37m\033[1;41m");
	fflush(stdout);
	system_ver_3150("/bin/ls");
	printf("\033[1;30m\033[1;42m\nafter..\n\033[0m");
	return 0;
}

// Assembly:
pushq %rax
leaq 0xe45(%rip), %rdi       # 0x204e
callq 0x1030
leaq 0xe06(%rip), %rdi       # 0x201b
xorl %eax, %eax
callq 0x1040
movq 0x2db5(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
callq 0x1060
leaq 0xdf8(%rip), %rdi       # 0x202a
callq 0x11dc
leaq 0xdf4(%rip), %rdi       # 0x2032
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/wrapper.c
// Function: byte_size
int byte_size(char* size) {
    int n;

    if (size == NULL)
        return 0;

    n = atoi(size);

    switch (size[strlen(size) - 1]) {
        case 'K':
            n <<= 10;
            break;
    
        case 'M':
            n <<= 20;
            break;
    }

    return (n < 0) ? 0 : n;
}

// Assembly:
testq %rdi, %rdi
je 0x15da
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1140
movl %eax, %ebx
movq %r14, %rdi
callq 0x1060
movzbl -0x1(%r14,%rax), %eax
cmpl $0x4d, %eax
je 0x15dd
cmpl $0x4b, %eax
jne 0x15e0
shll $0xa, %ebx
jmp 0x15e0
xorl %eax, %eax
retq
shll $0x14, %ebx
xorl %eax, %eax
testl %ebx, %ebx
cmovgl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/wrapper.c
// Function: wrapper_new
wrapper* wrapper_new(uint8_t w_mode, uint8_t w_type, char* argv) {
    wrapper* w = malloc(sizeof(wrapper));
    if (w == NULL)
        return NULL;

    w->type = w_type;
    w->mode = w_mode;

    switch (w->type) {
        case LZ78_ALGORITHM:
            w->data = lz78_new(w_mode, byte_size(argv));
            break;

        default:
            free(w);
            return NULL;
    }

    if (w->data)
        return w;
    else {
        free(w);
        return NULL;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebp
movl $0x10, %edi
callq 0x10f0
testq %rax, %rax
je 0x16c7
movq %rax, %rbx
movb %r15b, (%rax)
movb %bpl, 0x1(%rax)
cmpb $0x1, %r15b
jne 0x16bf
movq %r14, %rdi
callq 0x15aa
movzbl %bpl, %edi
movl %eax, %esi
callq 0x1e44
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x16c9
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x215e
movq %rbx, %rdi
popq %rbx
jmp 0x1030
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/wrapper.c
// Function: wrapper_compress
uint8_t wrapper_compress(wrapper* w, char* input, char* output) {
    uint8_t ret;
    int fd_in;
    int fd_out;

    switch (w->type) {
        case LZ78_ALGORITHM:
            if (input == NULL) {
                fd_in = STDIN_FILENO;
            } else {
                fd_in = open(input, ACCESS_READ);
                if (fd_in == -1)
                    return wrapper_return(WRAPPER_ERROR_FILE_IN);
            }

            if (output == NULL) {
                fd_out = STDOUT_FILENO;
            } else {
                fd_out = open(output, ACCESS_WRITE, 0644);
                if (fd_out == -1) {
                    close(fd_in);
                    return wrapper_return(WRAPPER_ERROR_FILE_OUT);
                }
            }

            ret = lz78_compress(w->data, fd_in, fd_out);

            close(fd_in);
            close(fd_out);
            return wrapper_return(ret);

        default:
            return wrapper_return(WRAPPER_ERROR_ALGORITHM);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpb $0x1, (%rdi)
jne 0x172e
movq %rdx, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1739
movq %rsi, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x1120
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x173b
movb $0x16, 0x399e(%rip)     # 0x50c8
movb $0x16, %bl
jmp 0x17ab
movb $0x15, 0x3993(%rip)     # 0x50c8
movb $0x15, %bl
jmp 0x17ab
xorl %ebp, %ebp
testq %r14, %r14
je 0x176e
movq %r14, %rdi
movl $0xa41, %esi            # imm = 0xA41
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x1120
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x1774
movl %ebp, %edi
callq 0x1090
movb $0x17, 0x395e(%rip)     # 0x50c8
movb $0x17, %bl
jmp 0x17ab
movl $0x1, %r14d
movq 0x8(%rbx), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0x1f0e
movl %eax, %ebx
movl %ebp, %edi
callq 0x1090
movl %r14d, %edi
callq 0x1090
movb %bl, 0x392f(%rip)       # 0x50c8
cmpb $0x9, %bl
jae 0x17ab
movzbl %bl, %eax
leaq 0x1a44(%rip), %rcx      # 0x31ec
movb (%rax,%rcx), %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/wrapper.c
// Function: wrapper_exec
uint8_t wrapper_exec(wrapper* w, char* input, char* output) {
    uint8_t ret;

    if (w->mode == WRAPPER_MODE_COMPRESS) {
        for (;;) {
            ret = wrapper_compress(w, input, output);
            if (ret != WRAPPER_ERROR_EAGAIN)
                return ret;
        }
    } else {
        for (;;) {
            ret = wrapper_decompress(w, input, output);
            if (ret != WRAPPER_ERROR_EAGAIN)
                return ret;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x0, 0x1(%rdi)
je 0x1893
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x17b2
cmpb $0x1a, %al
je 0x187f
jmp 0x18a5
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x16f9
cmpb $0x1a, %al
je 0x1893
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: ht_dictionary_new
ht_dictionary* ht_dictionary_new(uint32_t d_size) {
    ht_dictionary* dict = malloc(sizeof(ht_dictionary));
    if (dict == NULL)
        return NULL;

    d_size = DICT_LIMIT(d_size);
    dict->root = calloc(1, sizeof(ht_entry) * d_size);
    if (dict->root == NULL) {
        free(dict);
        return NULL;
    } else {
        dict->d_size = d_size;
        dict->d_thr = DICT_SIZE_THRESHOLD(d_size);
        dict->d_next = DICT_SIZE_MIN;
        dict->cur_node = -1;
        return dict;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
movl $0x20, %edi
callq 0x10f0
testq %rax, %rax
je 0x1936
movq %rax, %rbx
movl $0x100000, %eax         # imm = 0x100000
cmpl %eax, %ebp
cmovbl %ebp, %eax
cmpl $0x106, %eax            # imm = 0x106
movl $0x105, %r14d           # imm = 0x105
cmovael %eax, %r14d
movl %r14d, %esi
shll $0x4, %esi
movl $0x1, %edi
callq 0x10b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x192e
movl %r14d, 0x10(%rbx)
shll $0x3, %r14d
imulq $0x66666667, %r14, %rax # imm = 0x66666667
shrq $0x22, %rax
movl %eax, 0x14(%rbx)
movl $0x104, 0x18(%rbx)      # imm = 0x104
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
jmp 0x1938
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: ht_dictionary_update
int ht_dictionary_update(ht_dictionary* d, uint16_t label) {
    uint8_t i;
    uint32_t key;
    uint32_t hash;
    d->prev_node = d->cur_node;

    if (d->cur_node == -1) {
        d->cur_node = label;
        return -1;
    }

    /* Bernstein hash function */
    key = (label << bitlen(d->d_size)) + d->cur_node;
    hash = 0;
    for (i = 0; i < 4; ++i) {
        hash = ((hash << 5) + hash) + (key & 0xFF);
        key >>= 8;
    }
    hash %= d->d_size;

    /* Search if current sequence is present, else return an empty hash entry
       where insert it */
    while (d->root[hash].used) {
        if (d->root[hash].parent == d->cur_node &&
                d->root[hash].label == label) {
            d->cur_node = d->root[hash].child;
            return -1;
        } else {
            /* Collision (linear search) */
            hash = (hash + 1) % d->d_size;
        }
    }

    /* At this point, in d->prev_node there is the symbol we will send */

    /* Fill out hash entry */
    d->root[hash].used = 1;
    d->root[hash].parent = d->prev_node;
    d->root[hash].label = label;
    d->root[hash].child = d->d_next;
    /* Update current node */
    d->cur_node = label;
    /* Update next symbol */
    ++(d->d_next);

    return 0;
}

// Assembly:
movl 0x8(%rdi), %r8d
movl %r8d, 0xc(%rdi)
cmpl $-0x1, %r8d
je 0x19e3
movl 0x10(%rdi), %r9d
bsrl %r9d, %eax
xorl $0x1f, %eax
movb $0x20, %cl
subb %al, %cl
testl %r9d, %r9d
movzbl %cl, %ecx
cmovel %r9d, %ecx
movl %esi, %edx
shll %cl, %edx
addl %r8d, %edx
xorl %eax, %eax
movb $0x4, %cl
movl %eax, %r10d
shll $0x5, %r10d
addl %eax, %r10d
movzbl %dl, %eax
addl %r10d, %eax
shrl $0x8, %edx
decb %cl
jne 0x1976
movq (%rdi), %r10
xorl %ecx, %ecx
xorl %edx, %edx
divl %r9d
movq %rdx, %r11
shlq $0x4, %r11
leaq (%r10,%r11), %rax
cmpb $0x0, (%r10,%r11)
je 0x19bf
cmpl %r8d, 0x4(%rax)
jne 0x19b5
cmpw %si, 0x8(%rax)
je 0x19e8
incl %edx
cmpl %r9d, %edx
cmovel %ecx, %edx
jmp 0x1997
movb $0x1, (%rax)
shlq $0x4, %rdx
movl %r8d, 0x4(%r10,%rdx)
movw %si, 0x8(%r10,%rdx)
movl 0x18(%rdi), %eax
movl %eax, 0xc(%r10,%rdx)
movl %esi, 0x8(%rdi)
incl %eax
movl %eax, 0x18(%rdi)
jmp 0x19f3
movl %esi, 0x8(%rdi)
jmp 0x19ee
movl 0xc(%rax), %eax
movl %eax, 0x8(%rdi)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ijleesw[P]data-compression/src/lz78/lz78.c
// Function: dictionary_new
dictionary* dictionary_new(uint32_t d_size) {
    uint16_t i;
    dictionary* dict = malloc(sizeof(dictionary) + d_size);
    if (dict == NULL)
        return NULL;

    d_size = DICT_LIMIT(d_size);
    dict->root = malloc(sizeof(entry) * d_size);
    if (dict->root == NULL) {
        free(dict);
        return NULL;
    }

    dict->d_size = d_size;
    dict->d_thr = DICT_SIZE_THRESHOLD(d_size);
    dict->d_min = DICT_SIZE_MIN;
    dict->d_next = DICT_SIZE_MIN;
    for (i = 0; i < DICT_SIZE_MIN; ++i) {
        dict->root[i].parent = 0;
        dict->root[i].label = i;
    }
    return dict;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl %edi, %edi
addq $0x20, %rdi
callq 0x10f0
testq %rax, %rax
je 0x1ab9
movq %rax, %rbx
movl $0x100000, %eax         # imm = 0x100000
cmpl %eax, %ebp
cmovbl %ebp, %eax
cmpl $0x106, %eax            # imm = 0x106
movl $0x105, %r15d           # imm = 0x105
cmovael %eax, %r15d
leal (,%r15,8), %r14d
movq %r14, %rdi
callq 0x10f0
movq %rax, (%rbx)
testq %rax, %rax
je 0x1ab1
movl %r15d, 0x8(%rbx)
movl %r14d, %ecx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
shrq $0x22, %rcx
movl %ecx, 0xc(%rbx)
movabsq $0x10400000104, %rcx    # imm = 0x10400000104
movq %rcx, 0x10(%rbx)
xorl %ecx, %ecx
movl $0x0, (%rax,%rcx,8)
movw %cx, 0x4(%rax,%rcx,8)
incq %rcx
cmpq $0x104, %rcx            # imm = 0x104
jne 0x1a97
jmp 0x1abb
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r11b
cmpl $0x104, %esi            # imm = 0x104
setb %r10b
movl %ecx, %r14d
addl $-0x2, %r14d
movb %r11b, 0x20(%rdi,%r9)
sete %bpl
orb %r10b, %bpl
movq %r9, %r10
movl %r9d, %ebp
jne 0x1b3d
movl %r14d, %r14d
leaq 0x1(%r14), %r10
decq %r14
movl (%rdx,%rbx,8), %ebx
decq %r10
movb 0x4(%rdx,%rbx,8), %r11b
movb %r11b, 0x21(%rdi,%r14)
cmpq $0x104, %rbx            # imm = 0x104
jb 0x1b3a
movl %r14d, %r15d
decq %r14
testq %r15, %r15
jne 0x1b16
movl %r10d, %ebp
leal -0x1(%rax), %ebx
cmpl %esi, %r8d
ja 0x1b51
cmpl %esi, %ebx
jne 0x1b51
movl %r9d, %r9d
movb %r11b, 0x20(%rdi,%r9)
cmpl %r8d, %eax
jbe 0x1b65
movsbl 0x20(%rdi,%r10), %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_O1/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, %r14
movq 0x8(%rdi), %rbx
movl 0x8(%rbx), %eax
cmpl $0x100, %eax            # imm = 0x100
je 0x1c23
cmpl $0x103, %eax            # imm = 0x103
je 0x1c1a
movq 0x10(%r14), %r15
cmpl $0x102, %eax            # imm = 0x102
jne 0x1be7
movl 0x10(%rbx), %eax
movl %eax, 0x18(%r14)
movl $0x15, 0x1c(%r14)
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 0x1c49
movl 0x18(%rbx), %eax
cmpl 0x14(%rbx), %eax
jb 0x1cae
movq %r15, %rdi
jmp 0x1cba
movb $0x1, (%r14)
jmp 0x1cae
movl $0x100, 0x18(%r14)      # imm = 0x100
movl 0x18(%rbx), %eax
bsrl %eax, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
testl %eax, %eax
cmovel %eax, %ecx
movl %ecx, 0x1c(%r14)
movl $0x103, 0x8(%rbx)       # imm = 0x103
jmp 0x1cae
movl 0xc(%rbx), %eax
movl %eax, 0x18(%r14)
movl 0x18(%rbx), %eax
leal -0x1(%rax), %ecx
bsrl %ecx, %edx
xorl $-0x20, %edx
addl $0x21, %edx
testl %ecx, %ecx
cmovel %ecx, %edx
movl %edx, 0x1c(%r14)
movl 0x10(%rbx), %edx
cmpl %edx, %eax
jne 0x1ca0
movq 0x10(%r14), %rax
movq %rax, 0x8(%r14)
movq %rbx, 0x10(%r14)
movl %r12d, 0x8(%r15)
movq (%rbx), %rdi
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x1070
movl $0x104, 0x18(%rbx)      # imm = 0x104
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movq %r15, %rax
jmp 0x1ca6
movq %rbx, %rax
movq %r15, %rbx
movl 0x18(%rax), %ecx
cmpl 0x14(%rax), %ecx
jae 0x1cb7
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_O1/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 0x1f04
movq %rax, %rbx
movb %r14b, (%rax)
cmpb $0x1, %r14b
je 0x1edb
movzbl %r14b, %eax
testl %eax, %eax
jne 0x1f04
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 0x1efc
movq %rax, %r14
movl %ebp, %edi
callq 0x18bf
movq %rax, 0x11(%rbx)
testq %rax, %rax
je 0x1ef4
movabsq $0x900000102, %rax      # imm = 0x900000102
movq %rax, 0x19(%rbx)
movl $0x102, 0x8(%r14)       # imm = 0x102
jmp 0x1f06
movb $0x0, 0x1(%rbx)
movl $0x104, %edi            # imm = 0x104
callq 0x1a25
movq %rax, 0x9(%rbx)
testq %rax, %rax
jne 0x1f06
jmp 0x1efc
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_O1/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 0x1fd8
movq %rdi, %r14
movb $0x8, %bl
cmpb $0x0, (%rdi)
jne 0x1fda
movl %edx, %ebp
leaq 0x145e(%rip), %rax      # 0x3397
movl %esi, %edi
movq %rax, %rsi
callq 0x1110
movb $0x2, %bl
testq %rax, %rax
je 0x1fda
movq %rax, %r15
movl %ebp, %edi
movl $0xa41, %esi            # imm = 0xA41
movl $0x100000, %edx         # imm = 0x100000
callq 0x21aa
testq %rax, %rax
je 0x1feb
movq %rax, %r12
leaq 0x1(%r14), %r13
leaq 0x19(%r14), %rax
movq %rax, (%rsp)
movl 0x1d(%r14), %edx
testl %edx, %edx
je 0x1fa1
movq %r12, %rdi
movq (%rsp), %rsi
xorl %ecx, %ecx
callq 0x241b
cmpl $-0x1, %eax
je 0x1feb
movl %eax, %ecx
shrl %cl, 0x19(%r14)
subl %eax, 0x1d(%r14)
jne 0x1ffa
movq %r15, %rdi
callq 0x1080
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x1fbb
callq 0x1040
movl (%rax), %ecx
testl %ecx, %ecx
jne 0x1fef
movq %r13, %rdi
movl %ebp, %esi
callq 0x1ba6
cmpb $0x1, (%r13)
jne 0x1f7a
movq %r12, %rdi
callq 0x265d
xorl %ebx, %ebx
jmp 0x1fda
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 0x1fda
cmpl $0xb, %ecx
jne 0x1fda
movl $0x0, (%rax)
movb $0x4, %bl
jmp 0x1fda
// File: /workspace/github_c_makefile_star2_O1/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 0x2183
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
cmpl $0x1, %eax
je 0x2184
testl %eax, %eax
jne 0x219b
movq 0x9(%rbx), %rdi
testq %rdi, %rdi
je 0x218d
callq 0x1030
jmp 0x218d
retq
movq 0x9(%rbx), %rdi
callq 0x1b8b
movq 0x11(%rbx), %rdi
testq %rdi, %rdi
je 0x219b
callq 0x1030
movq %rbx, %rdi
popq %rbx
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %ebp
movl %edi, %ebx
cmpl $0xa41, %esi            # imm = 0xA41
je 0x21d6
cmpl $0x800, %ebp            # imm = 0x800
jne 0x2226
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10a0
jmp 0x21e1
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1050
xorl %r15d, %r15d
testb $0x7, %r14b
jne 0x2232
movl %eax, %eax
testq %rax, %rax
jne 0x2232
movl $0x1fffffff, %r12d      # imm = 0x1FFFFFFF
cmpl %r12d, %r14d
cmovbl %r14d, %r12d
movl %r12d, %esi
shrl $0x3, %esi
addl $0x14, %esi
movl $0x1, %edi
callq 0x10b0
movq %rax, %r15
testq %rax, %rax
je 0x222b
movl %ebx, (%r15)
movl %ebp, 0x4(%r15)
movl %r12d, 0x8(%r15)
jmp 0x2232
xorl %r15d, %r15d
jmp 0x2232
movl %ebx, %edi
callq 0x1090
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2652
movq %rdi, %rbx
movl 0x10(%rdi), %r12d
xorl %r15d, %r15d
cmpl $0x8, %r12d
jb 0x263a
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 0x262a
movl %eax, %ecx
addq %rcx, %r14
addl %eax, %r15d
subl %eax, %r12d
jne 0x2609
jmp 0x263a
callq 0x1040
cmpl $0xb, (%rax)
jne 0x2652
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_O1/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 0x269d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl (%rdi), %ebx
movl 0x10(%rdi), %eax
testb $0x7, %al
je 0x267c
andl $-0x8, %eax
addl $0x8, %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x25d2
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_O1/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 0x35a5
movq %rax, %rbx
movl %r12d, 0x2000(%rax)
movl %ebp, 0x2004(%rax)
leaq 0x51(%rip), %rdx        # 0x35b1
xorl %r14d, %r14d
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x407c
testl %eax, %eax
je 0x35a5
movl %eax, %edi
callq 0x22b0
leaq 0x1c80(%rip), %rdi      # 0x5202
movq %rax, %rsi
xorl %eax, %eax
callq 0x3f57
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_O1/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 0x3645
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 0x3610
movq %rax, %r15
testq %rax, %rax
je 0x3629
movq %r15, %rdx
movl 0x2004(%rbx), %edi
movq %rbx, %rsi
callq 0x3cf8
cmpq %r15, %rax
je 0x35d9
jmp 0x3655
callq 0x2080
movl (%rax), %ecx
cmpl $0x4, %ecx
je 0x35d9
testl %ecx, %ecx
jne 0x366f
leaq 0x1bfa(%rip), %rdi      # 0x5221
jmp 0x3666
movq %rsp, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x369c
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x369c
movq %rsp, %rdi
callq 0x2200
callq 0x2080
cmpl $0x0, (%rax)
jne 0x367b
leaq 0x1bc9(%rip), %rdi      # 0x522f
xorl %eax, %eax
callq 0x3f57
jmp 0x3692
movq %rax, %rbx
leaq 0x1ba8(%rip), %rdi      # 0x5221
jmp 0x3685
movq %rax, %rbx
leaq 0x1baa(%rip), %rdi      # 0x522f
xorl %eax, %eax
callq 0x3e38
movl $0x0, (%rbx)
movl $0x1, %edi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O1/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 0x36c6
callq 0x2080
movq %rax, %r14
movl (%rax), %eax
cmpl $0x58, %eax
jne 0x36d5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
leaq 0x1b61(%rip), %rdi      # 0x523d
testl %eax, %eax
jne 0x36e9
xorl %eax, %eax
callq 0x3f57
jmp 0x36f7
xorl %eax, %eax
callq 0x3e38
movl $0x0, (%r14)
movl $0x1, %edi
callq 0x2260
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x14b0
movb $0x0, 0x1(%rbx)
callq 0x1070
movq %rax, %r14
leal -0x2f(%r15), %eax
cmpl $-0x3, %eax
ja 0x14fa
movq (%r14), %rax
movslq %r15d, %rcx
movzwl (%rax,%rcx,2), %eax
movl %r15d, %ecx
andl $0x800, %eax            # imm = 0x800
je 0x15b1
callq 0x1060
movl %eax, %ecx
cmpl $0x2d, %r15d
jne 0x1537
movq (%r14), %rax
movslq %ecx, %rdx
movb 0x1(%rax,%rdx,2), %al
andb $0x8, %al
shrb $0x3, %al
cmpl $0x2e, %ecx
sete %dl
orb %al, %dl
movl $0x2d, %eax
cmpb $0x1, %dl
jne 0x1531
movb %r15b, (%rbx)
movl 0x2b1f(%rip), %eax      # 0x4050
testb %dl, %dl
jne 0x1539
jmp 0x15b1
movl %ecx, %eax
movq (%r14), %rcx
movslq %eax, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0x154b
xorl %r15d, %r15d
jmp 0x157d
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 0x155c
sarq $0x20, %r15
cmpl $0x2e, %eax
jne 0x15a1
addq %r15, %rbx
incq %rbx
movq (%r14), %r15
callq 0x1060
movb %al, (%rbx)
movsbq %al, %rcx
incq %rbx
testb $0x8, 0x1(%r15,%rcx,2)
jne 0x1588
movl $0x30, %ecx
cmpl $-0x1, %eax
je 0x15b1
movl %eax, 0x2a9f(%rip)      # 0x4050
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x27e9
movq %rdi, %r14
leaq 0x7a(%rip), %r15        # 0x27f1
movq 0x8(%r14), %rcx
movq 0x40(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20b0
testq %rax, %rax
je 0x27e9
movq 0x8(%r14), %rcx
movq 0x48(%r14), %rdi
incq %rdi
movl $0x28, %esi
movl $0x1, %edx
callq 0x20b0
testq %rax, %rax
je 0x27e9
movq (%r14), %rdi
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x5559
testl %eax, %eax
jne 0x27e4
movq 0x10(%r14), %rax
incq %rax
movq %rax, 0x10(%r14)
cmpq $0x1000, %rax           # imm = 0x1000
jb 0x2777
jmp 0x27e9
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x281a
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x18(%rbx)
leaq -0x1(%rax), %rcx
testq %rcx, %rax
jne 0x2847
cmpq $0x0, 0x28(%rbx)
je 0x2832
movq %rbx, %rdi
callq 0x28de
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
leaq 0x30(%rbx), %rdi
callq 0x3e00
testl %eax, %eax
jne 0x285a
cmpq $0x0, 0x28(%rbx)
je 0x28b5
movq %rsp, %rdi
callq 0x3e00
testl %eax, %eax
je 0x2892
callq 0x2090
cmpl $0x0, (%rax)
je 0x287d
movq %rax, %rbx
leaq 0x7867(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x50e4
movl $0x0, (%rbx)
jmp 0x288b
leaq 0x7851(%rip), %rdi      # 0xa0d5
xorl %eax, %eax
callq 0x5203
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x28d8
movq 0x30(%rbx), %rax
addq $0xa, %rax
cmpq %rax, (%rsp)
jl 0x28b5
jg 0x28ad
movq 0x8(%rsp), %rax
cmpq 0x38(%rbx), %rax
jle 0x28b5
movq %rbx, %rdi
callq 0x28de
movq %rbx, %rdi
callq 0x275c
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x28d8
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx)
jne 0x28d8
movl $0x1, 0x1c(%rbx)
addq $0x10, %rsp
popq %rbx
retq