LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_encode.c
// Function: cram_update_curr_slice
void cram_update_curr_slice(cram_container *c) {
    cram_slice *s = c->slice;
    if (c->multi_seq) {
	s->hdr->ref_seq_id    = -2;
	s->hdr->ref_seq_start = 0;
	s->hdr->ref_seq_span  = 0;
    } else {
	s->hdr->ref_seq_id    = c->curr_ref;
	s->hdr->ref_seq_start = c->first_base;
	s->hdr->ref_seq_span  = c->last_base - c->first_base + 1;
    }
    s->hdr->num_records   = c->curr_rec;

    if (c->curr_slice == 0) {
	if (c->ref_seq_id != s->hdr->ref_seq_id)
	    c->ref_seq_id  = s->hdr->ref_seq_id;
	c->ref_seq_start = c->first_base;
    }

    c->curr_slice++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x94(%rax)
je 0x39a50
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0xfffffffe, 0x4(%rax)  # imm = 0xFFFFFFFE
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0xc(%rax)
jmp 0x39a96
movq -0x8(%rbp), %rax
movl 0x6c(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0xa0(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0xa4(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0xa0(%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x39ae6
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x4(%rcx), %eax
je 0x39ad5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0xa0(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x54(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_encode.c
// Function: expected_template_count
static int expected_template_count(bam_seq_t *b) {
    int expected = bam_flag(b) & BAM_FPAIRED ? 2 : 1;

    uint8_t *TC = (uint8_t *)bam_aux_get(b, "TC");
    if (TC) {
	int n = bam_aux2i(TC);
	if (expected < n)
	    expected = n;
    }

    if (!TC && bam_aux_get(b, "SA")) {
	// We could count the semicolons, but we'd have to do this for
	// read1, read2 and read(not-1-or-2) combining the results
	// together.  This is a cheap and safe alternative for now.
	expected = INT_MAX;
    }

    return expected;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
shrq $0x20, %rax
andq $0xffff, %rax           # imm = 0xFFFF
movl %eax, %edx
andl $0x1, %edx
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x41ad4(%rip), %rsi     # 0x7c435
callq 0x20160
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3a98d
movq -0x18(%rbp), %rdi
callq 0x206b0
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x3a98b
movl -0x1c(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x3a98d
cmpq $0x0, -0x18(%rbp)
jne 0x3a9b1
movq -0x8(%rbp), %rdi
leaq 0x41cc9(%rip), %rsi     # 0x7c668
callq 0x20160
cmpq $0x0, %rax
je 0x3a9b1
movl $0x7fffffff, -0xc(%rbp) # imm = 0x7FFFFFFF
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_encode.c
// Function: cram_add_bases
static int cram_add_bases(cram_fd *fd, cram_container *c,
			  cram_slice *s, cram_record *r,
			  int pos, int len, char *base) {
    cram_feature f;

    f.b.pos = pos+1;
    f.b.code = 'b';
    f.b.seq_idx = base - (char *)BLOCK_DATA(s->seqs_blk);
    f.b.len = len;

    return cram_add_feature(c, s, r, &f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl $0x62, -0x34(%rbp)
movq 0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x68(%rcx), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x30(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x41090
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/ext/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 0x54c30
movq -0x10(%rbp), %rax
movq 0x120(%rax), %rdi
movsbl 0x10(%rbp), %esi
callq 0x54c30
jmp 0x3f62e
jmp 0x3f630
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 0x3f71d
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3f6a6
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %xmm0
movaps 0x3b468(%rip), %xmm1    # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x3b46c(%rip), %xmm1    # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x3c43d(%rip), %xmm1    # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x3f6b5
movsd 0x3c422(%rip), %xmm0    # 0x7bad0
movsd %xmm0, -0x40(%rbp)
jmp 0x3f6b5
movsd -0x40(%rbp), %xmm0
movsd 0x3b3fe(%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 -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 0x4990
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0x3f630
jmp 0x3f71f
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 0x41090
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/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 0x54c30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x41090
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/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 0x54c30
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x41090
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/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 0x54c30
jmp 0x3fcef
jmp 0x3fcf1
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 0x3fdde
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3fd67
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq 0x28(%rax), %xmm0
movaps 0x3ada7(%rip), %xmm1    # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x3adab(%rip), %xmm1    # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x3bd7c(%rip), %xmm1    # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0x3fd76
movsd 0x3bd61(%rip), %xmm0    # 0x7bad0
movsd %xmm0, -0x40(%rbp)
jmp 0x3fd76
movsd -0x40(%rbp), %xmm0
movsd 0x3ad3d(%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 -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 0x4990
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0x3fcf1
jmp 0x3fde0
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 0x41090
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/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 0x41121
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0x410d0
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %eax
shll %eax
movl %eax, -0x2c(%rbp)
jmp 0x410da
movl $0x400, %eax            # imm = 0x400
movl %eax, -0x2c(%rbp)
jmp 0x410da
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 0x4990
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x4111f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x411e7
jmp 0x41121
movq -0x20(%rbp), %rcx
movl 0x68(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x68(%rcx)
cmpl $0x0, %eax
jne 0x4115b
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 0x54c30
jmp 0x41196
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 0x54c30
movq -0x10(%rbp), %rax
movq 0x198(%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x54c30
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: karel-brinda[P]ococo/ext/htslib/cram/cram_index.c
// Function: kget_int32
static int kget_int32(kstring_t *k, size_t *pos, int32_t *val_p) {
    int sign = 1;
    int32_t val = 0;
    size_t p = *pos;

    while (p < k->l && (k->s[p] == ' ' || k->s[p] == '\t'))
	   p++;

    if (p < k->l && k->s[p] == '-')
	sign = -1, p++;

    if (p >= k->l || !(k->s[p] >= '0' && k->s[p] <= '9'))
	return -1;

    while (p < k->l && k->s[p] >= '0' && k->s[p] <= '9')
	val = val*10 + k->s[p++]-'0';
    
    *pos = p;
    *val_p = sign*val;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x31(%rbp)
jae 0x42114
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x32(%rbp)
je 0x4210e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x4211d
jmp 0x4212b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x420c9
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x42160
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0x42160
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x42197
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x42197
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jle 0x421a3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4223b
jmp 0x421a5
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x33(%rbp)
jae 0x421ea
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x33(%rbp)
jl 0x421ea
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
testb $0x1, %al
jne 0x421f3
jmp 0x4221c
imull $0xa, -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x30(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movsbl (%rcx,%rdx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movl %eax, -0x28(%rbp)
jmp 0x421a5
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
imull -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_index.c
// Function: kget_int64
static int kget_int64(kstring_t *k, size_t *pos, int64_t *val_p) {
    int sign = 1;
    int64_t val = 0;
    size_t p = *pos;

    while (p < k->l && (k->s[p] == ' ' || k->s[p] == '\t'))
	   p++;

    if (p < k->l && k->s[p] == '-')
	sign = -1, p++;

    if (p >= k->l || !(k->s[p] >= '0' && k->s[p] <= '9'))
	return -1;

    while (p < k->l && k->s[p] >= '0' && k->s[p] <= '9')
	val = val*10 + k->s[p++]-'0';
    
    *pos = p;
    *val_p = sign*val;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x39(%rbp)
jae 0x422b5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x3a(%rbp)
je 0x422af
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x3a(%rbp)
movb -0x3a(%rbp), %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x422be
jmp 0x422cc
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4226a
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x42301
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x2d, %eax
jne 0x42301
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0x42338
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jl 0x42338
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
jle 0x42344
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x423e4
jmp 0x42346
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpq (%rdx), %rcx
movb %al, -0x3b(%rbp)
jae 0x4238b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x3b(%rbp)
jl 0x4238b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x3b(%rbp)
movb -0x3b(%rbp), %al
testb $0x1, %al
jne 0x42394
jmp 0x423c2
imulq $0xa, -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x38(%rbp), %rdx
movq %rdx, %rsi
addq $0x1, %rsi
movq %rsi, -0x38(%rbp)
movsbq (%rcx,%rdx), %rcx
addq %rcx, %rax
subq $0x30, %rax
movq %rax, -0x30(%rbp)
jmp 0x42346
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movslq -0x24(%rbp), %rcx
imulq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_index.c
// Function: cram_index_free
void cram_index_free(cram_fd *fd) {
    int i;

    if (!fd->index)
	return;
    
    for (i = 0; i < fd->index_sz; i++) {
	cram_index_free_recurse(&fd->index[i]);
    }
    free(fd->index);

    fd->index = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8838(%rax)
jne 0x4240c
jmp 0x42467
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8834(%rcx), %eax
jge 0x42448
movq -0x8(%rbp), %rax
movq 0x8838(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x42470
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x42413
movq -0x8(%rbp), %rax
movq 0x8838(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
movq $0x0, 0x8838(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_index.c
// Function: cram_index_free_recurse
static void cram_index_free_recurse(cram_index *e) {
    if (e->e) {
	int i;
	for (i = 0; i < e->nslice; i++) {
	    cram_index_free_recurse(&e->e[i]);
	}
	free(e->e);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x424c9
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x424bc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x42470
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4248e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x46a0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_index.c
// Function: cram_seek_to_refpos
int cram_seek_to_refpos(cram_fd *fd, cram_range *r) {
    cram_index *e;

    // Ideally use an index, so see if we have one.
    if ((e = cram_index_query(fd, r->refid, r->start, NULL))) {
	if (0 != cram_seek(fd, e->offset, SEEK_SET))
	    if (0 != cram_seek(fd, e->offset - fd->first_container, SEEK_CUR))
		return -1;
    } else {
	// Absent from index, but this most likely means it simply has no data.
	return -2;
    }

    if (fd->ctr) {
	cram_free_container(fd->ctr);
	fd->ctr = NULL;
	fd->ooc = 0;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rax
movl 0x4(%rax), %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x424d0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x427d5
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
xorl %edx, %edx
callq 0x524e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x427d3
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x10(%rbp), %rax
subq 0x8840(%rax), %rsi
movl $0x1, %edx
callq 0x524e0
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x427d1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x42817
jmp 0x427d3
jmp 0x427de
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x42817
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x42810
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x4b5e0
movq -0x10(%rbp), %rax
movq $0x0, 0x38(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x88f8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: int32_decode
int int32_decode(cram_fd *fd, int32_t *val) {
    int32_t i;
    if (4 != hread(fd->fp, &i, 4))
	return -1;

    *val = le_int4(i);
    return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x1c(%rbp), %rsi
movl $0x4, %edx
callq 0x45540
movq %rax, %rcx
movl $0x4, %eax
cmpq %rcx, %rax
je 0x4551b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4552b
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: int32_encode
int int32_encode(cram_fd *fd, int32_t val) {
    val = le_int4(val);
    if (4 != hwrite(fd->fp, &val, 4))
	return -1;

    return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x43620
movq %rax, %rcx
movl $0x4, %eax
cmpq %rcx, %rax
je 0x45620
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x45627
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: int32_get_blk
int int32_get_blk(cram_block *b, int32_t *val) {
    if (b->uncomp_size - BLOCK_SIZE(b) < 4)
	return -1;

    *val =
	 b->data[b->byte  ]        |
	(b->data[b->byte+1] <<  8) |
	(b->data[b->byte+2] << 16) |
	(b->data[b->byte+3] << 24);
    BLOCK_SIZE(b) += 4;
    return 4;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movslq 0x14(%rax), %rax
movq -0x10(%rbp), %rcx
subq 0x30(%rcx), %rax
cmpq $0x4, %rax
jae 0x4565b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x456da
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x2(%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x30(%rdx), %rdx
movzbl 0x3(%rax,%rdx), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x30(%rax)
movl $0x4, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: int32_put_blk
int int32_put_blk(cram_block *b, int32_t val) {
    unsigned char cp[4];
    cp[0] = ( val      & 0xff);
    cp[1] = ((val>>8)  & 0xff);
    cp[2] = ((val>>16) & 0xff);
    cp[3] = ((val>>24) & 0xff);

    BLOCK_APPEND(b, cp, 4);
    return b->data ? 0 : -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %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
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0xe(%rbp)
movl -0xc(%rbp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, -0xd(%rbp)
jmp 0x45726
jmp 0x45728
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
addq $0x4, %rcx
cmpq %rcx, %rax
ja 0x457f5
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4578e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %xmm0
movaps 0x35380(%rip), %xmm1    # 0x7aae0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x35384(%rip), %xmm1    # 0x7aaf0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x36355(%rip), %xmm1    # 0x7bad8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x4579d
movsd 0x3633a(%rip), %xmm0    # 0x7bad0
movsd %xmm0, -0x18(%rbp)
jmp 0x4579d
movsd -0x18(%rbp), %xmm0
movsd 0x35316(%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 0x45728
jmp 0x457f7
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl -0x10(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_new_block
cram_block *cram_new_block(enum cram_content_type content_type,
			   int content_id) {
    cram_block *b = malloc(sizeof(*b));
    if (!b)
	return NULL;
    b->method = b->orig_method = RAW;
    b->content_type = content_type;
    b->content_id = content_id;
    b->comp_size = 0;
    b->uncomp_size = 0;
    b->data = NULL;
    b->alloc = 0;
    b->byte = 0;
    b->bit = 7; // MSB

    return b;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl $0x40, %edi
callq 0x47a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x45b3d
movq $0x0, -0x8(%rbp)
jmp 0x45bb3
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
movl $0x7, 0x38(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_free_block
void cram_free_block(cram_block *b) {
    if (!b)
	return;
    if (b->data)
	free(b->data);
    free(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x470d5
jmp 0x470f6
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x470ed
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rdi
callq 0x46a0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_compress_by_method
static char *cram_compress_by_method(char *in, size_t in_size,
				     size_t *out_size,
				     enum cram_block_method method,
				     int level, int strat) {
    switch (method) {
    case GZIP:
	return zlib_mem_deflate(in, in_size, out_size, level, strat);

    case BZIP2: {
#ifdef HAVE_LIBBZ2
	unsigned int comp_size = in_size*1.01 + 600;
	char *comp = malloc(comp_size);
	if (!comp)
	    return NULL;

	if (BZ_OK != BZ2_bzBuffToBuffCompress(comp, &comp_size,
					      in, in_size,
					      level, 0, 30)) {
	    free(comp);
	    return NULL;
	}
	*out_size = comp_size;
	return comp;
#else
	return NULL;
#endif
    }

    case LZMA:
#ifdef HAVE_LIBLZMA
	return lzma_mem_deflate(in, in_size, out_size, level);
#else
	return NULL;
#endif

    case RANS0: {
	unsigned int out_size_i;
	unsigned char *cp;
	cp = rans_compress((unsigned char *)in, in_size, &out_size_i, 0);
	*out_size = out_size_i;
	return (char *)cp;
    }

    case RANS1: {
	unsigned int out_size_i;
	unsigned char *cp;
	
	cp = rans_compress((unsigned char *)in, in_size, &out_size_i, 1);
	*out_size = out_size_i;
	return (char *)cp;
    }

    case RAW:
	break;

    default:
	return NULL;
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0xa, %rax
ja 0x4833c
movq -0x50(%rbp), %rax
leaq 0x34711(%rip), %rcx     # 0x7c9ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %r8d
callq 0x53890
movq %rax, -0x8(%rbp)
jmp 0x4834e
movq $0x0, -0x8(%rbp)
jmp 0x4834e
movq $0x0, -0x8(%rbp)
jmp 0x4834e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
leaq -0x30(%rbp), %rdx
xorl %ecx, %ecx
callq 0x5aea0
movq %rax, -0x38(%rbp)
movl -0x30(%rbp), %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4834e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl %eax, %esi
leaq -0x3c(%rbp), %rdx
movl $0x1, %ecx
callq 0x5aea0
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4834e
jmp 0x48346
movq $0x0, -0x8(%rbp)
jmp 0x4834e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_block_method2str
char *cram_block_method2str(enum cram_block_method m) {
    switch(m) {
    case RAW:	   return "RAW";
    case GZIP:	   return "GZIP";
    case BZIP2:	   return "BZIP2";
    case LZMA:     return "LZMA";
    case RANS0:    return "RANS0";
    case RANS1:    return "RANS1";
    case GZIP_RLE: return "GZIP_RLE";
    case ERROR:    break;
    }
    return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xc, %eax
ja 0x483e8
movq -0x18(%rbp), %rax
leaq 0x34656(%rip), %rcx     # 0x7c9d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x34b00(%rip), %rax     # 0x7ce92
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x34af7(%rip), %rax     # 0x7ce96
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x32b2d(%rip), %rax     # 0x7aed9
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x32b45(%rip), %rax     # 0x7aefe
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x34ad5(%rip), %rax     # 0x7ce9b
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x34ace(%rip), %rax     # 0x7cea1
movq %rax, -0x8(%rbp)
jmp 0x483f3
leaq 0x34ac7(%rip), %rax     # 0x7cea7
movq %rax, -0x8(%rbp)
jmp 0x483f3
jmp 0x483e8
leaq 0x32c30(%rip), %rax     # 0x7b01f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_new_metrics
cram_metrics *cram_new_metrics(void) {
    cram_metrics *m = calloc(1, sizeof(*m));
    if (!m)
	return NULL;
    m->trial = NTRIALS-1;
    m->next_trial = TRIAL_SPAN;
    m->method = RAW;
    m->strat = 0;
    m->revised_method = 0;

    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x78, %esi
callq 0x4370
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4842c
movq $0x0, -0x8(%rbp)
jmp 0x4846a
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
movq -0x10(%rbp), %rax
movl $0x32, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_content_type2str
char *cram_content_type2str(enum cram_content_type t) {
    switch (t) {
    case FILE_HEADER:         return "FILE_HEADER";
    case COMPRESSION_HEADER:  return "COMPRESSION_HEADER";
    case MAPPED_SLICE:        return "MAPPED_SLICE";
    case UNMAPPED_SLICE:      return "UNMAPPED_SLICE";
    case EXTERNAL:            return "EXTERNAL";
    case CORE:                return "CORE";
    case CT_ERROR:            break;
    }
    return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x6, %eax
ja 0x484fb
movq -0x18(%rbp), %rax
leaq 0x3456a(%rip), %rcx     # 0x7ca0c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x349fe(%rip), %rax     # 0x7ceb0
movq %rax, -0x8(%rbp)
jmp 0x48506
leaq 0x343ea(%rip), %rax     # 0x7c8a9
movq %rax, -0x8(%rbp)
jmp 0x48506
leaq 0x349f2(%rip), %rax     # 0x7cebe
movq %rax, -0x8(%rbp)
jmp 0x48506
leaq 0x349e3(%rip), %rax     # 0x7cebc
movq %rax, -0x8(%rbp)
jmp 0x48506
leaq 0x349e5(%rip), %rax     # 0x7cecb
movq %rax, -0x8(%rbp)
jmp 0x48506
leaq 0x349e1(%rip), %rax     # 0x7ced4
movq %rax, -0x8(%rbp)
jmp 0x48506
jmp 0x484fb
leaq 0x32b1d(%rip), %rax     # 0x7b01f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: refs_free
void refs_free(refs_t *r) {
    RP("refs_free()\n");

    if (--r->count > 0)
	return;

    if (!r)
	return;

    if (r->pool)
	string_pool_destroy(r->pool);

    if (r->h_meta) {
	khint_t k;

	for (k = kh_begin(r->h_meta); k != kh_end(r->h_meta); k++) {
	    ref_entry *e;

	    if (!kh_exist(r->h_meta, k))
		continue;
	    if (!(e = kh_val(r->h_meta, k)))
		continue;
	    ref_entry_free_seq(e);
	    free(e);
	}

	kh_destroy(refs, r->h_meta);
    }
    
    if (r->ref_id)
	free(r->ref_id);

    if (r->fp)
	bgzf_close(r->fp);

    pthread_mutex_destroy(&r->lock);

    free(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movl 0x30(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rcx)
cmpl $0x0, %eax
jle 0x48533
jmp 0x48634
cmpq $0x0, -0x8(%rbp)
jne 0x4853f
jmp 0x48634
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x48555
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5ff50
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x485ee
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
je 0x485e1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movl -0xc(%rbp), %ecx
shrl $0x4, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
andl $0xf, %ecx
shll %ecx
shrl %cl, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x485a5
jmp 0x485d6
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movl -0xc(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x485c4
jmp 0x485d6
movq -0x18(%rbp), %rdi
callq 0x48640
movq -0x18(%rbp), %rdi
callq 0x46a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4856b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x486b0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48606
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x4861e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x65880
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
callq 0x4670
movq -0x8(%rbp), %rdi
callq 0x46a0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: ref_entry_free_seq
static void ref_entry_free_seq(ref_entry *e) {
    if (e->mf)
	mfclose(e->mf);
    if (e->seq && !e->mf)
	free(e->seq);

    e->seq = NULL;
    e->mf = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x48664
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x565c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x48687
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x48687
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x46a0
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: refs2id
int refs2id(refs_t *r, SAM_hdr *h) {
    int i;

    if (r->ref_id)
	free(r->ref_id);
    if (r->last)
	r->last = NULL;

    r->ref_id = calloc(h->nref, sizeof(*r->ref_id));
    if (!r->ref_id)
	return -1;

    r->nref = h->nref;
    for (i = 0; i < h->nref; i++) {
	khint_t k = kh_get(refs, r->h_meta, h->ref[i].name);
	if (k != kh_end(r->h_meta)) {
	    r->ref_id[i] = kh_val(r->h_meta, k);
	} else {
	    fprintf(stderr, "Unable to find ref name '%s'\n",
		    h->ref[i].name);
	}
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48728
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x46a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x4873f
movq -0x10(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x18(%rbp), %rax
movslq 0x38(%rax), %rdi
movl $0x8, %esi
callq 0x4370
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x48773
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48837
movq -0x18(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x48830
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x48840
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
je 0x487f2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x48820
movq 0x417d7(%rip), %rax     # 0x89fd0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdx
leaq 0x346c0(%rip), %rsi     # 0x7ced9
movb $0x0, %al
callq 0x4830
jmp 0x48822
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x48788
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_set_header
int cram_set_header(cram_fd *fd, SAM_hdr *hdr) {
    if (fd->header)
	sam_hdr_free(fd->header);
    fd->header = hdr;
    return refs_from_header(fd->refs, fd, hdr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x489b8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x5e3a0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x489e0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: mkdir_prefix
void mkdir_prefix(char *path, int mode) {
    char *cp = strrchr(path, '/');
    if (!cp)
	return;

    *cp = 0;
    if (is_directory(path)) {
	*cp = '/';
	return;
    }

    if (mkdir(path, mode) == 0) {
	chmod(path, mode);
	*cp = '/';
	return;
    }

    mkdir_prefix(path, mode);
    mkdir(path, mode);
    chmod(path, mode);
    *cp = '/';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2f, %esi
callq 0x4640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x48efa
jmp 0x48f69
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x55d10
cmpl $0x0, %eax
je 0x48f18
movq -0x18(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x48f69
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4250
cmpl $0x0, %eax
jne 0x48f3e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4500
movq -0x18(%rbp), %rax
movb $0x2f, (%rax)
jmp 0x48f69
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x48ed0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4250
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4500
movq -0x18(%rbp), %rax
movb $0x2f, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_ref_incr_locked
static void cram_ref_incr_locked(refs_t *r, int id) {
    RP("%d INC REF %d, %d %p\n", gettid(), id, (int)(id>=0?r->ref_id[id]->count+1:-999), id>=0?r->ref_id[id]->seq:(char *)1);

    if (id < 0 || !r->ref_id[id]->seq)
	return;

    if (r->last_id == id)
	r->last_id = -1;

    ++r->ref_id[id]->count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x48fd8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x30(%rax)
jne 0x48fda
jmp 0x4900d
movq -0x8(%rbp), %rax
movl 0x68(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x48ff1
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x68(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
popq %rbp
retq
nop
// File: karel-brinda[P]ococo/ext/htslib/cram/cram_io.c
// Function: cram_ref_decr_locked
static void cram_ref_decr_locked(refs_t *r, int id) {
    RP("%d DEC REF %d, %d %p\n", gettid(), id, (int)(id>=0?r->ref_id[id]->count-1:-999), id>=0?r->ref_id[id]->seq:(char *)1);

    if (id < 0 || !r->ref_id[id]->seq) {
	assert(r->ref_id[id]->count >= 0);
	return;
    }

    if (--r->ref_id[id]->count <= 0) {
	assert(r->ref_id[id]->count == 0);
	if (r->last_id >= 0) {
	    if (r->ref_id[r->last_id]->count <= 0 &&
		r->ref_id[r->last_id]->seq) {
		RP("%d FREE REF %d (%p)\n", gettid(),
		   r->last_id, r->ref_id[r->last_id]->seq);
		ref_entry_free_seq(r->ref_id[r->last_id]);
		r->ref_id[r->last_id]->length = 0;
	    }
	}
	r->last_id = id;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x4907c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x30(%rax)
jne 0x490b9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x28(%rax)
jl 0x49095
jmp 0x490b4
leaq 0x340cf(%rip), %rdi     # 0x7d16b
leaq 0x33cc3(%rip), %rsi     # 0x7cd66
movl $0x967, %edx            # imm = 0x967
leaq 0x340d6(%rip), %rcx     # 0x7d185
callq 0x4360
jmp 0x49198
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x28(%rcx), %rax
addq $-0x1, %rax
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jg 0x49198
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x28(%rax)
jne 0x490f8
jmp 0x49117
leaq 0x340af(%rip), %rdi     # 0x7d1ae
leaq 0x33c60(%rip), %rsi     # 0x7cd66
movl $0x96c, %edx            # imm = 0x96C
leaq 0x34073(%rip), %rcx     # 0x7d185
callq 0x4360
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jl 0x4918e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x68(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x28(%rax)
jg 0x4918c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x68(%rcx), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x30(%rax)
je 0x4918c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x68(%rcx), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x48640
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x68(%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq $0x0, 0x10(%rax)
jmp 0x4918e
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x68(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop