// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/frame.c
// Function: x264_frame_deblocking_filter(x264_t*, int)
void x264_frame_deblocking_filter( x264_t *h, int i_slice_type )
{
    int mb_xy;

    for( mb_xy = 0; mb_xy < h->sps->i_mb_width * h->sps->i_mb_height; mb_xy++ )
    {
        x264_macroblock_t *mb;  /* current macroblock */
        int i_edge;
        int i_dir;

        mb = &h->mb[mb_xy];

        /* i_dir == 0 -> vertical edge
         * i_dir == 1 -> horizontal edge */
        for( i_dir = 0; i_dir < 2; i_dir++ )
        {
            int i_start;
            int i_QP;

            i_start = (( i_dir == 0 && mb->i_mb_x != 0 ) || ( i_dir == 1 && mb->i_mb_y != 0 ) ) ? 0 : 1;

            for( i_edge = i_start; i_edge < 4; i_edge++ )
            {
                x264_macroblock_t *mbn;
                int bS[4];  /* filtering strength */

                /* *** neighbour macroblock for the current edge (or current) *** */
                mbn = i_edge > 0 ? mb : ( i_dir == 0 ? mb - 1 : mb - h->sps->i_mb_width );

                /* *** Get bS for each 4px for the current edge *** */
                if( IS_INTRA( mb->i_type ) || IS_INTRA( mbn->i_type ) )
                {
                    bS[0] = bS[1] = bS[2] = bS[3] = ( i_edge == 0 ? 4 : 3 );
                }
                else
                {
                    int i;
                    for( i = 0; i < 4; i++ )
                    {
                        int x, y;
                        int xn, yn;

                        x = i_dir == 0 ? i_edge : i;
                        y = i_dir == 0 ? i      : i_edge;

                        xn = (x - (i_dir == 0 ? 1 : 0 ))&0x03;
                        yn = (y - (i_dir == 0 ? 0 : 1 ))&0x03;

                        if( mb->block[block_idx_xy[x][y]].i_non_zero_count != 0 ||
                            mbn->block[block_idx_xy[xn][yn]].i_non_zero_count != 0 )
                        {
                            bS[i] = 2;
                        }
                        else if( i_slice_type == SLICE_TYPE_B )
                        {
                            /* FIXME */
                            fprintf( stderr, "deblocking filter doesn't work yet with B slice\n" );
                            return;
                        }
                        else    /* SLICE_TYPE_P */
                        {
                            if( mb->partition[x][y].i_ref[0]  != mbn->partition[xn][yn].i_ref[0] ||
                                abs( mb->partition[x][y].mv[0][0] - mbn->partition[xn][yn].mv[0][0] ) >= 4 ||
                                abs( mb->partition[x][y].mv[0][1] - mbn->partition[xn][yn].mv[0][1] ) >= 4 )
                            {
                                bS[i] = 1;
                            }
                            else
                            {
                                bS[i] = 0;
                            }
                        }
                    }
                }

                /* *** filter *** */
                /* Y plane */
                i_QP = ( mb->i_qp + mbn->i_qp + 1 ) >> 1;
                if( i_dir == 0 )
                {
                    /* vertical edge */
                    deblocking_filter_edgev( h, &h->fdec->plane[0][16 * mb->i_mb_y * h->fdec->i_stride[0]+ 16 * mb->i_mb_x + 4 * i_edge],
                                                h->fdec->i_stride[0], bS, i_QP );
                    if( (i_edge % 2) == 0  )
                    {
                        /* U/V planes */
                        i_QP = ( i_chroma_qp_table[mb->i_qp] + i_chroma_qp_table[mbn->i_qp] + 1 ) >> 1;
                        deblocking_filter_edgecv( h, &h->fdec->plane[1][8*(mb->i_mb_y*h->fdec->i_stride[1]+mb->i_mb_x)+i_edge*2],
                                                      h->fdec->i_stride[1], bS, i_QP );
                        deblocking_filter_edgecv( h, &h->fdec->plane[2][8*(mb->i_mb_y*h->fdec->i_stride[2]+mb->i_mb_x)+i_edge*2],
                                                  h->fdec->i_stride[2], bS, i_QP );
                    }
                }
                else
                {
                    /* horizontal edge */
                    deblocking_filter_edgeh( h, &h->fdec->plane[0][(16*mb->i_mb_y + 4 * i_edge) * h->fdec->i_stride[0]+ 16 * mb->i_mb_x],
                                                h->fdec->i_stride[0], bS, i_QP );
                    /* U/V planes */
                    if( ( i_edge % 2  ) == 0 )
                    {
                        i_QP = ( i_chroma_qp_table[mb->i_qp] + i_chroma_qp_table[mbn->i_qp] + 1 ) >> 1;
                        deblocking_filter_edgech( h, &h->fdec->plane[1][8*(mb->i_mb_y*h->fdec->i_stride[1]+mb->i_mb_x)+i_edge*2*h->fdec->i_stride[1]],
                                                 h->fdec->i_stride[1], bS, i_QP );
                        deblocking_filter_edgech( h, &h->fdec->plane[2][8*(mb->i_mb_y*h->fdec->i_stride[2]+mb->i_mb_x)+i_edge*2*h->fdec->i_stride[2]],
                                                 h->fdec->i_stride[2], bS, i_QP );
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %esi, -0x94(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x8ed8(%rdi), %rax
movl 0x440(%rax), %ecx
imull 0x43c(%rax), %ecx
testl %ecx, %ecx
jle 0x6212
leaq 0x1fe3e(%rip), %rsi     # 0x25300
xorl %ecx, %ecx
movq -0x40(%rbp), %rax
movq 0x10efe8(%rax), %rax
movq %rcx, -0xc0(%rbp)
imulq $0xf88, %rcx, %rcx      # imm = 0xF88
leaq (%rax,%rcx), %rdx
leaq (%rax,%rcx), %rdi
addq $0x324, %rdi            # imm = 0x324
movq %rdi, -0xf0(%rbp)
leaq 0x30(%rax,%rcx), %rax
movq %rax, -0xd0(%rbp)
leaq -0xf88(%rdx), %rax
movq %rax, -0xc8(%rbp)
xorl %edi, %edi
movq %rdx, -0x78(%rbp)
testl %edi, %edi
je 0x552f
movl $0x1, %r9d
cmpl $0x1, %edi
jne 0x5537
xorl %r9d, %r9d
cmpl $0x0, 0x4(%rdx)
sete %r9b
jmp 0x5537
xorl %r9d, %r9d
cmpl $0x0, (%rdx)
je 0x5517
movl %edi, %eax
xorl $0x1, %eax
movl %eax, -0x98(%rbp)
movq %rdi, -0xa8(%rbp)
testl %edi, %edi
sete %al
testl %r9d, %r9d
setne %cl
movq -0xc8(%rbp), %r8
cmovneq %rdx, %r8
orb %al, %cl
jne 0x5582
movq -0x40(%rbp), %rax
movq 0x8ed8(%rax), %rax
movslq 0x43c(%rax), %rax
negq %rax
imulq $0xf88, %rax, %r8       # imm = 0xF88
addq %rdx, %r8
cmpl $0x2, 0x18(%rdx)
movq %r9, -0x50(%rbp)
movq %r8, -0x88(%rbp)
jb 0x559a
cmpl $0x2, 0x18(%r8)
jae 0x55b7
cmpl $0x1, %r9d
movl $0x0, %eax
adcl $0x3, %eax
movl %eax, -0x64(%rbp)
movl %eax, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movl %eax, -0x70(%rbp)
jmp 0x56cf
leaq 0x324(%r8), %rax
leaq 0x30(%r8), %rcx
xorl %edx, %edx
testl %edi, %edi
movl %edx, %r8d
cmovel %r9d, %r8d
movq %rdi, %rbx
movl %r9d, %edi
cmovel %edx, %edi
movq %rsi, %r11
leaq (%rsi,%r8,4), %rsi
movzbl (%rdi,%rsi), %esi
movl %esi, %r9d
shll $0x7, %r9d
leaq (%r9,%rsi,4), %r9
movl $0x2, %esi
movq -0xf0(%rbp), %r10
cmpl $0x0, 0x4(%r10,%r9)
jne 0x56ac
movl %edi, %r9d
subl %ebx, %r9d
andl $0x3, %r9d
movl %r8d, %r10d
subl -0x98(%rbp), %r10d
andl $0x3, %r10d
leaq (%r11,%r10,4), %r11
movzbl (%r9,%r11), %r11d
movl %r11d, %ebx
shll $0x7, %ebx
leaq (%rbx,%r11,4), %r11
cmpl $0x0, 0x4(%rax,%r11)
jne 0x56ac
cmpl $0x1, -0x94(%rbp)
je 0x6209
leaq (%r8,%r8,4), %r8
shlq $0x5, %r8
addq -0xd0(%rbp), %r8
leaq (%rdi,%rdi,4), %rdi
movl (%r8,%rdi,8), %r11d
leaq (%r10,%r10,4), %r10
shll $0x5, %r10d
addq %rcx, %r10
leaq (%r9,%r9,4), %r9
movl $0x1, %esi
cmpl (%r10,%r9,8), %r11d
jne 0x56ac
leaq (%r8,%rdi,8), %r8
leaq (%r10,%r9,8), %rdi
movl 0x8(%r8), %r9d
subl 0x8(%rdi), %r9d
movl %r9d, %r10d
negl %r10d
cmovsl %r9d, %r10d
cmpl $0x3, %r10d
ja 0x56ac
movl 0xc(%r8), %esi
subl 0xc(%rdi), %esi
movl %esi, %edi
negl %edi
cmovsl %esi, %edi
xorl %esi, %esi
cmpl $0x4, %edi
setae %sil
movl %esi, -0x70(%rbp,%rdx,4)
incq %rdx
cmpq $0x4, %rdx
leaq 0x1fc42(%rip), %rsi     # 0x25300
movq -0xa8(%rbp), %rdi
movq -0x50(%rbp), %r9
jne 0x55c4
movq -0x78(%rbp), %r8
movl 0x2b0(%r8), %eax
movq -0x88(%rbp), %rcx
movl 0x2b0(%rcx), %ecx
leal (%rax,%rcx), %esi
incl %esi
sarl %esi
testl %edi, %edi
je 0x5cfd
movq -0x40(%rbp), %rdi
movq 0x10efe0(%rdi), %rax
movl 0x4(%r8), %ecx
shll $0x4, %ecx
leal (%rcx,%r9,4), %ecx
movslq 0x24(%rax), %r13
imull %r13d, %ecx
movslq (%r8), %rdx
shlq $0x4, %rdx
movslq %ecx, %r10
addq %rdx, %r10
addq 0x48(%rax), %r10
movl 0x10db54(%rdi), %edx
addl %esi, %edx
movl $0x33, %ecx
cmpl %ecx, %edx
cmovgel %ecx, %edx
testl %edx, %edx
movl $0x0, %eax
cmovlel %eax, %edx
addl 0x10db58(%rdi), %esi
cmpl %ecx, %esi
cmovgel %ecx, %esi
testl %esi, %esi
cmovlel %eax, %esi
leaq 0x1fcc8(%rip), %rax     # 0x25420
movq %rdx, -0xe8(%rbp)
movl (%rax,%rdx,4), %edi
leaq 0x1fd87(%rip), %rax     # 0x254f0
movl (%rax,%rsi,4), %r8d
movl %r13d, %eax
negl %eax
movslq %eax, %r9
leal (,%r13,2), %eax
movslq %eax, %rcx
movq %rcx, -0x60(%rbp)
negl %eax
movslq %eax, %rdx
leal (%r13,%r13,2), %eax
movslq %eax, %rcx
movq %rcx, -0xe0(%rbp)
negl %eax
cltq
movq %rax, -0xb8(%rbp)
leal (,%r13,4), %eax
negl %eax
cltq
movq %rax, -0xd8(%rbp)
movl %edi, %eax
shrl $0x2, %eax
addl $0x2, %eax
movl %eax, -0x9c(%rbp)
xorl %ecx, %ecx
movq %r13, -0x58(%rbp)
movq %rdx, -0x48(%rbp)
movq %r9, -0xb0(%rbp)
movslq -0x70(%rbp,%rcx,4), %rax
testq %rax, %rax
movq %rcx, -0x90(%rbp)
je 0x59b0
cmpl $0x4, %eax
jge 0x59b9
movq -0xe8(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq 0x1fdbb(%rip), %rdx     # 0x255c0
leaq (%rdx,%rcx,4), %rcx
movq -0x48(%rbp), %rdx
movl -0x4(%rcx,%rax,4), %eax
movl %eax, %ecx
negl %ecx
movl %ecx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
incl %eax
movl %eax, -0x80(%rbp)
movl $0x4, %ebx
movzbl (%r10,%r9), %r15d
movzbl (%r10), %r14d
movl %r15d, %ecx
subl %r14d, %ecx
movl %ecx, %esi
negl %esi
cmovsl %ecx, %esi
movzbl %sil, %ecx
cmpl %edi, %ecx
jge 0x59a0
movzbl (%r10,%rdx), %ecx
movl %ecx, %esi
subl %r15d, %esi
movl %esi, %r11d
negl %r11d
cmovsl %esi, %r11d
cmpl %r8d, %r11d
jge 0x59a0
movzbl (%r10,%r13), %r11d
movl %r11d, %esi
subl %r14d, %esi
movl %esi, %r12d
negl %r12d
cmovsl %esi, %r12d
cmpl %r8d, %r12d
jge 0x59a0
movq -0xb8(%rbp), %rax
movzbl (%r10,%rax), %edx
movq -0x60(%rbp), %rax
movzbl (%r10,%rax), %esi
movl %edx, %r12d
subl %r15d, %r12d
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movq -0x38(%rbp), %rax
cmpl %r8d, %r13d
jge 0x58ef
leal (%r15,%r14), %eax
incl %eax
shrl %eax
subl %ecx, %edx
subl %ecx, %edx
movzbl %al, %r13d
addl %edx, %r13d
sarl %r13d
movl %r13d, %r12d
cmpl -0x38(%rbp), %r13d
jl 0x58d7
movq -0x38(%rbp), %rax
movl %eax, %r12d
movl -0x30(%rbp), %eax
cmpl %eax, %r13d
cmovll %eax, %r12d
addb %cl, %r12b
movq -0x48(%rbp), %rax
movb %r12b, (%r10,%rax)
movl -0x80(%rbp), %eax
movl %esi, %edx
subl %r14d, %edx
movl %edx, %r12d
negl %r12d
cmovsl %edx, %r12d
cmpl %r8d, %r12d
jge 0x5942
leal (%r15,%r14), %edx
incl %edx
shrl %edx
movzbl %dl, %r12d
addl %esi, %r12d
subl %r11d, %r12d
subl %r11d, %r12d
sarl %r12d
movl %r12d, %esi
cmpl -0x38(%rbp), %r12d
movq -0x58(%rbp), %r13
jl 0x592e
movq -0x38(%rbp), %rdx
movl %edx, %esi
movl -0x30(%rbp), %edx
cmpl %edx, %r12d
cmovll %edx, %esi
addb %r11b, %sil
movb %sil, (%r10,%r13)
incl %eax
jmp 0x5946
movq -0x58(%rbp), %r13
movl %r14d, %edx
subl %r15d, %edx
subl %r11d, %ecx
leal (%rcx,%rdx,4), %ecx
addl $0x4, %ecx
sarl $0x3, %ecx
movl %eax, %edx
negl %edx
cmpl %eax, %ecx
cmovll %ecx, %eax
cmpl %edx, %ecx
cmovll %edx, %eax
addl %eax, %r15d
testl %r15d, %r15d
setg %cl
negb %cl
movl $0x100, %edx            # imm = 0x100
cmpl %edx, %r15d
movzbl %cl, %ecx
cmovbl %r15d, %ecx
movb %cl, (%r10,%r9)
subl %eax, %r14d
testl %r14d, %r14d
setg %al
negb %al
cmpl %edx, %r14d
movzbl %al, %eax
cmovbl %r14d, %eax
movb %al, (%r10)
movq -0x48(%rbp), %rdx
incq %r10
decl %ebx
jne 0x5826
jmp 0x5c3a
addq $0x4, %r10
jmp 0x5c3a
movq -0xe0(%rbp), %rax
addq %r10, %rax
movq %rax, -0x128(%rbp)
movq -0xd8(%rbp), %rax
leaq (%r10,%rax), %rax
movq %rax, -0x110(%rbp)
movq -0x60(%rbp), %rax
addq %r10, %rax
movq %rax, -0x120(%rbp)
leaq (%r10,%r13), %rax
movq %rax, -0x30(%rbp)
movq -0xb8(%rbp), %rax
leaq (%r10,%rax), %r14
leaq (%r10,%rdx), %rax
movq %rax, -0x38(%rbp)
leaq (%r10,%r9), %rax
xorl %r13d, %r13d
movq %r10, %rdx
movq %r14, -0x108(%rbp)
movzbl (%rax,%r13), %r11d
movzbl (%r10,%r13), %esi
movl %r11d, %ecx
subl %esi, %ecx
movl %ecx, %ebx
negl %ebx
cmovsl %ecx, %ebx
movzbl %bl, %r12d
cmpl %edi, %r12d
jge 0x5c18
movq -0x38(%rbp), %rcx
movzbl (%rcx,%r13), %ecx
movl %ecx, %ebx
subl %r11d, %ebx
movl %ebx, %r15d
negl %r15d
cmovsl %ebx, %r15d
cmpl %r8d, %r15d
jge 0x5c18
movq -0x30(%rbp), %rbx
movzbl (%rbx,%r13), %ebx
movq %r14, %r9
movl %ebx, %r14d
subl %esi, %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movq %r9, %r14
cmpl %r8d, %r15d
jge 0x5c18
leaq (%r10,%r13), %r15
cmpl -0x9c(%rbp), %r12d
jae 0x5b58
movq %r15, -0x80(%rbp)
movzbl (%r14,%r13), %r12d
movq -0x120(%rbp), %r14
movzbl (%r14,%r13), %r14d
movq %r14, -0x130(%rbp)
movq -0x128(%rbp), %r14
movzbl (%r14,%r13), %r14d
movq %r14, -0x118(%rbp)
movl %r12d, %r14d
subl %r11d, %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
cmpl %r8d, %r15d
jge 0x5b7b
leal (%rsi,%r11), %r14d
movq %r14, -0xf8(%rbp)
addl %ecx, %r14d
leal (%rbx,%r12), %r15d
leal 0x4(%r15,%r14,2), %r15d
movq -0x110(%rbp), %r14
movzbl (%r14,%r13), %r14d
movq %r14, -0x100(%rbp)
shrl $0x3, %r15d
movb %r15b, (%rax,%r13)
leal (%rcx,%r12), %r15d
movq -0xf8(%rbp), %r14
addl %r15d, %r14d
addl $0x2, %r14d
shrl $0x2, %r14d
movq -0x38(%rbp), %r15
movb %r14b, (%r15,%r13)
leal (%r12,%r12,2), %r14d
addl %ecx, %r14d
addl %r11d, %r14d
addl %esi, %r14d
movq -0x100(%rbp), %r15
leal (%r14,%r15,2), %r15d
addl $0x4, %r15d
movq -0x108(%rbp), %r14
leaq (%r14,%r13), %r12
shrl $0x3, %r15d
jmp 0x5b96
leal (%r11,%rcx,2), %r11d
addl %ebx, %r11d
addl $0x2, %r11d
shrl $0x2, %r11d
movb %r11b, (%rax,%r13)
addl %ecx, %esi
leal (%rsi,%rbx,2), %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
jmp 0x5c15
movq -0xb0(%rbp), %r14
leaq (%rdx,%r14), %r12
leal (%r11,%rcx,2), %r14d
leal (%rbx,%r14), %r15d
addl $0x2, %r15d
shrl $0x2, %r15d
movb %r15b, (%r12)
movq -0x130(%rbp), %r12
movl %r12d, %r14d
subl %esi, %r14d
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
cmpl %r8d, %r15d
jge 0x5c03
addl %r11d, %esi
addl %ebx, %esi
addl %r12d, %ecx
leal (%rcx,%rsi,2), %ecx
addl $0x4, %ecx
shrl $0x3, %ecx
movq -0x80(%rbp), %r11
movb %cl, (%r11)
movq -0x60(%rbp), %rcx
leaq (%rdx,%rcx), %r15
leal (%r12,%rsi), %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movq -0x30(%rbp), %rbx
movb %cl, (%rbx,%r13)
leal (%r12,%r12,2), %ecx
addl %esi, %ecx
movq -0x118(%rbp), %rsi
leal (%rcx,%rsi,2), %ecx
addl $0x4, %ecx
shrl $0x3, %ecx
movq %r9, %r14
jmp 0x5c15
addl %esi, %ecx
leal (%rcx,%rbx,2), %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movq %r9, %r14
movq -0x80(%rbp), %r15
movb %cl, (%r15)
incq %rdx
incq %r13
cmpl $0x4, %r13d
jne 0x5a16
addq %r13, %r10
movq -0x58(%rbp), %r13
movq -0x48(%rbp), %rdx
movq -0xb0(%rbp), %r9
movq -0x90(%rbp), %rcx
incq %rcx
cmpq $0x4, %rcx
jne 0x57d5
movq -0x50(%rbp), %r9
testb $0x1, %r9b
jne 0x61a8
movq -0x78(%rbp), %r13
movslq 0x2b0(%r13), %rax
leaq 0x1f6e2(%rip), %rdx     # 0x25350
movl (%rdx,%rax,4), %eax
movq -0x88(%rbp), %rcx
movslq 0x2b0(%rcx), %rcx
movl (%rdx,%rcx,4), %ecx
leal 0x1(%rax,%rcx), %r12d
movq -0x40(%rbp), %r14
movq 0x10efe0(%r14), %rax
movl 0x28(%rax), %edx
movl 0x4(%r13), %ecx
imull %edx, %ecx
addl (%r13), %ecx
sarl %r12d
leal (%r9,%r9), %ebx
movl %edx, %esi
imull %ebx, %esi
leal (%rsi,%rcx,8), %ecx
movslq %ecx, %rsi
addq 0x50(%rax), %rsi
movq %r14, %rdi
leaq -0x70(%rbp), %r15
movq %r15, %rcx
movl %r12d, %r8d
callq 0x6434
movq 0x10efe0(%r14), %rax
movl 0x2c(%rax), %edx
movl 0x4(%r13), %ecx
imull %edx, %ecx
addl (%r13), %ecx
imull %edx, %ebx
leal (%rbx,%rcx,8), %ecx
movslq %ecx, %rsi
addq 0x58(%rax), %rsi
movq %r14, %rdi
movq %r15, %rcx
movl %r12d, %r8d
callq 0x6434
jmp 0x61a4
movq -0x40(%rbp), %rdi
movq 0x10efe0(%rdi), %rax
movslq 0x24(%rax), %rcx
movl 0x4(%r8), %edx
imull %ecx, %edx
addl (%r8), %edx
shll $0x4, %edx
leal (%rdx,%r9,4), %edx
movslq %edx, %rdx
addq 0x48(%rax), %rdx
movl 0x10db54(%rdi), %r10d
addl %esi, %r10d
movl $0x33, %r9d
cmpl %r9d, %r10d
cmovgel %r9d, %r10d
testl %r10d, %r10d
movl $0x0, %r8d
cmovlel %r8d, %r10d
leaq 0x1f6d1(%rip), %rax     # 0x25420
movq %r10, -0x58(%rbp)
movl (%rax,%r10,4), %eax
addl 0x10db58(%rdi), %esi
cmpl %r9d, %esi
cmovgel %r9d, %esi
testl %esi, %esi
cmovlel %r8d, %esi
leaq 0x1f77f(%rip), %rdi     # 0x254f0
movl (%rdi,%rsi,4), %edi
movl %eax, %esi
shrl $0x2, %esi
addl $0x2, %esi
movl %esi, -0x48(%rbp)
leaq (,%rcx,4), %rsi
movq %rsi, -0x60(%rbp)
xorl %r8d, %r8d
movslq -0x70(%rbp,%r8,4), %rsi
testq %rsi, %rsi
movq %r8, -0x38(%rbp)
je 0x5f50
cmpl $0x4, %esi
jge 0x5f59
movq -0x58(%rbp), %r8
leaq (%r8,%r8,2), %r8
leaq 0x1f808(%rip), %r9      # 0x255c0
leaq (%r9,%r8,4), %r8
movl -0x4(%r8,%rsi,4), %r11d
movl %r11d, %esi
negl %esi
movl %esi, -0x30(%rbp)
leal 0x1(%r11), %esi
movl %esi, -0x90(%rbp)
movl $0x4, %r15d
movzbl -0x1(%rdx), %r13d
movzbl (%rdx), %r12d
movl %r13d, %esi
subl %r12d, %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
movzbl %r8b, %esi
cmpl %eax, %esi
jge 0x5f3f
movzbl -0x2(%rdx), %r9d
movl %r9d, %esi
subl %r13d, %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
cmpl %edi, %r8d
jge 0x5f3f
movzbl 0x1(%rdx), %esi
movl %esi, %r8d
subl %r12d, %r8d
movl %r8d, %ebx
negl %ebx
cmovsl %r8d, %ebx
cmpl %edi, %ebx
jge 0x5f3f
movzbl -0x3(%rdx), %r8d
movl %r8d, %r14d
subl %r13d, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
movl %r11d, %r14d
cmpl %edi, %ebx
jge 0x5e8c
leal (%r12,%r13), %ebx
incl %ebx
shrl %ebx
subl %r9d, %r8d
subl %r9d, %r8d
movzbl %bl, %ebx
addl %r8d, %ebx
sarl %ebx
movl %ebx, %r8d
cmpl %r11d, %ebx
jl 0x5e73
movl %r11d, %r8d
movl -0x30(%rbp), %r10d
cmpl %r10d, %ebx
cmovll %r10d, %r8d
addb %r9b, %r8b
movb %r8b, -0x2(%rdx)
movl -0x90(%rbp), %r14d
movzbl 0x2(%rdx), %r10d
movl %r10d, %r8d
subl %r12d, %r8d
movl %r8d, %ebx
negl %ebx
cmovsl %r8d, %ebx
cmpl %edi, %ebx
jge 0x5edb
leal (%r12,%r13), %r8d
incl %r8d
shrl %r8d
movzbl %r8b, %ebx
addl %r10d, %ebx
subl %esi, %ebx
subl %esi, %ebx
sarl %ebx
movl %ebx, %r8d
cmpl %r11d, %ebx
jl 0x5ec6
movl %r11d, %r8d
movl -0x30(%rbp), %r10d
cmpl %r10d, %ebx
cmovll %r10d, %r8d
addb %sil, %r8b
movb %r8b, 0x1(%rdx)
incl %r14d
movl %r12d, %r8d
subl %r13d, %r8d
subl %esi, %r9d
leal (%r9,%r8,4), %esi
addl $0x4, %esi
sarl $0x3, %esi
movl %r14d, %r8d
negl %r8d
cmpl %r14d, %esi
cmovll %esi, %r14d
cmpl %r8d, %esi
cmovll %r8d, %r14d
addl %r14d, %r13d
testl %r13d, %r13d
setg %sil
negb %sil
movl $0x100, %r8d            # imm = 0x100
cmpl %r8d, %r13d
movzbl %sil, %esi
cmovbl %r13d, %esi
movb %sil, -0x1(%rdx)
subl %r14d, %r12d
testl %r12d, %r12d
setg %sil
negb %sil
cmpl %r8d, %r12d
movzbl %sil, %esi
cmovbl %r12d, %esi
movb %sil, (%rdx)
addq %rcx, %rdx
decl %r15d
jne 0x5dd9
jmp 0x60ef
addq -0x60(%rbp), %rdx
jmp 0x60ef
movl $0x4, %r11d
movzbl -0x1(%rdx), %r15d
movzbl (%rdx), %ebx
movl %r15d, %esi
subl %ebx, %esi
movl %esi, %r8d
negl %r8d
cmovsl %esi, %r8d
movzbl %r8b, %r8d
cmpl %eax, %r8d
jge 0x60e3
movzbl -0x2(%rdx), %r14d
movl %r14d, %esi
subl %r15d, %esi
movl %esi, %r9d
negl %r9d
cmovsl %esi, %r9d
cmpl %edi, %r9d
jge 0x60e3
movzbl 0x1(%rdx), %r9d
movl %r9d, %esi
subl %ebx, %esi
movl %esi, %r10d
negl %r10d
cmovsl %esi, %r10d
cmpl %edi, %r10d
jge 0x60e3
leaq -0x1(%rdx), %rsi
cmpl -0x48(%rbp), %r8d
jae 0x603d
movzbl -0x3(%rdx), %r8d
movl %r8d, %r10d
subl %r15d, %r10d
movl %r10d, %r12d
negl %r12d
cmovsl %r10d, %r12d
cmpl %edi, %r12d
jge 0x605c
leaq -0x3(%rdx), %rsi
movzbl -0x4(%rdx), %r10d
movq %r10, -0x30(%rbp)
leal (%rbx,%r15), %r10d
leal (%r10,%r14), %r13d
leal (%r9,%r8), %r12d
leal (%r12,%r13,2), %r12d
addl $0x4, %r12d
shrl $0x3, %r12d
movb %r12b, -0x1(%rdx)
leal (%r14,%r8), %r12d
addl %r12d, %r10d
addl $0x2, %r10d
shrl $0x2, %r10d
movb %r10b, -0x2(%rdx)
leal (%r8,%r8,2), %r8d
addl %r14d, %r8d
addl %r15d, %r8d
addl %ebx, %r8d
movq -0x30(%rbp), %r10
leal (%r8,%r10,2), %r12d
addl $0x4, %r12d
shrl $0x3, %r12d
jmp 0x606c
leal (%r15,%r14,2), %r8d
addl %r9d, %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movb %r8b, (%rsi)
addl %r14d, %ebx
leal (%rbx,%r9,2), %r8d
addl $0x2, %r8d
jmp 0x60d9
leal (%r15,%r14,2), %r8d
leal (%r9,%r8), %r12d
addl $0x2, %r12d
shrl $0x2, %r12d
movzbl 0x2(%rdx), %r8d
movb %r12b, (%rsi)
movl %r8d, %esi
subl %ebx, %esi
movl %esi, %r10d
negl %r10d
cmovsl %esi, %r10d
cmpl %edi, %r10d
jge 0x60ce
leaq 0x2(%rdx), %rsi
movzbl 0x3(%rdx), %r10d
addl %r15d, %ebx
addl %r9d, %ebx
addl %r8d, %r14d
leal (%r14,%rbx,2), %r9d
addl $0x4, %r9d
shrl $0x3, %r9d
movb %r9b, (%rdx)
leal (%r8,%rbx), %r9d
addl $0x2, %r9d
shrl $0x2, %r9d
movb %r9b, 0x1(%rdx)
leal (%r8,%r8,2), %r8d
addl %ebx, %r8d
leal (%r8,%r10,2), %r8d
addl $0x4, %r8d
shrl $0x3, %r8d
jmp 0x60e0
addl %ebx, %r14d
leal (%r14,%r9,2), %r8d
addl $0x2, %r8d
shrl $0x2, %r8d
movq %rdx, %rsi
movb %r8b, (%rsi)
addq %rcx, %rdx
decl %r11d
jne 0x5f5f
movq -0x38(%rbp), %r8
incq %r8
cmpq $0x4, %r8
jne 0x5d8e
movq -0x50(%rbp), %r9
testb $0x1, %r9b
jne 0x61a8
movq -0x78(%rbp), %r13
movslq 0x2b0(%r13), %rax
leaq 0x1f230(%rip), %rdx     # 0x25350
movl (%rdx,%rax,4), %eax
movq -0x88(%rbp), %rcx
movslq 0x2b0(%rcx), %rcx
movl (%rdx,%rcx,4), %ecx
leal (%rax,%rcx), %r12d
incl %r12d
sarl %r12d
movq -0x40(%rbp), %r14
movq 0x10efe0(%r14), %rax
movl 0x28(%rax), %edx
movl 0x4(%r13), %ecx
imull %edx, %ecx
addl (%r13), %ecx
leal (%r9,%r9), %ebx
leal (%rbx,%rcx,8), %ecx
movslq %ecx, %rsi
addq 0x50(%rax), %rsi
movq %r14, %rdi
leaq -0x70(%rbp), %r15
movq %r15, %rcx
movl %r12d, %r8d
callq 0x6224
movq 0x10efe0(%r14), %rax
movl 0x2c(%rax), %edx
movl 0x4(%r13), %ecx
imull %edx, %ecx
addl (%r13), %ecx
leal (%rbx,%rcx,8), %ecx
movslq %ecx, %rsi
addq 0x58(%rax), %rsi
movq %r14, %rdi
movq %r15, %rcx
movl %r12d, %r8d
callq 0x6224
movq -0x50(%rbp), %r9
incl %r9d
cmpl $0x4, %r9d
leaq 0x1f14a(%rip), %rsi     # 0x25300
movq -0x78(%rbp), %rdx
movq -0xa8(%rbp), %rdi
jne 0x5549
leal 0x1(%rdi), %eax
testl %edi, %edi
movl %eax, %edi
je 0x5513
movq -0xc0(%rbp), %rdx
incq %rdx
movq -0x40(%rbp), %rax
movq 0x8ed8(%rax), %rax
movslq 0x43c(%rax), %rcx
movslq 0x440(%rax), %rax
imulq %rcx, %rax
movq %rdx, %rcx
cmpq %rax, %rdx
jl 0x54c4
jmp 0x6212
leaq -0x70(%rbp), %rdi
callq 0x252e
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq