LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_decode_char
int cram_beta_decode_char(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int i, n;


    if (c->beta.nbits) {
        if (cram_not_enough_bits(in, c->beta.nbits))
            return -1;

	for (i = 0, n = *out_size; i < n; i++)
	    out[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
    } else {
	for (i = 0, n = *out_size; i < n; i++)
	    out[i] = -c->beta.offset;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movl 0x34(%rsi), %eax
testq %rax, %rax
je 0x883ca
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x883f1
movq %rdx, %r12
movslq 0x14(%rdx), %rcx
subq 0x30(%rdx), %rcx
jbe 0x883f1
cmpq $0x10000000, %rcx       # imm = 0x10000000
ja 0x883a0
movslq 0x38(%r12), %rdx
leaq (%rdx,%rcx,8), %rcx
addq $-0x7, %rcx
cmpq %rax, %rcx
jb 0x883f1
movslq (%r8), %r13
testq %r13, %r13
jle 0x883ee
xorl %r14d, %r14d
xorl %ebp, %ebp
movl 0x34(%r15), %esi
movq %r12, %rdi
callq 0x880e9
subl 0x30(%r15), %eax
movb %al, (%rbx,%rbp)
incq %rbp
cmpq %rbp, %r13
jne 0x883ad
jmp 0x883f1
movslq (%r8), %rax
testq %rax, %rax
jle 0x883ee
xorl %r14d, %r14d
xorl %ecx, %ecx
movb 0x30(%r15), %dl
xorl %esi, %esi
subb %dl, %sil
movb %sil, (%rbx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x883d7
jmp 0x883f1
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_decode_init
cram_codec *cram_beta_decode_init(char *data, int size,
				  enum cram_external_type option,
				  int version) {
    cram_codec *c;
    char *cp = data;

    if (!(c = malloc(sizeof(*c))))
	return NULL;

    c->codec  = E_BETA;
    if (option == E_INT || option == E_LONG)
	c->decode = cram_beta_decode_int;
    else if (option == E_BYTE_ARRAY || option == E_BYTE)
	c->decode = cram_beta_decode_char;
    else
	abort();
    c->free   = cram_beta_decode_free;
    
    cp += itf8_get(cp, &c->beta.offset);
    cp += itf8_get(cp, &c->beta.nbits);

    if (cp - data != size
        || c->beta.nbits < 0 || c->beta.nbits > 8 * sizeof(int)) {
	fprintf(stderr, "Malformed beta header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x885c6
movl $0x6, (%rax)
leal -0x1(%r15), %ecx
cmpl $0x2, %ecx
jae 0x88445
leaq -0x404(%rip), %rcx      # 0x8803f
jmp 0x8845a
addl $-0x3, %r15d
cmpl $0x2, %r15d
jae 0x885ce
leaq -0x105(%rip), %rcx      # 0x88355
movq %rcx, 0x18(%rax)
leaq -0x62(%rip), %rcx       # 0x88403
movq %rcx, 0x10(%rax)
movzbl (%r14), %edx
movl $0x1, %ecx
testb %dl, %dl
js 0x88480
movl $0x1, %esi
jmp 0x8850b
movzbl 0x1(%r14), %esi
cmpb $-0x41, %dl
ja 0x88499
andl $0x3f, %edx
shll $0x8, %edx
orl %esi, %edx
movl $0x2, %esi
jmp 0x8850b
cmpb $-0x21, %dl
ja 0x884b7
shll $0x8, %esi
movzbl 0x2(%r14), %edi
andl $0x1f, %edx
shll $0x10, %edx
orl %esi, %edx
orl %edi, %edx
movl $0x3, %esi
jmp 0x8850b
cmpb $-0x11, %dl
ja 0x884e0
shll $0x10, %esi
movzbl 0x2(%r14), %edi
shll $0x8, %edi
movzbl 0x3(%r14), %r8d
andl $0xf, %edx
shll $0x18, %edx
orl %esi, %edx
orl %edi, %edx
orl %r8d, %edx
movl $0x4, %esi
jmp 0x8850b
shll $0x1c, %edx
shll $0x14, %esi
orl %edx, %esi
movzbl 0x2(%r14), %edx
shll $0xc, %edx
orl %esi, %edx
movzbl 0x3(%r14), %esi
shll $0x4, %esi
orl %edx, %esi
movzbl 0x4(%r14), %edx
andl $0xf, %edx
orl %esi, %edx
movl $0x5, %esi
movl %edx, 0x30(%rax)
leaq (%r14,%rsi), %rdx
movzbl (%r14,%rsi), %esi
testb %sil, %sil
jns 0x885a8
movzbl 0x1(%rdx), %ecx
cmpb $-0x41, %sil
ja 0x88539
andl $0x3f, %esi
shll $0x8, %esi
orl %ecx, %esi
movl $0x2, %ecx
jmp 0x885a8
cmpb $-0x21, %sil
ja 0x88557
shll $0x8, %ecx
movzbl 0x2(%rdx), %edi
andl $0x1f, %esi
shll $0x10, %esi
orl %ecx, %esi
orl %edi, %esi
movl $0x3, %ecx
jmp 0x885a8
cmpb $-0x11, %sil
ja 0x88580
shll $0x10, %ecx
movzbl 0x2(%rdx), %edi
shll $0x8, %edi
movzbl 0x3(%rdx), %r8d
andl $0xf, %esi
shll $0x18, %esi
orl %ecx, %esi
orl %edi, %esi
orl %r8d, %esi
movl $0x4, %ecx
jmp 0x885a8
shll $0x1c, %esi
shll $0x14, %ecx
orl %esi, %ecx
movzbl 0x2(%rdx), %esi
shll $0xc, %esi
orl %ecx, %esi
movzbl 0x3(%rdx), %ecx
shll $0x4, %ecx
orl %esi, %ecx
movzbl 0x4(%rdx), %esi
andl $0xf, %esi
orl %ecx, %esi
movl $0x5, %ecx
movl %esi, 0x34(%rax)
addq %rcx, %rdx
subq %r14, %rdx
movslq %ebx, %rcx
cmpq %rcx, %rdx
jne 0x885be
cmpl $0x21, %esi
jb 0x885c8
movq %rax, %rdi
callq 0x84cd
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
callq 0x63c0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_store
int cram_beta_encode_store(cram_codec *c, cram_block *b,
			   char *prefix, int version) {
    int len = 0;

    if (prefix) {
	size_t l = strlen(prefix);
	BLOCK_APPEND(b, prefix, l);
	len += l;
    }

    len += itf8_put_blk(b, c->codec);
    len += itf8_put_blk(b, itf8_size(c->e_beta.offset)
			+ itf8_size(c->e_beta.nbits)); // codec length
    len += itf8_put_blk(b, c->e_beta.offset);
    len += itf8_put_blk(b, c->e_beta.nbits);

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x8869d
movq %rdx, %r12
movq %rdx, %rdi
callq 0x62d0
movq %rax, %r15
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
leaq (%rdx,%r15), %rsi
cmpq %rsi, %rcx
ja 0x88686
movl $0x400, %r13d           # imm = 0x400
movq %rcx, %xmm0
punpckldq 0x39ed(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x39f5(%rip), %xmm0     # 0x8c020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x82a9(%rip), %xmm1     # 0x908e8
cvttsd2si %xmm1, %rdx
movq %rdx, %rdi
sarq $0x3f, %rdi
subsd 0xfb7d(%rip), %xmm1     # 0x981d0
cvttsd2si %xmm1, %rsi
andq %rdi, %rsi
orq %rdx, %rsi
testq %rcx, %rcx
cmoveq %r13, %rsi
movq %rsi, 0x28(%rbx)
movq %rax, %rdi
callq 0x6c80
movq %rax, 0x20(%rbx)
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rdx
leaq (%rdx,%r15), %rsi
cmpq %rsi, %rcx
jbe 0x88616
addq %rdx, %rax
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6570
addq %r15, 0x30(%rbx)
jmp 0x886a0
xorl %r15d, %r15d
movl (%r14), %esi
movq %rbx, %rdi
callq 0x55da8
movl %eax, %ebp
movl 0x30(%r14), %ecx
movl $0x1, %esi
movl $0x1, %eax
cmpl $0x80, %ecx
jb 0x886eb
movl $0x2, %eax
cmpl $0x4000, %ecx           # imm = 0x4000
jb 0x886eb
movl $0x3, %eax
cmpl $0x200000, %ecx         # imm = 0x200000
jb 0x886eb
cmpl $0x10000000, %ecx       # imm = 0x10000000
movl $0x5, %eax
sbbl $0x0, %eax
movl 0x34(%r14), %ecx
cmpl $0x80, %ecx
jb 0x8871f
movl $0x2, %esi
cmpl $0x4000, %ecx           # imm = 0x4000
jb 0x8871f
movl $0x3, %esi
cmpl $0x200000, %ecx         # imm = 0x200000
jb 0x8871f
cmpl $0x10000000, %ecx       # imm = 0x10000000
movl $0x5, %esi
sbbl $0x0, %esi
addl %eax, %esi
addl %r15d, %ebp
movq %rbx, %rdi
callq 0x55da8
movl %eax, %r15d
movl 0x30(%r14), %esi
movq %rbx, %rdi
callq 0x55da8
movl %eax, %r12d
addl %r15d, %r12d
addl %ebp, %r12d
movl 0x34(%r14), %esi
movq %rbx, %rdi
callq 0x55da8
addl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_int
int cram_beta_encode_int(cram_slice *slice, cram_codec *c,
			 char *in, int in_size) {
    int *syms = (int *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
	r |= store_bits_MSB(c->out, syms[i] + c->e_beta.offset,
			    c->e_beta.nbits);

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %ecx, %ecx
jle 0x8879d
movq %rdx, %rbx
movq %rsi, %r14
movl %ecx, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%r14), %rdi
movl 0x30(%r14), %esi
addl (%rbx,%r12,4), %esi
movl 0x34(%r14), %edx
callq 0x887aa
orl %eax, %ebp
incq %r12
cmpq %r12, %r15
jne 0x8877c
jmp 0x8879f
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_char
int cram_beta_encode_char(cram_slice *slice, cram_codec *c,
			  char *in, int in_size) {
    unsigned char *syms = (unsigned char *)in;
    int i, r = 0;

    for (i = 0; i < in_size; i++)
	r |= store_bits_MSB(c->out, syms[i] + c->e_beta.offset,
			    c->e_beta.nbits);

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %ecx, %ecx
jle 0x8893d
movq %rdx, %rbx
movq %rsi, %r14
movl %ecx, %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x8(%r14), %rdi
movzbl (%rbx,%r12), %esi
addl 0x30(%r14), %esi
movl 0x34(%r14), %edx
callq 0x887aa
orl %eax, %ebp
incq %r12
cmpq %r12, %r15
jne 0x8891b
jmp 0x8893f
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_encode_init
cram_codec *cram_beta_encode_init(cram_stats *st,
				  enum cram_external_type option,
				  void *dat,
				  int version) {
    cram_codec *c;
    int min_val, max_val, len = 0;

    c = malloc(sizeof(*c));
    if (!c)
	return NULL;
    c->codec  = E_BETA;
    c->free   = cram_beta_encode_free;
    if (option == E_INT)
	c->encode = cram_beta_encode_int;
    else
	c->encode = cram_beta_encode_char;
    c->store  = cram_beta_encode_store;

    if (dat) {
	min_val = ((int *)dat)[0];
	max_val = ((int *)dat)[1];
    } else {
	min_val = INT_MAX;
	max_val = INT_MIN;
	int i;
	for (i = 0; i < MAX_STAT_VAL; i++) {
	    if (!st->freqs[i])
		continue;
	    if (min_val > i)
		min_val = i;
	    max_val = i;
	}
	if (st->h) {
	    khint_t k;

	    for (k = kh_begin(st->h); k != kh_end(st->h); k++) {
		if (!kh_exist(st->h, k))
		    continue;
	    
		i = kh_key(st->h, k);
		if (min_val > i)
		    min_val = i;
		if (max_val < i)
		    max_val = i;
	    }
	}
    }

    assert(max_val >= min_val);
    c->e_beta.offset = -min_val;
    max_val -= min_val;
    while (max_val) {
	len++;
	max_val >>= 1;
    }
    c->e_beta.nbits = len;

    return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x889d5
movl $0x6, (%rax)
leaq -0x32(%rip), %rcx       # 0x8894a
movq %rcx, 0x10(%rax)
cmpl $0x1, %ebp
leaq -0x228(%rip), %rcx      # 0x88762
leaq -0x90(%rip), %rdx       # 0x88901
cmoveq %rcx, %rdx
movq %rdx, 0x20(%rax)
leaq -0x3cd(%rip), %rcx      # 0x885d3
movq %rcx, 0x28(%rax)
testq %r14, %r14
je 0x889da
movl (%r14), %esi
movl 0x4(%r14), %edx
cmpl %esi, %edx
jl 0x88a5d
movl %esi, %ecx
negl %ecx
movl %ecx, 0x30(%rax)
xorl %ecx, %ecx
subl %esi, %edx
je 0x889d2
movl %edx, %esi
incl %ecx
sarl %esi
cmpl $0x1, %edx
movl %esi, %edx
ja 0x889c7
movl %ecx, 0x34(%rax)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0x80000000, %edx       # imm = 0x80000000
xorl %ecx, %ecx
movl %esi, %edi
cmpl %ecx, %esi
movl %ecx, %esi
cmovll %edi, %esi
cmpl $0x0, (%rbx,%rcx,4)
cmovel %edi, %esi
cmovnel %ecx, %edx
incq %rcx
cmpq $0x400, %rcx            # imm = 0x400
jne 0x889e6
movq 0x1000(%rbx), %rdi
testq %rdi, %rdi
je 0x889b0
movl (%rdi), %r8d
testq %r8, %r8
je 0x889b0
movq 0x10(%rdi), %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
movl %r11d, %ecx
shrl $0x4, %ecx
movl (%r9,%rcx,4), %ebx
movl %r10d, %ecx
andb $0x1e, %cl
shrl %cl, %ebx
testb $0x3, %bl
jne 0x88a4c
movq 0x18(%rdi), %rcx
movl (%rcx,%r11,4), %ecx
cmpl %ecx, %esi
cmovgel %ecx, %esi
cmpl %ecx, %edx
cmovlel %ecx, %edx
incq %r11
addl $0x2, %r10d
cmpq %r11, %r8
jne 0x88a23
jmp 0x889b0
leaq 0x13108(%rip), %rdi     # 0x9bb6c
leaq 0x13114(%rip), %rsi     # 0x9bb7f
leaq 0x13120(%rip), %rcx     # 0x9bb92
movl $0x293, %edx            # imm = 0x293
callq 0x6460
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_gamma_decode_init
cram_codec *cram_gamma_decode_init(char *data, int size,
				   enum cram_external_type option,
				   int version) {
    cram_codec *c;
    char *cp = data;

    if (!(c = malloc(sizeof(*c))))
	return NULL;

    c->codec  = E_GAMMA;
    c->decode = cram_gamma_decode;
    c->free   = cram_gamma_decode_free;
    
    cp += itf8_get(cp, &c->gamma.offset);

    if (cp - data != size) {
	fprintf(stderr, "Malformed gamma header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x89006
movl $0x9, (%rax)
leaq -0x13f(%rip), %rcx      # 0x88e0a
movq %rcx, 0x18(%rax)
leaq -0x3e(%rip), %rcx       # 0x88f16
movq %rcx, 0x10(%rax)
movzbl (%r14), %ecx
movl $0x1, %edx
testb %cl, %cl
jns 0x88ff3
movzbl 0x1(%r14), %edx
cmpb $-0x41, %cl
ja 0x88f82
andl $0x3f, %ecx
shll $0x8, %ecx
orl %edx, %ecx
movl $0x2, %edx
jmp 0x88ff3
cmpb $-0x21, %cl
ja 0x88fa0
shll $0x8, %edx
movzbl 0x2(%r14), %esi
andl $0x1f, %ecx
shll $0x10, %ecx
orl %edx, %ecx
orl %esi, %ecx
movl $0x3, %edx
jmp 0x88ff3
cmpb $-0x11, %cl
ja 0x88fc8
shll $0x10, %edx
movzbl 0x2(%r14), %esi
shll $0x8, %esi
movzbl 0x3(%r14), %edi
andl $0xf, %ecx
shll $0x18, %ecx
orl %edx, %ecx
orl %esi, %ecx
orl %edi, %ecx
movl $0x4, %edx
jmp 0x88ff3
shll $0x1c, %ecx
shll $0x14, %edx
orl %ecx, %edx
movzbl 0x2(%r14), %ecx
shll $0xc, %ecx
orl %edx, %ecx
movzbl 0x3(%r14), %edx
shll $0x4, %edx
orl %ecx, %edx
movzbl 0x4(%r14), %ecx
andl $0xf, %ecx
orl %edx, %ecx
movl $0x5, %edx
movl %ecx, 0x30(%rax)
movslq %ebx, %rcx
cmpq %rcx, %rdx
je 0x89008
movq %rax, %rdi
callq 0x851f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_free
void cram_huffman_decode_free(cram_codec *c) {
    if (!c)
	return;

    if (c->huffman.codes)
	free(c->huffman.codes);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x89030
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x89027
callq 0x68a0
movq %rbx, %rdi
popq %rbx
jmp 0x68a0
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_char0
int cram_huffman_decode_char0(cram_slice *slice, cram_codec *c,
			      cram_block *in, char *out, int *out_size) {
    int i, n;

    /* Special case of 0 length codes */
    for (i = 0, n = *out_size; i < n; i++) {
	out[i] = c->huffman.codes[0].symbol;
    }
    return 0;
}

// Assembly:
movslq (%r8), %rax
testq %rax, %rax
jle 0x89054
xorl %edx, %edx
movq 0x38(%rsi), %rdi
movb (%rdi), %dil
movb %dil, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x89041
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_huffman_decode_char
int cram_huffman_decode_char(cram_slice *slice, cram_codec *c,
			     cram_block *in, char *out, int *out_size) {
    int i, n, ncodes = c->huffman.ncodes;
    const cram_huffman_code * const codes = c->huffman.codes;

    for (i = 0, n = *out_size; i < n; i++) {
	int idx = 0;
	int val = 0, len = 0, last_len = 0;

	for (;;) {
	    int dlen = codes[idx].len - last_len;
	    if (cram_not_enough_bits(in, dlen))
		return -1;

	    //val <<= dlen;
	    //val  |= get_bits_MSB(in, dlen);
	    //last_len = (len += dlen);

	    last_len = (len += dlen);
	    for (; dlen; dlen--) GET_BIT_MSB(in, val);

	    idx = val - codes[idx].p;
	    if (idx >= ncodes || idx < 0)
		return -1;

	    if (codes[idx].code == val && codes[idx].len == len) {
		out[i] = codes[idx].symbol;
		break;
	    }
	}
    }

    return 0;
}

// Assembly:
movslq (%r8), %rdi
testq %rdi, %rdi
jle 0x8918b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x30(%rsi), %r8d
movq 0x38(%rsi), %rsi
xorl %r9d, %r9d
movq %rcx, -0x10(%rsp)
movl 0xc(%rsi), %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r15d, %r15d
js 0x89180
movq %r9, -0x8(%rsp)
movslq 0x14(%rdx), %r10
movq 0x30(%rdx), %r11
xorl %ebx, %ebx
movl %r15d, %ebp
movq %rsi, %r14
testl %r15d, %r15d
je 0x890b2
cmpq %r11, %r10
jbe 0x89180
movq %r10, %r12
subq %r11, %r12
cmpq $0x10000000, %r12       # imm = 0x10000000
ja 0x890dc
movslq 0x38(%rdx), %r13
leaq -0x7(,%r12,8), %r12
addq %r13, %r12
movl %r15d, %r13d
cmpq %r13, %r12
jb 0x89180
testl %r15d, %r15d
je 0x8911d
movq 0x20(%rdx), %r12
movl 0x38(%rdx), %r13d
movzbl (%r12,%r11), %r9d
xorl %ecx, %ecx
btl %r13d, %r9d
setb %cl
leal (%rcx,%rbx,2), %ebx
xorl %ecx, %ecx
testl %r13d, %r13d
leal -0x1(%r13), %r9d
setle %cl
addq %rcx, %r11
movq %r11, 0x30(%rdx)
andl $0x7, %r9d
movl %r9d, 0x38(%rdx)
movl %r9d, %r13d
decl %r15d
jne 0x890e9
movl %ebx, %r15d
subl 0x4(%r14), %r15d
cmpl %r8d, %r15d
jge 0x89180
testl %r15d, %r15d
js 0x89180
movl %r15d, %ecx
shlq $0x4, %rcx
leaq (%rsi,%rcx), %r14
movl 0x8(%rsi,%rcx), %r9d
xorl %ebx, %r9d
movl 0xc(%rsi,%rcx), %r12d
movl %r12d, %ecx
xorl %ebp, %ecx
orl %r9d, %ecx
je 0x89161
movl %r12d, %r15d
subl %ebp, %r15d
movl %r12d, %ebp
jns 0x890a4
jmp 0x89180
movb (%r14), %al
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %r9
movb %al, (%rcx,%r9)
incq %r9
xorl %eax, %eax
cmpq %rdi, %r9
jne 0x8907d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_huffman_encode_char
int cram_huffman_encode_char(cram_slice *slice, cram_codec *c,
			     char *in, int in_size) {
    int i, code, len, r = 0;
    unsigned char *syms = (unsigned char *)in;

    while (in_size--) {
	int sym = *syms++;
	if (sym >= -1 && sym < MAX_HUFF) {
	    i = c->e_huffman.val2code[sym+1];
	    assert(c->e_huffman.codes[i].symbol == sym);
	    code = c->e_huffman.codes[i].code;
	    len  = c->e_huffman.codes[i].len;
	} else {
	    /* Slow - use a lookup table for when sym < MAX_HUFF? */
	    for (i = 0; i < c->e_huffman.nvals; i++) {
		if (c->e_huffman.codes[i].symbol == sym)
		    break;
	    }
	    if (i == c->e_huffman.nvals)
		return -1;
    
	    code = c->e_huffman.codes[i].code;
	    len  = c->e_huffman.codes[i].len;
	}

	r |= store_bits_MSB(c->out, code, len);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %ecx, %ecx
je 0x89a1b
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
movzbl (%r14), %eax
testb %al, %al
js 0x899c7
movslq 0x40(%r15,%rax,4), %rdx
movq 0x30(%r15), %rcx
shlq $0x4, %rdx
cmpl %eax, (%rcx,%rdx)
jne 0x89a2a
addq %rdx, %rcx
jmp 0x899f8
movslq 0x38(%r15), %rcx
testq %rcx, %rcx
jle 0x899e8
movq 0x30(%r15), %rsi
xorl %edx, %edx
cmpl %eax, (%rsi)
je 0x899ea
incq %rdx
addq $0x10, %rsi
cmpq %rdx, %rcx
jne 0x899d6
jmp 0x89a14
xorl %edx, %edx
cmpl %ecx, %edx
je 0x89a14
movl %edx, %ecx
shlq $0x4, %rcx
addq 0x30(%r15), %rcx
decl %ebp
incq %r14
movl 0x8(%rcx), %esi
movl 0xc(%rcx), %edx
movq 0x8(%r15), %rdi
callq 0x887aa
orl %eax, %ebx
testl %ebp, %ebp
jne 0x899a8
jmp 0x89a1d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x89a1d
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12217(%rip), %rdi     # 0x9bc48
leaq 0x12147(%rip), %rsi     # 0x9bb7f
leaq 0x1222d(%rip), %rcx     # 0x9bc6c
movl $0x431, %edx            # imm = 0x431
callq 0x6460
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_huffman_encode_free
void cram_huffman_encode_free(cram_codec *c) {
    if (!c)
	return;

    if (c->e_huffman.codes)
	free(c->e_huffman.codes);
    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x89b2f
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x89b26
callq 0x68a0
movq %rbx, %rdi
popq %rbx
jmp 0x68a0
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_decode
int cram_byte_array_len_decode(cram_slice *slice, cram_codec *c,
			       cram_block *in, char *out,
			       int *out_size) {
    /* Fetch length */
    int32_t len = 0, one = 1;
    int r;

    r = c->byte_array_len.len_codec->decode(slice, c->byte_array_len.len_codec,
                                            in, (char *)&len, &one);
    //printf("ByteArray Len=%d\n", len);

    if (!r && c->byte_array_len.val_codec && len >= 0) {
	r = c->byte_array_len.val_codec->decode(slice,
						c->byte_array_len.val_codec,
						in, out, &len);
    } else {
	return -1;
    }

    *out_size = len;

    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
leaq 0x8(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0xc(%rsp), %r8
movl $0x1, (%r8)
movq 0x30(%rsi), %rsi
callq *0x18(%rsi)
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x8a4e8
movq 0x38(%r13), %rsi
testq %rsi, %rsi
je 0x8a4e8
cmpl $0x0, 0x8(%rsp)
js 0x8a4e8
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
callq *0x18(%rsi)
movl (%r13), %ecx
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_decode_free
void cram_byte_array_len_decode_free(cram_codec *c) {
    if (!c) return;

    if (c->byte_array_len.len_codec)
	c->byte_array_len.len_codec->free(c->byte_array_len.len_codec);

    if (c->byte_array_len.val_codec)
	c->byte_array_len.val_codec->free(c->byte_array_len.val_codec);

    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x8a520
pushq %rbx
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
testq %rdi, %rdi
je 0x8a50b
callq *0x10(%rdi)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x8a517
callq *0x10(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x68a0
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_decoder_init
cram_codec *cram_decoder_init(enum cram_encoding codec,
			      char *data, int size,
			      enum cram_external_type option,
			      int version) {
    if (codec >= E_NULL && codec < E_NUM_CODECS && decode_init[codec]) {
	return decode_init[codec](data, size, option, version);
    } else {
	fprintf(stderr, "Unimplemented codec of type %s\n", codec2str(codec));
	return NULL;
    }
}

// Assembly:
cmpl $0x9, %edi
ja 0x8a990
movl $0x105, %eax            # imm = 0x105
btq %rdi, %rax
jb 0x8a990
movl %edi, %eax
leaq 0x3431e(%rip), %r9      # 0xbeca0
movq %rsi, %rdi
movl %edx, %esi
movl %ecx, %edx
movl %r8d, %ecx
jmpq *(%r9,%rax,8)
pushq %rax
callq 0x85e2
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_free
void cram_byte_array_len_encode_free(cram_codec *c) {
    if (!c)
	return;

    if (c->e_byte_array_len.len_codec)
	c->e_byte_array_len.len_codec->free(c->e_byte_array_len.len_codec);

    if (c->e_byte_array_len.val_codec)
	c->e_byte_array_len.val_codec->free(c->e_byte_array_len.val_codec);

    free(c);
}

// Assembly:
testq %rdi, %rdi
je 0x8aa0e
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x8a9f9
callq *0x10(%rdi)
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x8aa05
callq *0x10(%rdi)
movq %rbx, %rdi
popq %rbx
jmp 0x68a0
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_len_encode_init
cram_codec *cram_byte_array_len_encode_init(cram_stats *st,
					    enum cram_external_type option,
					    void *dat,
					    int version) {
    cram_codec *c;
    cram_byte_array_len_encoder *e = (cram_byte_array_len_encoder *)dat;

    c = malloc(sizeof(*c));
    if (!c)
	return NULL;
    c->codec = E_BYTE_ARRAY_LEN;
    c->free = cram_byte_array_len_encode_free;
    c->encode = cram_byte_array_len_encode;
    c->store = cram_byte_array_len_encode_store;

    c->e_byte_array_len.len_codec = cram_encoder_init(e->len_encoding,
						      NULL, E_INT, 
						      e->len_dat,
						      version);
    c->e_byte_array_len.val_codec = cram_encoder_init(e->val_encoding,
						      NULL, E_BYTE_ARRAY, 
						      e->val_dat,
						      version);

    return c;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
movq %rax, %rbx
testq %rax, %rax
je 0x8ad54
movl $0x4, (%rbx)
leaq -0x321(%rip), %rax      # 0x8a9e4
movq %rax, 0x10(%rbx)
leaq -0x376(%rip), %rax      # 0x8a99a
movq %rax, 0x20(%rbx)
leaq -0x30c(%rip), %rax      # 0x8aa0f
movq %rax, 0x28(%rbx)
movl (%r14), %edi
movq 0x8(%r14), %rcx
xorl %esi, %esi
movl $0x1, %edx
movl %ebp, %r8d
callq 0x8ad5c
movq %rax, 0x48(%rbx)
movl 0x4(%r14), %edi
movq 0x10(%r14), %rcx
xorl %esi, %esi
movl $0x4, %edx
movl %ebp, %r8d
callq 0x8ad5c
movq %rax, 0x50(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_encoder_init
cram_codec *cram_encoder_init(enum cram_encoding codec,
			      cram_stats *st,
			      enum cram_external_type option,
			      void *dat,
			      int version) {
    if (st && !st->nvals)
	return NULL;

    if (encode_init[codec]) {
	cram_codec *r;
	if ((r = encode_init[codec](st, option, dat, version)))
	    r->out = NULL;
	return r;
    } else {
	fprintf(stderr, "Unimplemented codec of type %s\n", codec2str(codec));
	abort();
    }
}

// Assembly:
pushq %rax
testq %rsi, %rsi
je 0x8ad6b
cmpl $0x0, 0x100c(%rsi)
je 0x8ad9d
movl $0x385, %eax            # imm = 0x385
btq %rdi, %rax
jb 0x8ada1
movl %edi, %eax
leaq 0x33f71(%rip), %r9      # 0xbecf0
movq %rsi, %rdi
movl %edx, %esi
movq %rcx, %rdx
movl %r8d, %ecx
callq *(%r9,%rax,8)
testq %rax, %rax
je 0x8ad9d
movq $0x0, 0x8(%rax)
jmp 0x8ad9f
xorl %eax, %eax
popq %rcx
retq
callq 0x8617
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_decode_init
cram_codec *cram_byte_array_stop_decode_init(char *data, int size,
					     enum cram_external_type option,
					     int version) {
    cram_codec *c;
    unsigned char *cp = (unsigned char *)data;

    if (!(c = malloc(sizeof(*c))))
	return NULL;

    c->codec  = E_BYTE_ARRAY_STOP;
    switch (option) {
    case E_BYTE_ARRAY_BLOCK:
        c->decode = cram_byte_array_stop_decode_block;
	break;
    case E_BYTE_ARRAY:
        c->decode = cram_byte_array_stop_decode_char;
	break;
    default:
        fprintf(stderr, "byte_array_stop codec only supports BYTE_ARRAYs.\n");
        free(c);
        return NULL;
    }
    c->free   = cram_byte_array_stop_decode_free;
    
    c->byte_array_stop.stop = *cp++;
    if (CRAM_MAJOR_VERS(version) == 1) {
	c->byte_array_stop.content_id = cp[0] + (cp[1]<<8) + (cp[2]<<16)
	    + (cp[3]<<24);
	cp += 4;
    } else {
	cp += itf8_get(cp, &c->byte_array_stop.content_id);
    }

    if ((char *)cp - data != size) {
	fprintf(stderr, "Malformed byte_array_stop header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x8b146
movq %rax, %rbx
movl $0x5, (%rax)
cmpl $0x5, %r12d
je 0x8b047
cmpl $0x4, %r12d
jne 0x8b0f6
leaq 0x10f(%rip), %rax       # 0x8b154
jmp 0x8b04e
leaq -0x2a8(%rip), %rax      # 0x8ada6
movq %rax, 0x18(%rbx)
leaq -0x64(%rip), %rax       # 0x8aff5
movq %rax, 0x10(%rbx)
movb (%r14), %al
movb %al, 0x30(%rbx)
andl $0xffffff00, %r15d      # imm = 0xFFFFFF00
cmpl $0x100, %r15d           # imm = 0x100
jne 0x8b083
movl 0x1(%r14), %eax
movl %eax, 0x34(%rbx)
leaq 0x5(%r14), %rax
jmp 0x8b12e
leaq 0x1(%r14), %rax
movzbl (%rax), %ecx
movl $0x1, %edx
testb %cl, %cl
jns 0x8b128
movzbl 0x2(%r14), %edx
cmpb $-0x41, %cl
ja 0x8b0b0
andl $0x3f, %ecx
shll $0x8, %ecx
orl %edx, %ecx
movl $0x2, %edx
jmp 0x8b128
cmpb $-0x21, %cl
ja 0x8b0ce
shll $0x8, %edx
movzbl 0x3(%r14), %esi
andl $0x1f, %ecx
shll $0x10, %ecx
orl %edx, %ecx
orl %esi, %ecx
movl $0x3, %edx
jmp 0x8b128
cmpb $-0x11, %cl
ja 0x8b0fd
shll $0x10, %edx
movzbl 0x3(%r14), %esi
shll $0x8, %esi
movzbl 0x4(%r14), %edi
andl $0xf, %ecx
shll $0x18, %ecx
orl %edx, %ecx
orl %esi, %ecx
orl %edi, %ecx
movl $0x4, %edx
jmp 0x8b128
callq 0x865c
jmp 0x8b13e
shll $0x1c, %ecx
shll $0x14, %edx
orl %ecx, %edx
movzbl 0x3(%r14), %ecx
shll $0xc, %ecx
orl %edx, %ecx
movzbl 0x4(%r14), %edx
shll $0x4, %edx
orl %ecx, %edx
movzbl 0x5(%r14), %ecx
andl $0xf, %ecx
orl %edx, %ecx
movl $0x5, %edx
movl %ecx, 0x34(%rbx)
addq %rdx, %rax
subq %r14, %rax
movslq %ebp, %rcx
cmpq %rcx, %rax
je 0x8b148
callq 0x8640
movq %rbx, %rdi
callq 0x68a0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_decode_char
static int cram_byte_array_stop_decode_char(cram_slice *slice, cram_codec *c,
					    cram_block *in, char *out,
					    int *out_size) {
    cram_block *b = NULL;
    char *cp, ch;

    b = cram_get_block_by_id(slice, c->byte_array_stop.content_id);
    if (!b)
        return *out_size?-1:0;

    if (b->idx >= b->uncomp_size)
	return -1;

    cp = (char *)b->data + b->idx;
    while ((ch = *cp) != (char)c->byte_array_stop.stop) {
	if (cp - (char *)b->data >= b->uncomp_size)
	    return -1;
	*out++ = ch;
	cp++;
    }

    *out_size = cp - (char *)(b->data + b->idx);
    b->idx = cp - (char *)b->data + 1;

    return 0;
}

// Assembly:
pushq %rbx
movl 0x34(%rsi), %eax
cmpq $0x400, %rax            # imm = 0x400
setb %r9b
movq 0x18(%rdi), %rdx
testq %rdx, %rdx
setne %r10b
testb %r10b, %r9b
je 0x8b1ec
movq (%rdx,%rax,8), %rdx
testq %rdx, %rdx
je 0x8b21f
movslq 0x1c(%rdx), %r11
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl 0x14(%rdx), %r11d
jge 0x8b226
movq 0x20(%rdx), %r9
leaq (%r9,%r11), %rdi
movb (%r9,%r11), %r10b
cmpb 0x30(%rsi), %r10b
je 0x8b1d5
addq %r11, %r9
movq %r9, %r11
subq 0x20(%rdx), %r11
movslq 0x14(%rdx), %rbx
cmpq %rbx, %r11
jge 0x8b226
movb %r10b, (%rcx)
incq %rcx
movb 0x1(%rdi), %r10b
incq %rdi
incq %r9
cmpb 0x30(%rsi), %r10b
jne 0x8b1a7
movq 0x20(%rdx), %r9
movslq 0x1c(%rdx), %r11
addl %r9d, %r11d
movl %edi, %eax
subl %r11d, %eax
movl %eax, (%r8)
subl %r9d, %edi
incl %edi
movl %edi, 0x1c(%rdx)
xorl %eax, %eax
jmp 0x8b226
movq (%rdi), %rdx
movslq 0x20(%rdx), %r9
testq %r9, %r9
jle 0x8b21f
movq 0x10(%rdi), %rdi
xorl %r10d, %r10d
movq (%rdi,%r10,8), %rdx
testq %rdx, %rdx
je 0x8b217
cmpl $0x4, 0x8(%rdx)
jne 0x8b217
cmpl %eax, 0xc(%rdx)
je 0x8b17f
incq %r10
cmpq %r10, %r9
jne 0x8b1ff
xorl %eax, %eax
cmpl (%r8), %eax
sbbl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_byte_array_stop_encode_init
cram_codec *cram_byte_array_stop_encode_init(cram_stats *st,
					     enum cram_external_type option,
					     void *dat,
					     int version) {
    cram_codec *c;

    c = malloc(sizeof(*c));
    if (!c)
	return NULL;
    c->codec = E_BYTE_ARRAY_STOP;
    c->free = cram_byte_array_stop_encode_free;
    c->encode = cram_byte_array_stop_encode;
    c->store = cram_byte_array_stop_encode_store;

    c->e_byte_array_stop.stop = ((int *)dat)[0];
    c->e_byte_array_stop.content_id = ((int *)dat)[1];

    return c;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movl $0x240, %edi            # imm = 0x240
callq 0x69d0
testq %rax, %rax
je 0x8b733
movl $0x5, (%rax)
leaq -0x362(%rip), %rcx      # 0x8b3ac
movq %rcx, 0x10(%rax)
leaq -0x4f1(%rip), %rcx      # 0x8b228
movq %rcx, 0x20(%rax)
leaq -0x36e(%rip), %rcx      # 0x8b3b6
movq %rcx, 0x28(%rax)
movb (%rbx), %cl
movb %cl, 0x30(%rax)
movl 0x4(%rbx), %ecx
movl %ecx, 0x34(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_codec_to_id
int cram_codec_to_id(cram_codec *c, int *id2) {
    int bnum1, bnum2 = -2;

    switch (c->codec) {
    case E_HUFFMAN:
	bnum1 = c->huffman.ncodes == 1 ? -2 : -1;
	break;
    case E_GOLOMB:
    case E_BETA:
    case E_SUBEXP:
    case E_GOLOMB_RICE:
    case E_GAMMA:
	bnum1 = -1;
	break;
    case E_EXTERNAL:
	bnum1 = c->external.content_id;
	break;
    case E_BYTE_ARRAY_LEN:
	bnum1 = cram_codec_to_id(c->byte_array_len.len_codec, NULL);
	bnum2 = cram_codec_to_id(c->byte_array_len.val_codec, NULL);
	break;
    case E_BYTE_ARRAY_STOP:
	bnum1 = c->byte_array_stop.content_id;
	break;
    case E_NULL:
	bnum1 = -2;
	break;
    default:
	fprintf(stderr, "Unknown codec type %d\n", c->codec);
	bnum1 = -1;
    }

    if (id2)
	*id2 = bnum2;
    return bnum1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rdi), %edx
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpq $0x9, %rdx
ja 0x8b7ef
movq %rdi, %r15
leaq 0x1035a(%rip), %rax     # 0x9baec
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
testq %rbx, %rbx
je 0x8b7a3
movl %r14d, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
jmp 0x8b79b
movl 0x34(%r15), %ebp
jmp 0x8b79b
xorl %ebp, %ebp
cmpl $0x1, 0x30(%r15)
sete %bpl
notl %ebp
jmp 0x8b79b
movl 0x30(%r15), %ebp
jmp 0x8b79b
movq 0x30(%r15), %rdi
xorl %esi, %esi
callq 0x8b76b
movl %eax, %ebp
movq 0x38(%r15), %rdi
xorl %esi, %esi
callq 0x8b76b
movl %eax, %r14d
jmp 0x8b79b
movq 0x337e2(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x1066b(%rip), %rsi     # 0x9be6b
xorl %eax, %eax
callq 0x6a90
jmp 0x8b79b
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/codegen.c
// Function: fiu_init_final
static void constructor_attr(250) _fiu_init_final(void)
{
	struct timeval tv;

	rec_inc();

	fiu_init(0);

	/* since we use random() in the wrappers, we need to seed it */
	gettimeofday(&tv, NULL);
	srandom(tv.tv_usec);

	rec_dec();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x16cd6(%rip), %rdi     # 0x19ff0
callq 0x3130
movq %rax, %rbx
incl (%rax)
xorl %edi, %edi
callq 0x3090
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x30f0
movl 0x8(%r14), %edi
callq 0x3060
decl (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/modules/posix.custom.c
// Function: set_ferror
void set_ferror(void * stream)
{
	char key[STREAM_KEY_SIZE];
	stream_to_key(stream, key);

	pthread_once(&ferror_hash_table_is_initialized,
			_fiu_init_ferror_hash_table);

	pthread_mutex_lock(&ferror_hash_table_mutex);

	// Use a dummy the value; we don't care about it, we only need to be able to
	// distinguish it from NULL.
	hash_set(ferror_hash_table, key, (void *) 0xDEAD);

	pthread_mutex_unlock(&ferror_hash_table_mutex);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rcx
leaq 0x346b(%rip), %rdx      # 0x1323c
movq %rsp, %rbx
movl $0x11, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30e0
leaq 0xa33e(%rip), %rdi      # 0x1a128
leaq 0x38(%rip), %rsi        # 0xfe29
callq 0x3200
leaq 0xa333(%rip), %r14      # 0x1a130
movq %r14, %rdi
callq 0x3210
movq 0xa34c(%rip), %rdi      # 0x1a158
movl $0xdead, %edx           # imm = 0xDEAD
movq %rbx, %rsi
callq 0x3150
movq %r14, %rdi
callq 0x3170
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/modules/posix.custom.c
// Function: fiu_init_ferror_hash_table
static void _fiu_init_ferror_hash_table(void)
{
	rec_inc();
	pthread_mutex_lock(&ferror_hash_table_mutex);

	// Create the hash table. No need for a value destructor, as our values
	// are not pointers but static values.
	ferror_hash_table = hash_create(NULL);

	pthread_mutex_unlock(&ferror_hash_table_mutex);
	rec_dec();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xa1bb(%rip), %rdi      # 0x19ff0
callq 0x3130
movq %rax, %rbx
incl (%rax)
leaq 0xa2e7(%rip), %r14      # 0x1a130
movq %r14, %rdi
callq 0x3210
xorl %edi, %edi
callq 0x30b0
movq %rax, 0xa2f9(%rip)      # 0x1a158
movq %r14, %rdi
callq 0x3170
decl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/modules/posix.custom.c
// Function: clear_ferror
static void clear_ferror(void * stream)
{
	char key[STREAM_KEY_SIZE];
	stream_to_key(stream, key);

	pthread_once(&ferror_hash_table_is_initialized,
			_fiu_init_ferror_hash_table);

	pthread_mutex_lock(&ferror_hash_table_mutex);

	hash_del(ferror_hash_table, key);

	pthread_mutex_unlock(&ferror_hash_table_mutex);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rcx
leaq 0x30f3(%rip), %rdx      # 0x1323c
movq %rsp, %rbx
movl $0x11, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30e0
leaq 0x9fc6(%rip), %rdi      # 0x1a128
leaq -0x340(%rip), %rsi      # 0xfe29
callq 0x3200
leaq 0x9fbb(%rip), %r14      # 0x1a130
movq %r14, %rdi
callq 0x3210
movq 0x9fd4(%rip), %rdi      # 0x1a158
movq %rbx, %rsi
callq 0x3190
movq %r14, %rdi
callq 0x3170
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: hash_create
struct hash *hash_create(void (*destructor)(void *))
{
	struct hash *h = malloc(sizeof(struct hash));
	if (h == NULL)
		return NULL;

	h->entries = malloc(sizeof(struct entry) * MIN_SIZE);
	if (h->entries == NULL) {
		free(h);
		return NULL;
	}

	memset(h->entries, 0, sizeof(struct entry) * MIN_SIZE);

	h->table_size = MIN_SIZE;
	h->nentries = 0;
	h->nremoved = 0;

	if (destructor == NULL)
		destructor = dumb_destructor;

	h->destructor = destructor;

	return h;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x28, %edi
callq 0x3220
testq %rax, %rax
je 0x10fd7
movq %rax, %rbx
movl $0x1, %edi
movl $0xf0, %esi
callq 0x3070
movq %rax, (%rbx)
testq %rax, %rax
je 0x10fcf
testq %r14, %r14
leaq 0x2e(%rip), %rax        # 0x10fe4
cmovneq %r14, %rax
movq $0xa, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rax, 0x20(%rbx)
jmp 0x10fd9
movq %rbx, %rdi
callq 0x3030
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: hash_free
void hash_free(struct hash *h)
{
	size_t i;
	struct entry *entry;

	for (i = 0; i < h->table_size; i++) {
		entry = h->entries + i;
		if (entry->in_use == IN_USE) {
			h->destructor(entry->value);
			free(entry->key);
		}
	}

	free(h->entries);
	free(h);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1102e
movl $0x10, %r14d
xorl %r15d, %r15d
movq (%rbx), %r12
cmpl $0x1, (%r12,%r14)
jne 0x11022
movq -0x8(%r12,%r14), %rdi
callq *0x20(%rbx)
movq -0x10(%r12,%r14), %rdi
callq 0x3030
movq 0x8(%rbx), %rax
incq %r15
addq $0x18, %r14
cmpq %rax, %r15
jb 0x11002
movq (%rbx), %rdi
callq 0x3030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3030
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: hash_get
void *hash_get(struct hash *h, const char *key)
{
	size_t pos;
	struct entry *entry;

	pos = murmurhash2(key, strlen(key)) % h->table_size;

	for (int i = 0; i < h->table_size; i++) {
		entry = h->entries + pos;
		if (entry->in_use == NEVER) {
			/* We got to a entry never used, no match. */
			return NULL;
		} else if (entry->in_use == IN_USE &&
		           strcmp(key, entry->key) == 0) {
			/* The key matches. */
			return entry->value;
		}

		/* The key doesn't match this entry, continue with linear
		 * probing. */
		pos = (pos + 1) % h->table_size;
	}

	/* We went through the entire table and did not find the key.
	 * Note this is a pathological case that we don't expect would happen
	 * under normal operation, since we resize the table so there are
	 * always some never-used spaces. */
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x30c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x110e1
movl %eax, %r15d
movq (%r14), %r12
movq 0x8(%r14), %r13
cmpq $0x1, %r13
movq %r13, %rbp
adcq $0x0, %rbp
movq $0x0, (%rsp)
movq %r15, %rax
xorl %edx, %edx
divq %r13
movq %rdx, %r15
leaq (%rdx,%rdx,2), %rax
movl 0x10(%r12,%rax,8), %ecx
cmpl $0x1, %ecx
je 0x110a9
testl %ecx, %ecx
jne 0x110bc
jmp 0x110ce
leaq (%r12,%rax,8), %r14
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3140
testl %eax, %eax
je 0x110c6
incq %r15
decq %rbp
jne 0x1108a
jmp 0x110ce
movq 0x8(%r14), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: hash_set
static bool _hash_set(struct hash *h, char *key, void *value)
{
	size_t pos;
	struct entry *entry;

	pos = murmurhash2(key, strlen(key)) % h->table_size;

	for (int i = 0; i < h->table_size; i++) {
		entry = h->entries + pos;
		if (entry->in_use == NEVER) {
			/* Use only fresh entries, reusing removed ones
			 * introduces significant complications when combined
			 * with the linear probing. */
			entry->in_use = IN_USE;
			entry->key = key;
			entry->value = value;
			h->nentries++;
			return true;
		} else if (entry->in_use == IN_USE &&
		           strcmp(key, entry->key) == 0) {
			/* The key matches, override the value. */
			h->destructor(entry->value);
			entry->value = value;
			return true;
		}

		/* The key doesn't match this entry, continue with linear
		 * probing. */
		pos = (pos + 1) % h->table_size;
	}

	/* We went through the entire table and did not find the key.
	 * Note this is a pathological case that we don't expect would happen
	 * under normal operation, since we resize the table so there are
	 * always some never-used spaces. */
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x30c0
movq %r14, 0x18(%rsp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x110e1
movl %eax, %r12d
movq (%rbx), %r14
movq %rbx, 0x8(%rsp)
movq 0x8(%rbx), %rbx
xorl %esi, %esi
cmpq $0x1, %rbx
sbbq %rbx, %rsi
movb $0x1, %bpl
movl $0x1, %r15d
movq %rsi, 0x20(%rsp)
movq %r12, %rax
xorl %edx, %edx
divq %rbx
movq %rdx, %r12
leaq (%rdx,%rdx,2), %rax
leaq (%r14,%rax,8), %r13
movl 0x10(%r13), %eax
cmpl $0x1, %eax
je 0x11206
testl %eax, %eax
jne 0x1121d
jmp 0x1123b
movq (%r13), %rsi
movq 0x18(%rsp), %rdi
callq 0x3140
movq 0x20(%rsp), %rsi
testl %eax, %eax
je 0x11260
incq %r12
cmpq %r15, %rbx
seta %bpl
leaq (%rsi,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x111e4
xorl %ebp, %ebp
jmp 0x11275
movl $0x1, 0x10(%r13)
movq 0x18(%rsp), %rax
movq %rax, (%r13)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%r13)
movq 0x8(%rsp), %rax
incq 0x10(%rax)
jmp 0x11275
movq 0x8(%r13), %rdi
movq 0x8(%rsp), %rax
callq *0x20(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%r13)
andb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: auto_resize_table
static bool auto_resize_table(hash_t *h)
{
	/* Slots in the table is taken by valid and removed entries.
	 * Since we don't reuse removed slots, we need to also take them into
	 * consideration and shrink if we are accumulating too many.
	 *
	 * This function always resizes to <number of entries> * 2, which
	 * preserves the "at least 30% usable" property both when growing and
	 * shrinking, and makes calculations simpler.
	 */

	/* Maintain at least 30% usable entries. */
	float usable_ratio =
	    (float)(h->table_size - h->nentries - h->nremoved) / h->table_size;
	if (usable_ratio < 0.3) {
		return resize_table(h, h->nentries * 2);
	}

	/* If we have less than 30% used (by valid entries), compact. */
	float entries_ratio = (float)h->nentries / h->table_size;
	if (h->table_size > MIN_SIZE && entries_ratio < 0.3) {
		return resize_table(h, h->nentries * 2);
	}

	return true;
}

// Assembly:
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rdx
addq %rsi, %rdx
movq %rax, %rcx
subq %rdx, %rcx
js 0x112a8
cvtsi2ss %rcx, %xmm1
jmp 0x112bd
movq %rcx, %rdx
shrq %rdx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm1
addss %xmm1, %xmm1
testq %rax, %rax
js 0x112c9
cvtsi2ss %rax, %xmm0
jmp 0x112e0
movq %rax, %rcx
shrq %rcx
movl %eax, %edx
andl $0x1, %edx
orq %rcx, %rdx
cvtsi2ss %rdx, %xmm0
addss %xmm0, %xmm0
divss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm2
movsd 0x2018(%rip), %xmm1     # 0x13308
ucomisd %xmm2, %xmm1
jbe 0x112fe
addq %rsi, %rsi
jmp 0x1156a
cmpq $0xb, %rax
jb 0x1133e
testq %rsi, %rsi
js 0x11313
xorps %xmm2, %xmm2
cvtsi2ss %rsi, %xmm2
jmp 0x1132d
movq %rsi, %rax
shrq %rax
movl %esi, %ecx
andl $0x1, %ecx
orq %rax, %rcx
xorps %xmm2, %xmm2
cvtsi2ss %rcx, %xmm2
addss %xmm2, %xmm2
divss %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x112f6
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: hash_del
bool hash_del(struct hash *h, const char *key)
{
	size_t pos;
	struct entry *entry;
	bool found = false;

	pos = murmurhash2(key, strlen(key)) % h->table_size;

	for (int i = 0; i < h->table_size; i++) {
		entry = h->entries + pos;
		if (entry->in_use == NEVER) {
			/* We got to a never used key, not found. */
			return false;
		} else if (entry->in_use == IN_USE &&
		           strcmp(key, entry->key) == 0) {
			/* The key matches, remove it. */
			found = true;
			break;
		}

		/* The key doesn't match this entry, continue with linear
		 * probing. */
		pos = (pos + 1) % h->table_size;
	}

	if (!found) {
		return false;
	}

	/* Remove the entry */
	free(entry->key);
	h->destructor(entry->value);
	entry->key = NULL;
	entry->value = NULL;
	entry->in_use = REMOVED;
	h->nentries--;
	h->nremoved++;

	if (!auto_resize_table(h))
		return false;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x30c0
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x110e1
movl %eax, %r15d
movq (%rbx), %r13
movq %rbx, 0x8(%rsp)
movq 0x8(%rbx), %rbx
cmpq $0x1, %rbx
movq %rbx, %rbp
adcq $0x0, %rbp
movq %r15, %rax
xorl %edx, %edx
divq %rbx
movq %rdx, %r15
leaq (%rdx,%rdx,2), %rax
movl 0x10(%r13,%rax,8), %ecx
cmpl $0x1, %ecx
je 0x113a6
testl %ecx, %ecx
jne 0x113c5
jmp 0x113cd
leaq (,%rax,8), %r14
addq %r13, %r14
movq (%r14), %r12
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x3140
testl %eax, %eax
je 0x113de
incq %r15
decq %rbp
jne 0x11387
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x3030
movq 0x8(%r14), %rdi
movq 0x8(%rsp), %rbx
callq *0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movl $0x2, 0x10(%r14)
movdqu 0x10(%rbx), %xmm0
paddq 0x1f02(%rip), %xmm0     # 0x13310
movdqu %xmm0, 0x10(%rbx)
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1128a
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: cache_create
struct cache *cache_create()
{
	struct cache *c;

	c = malloc(sizeof(struct cache));
	if (c == NULL)
		return NULL;

	c->hash = hash_create(NULL);
	if (c->hash == NULL) {
		free(c);
		return NULL;
	}

	pthread_rwlock_init(&c->lock, NULL);

	return c;
}

// Assembly:
pushq %rbx
movl $0x48, %edi
callq 0x3220
testq %rax, %rax
je 0x11463
movq %rax, %rbx
xorl %edi, %edi
callq 0x30b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x1145b
movq %rbx, %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x31a0
jmp 0x11465
movq %rbx, %rdi
callq 0x3030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/albertito[P]libfiu/preload/posix/../../libfiu/hash.c
// Function: cache_invalidate
bool cache_invalidate(struct cache *c)
{
	pthread_rwlock_wrlock(&c->lock);
	_cache_invalidate(c);
	pthread_rwlock_unlock(&c->lock);

	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x114b5
movq %r14, %rdi
callq 0x31b0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq