LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_aux_get
uint8_t *bam_aux_get(const bam1_t *b, const char tag[2])
{
    uint8_t *s;
    int y = tag[0]<<8 | tag[1];
    s = bam_get_aux(b);
    while (s < b->data + b->l_data) {
        int x = (int)s[0]<<8 | s[1];
        s += 2;
        if (x == y) return s;
        s = skip_aux(s);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbl (%rsi), %eax
shll $0x8, %eax
movsbl 0x1(%rsi), %ebp
orl %eax, %ebp
movq 0x8(%rdi), %rdx
movq 0x28(%rdi), %rcx
movq %rdx, %rax
shrq $0x30, %rax
leaq (%rcx,%rax,4), %rax
shrl $0x18, %edx
addq %rax, %rdx
movslq 0x10(%rdi), %rsi
leal 0x1(%rsi), %eax
sarl %eax
cltq
addq %rdx, %rax
addq %rsi, %rax
movslq 0x20(%rbx), %rdx
addq %rcx, %rdx
cmpq %rdx, %rax
jae 0x13ce0
movzwl (%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq $0x2, %rax
cmpl %ebp, %ecx
je 0x13ce2
movq %rax, %rdi
callq 0x13ce9
movq 0x28(%rbx), %rcx
jmp 0x13cb4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: skip_aux
static inline uint8_t *skip_aux(uint8_t *s)
{
    int size = aux_type2size(*s); ++s; // skip type
    uint32_t n;
    switch (size) {
    case 'Z':
    case 'H':
        while (*s) ++s;
        return s + 1;
    case 'B':
        size = aux_type2size(*s); ++s;
        memcpy(&n, s, 4); s += 4;
        return s + size * n;
    case 0:
        abort();
        break;
    default:
        return s + size;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
callq 0x13ab9
cmpb $0x42, %al
je 0x13d25
incq %rbx
movzbl %al, %ecx
cmpl $0x48, %ecx
je 0x13d17
cmpl $0x5a, %ecx
je 0x13d17
testl %ecx, %ecx
je 0x13d3b
movl %eax, %eax
addq %rax, %rbx
movq %rbx, %rax
jmp 0x13d39
leaq 0x1(%rbx), %rax
cmpb $0x0, (%rbx)
movq %rax, %rbx
jne 0x13d17
jmp 0x13d39
movzbl 0x1(%rbx), %edi
callq 0x13ab9
imull 0x2(%rbx), %eax
addq %rbx, %rax
addq $0x6, %rax
popq %rbx
retq
callq 0x42f0
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_aux_update_str
int bam_aux_update_str(bam1_t *b, const char tag[2], int len, const char *data)
{
    uint8_t *s = bam_aux_get(b,tag);
    if (!s) return -1;
    char type = *s;
    if (type != 'Z') { fprintf(stderr,"bam_aux_update_str() called for type '%c' instead of 'Z'\n", type); abort(); }
    bam_aux_del(b,s);
    s -= 2;
    int l_aux = bam_get_l_aux(b);
    uint8_t *aux = bam_get_aux(b);

    b->l_data += 3 + len;
    if (b->m_data < b->l_data) {
        b->m_data = b->l_data;
        kroundup32(b->m_data);
        b->data = (uint8_t*)realloc(b->data, b->m_data);
    }
    memmove(s+3+len, s, l_aux - (s - aux));
    s[0] = tag[0];
    s[1] = tag[1];
    s[2] = type;
    memmove(s+3,data,len);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r13
callq 0x13c78
testq %rax, %rax
je 0x13ef2
movq %rax, %r15
movq %rbx, 0x10(%rsp)
movsbl (%rax), %edx
cmpl $0x5a, %edx
jne 0x13f04
movq %r13, %rdi
movq %r15, %rsi
callq 0x13d40
leaq -0x2(%r15), %r10
movl 0x20(%r13), %eax
movq 0x8(%r13), %rcx
movq %rcx, %rdx
shrq $0x2e, %rdx
andl $-0x4, %edx
shrl $0x18, %ecx
movslq 0x10(%r13), %rsi
leal 0x1(%rsi), %r8d
sarl %r8d
leal (%rsi,%rcx), %r9d
addl %edx, %r9d
addl %r8d, %r9d
movq 0x28(%r13), %rdi
addq %rdi, %rcx
addq %rdx, %rcx
movslq %r8d, %rbx
addq %rcx, %rbx
addq %rsi, %rbx
leal (%r12,%rax), %ecx
addl $0x3, %ecx
movl %eax, %ebp
subl %r9d, %ebp
movl %ecx, 0x20(%r13)
cmpl %ecx, 0x24(%r13)
jge 0x13ea7
decl %ecx
movl %ecx, %eax
sarl %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
sarl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
sarl $0x10, %eax
orl %ecx, %eax
incl %eax
movl %eax, 0x24(%r13)
movslq %eax, %rsi
movq %r14, 0x8(%rsp)
movq %r12, %r14
movq %r10, %r12
callq 0x48c0
movq %r12, %r10
movq %r14, %r12
movq 0x8(%rsp), %r14
movq %rax, 0x28(%r13)
movslq %r12d, %r12
leaq (%r15,%r12), %rdi
incq %rdi
movq %r15, %r13
incq %r13
movslq %ebp, %rax
subq %r10, %rbx
addq %rax, %rbx
movq %r10, %rsi
movq %rbx, %rdx
callq 0x48b0
movb (%r14), %al
movb %al, -0x2(%r15)
movb 0x1(%r14), %al
movb %al, -0x1(%r15)
movb $0x5a, (%r15)
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x48b0
xorl %eax, %eax
jmp 0x13ef5
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x430c5(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x3075c(%rip), %rsi     # 0x44671
xorl %eax, %eax
callq 0x4770
callq 0x42f0
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_aux2i
int32_t bam_aux2i(const uint8_t *s)
{
    int type;
    type = *s++;
    if (type == 'c') return (int32_t)*(int8_t*)s;
    else if (type == 'C') return (int32_t)*(uint8_t*)s;
    else if (type == 's') return (int32_t)*(int16_t*)s;
    else if (type == 'S') return (int32_t)*(uint16_t*)s;
    else if (type == 'i' || type == 'I') return *(int32_t*)s;
    else return 0;
}

// Assembly:
movb (%rdi), %cl
leal -0x43(%rcx), %eax
rolb $0x4, %al
cmpb $0x3, %al
ja 0x13f54
movzbl %al, %eax
leaq 0x302cd(%rip), %rcx     # 0x44204
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x1(%rdi), %eax
retq
movsbl 0x1(%rdi), %eax
retq
movswl 0x1(%rdi), %eax
retq
movzwl 0x1(%rdi), %eax
retq
andb $-0x21, %cl
xorl %eax, %eax
cmpb $0x49, %cl
jne 0x13f61
movl 0x1(%rdi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_aux2f
double bam_aux2f(const uint8_t *s)
{
    int type;
    type = *s++;
    if (type == 'd') return *(double*)s;
    else if (type == 'f') return *(float*)s;
    else return 0.0;
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0x66, %eax
je 0x13f78
xorps %xmm0, %xmm0
cmpl $0x64, %eax
jne 0x13f7d
movsd 0x1(%rdi), %xmm0
retq
cvtss2sd 0x1(%rdi), %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: sam_open_mode
int sam_open_mode(char *mode, const char *fn, const char *format)
{
    // TODO Parse "bam5" etc for compression level
    if (format == NULL) {
        // Try to pick a format based on the filename extension
        const char *ext = fn? strrchr(fn, '.') : NULL;
        if (ext == NULL || strchr(ext, '/')) return -1;
        return sam_open_mode(mode, fn, ext+1);
    }
    else if (strcmp(format, "bam") == 0) strcpy(mode, "b");
    else if (strcmp(format, "cram") == 0) strcpy(mode, "c");
    else if (strcmp(format, "sam") == 0) strcpy(mode, "");
    else return -1;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
pushq $-0x1
popq %rbx
pushq $0x2e
popq %rbp
pushq $0x2f
popq %r13
testq %r15, %r15
jne 0x13ff0
testq %r12, %r12
je 0x1403f
movq %r12, %rdi
movl %ebp, %esi
callq 0x45a0
testq %rax, %rax
je 0x1403f
movq %rax, %r15
movq %rax, %rdi
movl %r13d, %esi
callq 0x41e0
incq %r15
testq %rax, %rax
je 0x13fbf
jmp 0x1403f
leaq 0x2fe84(%rip), %rsi     # 0x43e7b
movq %r15, %rdi
callq 0x4750
testl %eax, %eax
je 0x1402f
leaq 0x2fe75(%rip), %rsi     # 0x43e7f
movq %r15, %rdi
callq 0x4750
testl %eax, %eax
je 0x14037
leaq 0x2fe5a(%rip), %rsi     # 0x43e77
movq %r15, %rdi
callq 0x4750
testl %eax, %eax
jne 0x1403f
movb $0x0, (%r14)
jmp 0x1403d
movw $0x62, (%r14)
jmp 0x1403d
movw $0x63, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_plp_init
bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
{
    bam_plp_t iter;
    iter = (bam_plp_t)calloc(1, sizeof(struct __bam_plp_t));
    iter->mp = mp_init();
    iter->head = iter->tail = mp_alloc(iter->mp);
    iter->max_tid = iter->max_pos = -1;
    iter->maxcnt = 8000;
    if (func) {
        iter->func = func;
        iter->data = data;
        iter->b = bam_init1();
    }
    return iter;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x1
popq %r12
pushq $0x68
popq %rsi
movq %r12, %rdi
callq 0x4370
movq %rax, %r14
pushq $0x18
popq %rsi
movq %r12, %rdi
callq 0x4370
movq %rax, (%r14)
movq %rax, %rdi
callq 0x14790
movq %rax, 0x10(%r14)
movq %rax, 0x8(%r14)
orq $-0x1, 0x20(%r14)
movl $0x1f40, 0x34(%r14)     # imm = 0x1F40
testq %r15, %r15
je 0x14781
movq %r15, 0x50(%r14)
movq %rbx, 0x58(%r14)
callq 0x11215
movq %rax, 0x48(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_plp_destroy
void bam_plp_destroy(bam_plp_t iter)
{
    lbnode_t *p, *pnext;
    if ( iter->overlaps ) kh_destroy(olap_hash, iter->overlaps);
    for (p = iter->head; p != NULL; p = pnext) {
        pnext = p->next;
        mp_free(iter->mp, p);
    }
    mp_destroy(iter->mp);
    if (iter->b) bam_destroy1(iter->b);
    free(iter->plp);
    free(iter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %r14
testq %r14, %r14
je 0x14800
movq 0x18(%r14), %rdi
callq 0x4600
movq 0x10(%r14), %rdi
callq 0x4600
movq 0x20(%r14), %rdi
callq 0x4600
movq %r14, %rdi
callq 0x4600
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x1481a
movq 0x50(%rsi), %r14
movq (%rbx), %rdi
callq 0x1487d
movq %r14, %rsi
jmp 0x14804
movq (%rbx), %r14
xorl %r15d, %r15d
movslq 0x4(%r14), %rax
movq 0x10(%r14), %rdi
cmpq %rax, %r15
jge 0x1484c
movq (%rdi,%r15,8), %rax
movq 0x28(%rax), %rdi
callq 0x4600
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x4600
incq %r15
jmp 0x14820
callq 0x4600
movq %r14, %rdi
callq 0x4600
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x14867
callq 0x11220
movq 0x40(%rbx), %rdi
callq 0x4600
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: mp_free
static inline void mp_free(mempool_t *mp, lbnode_t *p)
{
    --mp->cnt; p->next = 0; // clear lbnode_t::next here
    if (mp->n == mp->max) {
        mp->max = mp->max? mp->max<<1 : 256;
        mp->buf = (lbnode_t**)realloc(mp->buf, sizeof(lbnode_t*) * mp->max);
    }
    mp->buf[mp->n++] = p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
decl (%rdi)
movq %rsi, %r14
andq $0x0, 0x50(%rsi)
movl 0x4(%rdi), %ecx
cmpl 0x8(%rdi), %ecx
jne 0x148bf
leal (%rcx,%rcx), %eax
testl %ecx, %ecx
movl $0x100, %ecx            # imm = 0x100
cmovnel %eax, %ecx
movl %ecx, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movslq %ecx, %rsi
shlq $0x3, %rsi
callq 0x48c0
movq %rax, 0x10(%rbx)
movl 0x4(%rbx), %ecx
jmp 0x148c3
movq 0x10(%rbx), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x4(%rbx)
movslq %ecx, %rcx
movq %r14, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: overlap_remove
static void overlap_remove(bam_plp_t iter, const bam1_t *b)
{
    if ( !iter->overlaps ) return;

    khiter_t kitr;
    if ( b )
    {
        kitr = kh_get(olap_hash, iter->overlaps, bam_get_qname(b));
        if ( kitr!=kh_end(iter->overlaps) )
            kh_del(olap_hash, iter->overlaps, kitr);
    }
    else
    {
        // remove all
        for (kitr = kh_begin(iter->overlaps); kitr<kh_end(iter->overlaps); kitr++)
            if ( kh_exist(iter->overlaps, kitr) ) kh_del(olap_hash, iter->overlaps, kitr);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x60(%rdi), %rbx
testq %rbx, %rbx
je 0x14e23
testq %rsi, %rsi
je 0x14e2e
movq 0x28(%rsi), %rsi
movq %rbx, %rdi
callq 0x15887
cmpl (%rbx), %eax
jne 0x14e68
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpl (%rbx), %ebp
jae 0x14e23
movq 0x10(%rbx), %rax
movl %ebp, %ecx
shrl $0x4, %ecx
movl (%rax,%rcx,4), %eax
movl %r15d, %ecx
andb $0x1e, %cl
shrl %cl, %eax
testb $0x3, %al
jne 0x14e60
movq %rbx, %rdi
movl %ebp, %esi
callq 0x15948
movq 0x60(%r14), %rbx
incl %ebp
addl $0x2, %r15d
jmp 0x14e36
movq %rbx, %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x15948
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_plp_auto
const bam_pileup1_t *bam_plp_auto(bam_plp_t iter, int *_tid, int *_pos, int *_n_plp)
{
    const bam_pileup1_t *plp;
    if (iter->func == 0 || iter->error) { *_n_plp = -1; return 0; }
    if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
    else { // no pileup line can be obtained; read alignments
        *_n_plp = 0;
        if (iter->is_eof) return 0;
        int ret;
        while ( (ret=iter->func(iter->data, iter->b)) >= 0) {
            if (bam_plp_push(iter, iter->b) < 0) {
                *_n_plp = -1;
                return 0;
            }
            if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
            // otherwise no pileup line can be returned; read the next alignment.
        }
        if ( ret < -1 ) { iter->error = ret; *_n_plp = -1; return 0; }
        bam_plp_push(iter, 0);
        if ((plp = bam_plp_next(iter, _tid, _pos, _n_plp)) != 0) return plp;
        return 0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
cmpq $0x0, 0x50(%rdi)
je 0x154e4
movq %rdi, %r15
cmpl $0x0, 0x30(%rdi)
je 0x154f5
orl $-0x1, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rsi, %r12
movq %r15, %rdi
movq %rbx, %rcx
callq 0x148d8
testq %rax, %rax
jne 0x154e9
andl $0x0, (%rbx)
cmpl $0x0, 0x28(%r15)
jne 0x154e7
jmp 0x1553d
movq 0x48(%r15), %rsi
movq %r15, %rdi
callq 0x14e7c
testl %eax, %eax
js 0x154e4
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x148d8
testq %rax, %rax
jne 0x154e9
movq 0x48(%r15), %rsi
movq 0x58(%r15), %rdi
callq *0x50(%r15)
testl %eax, %eax
jns 0x15517
cmpl $-0x1, %eax
je 0x15558
movl %eax, 0x30(%r15)
jmp 0x154e4
movq %r15, %rdi
xorl %esi, %esi
callq 0x14e7c
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x148d8
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_plp_reset
void bam_plp_reset(bam_plp_t iter)
{
    overlap_remove(iter, NULL);
    iter->max_tid = iter->max_pos = -1;
    iter->tid = iter->pos = 0;
    iter->is_eof = 0;
    while (iter->head != iter->tail) {
        lbnode_t *p = iter->head;
        iter->head = p->next;
        mp_free(iter->mp, p);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x14dfe
movaps 0x2ec90(%rip), %xmm0    # 0x44220
movups %xmm0, 0x18(%rbx)
andl $0x0, 0x28(%rbx)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x155b4
movq 0x50(%rsi), %rax
movq %rax, 0x8(%rbx)
movq (%rbx), %rdi
callq 0x1487d
jmp 0x15598
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_mplp_init
bam_mplp_t bam_mplp_init(int n, bam_plp_auto_f func, void **data)
{
    int i;
    bam_mplp_t iter;
    iter = (bam_mplp_t)calloc(1, sizeof(struct __bam_mplp_t));
    iter->pos = (uint64_t*)calloc(n, sizeof(uint64_t));
    iter->n_plp = (int*)calloc(n, sizeof(int));
    iter->plp = (const bam_pileup1_t**)calloc(n, sizeof(bam_pileup1_t*));
    iter->iter = (bam_plp_t*)calloc(n, sizeof(bam_plp_t));
    iter->n = n;
    iter->min = (uint64_t)-1;
    for (i = 0; i < n; ++i) {
        iter->iter[i] = bam_plp_init(func, data[i]);
        iter->pos[i] = iter->min;
    }
    return iter;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x4370
movq %rax, %r15
movslq %ebp, %r12
pushq $0x8
popq %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4370
movq %rax, %r13
movq %rax, 0x10(%r15)
pushq $0x4
popq %rsi
movq %r12, %rdi
callq 0x4370
movq %rax, 0x20(%r15)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4370
movq %rax, 0x28(%r15)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4370
movq %rax, %rbp
movq %rax, 0x18(%r15)
movl %r12d, (%r15)
movq %r15, (%rsp)
orq $-0x1, 0x8(%r15)
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
cmpq %r15, %r12
je 0x1565a
movq (%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x14720
movq %rax, (%rbp,%r15,8)
orq $-0x1, (%r13,%r15,8)
incq %r15
jmp 0x15639
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_mplp_destroy
void bam_mplp_destroy(bam_mplp_t iter)
{
    int i;
    for (i = 0; i < iter->n; ++i) bam_plp_destroy(iter->iter[i]);
    free(iter->iter); free(iter->pos); free(iter->n_plp); free(iter->plp);
    free(iter);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq (%rbx), %rax
movq 0x18(%rbx), %rdi
cmpq %rax, %r14
jge 0x156d8
movq (%rdi,%r14,8), %rdi
callq 0x147cc
incq %r14
jmp 0x156be
callq 0x4600
movq 0x10(%rbx), %rdi
callq 0x4600
movq 0x20(%rbx), %rdi
callq 0x4600
movq 0x28(%rbx), %rdi
callq 0x4600
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_mplp_auto
int bam_mplp_auto(bam_mplp_t iter, int *_tid, int *_pos, int *n_plp, const bam_pileup1_t **plp)
{
    int i, ret = 0;
    uint64_t new_min = (uint64_t)-1;
    for (i = 0; i < iter->n; ++i) {
        if (iter->pos[i] == iter->min) {
            int tid, pos;
            iter->plp[i] = bam_plp_auto(iter->iter[i], &tid, &pos, &iter->n_plp[i]);
            if ( iter->iter[i]->error ) return -1;
            iter->pos[i] = iter->plp[i] ? (uint64_t)tid<<32 | pos : 0;
        }
        if (iter->plp[i] && iter->pos[i] < new_min) new_min = iter->pos[i];
    }
    iter->min = new_min;
    if (new_min == (uint64_t)-1) return 0;
    *_tid = new_min>>32; *_pos = (uint32_t)new_min;
    for (i = 0; i < iter->n; ++i) {
        if (iter->pos[i] == iter->min) { // FIXME: valgrind reports "uninitialised value(s) at this line"
            n_plp[i] = iter->n_plp[i], plp[i] = iter->plp[i];
            ++ret;
        } else n_plp[i] = 0, plp[i] = 0;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
pushq $-0x1
popq %r13
xorl %ebp, %ebp
xorl %r12d, %r12d
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x157cb
movq 0x10(%r15), %rax
movq (%rax,%rbp,2), %rax
cmpq 0x8(%r15), %rax
jne 0x157a9
movq 0x18(%r15), %rax
movq (%rax,%rbp,2), %rdi
movq 0x20(%r15), %rcx
addq %rbp, %rcx
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x154c9
movq 0x28(%r15), %rcx
movq %rax, (%rcx,%rbp,2)
movq 0x18(%r15), %rax
movq (%rax,%rbp,2), %rax
cmpl $0x0, 0x30(%rax)
jne 0x15825
movq 0x10(%r15), %rdx
movq 0x28(%r15), %rax
movq (%rax,%rbp,2), %rcx
movl 0x4(%rsp), %esi
shlq $0x20, %rsi
movslq (%rsp), %rax
orq %rsi, %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
movq %rax, (%rdx,%rbp,2)
jmp 0x157b1
movq 0x28(%r15), %rcx
movq (%rcx,%rbp,2), %rcx
cmpq %r13, %rax
cmovaeq %r13, %rax
testq %rcx, %rcx
cmovneq %rax, %r13
incq %r12
addq $0x4, %rbp
jmp 0x15731
movq %r13, 0x8(%r15)
cmpq $-0x1, %r13
je 0x1582a
movq %r13, %rax
shrq $0x20, %rax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movq 0x10(%rsp), %rax
movl %r13d, (%rax)
xorl %ecx, %ecx
xorl %eax, %eax
movslq (%r15), %rdx
cmpq %rdx, %rcx
jge 0x1582c
movq 0x10(%r15), %rdx
cmpq %r13, (%rdx,%rcx,8)
jne 0x15814
movq 0x20(%r15), %rdx
movq 0x28(%r15), %rsi
movl (%rdx,%rcx,4), %edx
movq (%rsi,%rcx,8), %rsi
incl %eax
jmp 0x15818
xorl %edx, %edx
xorl %esi, %esi
movl %edx, (%r14,%rcx,4)
movq %rsi, (%rbx,%rcx,8)
incq %rcx
jmp 0x157ef
pushq $-0x1
popq %rax
jmp 0x1582c
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: bam_mplp_reset
void bam_mplp_reset(bam_mplp_t iter)
{
    int i;
    iter->min = (uint64_t)-1;
    for (i = 0; i < iter->n; ++i) {
        bam_plp_reset(iter->iter[i]);
        iter->pos[i] = (uint64_t)-1;
        iter->n_plp[i] = 0;
        iter->plp[i] = NULL;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
orq $-0x1, 0x8(%rdi)
xorl %r14d, %r14d
movslq (%rbx), %rax
cmpq %rax, %r14
jge 0x1587f
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1557e
movq 0x10(%rbx), %rax
orq $-0x1, (%rax,%r14,8)
movq 0x20(%rbx), %rax
andl $0x0, (%rax,%r14,4)
movq 0x28(%rbx), %rax
andq $0x0, (%rax,%r14,8)
incq %r14
jmp 0x1584a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: cigar_iref2iseq_set
static inline int cigar_iref2iseq_set(uint32_t **cigar, uint32_t *cigar_max, int *icig, int *iseq, int *iref)
{
    int pos = *iref;
    if ( pos < 0 ) return -1;
    *icig = 0;
    *iseq = 0;
    *iref = 0;
    while ( *cigar<cigar_max )
    {
        int cig  = (**cigar) & BAM_CIGAR_MASK;
        int ncig = (**cigar) >> BAM_CIGAR_SHIFT;

        if ( cig==BAM_CSOFT_CLIP ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
        if ( cig==BAM_CHARD_CLIP || cig==BAM_CPAD ) { (*cigar)++; *icig = 0; continue; }
        if ( cig==BAM_CMATCH || cig==BAM_CEQUAL || cig==BAM_CDIFF )
        {
            pos -= ncig;
            if ( pos < 0 ) { *icig = ncig + pos; *iseq += *icig; *iref += *icig; return BAM_CMATCH; }
            (*cigar)++; *iseq += ncig; *icig = 0; *iref += ncig;
            continue;
        }
        if ( cig==BAM_CINS ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
        if ( cig==BAM_CDEL || cig==BAM_CREF_SKIP )
        {
            pos -= ncig;
            if ( pos<0 ) pos = 0;
            (*cigar)++; *icig = 0; *iref += ncig;
            continue;
        }
        fprintf(stderr,"todo: cigar %d\n", cig);
        assert(0);
    }
    *iseq = -1;
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl (%r8), %r10d
pushq $-0x1
popq %rax
testl %r10d, %r10d
js 0x15cd3
andl $0x0, (%rdx)
andl $0x0, (%rcx)
andl $0x0, (%r8)
movq (%rdi), %r11
xorl %ebx, %ebx
cmpq %rsi, %r11
jae 0x15cd0
movl (%r11), %r14d
movl %r14d, %r9d
andl $0xf, %r9d
movl %r14d, %ebp
shrl $0x4, %ebp
cmpl $0x4, %r9d
je 0x15c7d
leal -0x5(%r9), %r15d
cmpl $0x1, %r15d
ja 0x15c6b
addq $0x4, %r11
movq %r11, (%rdi)
andl $0x0, (%rdx)
jmp 0x15c36
testb $0x7, %r14b
je 0x15c8b
cmpl $0x7, %r9d
je 0x15c8b
cmpl $0x1, %r9d
jne 0x15ca7
addq $0x4, %r11
movq %r11, (%rdi)
addl %ebp, (%rcx)
andl $0x0, (%rdx)
jmp 0x15c36
movl %r10d, %r9d
subl %ebp, %r9d
js 0x15cde
addq $0x4, %r11
movq %r11, (%rdi)
addl %ebp, (%rcx)
andl $0x0, (%rdx)
addl (%r8), %ebp
movl %r9d, %r10d
jmp 0x15cc8
andl $0xe, %r14d
cmpl $0x2, %r14d
jne 0x15ced
subl %ebp, %r10d
testl %r10d, %r10d
cmovlel %ebx, %r10d
addq $0x4, %r11
movq %r11, (%rdi)
andl $0x0, (%rdx)
addl (%r8), %ebp
movl %ebp, (%r8)
jmp 0x15c36
orl $-0x1, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %r10d, (%rdx)
addl %r10d, (%rcx)
movl (%rdx), %eax
addl %eax, (%r8)
xorl %eax, %eax
jmp 0x15cd3
movq 0x412dc(%rip), %rax     # 0x56fd0
movq (%rax), %rdi
leaq 0x2ebf7(%rip), %rsi     # 0x448f5
movl %r9d, %edx
xorl %eax, %eax
callq 0x4770
leaq 0x3087f(%rip), %rdi     # 0x4658e
leaq 0x2eb50(%rip), %rsi     # 0x44866
leaq 0x2ebe8(%rip), %rcx     # 0x44905
movl $0x6c5, %edx            # imm = 0x6C5
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/sam.c
// Function: cigar_iref2iseq_next
static inline int cigar_iref2iseq_next(uint32_t **cigar, uint32_t *cigar_max, int *icig, int *iseq, int *iref)
{
    while ( *cigar < cigar_max )
    {
        int cig  = (**cigar) & BAM_CIGAR_MASK;
        int ncig = (**cigar) >> BAM_CIGAR_SHIFT;

        if ( cig==BAM_CMATCH || cig==BAM_CEQUAL || cig==BAM_CDIFF )
        {
            if ( *icig >= ncig - 1 ) { *icig = 0;  (*cigar)++; continue; }
            (*iseq)++; (*icig)++; (*iref)++;
            return BAM_CMATCH;
        }
        if ( cig==BAM_CDEL || cig==BAM_CREF_SKIP ) { (*cigar)++; (*iref) += ncig; *icig = 0; continue; }
        if ( cig==BAM_CINS ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
        if ( cig==BAM_CSOFT_CLIP ) { (*cigar)++; *iseq += ncig; *icig = 0; continue; }
        if ( cig==BAM_CHARD_CLIP || cig==BAM_CPAD ) { (*cigar)++; *icig = 0; continue; }
        fprintf(stderr,"todo: cigar %d\n", cig);
        assert(0);
    }
    *iseq = -1;
    *iref = -1;
    return -1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %r9
cmpq %rsi, %r9
jae 0x15db8
movl (%r9), %r11d
movl %r11d, %eax
andl $0xf, %eax
movl %r11d, %r10d
shrl $0x4, %r10d
cmpl $0x7, %eax
setne %bl
testb $0x7, %r11b
setne %bpl
testb %bl, %bpl
jne 0x15d6d
decl %r10d
cmpl %r10d, (%rdx)
jl 0x15dc2
andl $0x0, (%rdx)
addq $0x4, %r9
movq %r9, (%rdi)
jmp 0x15d2d
andl $0xe, %r11d
cmpl $0x2, %r11d
jne 0x15d86
addq $0x4, %r9
movq %r9, (%rdi)
addl %r10d, (%r8)
andl $0x0, (%rdx)
jmp 0x15d2d
cmpl $0x4, %eax
je 0x15d90
cmpl $0x1, %eax
jne 0x15d9f
addq $0x4, %r9
movq %r9, (%rdi)
addl %r10d, (%rcx)
andl $0x0, (%rdx)
jmp 0x15d2d
leal -0x5(%rax), %r10d
cmpl $0x1, %r10d
ja 0x15dd7
addq $0x4, %r9
movq %r9, (%rdi)
andl $0x0, (%rdx)
jmp 0x15d2d
orl $-0x1, (%rcx)
pushq $-0x1
popq %rcx
movl %ecx, %eax
jmp 0x15dcd
incl (%rcx)
incl (%rdx)
movl (%r8), %ecx
incl %ecx
xorl %eax, %eax
movl %ecx, (%r8)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x411f2(%rip), %rcx     # 0x56fd0
movq (%rcx), %rdi
leaq 0x2eb0d(%rip), %rsi     # 0x448f5
movl %eax, %edx
xorl %eax, %eax
callq 0x4770
leaq 0x30796(%rip), %rdi     # 0x4658e
leaq 0x2ea67(%rip), %rsi     # 0x44866
leaq 0x2eb45(%rip), %rcx     # 0x4494b
movl $0x6dc, %edx            # imm = 0x6DC
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/./cram/cram_io.h
// Function: safe_itf8_get
static inline int safe_itf8_get(const char *cp, const char *endp,
                                int32_t *val_p) {
    const unsigned char *up = (unsigned char *)cp;

    if (endp - cp < 5 &&
        (cp >= endp || endp - cp < itf8_bytes[up[0]>>4])) {
        *val_p = 0;
        return 0;
    }

    if (up[0] < 0x80) {
        *val_p =   up[0];
        return 1;
    } else if (up[0] < 0xc0) {
        *val_p = ((up[0] <<8) |  up[1])                           & 0x3fff;
        return 2;
    } else if (up[0] < 0xe0) {
        *val_p = ((up[0]<<16) | (up[1]<< 8) |  up[2])             & 0x1fffff;
        return 3;
    } else if (up[0] < 0xf0) {
        *val_p = ((up[0]<<24) | (up[1]<<16) | (up[2]<<8) | up[3]) & 0x0fffffff;
        return 4;
    } else {
        *val_p = ((up[0] & 0x0f)<<28) | (up[1]<<20) | (up[2]<<12) | (up[3]<<4) | (up[4] & 0x0f);
        return 5;
    }
}

// Assembly:
movq %rsi, %r8
subq %rdi, %r8
cmpq $0x5, %r8
jge 0x16094
xorl %ecx, %ecx
cmpq %rsi, %rdi
jae 0x160a3
movzbl (%rdi), %esi
movl %esi, %eax
shrl $0x4, %eax
leaq 0x2f70f(%rip), %r9      # 0x45790
movslq (%r9,%rax,4), %r9
movl $0x0, %eax
cmpq %r9, %r8
jge 0x16097
jmp 0x16122
movb (%rdi), %sil
movzbl %sil, %ecx
testb %cl, %cl
js 0x160a7
pushq $0x1
jmp 0x16121
xorl %eax, %eax
jmp 0x16122
movzbl 0x1(%rdi), %eax
cmpb $-0x41, %sil
ja 0x160bd
andl $0x3f, %ecx
shll $0x8, %ecx
orl %eax, %ecx
pushq $0x2
jmp 0x16121
cmpb $-0x21, %sil
ja 0x160d8
shll $0x8, %eax
movzbl 0x2(%rdi), %esi
andl $0x1f, %ecx
shll $0x10, %ecx
orl %eax, %ecx
orl %esi, %ecx
pushq $0x3
jmp 0x16121
cmpb $-0x11, %sil
ja 0x160fc
shll $0x10, %eax
movzbl 0x2(%rdi), %esi
shll $0x8, %esi
movzbl 0x3(%rdi), %edi
andl $0xf, %ecx
shll $0x18, %ecx
orl %eax, %ecx
orl %esi, %ecx
orl %edi, %ecx
pushq $0x4
jmp 0x16121
shll $0x1c, %ecx
shll $0x14, %eax
orl %ecx, %eax
movzbl 0x2(%rdi), %ecx
shll $0xc, %ecx
orl %eax, %ecx
movzbl 0x3(%rdi), %eax
shll $0x4, %eax
orl %ecx, %eax
movzbl 0x4(%rdi), %ecx
andl $0xf, %ecx
orl %eax, %ecx
pushq $0x5
popq %rax
movl %ecx, (%rdx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: cram_decode_estimate_sizes
void cram_decode_estimate_sizes(cram_block_compression_hdr *hdr, cram_slice *s,
				int *qual_size, int *name_size,
				int *q_id) {
    int bnum1, bnum2;
    cram_codec *cd;

    *qual_size = 0;
    *name_size = 0;

    /* Qual */
    cd = hdr->codecs[DS_QS];
    bnum1 = cram_codec_to_id(cd, &bnum2);
    if (bnum1 < 0 && bnum2 >= 0) bnum1 = bnum2;
    if (cram_ds_unique(hdr, cd, bnum1)) {
	cram_block *b = cram_get_block_by_id(s, bnum1);
	if (b) *qual_size = b->uncomp_size;
	if (q_id && cd->codec == E_EXTERNAL)
	    *q_id = bnum1;
    }

    /* Name */
    cd = hdr->codecs[DS_RN];
    bnum1 = cram_codec_to_id(cd, &bnum2);
    if (bnum1 < 0 && bnum2 >= 0) bnum1 = bnum2;
    if (cram_ds_unique(hdr, cd, bnum1)) {
	cram_block *b = cram_get_block_by_id(s, bnum1);
	if (b) *name_size = b->uncomp_size;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r15
andl $0x0, (%rdx)
movq %rcx, 0x10(%rsp)
andl $0x0, (%rcx)
movq 0x2e0(%rdi), %r13
leaq 0xc(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x3f127
movl (%rbx), %ebx
testl %ebx, %ebx
cmovsl %eax, %ebx
testl %eax, %eax
cmovnsl %eax, %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x179d2
testl %eax, %eax
je 0x1797c
movq %r14, %rdi
movl %ebx, %esi
callq 0x17a53
testq %rax, %rax
je 0x1796c
movl 0x14(%rax), %eax
movl %eax, (%rbp)
testq %r12, %r12
je 0x1797c
cmpl $0x1, (%r13)
jne 0x1797c
movl %ebx, (%r12)
movq 0x2d8(%r15), %rdi
leaq 0xc(%rsp), %rbx
movq %rbx, %rsi
callq 0x3f127
movl (%rbx), %ebx
testl %ebx, %ebx
cmovsl %eax, %ebx
testl %eax, %eax
cmovnsl %eax, %ebx
movq %r15, %rdi
movl %ebx, %esi
callq 0x179d2
testl %eax, %eax
je 0x179c3
movq %r14, %rdi
movl %ebx, %esi
callq 0x17a53
testq %rax, %rax
je 0x179c3
movl 0x14(%rax), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: cram_ds_unique
static int cram_ds_unique(cram_block_compression_hdr *hdr, cram_codec *c,
			  int id) {
    int i, n_id = 0;
    enum cram_encoding e_type = 0;

    for (i = 0; i < DS_END; i++) {
	cram_codec *c;
	int bnum1, bnum2, old_n_id;

	if (!(c = hdr->codecs[i]))
	    continue;

	bnum1 = cram_codec_to_id(c, &bnum2);

	old_n_id = n_id;
	if (bnum1 == id) {
	    n_id++;
	    e_type = c->codec;
	}
	if (bnum2 == id) {
	    n_id++;
	    e_type = c->codec;
	}

	if (n_id == old_n_id+2)
	    n_id--; // len/val in same place counts once only.
    }

    return n_id == 1 ? e_type : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq $0x2f, %r13
je 0x17a3b
movq 0x280(%r14,%r13,8), %r12
testq %r12, %r12
je 0x17a36
movq %r12, %rdi
leaq 0x4(%rsp), %rsi
callq 0x3f127
movl %r15d, %ecx
cmpl %ebx, %eax
jne 0x17a19
leal 0x1(%r15), %ecx
movl (%r12), %ebp
cmpl %ebx, 0x4(%rsp)
jne 0x17a25
incl %ecx
movl (%r12), %ebp
addl $0x2, %r15d
xorl %eax, %eax
cmpl %r15d, %ecx
sete %al
subl %eax, %ecx
movl %ecx, %r15d
incq %r13
jmp 0x179ea
xorl %eax, %eax
cmpl $0x1, %r15d
cmovel %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/./cram/cram_io.h
// Function: cram_get_block_by_id
static inline cram_block *cram_get_block_by_id(cram_slice *slice, int id) {
    if (slice->block_by_id && id >= 0 && id < 1024) {
        return slice->block_by_id[id];
    } else {
        int i;
        for (i = 0; i < slice->hdr->num_blocks; i++) {
	    cram_block *b = slice->block[i];
	    if (b && b->content_type == EXTERNAL && b->content_id == id)
	        return b;
	}
    }
    return NULL;
}

// Assembly:
movq 0x18(%rdi), %rax
testq %rax, %rax
setne %cl
cmpl $0x400, %esi            # imm = 0x400
setb %dl
testb %cl, %dl
je 0x17a71
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
retq
movq (%rdi), %rax
movl 0x20(%rax), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x17aa2
movq 0x10(%rdi), %rax
movq (%rax,%rdx,8), %rax
testq %rax, %rax
je 0x17a9d
cmpl $0x4, 0x8(%rax)
jne 0x17a9d
cmpl %esi, 0xc(%rax)
je 0x17a70
incq %rdx
jmp 0x17a80
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: md5_print
static char *md5_print(unsigned char *md5, char *out) {
    int i;
    for (i = 0; i < 16; i++) {
	out[i*2+0] = "0123456789abcdef"[md5[i]>>4];
	out[i*2+1] = "0123456789abcdef"[md5[i]&15];
    }
    out[32] = 0;

    return out;
}

// Assembly:
movq %rsi, %rax
xorl %ecx, %ecx
leaq 0x292dc(%rip), %rdx     # 0x44ca6
cmpq $0x10, %rcx
je 0x1b9f4
movzbl (%rdi,%rcx), %esi
shrl $0x4, %esi
movb (%rsi,%rdx), %sil
movb %sil, (%rax,%rcx,2)
movzbl (%rdi,%rcx), %esi
andl $0xf, %esi
movb (%rsi,%rdx), %sil
movb %sil, 0x1(%rax,%rcx,2)
incq %rcx
jmp 0x1b9ca
movb $0x0, 0x20(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: cram_decode_slice_mt
int cram_decode_slice_mt(cram_fd *fd, cram_container *c, cram_slice *s,
			 SAM_hdr *bfd) {
    cram_decode_job *j;
    int nonblock;

    if (!fd->pool)
	return cram_decode_slice(fd, c, s, bfd);

    if (!(j = malloc(sizeof(*j))))
	return -1;

    j->fd = fd;
    j->c  = c;
    j->s  = s;
    j->h  = bfd;
    
    nonblock = t_pool_results_queue_sz(fd->rqueue) ? 1 : 0;

    if (-1 == t_pool_dispatch2(fd->pool, fd->rqueue, cram_decode_slice_thread,
			       j, nonblock)) {
	/* Would block */
	fd->job_pending = j;
    } else {
	fd->job_pending = NULL;
    }

    // flush too
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
cmpq $0x0, 0x8860(%rdi)
je 0x1ba98
pushq $0x28
popq %rdi
callq 0x46f0
testq %rax, %rax
je 0x1bab2
movq %rax, %r14
movq %rbx, (%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %r15, 0x18(%rax)
movq 0x8868(%rbx), %rdi
callq 0x34a37
xorl %r8d, %r8d
testl %eax, %eax
setne %r8b
movq 0x8860(%rbx), %rdi
movq 0x8868(%rbx), %rsi
leaq -0x88(%rip), %rdx       # 0x1b9f9
movq %r14, %rcx
callq 0x34deb
cmpl $-0x1, %eax
je 0x1bab7
andq $0x0, 0x88f0(%rbx)
jmp 0x1babe
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x17cbf
pushq $-0x1
popq %rax
jmp 0x1bac0
movq %r14, 0x88f0(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: map_find
static cram_map *map_find(cram_map **map, unsigned char *key, int id) {
    cram_map *m;

    m = map[CRAM_MAP(key[0],key[1])];
    while (m && m->key != id)
	m= m->next;

    return m;
}

// Assembly:
movzbl (%rsi), %eax
leal (%rax,%rax,2), %eax
movzbl 0x1(%rsi), %ecx
addl %eax, %ecx
andl $0x1f, %ecx
leaq (%rdi,%rcx,8), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x1c658
cmpl %edx, (%rax)
je 0x1c658
addq $0x18, %rax
jmp 0x1c646
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/cram/cram_decode.c
// Function: add_md_char
static inline void add_md_char(cram_slice *s, int decode_md, char c, int32_t *md_dist) {
    if (decode_md) {
	BLOCK_APPEND_UINT(s->aux_blk, *md_dist);
	BLOCK_APPEND_CHAR(s->aux_blk, c);
	*md_dist = 0;
    }
}

// Assembly:
testl %esi, %esi
je 0x1c7af
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rdi, %r14
movq 0x88(%rdi), %rcx
movl $0x400, %r12d           # imm = 0x400
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %r15
leaq 0xb(%r15), %rdx
cmpq %rdx, %rax
ja 0x1c6f8
movq %rax, %xmm0
punpckldq 0x272f4(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x272fc(%rip), %xmm0    # 0x439a0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x28328(%rip), %xmm1    # 0x449e0
cvttsd2si %xmm1, %rdx
movq %rdx, %rdi
subsd 0x27250(%rip), %xmm1    # 0x43918
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rdx, %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x28(%rcx)
movq 0x20(%rcx), %rdi
callq 0x48c0
movq 0x88(%r14), %rcx
movq %rax, 0x20(%rcx)
jmp 0x1c67e
addq 0x20(%rcx), %r15
movl (%rbx), %esi
movq %r15, %rdi
callq 0x1c7b0
subq %r15, %rax
movq 0x88(%r14), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0x30(%rcx)
movl $0x400, %r15d           # imm = 0x400
movq 0x28(%rcx), %rdx
leaq 0x1(%rax), %rsi
cmpq %rsi, %rdx
ja 0x1c798
movq %rdx, %xmm0
punpckldq 0x27258(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x27260(%rip), %xmm0    # 0x439a0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x2828c(%rip), %xmm1    # 0x449e0
cvttsd2si %xmm1, %rax
movq %rax, %rdi
subsd 0x271b4(%rip), %xmm1    # 0x43918
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rax, %rsi
testq %rdx, %rdx
cmoveq %r15, %rsi
movq %rsi, 0x28(%rcx)
movq 0x20(%rcx), %rdi
callq 0x48c0
movq 0x88(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x30(%rcx), %rax
jmp 0x1c71e
movq 0x20(%rcx), %rdx
movq %rsi, 0x30(%rcx)
movb %bpl, (%rdx,%rax)
andl $0x0, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/karel-brinda[P]ococo/ext/htslib/./cram/cram_io.h
// Function: append_sub32
static inline unsigned char *append_sub32(unsigned char *cp, uint32_t i) {
    *cp++ = i / 100000000 + '0', i %= 100000000;
    *cp++ = i / 10000000  + '0', i %= 10000000;
    *cp++ = i / 1000000   + '0', i %= 1000000;
    *cp++ = i / 100000    + '0', i %= 100000;
    *cp++ = i / 10000     + '0', i %= 10000;
    *cp++ = i / 1000      + '0', i %= 1000;
    *cp++ = i / 100       + '0', i %= 100;
    *cp++ = i / 10        + '0', i %= 10;
    *cp++ = i             + '0';

    return cp;
}

// Assembly:
movl %esi, %eax
movl $0x5f5e100, %ecx        # imm = 0x5F5E100
xorl %edx, %edx
divl %ecx
addb $0x30, %al
movb %al, (%rdi)
movl $0x989680, %ecx         # imm = 0x989680
movl %edx, %eax
xorl %edx, %edx
divl %ecx
orb $0x30, %al
movb %al, 0x1(%rdi)
movl $0xf4240, %ecx          # imm = 0xF4240
movl %edx, %eax
xorl %edx, %edx
divl %ecx
addb $0x30, %al
movb %al, 0x2(%rdi)
movl $0x186a0, %ecx          # imm = 0x186A0
movl %edx, %eax
xorl %edx, %edx
divl %ecx
orb $0x30, %al
movb %al, 0x3(%rdi)
movl $0x2710, %ecx           # imm = 0x2710
movl %edx, %eax
xorl %edx, %edx
divl %ecx
orb $0x30, %al
movb %al, 0x4(%rdi)
movw $0x3e8, %cx             # imm = 0x3E8
movl %edx, %eax
xorl %edx, %edx
divw %cx
addb $0x30, %al
movb %al, 0x5(%rdi)
movw $0x64, %cx
movl %edx, %eax
xorl %edx, %edx
divw %cx
orb $0x30, %al
movb %al, 0x6(%rdi)
movzbl %dl, %eax
movb $0xa, %cl
divb %cl
movzbl %ah, %ecx
orb $0x30, %al
movb %al, 0x7(%rdi)
orb $0x30, %cl
movb %cl, 0x8(%rdi)
leaq 0x9(%rdi), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x80(%rdi), %rcx
cmpl $0x0, 0x94(%rdi)
je 0x243b4
movq (%rcx), %rcx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq %rax, 0x4(%rcx)
pushq $-0x2
popq %rax
xorl %edx, %edx
jmp 0x243d0
movl 0x6c(%rdi), %eax
movq (%rcx), %rcx
movl %eax, 0x4(%rcx)
movl 0xa0(%rdi), %esi
movl %esi, 0x8(%rcx)
movl 0xa4(%rdi), %edx
subl %esi, %edx
incl %edx
movl %edx, 0xc(%rcx)
movl 0x5c(%rdi), %edx
movl %edx, 0x10(%rcx)
movl 0x54(%rdi), %ecx
testl %ecx, %ecx
jne 0x243f1
cmpl %eax, 0x4(%rdi)
je 0x243e8
movl %eax, 0x4(%rdi)
movl 0xa0(%rdi), %eax
movl %eax, 0x8(%rdi)
incl %ecx
movl %ecx, 0x54(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
incl %ecx
movl %ecx, (%rsp)
movl $0x42, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movl %r9d, 0xc(%rsp)
movq 0x1b0(%rdi), %rdi
movl %r8d, %esi
callq 0x2ecc1
movq 0x120(%r15), %rdi
movl %ebp, %esi
callq 0x2ecc1
movq 0x70(%r14), %rcx
movl $0x400, %r12d           # imm = 0x400
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rdx
leaq 0x1(%rdx), %rsi
cmpq %rsi, %rax
ja 0x24efb
movq %rax, %xmm0
punpckldq 0x1eaee(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1eaf6(%rip), %xmm0    # 0x439a0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1fb22(%rip), %xmm1    # 0x449e0
cvttsd2si %xmm1, %rdx
movq %rdx, %rdi
subsd 0x1ea4a(%rip), %xmm1    # 0x43918
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rdx, %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x28(%rcx)
movq 0x20(%rcx), %rdi
callq 0x48c0
movq 0x70(%r14), %rcx
movq %rax, 0x20(%rcx)
jmp 0x24e84
movq 0x20(%rcx), %rax
movq %rsi, 0x30(%rcx)
movb %bpl, (%rax,%rdx)
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2552e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
incl %ecx
movl %ecx, (%rsp)
movl $0x51, 0x4(%rsp)
movl %r8d, 0x8(%rsp)
movq 0x120(%rdi), %rdi
movl %r8d, %esi
callq 0x2ecc1
movq 0x70(%r14), %rcx
movl $0x400, %r12d           # imm = 0x400
movq 0x28(%rcx), %rax
movq 0x30(%rcx), %rdx
leaq 0x1(%rdx), %rsi
cmpq %rsi, %rax
ja 0x24fdf
movq %rax, %xmm0
punpckldq 0x1ea0a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1ea12(%rip), %xmm0    # 0x439a0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1fa3e(%rip), %xmm1    # 0x449e0
cvttsd2si %xmm1, %rdx
movq %rdx, %rdi
subsd 0x1e966(%rip), %xmm1    # 0x43918
cvttsd2si %xmm1, %rsi
sarq $0x3f, %rdi
andq %rdi, %rsi
orq %rdx, %rsi
testq %rax, %rax
cmoveq %r12, %rsi
movq %rsi, 0x28(%rcx)
movq 0x20(%rcx), %rdi
callq 0x48c0
movq 0x70(%r14), %rcx
movq %rax, 0x20(%rcx)
jmp 0x24f68
movq 0x20(%rcx), %rax
movq %rsi, 0x30(%rcx)
movb %bpl, (%rax,%rdx)
movq %rsp, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2552e
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movl 0x4c(%rsi), %eax
cmpl %eax, 0x48(%rsi)
jl 0x25578
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x400, %eax            # imm = 0x400
cmovnel %ecx, %eax
movl %eax, 0x4c(%r14)
movq 0x40(%r14), %rdi
movslq %eax, %rsi
shlq $0x4, %rsi
callq 0x48c0
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0x255f8
movslq 0x68(%r12), %rcx
leaq 0x1(%rcx), %rax
movl %eax, 0x68(%r12)
testq %rcx, %rcx
je 0x255aa
movq 0x1a0(%r15), %rdi
movl (%rbx), %esi
movq 0x40(%r14), %rcx
movslq 0x64(%r12), %rdx
addq %rax, %rdx
shlq $0x4, %rdx
subl -0x20(%rcx,%rdx), %esi
jmp 0x255bc
movl 0x48(%r14), %eax
movl %eax, 0x64(%r12)
movq 0x1a0(%r15), %rdi
movl (%rbx), %esi
callq 0x2ecc1
movq 0x198(%r15), %rdi
movl 0x4(%rbx), %esi
callq 0x2ecc1
movq 0x40(%r14), %rax
movslq 0x48(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x48(%r14)
shlq $0x4, %rcx
movups (%rbx), %xmm0
movups %xmm0, (%rax,%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $-0x1
popq %rax
jmp 0x255ec
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq (%rsi), %r10
movq (%rdi), %rcx
pushq $-0x1
popq %rax
cmpq %rcx, %r10
jae 0x25f64
movq 0x10(%rdi), %r8
movzbl (%r8,%r10), %r8d
cmpl $0x20, %r8d
je 0x25efd
cmpl $0x9, %r8d
jne 0x25f02
incq %r10
jmp 0x25ee3
xorl %r11d, %r11d
cmpb $0x2d, %r8b
sete %r11b
leaq (%r11,%r10), %r9
cmpq %rcx, %r9
jae 0x25f64
movq 0x10(%rdi), %rdi
addq %rdi, %r11
movb (%r10,%r11), %r10b
addb $-0x30, %r10b
cmpb $0x9, %r10b
ja 0x25f64
xorl %eax, %eax
cmpq %rcx, %r9
jae 0x25f52
movzbl (%rdi,%r9), %r10d
leal -0x30(%r10), %r11d
cmpb $0x9, %r11b
ja 0x25f4f
imull $0xa, %eax, %eax
incq %r9
addl %r10d, %eax
addl $-0x30, %eax
jmp 0x25f2d
movq %r9, %rcx
movl %eax, %edi
negl %edi
cmpb $0x2d, %r8b
movq %rcx, (%rsi)
cmovnel %eax, %edi
movl %edi, (%rdx)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq $0x0, 0x8838(%rdi)
je 0x25fb3
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x8834(%rbx), %rax
movq 0x8838(%rbx), %rdi
cmpq %rax, %r15
jge 0x25fa1
addq %r14, %rdi
callq 0x25fb4
incq %r15
addq $0x30, %r14
jmp 0x25f7d
callq 0x4600
andq $0x0, 0x8838(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq $0x0, 0x8(%rdi)
je 0x25ff0
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq (%rbx), %rax
movq 0x8(%rbx), %rdi
cmpq %rax, %r15
jge 0x25fe6
addq %r14, %rdi
callq 0x25fb4
incq %r15
addq $0x30, %r14
jmp 0x25fc9
popq %rbx
popq %r14
popq %r15
jmp 0x4600
retq