// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_macroblock_encode(x264_t*, x264_macroblock_t*)
void x264_macroblock_encode(x264_t *h, x264_macroblock_t *mb) {LOG_CALL;
    x264_mb_context_t *ctx = mb->context;
    int i;

    int i_qscale;

    /* quantification scale */
    i_qscale = mb->i_qp;

    if (mb->i_type == I_16x16)
    {
        /* do the right prediction */
        h->predict_16x16[mb->i_intra16x16_pred_mode](ctx->p_fdec[0], ctx->i_fdec[0]);

        /* encode the 16x16 macroblock */
        x264_mb_encode_i16x16(h, mb, i_qscale);

        /* fix the pred mode value */
        mb->i_intra16x16_pred_mode = x264_mb_pred_mode16x16_fix[mb->i_intra16x16_pred_mode];
    } else if (mb->i_type == I_4x4)
    {
        for (i = 0; i < 16; i++)
        {
            uint8_t *p_dst_by;

            /* Do the right prediction */
            p_dst_by = ctx->p_fdec[0] + 4 * block_idx_x[i] + 4 * block_idx_y[i] * ctx->i_fdec[0];
            h->predict_4x4[mb->block[i].i_intra4x4_pred_mode](p_dst_by, ctx->i_fdec[0]);

            /* encode one 4x4 block */
            x264_mb_encode_i4x4(h, mb, i, i_qscale);

            /* fix the pred mode value */
            mb->block[i].i_intra4x4_pred_mode = x264_mb_pred_mode4x4_fix[mb->block[i].i_intra4x4_pred_mode];
        }
    } else /* Inter MB */
    {
        int16_t dct4x4[16][4][4];

        int i8x8, i4x4, idx;
        int i_decimate_mb = 0;

        /* Motion compensation */
        x264_mb_mc(h, mb);

        for (i8x8 = 0; i8x8 < 4; i8x8++)
        {
            int16_t luma[4][4];
            int i_decimate_8x8;

            /* encode one 4x4 block */
            i_decimate_8x8 = 0;
            for (i4x4 = 0; i4x4 < 4; i4x4++)
            {
                uint8_t *p_src, *p_dst;

                idx = i8x8 * 4 + i4x4;

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

                /* we calculate diff */
                h->pixf.sub4x4(luma, p_src, ctx->i_img[0], p_dst, ctx->i_fdec[0]);

                /* calculate dct coeffs */
                h->dctf.dct4x4(dct4x4[idx], luma);
                quant_4x4(dct4x4[idx], i_qscale, 0);

                scan_zigzag_4x4full(mb->block[idx].luma4x4, dct4x4[idx]);
                i_decimate_8x8 += x264_mb_decimate_score(mb->block[idx].luma4x4, 16);
            }

            /* decimate this 8x8 block */
            i_decimate_mb += i_decimate_8x8;
            if (i_decimate_8x8 < 4)
            {
                for (i4x4 = 0; i4x4 < 4; i4x4++)
                {
                    int x, y;
                    idx = i8x8 * 4 + i4x4;
                    for (i = 0; i < 16; i++)
                    {
                        mb->block[idx].luma4x4[i] = 0;
                    }
                    for (x = 0; x < 4; x++)
                    {
                        for (y = 0; y < 4; y++)
                        {
                            dct4x4[idx][x][y] = 0;
                        }
                    }
                }
            }
        }

        if (i_decimate_mb < 6)
        {
            for (i8x8 = 0; i8x8 < 4; i8x8++)
            {
                for (i4x4 = 0; i4x4 < 4; i4x4++)
                {
                    for (i = 0; i < 16; i++)
                    {
                        mb->block[i8x8 * 4 + i4x4].luma4x4[i] = 0;
                    }
                }
            }
        } else
        {
            for (i8x8 = 0; i8x8 < 4; i8x8++)
            {
                int16_t luma[4][4];
                /* TODO we could avoid it if we had decimate this 8x8 block */
                /* output samples to fdec */
                for (i4x4 = 0; i4x4 < 4; i4x4++)
                {
                    uint8_t *p_dst;

                    idx = i8x8 * 4 + i4x4;

                    x264_mb_dequant_4x4(dct4x4[idx], i_qscale);
                    h->dctf.idct4x4(luma, dct4x4[idx]);

                    /* put pixel to fdec */
                    p_dst = ctx->p_fdec[0] + 4 * block_idx_x[idx] + 4 * block_idx_y[idx] * ctx->i_fdec[0];
                    h->pixf.add4x4(p_dst, ctx->i_fdec[0], luma);
                }
            }
        }
    }

    /* encode chroma */
    i_qscale = i_chroma_qp_table[x264_clip3(i_qscale + h->pps->i_chroma_qp_index_offset, 0, 51)];
    if (IS_INTRA(mb->i_type))
    {
        /* do the right prediction */
        h->predict_8x8[mb->i_chroma_pred_mode](ctx->p_fdec[1], ctx->i_fdec[1]);
        h->predict_8x8[mb->i_chroma_pred_mode](ctx->p_fdec[2], ctx->i_fdec[2]);
    }

    /* encode the 8x8 blocks */
    x264_mb_encode_8x8(h, mb, !IS_INTRA(mb->i_type), i_qscale);

    /* fix the pred mode value */
    if (IS_INTRA(mb->i_type))
    {
        mb->i_chroma_pred_mode = x264_mb_pred_mode8x8_fix[mb->i_chroma_pred_mode];
    }

    /* Calculate the Luma/Chroma patern and non_zero_count */
    if (mb->i_type == I_16x16)
    {
        mb->i_cbp_luma = 0x00;
        for (i = 0; i < 16; i++)
        {
            mb->block[i].i_non_zero_count = array_non_zero_count(mb->block[i].residual_ac, 15);
            if (mb->block[i].i_non_zero_count > 0)
            {
                mb->i_cbp_luma = 0x0f;
            }
        }
    } else
    {
        mb->i_cbp_luma = 0x00;
        for (i = 0; i < 16; i++)
        {
            mb->block[i].i_non_zero_count = array_non_zero_count(mb->block[i].luma4x4, 16);
            if (mb->block[i].i_non_zero_count > 0)
            {
                mb->i_cbp_luma |= 1 << (i / 4);
            }
        }
    }

    /* Calculate the chroma patern */
    mb->i_cbp_chroma = 0x00;
    for (i = 0; i < 8; i++)
    {
        mb->block[16 + i].i_non_zero_count = array_non_zero_count(mb->block[16 + i].residual_ac, 15);
        if (mb->block[16 + i].i_non_zero_count > 0)
        {
            mb->i_cbp_chroma = 0x02; /* dc+ac (we can't do only ac) */
        }
    }
    if (mb->i_cbp_chroma == 0x00 &&
            (array_non_zero_count(mb->chroma_dc[0], 4) > 0 || array_non_zero_count(mb->chroma_dc[1], 4)) > 0)
    {
        mb->i_cbp_chroma = 0x01; /* dc only */
    }

    /* Check for P_SKIP
     * XXX: in the me perhaps we should take x264_mb_predict_mv_pskip into account
     *      (if multiple mv give same result)*/
    if (mb->i_type == P_L0 && mb->i_partition == D_16x16 &&
            mb->i_cbp_luma == 0x00 && mb->i_cbp_chroma == 0x00)
    {

        int i_ref;
        int mvx, mvy;
        x264_mb_partition_get(mb, 0, 0, 0, &i_ref, &mvx, &mvy);

        if (i_ref == 0)
        {
            int mvp[2];

            x264_mb_predict_mv_pskip(mb, mvp);
            if (mvp[0] == mvx && mvp[1] == mvy)
            {
                mb->i_type = P_SKIP;
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xdca6(%rip), %rdi      # 0x28eb0
leaq 0x148c3(%rip), %rsi     # 0x2fad4
leaq 0x148fb(%rip), %rdx     # 0x2fb13
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x2b0(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1b29e
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x2bc(%rcx), %rcx
movq 0x10f1d8(%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movq 0x40(%rcx), %rdi
movq -0x18(%rbp), %rcx
movl 0x58(%rcx), %esi
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x20(%rbp), %edx
callq 0x1bd00
movq -0x10(%rbp), %rax
movslq 0x2bc(%rax), %rcx
leaq 0x123f4(%rip), %rax     # 0x2d680
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2bc(%rax)
jmp 0x1b89f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x1b39b
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x1b396
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x1c(%rbp), %rdx
leaq 0x12390(%rip), %rcx     # 0x2d660
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rdx
leaq 0x12388(%rip), %rcx     # 0x2d670
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movq -0x18(%rbp), %rdx
imull 0x58(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
addq $0x324, %rcx            # imm = 0x324
movslq -0x1c(%rbp), %rdx
imulq $0x84, %rdx, %rdx
addq %rdx, %rcx
movslq (%rcx), %rcx
movq 0x10f248(%rax,%rcx,8), %rax
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl 0x58(%rcx), %esi
callq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
callq 0x1ae30
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rcx
leaq 0x12335(%rip), %rax     # 0x2d6a0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rdx
imulq $0x84, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1b2b3
jmp 0x1b89d
movl $0x0, -0x240(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8a40
movl $0x0, -0x234(%rbp)
cmpl $0x4, -0x234(%rbp)
jge 0x1b6c8
movl $0x0, -0x264(%rbp)
movl $0x0, -0x238(%rbp)
cmpl $0x4, -0x238(%rbp)
jge 0x1b596
movl -0x234(%rbp), %eax
shll $0x2, %eax
addl -0x238(%rbp), %eax
movl %eax, -0x23c(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x23c(%rbp), %rdx
leaq 0x1224b(%rip), %rcx     # 0x2d660
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x23c(%rbp), %rdx
leaq 0x12240(%rip), %rcx     # 0x2d670
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movq -0x18(%rbp), %rdx
imull 0x30(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x270(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x23c(%rbp), %rdx
leaq 0x121fe(%rip), %rcx     # 0x2d660
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x23c(%rbp), %rdx
leaq 0x121f3(%rip), %rcx     # 0x2d670
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movq -0x18(%rbp), %rdx
imull 0x58(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x278(%rbp)
movq -0x8(%rbp), %rax
movq 0x10f350(%rax), %rax
leaq -0x260(%rbp), %rdi
movq -0x270(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl 0x30(%rcx), %edx
movq -0x278(%rbp), %rcx
movq -0x18(%rbp), %r8
movl 0x58(%r8), %r8d
callq *%rax
movq -0x8(%rbp), %rax
movq 0x10f398(%rax), %rax
movslq -0x23c(%rbp), %rcx
leaq -0x230(%rbp), %rdi
shlq $0x5, %rcx
addq %rcx, %rdi
leaq -0x260(%rbp), %rsi
callq *%rax
movslq -0x23c(%rbp), %rax
leaq -0x230(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0x1afc0
movq -0x10(%rbp), %rdi
addq $0x324, %rdi            # imm = 0x324
movslq -0x23c(%rbp), %rax
imulq $0x84, %rax, %rax
addq %rax, %rdi
addq $0x44, %rdi
movslq -0x23c(%rbp), %rax
leaq -0x230(%rbp), %rsi
shlq $0x5, %rax
addq %rax, %rsi
callq 0x1b160
movq -0x10(%rbp), %rdi
addq $0x324, %rdi            # imm = 0x324
movslq -0x23c(%rbp), %rax
imulq $0x84, %rax, %rax
addq %rax, %rdi
addq $0x44, %rdi
movl $0x10, %esi
callq 0x1c020
addl -0x264(%rbp), %eax
movl %eax, -0x264(%rbp)
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x1b3dd
movl -0x264(%rbp), %eax
addl -0x240(%rbp), %eax
movl %eax, -0x240(%rbp)
cmpl $0x4, -0x264(%rbp)
jge 0x1b6b2
movl $0x0, -0x238(%rbp)
cmpl $0x4, -0x238(%rbp)
jge 0x1b6b0
movl -0x234(%rbp), %eax
shll $0x2, %eax
addl -0x238(%rbp), %eax
movl %eax, -0x23c(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x1b620
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x23c(%rbp), %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x44(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1b5e8
movl $0x0, -0x27c(%rbp)
cmpl $0x4, -0x27c(%rbp)
jge 0x1b69a
movl $0x0, -0x280(%rbp)
cmpl $0x4, -0x280(%rbp)
jge 0x1b687
movslq -0x23c(%rbp), %rcx
leaq -0x230(%rbp), %rax
shlq $0x5, %rcx
addq %rcx, %rax
movslq -0x27c(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x280(%rbp), %rcx
movw $0x0, (%rax,%rcx,2)
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
jmp 0x1b63d
jmp 0x1b689
movl -0x27c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x27c(%rbp)
jmp 0x1b62a
jmp 0x1b69c
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x1b5bf
jmp 0x1b6b2
jmp 0x1b6b4
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x1b3bc
cmpl $0x6, -0x240(%rbp)
jge 0x1b777
movl $0x0, -0x234(%rbp)
cmpl $0x4, -0x234(%rbp)
jge 0x1b772
movl $0x0, -0x238(%rbp)
cmpl $0x4, -0x238(%rbp)
jge 0x1b75c
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x1b749
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movl -0x234(%rbp), %ecx
shll $0x2, %ecx
addl -0x238(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl $0x0, 0x44(%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1b706
jmp 0x1b74b
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x1b6f6
jmp 0x1b75e
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x1b6df
jmp 0x1b89b
movl $0x0, -0x234(%rbp)
cmpl $0x4, -0x234(%rbp)
jge 0x1b899
movl $0x0, -0x238(%rbp)
cmpl $0x4, -0x238(%rbp)
jge 0x1b883
movl -0x234(%rbp), %eax
shll $0x2, %eax
addl -0x238(%rbp), %eax
movl %eax, -0x23c(%rbp)
movslq -0x23c(%rbp), %rax
leaq -0x230(%rbp), %rdi
shlq $0x5, %rax
addq %rax, %rdi
movl -0x20(%rbp), %esi
callq 0x7900
movq -0x8(%rbp), %rax
movq 0x10f3a8(%rax), %rax
leaq -0x2a0(%rbp), %rdi
movslq -0x23c(%rbp), %rcx
leaq -0x230(%rbp), %rsi
shlq $0x5, %rcx
addq %rcx, %rsi
callq *%rax
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x23c(%rbp), %rdx
leaq 0x11e4a(%rip), %rcx     # 0x2d660
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movslq -0x23c(%rbp), %rdx
leaq 0x11e3f(%rip), %rcx     # 0x2d670
movzbl (%rcx,%rdx), %ecx
shll $0x2, %ecx
movq -0x18(%rbp), %rdx
imull 0x58(%rdx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x2a8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10f368(%rax), %rax
movq -0x2a8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl 0x58(%rcx), %esi
leaq -0x2a0(%rbp), %rdx
callq *%rax
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0x1b798
jmp 0x1b885
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x1b781
jmp 0x1b89b
jmp 0x1b89d
jmp 0x1b89f
movl -0x20(%rbp), %edi
movq -0x8(%rbp), %rax
movq 0x10dae0(%rax), %rax
addl 0x103c(%rax), %edi
xorl %esi, %esi
movl $0x33, %edx
callq 0x1c130
movslq %eax, %rcx
leaq 0x11e07(%rip), %rax     # 0x2d6d0
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x1b8e3
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1b933
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x2c0(%rcx), %rcx
movq 0x10f210(%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movq 0x48(%rcx), %rdi
movq -0x18(%rbp), %rcx
movl 0x5c(%rcx), %esi
callq *%rax
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0x2c0(%rcx), %rcx
movq 0x10f210(%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movq 0x50(%rcx), %rdi
movq -0x18(%rbp), %rcx
movl 0x60(%rcx), %esi
callq *%rax
movq -0x8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x18(%rcx)
movb %al, -0x2bd(%rbp)
je 0x1b96c
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
sete %al
movb %al, -0x2bd(%rbp)
movq -0x2c8(%rbp), %rsi
movq -0x2d0(%rbp), %rdi
movb -0x2bd(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %edx
movl -0x20(%rbp), %ecx
callq 0x1c170
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x1b9a3
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1b9c2
movq -0x10(%rbp), %rax
movslq 0x2c0(%rax), %rcx
leaq 0x11deb(%rip), %rax     # 0x2d7a0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c0(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1ba74
movq -0x10(%rbp), %rax
movl $0x0, 0x2b8(%rax)
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x1ba6f
movq -0x10(%rbp), %rdi
addq $0x324, %rdi            # imm = 0x324
movslq -0x1c(%rbp), %rax
imulq $0x84, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
movl $0xf, %esi
callq 0x1c5f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rdx
imulq $0x84, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jle 0x1ba5f
movq -0x10(%rbp), %rax
movl $0xf, 0x2b8(%rax)
jmp 0x1ba61
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1b9e5
jmp 0x1bb2d
movq -0x10(%rbp), %rax
movl $0x0, 0x2b8(%rax)
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x1bb2b
movq -0x10(%rbp), %rdi
addq $0x324, %rdi            # imm = 0x324
movslq -0x1c(%rbp), %rax
imulq $0x84, %rax, %rax
addq %rax, %rdi
addq $0x44, %rdi
movl $0x10, %esi
callq 0x1c5f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rdx
imulq $0x84, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movslq -0x1c(%rbp), %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jle 0x1bb1b
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
orl 0x2b8(%rax), %ecx
movl %ecx, 0x2b8(%rax)
jmp 0x1bb1d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1ba89
jmp 0x1bb2d
movq -0x10(%rbp), %rax
movl $0x0, 0x2b4(%rax)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0x1bbda
movq -0x10(%rbp), %rdi
addq $0x324, %rdi            # imm = 0x324
movl -0x1c(%rbp), %eax
addl $0x10, %eax
cltq
imulq $0x84, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
movl $0xf, %esi
callq 0x1c5f0
movl %eax, %ecx
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movl -0x1c(%rbp), %edx
addl $0x10, %edx
movslq %edx, %rdx
imulq $0x84, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x324, %rax            # imm = 0x324
movl -0x1c(%rbp), %ecx
addl $0x10, %ecx
movslq %ecx, %rcx
imulq $0x84, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jle 0x1bbca
movq -0x10(%rbp), %rax
movl $0x2, 0x2b4(%rax)
jmp 0x1bbcc
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1bb42
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2b4(%rax)
jne 0x1bc4e
movq -0x10(%rbp), %rdi
addq $0x304, %rdi            # imm = 0x304
movl $0x4, %esi
callq 0x1c5f0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x2d1(%rbp)
jg 0x1bc30
movq -0x10(%rbp), %rdi
addq $0x304, %rdi            # imm = 0x304
addq $0x10, %rdi
movl $0x4, %esi
callq 0x1c5f0
cmpl $0x0, %eax
setne %al
movb %al, -0x2d1(%rbp)
movb -0x2d1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x1bc4e
movq -0x10(%rbp), %rax
movl $0x1, 0x2b4(%rax)
movq -0x10(%rbp), %rax
cmpl $0x3, 0x18(%rax)
jne 0x1bcf0
movq -0x10(%rbp), %rax
cmpl $0x10, 0x1c(%rax)
jne 0x1bcf0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2b8(%rax)
jne 0x1bcf0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x2b4(%rax)
jne 0x1bcf0
movq -0x10(%rbp), %rdi
xorl %ecx, %ecx
leaq -0x2ac(%rbp), %r8
leaq -0x2b0(%rbp), %r9
leaq -0x2b4(%rbp), %rax
movl %ecx, %esi
movl %ecx, %edx
movq %rax, (%rsp)
callq 0x7ef0
cmpl $0x0, -0x2ac(%rbp)
jne 0x1bcee
movq -0x10(%rbp), %rdi
leaq -0x2bc(%rbp), %rsi
callq 0x8780
movl -0x2bc(%rbp), %eax
cmpl -0x2b0(%rbp), %eax
jne 0x1bcec
movl -0x2b8(%rbp), %eax
cmpl -0x2b4(%rbp), %eax
jne 0x1bcec
movq -0x10(%rbp), %rax
movl $0x5, 0x18(%rax)
jmp 0x1bcee
jmp 0x1bcf0
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
nopl (%rax)