LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: seg_put
void seg_put(asm_dict_t *d, uint32_t s, uint32_t k, uint64_t a, uint64_t b,
        uint32_t c, uint32_t x, uint32_t y, uint32_t t, uint32_t r)
{
    if (d->u == d->v) {
        d->v = d->v? d->v<<1 : 16;
        d->seg = (sd_seg_t *) realloc(d->seg, d->v * sizeof(sd_seg_t));
    }
    sd_seg_t seg = {s, k, a, b, c, x, y, t, r};
    d->seg[d->u++] = seg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r13
movl 0x58(%rsp), %esi
movl 0x50(%rsp), %edi
movl 0x48(%rsp), %r8d
movl 0x40(%rsp), %r9d
movl 0x1c(%r13), %eax
cmpl %eax, 0x18(%r13)
jne 0x52c2
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x10, %eax
cmovnel %ecx, %eax
movl %eax, 0x1c(%r13)
movq 0x20(%r13), %rdi
shlq $0x4, %rax
leaq (%rax,%rax,2), %rsi
callq 0x2290
movl 0x40(%rsp), %r9d
movl 0x48(%rsp), %r8d
movl 0x50(%rsp), %edi
movl 0x58(%rsp), %esi
movq %rax, 0x20(%r13)
movq 0x20(%r13), %rax
movl 0x18(%r13), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x18(%r13)
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl %r12d, (%rax,%rcx)
movl %ebp, 0x4(%rax,%rcx)
movq %r15, 0x8(%rax,%rcx)
movq %r14, 0x10(%rax,%rcx)
movl %ebx, 0x18(%rax,%rcx)
movl %r9d, 0x1c(%rax,%rcx)
movl %r8d, 0x20(%rax,%rcx)
movl %edi, 0x24(%rax,%rcx)
movl %esi, 0x28(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: make_asm_dict_from_sdict
asm_dict_t *make_asm_dict_from_sdict(sdict_t *sdict)
{
    uint32_t i;
    asm_dict_t *d;
    d = asm_init(sdict);
    d->index = (uint64_t *) calloc(sdict->n, sizeof(uint64_t));
    uint64_t *a = d->a;
    for (i = 0; i < sdict->n; ++i) {
        asm_put(d, sdict->s[i].name, sdict->s[i].len, 0, 1, i, 0, 0, 0, 0, 0, 0, 0);
        seg_put(d, i, 0, 0, 0, i<<1, 0, sdict->s[i].len, DEFAULT_AGP_SEQ_COMPONENT_TYPE, AGP_OT_PLUS);
        a[i] = (uint64_t) i << 32 | 1;
        d->index[i] = (uint64_t) sdict->s[i].len << 32 | i;
    }
    return d;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x41f4
movq %rax, %r14
movl (%rbx), %edi
movl $0x8, %esi
callq 0x21d0
movq %r14, 0x8(%rsp)
movq %rax, 0x30(%r14)
cmpl $0x0, (%rbx)
je 0x541f
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x10(%rsp)
movl $0x4, %r13d
movl $0x1, %r12d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq 0x8(%rbx), %rax
movq -0x10(%rax,%r13,4), %rsi
movl (%rax,%r13,4), %edx
subq $0x40, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
xorl %eax, %eax
movl %eax, (%rsp)
movq %r14, %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %r15d, %r9d
callq 0x4f24
addq $0x40, %rsp
movq 0x8(%rbx), %rax
movl (%rax,%r13,4), %eax
movl 0x8e67(%rip), %r10d     # 0xe220
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
pushq $0x2b5d0                # imm = 0x2B5D0
pushq %r10
pushq %rax
xorl %eax, %eax
pushq %rax
callq 0x5252
addq $0x20, %rsp
movq 0x10(%rsp), %rax
movq %r12, (%rax,%r15,8)
movq 0x8(%rbx), %rax
movl (%rax,%r13,4), %eax
shlq $0x20, %rax
addq %r15, %rax
movq 0x30(%r14), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
movl (%rbx), %eax
addl $0x2, %ebp
addq $0x6, %r13
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rcx, %r12
cmpq %rax, %r15
jb 0x536b
movq 0x8(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: asm_index
void asm_index(asm_dict_t *d)
{
    int32_t i, s, c;
    uint64_t *a, last;
    sd_seg_t seg;

    s = d->u;
    if (s == 0) return;

    c_pair_t *c_pairs;
    c_pairs = (c_pair_t *) malloc(s * sizeof(c_pair_t));
    for(i = 0; i < s; ++i) {
        seg = d->seg[i];
        c_pairs[i].x = (uint64_t) seg.c >> 1 << 32 | (seg.x + seg.y);
        c_pairs[i].y = (uint64_t) (seg.x + seg.y) << 32 | i;
    }

    radix_sort_pair(c_pairs, c_pairs + s);
    
    if (d->index)
        free(d->index);
    d->index = (uint64_t *) malloc(s * sizeof(uint64_t));
    a = d->a;
    memset(a, 0, sizeof(uint64_t) * d->sdict->n);
    d->index[0] = c_pairs[0].y;
    c = c_pairs[0].x >> 32;
    for (i = 1, last = 0; i < s; ++i) {
        d->index[i] = c_pairs[i].y;
        if (c != c_pairs[i].x >> 32) {
            a[c] = last << 32 | (i - last);
            last = i;
            c = c_pairs[i].x >> 32;
        }
    }
    a[c] = last << 32 | (i - last);

    free(c_pairs);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x18(%rdi), %r12
testq %r12, %r12
je 0x575c
movq %rdi, %r14
movq %r12, %r15
shlq $0x4, %r15
movq %r15, %rdi
callq 0x2250
movq %rax, %rbx
testl %r12d, %r12d
jle 0x56b8
movq 0x20(%r14), %rax
leaq 0x8(%rbx), %rcx
addq $0x20, %rax
xorl %edx, %edx
movl -0x8(%rax), %esi
movl (%rax), %edi
shrl %esi
shlq $0x20, %rsi
addl -0x4(%rax), %edi
orq %rdi, %rsi
movq %rsi, -0x8(%rcx)
shlq $0x20, %rdi
addq %rdx, %rdi
movq %rdi, (%rcx)
incq %rdx
addq $0x10, %rcx
addq $0x30, %rax
cmpq %rdx, %r12
jne 0x5689
addq %rbx, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5629
movq 0x30(%r14), %rdi
testq %rdi, %rdi
je 0x56d4
callq 0x2050
leaq (,%r12,8), %rdi
callq 0x2250
movq %rax, 0x30(%r14)
movq 0x28(%r14), %r15
movq 0x38(%r14), %rax
movl (%rax), %edx
shlq $0x3, %rdx
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
callq 0x2160
movq 0x8(%rbx), %rax
movq 0x30(%r14), %rdx
movq %rax, (%rdx)
movl 0x4(%rbx), %eax
cmpl $0x2, %r12d
jl 0x5766
movq %rbx, %rsi
addq $0x10, %rsi
movl $0x1, %ecx
xorl %r13d, %r13d
movq 0x8(%rsi), %rdi
movq %rdi, (%rdx,%rcx,8)
movslq %eax, %rdi
movl 0x4(%rsi), %r8d
cmpq %rdi, %r8
je 0x574e
movq %rcx, %rax
subq %r13, %rax
shlq $0x20, %r13
orq %rax, %r13
movq %r13, (%r15,%rdi,8)
movl 0x4(%rsi), %eax
movq %rcx, %r13
incq %rcx
addq $0x10, %rsi
cmpq %rcx, %r12
jne 0x5723
jmp 0x576b
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x1, %ecx
subq %r13, %rcx
shlq $0x20, %r13
orq %rcx, %r13
cltq
movq %r13, (%r15,%rax,8)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: add_unplaced_short_seqs
void add_unplaced_short_seqs(asm_dict_t *d, uint32_t min_len)
{
    uint32_t i;
    sdict_t *sdict;
    
    sdict = d->sdict;
    for (i = 0; i < sdict->n; ++i) {
        if (sdict->s[i].len >= min_len)
            continue;
        seg_put(d, d->n, 0, 0, 0, i<<1, 0, sdict->s[i].len, DEFAULT_AGP_SEQ_COMPONENT_TYPE, AGP_OT_PLUS);
        asm_put(d, sdict->s[i].name, sdict->s[i].len, 0, 1, d->u - 1, 0, 0, 0, 0, 0, 0, 0);
    }
    asm_index(d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r15
cmpl $0x0, (%r15)
je 0x6b22
movl $0x8, %r13d
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %esi, 0x4(%rsp)
movq 0x8(%r15), %rax
movl (%rax,%r13,2), %eax
cmpl %esi, %eax
jae 0x6b0b
movl (%rbx), %esi
movl 0x777b(%rip), %r10d     # 0xe220
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r14d, %r9d
pushq $0x2b5d0                # imm = 0x2B5D0
pushq %r10
pushq %rax
xorl %ebp, %ebp
pushq %rbp
callq 0x5252
addq $0x20, %rsp
movq 0x8(%r15), %rax
movq -0x10(%rax,%r13,2), %rsi
movl (%rax,%r13,2), %edx
movl 0x18(%rbx), %r9d
decl %r9d
subq $0x40, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movl %ebp, (%rsp)
movq %rbx, %rdi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x4f24
movl 0x44(%rsp), %esi
addq $0x40, %rsp
incq %r12
movl (%r15), %eax
addl $0x2, %r14d
addq $0xc, %r13
cmpq %rax, %r12
jb 0x6a90
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x564b
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_coordinate_conversion
int sd_coordinate_conversion(asm_dict_t *d, uint32_t id, uint32_t pos, uint32_t *s, uint64_t *p, int count_gap)
{
    *s = UINT32_MAX;
    *p = UINT64_MAX;

    if (id >= d->sdict->n)
        return SEQ_NOT_FOUND;

    uint32_t i, n;
    uint64_t *index = d->index;
    i = (uint32_t) (d->a[id] >> 32);
    n = (uint32_t) (d->a[id]) + i;

    while (i < n && index[i]>>32 <= pos)
        ++i;
    if (i == n)
        return POS_NOT_IN_RANGE;

    sd_seg_t *seg = &d->seg[(uint32_t) index[i]];
    if (pos < seg->x || pos >= seg->x + seg->y)
        return POS_NOT_IN_RANGE;

    uint64_t offset = count_gap? seg->b : seg->a;
    *s = seg->s;
    *p = seg->c & 1? offset + seg->x + seg->y - 1 - pos : offset + pos - seg->x;

    return CC_SUCCESS;
}

// Assembly:
pushq %rbx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
movq $-0x1, (%r8)
movq 0x38(%rdi), %r10
movl $0x1, %eax
cmpl %esi, (%r10)
jbe 0x6bf8
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %r10
movl %esi, %esi
movq (%rax,%rsi,8), %rax
movq %rax, %rsi
shrq $0x20, %rsi
leal (%rsi,%rax), %r11d
cmpl %esi, %r11d
jbe 0x6b89
movl %edx, %ebx
cmpl %ebx, 0x4(%r10,%rsi,8)
ja 0x6b89
incq %rsi
decl %eax
jne 0x6b78
movl %r11d, %esi
movl $0x2, %eax
cmpl %r11d, %esi
je 0x6bf8
movq 0x20(%rdi), %rdi
movl %esi, %esi
movl (%r10,%rsi,8), %esi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movl 0x1c(%rdi,%rsi), %r10d
cmpl %edx, %r10d
ja 0x6bf8
addq %rsi, %rdi
addl 0x20(%rdi), %r10d
cmpl %edx, %r10d
jbe 0x6bf8
xorl %eax, %eax
testl %r9d, %r9d
setne %al
movq 0x8(%rdi,%rax,8), %rax
movl (%rdi), %esi
movl %esi, (%rcx)
testb $0x1, 0x18(%rdi)
jne 0x6bdf
movl %edx, %ecx
addq %rcx, %rax
movl 0x1c(%rdi), %ecx
subq %rcx, %rax
jmp 0x6bf3
movl 0x1c(%rdi), %ecx
movl 0x20(%rdi), %esi
addq %rcx, %rsi
movl %edx, %ecx
notq %rcx
addq %rcx, %rax
addq %rsi, %rax
movq %rax, (%r8)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_coordinate_rev_conversion
int sd_coordinate_rev_conversion(asm_dict_t *d, uint32_t id, uint64_t pos, uint32_t *s, uint32_t *p, int count_gap)
{
    *s = UINT32_MAX;
    *p = UINT32_MAX;

    if (id >= d->n)
        return SEQ_NOT_FOUND;

    sd_seg_t *seg = d->seg + d->s[id].s;
    uint32_t i = 0, n = d->s[id].n;
    uint64_t offset = 0;

    if (count_gap) {
        while (i < n && pos >= seg[i].b)
            ++i;
        seg = &seg[i-1];
        offset = pos - seg->b;
    } else {
        while (i < n && pos >= seg[i].a)
            ++i;
        seg = &seg[i-1];
        offset = pos - seg->a;
    }
    
    // check if in gap or exceeds seq length
    if (offset >= seg->y)
        return POS_NOT_IN_RANGE;

    *s = seg->c >> 1;
    *p = seg->c & 1? seg->y - 1 - offset : seg->x + offset;

    return CC_SUCCESS;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rcx)
movl %eax, (%r8)
movl $0x1, %eax
cmpl %esi, (%rdi)
jbe 0x6cd5
movq 0x8(%rdi), %rax
movq 0x20(%rdi), %rdi
movl %esi, %esi
imulq $0x58, %rsi, %rsi
movl 0x18(%rax,%rsi), %r10d
movl 0x1c(%rax,%rsi), %eax
leaq (%rax,%rax,2), %r11
shlq $0x4, %r11
leaq (%rdi,%r11), %rax
testl %r9d, %r9d
je 0x6c5f
movl $0x10, %esi
testl %r10d, %r10d
je 0x6c8a
leaq (%r11,%rdi), %r9
addq $0x10, %r9
xorl %edi, %edi
cmpq %rdx, (%r9)
ja 0x6c86
incl %edi
addq $0x30, %r9
cmpl %edi, %r10d
jne 0x6c4d
jmp 0x6c83
movl $0x8, %esi
testl %r10d, %r10d
je 0x6c8a
leaq (%r11,%rdi), %r9
addq $0x8, %r9
xorl %edi, %edi
cmpq %rdx, (%r9)
ja 0x6c86
incl %edi
addq $0x30, %r9
cmpl %edi, %r10d
jne 0x6c73
movl %r10d, %edi
decl %edi
jmp 0x6c8f
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %edi, %edi
leaq (%rdi,%rdi,2), %r9
shlq $0x4, %r9
leaq (%rax,%r9), %rdi
subq (%rsi,%rdi), %rdx
movl 0x20(%rax,%r9), %esi
movl $0x2, %eax
cmpq %rsi, %rdx
jae 0x6cd5
movl 0x18(%rdi), %eax
shrl %eax
movl %eax, (%rcx)
testb $0x1, 0x18(%rdi)
jne 0x6cc8
movl 0x1c(%rdi), %eax
addq %rax, %rdx
movq %rdx, %rax
jmp 0x6cd0
movl 0x20(%rdi), %eax
decl %eax
subq %rdx, %rax
movl %eax, (%r8)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: sd_stats
void sd_stats(sdict_t *d, uint64_t *n_stats, uint32_t *l_stats)
{
    // n_stats and l_stats are of at least size 10
    uint32_t i, n;
    uint64_t *s;

    n = d->n;
    s = (uint64_t *) calloc(n, sizeof(uint64_t));
    for (i = 0; i < n; ++i)
        s[i] = d->s[i].len;
    nl_stats(s, n, n_stats, l_stats);
    
    free(s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movl (%rdi), %r15d
movl $0x8, %esi
movq %r15, %rdi
callq 0x21d0
movq %rax, %r12
testq %r15, %r15
je 0x6d2d
movq 0x8(%r13), %rax
addq $0x10, %rax
xorl %ecx, %ecx
movl (%rax), %edx
movq %rdx, (%r12,%rcx,8)
incq %rcx
addq $0x18, %rax
cmpq %rcx, %r15
jne 0x6d1b
movq %r12, %rdi
movl %r15d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6d4f
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: nl_stats
static void nl_stats(uint64_t *s, uint32_t n, uint64_t *n_stats, uint32_t *l_stats)
{
    uint32_t i, j;
    double b, a, bs;
    
    bs = 0;
    for (i = 0; i < n; ++i)
        bs += s[i];

    qsort(s, n, sizeof(uint64_t), cmp_uint64_d);

    b = 0;
    j = 0;
    a = .1 * (++j) * bs;
    for (i = 0; i < n; ++i) {
        b += s[i];
        while (b >= a) {
            l_stats[j - 1] = i + 1;
            n_stats[j - 1] = s[i];
            a = .1 * (++j) * bs;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movl %esi, %r12d
xorpd %xmm4, %xmm4
testl %esi, %esi
je 0x6da8
xorl %eax, %eax
movsd 0x3675(%rip), %xmm0     # 0xa3f0
movapd 0x367d(%rip), %xmm1     # 0xa400
movsd (%r15,%rax,8), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subpd %xmm1, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
addsd %xmm3, %xmm4
incq %rax
cmpq %rax, %r12
jne 0x6d83
movsd %xmm4, 0x8(%rsp)
leaq -0xdf(%rip), %rcx       # 0x6cd6
movl $0x8, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20b0
movsd 0x8(%rsp), %xmm7
testl %ebp, %ebp
je 0x6e5a
movsd 0x3635(%rip), %xmm4     # 0xa410
mulsd %xmm7, %xmm4
movl $0x1, %eax
xorpd %xmm3, %xmm3
xorl %ecx, %ecx
movsd 0x35fe(%rip), %xmm0     # 0xa3f0
movapd 0x3606(%rip), %xmm1     # 0xa400
movsd 0x360e(%rip), %xmm2     # 0xa410
movapd %xmm3, %xmm5
movsd (%r15,%rcx,8), %xmm6
unpcklps %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1]
subpd %xmm1, %xmm6
movapd %xmm6, %xmm3
unpckhpd %xmm6, %xmm3            # xmm3 = xmm3[1],xmm6[1]
addsd %xmm6, %xmm3
addsd %xmm5, %xmm3
ucomisd %xmm4, %xmm3
jb 0x6e52
leal 0x1(%rcx), %edx
leal -0x1(%rax), %esi
movl %edx, (%rbx,%rsi,4)
movq (%r15,%rcx,8), %rdi
movq %rdi, (%r14,%rsi,8)
incl %eax
xorps %xmm4, %xmm4
cvtsi2sd %rax, %xmm4
mulsd %xmm2, %xmm4
mulsd %xmm7, %xmm4
ucomisd %xmm4, %xmm3
jae 0x6e2c
incq %rcx
cmpq %r12, %rcx
jne 0x6e02
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: write_sorted_agp
void write_sorted_agp(asm_dict_t *dict, FILE *fo)
{
    int i, j;
    uint32_t s;
    char s_name[32];
    c_pair_t *c_pairs;

    c_pairs = (c_pair_t *) malloc(dict->n * sizeof(c_pair_t));
    for(i = 0; i < dict->n; ++i) {
        c_pair_t pair = {dict->s[i].len, i};
        c_pairs[i] = pair;
    }
    radix_sort_pair(c_pairs, c_pairs + dict->n);
    s = 0;
    for (i = dict->n - 1; i >= 0; --i) {
        j = c_pairs[i].y;
        sprintf(s_name, "scaffold_%u", ++s);
        write_segs_to_agp(dict->seg + dict->s[j].s, dict->s[j].n, &dict->s[j], dict->sdict, s_name, fo);
    }
    free(c_pairs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %r15d
movq %r15, %r12
shlq $0x4, %r12
movq %r12, %rdi
callq 0x2250
testq %r15, %r15
je 0x7dcf
movq 0x8(%r14), %rdi
leaq 0x8(%rax), %rcx
addq $0x8, %rdi
xorl %edx, %edx
movq (%rdi), %rsi
movq %rsi, -0x8(%rcx)
movq %rdx, (%rcx)
incq %rdx
addq $0x10, %rcx
addq $0x58, %rdi
cmpq %rdx, %r15
jne 0x7db5
addq %rax, %r12
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r12, %rsi
callq 0x5629
movl (%r14), %eax
movq %rax, (%rsp)
decl %eax
js 0x7e80
movl %eax, %eax
shlq $0x4, %rax
movq 0x8(%rsp), %rcx
leaq (%rax,%rcx), %r12
addq $0x8, %r12
movq (%rsp), %rax
negl %eax
movq %rax, (%rsp)
movl $0x1, %r13d
leaq 0x10(%rsp), %rbp
movq %rbx, %r15
movslq (%r12), %rbx
movq %rbp, %rdi
leaq 0x2a89(%rip), %rsi      # 0xa8b3
movl %r13d, %edx
xorl %eax, %eax
callq 0x2350
imulq $0x58, %rbx, %rax
movq %r15, %rbx
movq 0x8(%r14), %rdi
movq 0x38(%r14), %rcx
leaq (%rdi,%rax), %rdx
movl 0x18(%rdi,%rax), %esi
movl 0x1c(%rdi,%rax), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq 0x20(%r14), %rdi
movq %rbp, %r8
movq %r15, %r9
callq 0x73f7
addq $-0x10, %r12
movq (%rsp), %rax
addl %r13d, %eax
incl %eax
movl %r13d, %ecx
incl %ecx
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x7e19
movq 0x8(%rsp), %rdi
callq 0x2050
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: write_sdict_to_agp
void write_sdict_to_agp(sdict_t *sdict, FILE *fo)
{
    int i;
    for (i = 0; i < sdict->n; ++i)
        fprintf(fo, "scaffold_%u\t1\t%u\t1\t%s\t%s\t1\t%u\t+\n", i + 1, sdict->s[i].len, 
                agp_component_type_val(DEFAULT_AGP_SEQ_COMPONENT_TYPE), sdict->s[i].name, sdict->s[i].len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x7f74
movq %rsi, %rbx
movq %rdi, %r14
movl $0x10, %r12d
leaq 0x29ff(%rip), %r15      # 0xa8bf
leaq 0x24d5(%rip), %rbp      # 0xa39c
xorl %edx, %edx
movq 0x8(%r14), %rsi
movl (%rsi,%r12), %ecx
movl 0x6349(%rip), %eax      # 0xe220
leal -0x2b609(%rax), %edi
cmpl $0x13, %edi
ja 0x7ef5
movslq (%rbp,%rdi,4), %rdi
addq %rbp, %rdi
jmpq *%rdi
leaq 0x2a78(%rip), %r8       # 0xa96b
jmp 0x7f42
leaq 0x2a6d(%rip), %r8       # 0xa969
cmpl $0x2b606, %eax          # imm = 0x2B606
je 0x7f42
jmp 0x7f83
leaq 0x2a69(%rip), %r8       # 0xa975
jmp 0x7f42
leaq 0x2808(%rip), %r8       # 0xa71d
jmp 0x7f42
leaq 0x2a4f(%rip), %r8       # 0xa96d
jmp 0x7f42
leaq 0x27f4(%rip), %r8       # 0xa71b
jmp 0x7f42
leaq 0x2a43(%rip), %r8       # 0xa973
jmp 0x7f42
leaq 0x2a38(%rip), %r8       # 0xa971
jmp 0x7f42
leaq 0x2a2d(%rip), %r8       # 0xa96f
leaq 0x1(%rdx), %r13
movq -0x10(%rsi,%r12), %r9
movl (%rsi,%r12), %eax
incl %edx
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2200
movl (%r14), %eax
addq $0x18, %r12
movq %r13, %rdx
cmpq %rax, %r13
jb 0x7ec9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e26(%rip), %rdi      # 0xadb0
leaq 0x2e49(%rip), %rsi      # 0xadda
movl %eax, %edx
xorl %eax, %eax
callq 0x8da6
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: write_asm_dict_to_fasta
uint64_t write_asm_dict_to_fasta(asm_dict_t *dict, int line_wd, FILE *fo)
{
    uint32_t i;
    uint64_t len = 0;
    for (i = 0; i < dict->n; ++i)
        len += write_segs_to_fasta(dict->seg + dict->s[i].s, dict->s[i].n, 
                &dict->s[i], dict->sdict, 0, line_wd, fo);
    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, (%rdi)
je 0x84cd
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq 0x38(%r14), %rcx
leaq (%rax,%r12), %rdx
movl 0x18(%rax,%r12), %esi
movl 0x1c(%rax,%r12), %eax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq 0x20(%r14), %rdi
movq %rbx, (%rsp)
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x7f9a
addq %rax, %r15
incq %r13
movl (%r14), %eax
addq $0x58, %r12
cmpq %rax, %r13
jb 0x8488
jmp 0x84d0
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: write_sequence_dictionary
uint64_t write_sequence_dictionary(FILE *fo, sdict_t *dict)
{
    uint32_t i;
    uint64_t l;
    // write number of sequences
    fwrite(&dict->n, sizeof(uint32_t), 1, fo);
    // write sequence lengths
    for (i = 0; i < dict->n; ++i)
        fwrite(&dict->s[i].len, sizeof(uint32_t), 1, fo);
    l = dict->n;
    for (i = 0; i < dict->n; ++i)
        l += strlen(dict->s[i].name);
    // write total length of sequence names
    fwrite(&l, sizeof(uint64_t), 1, fo);
    // write sequence name with a appending white space
    const unsigned char space = ' ';
    for (i = 0; i < dict->n; ++i) {
        fwrite(dict->s[i].name, 1, strlen(dict->s[i].name), fo);
        fwrite(&space, 1, 1, fo);
    }

    return sizeof(uint32_t) * (dict->n + 3) + l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2380
movl (%rbx), %eax
testl %eax, %eax
je 0x853e
movl $0x10, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rdi
addq %r15, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2380
incq %r12
movl (%rbx), %eax
addq $0x18, %r15
cmpq %rax, %r12
jb 0x8517
movl %eax, %r15d
movq %r15, (%rsp)
testl %eax, %eax
je 0x8570
movq 0x8(%rbx), %r12
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %r13
xorl %ebp, %ebp
movq (%r12,%rbp), %rdi
callq 0x2110
addq %rax, %r15
addq $0x18, %rbp
cmpq %rbp, %r13
jne 0x855b
movq %rsp, %rdi
movq %r15, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x2380
movl (%rbx), %eax
testl %eax, %eax
je 0x85d2
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq (%rax,%r12), %r15
movq %r15, %rdi
callq 0x2110
movl $0x1, %esi
movq %r15, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x2380
movl $0x20, %edi
movq %r14, %rsi
callq 0x21a0
incq %r13
movl (%rbx), %eax
addq $0x18, %r12
cmpq %rax, %r13
jb 0x8594
addl $0x3, %eax
shlq $0x2, %rax
addq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/sdict.c
// Function: file_seek_skip_sdict
void file_seek_skip_sdict(FILE *fp)
{
    uint32_t n;
    uint64_t l, m;
    m = fread(&n, sizeof(uint32_t), 1, fp);
    if (m != 1) bin_fread_error();
    fseek(fp, sizeof(uint32_t) * n, SEEK_CUR);
    m = fread(&l, sizeof(uint64_t), 1, fp);
    if (m != 1) bin_fread_error();
    fseek(fp, l, SEEK_CUR);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x20c0
cmpq $0x1, %rax
je 0x8618
xorl %eax, %eax
callq 0x2c81
movl 0x4(%rsp), %esi
shlq $0x2, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x2270
leaq 0x8(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x20c0
cmpq $0x1, %rax
je 0x8651
xorl %eax, %eax
callq 0x2c81
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
addq $0x10, %rsp
popq %rbx
jmp 0x2270
// File: /workspace/github_c_makefile_star2_O1/c-zhou[P]yahs/agp_to_fasta.c
// Function: print_help
static void print_help(FILE *fp_help)
{
    fprintf(fp_help, "Usage: agp_to_fasta [options] <scaffolds.agp> <contigs.fa>\n");
    fprintf(fp_help, "Options:\n");
    fprintf(fp_help, "    -l INT            line width [60]\n");
    fprintf(fp_help, "    -u                allow sequence components with unknown orientations\n");
    fprintf(fp_help, "    -o STR            output to file [stdout]\n");
    fprintf(fp_help, "    --version         show version number\n");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x19da(%rip), %rdi      # 0xaf12
movl $0x3b, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2380
leaq 0x19fd(%rip), %rdi      # 0xaf4e
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2380
leaq 0x19ee(%rip), %rdi      # 0xaf58
movl $0x26, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2380
leaq 0x19fc(%rip), %rdi      # 0xaf7f
movl $0x4a, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2380
leaq 0x1a2e(%rip), %rdi      # 0xafca
movl $0x2e, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2380
leaq 0x1a44(%rip), %rdi      # 0xaff9
movl $0x2a, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
jmp 0x2380
// File: /workspace/github_c_makefile_star2_O1/dropletzhu[P]msuite/mlistener6.c
// Function: usage
void usage()
{
	printf("Usage: ./mlistener -s source -i interface -g group -p port -l length \n");
	printf(" -s souurce	use the source to select bind device\n");
	printf(" -i ifname	interface name\n");
	printf(" -g group	the group to listen\n");
	printf(" -p port	the port to listen\n");
	printf(" -l length	the packet length, default length is 256 bytes\n");
	printf(" Version 	%s\n", version);
}

// Assembly:
pushq %rax
leaq 0xe8e(%rip), %rdi       # 0x20d2
callq 0x1040
leaq 0xec8(%rip), %rdi       # 0x2118
callq 0x1040
leaq 0xeed(%rip), %rdi       # 0x2149
callq 0x1040
leaq 0xefb(%rip), %rdi       # 0x2163
callq 0x1040
leaq 0xf0d(%rip), %rdi       # 0x2181
callq 0x1040
leaq 0xf1d(%rip), %rdi       # 0x219d
callq 0x1040
leaq 0xda0(%rip), %rdi       # 0x202c
leaq 0xda7(%rip), %rsi       # 0x203a
xorl %eax, %eax
popq %rcx
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_09/scdu_modlut.c
// Function: mod_crypt
void mod_crypt(char *text, size_t n)
{
        int i;

	for (i = 0; i < n; i++) {
                if ((text[i] >= 'a') && (text[i] <= 'z'))
                        text[i] = lut[text[i] - 'a' + 26];
                else if ((text[i] >= 'A') && (text[i] <= 'Z'))
                        text[i] = lut[text[i] - 'A'];
                else
                        continue;
        }
}

// Assembly:
testq %rsi, %rsi
je 0x1066
xorl %eax, %eax
movq 0x2fca(%rip), %rcx      # 0x3ff8
movzbl (%rdi,%rax), %edx
leal -0x61(%rdx), %r8d
cmpb $0x19, %r8b
ja 0x1044
addl $0x39, %edx
andl $0x3f, %edx
jmp 0x1058
movl %edx, %r8d
addb $-0x41, %r8b
cmpb $0x19, %r8b
ja 0x105e
movsbq %dl, %rdx
addl $-0x41, %edx
movb (%rcx,%rdx), %dl
movb %dl, (%rdi,%rax)
incq %rax
cmpq %rax, %rsi
jne 0x102e
retq
// File: /workspace/github_c_makefile_star2_O1/giometti[P]mastering_UNIX_programming/chapter_09/scdu_modlut.c
// Function: mod_decrypt
void mod_decrypt(char *text, size_t n)
{
        int i;
	char *ptr;
	int base;

        for (i = 0; i < n; i++) {
		ptr = strchr(lut, text[i]);
		if (!ptr)
			continue;

        	base = ptr - lut;
		if (base < 26)
			text[i] = base + 'A';
		else if (base >= 26)
			text[i] = base - 26 + 'a';
        }
}

// Assembly:
testq %rsi, %rsi
je 0x10cf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movq 0x2f71(%rip), %r15      # 0x3ff8
movl 0x2f6b(%rip), %ebp      # 0x3ff8
movl $0x41, %r13d
movsbl (%r14,%r12), %esi
movq %r15, %rdi
callq 0x1010
testq %rax, %rax
je 0x10b9
subl %ebp, %eax
cmpl $0x1a, %eax
movl $0x47, %ecx
cmovll %r13d, %ecx
addb %al, %cl
movb %cl, (%r14,%r12)
incq %r12
cmpq %r12, %rbx
jne 0x1093
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-zoe/kojimasound/kojimasound.c
// Function: vagPrepareHeader
void vagPrepareHeader( vagHeader *header, uint32_t size, uint32_t samplerate ) {
	header->version[3] = 0x20;
	memset( header->name, 0, 0x10 );
	header->size[0] = (size >> 24) & 0xFF; header->size[1] = (size >> 16) & 0xFF; header->size[2] = (size >> 8) & 0xFF; header->size[3] = size & 0xFF;
	header->samplerate[0] = 0; header->samplerate[1] = 0; header->samplerate[2] = (samplerate >> 8) & 0xFF; header->samplerate[3] = samplerate & 0xFF;
	memset( header->reserved1, 0, 4 );
	memset( header->reserved2, 0, 12 );
	strncpy( header->magic, "VAGp", 4 );
	return;
}

// Assembly:
movl %esi, %eax
movb $0x20, 0x7(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movl %esi, %ecx
shrl $0x18, %ecx
movb %cl, 0xc(%rdi)
movl %esi, %ecx
shrl $0x10, %ecx
movb %cl, 0xd(%rdi)
movb %ah, 0xe(%rdi)
movb %al, 0xf(%rdi)
movw $0x0, 0x10(%rdi)
movb %dh, 0x12(%rdi)
movb %dl, 0x13(%rdi)
xorl %eax, %eax
movl %eax, 0x8(%rdi)
movl %eax, 0x1c(%rdi)
movq $0x0, 0x14(%rdi)
movl $0x70474156, (%rdi)     # imm = 0x70474156
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-zoe/wvx-extract.c
// Function: main
int main( int argc, char **argv ) {
	
	char dirname[512] = {0};
	unsigned char temp[4];
	unsigned int numSamples, tableSize, game;
	FILE *f;
	
	if( argc < 3 ) {
		printf("Not enough args!\nUse: %s WVX-file game\n", argv[0]);
		printf("supported games are:\n%d (MGS1)\n%d (ZoE1 and MGS2HD)\n", mgs1, zoe1);
		return 1;
	}
	
	game = strtoul(argv[2], NULL, 10);
	if(!(game<NUMWVXGAMES)) {
		printf("Unsupported game %d!\nRun without args to see supported types.\n", game);
		return 1;
	}
	
	if( !(f = fopen( argv[1], "rb" ))) {
		printf("Couldnt open file %s\n", argv[1]);
		return 1;
	}
	
	sprintf( dirname, "%s-Samples", argv[1] );
	createDirectory(dirname);
	fseek( f, 4, SEEK_SET );
	fread( temp, 4, 1, f );
	tableSize = temp[0] << 24 | temp[1] << 16 | temp[2] << 8 | temp[3];
	numSamples = tableSize/0x10;
	printf( "%d samples in sample table\n", numSamples );
	
	
	processWvx(f, 0, dirname, numSamples, game);
	
	printf("Done.\n");
	fclose(f);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x10(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1080
cmpl $0x2, %ebp
jg 0x1518
movq (%rbx), %rsi
leaq 0xb8a(%rip), %rdi       # 0x207c
xorl %eax, %eax
callq 0x1070
leaq 0xba4(%rip), %rdi       # 0x20a4
movl $0x1, %ebx
xorl %esi, %esi
movl $0x1, %edx
xorl %eax, %eax
callq 0x1070
jmp 0x160d
movq 0x10(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10b0
movq %rax, %r14
cmpl $0x2, %r14d
jae 0x15e4
movq 0x8(%rbx), %rdi
leaq 0xbd8(%rip), %rsi       # 0x2118
callq 0x10a0
movq 0x8(%rbx), %rdx
testq %rax, %rax
je 0x15f7
movq %rax, %r15
leaq 0xbbf(%rip), %rsi       # 0x211b
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
xorl %eax, %eax
callq 0x10c0
movq %r12, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x1030
movl $0x4, %esi
movq %r15, %rdi
xorl %edx, %edx
callq 0x1090
leaq 0xc(%rsp), %r13
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r15, %rcx
callq 0x1050
movl (%r13), %ebp
bswapl %ebp
shrl $0x4, %ebp
leaq 0xb73(%rip), %rdi       # 0x2126
movl %ebp, %esi
xorl %eax, %eax
callq 0x1070
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movl %ebp, %ecx
movl %r14d, %r8d
callq 0x1222
leaq 0xb6d(%rip), %rdi       # 0x2142
callq 0x1040
movq %r15, %rdi
callq 0x1060
jmp 0x160d
leaq 0xaee(%rip), %rdi       # 0x20d9
movl %r14d, %esi
xorl %eax, %eax
callq 0x1070
jmp 0x1608
leaq 0xa46(%rip), %rdi       # 0x2044
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1070
movl $0x1, %ebx
movl %ebx, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/zpole[P]IICV/src/aib.c
// Function: main
int main()
{
    vl_uint32 nrows = 10;
    vl_uint32 ncols = 3;
    double Pic[3*10] = {
    0.6813,    0.3028,    0.8216,
    0.3795,    0.5417,    0.6449,
    0.8318,    0.1509,    0.8180,
    0.5028,    0.6979,    0.6602,
    0.7095,    0.3784,    0.3420,
    0.4289,    0.8600,    0.2897,
    0.3046,    0.8537,    0.3412,
    0.1897,    0.5936,    0.5341,
    0.1934,    0.4966,    0.7271,
    0.6822,    0.8998,    0.3093,
    };

    vl_uint32 r,c;
    VlAIB * aib;
    vl_uint * parents;

    printf("Pic = [");
    for(r=0; r<nrows; r++)
    {
        for(c=0; c<ncols; c++)
            printf("%f ", Pic[r*ncols+c]);
        printf("; ...\n");
    }
    printf("];\n");

    printf("AIB starting\n");
    {
      aib = vl_aib_new(Pic, nrows, ncols);
      vl_aib_process(aib);

      /*  parents always has size 2*nrows-1 */
      parents = vl_aib_get_parents(aib);
      for(r=0; r<2*nrows-1; r++)
        printf("%d => %d\n", r, parents[r]);

      vl_aib_delete(aib);
    }
    /* free(Pic); */

    printf("IB done\n");
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf0, %rsp
leaq 0xe6d(%rip), %rsi       # 0x2010
movq %rsp, %rbx
movl $0xf0, %edx
movq %rbx, %rdi
callq 0x1080
leaq 0xf46(%rip), %rdi       # 0x2100
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1050
leaq 0xf3d(%rip), %r14       # 0x2108
leaq 0xf5c(%rip), %r15       # 0x212e
xorl %r13d, %r13d
movsd (%rbx,%r13,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x1050
incq %r13
cmpq $0x3, %r13
jne 0x11d5
movq %r15, %rdi
callq 0x1040
incq %r12
addq $0x18, %rbx
cmpq $0xa, %r12
jne 0x11d2
leaq 0xf0c(%rip), %rdi       # 0x2116
callq 0x1040
leaq 0xf03(%rip), %rdi       # 0x2119
callq 0x1040
movq %rsp, %rdi
movl $0xa, %esi
movl $0x3, %edx
callq 0x1060
movq %rax, %rbx
movq %rax, %rdi
callq 0x1030
movq 0x50(%rbx), %r12
leaq 0xec9(%rip), %r14       # 0x210c
xorl %r15d, %r15d
movl (%r12,%r15,4), %edx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1050
incq %r15
cmpq $0x13, %r15
jne 0x1246
movq %rbx, %rdi
callq 0x1070
leaq 0xeb7(%rip), %rdi       # 0x2126
callq 0x1040
xorl %eax, %eax
addq $0xf0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/preprocessor.c
// Function: SkipDelimiterTokensInLogicalLine
static struct Node *SkipDelimiterTokensInLogicalLine(struct Node *t) {
  while (t && t->token_type == kTokenDelimiter &&
         !IsEqualTokenWithCStr(t, "\n"))
    t = t->next_token;
  return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x89cf
leaq 0x2908(%rip), %r14      # 0xb2b3
cmpl $0x1, 0x108(%rbx)
jne 0x89cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9278
testl %eax, %eax
jne 0x89cf
movq 0x110(%rbx), %rbx
testq %rbx, %rbx
jne 0x89ab
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/struct.c
// Function: ResolveTypesOfMembersOfStruct.cold.1
static int CalcStructSizeFromDict(struct Node *dict) {
  if (!GetSizeOfList(dict)) return 0;
  struct Node *last_kv = GetNodeAt(dict, GetSizeOfList(dict) - 1);
  struct Node *last_member = last_kv->value;
  return last_member->struct_member_ent_ofs +
         GetSizeOfType(last_member->struct_member_ent_type);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq 0x68(%rdi), %r15
movq 0xe450(%rip), %rax      # 0x10ff8
movq (%rax), %rcx
leaq 0x9a2c(%rip), %rdi      # 0xc5de
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x21b0
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x4806
movq %rax, %r12
movq %r15, %rdi
callq 0x4922
testl %eax, %eax
jle 0x2c85
movq %r15, %rdi
movl %ebp, %esi
callq 0x494c
movq %rax, %r13
movq 0xa0(%rax), %rbx
movq 0x78(%rbx), %rsi
movq 0x10(%rsp), %rdi
callq 0xa924
testq %rax, %rax
je 0x2c9d
movq %rax, %r14
cmpq $0x0, 0x18(%rax)
je 0x2c9d
movq %r14, %rdi
callq 0xa104
movq %rax, 0x70(%rbx)
movq %r12, %rdi
callq 0x4922
testl %eax, %eax
je 0x2c4d
movq %r14, %rdi
callq 0xa359
movl %eax, %r14d
movq %r12, %rdi
callq 0x8b71
leal (%rax,%r14), %ecx
decl %ecx
movl %ecx, %eax
cltd
idivl %r14d
subl %edx, %ecx
jmp 0x2c4f
xorl %ecx, %ecx
movl %ecx, 0x80(%rbx)
movq %rbx, %rdi
callq 0x440e
movq 0x98(%r13), %rsi
movq 0xa0(%r13), %rdx
movq %r12, %rdi
callq 0x48c1
incl %ebp
movq %r15, %rdi
callq 0x4922
cmpl %eax, %ebp
jl 0x2bd9
movq 0x8(%rsp), %rax
movq %r12, 0x68(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9845(%rip), %rdi      # 0xc4e9
leaq 0x9835(%rip), %rsi      # 0xc4e0
pushq $0x4b
popq %rdx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/symbol.c
// Function: AddGlobalVar
void AddGlobalVar(struct SymbolEntry **ctx, const char *key,
                  struct Node *var_type) {
  fprintf(stderr, "Gvar: %s: ", key);
  PrintASTNode(var_type);
  fprintf(stderr, "\n");
  assert(ctx);
  struct SymbolEntry *e = AllocSymbolEntry(kSymbolGlobalVar, key, var_type);
  PushSymbol(ctx, e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0xe32d(%rip), %r12      # 0x10ff8
movq (%r12), %rdi
leaq 0x99a1(%rip), %rsi      # 0xc677
movq %r15, %rdx
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x440e
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x20d0
testq %rbx, %rbx
je 0x2d28
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x20f0
movl $0x1, (%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x9944(%rip), %rdi      # 0xc673
leaq 0x9934(%rip), %rsi      # 0xc66a
pushq $0x2d
popq %rdx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/symbol.c
// Function: AddExternVar
void AddExternVar(struct SymbolEntry **ctx, const char *key,
                  struct Node *var_type) {
  fprintf(stderr, "Evar: %s: ", key);
  PrintASTNode(var_type);
  fprintf(stderr, "\n");
  assert(ctx);
  struct SymbolEntry *e = AllocSymbolEntry(kSymbolExternVar, key, var_type);
  PushSymbol(ctx, e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0xe2a2(%rip), %r12      # 0x10ff8
movq (%r12), %rdi
leaq 0x9921(%rip), %rsi      # 0xc682
movq %r15, %rdx
xorl %eax, %eax
callq 0x2110
movq %r14, %rdi
callq 0x440e
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x20d0
testq %rbx, %rbx
je 0x2db3
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0x20f0
movl $0x2, (%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x98b9(%rip), %rdi      # 0xc673
leaq 0x98a9(%rip), %rsi      # 0xc66a
pushq $0x36
popq %rdx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/type.c
// Function: CreateTypeFromInput
static struct Node *CreateTypeFromInput(const char *s) {
  fprintf(stderr, "CreateTypeFromInput: %s\n", s);
  struct Node *tokens = Tokenize(s);
  InitParser(&tokens);
  return CreateTypeFromDecl(ParseDecl());
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xe18a(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x9ff5(%rip), %rsi      # 0xce6d
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2110
movq %rbx, %rdi
callq 0x9f1c
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x7fc7
callq 0x7f06
movq %rax, %rdi
callq 0xa67c
addq $0x10, %rsp
popq %rbx
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/analyzer.c
// Function: Analyze
struct SymbolEntry *Analyze(struct Node *ast) {
  // Returns root context of symbols (including global vars)
  struct SymbolEntry *root_ctx = NULL;
  in_function = NULL;
  AnalyzeNode(ast, &root_ctx);
  return root_ctx;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rax, 0xe30e(%rip)      # 0x112c0
movq %rbx, %rsi
callq 0x2fc3
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/analyzer.c
// Function: AllocReg
static void AllocReg(struct Node *n) {
  assert(n);
  for (int i = 1; i <= NUM_OF_SCRATCH_REGS; i++) {
    if (!reg_used_table[i]) {
      reg_used_table[i] = 1;
      reg_node_table[i] = n;
      n->reg = i;
      return;
    }
  }
  fprintf(stderr, "\n**** Allocated regs ****\n");
  for (int i = 1; i <= NUM_OF_SCRATCH_REGS; i++) {
    fprintf(stderr, "reg[%d]:\n", i);
    if (reg_node_table[i]->op) {
      PrintTokenLine(reg_node_table[i]->op);
    } else {
      fprintf(stderr, "Op info not found\n");
    }
  }
  fprintf(stderr, "\n**** Tried to allocate reg for ****\n");
  PrintASTNode(n);
  ErrorWithToken(n->op, "No free registers found");
}

// Assembly:
cmpl $0x0, 0xd4c9(%rip)      # 0x112d4
je 0x3e4b
xorl %ecx, %ecx
leaq 0xd4ba(%rip), %rax      # 0x112d0
cmpq $0x9, %rcx
je 0x3e61
leaq 0x1(%rcx), %rdx
cmpl $0x0, 0x8(%rax,%rcx,4)
movq %rdx, %rcx
jne 0x3e16
leal 0x1(%rdx), %ecx
movl $0x1, 0x4(%rax,%rdx,4)
leaq 0xd4c4(%rip), %rax      # 0x11300
movq %rdi, 0x8(%rax,%rdx,8)
movl %ecx, 0x4(%rdi)
cmpq $0x9, %rdx
ja 0x3e61
retq
movl $0x1, %eax
movl %eax, 0xd47e(%rip)      # 0x112d4
movq %rdi, 0xd4ab(%rip)      # 0x11308
movl %eax, 0x4(%rdi)
retq
pushq %rax
callq 0x21e0
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTBinOp
struct Node *CreateASTBinOp(struct Node *t, struct Node *left,
                            struct Node *right) {
  if (!right) ErrorWithToken(t, "Expected expression after binary operator");
  struct Node *op = AllocNode(kASTExpr);
  op->op = t;
  op->left = left;
  op->right = right;
  return op;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdx, %rdx
je 0x3f55
movq %rdx, %r14
movq %rsi, %r15
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x4, (%rax)
movq %rbx, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x73fc(%rip), %rsi      # 0xb358
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4740
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTUnaryPrefixOp
struct Node *CreateASTUnaryPrefixOp(struct Node *t, struct Node *right) {
  if (!right) ErrorWithToken(t, "Expected expression after prefix operator");
  struct Node *op = AllocNode(kASTExpr);
  op->op = t;
  op->right = right;
  return op;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3f9a
movq %rsi, %r14
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x4, (%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x73e1(%rip), %rsi      # 0xb382
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4740
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTUnaryPostfixOp
struct Node *CreateASTUnaryPostfixOp(struct Node *left, struct Node *t) {
  assert(IsToken(t));
  if (!left) ErrorWithToken(t, "Expected expression before prefix operator");
  struct Node *op = AllocNode(kASTExpr);
  op->op = t;
  op->left = left;
  return op;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x9130
testb %al, %al
je 0x3feb
testq %r14, %r14
je 0x4003
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x4, (%rax)
movq %rbx, 0x10(%rax)
movq %r14, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x73ba(%rip), %rdi      # 0xb3ac
leaq 0x73be(%rip), %rsi      # 0xb3b7
movl $0x27, %edx
callq 0x4704
leaq 0x73b3(%rip), %rsi      # 0xb3bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4740
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTExprStmt
struct Node *CreateASTExprStmt(struct Node *t, struct Node *left) {
  struct Node *op = AllocNode(kASTExprStmt);
  op->op = t;
  op->left = left;
  return op;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x7, (%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTFuncDef
struct Node *CreateASTFuncDef(struct Node *func_decl, struct Node *func_body) {
  assert(func_decl && func_decl->type == kASTDecl);
  assert(IsASTList(func_body));
  struct Node *n = AllocNode(kASTFuncDef);
  n->func_body = func_body;
  struct Node *type = CreateTypeFromDecl(func_decl);
  assert(type);
  n->func_name_token = type->left;
  assert(IsToken(n->func_name_token));
  n->func_type = GetTypeWithoutAttr(type);
  assert(n->func_type && n->func_type->type == kTypeFunction);
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x40e0
movq %rdi, %r14
cmpl $0xd, (%rdi)
jne 0x40e0
movq %rsi, %r15
testq %rsi, %rsi
je 0x40f8
cmpl $0x6, (%r15)
jne 0x40f8
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movq %rax, %rbx
movl $0x10, (%rax)
movq %r15, 0xd0(%rax)
movq %r14, %rdi
callq 0xa67c
testq %rax, %rax
je 0x4128
movq %rax, %r14
movq 0x18(%rax), %rdi
movq %rdi, 0xe0(%rbx)
callq 0x9130
testb %al, %al
je 0x4140
movq %r14, %rdi
callq 0xa104
movq %rax, 0xd8(%rbx)
testq %rax, %rax
je 0x4110
cmpl $0x17, (%rax)
jne 0x4110
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7301(%rip), %rdi      # 0xb3e8
leaq 0x72c9(%rip), %rsi      # 0xb3b7
movl $0x37, %edx
callq 0x4704
leaq 0x7312(%rip), %rdi      # 0xb411
leaq 0x72b1(%rip), %rsi      # 0xb3b7
movl $0x38, %edx
callq 0x4704
leaq 0x732b(%rip), %rdi      # 0xb442
leaq 0x7299(%rip), %rsi      # 0xb3b7
movl $0x40, %edx
callq 0x4704
leaq 0x6f27(%rip), %rdi      # 0xb056
leaq 0x7281(%rip), %rsi      # 0xb3b7
movl $0x3c, %edx
callq 0x4704
leaq 0x72df(%rip), %rdi      # 0xb426
leaq 0x7269(%rip), %rsi      # 0xb3b7
movl $0x3e, %edx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTKeyValue
struct Node *CreateASTKeyValue(const char *key, struct Node *value) {
  struct Node *n = AllocNode(kASTKeyValue);
  n->key = key;
  n->value = value;
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x11, (%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateASTLocalVar
struct Node *CreateASTLocalVar(int byte_offset, struct Node *var_type) {
  struct Node *n = AllocNode(kASTLocalVar);
  n->byte_offset = byte_offset;
  n->expr_type = var_type;
  return n;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x12, (%rax)
movl %ebp, 0xa8(%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateTypeFunction
struct Node *CreateTypeFunction(struct Node *return_type,
                                struct Node *arg_type_list) {
  assert(IsASTList(arg_type_list));
  struct Node *n = AllocNode(kTypeFunction);
  n->left = return_type;
  n->right = arg_type_list;
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4251
movq %rsi, %rbx
cmpl $0x6, (%rsi)
jne 0x4251
movq %rdi, %r14
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x17, (%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x721e(%rip), %rdi      # 0xb476
leaq 0x7158(%rip), %rsi      # 0xb3b7
movl $0x66, %edx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateTypeStruct
struct Node *CreateTypeStruct(struct Node *tag_token,
                              struct Node *struct_spec) {
  assert(IsToken(tag_token));
  struct Node *n = AllocNode(kTypeStruct);
  n->tag = tag_token;
  n->type_struct_spec = struct_spec;
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9130
testb %al, %al
je 0x42f7
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x19, (%rax)
movq %r14, 0xe8(%rax)
movq %rbx, 0xf0(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x71bf(%rip), %rdi      # 0xb4bd
leaq 0x70b2(%rip), %rsi      # 0xb3b7
movl $0x79, %edx
callq 0x4704
// File: /workspace/github_c_makefile_star2_O1/hikalium[P]compilium/ast.c
// Function: CreateTypeAttrIdent
struct Node *CreateTypeAttrIdent(struct Node *ident_token, struct Node *type) {
  assert(ident_token && IsToken(ident_token));
  struct Node *n = AllocNode(kTypeAttrIdent);
  n->left = ident_token;
  n->right = type;
  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x434c
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9130
testb %al, %al
je 0x434c
movl $0x1, %edi
movl $0x138, %esi            # imm = 0x138
callq 0x20f0
movl $0x18, (%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x717d(%rip), %rdi      # 0xb4d0
leaq 0x705d(%rip), %rsi      # 0xb3b7
movl $0x81, %edx
callq 0x4704