// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xceda4
movq -0x18(%rbp), %rdi
callq 0x62c0
movq %rax, -0x28(%rbp)
jmp 0xcec98
jmp 0xcec9a
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq -0x28(%rbp), %rcx
cmpq %rcx, %rax
ja 0xced67
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xced00
movq -0x10(%rbp), %rax
movq 0x28(%rax), %xmm0
movaps 0x734e(%rip), %xmm1     # 0xd6020
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x7352(%rip), %xmm1     # 0xd6030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0xb97b(%rip), %xmm1     # 0xda670
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xced0f
movsd 0x13eb0(%rip), %xmm0    # 0xe2bb8
movsd %xmm0, -0x30(%rbp)
jmp 0xced0f
movsd -0x30(%rbp), %xmm0
movsd 0x1333c(%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 -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x6c80
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0xcec9a
jmp 0xced69
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
addq 0x30(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x6570
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movslq -0x20(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x7d910
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0xcedda
movl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xcee44
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0xcedf5
movl $0x2, %eax
movl %eax, -0x40(%rbp)
jmp 0xcee3e
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0xcee10
movl $0x3, %eax
movl %eax, -0x44(%rbp)
jmp 0xcee38
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
movl $0x5, %eax
movl $0x4, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0xcee63
movl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xceecd
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0xcee7e
movl $0x2, %eax
movl %eax, -0x50(%rbp)
jmp 0xceec7
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0xcee99
movl $0x3, %eax
movl %eax, -0x54(%rbp)
jmp 0xceec1
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
setne %dl
xorb $-0x1, %dl
movl $0x5, %eax
movl $0x4, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rdi
movl -0x48(%rbp), %esi
movl -0x4c(%rbp), %eax
addl %eax, %esi
callq 0x7d910
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %esi
callq 0x7d910
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x34(%rax), %esi
callq 0x7d910
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)