// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_macroblock_write_cavlc(x264_t*, bs_s*, x264_macroblock_t*)
void x264_macroblock_write_cavlc(x264_t *h, bs_t *s, x264_macroblock_t *mb) {LOG_CALL;
    int i_mb_i_offset;
    int i;

    switch (h->sh.i_type)
    {
        case SLICE_TYPE_I:
            i_mb_i_offset = 0;
            break;
        case SLICE_TYPE_P:
            i_mb_i_offset = 5;
            break;
        case SLICE_TYPE_B:
            i_mb_i_offset = 23;
            break;
        default:
            fprintf(stderr, "internal error or slice unsupported\n");
            return;
    }

    /* Write:
      - type
      - prediction
      - mv */
    if (mb->i_type == I_PCM)
    {
        /* Untested */
        bs_write_ue(s, i_mb_i_offset + 25,"i_mb_i_offset");

        bs_align_0(s);
        /* Luma */
        for (i = 0; i < 16 * 16; i++)
        {
            bs_write(s, 8, h->picture->plane[0][mb->i_mb_y * 16 * h->picture->i_stride[0] + mb->i_mb_x * 16 + i], "h->picture->plane[0][");
        }
        /* Cb */
        for (i = 0; i < 8 * 8; i++)
        {
            bs_write(s, 8, h->picture->plane[1][mb->i_mb_y * 8 * h->picture->i_stride[1] + mb->i_mb_x * 8 + i], "h->picture->plane[1][");
        }
        /* Cr */
        for (i = 0; i < 8 * 8; i++)
        {
            bs_write(s, 8, h->picture->plane[2][mb->i_mb_y * 8 * h->picture->i_stride[2] + mb->i_mb_x * 8 + i], "h->picture->plane[2][");
        }

        for (i = 0; i < 16 + 8; i++)
        {
            /* special case */
            mb->block[i].i_non_zero_count = 16;
        }
        return;
    } else if (mb->i_type == I_4x4)
    {
        bs_write_ue(s, i_mb_i_offset + 0,"i_mb_i_offset");

        /* Prediction: Luma */
        for (i = 0; i < 16; i++)
        {
            int i_predicted_mode = x264_mb_predict_intra4x4_mode(h, mb, i);
            int i_mode = mb->block[i].i_intra4x4_pred_mode;

            if (i_predicted_mode == i_mode)
            {
                bs_write1(s, 1,"b_prev_intra4x4_pred_mode"); /* b_prev_intra4x4_pred_mode */
            } else
            {
                bs_write1(s, 0,"b_prev_intra4x4_pred_mode"); /* b_prev_intra4x4_pred_mode */
                if (i_mode < i_predicted_mode)
                {
                    bs_write(s, 3, i_mode, "i_mode");
                } else
                {
                    bs_write(s, 3, i_mode - 1, "i_mode");
                }
            }
        }
        /* Prediction: chroma */
        bs_write_ue(s, mb->i_chroma_pred_mode,"i_chroma_pred_mode");
    } else if (mb->i_type == I_16x16)
    {
        bs_write_ue(s, i_mb_i_offset + 1 + mb->i_intra16x16_pred_mode +
                mb->i_cbp_chroma * 4 +
                (mb->i_cbp_luma == 0 ? 0 : 12),"i_mb_i_offset");
        /* Prediction: chroma */
        bs_write_ue(s, mb->i_chroma_pred_mode,"i_chroma_pred_mode");
    } else if (mb->i_type == P_L0)
    {
        int mvp[2];

        if (mb->i_partition == D_16x16)
        {
            bs_write_ue(s, 0,"i_partition==D_16x16");

            if (h->sh.i_num_ref_idx_l0_active > 1)
            {
                 bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][0].i_ref[0],"i_num_ref_idx_l0_active");
            }
            x264_mb_predict_mv(mb, 0, 0, 0, mvp);
            bs_write_se(s, mb->partition[0][0].mv[0][0] - mvp[0],"mb->partition[0][0].mv[0][0] - mvp[0]");
            bs_write_se(s, mb->partition[0][0].mv[0][1] - mvp[1],"mb->partition[0][0].mv[0][1] - mvp[1]");
        } else if (mb->i_partition == D_16x8)
        {
            bs_write_ue(s, 1,"mb->i_partition == D_16x8");
            if (h->sh.i_num_ref_idx_l0_active > 1)
            {
                bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][0].i_ref[0],"i_num_ref_idx_l0_active");
                bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][2].i_ref[0],"i_num_ref_idx_l0_active");
            }

            x264_mb_predict_mv(mb, 0, 0, 0, mvp);
            bs_write_se(s, mb->partition[0][0].mv[0][0] - mvp[0],"mb->partition[0][0].mv[0][0] - mvp[0]");
            bs_write_se(s, mb->partition[0][0].mv[0][1] - mvp[1],"mb->partition[0][0].mv[0][1] - mvp[1]");

            x264_mb_predict_mv(mb, 0, 1, 0, mvp);
            bs_write_se(s, mb->partition[0][2].mv[0][0] - mvp[0],"mb->partition[0][2].mv[0][0] - mvp[0]");
            bs_write_se(s, mb->partition[0][2].mv[0][1] - mvp[1],"mb->partition[0][2].mv[0][1] - mvp[1]");
        } else if (mb->i_partition == D_8x16)
        {
            bs_write_ue(s, 2,"mb->i_partition == D_8x16");
            if (h->sh.i_num_ref_idx_l0_active > 1)
            {
                bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][0].i_ref[0],"i_num_ref_idx_l0_active");
                bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[2][0].i_ref[0],"i_num_ref_idx_l0_active");
            }

            x264_mb_predict_mv(mb, 0, 0, 0, mvp);
            bs_write_se(s, mb->partition[0][0].mv[0][0] - mvp[0],"mb->partition[0][0].mv[0][0] - mvp[0]");
            bs_write_se(s, mb->partition[0][0].mv[0][1] - mvp[1],"mb->partition[0][0].mv[0][1] - mvp[1]");

            x264_mb_predict_mv(mb, 0, 1, 0, mvp);
            bs_write_se(s, mb->partition[2][0].mv[0][0] - mvp[0],"mb->partition[2][0].mv[0][0] - mvp[0]");
            bs_write_se(s, mb->partition[2][0].mv[0][1] - mvp[1]," mb->partition[2][0].mv[0][1] - mvp[1]");
        }
    } else if (mb->i_type == P_8x8)
    {
        int b_sub_ref0;

        if (mb->partition[0][0].i_ref[0] == 0 &&
                mb->partition[0][2].i_ref[0] == 0 &&
                mb->partition[2][0].i_ref[0] == 0 &&
                mb->partition[2][2].i_ref[0] == 0)
        {
            bs_write_ue(s, 4, "partition");
            b_sub_ref0 = 0;
        } else
        {
            bs_write_ue(s, 3, "partition");
            b_sub_ref0 = 1;
        }
        /* sub mb type */
        for (i = 0; i < 4; i++)
        {
            switch (mb->i_sub_partition[i])
            {
                case D_L0_8x8:
                    bs_write_ue(s, 0,"D_L0_8x8");
                    break;
                case D_L0_8x4:
                    bs_write_ue(s, 1,"D_L0_8x4");
                    break;
                case D_L0_4x8:
                    bs_write_ue(s, 2,"D_L0_4x8");
                    break;
                case D_L0_4x4:
                    bs_write_ue(s, 3,"D_L0_4x4");
                    break;
            }
        }
        /* ref0 */
        if (h->sh.i_num_ref_idx_l0_active > 1 && b_sub_ref0)
        {
            bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][0].i_ref[0],"i_num_ref_idx_l0_active");
            bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[2][0].i_ref[0],"i_num_ref_idx_l0_active");
            bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[0][2].i_ref[0],"i_num_ref_idx_l0_active");
            bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, mb->partition[2][2].i_ref[0],"i_num_ref_idx_l0_active");
        }
        for (i = 0; i < 4; i++)
        {
            int i_part;
            for (i_part = 0; i_part < x264_mb_partition_count_table[mb->i_sub_partition[i]]; i_part++)
            {
                int mvx, mvy;
                int mvp[2];

                x264_mb_partition_get(mb, 0, i, i_part, NULL, &mvx, &mvy);
                x264_mb_predict_mv(mb, 0, i, i_part, mvp);

                bs_write_se(s, mvx - mvp[0],"mvy - mvp[0]");
                bs_write_se(s, mvy - mvp[1],"mvy - mvp[1]");
            }
        }
    } else if (mb->i_type == B_8x8)
    {
        fprintf(stderr, "invalid/unhandled mb_type (B_8x8)\n");
        return;
    } else if (mb->i_type != B_DIRECT)
    {
        /* All B mode */
        /* Motion Vector */
        int i_part = x264_mb_partition_count_table[mb->i_partition];
        int i_ref;
        int mvx, mvy;
        int mvp[2];

        int b_list0[2];
        int b_list1[2];

        /* init ref list utilisations */
        for (i = 0; i < 2; i++)
        {
            b_list0[i] = x264_mb_type_list0_table[mb->i_type][i];
            b_list1[i] = x264_mb_type_list1_table[mb->i_type][i];
        }


        if (mb->i_partition == D_16x16)
        {
            if (b_list0[0] && b_list1[0])
            {
                bs_write_ue(s, 3,"D_16x16 b_list0[0] && b_list1[0])");
            } else if (b_list1[0])
            {
                bs_write_ue(s, 2,"D_16x16 b_list1[0])");
            } else
            {
                bs_write_ue(s, 1,"D_16x16 not b_list0[0] && not b_list1[0])");
            }
        } else
        {
            if (mb->i_type == B_BI_BI)
            {
                bs_write_ue(s, 20 + (mb->i_partition == D_16x8 ? 0 : 1),"B_BI_BI");
            } else if (b_list0[0] && b_list1[0])
            {
                /* B_BI_LX* */
                bs_write_ue(s, 16 + (b_list0[1] ? 0 : 2) + (mb->i_partition == D_16x8 ? 0 : 1),"B_BI_LX");
            } else if (b_list0[1] && b_list1[1])
            {
                /* B_LX_BI */
                bs_write_ue(s, 12 + (b_list0[1] ? 0 : 2) + (mb->i_partition == D_16x8 ? 0 : 1),"B_LX_BI");
            } else if (b_list1[1])
            {
                /* B_LX_L1 */
                bs_write_ue(s, 6 + (b_list0[0] ? 2 : 0) + (mb->i_partition == D_16x8 ? 0 : 1),"B_LX_L1");
            } else if (b_list0[1])
            {
                /* B_LX_L0 */
                bs_write_ue(s, 4 + (b_list0[0] ? 0 : 6) + (mb->i_partition == D_16x8 ? 0 : 1),"B_LX_L0");
            }
        }

        if (h->sh.i_num_ref_idx_l0_active > 1)
        {
            for (i = 0; i < i_part; i++)
            {
                if (b_list0[i])
                {
                    x264_mb_partition_get(mb, 0, i, 0, &i_ref, NULL, NULL);
                    bs_write_te(s, h->sh.i_num_ref_idx_l0_active - 1, i_ref,"i_num_ref_idx_l0_active");
                }
            }
        }
        if (h->sh.i_num_ref_idx_l1_active > 1)
        {
            for (i = 0; i < i_part; i++)
            {
                if (b_list1[i])
                {
                    x264_mb_partition_get(mb, 1, i, 0, &i_ref, NULL, NULL);
                    bs_write_te(s, h->sh.i_num_ref_idx_l1_active - 1, i_ref,"i_num_ref_idx_l1_active");
                }
            }
        }

        for (i = 0; i < i_part; i++)
        {
            if (b_list0[i])
            {
                x264_mb_partition_get(mb, 0, i, 0, NULL, &mvx, &mvy);
                x264_mb_predict_mv(mb, 0, i, 0, mvp);

                bs_write_se(s, mvx - mvp[0],"mvy - mvp[0]");
                bs_write_se(s, mvy - mvp[1],"mvy - mvp[1]");
            }
        }
        for (i = 0; i < i_part; i++)
        {
            if (b_list1[i])
            {
                x264_mb_partition_get(mb, 1, i, 0, NULL, &mvx, &mvy);
                x264_mb_predict_mv(mb, 1, i, 0, mvp);

                bs_write_se(s, mvx - mvp[0],"mvy - mvp[0]");
                bs_write_se(s, mvy - mvp[1],"mvy - mvp[1]");
            }
        }
    } else if (mb->i_type == B_DIRECT)
    {
        bs_write_ue(s, 0,"B_DIRECT");
    } else
    {
        fprintf(stderr, "invalid/unhandled mb_type\n");
        return;
    }

    /* Coded block patern */
    if (mb->i_type == I_4x4)
    {
        bs_write_ue(s, intra4x4_cbp_to_golomb[(mb->i_cbp_chroma << 4) | mb->i_cbp_luma],"intra4x4_cbp_to_golomb");
    } else if (mb->i_type != I_16x16)
    {
        bs_write_ue(s, inter_cbp_to_golomb[(mb->i_cbp_chroma << 4) | mb->i_cbp_luma],"inter_cbp_to_golomb");
    }

    /* write residual */
    if (mb->i_type == I_16x16)
    {
        if (mb->i_mb_x > 0 || mb->i_mb_y > 0)
            bs_write_se(s, mb->i_qp - (mb - 1)->i_qp, "i_qp" );
        else
            bs_write_se(s, mb->i_qp - h->pps->i_pic_init_qp - h->sh.i_qp_delta,"i_qp");

        /* DC Luma */
        block_residual_write_cavlc(h, s, mb, BLOCK_INDEX_LUMA_DC, mb->luma16x16_dc, 16);

        if (mb->i_cbp_luma != 0)
        {
            /* AC Luma */
            for (i = 0; i < 16; i++)
            {
                block_residual_write_cavlc(h, s, mb, i, mb->block[i].residual_ac, 15);
            }
        }
    } else if (mb->i_cbp_luma != 0 || mb->i_cbp_chroma != 0)
    {
        bs_write_se(s, mb->i_qp - h->pps->i_pic_init_qp - h->sh.i_qp_delta, "i_qp");

        for (i = 0; i < 16; i++)
        {
            if (mb->i_cbp_luma & (1 << (i / 4)))
            {
                block_residual_write_cavlc(h, s, mb, i, mb->block[i].luma4x4, 16);
            }
        }
    }
    if (mb->i_cbp_chroma != 0)
    {
        /* Chroma DC residual present */
        block_residual_write_cavlc(h, s, mb, BLOCK_INDEX_CHROMA_DC, mb->chroma_dc[0], 4);
        block_residual_write_cavlc(h, s, mb, BLOCK_INDEX_CHROMA_DC, mb->chroma_dc[1], 4);
        if (mb->i_cbp_chroma & 0x02) /* Chroma AC residual present */
        {
            for (i = 0; i < 8; i++)
            {
                block_residual_write_cavlc(h, s, mb, 16 + i, mb->block[16 + i].residual_ac, 15);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, %r13
leaq 0xd816(%rip), %rdi      # 0x251b4
leaq 0x14073(%rip), %rsi     # 0x2ba18
leaq 0x140c2(%rip), %rdx     # 0x2ba6e
xorl %eax, %eax
callq 0x4c22
movl 0x10db00(%r13), %eax
cmpq $0x3, %rax
jae 0x184af
movl 0x18(%r15), %ecx
cmpq $0x10, %rcx
movq %r15, -0x48(%rbp)
ja 0x183ba
leaq 0x146b3(%rip), %rdx     # 0x2c090
movl (%rdx,%rax,4), %esi
leaq 0x11ee9(%rip), %rax     # 0x298d0
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
movq %r13, -0x40(%rbp)
leaq 0x1408f(%rip), %rdx     # 0x2ba8a
movq -0x30(%rbp), %rdi
callq 0x18cd9
leaq 0x324(%r15), %r14
xorl %r12d, %r12d
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x6753
movl %eax, %ebx
movq %r12, %rax
shlq $0x7, %rax
leaq (%rax,%r12,4), %rax
movl (%r14,%rax), %r13d
leaq 0x11a27(%rip), %rdi     # 0x2945c
movl $0x1, %esi
cmpl %r13d, %ebx
jne 0x17a8f
movl $0x1, %edx
leaq 0x1408f(%rip), %rcx     # 0x2bada
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x17be0
movl 0x18(%rsi), %ecx
decl %ecx
movl $0x1, %edx
shll %cl, %edx
movl %ecx, 0x18(%rsi)
orb %dl, (%rax)
cmpl $0x0, 0x18(%rsi)
jne 0x17be0
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
jmp 0x17be0
xorl %edx, %edx
leaq 0x14042(%rip), %rcx     # 0x2bada
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x17ad1
movl 0x18(%rsi), %ecx
decl %ecx
movl %ecx, 0x18(%rsi)
movl $0x1, %edx
shll %cl, %edx
notb %dl
andb %dl, (%rax)
cmpl $0x0, 0x18(%rsi)
jne 0x17ad1
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
cmpl %ebx, %r13d
jge 0x17b60
leaq 0x119b7(%rip), %rdi     # 0x29498
movl $0x3, %esi
movl %r13d, %edx
leaq 0x10857(%rip), %rcx     # 0x28347
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x17be0
movb 0x18(%r9), %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, %r13d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x17b54
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x17b00
jmp 0x17be0
decl %r13d
leaq 0x1192e(%rip), %rdi     # 0x29498
movl $0x3, %esi
movl %r13d, %edx
leaq 0x107ce(%rip), %rcx     # 0x28347
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x17be0
movb 0x18(%r9), %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, %r13d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x17bd9
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x17b89
incq %r12
cmpq $0x10, %r12
jne 0x17a0e
movl 0x2c0(%r15), %esi
leaq 0x10753(%rip), %rdx     # 0x2834e
movq -0x30(%rbp), %rdi
jmp 0x17f52
addl $0x19, %esi
leaq 0x13e7c(%rip), %rdx     # 0x2ba8a
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x18cd9
leaq 0xd593(%rip), %rdi      # 0x251b4
leaq 0x114b4(%rip), %rsi     # 0x290dc
leaq 0xd58c(%rip), %rdx      # 0x251bb
xorl %eax, %eax
callq 0x4c22
movl 0x18(%rbx), %eax
cmpl $0x8, %eax
je 0x17c77
testl %eax, %eax
jle 0x17c77
incl %eax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jae 0x17c77
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
decl 0x18(%rbx)
jne 0x17c70
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
decl %eax
cmpl $0x1, %eax
jg 0x17c44
leaq 0x13e1a(%rip), %r12     # 0x2ba98
xorl %r14d, %r14d
movq 0x10ee48(%r13), %rax
movq 0x20(%rax), %rcx
movl 0xc(%rax), %eax
imull 0x4(%r15), %eax
addl (%r15), %eax
shll $0x4, %eax
addl %r14d, %eax
cltq
movzbl (%rcx,%rax), %ebx
leaq 0x117ee(%rip), %rdi     # 0x29498
movl $0x8, %esi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x17d1a
movb 0x18(%r9), %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, %ebx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x17d13
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x17cc4
incl %r14d
cmpl $0x100, %r14d           # imm = 0x100
jne 0x17c81
leaq 0x13d7d(%rip), %r12     # 0x2baae
xorl %r14d, %r14d
movq 0x10ee48(%r13), %rax
movl 0x10(%rax), %ecx
imull 0x4(%r15), %ecx
addl (%r15), %ecx
movq 0x28(%rax), %rax
leal (%r14,%rcx,8), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ebx
leaq 0x1173c(%rip), %rdi     # 0x29498
movl $0x8, %esi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x17dcc
movb 0x18(%r9), %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, %ebx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x17dc5
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x17d76
incl %r14d
cmpl $0x40, %r14d
jne 0x17d34
leaq 0x13ce4(%rip), %r12     # 0x2bac4
xorl %r14d, %r14d
movq 0x10ee48(%r13), %rax
movl 0x14(%rax), %ecx
imull 0x4(%r15), %ecx
addl (%r15), %ecx
movq 0x30(%rax), %rax
leal (%r14,%rcx,8), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %ebx
leaq 0x1168d(%rip), %rdi     # 0x29498
movl $0x8, %esi
movl %ebx, %edx
movq %r12, %rcx
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x17e7b
movb 0x18(%r9), %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, %ebx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x17e74
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x17e25
incl %r14d
cmpl $0x40, %r14d
jne 0x17de3
movl $0x328, %eax            # imm = 0x328
movl $0x10, (%r15,%rax)
addq $0x84, %rax
cmpq $0xf88, %rax            # imm = 0xF88
jne 0x17e8d
jmp 0x18c8c
movq %r13, -0x40(%rbp)
leaq 0x115cb(%rip), %rdi     # 0x2947e
leaq 0x13e51(%rip), %rdx     # 0x2bd0b
xorl %esi, %esi
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
cmpq 0x10(%rcx), %rax
jae 0x18a7a
movq -0x30(%rbp), %rsi
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x18a7a
movq -0x30(%rbp), %rax
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
jmp 0x18a7a
movq %r13, -0x40(%rbp)
addl 0x2bc(%r15), %esi
movl 0x2b4(%r15), %eax
movl 0x2b8(%r15), %ecx
leal (%rsi,%rax,4), %eax
testl %ecx, %ecx
movl $0xc, %edx
cmovel %ecx, %edx
leal 0x1(%rdx,%rax), %esi
leaq 0x13b55(%rip), %rdx     # 0x2ba8a
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x18cd9
movl 0x2c0(%r15), %esi
leaq 0x103ff(%rip), %rdx     # 0x2834e
movq %rbx, %rdi
callq 0x18cd9
jmp 0x18a7a
movl 0x1c(%r15), %eax
cmpl $0xe, %eax
je 0x185f5
cmpl $0xf, %eax
je 0x184b9
cmpl $0x10, %eax
jne 0x18733
leaq 0x114fc(%rip), %rdi     # 0x2947e
leaq 0x13b6b(%rip), %rdx     # 0x2baf4
xorl %esi, %esi
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x17fbe
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x17fbe
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
movq -0x48(%rbp), %r14
jl 0x17fe4
decl %esi
movl 0x30(%r14), %edx
leaq 0xfa9b(%rip), %rcx      # 0x27a76
movq -0x30(%rbp), %rdi
callq 0x18dc2
leaq -0x38(%rbp), %rbx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6de8
movl 0x38(%r14), %esi
subl (%rbx), %esi
leaq 0x13b03(%rip), %rdx     # 0x2bb09
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x18f0e
leaq 0x3c(%r14), %rax
leaq 0x13b12(%rip), %rdx     # 0x2bb2f
jmp 0x18726
cmpl $0x0, 0x30(%r15)
movq %r13, -0x40(%rbp)
jne 0x1804f
cmpl $0x0, 0x80(%r15)
jne 0x1804f
cmpl $0x0, 0x170(%r15)
jne 0x1804f
cmpl $0x0, 0x1c0(%r15)
je 0x18cbd
leaq 0x11428(%rip), %rdi     # 0x2947e
leaq 0x13f46(%rip), %rdx     # 0x2bfa3
movl $0x3, %esi
xorl %eax, %eax
callq 0x4c22
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
movb $0x1, %bl
cmpq 0x10(%r8), %rdx
jae 0x180c1
movb 0x18(%r8), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
movb (%rdx), %cl
movl %esi, %edi
notb %dil
andb %cl, %dil
orb %sil, %cl
cmpl $0x4, %eax
movzbl %cl, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r8)
jne 0x180ba
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18072
leaq 0x1184c(%rip), %r14     # 0x29914
leaq 0x113af(%rip), %r12     # 0x2947e
leaq 0x13b4c(%rip), %r13     # 0x2bc22
xorl %r15d, %r15d
movq -0x48(%rbp), %rax
movl 0x20(%rax,%r15,4), %eax
cmpq $0x3, %rax
ja 0x18292
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq %r12, %rdi
movl $0x3, %esi
leaq 0x13b39(%rip), %rdx     # 0x2bc3d
xorl %eax, %eax
callq 0x4c22
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x18292
movb 0x18(%r8), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
movb (%rdx), %cl
movl %esi, %edi
notb %dil
andb %cl, %dil
orb %sil, %cl
cmpl $0x4, %eax
movzbl %cl, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r8)
jne 0x1815e
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18114
jmp 0x18292
movq %r12, %rdi
movl $0x2, %esi
leaq 0x13abb(%rip), %rdx     # 0x2bc34
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18292
movb 0x18(%r9), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
cmpl $0x2, %ecx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x181d9
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18189
jmp 0x18292
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4c22
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18292
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x18292
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
jmp 0x18292
movq %r12, %rdi
movl $0x1, %esi
leaq 0x139f6(%rip), %rdx     # 0x2bc2b
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x18292
movb 0x18(%r8), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
movb (%rdx), %cl
movl %esi, %edi
notb %dil
andb %cl, %dil
orb %sil, %cl
cmpl $0x3, %eax
movzbl %cl, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r8)
jne 0x1828b
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18245
incq %r15
cmpq $0x4, %r15
jne 0x180d9
movq -0x40(%rbp), %r12
movl 0x10db38(%r12), %esi
cmpl $0x2, %esi
setl %al
xorb $0x1, %bl
orb %al, %bl
jne 0x1832c
decl %esi
movq -0x48(%rbp), %r14
movl 0x30(%r14), %edx
leaq 0xf7ad(%rip), %rbx      # 0x27a76
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rcx
callq 0x18dc2
movl 0x10db38(%r12), %esi
decl %esi
movl 0x170(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x18dc2
movl 0x10db38(%r12), %esi
decl %esi
movl 0x80(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x18dc2
movl 0x10db38(%r12), %esi
decl %esi
movl 0x1c0(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x18dc2
xorl %r12d, %r12d
leaq -0x50(%rbp), %r15
movq -0x48(%rbp), %r14
movq -0x30(%rbp), %rbx
xorl %r13d, %r13d
movq %r15, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
leaq -0x58(%rbp), %r9
callq 0x6ca8
movq %r14, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r13d, %ecx
leaq -0x38(%rbp), %r8
callq 0x6de8
movl -0x58(%rbp), %esi
subl -0x38(%rbp), %esi
movq %rbx, %rdi
leaq 0x138c9(%rip), %rdx     # 0x2bc46
callq 0x18f0e
movl -0x50(%rbp), %esi
subl -0x34(%rbp), %esi
movq %rbx, %rdi
leaq 0x138c1(%rip), %rdx     # 0x2bc53
callq 0x18f0e
leaq 0x11712(%rip), %rcx     # 0x29ab0
incl %r13d
movslq 0x20(%r14,%r12,4), %rax
cmpl (%rcx,%rax,4), %r13d
jl 0x1833e
incq %r12
cmpq $0x4, %r12
jne 0x1833b
jmp 0x18a7a
movslq %ecx, %rdx
movslq 0x1c(%r15), %rax
leaq 0x116e8(%rip), %rsi     # 0x29ab0
movl (%rsi,%rax,4), %esi
movq %rsi, -0x70(%rbp)
leaq 0x1172a(%rip), %rsi     # 0x29b00
movq (%rsi,%rdx,8), %rsi
movq %rsi, -0x58(%rbp)
leaq 0x117ab(%rip), %rsi     # 0x29b90
movq (%rsi,%rdx,8), %rdx
movq %rdx, -0x50(%rbp)
cmpq $0x10, %rax
jne 0x1848a
cmpl $0x0, -0x58(%rbp)
setne %cl
movl -0x50(%rbp), %eax
testl %eax, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1873c
leaq 0x11066(%rip), %rdi     # 0x2947e
leaq 0x13864(%rip), %rdx     # 0x2bc83
movl $0x3, %esi
xorl %eax, %eax
callq 0x4c22
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x1888d
movb 0x18(%r8), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
movb (%rdx), %cl
movl %esi, %edi
notb %dil
andb %cl, %dil
orb %sil, %cl
cmpl $0x4, %eax
movzbl %cl, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r8)
jne 0x1847e
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18434
jmp 0x1888d
cmpl $0xf, %ecx
jne 0x187c3
xorl %esi, %esi
cmpl $0xe, %eax
sete %sil
xorl $0x15, %esi
leaq 0x1383d(%rip), %rdx     # 0x2bce3
movq -0x30(%rbp), %rdi
jmp 0x18888
callq 0x2f7c
jmp 0x18c8c
leaq 0x10fbe(%rip), %rdi     # 0x2947e
leaq 0x136f4(%rip), %rdx     # 0x2bbbb
movl $0x2, %esi
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x1852f
movb 0x18(%r9), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
cmpl $0x2, %ecx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x18528
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x184dc
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
jl 0x18572
decl %esi
movl 0x30(%r15), %edx
leaq 0xf52e(%rip), %rbx      # 0x27a76
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x18dc2
movl 0x10db38(%r13), %esi
decl %esi
movl 0x170(%r15), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x18dc2
leaq -0x38(%rbp), %rbx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6de8
movl 0x38(%r15), %esi
subl (%rbx), %esi
leaq 0x13575(%rip), %rdx     # 0x2bb09
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x18f0e
movl 0x3c(%r15), %esi
subl 0x4(%rbx), %esi
leaq 0x13581(%rip), %rdx     # 0x2bb2f
movq %r12, %rdi
callq 0x18f0e
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6de8
movl 0x178(%r15), %esi
subl (%rbx), %esi
leaq 0x135fb(%rip), %rdx     # 0x2bbd5
movq %r12, %rdi
callq 0x18f0e
leaq 0x17c(%r15), %rax
leaq 0x1360b(%rip), %rdx     # 0x2bbfb
jmp 0x18726
leaq 0x10e82(%rip), %rdi     # 0x2947e
leaq 0x13552(%rip), %rdx     # 0x2bb55
movl $0x1, %esi
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x18665
movb 0x18(%r8), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
movb (%rdx), %cl
movl %esi, %edi
notb %dil
andb %cl, %dil
orb %sil, %cl
cmpl $0x3, %eax
movzbl %cl, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r8)
jne 0x1865e
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18618
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
jl 0x186a8
decl %esi
movl 0x30(%r15), %edx
leaq 0xf3f8(%rip), %rbx      # 0x27a76
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x18dc2
movl 0x10db38(%r13), %esi
decl %esi
movl 0x80(%r15), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x18dc2
leaq -0x38(%rbp), %rbx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6de8
movl 0x38(%r15), %esi
subl (%rbx), %esi
leaq 0x1343f(%rip), %rdx     # 0x2bb09
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x18f0e
movl 0x3c(%r15), %esi
subl 0x4(%rbx), %esi
leaq 0x1344b(%rip), %rdx     # 0x2bb2f
movq %r12, %rdi
callq 0x18f0e
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6de8
movl 0x88(%r15), %esi
subl (%rbx), %esi
leaq 0x1345f(%rip), %rdx     # 0x2bb6f
movq %r12, %rdi
callq 0x18f0e
leaq 0x8c(%r15), %rax
leaq 0x1346f(%rip), %rdx     # 0x2bb95
movl (%rax), %esi
subl -0x34(%rbp), %esi
movq %r12, %rdi
callq 0x18f0e
movq %r13, -0x40(%rbp)
jmp 0x18a7a
testl %eax, %eax
je 0x18825
leaq 0x10d33(%rip), %rdi     # 0x2947e
leaq 0x13553(%rip), %rdx     # 0x2bca5
movl $0x2, %esi
xorl %eax, %eax
callq 0x4c22
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x1888d
movb 0x18(%r9), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
cmpl $0x2, %ecx
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x187b7
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18767
jmp 0x1888d
movl -0x58(%rbp), %ecx
movl -0x54(%rbp), %edx
testl %ecx, %ecx
movq -0x30(%rbp), %rdi
je 0x187f8
cmpl $0x0, -0x50(%rbp)
je 0x187f8
xorl %ecx, %ecx
testl %edx, %edx
sete %cl
xorl %edx, %edx
cmpl $0xe, %eax
setne %dl
leal (%rdx,%rcx,2), %esi
addl $0x10, %esi
leaq 0x134f8(%rip), %rdx     # 0x2bceb
jmp 0x18888
testl %edx, %edx
setne %r9b
movl -0x4c(%rbp), %esi
testl %esi, %esi
setne %r8b
andb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x18837
xorl %esi, %esi
cmpl $0xe, %eax
sete %sil
xorl $0xd, %esi
leaq 0x134d0(%rip), %rdx     # 0x2bcf3
jmp 0x18888
leaq 0x1348d(%rip), %rdx     # 0x2bcb9
movq -0x30(%rbp), %rdi
movl $0x1, %esi
jmp 0x18888
testl %esi, %esi
je 0x18863
xorl %edx, %edx
testl %ecx, %ecx
setne %dl
xorl %ecx, %ecx
cmpl $0xe, %eax
setne %cl
leal (%rcx,%rdx,2), %esi
addl $0x6, %esi
leaq 0x134a4(%rip), %rdx     # 0x2bcfb
jmp 0x18888
callq 0x2fab
jmp 0x18c8c
testl %edx, %edx
je 0x1888d
testl %ecx, %ecx
movl $0x4, %ecx
movl $0xa, %edx
cmovnel %ecx, %edx
xorl %esi, %esi
cmpl $0xe, %eax
setne %sil
orl %edx, %esi
leaq 0x1347b(%rip), %rdx     # 0x2bd03
callq 0x18cd9
cmpl $0x2, 0x10db38(%r13)
jl 0x188f9
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
xorl %ebx, %ebx
leaq -0x60(%rbp), %r14
leaq 0xf1c1(%rip), %r15      # 0x27a76
cmpl $0x0, -0x58(%rbp,%rbx,4)
je 0x188f1
movq $0x0, (%rsp)
movq -0x48(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x6ca8
movl 0x10db38(%r13), %esi
decl %esi
movl -0x60(%rbp), %edx
movq -0x30(%rbp), %rdi
movq %r15, %rcx
callq 0x18dc2
incq %rbx
cmpq %rbx, %r12
jne 0x188b5
cmpl $0x2, 0x10db3c(%r13)
jl 0x18968
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
xorl %ebx, %ebx
leaq -0x60(%rbp), %r14
leaq 0xf16d(%rip), %r15      # 0x27a8e
cmpl $0x0, -0x50(%rbp,%rbx,4)
je 0x18960
movq $0x0, (%rsp)
movq -0x48(%rbp), %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x6ca8
movl 0x10db3c(%r13), %esi
decl %esi
movl -0x60(%rbp), %edx
movq -0x30(%rbp), %rdi
movq %r15, %rcx
callq 0x18dc2
incq %rbx
cmpq %rbx, %r12
jne 0x18921
movq %r13, -0x40(%rbp)
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r15d
cmovgel %eax, %r15d
xorl %ebx, %ebx
leaq -0x64(%rbp), %r14
leaq 0x132c9(%rip), %r13     # 0x2bc53
cmpl $0x0, -0x58(%rbp,%rbx,4)
je 0x189ea
movq %r14, (%rsp)
movq -0x48(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x5c(%rbp), %r9
callq 0x6ca8
movq %r12, %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
leaq -0x38(%rbp), %r8
callq 0x6de8
movl -0x5c(%rbp), %esi
subl -0x38(%rbp), %esi
movq -0x30(%rbp), %r12
movq %r12, %rdi
leaq 0x13272(%rip), %rdx     # 0x2bc46
callq 0x18f0e
movl -0x64(%rbp), %esi
subl -0x34(%rbp), %esi
movq %r12, %rdi
movq %r13, %rdx
callq 0x18f0e
incq %rbx
cmpq %rbx, %r15
jne 0x1898a
movq -0x70(%rbp), %r12
cmpl $0x2, %r12d
movl $0x1, %eax
cmovll %eax, %r12d
xorl %ebx, %ebx
leaq 0x13247(%rip), %r13     # 0x2bc53
cmpl $0x0, -0x50(%rbp,%rbx,4)
je 0x18a72
movq %r14, (%rsp)
movq -0x48(%rbp), %r15
movq %r15, %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x5c(%rbp), %r9
callq 0x6ca8
movq %r15, %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
leaq -0x38(%rbp), %r8
callq 0x6de8
movl -0x5c(%rbp), %esi
subl -0x38(%rbp), %esi
movq -0x30(%rbp), %r15
movq %r15, %rdi
leaq 0x131ea(%rip), %rdx     # 0x2bc46
callq 0x18f0e
movl -0x64(%rbp), %esi
subl -0x34(%rbp), %esi
movq %r15, %rdi
movq %r13, %rdx
callq 0x18f0e
incq %rbx
cmpq %rbx, %r12
jne 0x18a0c
movq -0x48(%rbp), %r15
movl 0x18(%r15), %eax
testl %eax, %eax
je 0x18a9f
cmpl $0x1, %eax
movq -0x40(%rbp), %r13
je 0x18ad2
leaq 0x13295(%rip), %rdx     # 0x2bd2b
leaq 0x11183(%rip), %rax     # 0x29c20
jmp 0x18ab1
leaq 0x1326e(%rip), %rdx     # 0x2bd14
leaq 0x135b3(%rip), %rax     # 0x2c060
movq -0x40(%rbp), %r13
movl 0x2b4(%r15), %ecx
shll $0x4, %ecx
orl 0x2b8(%r15), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %esi
movq -0x30(%rbp), %rdi
callq 0x18cd9
cmpl $0x1, 0x18(%r15)
jne 0x18b77
cmpl $0x0, (%r15)
jg 0x18aee
cmpl $0x0, 0x4(%r15)
jle 0x18c9b
movl 0x2b0(%r15), %esi
subl -0xcd8(%r15), %esi
movq -0x30(%rbp), %rbx
leaq 0xf8a2(%rip), %rdx      # 0x283a9
movq %rbx, %rdi
callq 0x18f0e
leaq 0x2c4(%r15), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movl $0x10, %r9d
callq 0x18ffe
cmpl $0x0, 0x2b8(%r15)
je 0x18bff
leaq 0x32c(%r15), %rbx
xorl %r14d, %r14d
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
movl %r14d, %ecx
movq %rbx, %r8
movl $0xf, %r9d
callq 0x18ffe
incq %r14
addq $0x84, %rbx
cmpq $0x10, %r14
jne 0x18b47
jmp 0x18bff
cmpl $0x0, 0x2b8(%r15)
jne 0x18b8b
cmpl $0x0, 0x2b4(%r15)
je 0x18bff
movl 0x2b0(%r15), %esi
movq 0x10dae0(%r13), %rax
movl 0x1034(%rax), %eax
addl 0x10db44(%r13), %eax
subl %eax, %esi
leaq 0xf7fa(%rip), %rdx      # 0x283a9
movq -0x30(%rbp), %rdi
callq 0x18f0e
leaq 0x368(%r15), %rbx
xorl %r14d, %r14d
movl 0x2b8(%r15), %eax
movl %r14d, %ecx
shrl $0x2, %ecx
btl %ecx, %eax
jae 0x18bef
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
movl %r14d, %ecx
movq %rbx, %r8
movl $0x10, %r9d
callq 0x18ffe
incq %r14
addq $0x84, %rbx
cmpq $0x10, %r14
jne 0x18bc2
cmpl $0x0, 0x2b4(%r15)
movq -0x30(%rbp), %r12
je 0x18c8c
leaq 0x304(%r15), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x4, %r9d
callq 0x18ffe
leaq 0x314(%r15), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x4, %r9d
callq 0x18ffe
testb $0x2, 0x2b4(%r15)
je 0x18c8c
leaq 0xb6c(%r15), %rbx
movq $-0x8, %r14
leal 0x18(%r14), %ecx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %r8
movl $0xf, %r9d
callq 0x18ffe
addq $0x84, %rbx
incq %r14
jne 0x18c65
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x2b0(%r15), %esi
movq 0x10dae0(%r13), %rax
movl 0x1034(%rax), %eax
addl 0x10db44(%r13), %eax
subl %eax, %esi
jmp 0x18afc
leaq 0x132df(%rip), %rdx     # 0x2bfa3
movq -0x30(%rbp), %rdi
movl $0x4, %esi
callq 0x18cd9
xorl %ebx, %ebx
jmp 0x180c1