LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_decode.c
// Function: cram_decode_slice_mt
int cram_decode_slice_mt(cram_fd *fd, cram_container *c, cram_slice *s,
			 SAM_hdr *bfd) {
    cram_decode_job *j;
    int nonblock;

    if (!fd->pool)
	return cram_decode_slice(fd, c, s, bfd);

    if (!(j = malloc(sizeof(*j))))
	return -1;

    j->fd = fd;
    j->c  = c;
    j->s  = s;
    j->h  = bfd;
    
    nonblock = t_pool_results_queue_sz(fd->rqueue) ? 1 : 0;

    if (-1 == t_pool_dispatch2(fd->pool, fd->rqueue, cram_decode_slice_thread,
			       j, nonblock)) {
	/* Would block */
	fd->job_pending = j;
    } else {
	fd->job_pending = NULL;
    }

    // flush too
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8860(%rax)
jne 0xb8703
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xb23d0
movl %eax, -0x4(%rbp)
jmp 0xb87d0
movl $0x28, %edi
callq 0x69c0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xb8723
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb87d0
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8868(%rax), %rdi
callq 0x984a0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x8860(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8868(%rax), %rsi
movq -0x30(%rbp), %rcx
movl -0x34(%rbp), %r8d
leaq -0x129(%rip), %rdx      # 0xb8670
callq 0x98bf0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0xb87ba
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88f0(%rax)
jmp 0xb87c9
movq -0x10(%rbp), %rax
movq $0x0, 0x88f0(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_decode.c
// Function: cram_get_bam_seq
int cram_get_bam_seq(cram_fd *fd, bam_seq_t **bam) {
    cram_record *cr;
    cram_container *c;
    cram_slice *s;

    if (!(cr = cram_get_seq(fd)))
	return -1;

    c = fd->ctr;
    s = c->slice;

    return cram_to_bam(fd->header, fd, s, cr, c->curr_rec-1, bam);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb87e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xb930c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb9353
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movl 0x5c(%rax), %r8d
subl $0x1, %r8d
movq -0x18(%rbp), %r9
callq 0xb9360
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/./cram/cram_io.h
// Function: append_uint64
static inline unsigned char *append_uint64(unsigned char *cp, uint64_t i) {
    uint64_t j;

    if (i <= 0xffffffff)
	return append_uint32(cp, i);

    if ((j = i/1000000000) > 1000000000) {
	cp = append_uint32(cp, j/1000000000);
	j %= 1000000000;
	cp = append_sub32(cp, j);
    } else {
	cp = append_uint32(cp, i / 1000000000);
    }
    cp = append_sub32(cp, i % 1000000000);

    return cp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x18(%rbp)
ja 0xba353
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
callq 0xb9e90
movq %rax, -0x8(%rbp)
jmp 0xba3f3
movq -0x18(%rbp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x20(%rbp)
cmpq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
jbe 0xba3b1
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movl %eax, %esi
callq 0xb9e90
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %esi
callq 0xba400
movq %rax, -0x10(%rbp)
jmp 0xba3ce
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movl %eax, %esi
callq 0xb9e90
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movl %edx, %esi
callq 0xba400
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_base
static int cram_add_base(cram_fd *fd, cram_container *c,
			 cram_slice *s, cram_record *r,
			 int pos, char base, char qual) {
    cram_feature f;
    f.B.pos = pos+1;
    f.B.code = 'B';
    f.B.base = base;
    f.B.qual = qual;
    cram_stats_add(c->stats[DS_BA], base);
    cram_stats_add(c->stats[DS_QS], qual);
    BLOCK_APPEND_CHAR(s->qual_blk, qual);
    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movb 0x10(%rbp), %r9b
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movb %al, -0x25(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x42, -0x34(%rbp)
movsbl -0x25(%rbp), %eax
movl %eax, -0x30(%rbp)
movsbl 0x10(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x1b0(%rax), %rdi
movsbl -0x25(%rbp), %esi
callq 0x8c870
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movsbl 0x10(%rbp), %esi
callq 0x8c870
jmp 0xc8d9e
jmp 0xc8da0
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
ja 0xc8e8d
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0xc8e16
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %xmm0
movaps 0xd238(%rip), %xmm1     # 0xd6020
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xd23c(%rip), %xmm1     # 0xd6030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x11865(%rip), %xmm1    # 0xda670
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc8e25
movsd 0x19d9a(%rip), %xmm0    # 0xe2bb8
movsd %xmm0, -0x40(%rbp)
jmp 0xc8e25
movsd -0x40(%rbp), %xmm0
movsd 0x19226(%rip), %xmm2    # 0xe2058
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0xc8da0
jmp 0xc8e8f
movb 0x10(%rbp), %dl
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rsi
movq 0x30(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x30(%rsi)
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0xca800
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_deletion
static int cram_add_deletion(cram_container *c, cram_slice *s, cram_record *r,
			     int pos, int len, char *base) {
    cram_feature f;
    f.D.pos = pos+1;
    f.D.code = 'D';
    f.D.len = len;
    cram_stats_add(c->stats[DS_DL], len);
    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x44, -0x34(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rdi
movl -0x20(%rbp), %esi
callq 0x8c870
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0xca800
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_skip
static int cram_add_skip(cram_container *c, cram_slice *s, cram_record *r,
			     int pos, int len, char *base) {
    cram_feature f;
    f.S.pos = pos+1;
    f.S.code = 'N';
    f.S.len = len;
    cram_stats_add(c->stats[DS_RS], len);
    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x4e, -0x34(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d0(%rax), %rdi
movl -0x20(%rbp), %esi
callq 0x8c870
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0xca800
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_quality
static int cram_add_quality(cram_fd *fd, cram_container *c,
			    cram_slice *s, cram_record *r,
			    int pos, char qual) {
    cram_feature f;
    f.Q.pos = pos+1;
    f.Q.code = 'Q';
    f.Q.qual = qual;
    cram_stats_add(c->stats[DS_QS], qual);
    BLOCK_APPEND_CHAR(s->qual_blk, qual);
    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movb %al, -0x25(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x51, -0x34(%rbp)
movsbl -0x25(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movsbl -0x25(%rbp), %esi
callq 0x8c870
jmp 0xc945f
jmp 0xc9461
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rcx
movq 0x30(%rcx), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
ja 0xc954e
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0xc94d7
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %xmm0
movaps 0xcb77(%rip), %xmm1     # 0xd6020
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xcb7b(%rip), %xmm1     # 0xd6030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x111a4(%rip), %xmm1    # 0xda670
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc94e6
movsd 0x196d9(%rip), %xmm0    # 0xe2bb8
movsd %xmm0, -0x40(%rbp)
jmp 0xc94e6
movsd -0x40(%rbp), %xmm0
movsd 0x18b65(%rip), %xmm2    # 0xe2058
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0xc9461
jmp 0xc9550
movb -0x25(%rbp), %dl
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x70(%rcx), %rsi
movq 0x30(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x30(%rsi)
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0xca800
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_pad
static int cram_add_pad(cram_container *c, cram_slice *s, cram_record *r,
			     int pos, int len, char *base) {
    cram_feature f;
    f.S.pos = pos+1;
    f.S.code = 'P';
    f.S.len = len;
    cram_stats_add(c->stats[DS_PD], len);
    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x50, -0x34(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x1d8(%rax), %rdi
movl -0x20(%rbp), %esi
callq 0x8c870
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0xca800
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_encode.c
// Function: cram_add_feature
static int cram_add_feature(cram_container *c, cram_slice *s,
			    cram_record *r, cram_feature *f) {
    if (s->nfeatures >= s->afeatures) {
	s->afeatures = s->afeatures ? s->afeatures*2 : 1024;
	s->features = realloc(s->features, s->afeatures*sizeof(*s->features));
	if (!s->features)
	    return -1;
    }

    if (!r->nfeature++) {
	r->feature = s->nfeatures;
	cram_stats_add(c->stats[DS_FP], f->X.pos);
    } else {
	cram_stats_add(c->stats[DS_FP],
		       f->X.pos - s->features[r->feature + r->nfeature-2].X.pos);
    }
    cram_stats_add(c->stats[DS_FC], f->X.code);

    s->features[s->nfeatures++] = *f;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x48(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
jl 0xca891
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xca840
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %eax
shll %eax
movl %eax, -0x2c(%rbp)
jmp 0xca84a
movl $0x400, %eax            # imm = 0x400
movl %eax, -0x2c(%rbp)
jmp 0xca84a
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x4c(%rax), %rsi
shlq $0x4, %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0xca88f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xca957
jmp 0xca891
movq -0x20(%rbp), %rcx
movl 0x68(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x68(%rcx)
cmpl $0x0, %eax
jne 0xca8cb
movq -0x18(%rbp), %rax
movl 0x48(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rax
movq 0x1a0(%rax), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %esi
callq 0x8c870
jmp 0xca906
movq -0x10(%rbp), %rax
movq 0x1a0(%rax), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x64(%rcx), %ecx
movq -0x20(%rbp), %rdx
addl 0x68(%rdx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
subl (%rax), %esi
callq 0x8c870
movq -0x10(%rbp), %rax
movq 0x198(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x8c870
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rdx
movl 0x48(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x48(%rdx)
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_samtools.c
// Function: cram_header_to_bam
bam_hdr_t *cram_header_to_bam(SAM_hdr *h) {
    int i;
    bam_hdr_t *header = bam_hdr_init();

    header->l_text = ks_len(&h->text);
    header->text = malloc(header->l_text+1);
    memcpy(header->text, ks_str(&h->text), header->l_text);
    header->text[header->l_text] = 0;

    header->n_targets = h->nref;
    header->target_name = (char **)calloc(header->n_targets,
					  sizeof(char *));
    header->target_len = (uint32_t *)calloc(header->n_targets, 4);

    for (i = 0; i < h->nref; i++) {
	header->target_name[i] = strdup(h->ref[i].name);
	header->target_len[i] = h->ref[i].len;
    }

    return header;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0xa5390
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcb400
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
callq 0x69c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xcb420
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x6570
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movslq (%rax), %rdi
movl $0x8, %esi
callq 0x6460
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movslq (%rax), %rdi
movl $0x4, %esi
callq 0x6460
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0xcb3e8
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x6dd0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %edx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xcb37e
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: kftp_send_cmd
static int kftp_send_cmd(knetFile *ftp, const char *cmd, int is_get)
{
	if (socket_wait(ftp->ctrl_fd, 0) <= 0) return -1; // socket is not ready for writing
    int len = strlen(cmd);
	if ( netwrite(ftp->ctrl_fd, cmd, len) != len ) return -1;
	return is_get? kftp_get_response(ftp) : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edi
xorl %esi, %esi
callq 0xccfd0
cmpl $0x0, %eax
jg 0xcbc9f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcbcf2
movq -0x18(%rbp), %rdi
callq 0x62c0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x6250
movslq -0x20(%rbp), %rcx
cmpq %rcx, %rax
je 0xcbcd1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcbcf2
cmpl $0x0, -0x1c(%rbp)
je 0xcbce5
movq -0x10(%rbp), %rdi
callq 0xcbab0
movl %eax, -0x24(%rbp)
jmp 0xcbcec
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0xcbcec
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: kftp_connect_file
int kftp_connect_file(knetFile *fp)
{
	int ret;
	long long file_size;
	if (fp->fd != -1) {
		netclose(fp->fd);
		if (fp->no_reconnect) kftp_get_response(fp);
	}
	kftp_pasv_prep(fp);
    kftp_send_cmd(fp, fp->size_cmd, 1);
#ifndef _WIN32
    // If the file does not exist, the response will be "550 Could not get file
    // size". Be silent on failure, hts_idx_load can be trying the existence of .csi or .tbi.
    if ( sscanf(fp->response,"%*d %lld", &file_size) != 1 ) return -1;
#else
	const char *p = fp->response;
	while (*p != ' ') ++p;
	while (*p < '0' || *p > '9') ++p;
	file_size = strtoint64(p);
#endif
	fp->file_size = file_size;
	if (fp->offset>=0) {
		char tmp[32];
#ifndef _WIN32
		sprintf(tmp, "REST %lld\r\n", (long long)fp->offset);
#else
		strcpy(tmp, "REST ");
		int64tostr(tmp + 5, fp->offset);
		strcat(tmp, "\r\n");
#endif
		kftp_send_cmd(fp, tmp, 1);
	}
	kftp_send_cmd(fp, fp->retr, 0);
	kftp_pasv_connect(fp);
	ret = kftp_get_response(fp);
	if (ret != 150) {
		fprintf(stderr, "[kftp_connect_file] %s\n", fp->response);
		netclose(fp->fd);
		fp->fd = -1;
		return -1;
	}
	fp->is_ready = 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
je 0xcbf77
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x6e90
movq -0x10(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
je 0xcbf75
movq -0x10(%rbp), %rdi
callq 0xcbab0
jmp 0xcbf77
movq -0x10(%rbp), %rdi
callq 0xcc090
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movl $0x1, %edx
callq 0xcbc70
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x19903(%rip), %rsi     # 0xe58a8
leaq -0x20(%rbp), %rdx
movb $0x0, %al
callq 0x66d0
cmpl $0x1, %eax
je 0xcbfc1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcc087
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jl 0xcc004
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x108aa(%rip), %rsi     # 0xdc895
movb $0x0, %al
callq 0x6160
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x1, %edx
callq 0xcbc70
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
xorl %edx, %edx
callq 0xcbc70
movq -0x10(%rbp), %rdi
callq 0xcc1a0
movq -0x10(%rbp), %rdi
callq 0xcbab0
movl %eax, -0x14(%rbp)
cmpl $0x96, -0x14(%rbp)
je 0xcc075
movq 0x38f94(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
leaq 0x19863(%rip), %rsi     # 0xe58b1
movb $0x0, %al
callq 0x6a80
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x6e90
movq -0x10(%rbp), %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcc087
movq -0x10(%rbp), %rax
movl $0x1, 0x40(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: my_netread
static off_t my_netread(int fd, void *buf, off_t len)
{
	off_t rest = len, curr, l = 0;
	/* recv() and read() may not read the required length of data with
	 * one call. They have to be called repeatedly. */
	while (rest) {
		if (socket_wait(fd, 1) <= 0) break; // socket is not ready for reading
		curr = netread(fd, (void*)((char*)buf + l), rest);
		/* According to the glibc manual, section 13.2, a zero returned
		 * value indicates end-of-file (EOF), which should mean that
		 * read() will not return zero if EOF has not been met but data
		 * are not immediately available. */
		if (curr == 0) break;
		l += curr; rest -= curr;
	}
	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xcc9bc
movl -0x4(%rbp), %edi
movl $0x1, %esi
callq 0xccfd0
cmpl $0x0, %eax
jg 0xcc97e
jmp 0xcc9bc
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6a90
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xcc99f
jmp 0xcc9bc
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xcc963
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: knet_open
knetFile *knet_open(const char *fn, const char *mode)
{
#ifdef KNETFILE_HOOKS
    if (alt_open)
        return alt_open(fn, mode);
#endif
	knetFile *fp = 0;
	if (mode[0] != 'r') {
		fprintf(stderr, "[kftp_open] only mode \"r\" is supported.\n");
		return 0;
	}
	if (strstr(fn, "ftp://") == fn) {
		fp = kftp_parse_url(fn, mode);
		if (fp == 0) return 0;
		if (kftp_connect(fp) == -1) {
			knet_close(fp);
			return 0;
		}
		kftp_connect_file(fp);
	} else if (strstr(fn, "http://") == fn) {
		fp = khttp_parse_url(fn, mode);
		if (fp == 0) return 0;
		khttp_connect_file(fp);
	} else { // local file
#ifdef _WIN32
		/* In windows, O_BINARY is necessary. In Linux/Mac, O_BINARY may
		 * be undefined on some systems, although it is defined on my
		 * Mac and the Linux I have tested on. */
		int fd = open(fn, O_RDONLY | O_BINARY);
#else		
		int fd = open(fn, O_RDONLY);
#endif
		if (fd == -1) {
			perror("open");
			return 0;
		}
		fp = (knetFile*)calloc(1, sizeof(knetFile));
		fp->type = KNF_TYPE_LOCAL;
		fp->fd = fd;
		fp->ctrl_fd = -1;
	}
	if (fp && fp->fd == -1) {
		knet_close(fp);
		return 0;
	}
	return fp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
je 0xcca19
movq 0x385d5(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x18ee5(%rip), %rsi     # 0xe58ea
movb $0x0, %al
callq 0x6a80
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movq -0x10(%rbp), %rdi
leaq 0xea4d(%rip), %rsi      # 0xdb471
callq 0x6170
cmpq -0x10(%rbp), %rax
jne 0xcca86
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xcbd60
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xcca54
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movq -0x20(%rbp), %rdi
callq 0xcb830
cmpl $-0x1, %eax
jne 0xcca78
movq -0x20(%rbp), %rdi
callq 0xccb70
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movq -0x20(%rbp), %rdi
callq 0xcbf40
jmp 0xccb2c
movq -0x10(%rbp), %rdi
leaq 0xe9cf(%rip), %rsi      # 0xdb460
callq 0x6170
cmpq -0x10(%rbp), %rax
jne 0xccacc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xcc260
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xccac1
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movq -0x20(%rbp), %rdi
callq 0xcc580
jmp 0xccb2a
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x64b0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0xccaf8
leaq 0xeae5(%rip), %rdi      # 0xdb5ce
callq 0x6590
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movl $0x1, %edi
movl $0x88, %esi
callq 0x6460
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
jmp 0xccb2c
cmpq $0x0, -0x20(%rbp)
je 0xccb50
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0xccb50
movq -0x20(%rbp), %rdi
callq 0xccb70
movq $0x0, -0x8(%rbp)
jmp 0xccb58
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: knet_dopen
knetFile *knet_dopen(int fd, const char *mode)
{
#ifdef KNETFILE_HOOKS
       if (alt_dopen)
               return alt_dopen(fd, mode);
#endif

	knetFile *fp = (knetFile*)calloc(1, sizeof(knetFile));
	fp->type = KNF_TYPE_LOCAL;
	fp->fd = fd;
	return fp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, %edi
movl $0x88, %esi
callq 0x6460
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/knetfile.c
// Function: knet_read
ssize_t knet_read(knetFile *fp, void *buf, size_t len)
{
#ifdef KNETFILE_HOOKS
       if (alt_read)  
               return alt_read(fp, buf, len);
#endif  

	off_t l = 0;
	if (fp->fd == -1) return 0;
	if (fp->type == KNF_TYPE_FTP) {
		if (fp->is_ready == 0) {
			if (!fp->no_reconnect) kftp_reconnect(fp);
			kftp_connect_file(fp);
		}
	} else if (fp->type == KNF_TYPE_HTTP) {
		if (fp->is_ready == 0)
			khttp_connect_file(fp);
	}
	if (fp->type == KNF_TYPE_LOCAL) { // on Windows, the following block is necessary; not on UNIX
		size_t rest = len;
		ssize_t curr;
		while (rest) {
			do {
				curr = read(fp->fd, (void*)((char*)buf + l), rest);
			} while (curr < 0 && EINTR == errno);
			if (curr < 0) return -1;
			if (curr == 0) break;
			l += curr; rest -= curr;
		}
	} else l = my_netread(fp->fd, buf, len);
	fp->offset += l;
	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x4(%rax)
jne 0xcccb3
movq $0x0, -0x8(%rbp)
jmp 0xccdd6
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xccce4
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0xccce2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0xcccd9
movq -0x10(%rbp), %rdi
callq 0xcbd00
movq -0x10(%rbp), %rdi
callq 0xcbf40
jmp 0xccd04
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xccd02
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0xccd00
movq -0x10(%rbp), %rdi
callq 0xcc580
jmp 0xccd02
jmp 0xccd04
movq -0x10(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xccda6
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xccda4
jmp 0xccd26
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x18(%rbp), %rsi
addq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x6a90
movq %rax, -0x38(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x38(%rbp)
movb %al, -0x39(%rbp)
jge 0xccd63
callq 0x6060
movq %rax, %rcx
movl $0x4, %eax
cmpl (%rcx), %eax
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xccd26
cmpq $0x0, -0x38(%rbp)
jge 0xccd7b
movq $-0x1, -0x8(%rbp)
jmp 0xccdd6
cmpq $0x0, -0x38(%rbp)
jne 0xccd84
jmp 0xccda4
movq -0x38(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0xccd19
jmp 0xccdbe
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xcc940
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_external_decode_int
int cram_external_decode_int(cram_slice *slice, cram_codec *c,
			     cram_block *in, char *out, int *out_size) {
    int l;
    char *cp;
    cram_block *b;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = (char *)b->data + b->idx;
    // E_INT and E_LONG are guaranteed single item queries
    l = safe_itf8_get(cp, (char *)b->data + b->uncomp_size, (int32_t *)out);
    b->idx += l;
    *out_size = 1;

    return l > 0 ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0xcd1d0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xcd15f
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xcd1c3
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x48(%rbp), %rcx
movslq 0x1c(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x48(%rbp), %rax
movslq 0x14(%rax), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
callq 0xcd280
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x48(%rbp), %rax
addl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movl -0x34(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovgl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_external_decode_char
int cram_external_decode_char(cram_slice *slice, cram_codec *c,
			      cram_block *in, char *out,
			      int *out_size) {
    char *cp;
    cram_block *b;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = cram_extract_block(b, *out_size);
    if (!cp)
	return -1;

    memcpy(out, cp, *out_size);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0xcd1d0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xcd48f
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xcd4cd
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0xcd4e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xcd4b2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcd4cd
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq (%rax), %rdx
callq 0x6570
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_external_decode_block
static int cram_external_decode_block(cram_slice *slice, cram_codec *c,
				      cram_block *in, char *out_,
				      int *out_size) {
    char *cp;
    cram_block *b = NULL;
    cram_block *out = (cram_block *)out_;

    /* Find the external block */
    b = cram_get_block_by_id(slice, c->external.content_id);
    if (!b)
        return *out_size?-1:0;

    cp = cram_extract_block(b, *out_size);
    if (!cp)
	return -1;

    BLOCK_APPEND(out, cp, *out_size);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
callq 0xcd1d0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xcd852
movq -0x30(%rbp), %rax
movl (%rax), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0xcd98d
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
callq 0xcd4e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xcd878
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcd98d
jmp 0xcd87a
jmp 0xcd87c
jmp 0xcd87e
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq -0x30(%rbp), %rdx
movslq (%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0xcd951
movq -0x48(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xcd8ea
movq -0x48(%rbp), %rax
movq 0x28(%rax), %xmm0
movaps 0x8764(%rip), %xmm1     # 0xd6020
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x8768(%rip), %xmm1     # 0xd6030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xcd91(%rip), %xmm1     # 0xda670
mulsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0xcd8f9
movsd 0x152c6(%rip), %xmm0    # 0xe2bb8
movsd %xmm0, -0x50(%rbp)
jmp 0xcd8f9
movsd -0x50(%rbp), %xmm0
movsd 0x14752(%rip), %xmm2    # 0xe2058
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0xcd87e
jmp 0xcd953
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x48(%rbp), %rax
addq 0x30(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq (%rax), %rdx
callq 0x6570
movq -0x30(%rbp), %rax
movslq (%rax), %rcx
movq -0x48(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_external_encode_init
cram_codec *cram_external_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_EXTERNAL;
    c->free = cram_external_encode_free;
    if (option == E_INT || option == E_LONG)
	c->encode = cram_external_encode_int;
    else if (option == E_BYTE_ARRAY || option == E_BYTE)
	c->encode = cram_external_encode_char;
    else
	abort();
    c->store = cram_external_encode_store;

    c->e_external.content_id = (size_t)dat;

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x240, %edi            # imm = 0x240
callq 0x69c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xce0f5
movq $0x0, -0x8(%rbp)
jmp 0xce173
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
leaq -0x5da(%rip), %rcx      # 0xcdb30
movq %rcx, 0x10(%rax)
cmpl $0x1, -0x14(%rbp)
je 0xce11a
cmpl $0x2, -0x14(%rbp)
jne 0xce12b
movq -0x30(%rbp), %rax
leaq -0x785(%rip), %rcx      # 0xcd9a0
movq %rcx, 0x20(%rax)
jmp 0xce14f
cmpl $0x4, -0x14(%rbp)
je 0xce137
cmpl $0x3, -0x14(%rbp)
jne 0xce148
movq -0x30(%rbp), %rax
leaq -0x762(%rip), %rcx      # 0xcd9e0
movq %rcx, 0x20(%rax)
jmp 0xce14d
callq 0x63b0
jmp 0xce14f
movq -0x30(%rbp), %rax
leaq -0x5fa(%rip), %rcx      # 0xcdb60
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_beta_decode_int
int cram_beta_decode_int(cram_slice *slice, cram_codec *c, cram_block *in, char *out, int *out_size) {
    int32_t *out_i = (int32_t *)out;
    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[i] = get_bits_MSB(in, c->beta.nbits) - c->beta.offset;
    } else {
	for (i = 0, n = *out_size; i < n; i++)
	    out_i[i] = -c->beta.offset;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0xce218
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0xce270
cmpl $0x0, %eax
je 0xce1cf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce258
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xce216
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0xce300
movl %eax, %edx
movq -0x18(%rbp), %rax
subl 0x30(%rax), %edx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xce1df
jmp 0xce251
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xce24f
movq -0x18(%rbp), %rax
xorl %edx, %edx
subl 0x30(%rax), %edx
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xce228
jmp 0xce251
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x34(%rax)
je 0xce7f0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0xce270
cmpl $0x0, %eax
je 0xce7a7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xce832
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xce7ee
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x34(%rax), %esi
callq 0xce300
movq -0x18(%rbp), %rcx
subl 0x30(%rcx), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xce7b7
jmp 0xce82b
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0xce829
movq -0x18(%rbp), %rcx
xorl %eax, %eax
subl 0x30(%rcx), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xce800
jmp 0xce82b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xcef8c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movq -0x10(%rbp), %rax
addl 0x30(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x34(%rax), %edx
callq 0xcefa0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xcef4d
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xcf27d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movzbl (%rax,%rcx), %esi
movq -0x10(%rbp), %rax
addl 0x30(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x34(%rax), %edx
callq 0xcefa0
orl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xcf23d
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/htslib/cram/cram_codecs.c
// Function: cram_subexp_decode_init
cram_codec *cram_subexp_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_SUBEXP;
    c->decode = cram_subexp_decode;
    c->free   = cram_subexp_decode_free;
    c->subexp.k = -1;

    cp += safe_itf8_get(cp, data + size, &c->subexp.offset);
    cp += safe_itf8_get(cp, data + size, &c->subexp.k);

    if (cp - data != size || c->subexp.k < 0) {
	fprintf(stderr, "Malformed subexp header stream\n");
	free(c);
	return NULL;
    }

    return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x240, %edi            # imm = 0x240
callq 0x69c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xcf81e
movq $0x0, -0x8(%rbp)
jmp 0xcf8fe
movq -0x28(%rbp), %rax
movl $0x7, (%rax)
movq -0x28(%rbp), %rax
leaq -0x363(%rip), %rcx      # 0xcf4d0
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
leaq -0x92(%rip), %rcx       # 0xcf7b0
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x34(%rax) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
addq $0x30, %rdx
callq 0xcd280
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
addq %rax, %rsi
movq -0x28(%rbp), %rdx
addq $0x30, %rdx
addq $0x4, %rdx
callq 0xcd280
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
jne 0xcf8cb
movq -0x28(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jge 0xcf8f6
movq 0x356fe(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x1628c(%rip), %rsi     # 0xe5b68
movb $0x0, %al
callq 0x6a80
movq -0x28(%rbp), %rdi
callq 0x6880
movq $0x0, -0x8(%rbp)
jmp 0xcf8fe
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xcfd85
jmp 0xcfda6
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0xcfd9d
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x6880
movq -0x8(%rbp), %rdi
callq 0x6880
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xcfe22
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl (%rax), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xcfdf8
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)