// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x46012
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x461e4
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0x4605f
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, %eax
movl %eax, -0x84(%rbp)
jmp 0x461db
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0x460c4
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x10, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, %eax
movl %eax, -0x88(%rbp)
jmp 0x461cf
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x46141
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x18, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x4, %eax
movl %eax, -0x8c(%rbp)
jmp 0x461c3
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x1c, %eax
andl $0xff, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x14, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0xc, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
sarl $0x4, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xf, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x4(%rax)
movl $0x5, %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x46223
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x463f8
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0x46270
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x8, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, %eax
movl %eax, -0x94(%rbp)
jmp 0x463ec
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0x462d5
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x10, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, %eax
movl %eax, -0x98(%rbp)
jmp 0x463e0
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x46352
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x18, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x4, %eax
movl %eax, -0x9c(%rbp)
jmp 0x463d4
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x1c, %eax
andl $0xff, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x14, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0xc, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
sarl $0x4, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xf, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x4(%rax)
movl $0x5, %eax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $-0x80, %eax
cmpl $0x0, %eax
jne 0x4643a
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movl $0x1, %eax
movl %eax, -0xa0(%rbp)
jmp 0x4660f
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xffffc000, %eax       # imm = 0xFFFFC000
cmpl $0x0, %eax
jne 0x46487
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x8, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, %eax
movl %eax, -0xa4(%rbp)
jmp 0x46603
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xffe00000, %eax       # imm = 0xFFE00000
cmpl $0x0, %eax
jne 0x464ec
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x10, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, %eax
movl %eax, -0xa8(%rbp)
jmp 0x465f7
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf0000000, %eax       # imm = 0xF0000000
cmpl $0x0, %eax
jne 0x46569
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x18, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movl $0x4, %eax
movl %eax, -0xac(%rbp)
jmp 0x465eb
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x1c, %eax
andl $0xff, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x14, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0xc, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
sarl $0x4, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xf, %eax
movb %al, %cl
movq -0x78(%rbp), %rax
movb %cl, 0x4(%rax)
movl $0x5, %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
leaq -0x70(%rbp), %rcx
subq %rcx, %rax
addq $0x4, %rax
movl %eax, -0x7c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x4664d
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0xb0(%rbp)
jmp 0x4665a
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop