LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_slice_header_init(x264_slice_header_t*, x264_param_t*, x264_sps_t*, x264_pps_t*, int, int, int)
static void x264_slice_header_init(x264_slice_header_t *sh, x264_param_t *param,
        x264_sps_t *sps, x264_pps_t *pps,
        int i_type, int i_idr_pic_id, int i_frame) {LOG_CALL;
    /* First we fill all field */
    sh->sps = sps;
    sh->pps = pps;

    sh->i_type = i_type;
    sh->i_first_mb = 0;
    sh->i_pps_id = pps->i_id;

    sh->i_frame_num = i_frame;

    sh->b_field_pic = 0; /* Not field support for now */
    sh->b_bottom_field = 1; /* not yet used */

    sh->i_idr_pic_id = i_idr_pic_id;

    /* poc stuff, fixed later */
    sh->i_poc_lsb = 0;
    sh->i_delta_poc_bottom = 0;
    sh->i_delta_poc[0] = 0;
    sh->i_delta_poc[1] = 0;

    sh->i_redundant_pic_cnt = 0;

    sh->b_direct_spatial_mv_pred = 0;

    sh->b_num_ref_idx_override = 0;
    sh->i_num_ref_idx_l0_active = 1;
    sh->i_num_ref_idx_l1_active = 1;

    sh->i_cabac_init_idc = param->i_cabac_init_idc;

    sh->i_qp_delta = 0;
    sh->b_sp_for_swidth = 0;
    sh->i_qs_delta = 0;

    if (param->b_deblocking_filter)
    {
        sh->i_disable_deblocking_filter_idc = 0;
    } else
    {
        sh->i_disable_deblocking_filter_idc = 1;
    }
    sh->i_alpha_c0_offset = 0;
    sh->i_beta_offset = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x30(%rbp)
movl %r8d, -0x2c(%rbp)
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xeebe(%rip), %rdi      # 0x251b4
leaq 0x12e2b(%rip), %rsi     # 0x29128
leaq 0x13071(%rip), %rdx     # 0x29375
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x4c22
movq %r15, (%rbx)
movq %r13, 0x8(%rbx)
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%rbx)
movl %r12d, 0x14(%rbx)
movl (%r13), %eax
movl %eax, 0x18(%rbx)
movl 0x10(%rbp), %eax
movl %eax, 0x1c(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x20(%rbx)
movl -0x30(%rbp), %eax
movl %eax, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rbx)
movups %xmm0, 0x38(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x48(%rbx)
movl 0x30(%r14), %eax
movl %eax, 0x50(%rbx)
movq %r12, 0x54(%rbx)
movl %r12d, 0x5c(%rbx)
xorl %eax, %eax
cmpl %r12d, 0x28(%r14)
sete %al
movl %eax, 0x60(%rbx)
movq %r12, 0x64(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/../core/bs.h
// Function: bs_write_ue(bs_s*, unsigned int, char const*)
static inline void
bs_write_ue(bs_t *s, unsigned int val, const char str[]) {
    myPrintf( "bs_write_ue %u %s\n", val, str);
    int i_size = 0;
    static const int i_size0_255[256] = {
                                         1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                                         6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
                                         7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
                                         7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
    };

    if (val == 0)
    {
        _bs_write(s, 1, 1);
    }
    else
    {
        unsigned int tmp = ++val;

        if (tmp >= 0x00010000)
        {
            i_size += 16;
            tmp >>= 16;
        }
        if (tmp >= 0x100)
        {
            i_size += 8;
            tmp >>= 8;
        }
        i_size += i_size0_255[tmp];

        _bs_write(s, 2 * i_size - 1, val);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x130e3(%rip), %rdi     # 0x2947e
xorl %eax, %eax
callq 0x4c22
testl %r14d, %r14d
je 0x16443
incl %r14d
movl %r14d, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %r14d         # imm = 0x10000
setae %dl
cmovbl %r14d, %ecx
shll $0x4, %edx
leal 0x8(%rdx), %eax
movl %ecx, %esi
shrl $0x8, %esi
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %edx, %eax
cmovbl %ecx, %esi
leaq 0x130ee(%rip), %rcx     # 0x294d0
addl (%rcx,%rsi,4), %eax
jle 0x1646b
addl %eax, %eax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jae 0x1646b
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movzbl %cl, %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
btl %ecx, %r14d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%rbx)
jne 0x1643a
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
decl %eax
cmpl $0x1, %eax
jg 0x163ed
jmp 0x1646b
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x1646b
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rbx)
jne 0x1646b
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_psnr(unsigned char*, int, unsigned char*, int, int, int)
static float x264_psnr(uint8_t *pix1, int i_pix_stride, uint8_t *pix2, int i_pix2_stride, int i_width, int i_height) {LOG_CALL;
    int64_t i_sqe = 0;

    int x, y;

    for (y = 0; y < i_height; y++)
    {
        for (x = 0; x < i_width; x++)
        {
            int tmp;

            tmp = pix1[y * i_pix_stride + x] - pix2[y * i_pix2_stride + x];

            i_sqe += tmp * tmp;
        }
    }

    if (i_sqe == 0)
    {
        return -1.0;
    }
    return (float) (10.0 * log((double) 65025.0 * (double) i_height * (double) i_width / (double) i_sqe) / log(10.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r14d
movl %r8d, %ebx
movl %ecx, -0x30(%rbp)
movq %rdx, %r15
movl %esi, -0x2c(%rbp)
movq %rdi, %r12
leaq 0xed1d(%rip), %rdi      # 0x251b4
leaq 0x12c8a(%rip), %rsi     # 0x29128
leaq 0x1301a(%rip), %rdx     # 0x294bf
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x4c22
testl %r14d, %r14d
jle 0x164f7
movslq -0x2c(%rbp), %rax
movslq -0x30(%rbp), %rcx
movl %r14d, %edx
movl %ebx, %esi
xorl %edi, %edi
xorl %r13d, %r13d
testl %ebx, %ebx
jle 0x164e9
xorl %r8d, %r8d
movzbl (%r12,%r8), %r9d
movzbl (%r15,%r8), %r10d
subl %r10d, %r9d
imull %r9d, %r9d
addq %r9, %r13
incq %r8
cmpq %r8, %rsi
jne 0x164cd
incq %rdi
addq %rcx, %r15
addq %rax, %r12
cmpq %rdx, %rdi
jne 0x164c6
testq %r13, %r13
je 0x16538
cvtsi2sd %r14d, %xmm1
mulsd 0x12c07(%rip), %xmm1    # 0x29110
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13, %xmm1
divsd %xmm1, %xmm0
callq 0x2090
mulsd 0x12bee(%rip), %xmm0    # 0x29118
divsd 0x12bee(%rip), %xmm0    # 0x29120
cvtsd2ss %xmm0, %xmm0
jmp 0x16540
movss 0x12bc8(%rip), %xmm0    # 0x29108
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_mb_encode_i4x4(x264_t*, x264_macroblock_t*, int, int)
void x264_mb_encode_i4x4(x264_t *h, x264_macroblock_t *mb, int idx, int i_qscale) {LOG_CALL;
    x264_mb_context_t *ctx = mb->context;

    uint8_t *p_src = ctx->p_img[0] + 4 * block_idx_x[idx] + 4 * block_idx_y[idx] * ctx->i_img[0];
    int i_src = ctx->i_img[0];
    uint8_t *p_dst = ctx->p_fdec[0] + 4 * block_idx_x[idx] + 4 * block_idx_y[idx] * ctx->i_fdec[0];
    int i_dst = ctx->i_fdec[0];

    int16_t luma[4][4];
    int16_t dct4x4[4][4];

    /* we calculate diff */
    h->pixf.sub4x4(luma, p_src, i_src, p_dst, i_dst);

    /* calculate dct coeffs */
    h->dctf.dct4x4(dct4x4, luma);
    quant_4x4(dct4x4, i_qscale, 1);

    scan_zigzag_4x4full(mb->block[idx].luma4x4, dct4x4);

    /* output samples to fdec */
    x264_mb_dequant_4x4(dct4x4, i_qscale);
    h->dctf.idct4x4(luma, dct4x4);

    /* put pixel to fdec */
    h->pixf.add4x4(p_dst, i_dst, luma);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, -0x2c(%rbp)
movl %edx, %r15d
movq %rsi, %r14
movq %rsi, -0x38(%rbp)
movq %rdi, %r13
leaq 0xe97d(%rip), %rdi      # 0x251b4
leaq 0x151da(%rip), %rsi     # 0x2ba18
leaq 0x151fe(%rip), %rdx     # 0x2ba43
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4c22
movq 0x10(%r14), %rax
movslq %r15d, %r14
leaq 0x11494(%rip), %rcx     # 0x27cf0
movzbl (%r14,%rcx), %ecx
shll $0x2, %ecx
movq 0x18(%rax), %rdi
addq %rcx, %rdi
leaq 0x1146e(%rip), %rdx     # 0x27ce0
movzbl (%r14,%rdx), %r9d
shll $0x2, %r9d
movslq 0x30(%rax), %rdx
movq %rdx, %rsi
imulq %r9, %rsi
addq %rdi, %rsi
addq 0x40(%rax), %rcx
movl 0x58(%rax), %r8d
imull %r8d, %r9d
movslq %r9d, %r12
addq %rcx, %r12
leaq -0x80(%rbp), %rdi
movq %r12, %rcx
movl %r8d, -0x30(%rbp)
callq *0x10f350(%r13)
leaq -0x60(%rbp), %r15
movq %r15, %rdi
leaq -0x80(%rbp), %rsi
movq %r13, -0x40(%rbp)
callq *0x10f398(%r13)
movq %r15, %rdi
movl -0x2c(%rbp), %r15d
movl %r15d, %esi
movl $0x1, %edx
callq 0x16981
movq %r14, %rax
shlq $0x7, %rax
leaq (%rax,%r14,4), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %r14
addq $0x368, %r14            # imm = 0x368
leaq 0x11bd8(%rip), %rdx     # 0x284d0
leaq 0xe8b5(%rip), %rdi      # 0x251b4
leaq 0x15112(%rip), %rsi     # 0x2ba18
xorl %eax, %eax
callq 0x4c22
leaq 0x134bc(%rip), %rax     # 0x29dd0
leaq 0x134f5(%rip), %rcx     # 0x29e10
movslq (%rbx,%rax), %rdx
movslq (%rbx,%rcx), %rsi
leaq -0x60(,%rdx,8), %rdx
addq %rbp, %rdx
movswl (%rdx,%rsi,2), %edx
movl %edx, (%r14,%rbx)
addq $0x4, %rbx
cmpq $0x40, %rbx
jne 0x1691b
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movl %r15d, %esi
callq 0x6a50
leaq -0x80(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq -0x40(%rbp), %rbx
callq *0x10f3a8(%rbx)
movq %r12, %rdi
movl -0x30(%rbp), %esi
movq %r13, %rdx
callq *0x10f368(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: quant_4x4(short (*) [4], int, int)
static void quant_4x4(int16_t dct[4][4], int i_qscale, int b_intra) {LOG_CALL;
    const int i_qbits = 15 + i_qscale / 6;
    const int i_mf = i_qscale % 6;
    const int f = (1 << i_qbits) / (b_intra ? 3 : 6);

    int x, y;
    for (y = 0; y < 4; y++)
    {
        for (x = 0; x < 4; x++)
        {
            if (dct[y][x] > 0)
            {
                dct[y][x] = (f + dct[y][x] * quant_mf[i_mf][y][x]) >> i_qbits;
            } else
            {
                dct[y][x] = -((f - dct[y][x] * quant_mf[i_mf][y][x]) >> i_qbits);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0xe818(%rip), %rdi      # 0x251b4
leaq 0x15075(%rip), %rsi     # 0x2ba18
leaq 0xef21(%rip), %rdx      # 0x258cb
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x4c22
movslq %r15d, %rsi
imulq $0x2aaaaaab, %rsi, %rax # imm = 0x2AAAAAAB
movq %rax, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rax
leal (%rax,%rdx), %ecx
addl $0xf, %ecx
addl %edx, %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
movl $0x1, %eax
shll %cl, %eax
xorl %edx, %edx
testl %r14d, %r14d
sete %dl
leal (%rdx,%rdx,2), %edi
addl $0x3, %edi
cltd
idivl %edi
movslq %esi, %rsi
shlq $0x6, %rsi
leaq 0x13252(%rip), %rdx     # 0x29c50
addq %rsi, %rdx
xorl %esi, %esi
movswl (%rbx,%rsi,2), %edi
testl %edi, %edi
jle 0x16a15
imull (%rdx,%rsi,4), %edi
addl %eax, %edi
sarl %cl, %edi
jmp 0x16a28
imull (%rdx,%rsi,4), %edi
movl %eax, %r8d
subl %edi, %r8d
sarl %cl, %r8d
negl %r8d
movl %r8d, %edi
movw %di, (%rbx,%rsi,2)
incq %rsi
cmpq $0x4, %rsi
jne 0x16a03
incq %r12
addq $0x8, %rbx
addq $0x10, %rdx
cmpq $0x4, %r12
jne 0x16a01
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_mb_decimate_score(int*, int)
static int x264_mb_decimate_score(int *dct, int i_max) {LOG_CALL;
    static const int i_ds_table[16] = {3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

    int i_score = 0;
    int idx = i_max - 1;

    while (idx >= 0 && dct[idx] == 0)
    {
        idx--;
    }

    while (idx >= 0)
    {
        int i_run;

        if (abs(dct[idx--]) > 1)
        {
            return 9;
        }

        i_run = 0;
        while (idx >= 0 && dct[idx] == 0)
        {
            idx--;
            i_run++;
        }
        i_score += i_ds_table[i_run];
    }

    return i_score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0xd8e3(%rip), %rdi      # 0x251b4
leaq 0x14140(%rip), %rsi     # 0x2ba18
leaq 0x144f1(%rip), %rdx     # 0x2bdd0
xorl %eax, %eax
callq 0x4c22
movl %r14d, %eax
movl %r14d, %ecx
sarl $0x1f, %ecx
andl %r14d, %ecx
decl %ecx
decq %rax
testl %r14d, %r14d
jle 0x1790c
movl %eax, %edx
decl %r14d
decq %rax
cmpl $0x0, (%rbx,%rdx,4)
je 0x178f7
jmp 0x1790f
movl %ecx, %r14d
xorl %eax, %eax
leaq 0x12538(%rip), %rcx     # 0x29e50
testl %r14d, %r14d
js 0x17977
leal -0x1(%r14), %edx
movl %r14d, %esi
movl (%rbx,%rsi,4), %edi
movl %edi, %esi
negl %esi
cmovsl %edi, %esi
cmpl $0x1, %esi
ja 0x1796a
testl %r14d, %r14d
je 0x1795d
movl %r14d, %r8d
negl %r8d
xorl %edi, %edi
movl %edx, %r9d
cmpl $0x0, (%rbx,%r9,4)
jne 0x17961
decl %edx
incl %edi
movl %r8d, %r9d
addl %edi, %r9d
jne 0x17940
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0x17964
xorl %edi, %edi
jmp 0x17967
movl %edi, %r14d
movl %r14d, %edi
addl (%rcx,%rdi,4), %eax
movl %edx, %r14d
cmpl $0x2, %esi
jb 0x17918
movl $0x9, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/../core/bs.h
// Function: bs_write_te(bs_s*, int, int, char const*)
static inline void
bs_write_te(bs_t *s, int x, int val, const char str[]) {
    myPrintf( "bs_write_te %d %s\n", val,str);
    if (x == 1)
    {
        _bs_write(s, 1, ~val);
    }
    else if (x > 1)
    {
        _bs_write_ue(s, val);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x13033(%rip), %rdi     # 0x2be0f
movl %edx, %esi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x4c22
cmpl $0x1, %r15d
jne 0x18e43
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x18f03
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
movb (%rax), %cl
movl %edx, %esi
notb %sil
andb %cl, %sil
orb %dl, %cl
testb $0x1, %r14b
movzbl %cl, %ecx
movzbl %sil, %edx
cmovel %ecx, %edx
movb %dl, (%rax)
decl 0x18(%rbx)
jne 0x18f03
leaq 0x8(%rbx), %rax
addq $0x18, %rbx
incq (%rax)
movl $0x8, (%rbx)
jmp 0x18f03
jle 0x18f03
testl %r14d, %r14d
je 0x18ee6
incl %r14d
movl %r14d, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %r14d         # imm = 0x10000
setae %dl
cmovbl %r14d, %ecx
shll $0x4, %edx
leal 0x8(%rdx), %eax
movl %ecx, %esi
shrl $0x8, %esi
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %edx, %eax
cmovbl %ecx, %esi
leaq 0x11007(%rip), %rcx     # 0x29e90
addl (%rcx,%rsi,4), %eax
jle 0x18f03
addl %eax, %eax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jae 0x18f03
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movzbl %cl, %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
btl %ecx, %r14d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%rbx)
jne 0x18edd
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
decl %eax
cmpl $0x1, %eax
jg 0x18e90
jmp 0x18f03
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x18f03
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
jmp 0x18e24
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_cabac_mb_skip(x264_t*, x264_macroblock_t*, int)
void x264_cabac_mb_skip(x264_t *h, x264_macroblock_t *mb, int b_skip) {LOG_CALL;
    x264_macroblock_t *mba = mb->context->mba;
    x264_macroblock_t *mbb = mb->context->mbb;
    int i_ctxIdxInc = 0;

    if (mba != NULL && !IS_SKIP(mba->i_type))
    {
        i_ctxIdxInc++;
    }
    if (mbb != NULL && !IS_SKIP(mbb->i_type))
    {
        i_ctxIdxInc++;
    }

    if (h->sh.i_type == SLICE_TYPE_P)
    {
        x264_cabac_encode_decision(&h->cabac, 11 + i_ctxIdxInc, b_skip ? 1 : 0);
    } else /* SLICE_TYPE_B */
    {
        x264_cabac_encode_decision(&h->cabac, 24 + i_ctxIdxInc, b_skip ? 1 : 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
leaq 0xb622(%rip), %rdi      # 0x251b4
leaq 0x11e7f(%rip), %rsi     # 0x2ba18
leaq 0x1219f(%rip), %rdx     # 0x2bd3f
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x4c22
movq 0x10(%r12), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
testq %rcx, %rcx
je 0x19bd0
movl 0x18(%rcx), %ecx
cmpl $0x5, %ecx
setne %dl
cmpl $0x11, %ecx
setne %cl
andb %dl, %cl
movzbl %cl, %r15d
testq %rax, %rax
je 0x19be5
movl 0x18(%rax), %eax
cmpl $0x5, %eax
je 0x19be5
cmpl $0x11, %eax
je 0x19be5
incl %r15d
xorl %edx, %edx
testl %r14d, %r14d
setne %dl
leal 0x18(%r15), %eax
addl $0xb, %r15d
cmpl $0x0, 0x10db00(%rbx)
cmovnel %eax, %r15d
leaq 0x10db60(%rbx), %rdi
movl %r15d, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x40ca
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_cabac_mb_mvd(x264_t*, int, int, int)
static void x264_cabac_mb_mvd(x264_t *h, int i_ctx, int i_ctx_inc, int mvd) {LOG_CALL;
    int i_abs = abs(mvd);
    int i_prefix = X264_MIN(i_abs, 9);
    int i;

    for (i = 0; i < i_prefix; i++)
    {
        x264_cabac_encode_decision(&h->cabac, i_ctx + i_ctx_inc, 1);
        if (i_ctx_inc < 3)
        {
            i_ctx_inc = 3;
        } else if (i_ctx_inc < 6)
        {
            i_ctx_inc++;
        }
    }
    if (i_prefix < 9)
    {
        x264_cabac_encode_decision(&h->cabac, i_ctx + i_ctx_inc, 0);
    }

    if (i_prefix >= 9)
    {
        int k = 3;
        int i_suffix = i_abs - 9;

        while (i_suffix >= (1 << k))
        {
            x264_cabac_encode_bypass(&h->cabac, 1);
            i_suffix -= 1 << k;
            k++;
        }
        x264_cabac_encode_bypass(&h->cabac, 0);
        while (k--)
        {
            x264_cabac_encode_bypass(&h->cabac, (i_suffix >> k)&0x01);
        }
    }

    /* sign */
    if (mvd > 0)
    {
        x264_cabac_encode_bypass(&h->cabac, 0);
    } else if (mvd < 0)
    {
        x264_cabac_encode_bypass(&h->cabac, 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0xa021(%rip), %rdi      # 0x251b4
leaq 0x1087e(%rip), %rsi     # 0x2ba18
leaq 0x10e2f(%rip), %rdx     # 0x2bfd0
xorl %eax, %eax
callq 0x4c22
movl %r14d, %eax
negl %eax
cmovsl %r14d, %eax
movq %rax, -0x38(%rbp)
movq %rbx, -0x40(%rbp)
movl %r14d, -0x2c(%rbp)
jae 0x1b210
leaq 0x10db60(%rbx), %r13
movl %r14d, %eax
negl %eax
cmovsl %r14d, %eax
cmpl $0x9, %eax
movl $0x9, %r14d
cmovbl %eax, %r14d
movl $0x3, %ebx
leal (%r12,%r15), %esi
movq %r13, %rdi
movl $0x1, %edx
callq 0x40ca
xorl %esi, %esi
cmpl $0x6, %r12d
setl %sil
addl %r12d, %esi
cmpl $0x3, %r12d
cmovll %ebx, %esi
movl %esi, %r12d
decl %r14d
jne 0x1b1e1
jmp 0x1b213
movl %r12d, %esi
movq -0x38(%rbp), %r12
cmpl $0x8, %r12d
movq -0x40(%rbp), %rbx
ja 0x1b232
leaq 0x10db60(%rbx), %rdi
addl %r15d, %esi
xorl %edx, %edx
callq 0x40ca
cmpl $0x9, %r12d
jb 0x1b2ae
leal -0x9(%r12), %r13d
movl $0x3, %r14d
cmpl $0x11, %r12d
jb 0x1b282
leaq 0x10db60(%rbx), %r15
movl $0x3, %r12d
movl $0x8, %eax
subl %eax, %r13d
movq %r15, %rdi
movl $0x1, %esi
callq 0x4314
movl $0x2, %eax
movl %r12d, %ecx
shll %cl, %eax
leal 0x1(%r12), %r14d
movl %r14d, %r12d
cmpl %eax, %r13d
jge 0x1b25b
leaq 0x10db60(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x4314
decl %r14d
xorl %esi, %esi
btl %r14d, %r13d
setb %sil
movq %r15, %rdi
callq 0x4314
addl $-0x1, %r14d
jb 0x1b296
xorl %esi, %esi
cmpl $0x0, -0x2c(%rbp)
jle 0x1b2d3
addq $0x10db60, %rbx         # imm = 0x10DB60
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4314
js 0x1b2e4
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %esi
jmp 0x1b2b6
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/ratecontrol.c
// Function: x264_ratecontrol_new(x264_param_t*)
x264_ratecontrol_t *x264_ratecontrol_new( x264_param_t *param )
{
    x264_ratecontrol_t *rc = (x264_ratecontrol_t *)x264_malloc( sizeof( x264_ratecontrol_t ) );

    rc->fps = param->f_fps > 0.1 ? param->f_fps : 25.0;
    rc->i_iframe = param->i_iframe;
    rc->i_bitrate = param->i_bitrate * 1000;

    rc->i_qp_last = 26;
    rc->i_qp      = param->i_qp_constant;

    rc->i_frames  = 0;
    rc->i_size    = 0;

    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x28, %edi
callq 0x4849
movss 0x14(%rbx), %xmm0
cvtss2sd %xmm0, %xmm1
ucomisd 0xdc94(%rip), %xmm1     # 0x2c600
ja 0x1e976
movss 0xdc92(%rip), %xmm0     # 0x2c608
movss %xmm0, (%rax)
movl 0x20(%rbx), %ecx
movl %ecx, 0x4(%rax)
imull $0x3e8, 0x38(%rbx), %ecx # imm = 0x3E8
movl %ecx, 0x8(%rax)
movl $0x1a, 0xc(%rax)
movl 0x34(%rbx), %ecx
movl %ecx, 0x10(%rax)
movl $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JulStrat[P]bams/./sh_merge.h
// Function: merge
void *
merge(const void *arr_a, size_t num_el_a,
      const void *arr_b, size_t num_el_b,
      size_t el_size, int (*compare) (const void *, const void *))
{
    char *ac = (char *) arr_a;
    char *bc = (char *) arr_b;
    char *ah = ac + (num_el_a * el_size);
    char *bh = bc + (num_el_b * el_size);
    char *r = NULL;
    char *rc = NULL;

    ASSERT_MERGE_ARGS();

    r = (char *) malloc((num_el_a + num_el_b) * el_size);
    if (!r || !((num_el_a + num_el_b) * el_size)) {
        return NULL;
    }
    rc = r;

    while ((ac < ah) && (bc < bh)) {
        if ((*compare) (ac, bc) > 0) {
            memcpy(rc, bc, el_size);
            bc += el_size;
        } else {
            memcpy(rc, ac, el_size);
            ac += el_size;
        }
        rc += el_size;
    }

    if (ac < ah) {
        memcpy(rc, ac, ah - ac);
    } else if (bc < bh) {
        memcpy(rc, bc, bh - bc);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %r8, %r8
je 0x1441
movq %r9, %r13
testq %r9, %r9
je 0x144a
movq %r8, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq (%rcx,%rsi), %r12
imulq %r8, %r12
movq %r12, %rdi
movq %rcx, 0x10(%rsp)
callq 0x1130
movq %rax, (%rsp)
testq %rax, %rax
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
je 0x138b
xorl %eax, %eax
jmp 0x1432
imulq %rbp, %r14
leaq (%r15,%r14), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rcx
imulq %rbp, %rcx
leaq (%rbx,%rcx), %r12
testq %r14, %r14
setg %al
testq %rcx, %rcx
setg %cl
movl %eax, %edx
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1406
movq (%rsp), %r14
movq %r15, %rdi
movq %rbx, %rsi
callq *%r13
movq %r14, %rdi
testl %eax, %eax
jle 0x13de
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1110
addq %rbp, %rbx
jmp 0x13ec
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1110
addq %rbp, %r15
addq %rbp, %r14
cmpq %r12, %rbx
setb %cl
cmpq 0x8(%rsp), %r15
setb %al
jae 0x140a
cmpq %r12, %rbx
jb 0x13be
jmp 0x140a
movq (%rsp), %r14
orb %al, %cl
testb $0x1, %cl
je 0x142e
testb %al, %al
cmovneq %r15, %rbx
cmovneq 0x8(%rsp), %r12
subq %rbx, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1110
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c68(%rip), %rdi      # 0x30b0
jmp 0x1451
leaq 0x1cde(%rip), %rdi      # 0x312f
leaq 0x1c65(%rip), %rsi      # 0x30bd
leaq 0x1c6b(%rip), %rcx      # 0x30ca
movl $0x62, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/JulStrat[P]bams/./sh_merge.h
// Function: merge_into
void *
merge_into(void *dst, size_t num_el_dst,
           const void *src, size_t num_el_src,
           size_t el_size, int (*compare) (const void *, const void *))
{
    char *dl;
    char *sl = (char *) src;
    char *dc;
    char *sc = sl + (num_el_src * el_size);
    char *r = NULL;
    char *rc = NULL;

    ASSERT_MERGE_ARGS();

    r = (char *) realloc(dst, (num_el_dst + num_el_src) * el_size);
    if (!r || !((num_el_dst + num_el_src) * el_size)) {
        return NULL;
    }
    rc = r + (num_el_dst + num_el_src) * el_size;

    dl = (char *) r;
    dc = dl + (num_el_dst * el_size);

    while ((dl < dc) && (sl < sc)) {
        if ((*compare) (dc - el_size, sc - el_size) > 0) {
            memcpy(rc - el_size, dc - el_size, el_size);
            dc -= el_size;
        } else {
            memcpy(rc - el_size, sc - el_size, el_size);
            sc -= el_size;
        }
        rc -= el_size;
    }

    if (sl < sc) {
        memcpy(r, sl, sc - sl);
    }

    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %r8, %r8
je 0x15a9
movq %r9, %rbx
testq %r9, %r9
je 0x15b2
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %rbp
leaq (%rcx,%rsi), %r14
imulq %r8, %r14
movq %r14, %rsi
callq 0x1160
movq %rax, %rdi
testq %rax, %rax
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
je 0x14c2
xorl %edi, %edi
jmp 0x1597
movq %r12, %rax
imulq %r13, %rax
leaq (%r15,%rax), %rdx
movq %r12, %r8
imulq %rbp, %r8
testq %r8, %r8
setle %cl
testq %rax, %rax
setg %al
setle %sil
orb %cl, %sil
jne 0x157a
addq %rdi, %r8
movq %r12, %rcx
negq %rcx
addq %r13, %rbp
decq %rbp
imulq %r12, %rbp
addq %rdi, %rbp
movq %r15, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movq %rcx, (%rsp)
movq %r8, 0x20(%rsp)
leaq (%r8,%rcx), %r15
leaq (%rdx,%rcx), %r14
movq %r15, %rdi
movq %r14, %rsi
movq %rdx, %r13
callq *%rbx
movq %r15, %rbx
testl %eax, %eax
jg 0x1540
movq %r14, %r15
movq 0x20(%rsp), %rbx
movq %r14, %r13
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1110
movq 0x18(%rsp), %r15
cmpq %r15, %r13
seta %al
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
movq %r13, %rdx
jae 0x157a
movq (%rsp), %rcx
addq %rcx, %rbp
movq %rbx, %r8
cmpq %r15, %rdx
movq 0x8(%rsp), %rbx
ja 0x1516
testb %al, %al
je 0x1597
subq %r15, %rdx
movq %r15, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1110
movq %rdi, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b00(%rip), %rdi      # 0x30b0
jmp 0x15b9
leaq 0x1b76(%rip), %rdi      # 0x312f
leaq 0x1afd(%rip), %rsi      # 0x30bd
leaq 0x1b78(%rip), %rcx      # 0x313f
movl $0x8a, %edx
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O1/JulStrat[P]bams/tests/test_merge.c
// Function: merge_suite
SUITE(merge_suite)
{
    int i;
    int c;

    for (i = 0; i < TEST_NUM; i++) {
        c = (rand() % ARR_SZ);
        if ((c < 0) || (c > ARR_SZ))
            continue;
        RUN_TEST1(do_merge_test, c);
    }

    RUN_TEST1(do_merge_test, 0);
    RUN_TEST1(do_merge_test, ARR_SZ);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x80, %ebp
leaq 0x1bb0(%rip), %rbx      # 0x31a3
callq 0x1190
movslq %eax, %r14
imulq $-0x7892bc03, %r14, %rax # imm = 0x876D43FD
shrq $0x20, %rax
addl %r14d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0xe, %eax
addl %ecx, %eax
imull $0x78fb, %eax, %eax     # imm = 0x78FB
subl %eax, %r14d
js 0x163a
movq %rbx, %rdi
callq 0x1688
cmpl $0x1, %eax
jne 0x163a
movl %r14d, %edi
callq 0x1870
movl %eax, %edi
callq 0x1aeb
decl %ebp
jne 0x15f3
leaq 0x1b5e(%rip), %rdi      # 0x31a3
callq 0x1688
cmpl $0x1, %eax
jne 0x165d
xorl %edi, %edi
callq 0x1870
movl %eax, %edi
callq 0x1aeb
leaq 0x1b3f(%rip), %rdi      # 0x31a3
callq 0x1688
cmpl $0x1, %eax
jne 0x1683
movl $0x78fb, %edi           # imm = 0x78FB
callq 0x1870
movl %eax, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x1aeb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JulStrat[P]bams/tests/test_merge.c
// Function: main
int
main(int argc, char *argv[])
{
    GREATEST_MAIN_BEGIN();
#if defined(__STDC_VERSION__)
    printf("Compiler Standard version - %ld\n", __STDC_VERSION__);
#endif

    srand(time(NULL));

    RUN_SUITE(merge_suite);
    RUN_SUITE(merge_into_suite);

    GREATEST_MAIN_END();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
callq 0x230f
cmpl $0x2, %ebp
jl 0x29ef
movb 0x21c4f(%rip), %r8b     # 0x24510
movl $0x1, %r14d
movb 0x21c43(%rip), %r15b    # 0x24511
leaq 0x73b(%rip), %r13       # 0x3010
leaq 0x784(%rip), %r9        # 0x3060
movq %rbx, 0x8(%rsp)
movl %ebp, 0x14(%rsp)
movslq %r14d, %rax
movq (%rbx,%rax,8), %r12
cmpb $0x2d, (%r12)
jne 0x29ac
movzbl 0x1(%r12), %eax
leal -0x65(%rax), %edx
cmpl $0x13, %edx
ja 0x2932
movslq (%r13,%rdx,4), %rcx
addq %r13, %rcx
jmpq *%rcx
leal 0x1(%r14), %ecx
cmpl %ebp, %ecx
jge 0x2a56
cmpl $0x13, %edx
ja 0x2932
movslq (%r9,%rdx,4), %rax
addq %r9, %rax
jmpq *%rax
movb $0x1, 0x21be3(%rip)     # 0x24513
jmp 0x29a6
cmpl $0x61, %eax
jne 0x293d
orb $0x4, %r8b
jmp 0x299f
movq %r9, %rbp
movl %r8d, %ebx
movl $0x6, %edx
leaq 0xae2(%rip), %rdi       # 0x3431
movq %r12, %rsi
callq 0x1050
testl %eax, %eax
je 0x2a8d
leaq 0xad2(%rip), %rdi       # 0x3438
movq %r12, %rsi
callq 0x10f0
testl %eax, %eax
jne 0x2a5b
xorl %eax, %eax
movl %ebx, %r8d
movq 0x8(%rsp), %rbx
movq %rbp, %r9
movl 0x14(%rsp), %ebp
jmp 0x29a8
incb %r15b
movb %r15b, 0x21b7e(%rip)    # 0x24511
jmp 0x29a6
orb $0x1, %r8b
jmp 0x299f
orb $0x2, %r8b
movb %r8b, 0x21b6a(%rip)     # 0x24510
movb $0x1, %al
testb %al, %al
je 0x29ef
incl %r14d
cmpl %ebp, %r14d
jl 0x28e5
jmp 0x29ef
movslq %ecx, %rax
movq (%rbx,%rax,8), %rax
movq %rax, 0x21be0(%rip)     # 0x245a8
jmp 0x29e8
movslq %ecx, %rax
movq (%rbx,%rax,8), %rax
movq %rax, 0x21bc8(%rip)     # 0x245a0
jmp 0x29e8
movslq %ecx, %rax
movq (%rbx,%rax,8), %rax
movq %rax, 0x21bb0(%rip)     # 0x24598
movb $0x1, %al
movl %ecx, %r14d
jmp 0x29a8
leaq 0x8fe(%rip), %rdi       # 0x32f4
movl $0x313ee, %esi          # imm = 0x313EE
xorl %eax, %eax
callq 0x1090
xorl %edi, %edi
callq 0x1120
movl %eax, %edi
callq 0x10e0
leaq -0x1434(%rip), %rdi     # 0x15e3
leaq 0x8f7(%rip), %rsi       # 0x3315
callq 0x236a
leaq -0xcc5(%rip), %rdi      # 0x1d65
leaq 0x8f0(%rip), %rsi       # 0x3321
callq 0x236a
callq 0x2564
xorl %eax, %eax
cmpl $0x0, 0x21b08(%rip)     # 0x2454c
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdi
jmp 0x2a7e
movq 0x3576(%rip), %rax      # 0x5fd8
movq (%rax), %rdi
leaq 0x9cf(%rip), %rsi       # 0x343b
movq %r12, %rdx
xorl %eax, %eax
callq 0x1100
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2aa6
movl $0x1, %edi
callq 0x1170
movq 0x8(%rsp), %rax
movq (%rax), %rdi
jmp 0x2a9a
movq (%rbx), %rdi
callq 0x2aa6
xorl %edi, %edi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O1/JulStrat[P]bams/tests/test_merge.c
// Function: merge_into_suite
SUITE(merge_into_suite)
{
    int i;
    int c;

    for (i = 0; i < TEST_NUM; i++) {
        c = (rand() % ARR_SZ);
        if ((c < 0) || (c > ARR_SZ))
            continue;
        RUN_TEST1(do_merge_into_test, c);
    }

    RUN_TEST1(do_merge_into_test, 0);
    RUN_TEST1(do_merge_into_test, ARR_SZ);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0x80, %ebp
leaq 0x143c(%rip), %rbx      # 0x31b1
callq 0x1190
movslq %eax, %r14
imulq $-0x7892bc03, %r14, %rax # imm = 0x876D43FD
shrq $0x20, %rax
addl %r14d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
sarl $0xe, %eax
addl %ecx, %eax
imull $0x78fb, %eax, %eax     # imm = 0x78FB
subl %eax, %r14d
js 0x1dbc
movq %rbx, %rdi
callq 0x1688
cmpl $0x1, %eax
jne 0x1dbc
movl %r14d, %edi
callq 0x1e0a
movl %eax, %edi
callq 0x1aeb
decl %ebp
jne 0x1d75
leaq 0x13ea(%rip), %rdi      # 0x31b1
callq 0x1688
cmpl $0x1, %eax
jne 0x1ddf
xorl %edi, %edi
callq 0x1e0a
movl %eax, %edi
callq 0x1aeb
leaq 0x13cb(%rip), %rdi      # 0x31b1
callq 0x1688
cmpl $0x1, %eax
jne 0x1e05
movl $0x78fb, %edi           # imm = 0x78FB
callq 0x1e0a
movl %eax, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x1aeb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/run-tests.c
// Function: report_corruptions
static void report_corruptions(int ckey_corruptions, int pos_corruptions, int nelems) {
  printf("\nTotal number of ckey corruptions: %d\nFraction corrupted: %4.3f\n", ckey_corruptions,
         (double)ckey_corruptions/nelems);
  printf("\nTotal number of positional corruptions: %d\nFraction corrupted: %4.3f\n", pos_corruptions,
         (double)pos_corruptions/nelems);
  printf("\n");
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl %edi, %esi
cvtsi2sd %edi, %xmm0
mulsd 0x9aa(%rip), %xmm0      # 0x2010
leaq 0x9db(%rip), %rdi       # 0x2048
movb $0x1, %al
callq 0x1070
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd 0x98d(%rip), %xmm0      # 0x2010
leaq 0x9ff(%rip), %rdi       # 0x2089
movl %ebx, %esi
movb $0x1, %al
callq 0x1070
movl $0xa, %edi
popq %rbx
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: makeheap
softheap *makeheap(int elem, double epsilon) {
  softheap *s = makeheap_empty(epsilon);
  s->first = maketree(elem);
  s->rank = 0;
  return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x16cf
movq %rax, %r14
movl %ebx, %edi
callq 0x1753
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: makeheap_empty
softheap *makeheap_empty(double epsilon) {
  // Ensure error parameter is valid
  if(epsilon <= 0 || epsilon >= 1) error(1,0, "Soft heap error parameter must fall in (0,1)");
  
  softheap *s = malloc(sizeof(softheap));
  s->first = NULL;
  s->rank = -1; // Ensures that any insertion will just return the SH containing the inserted elem
  s->epsilon = epsilon;
  s->r = get_r(epsilon);
  return s;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
movsd %xmm0, 0x8(%rsp)
jae 0x16ee
ucomisd 0xbf4(%rip), %xmm0      # 0x22e0
jb 0x1703
leaq 0xc1b(%rip), %rdx       # 0x2310
movl $0x1, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10e0
movl $0x20, %edi
callq 0x10c0
movq %rax, %rbx
movq $0x0, (%rax)
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
callq 0x1090
divsd 0xbb2(%rip), %xmm0      # 0x22e8
callq 0x10f0
addsd 0xbad(%rip), %xmm0      # 0x22f0
cvttsd2si %xmm0, %eax
movl %eax, 0x18(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: maketree
static tree *maketree(int elem) {
  tree *T = malloc(sizeof(tree));
  T->root = makenode(elem);
  T->prev = T->next = NULL;
  T->rank = 0;
  T->sufmin = T;
  return T;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
movl $0x28, %edi
callq 0x10c0
movq %rax, %r14
movl $0x30, %edi
callq 0x10c0
movq %rax, %r15
movl $0x10, %edi
callq 0x10c0
movl %ebx, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, 0x18(%r15)
movq %rax, 0x10(%r15)
movl %ebx, 0x20(%r15)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x24(%r15)
movl $0x1, 0x2c(%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq %r15, 0x18(%r14)
movl $0x0, 0x20(%r14)
movups %xmm0, (%r14)
movq %r14, 0x10(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: destroy_heap
void destroy_heap(softheap *P) {
  if(P == NULL) return;

  tree *curr = P->first, *next;
  while(curr != NULL) {
    next = curr->next;
    destroy_node(curr->root);
    free(curr);
    curr = next;
  }  

  free(P);
}

// Assembly:
testq %rdi, %rdi
je 0x180d
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1800
movq 0x8(%r14), %r15
movq 0x18(%r14), %rdi
callq 0x180e
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
testq %r15, %r15
jne 0x17e3
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: destroy_node
static void destroy_node(node *treenode) {
  if(treenode == NULL) return;
  
  cell *curr = treenode->first, *next;
  while(curr != NULL) {
    next = curr->next;
    free(curr);
    curr = next;
  }

  destroy_node(treenode->left);
  destroy_node(treenode->right);
  free(treenode);
}

// Assembly:
testq %rdi, %rdi
je 0x1854
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x1834
movq 0x8(%rdi), %r14
callq 0x1030
movq %r14, %rdi
testq %r14, %r14
jne 0x1823
movq (%rbx), %rdi
callq 0x180e
movq 0x8(%rbx), %rdi
callq 0x180e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: insert
void insert(softheap *P, int elem) {
  if(empty(P)) { 
    P->first = maketree(elem);
    P->rank = 0;
  } else meld(P, makeheap(elem, P->epsilon));
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x189a
movsd 0x10(%rbx), %xmm0
callq 0x16cf
movq %rax, %r14
movl %ebp, %edi
callq 0x1753
movq %rax, (%r14)
movl $0x0, 0x8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x18b0
movl %ebp, %edi
callq 0x1753
movq %rax, (%rbx)
movl $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: meld
softheap *meld(softheap *P, softheap *Q) {
  // Do not allow melding if the soft heaps don't seem to have the same error parameter.
  double max_eps = max(P->epsilon, Q->epsilon), min_eps = min(P->epsilon, Q->epsilon);
  double eps_off = 1 - min_eps/max_eps; 
  if(eps_off > 0.001) error(1,0, "Tried to combine soft heaps with different epsilons");

  // If both softheaps empty, just destroy one and return the other
  if(empty(P) && empty(Q)) {
    free(P);
    return Q;
  }

  softheap *result;
  if(P->rank >= Q->rank) { // meld Q into P
    merge_into(Q, P);
    repeated_combine(P, Q->rank, P->r);
    free(Q);
    result = P;
  } else { // meld P into Q
    merge_into(P, Q);
    repeated_combine(Q, P->rank, Q->r);
    free(P);
    result = Q;
  }

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x10(%rdi), %xmm0
movsd 0x10(%rsi), %xmm1
movapd %xmm1, %xmm2
cmplesd %xmm0, %xmm2
movapd %xmm2, %xmm3
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm2
orpd %xmm3, %xmm2
movapd %xmm0, %xmm3
cmplesd %xmm1, %xmm3
andpd %xmm3, %xmm0
andnpd %xmm1, %xmm3
orpd %xmm0, %xmm3
divsd %xmm2, %xmm3
movsd 0x9e2(%rip), %xmm0      # 0x22e0
subsd %xmm3, %xmm0
ucomisd 0x9ee(%rip), %xmm0      # 0x22f8
jbe 0x1921
leaq 0xa2a(%rip), %rdx       # 0x233d
movl $0x1, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10e0
cmpq $0x0, (%rbx)
jne 0x192d
cmpq $0x0, (%r14)
je 0x1950
movl 0x8(%rbx), %eax
cmpl 0x8(%r14), %eax
jge 0x1958
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1985
movl 0x8(%rbx), %esi
movl 0x18(%r14), %edx
movq %r14, %rdi
callq 0x19c6
movq %rbx, %rdi
movq %r14, %rbx
jmp 0x1975
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1985
movl 0x8(%r14), %esi
movl 0x18(%rbx), %edx
movq %rbx, %rdi
callq 0x19c6
movq %r14, %rdi
callq 0x1030
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: merge_into
static void merge_into(softheap *P, softheap *Q) {
  tree *currP = P->first, *currQ = Q->first;

  while(currP != NULL) {
    while(currQ->rank < currP->rank) currQ = currQ->next;
    // currQ is now the first tree in Q with rank >= currP. Insert currP before it.
    tree *next = currP->next;
    insert_tree(Q, currP, currQ);
    currP = next;
  }
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x19c5
movq (%rsi), %rcx
movl 0x20(%rax), %edx
cmpl %edx, 0x20(%rcx)
jge 0x199e
movq 0x8(%rcx), %rcx
jmp 0x1993
movq 0x8(%rax), %rdx
movq %rcx, 0x8(%rax)
movq (%rcx), %rdi
leaq 0x8(%rdi), %r8
testq %rdi, %rdi
cmoveq %rsi, %r8
movq %rax, (%r8)
movq %rdi, (%rax)
movq %rax, (%rcx)
movq %rdx, %rax
testq %rdx, %rdx
jne 0x1990
retq
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: repeated_combine
static void repeated_combine(softheap *Q, int smaller_rank, int r) {
  tree *curr = Q->first;

  while(curr->next != NULL) {
    bool two = (curr->rank == curr->next->rank);
    bool three = (two && curr->next->next != NULL && curr->rank == curr->next->next->rank);

    if(!two) { // only one tree of this rank
      if(curr->rank > smaller_rank) break; // no more combines to do and no carries
      else curr = curr->next;
    } else if(!three) { // exactly two trees of this rank
      // combine them to make a carry, then delete curr->next. 
      // carry may need to be merged with its next tree, so do not advance curr.
      curr->root = combine(curr->root, curr->next->root, r);
      curr->rank = curr->root->rank;
      tree *tofree = curr->next;
      remove_tree(Q, curr->next); // will change what curr->next points to
      free(tofree);
    } else { // exactly three trees of this rank
      // skip the first so that we can combine the second and third to form a carry
      curr = curr->next;
    }
  }

  if(curr->rank > Q->rank) Q->rank = curr->rank; // Q might have a new highest-rank tree
  update_suffix_min(curr); // this is final tree affected by merge, so update sufmin backwds from here
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, 0x4(%rsp)
movq %rdi, %r15
movq (%rdi), %r14
movl %esi, (%rsp)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x1ad5
movl 0x20(%r14), %ecx
movl 0x20(%rax), %edx
cmpl %edx, %ecx
jne 0x1a08
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x1a08
cmpl 0x20(%rdi), %ecx
sete %dil
jmp 0x1a0a
xorl %edi, %edi
cmpl %edx, %ecx
jne 0x1a1e
movb $0x1, %r13b
testb %dil, %dil
je 0x1a2d
movq %rax, %r14
jmp 0x1acc
cmpl %esi, %ecx
setle %r13b
cmovleq %rax, %r14
jmp 0x1acc
movq 0x18(%r14), %rbp
movq 0x18(%rax), %rbx
movl $0x30, %edi
callq 0x10c0
movq %rax, %r12
movq %rbp, (%rax)
movq %rbx, 0x8(%rax)
movl 0x24(%rbp), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x24(%r12)
movl $0x0, 0x2c(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r12)
movl $0x1, %eax
cmpl 0x4(%rsp), %ecx
jl 0x1a85
movl 0x28(%rbp), %eax
leal (%rax,%rax,2), %ecx
leal (%rax,%rax,2), %eax
incl %eax
shrl $0x1f, %eax
addl %ecx, %eax
incl %eax
sarl %eax
movl %eax, 0x28(%r12)
movq %r12, %rdi
callq 0x1c65
movq %r12, 0x18(%r14)
movl 0x24(%r12), %eax
movl %eax, 0x20(%r14)
movq 0x8(%r14), %rdi
movq (%rdi), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %r15, %rcx
movq 0x8(%rdi), %rdx
movq %rdx, (%rcx)
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1ac4
movq %rax, (%rcx)
callq 0x1030
movl (%rsp), %esi
testb %r13b, %r13b
jne 0x19de
movl 0x20(%r14), %eax
cmpl 0x8(%r15), %eax
jle 0x1ae3
movl %eax, 0x8(%r15)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d4b
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: extract_min_with_ckey
int extract_min_with_ckey(softheap *P, int *ckey_into) {
  if(empty(P)) error(1,0, "Tried to extract an element from an empty soft heap");

  tree *T = P->first->sufmin; // tree with lowest root ckey
  node *x = T->root;
  int e = extract_elem(x);
  *ckey_into = x->ckey;

  if(x->nelems <= x->size / 2) { // x is deficient; rescue it if possible
    if(!leaf(x)) {
      sift(x);
      update_suffix_min(T);
    } else if(x->nelems == 0) { // x is a leaf and empty; it must be destroyed
      free(x);
      remove_tree(P, T);

      if(T->next == NULL) { // we removed the highest-ranked tree; reset heap rank and clean up
        if(T->prev == NULL) P->rank = -1; // Heap now empty. Rank -1 is sentinel for future melds
        else P->rank = T->prev->rank;
      }

      if(T->prev != NULL) update_suffix_min(T->prev);
      free(T);
    }
  }

  return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r13
movq %rdi, %r15
cmpq $0x0, (%rdi)
jne 0x1b30
leaq 0x84f(%rip), %rdx       # 0x2371
movl $0x1, %edi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10e0
movq (%r15), %rax
movq 0x10(%rax), %r14
movq 0x18(%r14), %r12
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x1c46
movl (%rdi), %ebx
movq 0x8(%rdi), %rax
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x1b62
cmpq $0x0, 0x8(%rax)
jne 0x1b69
jmp 0x1b64
xorl %eax, %eax
movq %rax, 0x18(%r12)
callq 0x1030
decl 0x2c(%r12)
movl 0x20(%r12), %eax
movl %eax, (%r13)
movl 0x28(%r12), %ecx
movl 0x2c(%r12), %eax
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
cmpl %edx, %eax
jg 0x1bb2
cmpq $0x0, (%r12)
jne 0x1ba2
cmpq $0x0, 0x8(%r12)
je 0x1bbe
movq %r12, %rdi
callq 0x1c65
movq %r14, %rdi
callq 0x1d4b
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0x1bb2
movq %r12, %rdi
callq 0x1030
movq (%r14), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %r15, %rcx
movq 0x8(%r14), %rdx
movq %rdx, (%rcx)
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x1bed
movq %rax, (%rcx)
jmp 0x1c06
movq (%r14), %rax
testq %rax, %rax
je 0x1bfe
movl 0x20(%rax), %eax
movl %eax, 0x8(%r15)
jmp 0x1c06
movl $0xffffffff, 0x8(%r15)  # imm = 0xFFFFFFFF
movq (%r14), %rax
testq %rax, %rax
je 0x1c39
movq 0x8(%rax), %rdx
movq %rax, %rcx
testq %rdx, %rdx
je 0x1c30
movq 0x18(%rax), %rcx
movl 0x20(%rcx), %esi
movq 0x10(%rdx), %rcx
movq 0x18(%rcx), %rdx
cmpl 0x20(%rdx), %esi
cmovleq %rax, %rcx
movq %rcx, 0x10(%rax)
movq (%rax), %rax
jmp 0x1c09
movq %r14, %rdi
callq 0x1030
jmp 0x1bb2
leaq 0x758(%rip), %rdi       # 0x23a5
leaq 0x762(%rip), %rsi       # 0x23b6
leaq 0x766(%rip), %rcx       # 0x23c1
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/millimat[P]Soft-Heap/softheap.c
// Function: sift
static void sift(node *x) {
  while(x->nelems < x->size && !leaf(x)) {
    // For simplicity, switch left and right children so that left child exists & has smaller ckey
    if(x->left == NULL || (x->right != NULL && x->left->ckey > x->right->ckey)) swapLR(x);
    moveList(x->left, x); // concat left's list to x's to replenish x
    x->ckey = x->left->ckey;

    // if left was a leaf, it can't be repaired, so destroy it
    if(leaf(x->left)) {
      free(x->left);
      x->left = NULL;
    } else {
      sift(x->left);
    }
  } // Repeat as necessary until x is repaired or until x is a leaf and no more repairs are possible
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x2c(%rdi), %eax
cmpl 0x28(%rdi), %eax
jge 0x1d24
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq (%rbx), %rcx
testq %rcx, %rcx
jne 0x1c94
cmpq $0x0, 0x8(%rbx)
je 0x1d24
testq %rcx, %rcx
je 0x1ca5
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x1cb0
movl 0x20(%rcx), %esi
cmpl 0x20(%rdx), %esi
jle 0x1cb0
movq 0x8(%rbx), %rdx
movq %rdx, (%rbx)
movq %rcx, 0x8(%rbx)
movq (%rbx), %rcx
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x1d2c
leaq 0x10(%rcx), %rsi
movq 0x18(%rbx), %rdi
leaq 0x8(%rdi), %r8
testq %rdi, %rdi
cmoveq %r14, %r8
movq %rdx, (%r8)
movq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rbx)
addl 0x2c(%rcx), %eax
movl %eax, 0x2c(%rbx)
movl $0x0, 0x2c(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq (%rbx), %rdi
movl 0x20(%rdi), %eax
movl %eax, 0x20(%rbx)
cmpq $0x0, (%rdi)
jne 0x1d03
cmpq $0x0, 0x8(%rdi)
je 0x1d16
callq 0x1c65
movl 0x2c(%rbx), %eax
cmpl 0x28(%rbx), %eax
jl 0x1c7c
jmp 0x1d24
callq 0x1030
movq $0x0, (%rbx)
jmp 0x1d08
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x6a7(%rip), %rdi       # 0x23da
leaq 0x67c(%rip), %rsi       # 0x23b6
leaq 0x6ac(%rip), %rcx       # 0x23ed
movl $0xf8, %edx
callq 0x1080