// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4c8, %rsp            # imm = 0x4C8
movq %rsi, %r13
movq %rdi, -0x30(%rbp)
leaq 0xa9c3(%rip), %rdi      # 0x1b1b4
leaq 0x11170(%rip), %rsi     # 0x21968
leaq 0x111a8(%rip), %rdx     # 0x219a7
xorl %eax, %eax
callq 0x39ba
movq 0x10(%r13), %rax
movq %rax, -0x60(%rbp)
movl 0x2b0(%r13), %eax
movl %eax, -0x40(%rbp)
movl 0x18(%r13), %eax
pushq $0x2
popq %rcx
movl %ecx, -0x6c(%rbp)
cmpl $0x1, %eax
movq %r13, -0x68(%rbp)
je 0x108b9
testl %eax, %eax
jne 0x11110
leaq 0x324(%r13), %r15
xorl %ebx, %ebx
leaq 0xdc59(%rip), %r14      # 0x1e4a0
leaq 0xf092(%rip), %r13      # 0x1f8e0
movq -0x30(%rbp), %r12
cmpq $0x10, %rbx
je 0x10b26
leaq 0xdc4d(%rip), %rax      # 0x1e4b0
movzbl (%rbx,%rax), %eax
shlq $0x2, %rax
movq -0x60(%rbp), %rcx
addq 0x40(%rcx), %rax
movzbl (%rbx,%r14), %edi
shll $0x2, %edi
movslq 0x58(%rcx), %rsi
imulq %rsi, %rdi
addq %rax, %rdi
movslq (%r15), %rax
callq *0x10f248(%r12,%rax,8)
movq %r12, %rdi
movq -0x68(%rbp), %rsi
movl %ebx, %edx
movl -0x40(%rbp), %ecx
callq 0x1058e
movslq (%r15), %rax
movl (%r13,%rax,4), %eax
movl %eax, (%r15)
incq %rbx
addq $0x84, %r15
jmp 0x10852
movslq 0x2bc(%r13), %rax
movq -0x60(%rbp), %rcx
movq 0x40(%rcx), %rdi
movl 0x58(%rcx), %esi
movq -0x30(%rbp), %rbx
callq *0x10f1d8(%rbx,%rax,8)
leaq 0xa8d7(%rip), %rdi      # 0x1b1b4
leaq 0x11084(%rip), %rsi     # 0x21968
leaq 0x1141f(%rip), %rdx     # 0x21d0a
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x39ba
movq 0x10(%r13), %rax
movq 0x18(%rax), %rsi
movl 0x30(%rax), %edx
movq 0x40(%rax), %r14
movl 0x58(%rax), %r8d
leaq -0x4e0(%rbp), %r12
movq %r12, %rdi
movq %r14, %rcx
movl %r8d, -0x58(%rbp)
callq *0x10f360(%rbx)
addq $0x32c, %r13            # imm = 0x32C
leaq -0x2c0(%rbp), %rbx
cmpq $0x10, %r15
je 0x109a0
leaq 0x1(%r15), %rax
movq %rax, -0x48(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %rax
callq *0x10f398(%rax)
movzwl (%rbx), %eax
leaq 0xdb4b(%rip), %rcx      # 0x1e4a0
movzbl (%r15,%rcx), %ecx
leaq 0xdb4f(%rip), %rdx      # 0x1e4b0
movzbl (%r15,%rdx), %edx
leaq -0x2e0(%rbp,%rcx,8), %rcx
movw %ax, (%rcx,%rdx,2)
movq %rbx, %rdi
movl -0x40(%rbp), %esi
pushq $0x1
popq %rdx
callq 0x106aa
movq %r13, %rdi
movq %rbx, %rsi
callq 0x13b2f
addq $0x84, %r13
addq $0x20, %r12
addq $0x20, %rbx
movq -0x48(%rbp), %r15
jmp 0x1092d
leaq -0x2e0(%rbp), %r13
movq %r13, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3a0(%rax)
leaq 0xa7f6(%rip), %rdi      # 0x1b1b4
leaq 0x10fa3(%rip), %rsi     # 0x21968
leaq 0xb250(%rip), %rdx      # 0x1bc1c
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x39ba
movl -0x40(%rbp), %eax
cltd
pushq $0x6
popq %rcx
idivl %ecx
movl %edx, %edi
movl %eax, %esi
leal 0xf(%rsi), %ecx
pushq $0x2
popq %rax
shll %cl, %eax
pushq $0x3
popq %rcx
cltd
idivl %ecx
movslq %edi, %rcx
shlq $0x6, %rcx
leaq 0xf1a2(%rip), %rdx      # 0x1fba0
movl (%rcx,%rdx), %edx
addl $0x10, %esi
cmpq $0x4, %rbx
je 0x10a52
xorl %edi, %edi
cmpq $0x4, %rdi
je 0x10a49
movswl (%r13,%rdi,2), %ecx
movl %edx, %r8d
imull %ecx, %r8d
testl %ecx, %ecx
jle 0x10a2d
addl %eax, %r8d
movl %esi, %ecx
sarl %cl, %r8d
jmp 0x10a3e
movl %eax, %r9d
subl %r8d, %r9d
movl %esi, %ecx
sarl %cl, %r9d
negl %r9d
movl %r9d, %r8d
movw %r8w, (%r13,%rdi,2)
incq %rdi
jmp 0x10a0c
incq %rbx
addq $0x8, %r13
jmp 0x10a04
movq -0x68(%rbp), %r13
leaq 0x2c4(%r13), %rdi
leaq -0x2e0(%rbp), %rbx
movq %rbx, %rsi
callq 0x10767
movq %rbx, %rdi
movq %rbx, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3b0(%rax)
movq %rbx, %rdi
movl -0x40(%rbp), %esi
callq 0x5663
leaq -0x4e0(%rbp), %rbx
leaq -0x2c0(%rbp), %r15
xorl %r12d, %r12d
cmpq $0x10, %r12
je 0x10af7
leaq 0x1(%r12), %r13
movq %r15, %rdi
movl -0x40(%rbp), %esi
callq 0x5735
leaq 0xd9eb(%rip), %rax      # 0x1e4a0
movzbl (%r12,%rax), %eax
leaq 0xd9ef(%rip), %rcx      # 0x1e4b0
movzbl (%r12,%rcx), %ecx
leaq -0x2e0(%rbp,%rax,8), %rax
movzwl (%rax,%rcx,2), %eax
movw %ax, (%r15)
movq %rbx, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3a8(%rax)
addq $0x20, %rbx
addq $0x20, %r15
movq %r13, %r12
movq -0x68(%rbp), %r13
jmp 0x10a98
leaq -0x4e0(%rbp), %rdx
movq %r14, %rdi
movl -0x58(%rbp), %esi
movq -0x30(%rbp), %rax
callq *0x10f378(%rax)
movslq 0x2bc(%r13), %rax
leaq 0xeda4(%rip), %rcx      # 0x1f8c0
movl (%rcx,%rax,4), %eax
movl %eax, 0x2bc(%r13)
movq -0x30(%rbp), %rax
movq 0x10dae0(%rax), %rax
movl -0x40(%rbp), %edx
addl 0x103c(%rax), %edx
cmpl $0x33, %edx
pushq $0x33
popq %rax
cmovbl %edx, %eax
xorl %ecx, %ecx
testl %edx, %edx
cmovsl %ecx, %eax
leaq 0xedbf(%rip), %rcx      # 0x1f910
movl (%rcx,%rax,4), %eax
movl %eax, -0x48(%rbp)
movb $0x1, %r15b
movq -0x68(%rbp), %r13
cmpl $0x1, 0x18(%r13)
ja 0x10ba2
movslq 0x2c0(%r13), %rax
movq -0x60(%rbp), %r14
movq 0x48(%r14), %rdi
movl 0x5c(%r14), %esi
movq -0x30(%rbp), %rbx
callq *0x10f210(%rbx,%rax,8)
movslq 0x2c0(%r13), %rax
movq 0x50(%r14), %rdi
movl 0x60(%r14), %esi
callq *0x10f210(%rbx,%rax,8)
cmpl $0x2, 0x18(%r13)
setae %r15b
leaq 0xa60b(%rip), %rdi      # 0x1b1b4
leaq 0x10db8(%rip), %rsi     # 0x21968
leaq 0x11180(%rip), %rdx     # 0x21d37
xorl %eax, %eax
callq 0x39ba
movq 0x10(%r13), %rax
movq %rax, -0xb8(%rbp)
movl -0x48(%rbp), %eax
cltd
pushq $0x6
popq %rcx
idivl %ecx
movl %eax, %ebx
movl %r15d, %eax
xorb $0x1, %al
movb %al, -0x31(%rbp)
movzbl %al, %eax
movl %eax, -0x58(%rbp)
leaq 0x324(%r13), %rax
movq %rax, -0x90(%rbp)
leal 0xf(%rbx), %ecx
shll %cl, -0x6c(%rbp)
movzbl %r15b, %eax
leal (%rax,%rax,2), %eax
addl $0x3, %eax
movl %eax, -0x94(%rbp)
movslq %edx, %rax
shlq $0x6, %rax
leaq 0xef8c(%rip), %rcx      # 0x1fba0
addq %rax, %rcx
movq %rcx, -0xb0(%rbp)
addl $0x10, %ebx
leaq 0x304(%r13), %rax
movq %rax, -0xa8(%rbp)
leaq 0x32c(%r13), %r15
xorl %r14d, %r14d
movl $0x0, -0x60(%rbp)
movq %r15, -0x78(%rbp)
cmpq $0x2, %r14
je 0x10f55
leaq 0x1(%r14), %rax
movq %rax, -0x88(%rbp)
movq -0xb8(%rbp), %rax
movq 0x20(%rax,%r14,8), %rsi
movq 0x48(%rax,%r14,8), %rcx
movl 0x34(%rax,%r14,4), %edx
movl 0x5c(%rax,%r14,4), %r8d
leaq -0x2e0(%rbp), %r12
movq %r12, %rdi
movq %rcx, -0x80(%rbp)
movl %r8d, -0x98(%rbp)
movq -0x30(%rbp), %rax
callq *0x10f358(%rax)
movq %r14, -0xc0(%rbp)
leaq (,%r14,4), %rax
movq %rax, -0x40(%rbp)
leaq -0x4e0(%rbp), %r15
xorl %r13d, %r13d
cmpq $0x4, %r13
je 0x10d49
movq %r15, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %rax
callq *0x10f398(%rax)
movzwl (%r15), %eax
leaq 0xd7cb(%rip), %rcx      # 0x1e4a0
movzbl (%r13,%rcx), %ecx
leaq 0xd7ce(%rip), %rdx      # 0x1e4b0
movzbl (%r13,%rdx), %edx
leaq -0x50(%rbp,%rcx,4), %rcx
movw %ax, (%rcx,%rdx,2)
movq %r15, %rdi
movl -0x48(%rbp), %esi
movl -0x58(%rbp), %edx
callq 0x106aa
movq -0x40(%rbp), %rax
orq %r13, %rax
orq $0x10, %rax
imulq $0x84, %rax, %rax
movq -0x90(%rbp), %rcx
leaq (%rcx,%rax), %r14
addq $0x8, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x13b2f
movq %r14, %rdi
pushq $0xf
popq %rsi
callq 0x1139d
addl %eax, -0x60(%rbp)
incq %r13
addq $0x20, %r12
addq $0x20, %r15
jmp 0x10cb0
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3b8(%rax)
leaq 0xa450(%rip), %rdi      # 0x1b1b4
leaq 0x10bfd(%rip), %rsi     # 0x21968
leaq 0xae93(%rip), %rdx      # 0x1bc05
xorl %eax, %eax
callq 0x39ba
movl -0x6c(%rbp), %eax
cltd
idivl -0x94(%rbp)
movq -0xb0(%rbp), %rcx
movl (%rcx), %edx
movq %r14, %rsi
xorl %edi, %edi
movq -0x68(%rbp), %r13
movq -0x78(%rbp), %r14
cmpq $0x2, %rdi
je 0x10de6
xorl %r8d, %r8d
cmpq $0x2, %r8
je 0x10ddd
movswl (%rsi,%r8,2), %ecx
movl %edx, %r9d
imull %ecx, %r9d
testl %ecx, %ecx
jle 0x10dc2
addl %eax, %r9d
movl %ebx, %ecx
sarl %cl, %r9d
jmp 0x10dd3
movl %eax, %r10d
subl %r9d, %r10d
movl %ebx, %ecx
sarl %cl, %r10d
negl %r10d
movl %r10d, %r9d
movw %r9w, (%rsi,%r8,2)
incq %r8
jmp 0x10da2
incq %rdi
addq $0x4, %rsi
jmp 0x10d99
movq -0xc0(%rbp), %r15
shlq $0x4, %r15
leaq 0xa3bc(%rip), %rdi      # 0x1b1b4
leaq 0x10b69(%rip), %rsi     # 0x21968
leaq 0xd67e(%rip), %rdx      # 0x1e484
xorl %eax, %eax
callq 0x39ba
movswl -0x50(%rbp), %eax
movq -0xa8(%rbp), %rcx
movl %eax, (%rcx,%r15)
movswl -0x4e(%rbp), %eax
movl %eax, 0x4(%rcx,%r15)
movswl -0x4c(%rbp), %eax
movl %eax, 0x8(%rcx,%r15)
movswl -0x4a(%rbp), %eax
movl %eax, 0xc(%rcx,%r15)
cmpl $0x7, -0x60(%rbp)
setge %al
orb -0x31(%rbp), %al
jne 0x10ea7
leaq -0x4e0(%rbp), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x10ea7
movq -0x40(%rbp), %rdx
orq %rcx, %rdx
orq $0x10, %rdx
imulq $0x84, %rdx, %rdx
addq %r14, %rdx
xorl %esi, %esi
cmpq $0xf, %rsi
je 0x10e78
andl $0x0, (%rdx,%rsi,4)
incq %rsi
jmp 0x10e69
movq %rax, %rdx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x10e9e
xorl %edi, %edi
cmpq $0x4, %rdi
je 0x10e95
andw $0x0, (%rdx,%rdi,2)
incq %rdi
jmp 0x10e85
incq %rsi
addq $0x8, %rdx
jmp 0x10e7d
incq %rcx
addq $0x20, %rax
jmp 0x10e4c
leaq -0x50(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3c0(%rax)
movq %r14, %rdi
movl -0x48(%rbp), %esi
callq 0x55a0
leaq -0x4e0(%rbp), %r15
leaq -0x2e0(%rbp), %r12
xorl %r14d, %r14d
cmpq $0x4, %r14
je 0x10f2a
movq %r15, %rdi
movl -0x48(%rbp), %esi
callq 0x5735
leaq 0xd5b1(%rip), %rax      # 0x1e4a0
movzbl (%r14,%rax), %eax
leaq 0xd5b5(%rip), %rcx      # 0x1e4b0
movzbl (%r14,%rcx), %ecx
leaq -0x50(%rbp,%rax,4), %rax
movzwl (%rax,%rcx,2), %eax
movw %ax, (%r15)
movq %r12, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %rax
callq *0x10f3a8(%rax)
incq %r14
addq $0x20, %r12
addq $0x20, %r15
jmp 0x10ed7
movq -0x80(%rbp), %rdi
movl -0x98(%rbp), %esi
leaq -0x2e0(%rbp), %rdx
movq -0x30(%rbp), %rax
callq *0x10f370(%rax)
movq -0x88(%rbp), %r14
movq -0x78(%rbp), %r15
jmp 0x10c44
movl 0x18(%r13), %eax
cmpl $0x1, %eax
ja 0x10fb3
movslq 0x2c0(%r13), %rax
leaq 0xea74(%rip), %rcx      # 0x1f9e0
movl (%rcx,%rax,4), %eax
movl %eax, 0x2c0(%r13)
jne 0x10fb3
andl $0x0, 0x2b8(%r13)
pushq $0x10
popq %r14
pushq $0xf
popq %rbx
subq $0x1, %r14
jb 0x11003
movq %r15, %rdi
movl %ebx, %esi
callq 0x1145a
movl %eax, -0x4(%r15)
testl %eax, %eax
jle 0x10faa
movl $0xf, 0x2b8(%r13)
addq $0x84, %r15
jmp 0x10f87
andl $0x0, 0x2b8(%r13)
leaq 0x368(%r13), %rbx
xorl %r15d, %r15d
pushq $0x10
popq %r14
pushq $0x1
popq %r12
cmpq $0x10, %r15
je 0x11003
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1145a
movl %eax, -0x40(%rbx)
testl %eax, %eax
jle 0x10ff7
movl %r15d, %ecx
shrl $0x2, %ecx
movl %r12d, %eax
shll %cl, %eax
orl %eax, 0x2b8(%r13)
incq %r15
addq $0x84, %rbx
jmp 0x10fcd
andl $0x0, 0x2b4(%r13)
leaq 0xb6c(%r13), %rbx
pushq $0x8
popq %r15
pushq $0xf
popq %r14
subq $0x1, %r15
jb 0x11046
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1145a
movl %eax, -0x4(%rbx)
testl %eax, %eax
jle 0x1103d
movl $0x2, 0x2b4(%r13)
addq $0x84, %rbx
jmp 0x1101a
cmpl $0x0, 0x2b4(%r13)
jne 0x11081
pushq $0x4
popq %rsi
movq -0xa8(%rbp), %rdi
callq 0x1145a
testl %eax, %eax
jg 0x11076
leaq 0x314(%r13), %rdi
pushq $0x4
popq %rsi
callq 0x1145a
testl %eax, %eax
je 0x11081
movl $0x1, 0x2b4(%r13)
cmpl $0x3, 0x18(%r13)
jne 0x110fe
cmpl $0x10, 0x1c(%r13)
jne 0x110fe
cmpl $0x0, 0x2b8(%r13)
jne 0x110fe
cmpl $0x0, 0x2b4(%r13)
jne 0x110fe
leaq -0x9c(%rbp), %rax
movq %rax, (%rsp)
leaq -0x4e0(%rbp), %rbx
leaq -0x50(%rbp), %r9
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x5a03
cmpl $0x0, (%rbx)
jne 0x110fe
leaq -0x2e0(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5eca
movl (%rbx), %eax
cmpl -0x50(%rbp), %eax
jne 0x110fe
movl -0x2dc(%rbp), %eax
cmpl -0x9c(%rbp), %eax
jne 0x110fe
movl $0x5, 0x18(%r13)
addq $0x4c8, %rsp            # imm = 0x4C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x6011
leaq 0x368(%r13), %r9
movq $0x0, -0x58(%rbp)
leaq -0x2e0(%rbp), %r12
xorl %ecx, %ecx
xorl %eax, %eax
movq -0x30(%rbp), %r14
cmpq $0x4, %rcx
je 0x112a9
movq %rcx, -0x80(%rbp)
movl %eax, -0x88(%rbp)
xorl %ecx, %ecx
movq %r9, -0x90(%rbp)
movq %r9, %r13
movq %r12, -0x78(%rbp)
xorl %r15d, %r15d
cmpq $0x4, %rcx
je 0x11218
movq -0x58(%rbp), %rax
addq %rcx, %rax
movq %rcx, -0x48(%rbp)
leaq 0xd333(%rip), %rcx      # 0x1e4b0
movzbl (%rcx,%rax), %edi
shll $0x2, %edi
movq -0x60(%rbp), %r8
movq 0x18(%r8), %rcx
addq %rdi, %rcx
leaq 0xd30a(%rip), %rdx      # 0x1e4a0
movzbl (%rdx,%rax), %eax
shll $0x2, %eax
movslq 0x30(%r8), %rdx
movq %rdx, %rsi
imulq %rax, %rsi
addq %rcx, %rsi
addq 0x40(%r8), %rdi
movl 0x58(%r8), %r8d
imull %r8d, %eax
movslq %eax, %rcx
addq %rdi, %rcx
leaq -0x4e0(%rbp), %rbx
movq %rbx, %rdi
callq *0x10f350(%r14)
movq %r12, %rdi
movq %rbx, %rsi
callq *0x10f398(%r14)
movq %r12, %rdi
movl -0x40(%rbp), %esi
xorl %edx, %edx
callq 0x106aa
movq %r13, %rdi
movq %r12, %rsi
callq 0x10767
movq %r13, %rdi
pushq $0x10
popq %rsi
callq 0x1139d
movq -0x48(%rbp), %rcx
addl %eax, %r15d
incq %rcx
addq $0x20, %r12
addq $0x84, %r13
jmp 0x11161
cmpl $0x3, %r15d
movq -0x68(%rbp), %r13
movq -0x90(%rbp), %r9
movq -0x78(%rbp), %r12
jg 0x11284
movq %r12, %rax
movq %r9, %rcx
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x11284
xorl %esi, %esi
cmpq $0x10, %rsi
je 0x1124c
andl $0x0, (%rcx,%rsi,4)
incq %rsi
jmp 0x1123d
movq %rax, %rsi
xorl %edi, %edi
cmpq $0x4, %rdi
je 0x11274
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x1126b
andw $0x0, (%rsi,%r8,2)
incq %r8
jmp 0x1125a
incq %rdi
addq $0x8, %rsi
jmp 0x11251
incq %rdx
addq $0x84, %rcx
addq $0x20, %rax
jmp 0x11235
movl -0x88(%rbp), %eax
addl %r15d, %eax
movq -0x80(%rbp), %rcx
incq %rcx
subq $-0x80, %r12
addq $0x4, -0x58(%rbp)
addq $0x210, %r9             # imm = 0x210
jmp 0x1113a
cmpl $0x5, %eax
jg 0x112f4
leaq 0x368(%r13), %rax
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x10b26
movq %rax, %rdx
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x112e9
xorl %edi, %edi
cmpq $0x10, %rdi
je 0x112dd
andl $0x0, (%rdx,%rdi,4)
incq %rdi
jmp 0x112ce
incq %rsi
addq $0x84, %rdx
jmp 0x112c6
incq %rcx
addq $0x210, %rax            # imm = 0x210
jmp 0x112b7
leaq -0x2e0(%rbp), %r15
xorl %r13d, %r13d
leaq -0x4e0(%rbp), %rbx
xorl %eax, %eax
movq -0x30(%rbp), %r14
cmpq $0x4, %rax
je 0x10b26
movq %rax, -0x58(%rbp)
movq %r15, -0x48(%rbp)
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x11385
movq %r15, %rdi
movl -0x40(%rbp), %esi
callq 0x5735
movq %rbx, %rdi
movq %r15, %rsi
callq *0x10f3a8(%r14)
leaq (%r12,%r13), %rax
leaq 0xd167(%rip), %rcx      # 0x1e4b0
movzbl (%rcx,%rax), %ecx
shlq $0x2, %rcx
movq -0x60(%rbp), %rdx
addq 0x40(%rdx), %rcx
leaq 0xd140(%rip), %rsi      # 0x1e4a0
movzbl (%rsi,%rax), %edi
shll $0x2, %edi
movslq 0x58(%rdx), %rsi
imulq %rsi, %rdi
addq %rcx, %rdi
movq %rbx, %rdx
callq *0x10f368(%r14)
incq %r12
addq $0x20, %r15
jmp 0x11320
movq -0x58(%rbp), %rax
incq %rax
addq $0x4, %r13
movq -0x48(%rbp), %r15
subq $-0x80, %r15
jmp 0x1130b