// File: /workspace/github_cpp_makefile_star2_O1/karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_block_size
uint32_t cram_block_size(cram_block *b) {
    unsigned char dat[100], *cp = dat;;
    uint32_t sz;

    *cp++ = b->method;
    *cp++ = b->content_type;
    cp += itf8_put(cp, b->content_id);
    cp += itf8_put(cp, b->comp_size);
    cp += itf8_put(cp, b->uncomp_size);

    sz = cp-dat + 4;
    sz += b->method == RAW ? b->uncomp_size : b->comp_size;

    return sz;
}

// Assembly:
pushq %rbx
movl (%rdi), %ecx
leaq -0x6e(%rsp), %rax
movb %cl, -0x2(%rax)
movb 0x8(%rdi), %dl
movb %dl, -0x1(%rax)
movl 0xc(%rdi), %edx
cmpl $0x7f, %edx
ja 0x32898
movb %dl, -0x6e(%rsp)
movl $0x1, %edx
jmp 0x32942
movl %edx, %esi
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x328bc
shrl $0x8, %esi
orb $-0x80, %sil
movb %sil, -0x6e(%rsp)
movb %dl, -0x6d(%rsp)
movl $0x2, %edx
jmp 0x32942
cmpl $0x1fffff, %edx         # imm = 0x1FFFFF
ja 0x328df
shrl $0x10, %esi
orb $-0x40, %sil
movb %sil, -0x6e(%rsp)
movb %dh, -0x6d(%rsp)
movb %dl, -0x6c(%rsp)
movl $0x3, %edx
jmp 0x32942
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
ja 0x3290c
shrl $0x18, %esi
orb $-0x20, %sil
movb %sil, -0x6e(%rsp)
movl %edx, %esi
shrl $0x10, %esi
movb %sil, -0x6d(%rsp)
movb %dh, -0x6c(%rsp)
movb %dl, -0x6b(%rsp)
movl $0x4, %edx
jmp 0x32942
shrl $0x1c, %esi
orb $-0x10, %sil
movb %sil, -0x6e(%rsp)
movl %edx, %esi
shrl $0x14, %esi
movb %sil, -0x6d(%rsp)
movl %edx, %esi
shrl $0xc, %esi
movb %sil, -0x6c(%rsp)
movl %edx, %esi
shrl $0x4, %esi
movb %sil, -0x6b(%rsp)
andb $0xf, %dl
movb %dl, -0x6a(%rsp)
movl $0x5, %edx
addq %rdx, %rax
movl 0x10(%rdi), %edx
cmpl $0x7f, %edx
ja 0x32959
movb %dl, (%rax)
movl $0x1, %esi
jmp 0x329ee
movl %edx, %esi
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x32977
shrl $0x8, %esi
orb $-0x80, %sil
movb %sil, (%rax)
movb %dl, 0x1(%rax)
movl $0x2, %esi
jmp 0x329ee
cmpl $0x1fffff, %edx         # imm = 0x1FFFFF
ja 0x32996
shrl $0x10, %esi
orb $-0x40, %sil
movb %sil, (%rax)
movb %dh, 0x1(%rax)
movb %dl, 0x2(%rax)
movl $0x3, %esi
jmp 0x329ee
cmpl $0xfffffff, %edx        # imm = 0xFFFFFFF
ja 0x329be
shrl $0x18, %esi
orb $-0x20, %sil
movb %sil, (%rax)
movl %edx, %esi
shrl $0x10, %esi
movb %sil, 0x1(%rax)
movb %dh, 0x2(%rax)
movb %dl, 0x3(%rax)
movl $0x4, %esi
jmp 0x329ee
shrl $0x1c, %esi
orb $-0x10, %sil
movb %sil, (%rax)
movl %edx, %esi
shrl $0x14, %esi
movb %sil, 0x1(%rax)
movl %edx, %esi
shrl $0xc, %esi
movb %sil, 0x2(%rax)
movl %edx, %esi
shrl $0x4, %esi
movb %sil, 0x3(%rax)
andb $0xf, %dl
movb %dl, 0x4(%rax)
movl $0x5, %esi
leaq 0x10(%rdi), %rdx
addq %rsi, %rax
movl 0x14(%rdi), %ebx
addq $0x14, %rdi
cmpl $0x7f, %ebx
ja 0x32a0d
movb %bl, (%rax)
movl $0x1, %esi
jmp 0x32aa2
movl %ebx, %esi
cmpl $0x3fff, %ebx           # imm = 0x3FFF
ja 0x32a2b
shrl $0x8, %esi
orb $-0x80, %sil
movb %sil, (%rax)
movb %bl, 0x1(%rax)
movl $0x2, %esi
jmp 0x32aa2
cmpl $0x1fffff, %ebx         # imm = 0x1FFFFF
ja 0x32a4a
shrl $0x10, %esi
orb $-0x40, %sil
movb %sil, (%rax)
movb %bh, 0x1(%rax)
movb %bl, 0x2(%rax)
movl $0x3, %esi
jmp 0x32aa2
cmpl $0xfffffff, %ebx        # imm = 0xFFFFFFF
ja 0x32a72
shrl $0x18, %esi
orb $-0x20, %sil
movb %sil, (%rax)
movl %ebx, %esi
shrl $0x10, %esi
movb %sil, 0x1(%rax)
movb %bh, 0x2(%rax)
movb %bl, 0x3(%rax)
movl $0x4, %esi
jmp 0x32aa2
shrl $0x1c, %esi
orb $-0x10, %sil
movb %sil, (%rax)
movl %ebx, %esi
shrl $0x14, %esi
movb %sil, 0x1(%rax)
movl %ebx, %esi
shrl $0xc, %esi
movb %sil, 0x2(%rax)
movl %ebx, %esi
shrl $0x4, %esi
movb %sil, 0x3(%rax)
andb $0xf, %bl
movb %bl, 0x4(%rax)
movl $0x5, %esi
testl %ecx, %ecx
cmoveq %rdi, %rdx
movl (%rdx), %ecx
addl %esi, %eax
leaq -0x70(%rsp), %rdx
subl %edx, %eax
addl %ecx, %eax
addl $0x4, %eax
popq %rbx
retq