// File: /workspace/github_c_makefile_star2_O3/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 0xf072(%rip), %rdi      # 0x271b4
leaq 0x1561b(%rip), %rsi     # 0x2d764
leaq 0x1566a(%rip), %rdx     # 0x2d7ba
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x4a56
movl 0x10db00(%r13), %eax
cmpl $0x2, %eax
je 0x1817b
cmpl $0x1, %eax
je 0x1817f
testl %eax, %eax
jne 0x193ba
movl $0x5, %r12d
jmp 0x18185
movb $0x1, %bl
jmp 0x18187
movl $0x17, %r12d
xorl %ebx, %ebx
movl 0x18(%r15), %ecx
cmpq $0x10, %rcx
movq %r15, -0x40(%rbp)
movq %r13, -0x60(%rbp)
ja 0x18aa4
leaq 0x1352c(%rip), %rax     # 0x2b6d0
movslq (%rax,%rcx,4), %rdx
addq %rax, %rdx
jmpq *%rdx
leaq 0x130ca(%rip), %rdi     # 0x2b27e
leaq 0x1561b(%rip), %rdx     # 0x2d7d6
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
testb %bl, %bl
je 0x18b74
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18bdf
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x18bdf
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
jmp 0x18bdf
leal 0x19(%r12), %esi
leaq 0x1306c(%rip), %rdi     # 0x2b27e
leaq 0x155bd(%rip), %rdx     # 0x2d7d6
xorl %eax, %eax
callq 0x4a56
addl $0x1a, %r12d
leaq 0x13a65(%rip), %rax     # 0x2bc90
movl (%rax,%r12,4), %eax
addl %eax, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x1828c
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x18285
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18235
leaq 0xef21(%rip), %rdi      # 0x271b4
leaq 0x12c42(%rip), %rsi     # 0x2aedc
leaq 0xef1a(%rip), %rdx      # 0x271bb
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %rdi
movl 0x18(%rdi), %ecx
cmpl $0x8, %ecx
sete %al
testl %ecx, %ecx
setle %dl
orb %al, %dl
jne 0x182fb
leal 0x1(%rcx), %eax
movq 0x8(%rdi), %rdx
cmpq 0x10(%rdi), %rdx
jae 0x182fb
decb %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
movl 0x18(%rdi), %ecx
decl %ecx
movl %ecx, 0x18(%rdi)
jne 0x182f4
incq 0x8(%rdi)
movl $0x8, 0x18(%rdi)
movl $0x8, %ecx
decl %eax
cmpl $0x1, %eax
ja 0x182c1
leaq 0x12f96(%rip), %r12     # 0x2b298
leaq 0x154db(%rip), %r13     # 0x2d7e4
xorl %r14d, %r14d
movq -0x60(%rbp), %rax
movq 0x10ee48(%rax), %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
movq %r12, %rdi
movl $0x8, %esi
movl %ebx, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x183a5
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 0x1839e
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x1834f
incl %r14d
cmpl $0x100, %r14d           # imm = 0x100
jne 0x1830c
leaq 0x12edc(%rip), %r12     # 0x2b298
leaq 0x15437(%rip), %r13     # 0x2d7fa
xorl %r14d, %r14d
movq -0x60(%rbp), %rax
movq 0x10ee48(%rax), %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
movq %r12, %rdi
movl $0x8, %esi
movl %ebx, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x1845e
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 0x18457
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18408
incl %r14d
cmpl $0x40, %r14d
jne 0x183c6
leaq 0x12e26(%rip), %r12     # 0x2b298
leaq 0x15397(%rip), %r13     # 0x2d810
xorl %r14d, %r14d
movq -0x60(%rbp), %rax
movq 0x10ee48(%rax), %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
movq %r12, %rdi
movl $0x8, %esi
movl %ebx, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %r9
movl $0x9, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18514
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 0x1850d
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x184be
incl %r14d
cmpl $0x40, %r14d
jne 0x1847c
movl $0x328, %eax            # imm = 0x328
movl $0x10, (%r15,%rax)
addq $0x84, %rax
cmpq $0xf88, %rax            # imm = 0xF88
jne 0x18526
jmp 0x199ad
leaq 0x12d36(%rip), %rdi     # 0x2b27e
leaq 0x15508(%rip), %rdx     # 0x2da57
xorl %esi, %esi
xorl %eax, %eax
callq 0x4a56
jmp 0x1903e
addl 0x2bc(%r15), %r12d
movl 0x2b4(%r15), %eax
movl 0x2b8(%r15), %ecx
leal (%r12,%rax,4), %eax
testl %ecx, %ecx
movl $0xc, %ebx
cmovel %ecx, %ebx
addl %eax, %ebx
leaq 0x12cf5(%rip), %rdi     # 0x2b27e
leaq 0x15246(%rip), %rdx     # 0x2d7d6
leal 0x1(%rbx), %esi
xorl %eax, %eax
callq 0x4a56
incl %ebx
je 0x18f40
incl %ebx
movl %ebx, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %ebx          # imm = 0x10000
setae %dl
cmovbl %ebx, %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 0x136bb(%rip), %rcx     # 0x2bc90
addl (%rcx,%rsi,4), %eax
movq -0x30(%rbp), %r9
jle 0x18f6c
addl %eax, %eax
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18f6c
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 0x18637
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x185e4
jmp 0x18f6c
movl 0x1c(%r15), %eax
cmpl $0xe, %eax
je 0x191bb
cmpl $0xf, %eax
je 0x1907f
cmpl $0x10, %eax
jne 0x19642
leaq 0x12c15(%rip), %rdi     # 0x2b27e
leaq 0x151d0(%rip), %rdx     # 0x2d840
xorl %esi, %esi
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x186a5
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x186a5
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
movq -0x40(%rbp), %r14
jl 0x186cb
decl %esi
movl 0x30(%r14), %edx
leaq 0x112a4(%rip), %rcx     # 0x29966
movq -0x30(%rbp), %rdi
callq 0x19ae3
leaq -0x38(%rbp), %rbx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6c10
movl 0x38(%r14), %esi
subl (%rbx), %esi
leaq 0x15168(%rip), %rdx     # 0x2d855
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x19c2f
leaq 0x3c(%r14), %rax
leaq 0x15177(%rip), %rdx     # 0x2d87b
jmp 0x192ec
cmpl $0x0, 0x30(%r15)
jne 0x18732
cmpl $0x0, 0x80(%r15)
jne 0x18732
cmpl $0x0, 0x170(%r15)
jne 0x18732
cmpl $0x0, 0x1c0(%r15)
je 0x199de
leaq 0x12b45(%rip), %rdi     # 0x2b27e
leaq 0x155af(%rip), %rdx     # 0x2dcef
movl $0x3, %esi
xorl %eax, %eax
callq 0x4a56
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
movb $0x1, %bl
cmpq 0x10(%r8), %rdx
jae 0x187a4
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 0x1879d
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18755
leaq 0x12f69(%rip), %r14     # 0x2b714
leaq 0x12acc(%rip), %r12     # 0x2b27e
leaq 0x151b5(%rip), %r13     # 0x2d96e
xorl %r15d, %r15d
movq -0x40(%rbp), %rax
movl 0x20(%rax,%r15,4), %eax
cmpq $0x3, %rax
ja 0x18975
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq %r12, %rdi
movl $0x3, %esi
leaq 0x151a2(%rip), %rdx     # 0x2d989
xorl %eax, %eax
callq 0x4a56
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x18975
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 0x18841
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x187f7
jmp 0x18975
movq %r12, %rdi
movl $0x2, %esi
leaq 0x15124(%rip), %rdx     # 0x2d980
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18975
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 0x188bc
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x1886c
jmp 0x18975
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18975
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x18975
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
jmp 0x18975
movq %r12, %rdi
movl $0x1, %esi
leaq 0x1505f(%rip), %rdx     # 0x2d977
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x18975
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 0x1896e
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18928
incq %r15
cmpq $0x4, %r15
jne 0x187bc
movq -0x60(%rbp), %r12
movl 0x10db38(%r12), %esi
cmpl $0x2, %esi
setl %al
xorb $0x1, %bl
orb %al, %bl
jne 0x18a0f
decl %esi
movq -0x40(%rbp), %r14
movl 0x30(%r14), %edx
leaq 0x10fba(%rip), %rbx     # 0x29966
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rcx
callq 0x19ae3
movl 0x10db38(%r12), %esi
decl %esi
movl 0x170(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x19ae3
movl 0x10db38(%r12), %esi
decl %esi
movl 0x80(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x19ae3
movl 0x10db38(%r12), %esi
decl %esi
movl 0x1c0(%r14), %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x19ae3
xorl %r12d, %r12d
leaq -0x48(%rbp), %rax
leaq -0x50(%rbp), %r14
movq -0x40(%rbp), %r15
movq -0x30(%rbp), %rbx
xorl %r13d, %r13d
movq %rax, (%rsp)
movq %r15, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
movq %r14, %r9
callq 0x6ad0
movq %r15, %rdi
xorl %esi, %esi
movl %r12d, %edx
movl %r13d, %ecx
leaq -0x38(%rbp), %r8
callq 0x6c10
movl -0x50(%rbp), %esi
subl -0x38(%rbp), %esi
movq %rbx, %rdi
leaq 0x14f2f(%rip), %rdx     # 0x2d992
callq 0x19c2f
movl -0x48(%rbp), %esi
subl -0x34(%rbp), %esi
movq %rbx, %rdi
leaq 0x14f27(%rip), %rdx     # 0x2d99f
callq 0x19c2f
leaq 0x12e2c(%rip), %rcx     # 0x2b8b0
incl %r13d
movslq 0x20(%r15,%r12,4), %rax
cmpl (%rcx,%rax,4), %r13d
leaq -0x48(%rbp), %rax
jl 0x18a25
incq %r12
cmpq $0x4, %r12
jne 0x18a22
jmp 0x19642
movslq %ecx, %rdx
movslq 0x1c(%r15), %rax
leaq 0x12dfe(%rip), %rsi     # 0x2b8b0
movl (%rsi,%rax,4), %esi
movq %rsi, -0x70(%rbp)
leaq 0x12e40(%rip), %rsi     # 0x2b900
movq (%rsi,%rdx,8), %rsi
movq %rsi, -0x50(%rbp)
leaq 0x12ec1(%rip), %rsi     # 0x2b990
movq (%rsi,%rdx,8), %rdx
movq %rdx, -0x48(%rbp)
cmpq $0x10, %rax
jne 0x18e9d
cmpl $0x0, -0x50(%rbp)
setne %cl
movl -0x48(%rbp), %eax
testl %eax, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x192fe
leaq 0x1277c(%rip), %rdi     # 0x2b27e
leaq 0x14ec6(%rip), %rdx     # 0x2d9cf
movl $0x3, %esi
xorl %eax, %eax
callq 0x4a56
movl $0x6, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x19459
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 0x18b68
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x18b1e
jmp 0x19459
incl %r12d
leaq 0x13112(%rip), %rax     # 0x2bc90
movl (%rax,%r12,4), %eax
addl %eax, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18bdf
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x18bd8
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18b88
leaq 0x324(%r15), %r14
xorl %r12d, %r12d
movq %r13, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x6577
movl %eax, %ebx
movq %r12, %rax
shlq $0x7, %rax
leaq (%rax,%r12,4), %rax
movl (%r14,%rax), %r13d
leaq 0x1264d(%rip), %rdi     # 0x2b25c
movl $0x1, %esi
cmpl %r13d, %ebx
jne 0x18c69
movl $0x1, %edx
leaq 0x14c01(%rip), %rcx     # 0x2d826
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18dba
movl 0x18(%rsi), %ecx
decl %ecx
movl $0x1, %edx
shll %cl, %edx
movl %ecx, 0x18(%rsi)
orb %dl, (%rax)
cmpl $0x0, 0x18(%rsi)
jne 0x18dba
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
jmp 0x18dba
xorl %edx, %edx
leaq 0x14bb4(%rip), %rcx     # 0x2d826
xorl %eax, %eax
callq 0x4a56
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18cab
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 0x18cab
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
cmpl %ebx, %r13d
jge 0x18d3a
leaq 0x125dd(%rip), %rdi     # 0x2b298
movl $0x3, %esi
movl %r13d, %edx
leaq 0x11471(%rip), %rcx     # 0x2a13b
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18dba
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 0x18d2e
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18cda
jmp 0x18dba
decl %r13d
leaq 0x12554(%rip), %rdi     # 0x2b298
movl $0x3, %esi
movl %r13d, %edx
leaq 0x113e8(%rip), %rcx     # 0x2a13b
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x18dba
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 0x18db3
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18d63
incq %r12
cmpq $0x10, %r12
movq -0x60(%rbp), %r13
jne 0x18be9
movl 0x2c0(%r15), %r12d
leaq 0x124a5(%rip), %rdi     # 0x2b27e
leaq 0x11362(%rip), %rdx     # 0x2a142
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
testl %r12d, %r12d
je 0x1903e
incl %r12d
movl %r12d, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %r12d         # imm = 0x10000
setae %dl
cmovbl %r12d, %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 0x12e66(%rip), %rcx     # 0x2bc90
addl (%rcx,%rsi,4), %eax
jle 0x19642
addl %eax, %eax
movq -0x30(%rbp), %r9
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rdx
cmpq 0x10(%rcx), %rdx
jae 0x19642
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x18e91
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18e39
jmp 0x19642
cmpl $0xf, %ecx
jne 0x19385
xorl %r12d, %r12d
cmpl $0xe, %eax
sete %r12b
xorl $0x15, %r12d
leaq 0x123c3(%rip), %rdi     # 0x2b27e
leaq 0x14b6d(%rip), %rdx     # 0x2da2f
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
incl %r12d
leaq 0x12dba(%rip), %rax     # 0x2bc90
movl (%rax,%r12,4), %eax
addl %eax, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x19459
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x18f34
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18ee0
jmp 0x19459
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x18f6c
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x18f6c
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
movl 0x2c0(%r15), %r12d
leaq 0x12304(%rip), %rdi     # 0x2b27e
leaq 0x111c1(%rip), %rdx     # 0x2a142
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
testl %r12d, %r12d
je 0x1903e
incl %r12d
movl %r12d, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %r12d         # imm = 0x10000
setae %dl
cmovbl %r12d, %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 0x12cc5(%rip), %rcx     # 0x2bc90
addl (%rcx,%rsi,4), %eax
jle 0x19642
addl %eax, %eax
movq -0x30(%rbp), %r9
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rdx
cmpq 0x10(%rcx), %rdx
jae 0x19642
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x19032
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x18fda
jmp 0x19642
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
cmpq 0x10(%rcx), %rax
jae 0x19642
movq -0x30(%rbp), %rsi
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x19642
movq -0x30(%rbp), %rax
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
jmp 0x19642
leaq 0x121f8(%rip), %rdi     # 0x2b27e
leaq 0x1487a(%rip), %rdx     # 0x2d907
movl $0x2, %esi
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x190f5
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 0x190ee
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x190a2
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
jl 0x19138
decl %esi
movl 0x30(%r15), %edx
leaq 0x10858(%rip), %rbx     # 0x29966
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19ae3
movl 0x10db38(%r13), %esi
decl %esi
movl 0x170(%r15), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19ae3
leaq -0x38(%rbp), %rbx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6c10
movl 0x38(%r15), %esi
subl (%rbx), %esi
leaq 0x146fb(%rip), %rdx     # 0x2d855
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x19c2f
movl 0x3c(%r15), %esi
subl 0x4(%rbx), %esi
leaq 0x14707(%rip), %rdx     # 0x2d87b
movq %r12, %rdi
callq 0x19c2f
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6c10
movl 0x178(%r15), %esi
subl (%rbx), %esi
leaq 0x14781(%rip), %rdx     # 0x2d921
movq %r12, %rdi
callq 0x19c2f
leaq 0x17c(%r15), %rax
leaq 0x14791(%rip), %rdx     # 0x2d947
jmp 0x192ec
leaq 0x120bc(%rip), %rdi     # 0x2b27e
leaq 0x146d8(%rip), %rdx     # 0x2d8a1
movl $0x1, %esi
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r8
movq 0x8(%r8), %rdx
cmpq 0x10(%r8), %rdx
jae 0x1922b
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 0x19224
incq 0x8(%r8)
movl $0x8, 0x18(%r8)
decl %eax
cmpl $0x1, %eax
ja 0x191de
movl 0x10db38(%r13), %esi
cmpl $0x2, %esi
jl 0x1926e
decl %esi
movl 0x30(%r15), %edx
leaq 0x10722(%rip), %rbx     # 0x29966
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19ae3
movl 0x10db38(%r13), %esi
decl %esi
movl 0x80(%r15), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19ae3
leaq -0x38(%rbp), %rbx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6c10
movl 0x38(%r15), %esi
subl (%rbx), %esi
leaq 0x145c5(%rip), %rdx     # 0x2d855
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x19c2f
movl 0x3c(%r15), %esi
subl 0x4(%rbx), %esi
leaq 0x145d1(%rip), %rdx     # 0x2d87b
movq %r12, %rdi
callq 0x19c2f
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x6c10
movl 0x88(%r15), %esi
subl (%rbx), %esi
leaq 0x145e5(%rip), %rdx     # 0x2d8bb
movq %r12, %rdi
callq 0x19c2f
leaq 0x8c(%r15), %rax
leaq 0x145f5(%rip), %rdx     # 0x2d8e1
movl (%rax), %esi
subl -0x34(%rbp), %esi
movq %r12, %rdi
callq 0x19c2f
jmp 0x19642
testl %eax, %eax
je 0x193f1
leaq 0x11f71(%rip), %rdi     # 0x2b27e
leaq 0x146dd(%rip), %rdx     # 0x2d9f1
movl $0x2, %esi
xorl %eax, %eax
callq 0x4a56
movl $0x4, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x19459
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 0x19379
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x19329
jmp 0x19459
movl -0x50(%rbp), %ecx
movl -0x4c(%rbp), %edx
testl %ecx, %ecx
movq -0x30(%rbp), %rdi
je 0x193c4
cmpl $0x0, -0x48(%rbp)
je 0x193c4
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 0x14682(%rip), %rdx     # 0x2da37
jmp 0x19454
callq 0x2e8e
jmp 0x199ad
testl %edx, %edx
setne %r9b
movl -0x44(%rbp), %esi
testl %esi, %esi
setne %r8b
andb %r9b, %r8b
cmpb $0x1, %r8b
jne 0x19403
xorl %esi, %esi
cmpl $0xe, %eax
sete %sil
xorl $0xd, %esi
leaq 0x14650(%rip), %rdx     # 0x2da3f
jmp 0x19454
leaq 0x1460d(%rip), %rdx     # 0x2da05
movq -0x30(%rbp), %rdi
movl $0x1, %esi
jmp 0x19454
testl %esi, %esi
je 0x1942f
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 0x14624(%rip), %rdx     # 0x2da47
jmp 0x19454
callq 0x2e5f
jmp 0x199ad
testl %edx, %edx
je 0x19459
testl %ecx, %ecx
movl $0x4, %ecx
movl $0xa, %edx
cmovnel %ecx, %edx
xorl %esi, %esi
cmpl $0xe, %eax
setne %sil
orl %edx, %esi
leaq 0x145fb(%rip), %rdx     # 0x2da4f
callq 0x199fa
cmpl $0x2, 0x10db38(%r13)
jl 0x194c5
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
xorl %ebx, %ebx
leaq -0x58(%rbp), %r14
leaq 0x104e5(%rip), %r15     # 0x29966
cmpl $0x0, -0x50(%rbp,%rbx,4)
je 0x194bd
movq $0x0, (%rsp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x6ad0
movl 0x10db38(%r13), %esi
decl %esi
movl -0x58(%rbp), %edx
movq -0x30(%rbp), %rdi
movq %r15, %rcx
callq 0x19ae3
incq %rbx
cmpq %rbx, %r12
jne 0x19481
cmpl $0x2, 0x10db3c(%r13)
jl 0x19534
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
xorl %ebx, %ebx
leaq -0x58(%rbp), %r14
leaq 0x10491(%rip), %r15     # 0x2997e
cmpl $0x0, -0x48(%rbp,%rbx,4)
je 0x1952c
movq $0x0, (%rsp)
movq -0x40(%rbp), %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x6ad0
movl 0x10db3c(%r13), %esi
decl %esi
movl -0x58(%rbp), %edx
movq -0x30(%rbp), %rdi
movq %r15, %rcx
callq 0x19ae3
incq %rbx
cmpq %rbx, %r12
jne 0x194ed
movq -0x70(%rbp), %rax
cmpl $0x2, %eax
movl $0x1, %r15d
cmovgel %eax, %r15d
xorl %ebx, %ebx
leaq -0x64(%rbp), %r14
leaq 0x1444d(%rip), %r13     # 0x2d99f
cmpl $0x0, -0x50(%rbp,%rbx,4)
je 0x195b2
movq %r14, (%rsp)
movq -0x40(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x54(%rbp), %r9
callq 0x6ad0
movq %r12, %rdi
xorl %esi, %esi
movl %ebx, %edx
xorl %ecx, %ecx
leaq -0x38(%rbp), %r8
callq 0x6c10
movl -0x54(%rbp), %esi
subl -0x38(%rbp), %esi
movq -0x30(%rbp), %r12
movq %r12, %rdi
leaq 0x143f6(%rip), %rdx     # 0x2d992
callq 0x19c2f
movl -0x64(%rbp), %esi
subl -0x34(%rbp), %esi
movq %r12, %rdi
movq %r13, %rdx
callq 0x19c2f
incq %rbx
cmpq %rbx, %r15
jne 0x19552
movq -0x70(%rbp), %r12
cmpl $0x2, %r12d
movl $0x1, %eax
cmovll %eax, %r12d
xorl %ebx, %ebx
leaq 0x143cb(%rip), %r13     # 0x2d99f
cmpl $0x0, -0x48(%rbp,%rbx,4)
je 0x1963a
movq %r14, (%rsp)
movq -0x40(%rbp), %r15
movq %r15, %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x54(%rbp), %r9
callq 0x6ad0
movq %r15, %rdi
movl $0x1, %esi
movl %ebx, %edx
xorl %ecx, %ecx
leaq -0x38(%rbp), %r8
callq 0x6c10
movl -0x54(%rbp), %esi
subl -0x38(%rbp), %esi
movq -0x30(%rbp), %r15
movq %r15, %rdi
leaq 0x1436e(%rip), %rdx     # 0x2d992
callq 0x19c2f
movl -0x64(%rbp), %esi
subl -0x34(%rbp), %esi
movq %r15, %rdi
movq %r13, %rdx
callq 0x19c2f
incq %rbx
cmpq %rbx, %r12
jne 0x195d4
movq -0x40(%rbp), %r15
movl 0x18(%r15), %eax
cmpl $0x1, %eax
movq -0x60(%rbp), %r13
je 0x197fe
testl %eax, %eax
jne 0x19714
movl 0x2b4(%r15), %eax
shll $0x4, %eax
orl 0x2b8(%r15), %eax
movslq %eax, %rbx
leaq 0x14736(%rip), %rax     # 0x2ddb0
movzbl (%rbx,%rax), %r12d
leaq 0x11bf8(%rip), %rdi     # 0x2b27e
leaq 0x143d3(%rip), %rdx     # 0x2da60
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
cmpl $0x2f, %ebx
je 0x197c1
incl %r12d
leaq 0x125e6(%rip), %rax     # 0x2bc90
movl (%rax,%r12,4), %eax
addl %eax, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x197f3
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x19708
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x196b4
jmp 0x197f3
movl 0x2b4(%r15), %eax
shll $0x4, %eax
orl 0x2b8(%r15), %eax
movslq %eax, %rbx
leaq 0x122f1(%rip), %rax     # 0x2ba20
movzbl (%rbx,%rax), %r12d
leaq 0x11b43(%rip), %rdi     # 0x2b27e
leaq 0x14335(%rip), %rdx     # 0x2da77
movl %r12d, %esi
xorl %eax, %eax
callq 0x4a56
testl %ebx, %ebx
je 0x197c1
incl %r12d
leaq 0x12536(%rip), %rax     # 0x2bc90
movl (%rax,%r12,4), %eax
addl %eax, %eax
movq -0x30(%rbp), %r9
movq 0x8(%r9), %rdx
cmpq 0x10(%r9), %rdx
jae 0x197f3
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, %r12d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%r9)
jne 0x197b8
incq 0x8(%r9)
movl $0x8, 0x18(%r9)
decl %eax
cmpl $0x1, %eax
ja 0x19764
jmp 0x197f3
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
jae 0x197f3
movb 0x18(%rsi), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rsi)
jne 0x197f3
leaq 0x8(%rsi), %rax
leaq 0x18(%rsi), %rcx
incq (%rax)
movl $0x8, (%rcx)
cmpl $0x1, 0x18(%r15)
jne 0x19898
cmpl $0x0, (%r15)
jg 0x1980f
cmpl $0x0, 0x4(%r15)
jle 0x199bc
movl 0x2b0(%r15), %esi
subl -0xcd8(%r15), %esi
movq -0x30(%rbp), %rbx
leaq 0x10975(%rip), %rdx     # 0x2a19d
movq %rbx, %rdi
callq 0x19c2f
leaq 0x2c4(%r15), %r8
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movl $0x10, %r9d
callq 0x19d1f
cmpl $0x0, 0x2b8(%r15)
je 0x19920
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 0x19d1f
incq %r14
addq $0x84, %rbx
cmpq $0x10, %r14
jne 0x19868
jmp 0x19920
cmpl $0x0, 0x2b8(%r15)
jne 0x198ac
cmpl $0x0, 0x2b4(%r15)
je 0x19920
movl 0x2b0(%r15), %esi
movq 0x10dae0(%r13), %rax
movl 0x1034(%rax), %eax
addl 0x10db44(%r13), %eax
subl %eax, %esi
leaq 0x108cd(%rip), %rdx     # 0x2a19d
movq -0x30(%rbp), %rdi
callq 0x19c2f
leaq 0x368(%r15), %rbx
xorl %r14d, %r14d
movl 0x2b8(%r15), %eax
movl %r14d, %ecx
shrl $0x2, %ecx
btl %ecx, %eax
jae 0x19910
movq %r13, %rdi
movq -0x30(%rbp), %rsi
movq %r15, %rdx
movl %r14d, %ecx
movq %rbx, %r8
movl $0x10, %r9d
callq 0x19d1f
incq %r14
addq $0x84, %rbx
cmpq $0x10, %r14
jne 0x198e3
cmpl $0x0, 0x2b4(%r15)
movq -0x30(%rbp), %r12
je 0x199ad
leaq 0x304(%r15), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x4, %r9d
callq 0x19d1f
leaq 0x314(%r15), %r8
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl $0x4, %r9d
callq 0x19d1f
testb $0x2, 0x2b4(%r15)
je 0x199ad
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 0x19d1f
addq $0x84, %rbx
incq %r14
jne 0x19986
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 0x1981d
leaq 0x1430a(%rip), %rdx     # 0x2dcef
movq -0x30(%rbp), %rdi
movl $0x4, %esi
callq 0x199fa
xorl %ebx, %ebx
jmp 0x187a4