// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: itf8_put_blk
int itf8_put_blk(cram_block *blk, int val) {
    char buf[5];
    int sz;

    sz = itf8_put(buf, val);
    BLOCK_APPEND(blk, buf, sz);
    return sz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x452ad
movl -0xc(%rbp), %eax
movb %al, -0x11(%rbp)
movl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x453cd
movl -0xc(%rbp), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0x452e0
movl -0xc(%rbp), %eax
sarl $0x8, %eax
orl $0x80, %eax
movb %al, -0x11(%rbp)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movb %al, -0x10(%rbp)
movl $0x2, %eax
movl %eax, -0x20(%rbp)
jmp 0x453c7
movl -0xc(%rbp), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0x45321
movl -0xc(%rbp), %eax
sarl $0x10, %eax
orl $0xc0, %eax
movb %al, -0x11(%rbp)
movl -0xc(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x10(%rbp)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movb %al, -0xf(%rbp)
movl $0x3, %eax
movl %eax, -0x24(%rbp)
jmp 0x453c1
movl -0xc(%rbp), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x4536d
movl -0xc(%rbp), %eax
sarl $0x18, %eax
orl $0xe0, %eax
movb %al, -0x11(%rbp)
movl -0xc(%rbp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0x10(%rbp)
movl -0xc(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0xf(%rbp)
movl -0xc(%rbp), %eax
andl $0xff, %eax
movb %al, -0xe(%rbp)
movl $0x4, %eax
movl %eax, -0x28(%rbp)
jmp 0x453bb
movl -0xc(%rbp), %eax
sarl $0x1c, %eax
andl $0xff, %eax
orl $0xf0, %eax
movb %al, -0x11(%rbp)
movl -0xc(%rbp), %eax
sarl $0x14, %eax
andl $0xff, %eax
movb %al, -0x10(%rbp)
movl -0xc(%rbp), %eax
sarl $0xc, %eax
andl $0xff, %eax
movb %al, -0xf(%rbp)
movl -0xc(%rbp), %eax
sarl $0x4, %eax
andl $0xff, %eax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
andl $0xf, %eax
movb %al, -0xd(%rbp)
movl $0x5, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x453d5
jmp 0x453d7
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movslq -0x18(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x454a7
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x45440
movq -0x8(%rbp), %rax
movq 0x28(%rax), %xmm0
movaps 0x356ce(%rip), %xmm1    # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x356d2(%rip), %xmm1    # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x366a3(%rip), %xmm1    # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x4544f
movsd 0x36688(%rip), %xmm0    # 0x7bad0
movsd %xmm0, -0x30(%rbp)
jmp 0x4544f
movsd -0x30(%rbp), %xmm0
movsd 0x35664(%rip), %xmm2    # 0x7aac0
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 -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x4990
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x453d7
jmp 0x454a9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x30(%rax), %rdi
leaq -0x11(%rbp), %rsi
movslq -0x18(%rbp), %rdx
callq 0x4460
movslq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movl -0x18(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop