// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/sw_striped_sse2_128_16.c
// Function: parasail_sw_rowcol_striped_profile_sse2_128_16
parasail_result_t* PNAME(
        const parasail_profile_t * const restrict profile,
        const char * const restrict s2, const int s2Len,
        const int open, const int gap)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 0;
    int32_t k = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    int32_t s1Len = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
#ifdef PARASAIL_ROWCOL
    int32_t offset = 0;
    int32_t position = 0;
#endif
    __m128i* restrict vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvHMax = NULL;
    __m128i* restrict pvE = NULL;
    __m128i vGapO;
    __m128i vGapE;
    __m128i vZero;
    int16_t bias = 0;
    int16_t score = 0;
    __m128i vBias;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    int16_t maxp = 0;
    __m128i insert_mask;
    /*int16_t stop = 0;*/
    parasail_result_t *result = NULL;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile16.score);
    PARASAIL_CHECK_NULL(profile->matrix);
    PARASAIL_CHECK_GT0(profile->s1Len);
    PARASAIL_CHECK_NULL(s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);

    /* initialize stack variables */
    i = 0;
    j = 0;
    k = 0;
    end_query = 0;
    end_ref = 0;
    s1Len = profile->s1Len;
    matrix = profile->matrix;
    segWidth = 8; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
#ifdef PARASAIL_ROWCOL
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
#endif
    vProfile = (__m128i*)profile->profile16.score;
    vGapO = _mm_set1_epi16(open);
    vGapE = _mm_set1_epi16(gap);
    vZero = _mm_set1_epi16(0);
    bias = INT16_MIN;
    score = bias;
    vBias = _mm_set1_epi16(bias);
    vMaxH = vBias;
    vMaxHUnit = vBias;
    maxp = INT16_MAX - (int16_t)(matrix->max+1);
    insert_mask = _mm_cmpgt_epi16(
            _mm_set_epi16(0,0,0,0,0,0,0,1),
            vZero);
    /*stop = profile->stop == INT32_MAX ?  INT16_MAX : (int16_t)profile->stop-bias;*/

    /* initialize result */
#ifdef PARASAIL_TABLE
    result = parasail_result_new_table1(segLen*segWidth, s2Len);
#else
#ifdef PARASAIL_ROWCOL
    result = parasail_result_new_rowcol1(segLen*segWidth, s2Len);
#else
    result = parasail_result_new();
#endif
#endif
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_BITS_16 | PARASAIL_FLAG_LANES_8;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);
    pvE = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvHStore) return NULL;
    if (!pvHLoad) return NULL;
    if (!pvHMax) return NULL;
    if (!pvE) return NULL;

    /* initialize H and E */
    parasail_memset___m128i(pvHStore, vBias, segLen);
    parasail_memset___m128i(pvE, vBias, segLen);

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vF;
        __m128i vH;
        const __m128i* vP = NULL;
        __m128i* pv = NULL;

        /* Initialize F value to 0.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        vF = vBias;

        /* load final segment of pvHStore and shift left by 2 bytes */
        vH = _mm_slli_si128(pvHStore[segLen - 1], 2);
        vH = _mm_blendv_epi8_rpl(vH, vBias, insert_mask);

        /* Correct part of the vProfile */
        vP = vProfile + matrix->mapper[(unsigned char)s2[j]] * segLen;

        if (end_ref == j-2) {
            /* Swap in the max buffer. */
            pv = pvHMax;
            pvHMax = pvHLoad;
            pvHLoad = pvHStore;
            pvHStore = pv;
        }
        else {
            /* Swap the 2 H buffers. */
            pv = pvHLoad;
            pvHLoad = pvHStore;
            pvHStore = pv;
        }

        /* inner loop to process the query sequence */
        for (i=0; i<segLen; ++i) {
            vH = _mm_adds_epi16(vH, _mm_load_si128(vP + i));
            vE = _mm_load_si128(pvE + i);

            /* Get max from vH, vE and vF. */
            vH = _mm_max_epi16(vH, vE);
            vH = _mm_max_epi16(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len, bias);
#endif
            vMaxH = _mm_max_epi16(vH, vMaxH);

            /* Update vE value. */
            vH = _mm_subs_epi16(vH, vGapO);
            vE = _mm_subs_epi16(vE, vGapE);
            vE = _mm_max_epi16(vE, vH);
            _mm_store_si128(pvE + i, vE);

            /* Update vF value. */
            vF = _mm_subs_epi16(vF, vGapE);
            vF = _mm_max_epi16(vF, vH);

            /* Load the next vH. */
            vH = _mm_load_si128(pvHLoad + i);
        }

        /* Lazy_F loop: has been revised to disallow adjecent insertion and
         * then deletion, so don't update E(i, i), learn from SWPS3 */
        for (k=0; k<segWidth; ++k) {
            vF = _mm_slli_si128(vF, 2);
            vF = _mm_blendv_epi8_rpl(vF, vBias, insert_mask);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi16(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
                arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len, bias);
#endif
                vMaxH = _mm_max_epi16(vH, vMaxH);
                vH = _mm_subs_epi16(vH, vGapO);
                vF = _mm_subs_epi16(vF, vGapE);
                if (! _mm_movemask_epi8(_mm_cmpgt_epi16(vF, vH))) goto end;
                /*vF = _mm_max_epi16(vF, vH);*/
            }
        }
end:
        {
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            vH = _mm_load_si128(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 2);
            }
            result->rowcols->score_row[j] = (int16_t) _mm_extract_epi16 (vH, 7) - bias;
        }
#endif

        {
            __m128i vCompare = _mm_cmpgt_epi16(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi16_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm_set1_epi16(score);
                end_ref = j;
            }
        }

        /*if (score == stop) break;*/
    }

#ifdef PARASAIL_ROWCOL
    for (i=0; i<segLen; ++i) {
        __m128i vH = _mm_load_si128(pvHStore+i);
        arr_store_col(result->rowcols->score_col, vH, i, segLen, bias);
    }
#endif

    if (score == INT16_MAX) {
        result->flag |= PARASAIL_FLAG_SATURATED;
    }

    if (parasail_result_is_saturated(result)) {
        score = INT16_MAX;
        end_query = 0;
        end_ref = 0;
    }
    else {
        if (end_ref == j-1) {
            /* end_ref was the last store column */
            __m128i *pv = pvHMax;
            pvHMax = pvHStore;
            pvHStore = pv;
        }
        else if (end_ref == j-2) {
            /* end_ref was the last load column */
            __m128i *pv = pvHMax;
            pvHMax = pvHLoad;
            pvHLoad = pv;
        }
        /* Trace the alignment ending position on read. */
        {
            int16_t *t = (int16_t*)pvHMax;
            int32_t column_len = segLen * segWidth;
            end_query = s1Len - 1;
            for (i = 0; i<column_len; ++i, ++t) {
                if (*t == score) {
                    int32_t temp = i / segWidth + i % segWidth * segLen;
                    if (temp < end_query) {
                        end_query = temp;
                    }
                }
            }
        }
    }

    result->score = score - bias;
    result->end_query = end_query;
    result->end_ref = end_ref;

    parasail_free(pvE);
    parasail_free(pvHMax);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x530, %rsp            # imm = 0x530
movq %rdi, -0x390(%rbp)
movq %rsi, -0x398(%rbp)
movl %edx, -0x39c(%rbp)
movl %ecx, -0x3a0(%rbp)
movl %r8d, -0x3a4(%rbp)
movl $0x0, -0x3a8(%rbp)
movl $0x0, -0x3ac(%rbp)
movl $0x0, -0x3b0(%rbp)
movl $0x0, -0x3b4(%rbp)
movl $0x0, -0x3b8(%rbp)
movl $0x0, -0x3bc(%rbp)
movq $0x0, -0x3c8(%rbp)
movl $0x0, -0x3cc(%rbp)
movl $0x0, -0x3d0(%rbp)
movl $0x0, -0x3d4(%rbp)
movl $0x0, -0x3d8(%rbp)
movq $0x0, -0x3e0(%rbp)
movq $0x0, -0x3e8(%rbp)
movq $0x0, -0x3f0(%rbp)
movq $0x0, -0x3f8(%rbp)
movq $0x0, -0x400(%rbp)
movw $0x0, -0x432(%rbp)
movw $0x0, -0x434(%rbp)
movw $0x0, -0x472(%rbp)
movq $0x0, -0x498(%rbp)
cmpq $0x0, -0x390(%rbp)
jne 0x49f928
movq 0x9876df(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84c6e8(%rip), %rsi    # 0xcebfeb
leaq 0x83ad5c(%rip), %rdx    # 0xcda666
leaq 0x822bcc(%rip), %rcx    # 0xcc24dd
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49f92a
jmp 0x49f92c
movq -0x390(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x49f970
movq 0x987697(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84c6a0(%rip), %rsi    # 0xcebfeb
leaq 0x83ad14(%rip), %rdx    # 0xcda666
leaq 0x84d097(%rip), %rcx    # 0xcec9f0
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49f972
jmp 0x49f974
movq -0x390(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x49f9b8
movq 0x98764f(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84c658(%rip), %rsi    # 0xcebfeb
leaq 0x83accc(%rip), %rdx    # 0xcda666
leaq 0x84cf7b(%rip), %rcx    # 0xcec91c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49f9ba
jmp 0x49f9bc
movq -0x390(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x49f9ff
movq 0x987608(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84cd27(%rip), %rsi    # 0xcec701
leaq 0x83ac85(%rip), %rdx    # 0xcda666
leaq 0x84cf44(%rip), %rcx    # 0xcec92c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49fa01
jmp 0x49fa03
cmpq $0x0, -0x398(%rbp)
jne 0x49fa43
movq 0x9875c4(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84c5cd(%rip), %rsi    # 0xcebfeb
leaq 0x83ac41(%rip), %rdx    # 0xcda666
leaq 0x84ccd2(%rip), %rcx    # 0xcec6fe
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49fa45
jmp 0x49fa47
cmpl $0x0, -0x39c(%rbp)
jg 0x49fa86
movq 0x987581(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84cca0(%rip), %rsi    # 0xcec701
leaq 0x83abfe(%rip), %rdx    # 0xcda666
leaq 0x84cca6(%rip), %rcx    # 0xcec715
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49fa88
jmp 0x49fa8a
cmpl $0x0, -0x3a0(%rbp)
jge 0x49fac9
movq 0x98753e(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84cc77(%rip), %rsi    # 0xcec71b
leaq 0x83abbb(%rip), %rdx    # 0xcda666
leaq 0x84cc7e(%rip), %rcx    # 0xcec730
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49facb
jmp 0x49facd
cmpl $0x0, -0x3a4(%rbp)
jge 0x49fb0c
movq 0x9874fb(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x84cc34(%rip), %rsi    # 0xcec71b
leaq 0x83ab78(%rip), %rdx    # 0xcda666
leaq 0x84cc40(%rip), %rcx    # 0xcec735
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
jmp 0x49fb0e
movl $0x0, -0x3a8(%rbp)
movl $0x0, -0x3ac(%rbp)
movl $0x0, -0x3b0(%rbp)
movl $0x0, -0x3b4(%rbp)
movl $0x0, -0x3b8(%rbp)
movq -0x390(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3bc(%rbp)
movq -0x390(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x3c8(%rbp)
movl $0x8, -0x3cc(%rbp)
movl -0x3bc(%rbp), %esi
movl -0x3cc(%rbp), %ecx
movl %ecx, %edx
movl %esi, %eax
leal -0x1(%rax,%rdx), %eax
cltd
idivl %ecx
movl %eax, -0x3d0(%rbp)
movl -0x3bc(%rbp), %eax
decl %eax
movl -0x3d0(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x3d4(%rbp)
movl -0x3cc(%rbp), %ecx
movl -0x3bc(%rbp), %eax
decl %eax
movl -0x3d0(%rbp), %esi
cltd
idivl %esi
notl %eax
addl %ecx, %eax
movl %eax, -0x3d8(%rbp)
movq -0x390(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x3e0(%rbp)
movw -0x3a0(%rbp), %ax
movw %ax, -0x372(%rbp)
movw -0x372(%rbp), %ax
movw %ax, -0x528(%rbp)
movw %ax, -0x2f2(%rbp)
movw %ax, -0x2f4(%rbp)
movw %ax, -0x2f6(%rbp)
movw %ax, -0x2f8(%rbp)
movw %ax, -0x2fa(%rbp)
movw %ax, -0x2fc(%rbp)
movw %ax, -0x2fe(%rbp)
movw %ax, -0x300(%rbp)
movzwl -0x2f2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x2f4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x2f6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x2f8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x2fa(%rbp), %eax
movd %eax, %xmm0
movzwl -0x2fc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x2fe(%rbp), %eax
movd %eax, %xmm3
movzwl -0x300(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x310(%rbp)
movaps -0x310(%rbp), %xmm0
movaps %xmm0, -0x410(%rbp)
movw -0x3a4(%rbp), %ax
movw %ax, -0x374(%rbp)
movw -0x374(%rbp), %ax
movw %ax, -0x526(%rbp)
movw %ax, -0x2d2(%rbp)
movw %ax, -0x2d4(%rbp)
movw %ax, -0x2d6(%rbp)
movw %ax, -0x2d8(%rbp)
movw %ax, -0x2da(%rbp)
movw %ax, -0x2dc(%rbp)
movw %ax, -0x2de(%rbp)
movw %ax, -0x2e0(%rbp)
movzwl -0x2d2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x2d4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x2d6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x2d8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x2da(%rbp), %eax
movd %eax, %xmm0
movzwl -0x2dc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x2de(%rbp), %eax
movd %eax, %xmm3
movzwl -0x2e0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x2f0(%rbp)
movaps -0x2f0(%rbp), %xmm0
movaps %xmm0, -0x420(%rbp)
movw $0x0, -0x376(%rbp)
movw -0x376(%rbp), %ax
movw %ax, -0x524(%rbp)
movw %ax, -0x2b2(%rbp)
movw %ax, -0x2b4(%rbp)
movw %ax, -0x2b6(%rbp)
movw %ax, -0x2b8(%rbp)
movw %ax, -0x2ba(%rbp)
movw %ax, -0x2bc(%rbp)
movw %ax, -0x2be(%rbp)
movw %ax, -0x2c0(%rbp)
movzwl -0x2b2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x2b4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x2b6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x2b8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x2ba(%rbp), %eax
movd %eax, %xmm0
movzwl -0x2bc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x2be(%rbp), %eax
movd %eax, %xmm3
movzwl -0x2c0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x2d0(%rbp)
movaps -0x2d0(%rbp), %xmm0
movaps %xmm0, -0x430(%rbp)
movw $0x8000, -0x432(%rbp)   # imm = 0x8000
movw -0x432(%rbp), %ax
movw %ax, -0x434(%rbp)
movw -0x432(%rbp), %ax
movw %ax, -0x378(%rbp)
movw -0x378(%rbp), %ax
movw %ax, -0x522(%rbp)
movw %ax, -0x292(%rbp)
movw %ax, -0x294(%rbp)
movw %ax, -0x296(%rbp)
movw %ax, -0x298(%rbp)
movw %ax, -0x29a(%rbp)
movw %ax, -0x29c(%rbp)
movw %ax, -0x29e(%rbp)
movw %ax, -0x2a0(%rbp)
movzwl -0x292(%rbp), %eax
movd %eax, %xmm1
movzwl -0x294(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x296(%rbp), %eax
movd %eax, %xmm2
movzwl -0x298(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x29a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x29c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x29e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x2a0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x2b0(%rbp)
movaps -0x2b0(%rbp), %xmm0
movaps %xmm0, -0x450(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x460(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x470(%rbp)
movq -0x3c8(%rbp), %rax
movl 0x1c(%rax), %eax
incl %eax
xorl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, -0x472(%rbp)
movw $0x0, -0x252(%rbp)
movw $0x0, -0x254(%rbp)
movw $0x0, -0x256(%rbp)
movw $0x0, -0x258(%rbp)
movw $0x0, -0x25a(%rbp)
movw $0x0, -0x25c(%rbp)
movw $0x0, -0x25e(%rbp)
movw $0x1, -0x260(%rbp)
movzwl -0x252(%rbp), %eax
movd %eax, %xmm1
movzwl -0x254(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x256(%rbp), %eax
movd %eax, %xmm2
movzwl -0x258(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x25a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x25c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x25e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x260(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x270(%rbp)
movaps -0x270(%rbp), %xmm1
movaps -0x430(%rbp), %xmm0
movaps %xmm1, -0x320(%rbp)
movaps %xmm0, -0x330(%rbp)
movaps -0x320(%rbp), %xmm0
movaps -0x330(%rbp), %xmm1
pcmpgtw %xmm1, %xmm0
movdqa %xmm0, -0x490(%rbp)
movl -0x3d0(%rbp), %edi
imull -0x3cc(%rbp), %edi
movl -0x39c(%rbp), %esi
callq 0x1c3af0
movq %rax, -0x498(%rbp)
cmpq $0x0, -0x498(%rbp)
jne 0x4a00bf
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
movq -0x498(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x8200804, %ecx        # imm = 0x8200804
movl %ecx, 0xc(%rax)
movq -0x498(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
movl %ecx, 0xc(%rax)
movslq -0x3d0(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3e8(%rbp)
movslq -0x3d0(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3f0(%rbp)
movslq -0x3d0(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3f8(%rbp)
movslq -0x3d0(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x400(%rbp)
cmpq $0x0, -0x3e8(%rbp)
jne 0x4a015f
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
cmpq $0x0, -0x3f0(%rbp)
jne 0x4a0179
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
cmpq $0x0, -0x3f8(%rbp)
jne 0x4a0193
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
cmpq $0x0, -0x400(%rbp)
jne 0x4a01ad
movq $0x0, -0x388(%rbp)
jmp 0x4a0d35
movq -0x3e8(%rbp), %rdi
movdqa -0x450(%rbp), %xmm0
movslq -0x3d0(%rbp), %rsi
callq 0x381e50
movq -0x400(%rbp), %rdi
movdqa -0x450(%rbp), %xmm0
movslq -0x3d0(%rbp), %rsi
callq 0x381e50
movl $0x0, -0x3ac(%rbp)
movl -0x3ac(%rbp), %eax
cmpl -0x39c(%rbp), %eax
jge 0x4a0a8c
movq $0x0, -0x4d8(%rbp)
movq $0x0, -0x4e0(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x4c0(%rbp)
movq -0x3e8(%rbp), %rax
movl -0x3d0(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x4d0(%rbp)
movdqa -0x4d0(%rbp), %xmm0
movdqa -0x450(%rbp), %xmm1
movdqa -0x490(%rbp), %xmm2
callq 0x4a0d50
movdqa %xmm0, -0x4d0(%rbp)
movq -0x3e0(%rbp), %rax
movq -0x3c8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x398(%rbp), %rdx
movslq -0x3ac(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
movl (%rcx,%rdx,4), %ecx
imull -0x3d0(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x4d8(%rbp)
movl -0x3b8(%rbp), %eax
movl -0x3ac(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x4a02fb
movq -0x3f8(%rbp), %rax
movq %rax, -0x4e0(%rbp)
movq -0x3f0(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x3e8(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq -0x4e0(%rbp), %rax
movq %rax, -0x3e8(%rbp)
jmp 0x4a0325
movq -0x3f0(%rbp), %rax
movq %rax, -0x4e0(%rbp)
movq -0x3e8(%rbp), %rax
movq %rax, -0x3f0(%rbp)
movq -0x4e0(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movl $0x0, -0x3a8(%rbp)
movl -0x3a8(%rbp), %eax
cmpl -0x3d0(%rbp), %eax
jge 0x4a0648
movdqa -0x4d0(%rbp), %xmm1
movq -0x4d8(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x240(%rbp)
movdqa %xmm0, -0x250(%rbp)
movdqa -0x240(%rbp), %xmm0
movdqa -0x250(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movq -0x400(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x4b0(%rbp)
movdqa -0x4d0(%rbp), %xmm1
movdqa -0x4b0(%rbp), %xmm0
movdqa %xmm1, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm0
movdqa -0x140(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movdqa -0x4d0(%rbp), %xmm1
movdqa -0x4c0(%rbp), %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movq -0x3e8(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x4d0(%rbp), %xmm0
movq %rax, -0xc8(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xe0(%rbp), %xmm0
movq -0xc8(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x4d0(%rbp), %xmm1
movdqa -0x460(%rbp), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x460(%rbp)
movdqa -0x4d0(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x30(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x30(%rbp), %xmm0
movdqa -0x40(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movdqa -0x4b0(%rbp), %xmm1
movdqa -0x420(%rbp), %xmm0
movdqa %xmm1, -0x50(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x50(%rbp), %xmm0
movdqa -0x60(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x4b0(%rbp)
movdqa -0x4b0(%rbp), %xmm1
movdqa -0x4d0(%rbp), %xmm0
movdqa %xmm1, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x4b0(%rbp)
movq -0x400(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x4b0(%rbp), %xmm0
movq %rax, -0xe8(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0x100(%rbp), %xmm0
movq -0xe8(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x4c0(%rbp), %xmm1
movdqa -0x420(%rbp), %xmm0
movdqa %xmm1, -0x70(%rbp)
movdqa %xmm0, -0x80(%rbp)
movdqa -0x70(%rbp), %xmm0
movdqa -0x80(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x4c0(%rbp)
movdqa -0x4c0(%rbp), %xmm1
movdqa -0x4d0(%rbp), %xmm0
movdqa %xmm1, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movdqa -0x1c0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x4c0(%rbp)
movq -0x3f0(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movl -0x3a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3a8(%rbp)
jmp 0x4a032f
movl $0x0, -0x3b0(%rbp)
movl -0x3b0(%rbp), %eax
cmpl -0x3cc(%rbp), %eax
jge 0x4a0864
movaps -0x4c0(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x4c0(%rbp)
movdqa -0x4c0(%rbp), %xmm0
movdqa -0x450(%rbp), %xmm1
movdqa -0x490(%rbp), %xmm2
callq 0x4a0d50
movdqa %xmm0, -0x4c0(%rbp)
movl $0x0, -0x3a8(%rbp)
movl -0x3a8(%rbp), %eax
cmpl -0x3d0(%rbp), %eax
jge 0x4a084e
movq -0x3e8(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x4d0(%rbp)
movaps -0x4d0(%rbp), %xmm1
movaps -0x4c0(%rbp), %xmm0
movaps %xmm1, -0x1d0(%rbp)
movaps %xmm0, -0x1e0(%rbp)
movaps -0x1d0(%rbp), %xmm0
movaps -0x1e0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x4d0(%rbp)
movq -0x3e8(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps -0x4d0(%rbp), %xmm0
movq %rax, -0x108(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps -0x120(%rbp), %xmm0
movq -0x108(%rbp), %rax
movaps %xmm0, (%rax)
movaps -0x4d0(%rbp), %xmm1
movaps -0x460(%rbp), %xmm0
movaps %xmm1, -0x1f0(%rbp)
movaps %xmm0, -0x200(%rbp)
movaps -0x1f0(%rbp), %xmm0
movaps -0x200(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movaps %xmm0, -0x460(%rbp)
movaps -0x4d0(%rbp), %xmm1
movaps -0x410(%rbp), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
psubsw %xmm1, %xmm0
movaps %xmm0, -0x4d0(%rbp)
movaps -0x4c0(%rbp), %xmm1
movaps -0x420(%rbp), %xmm0
movaps %xmm1, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
psubsw %xmm1, %xmm0
movaps %xmm0, -0x4c0(%rbp)
movaps -0x4c0(%rbp), %xmm1
movaps -0x4d0(%rbp), %xmm0
movaps %xmm1, -0x340(%rbp)
movaps %xmm0, -0x350(%rbp)
movaps -0x340(%rbp), %xmm0
movaps -0x350(%rbp), %xmm1
pcmpgtw %xmm1, %xmm0
movdqa %xmm0, -0x10(%rbp)
movdqa -0x10(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
jne 0x4a0838
jmp 0x4a0866
jmp 0x4a083a
movl -0x3a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3a8(%rbp)
jmp 0x4a06a7
jmp 0x4a0850
movl -0x3b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3b0(%rbp)
jmp 0x4a0652
jmp 0x4a0866
movq -0x3e8(%rbp), %rax
movslq -0x3d4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x4d0(%rbp)
movl $0x0, -0x3b0(%rbp)
movl -0x3b0(%rbp), %eax
cmpl -0x3d8(%rbp), %eax
jge 0x4a08d2
movaps -0x4d0(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x4d0(%rbp)
movl -0x3b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3b0(%rbp)
jmp 0x4a089f
movswl -0x4c2(%rbp), %edx
movswl -0x432(%rbp), %eax
subl %eax, %edx
movq -0x498(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movslq -0x3ac(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movaps -0x460(%rbp), %xmm1
movaps -0x470(%rbp), %xmm0
movaps %xmm1, -0x360(%rbp)
movaps %xmm0, -0x370(%rbp)
movaps -0x360(%rbp), %xmm0
movaps -0x370(%rbp), %xmm1
pcmpgtw %xmm1, %xmm0
movdqa %xmm0, -0x4f0(%rbp)
movdqa -0x4f0(%rbp), %xmm0
movdqa %xmm0, -0x20(%rbp)
movdqa -0x20(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x4a0a76
movdqa -0x460(%rbp), %xmm0
callq 0x4a0de0
movw %ax, -0x434(%rbp)
movswl -0x434(%rbp), %eax
movswl -0x472(%rbp), %ecx
cmpl %ecx, %eax
jle 0x4a098a
movq -0x498(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
jmp 0x4a0a8c
movw -0x434(%rbp), %ax
movw %ax, -0x37a(%rbp)
movw -0x37a(%rbp), %ax
movw %ax, -0x52a(%rbp)
movw %ax, -0x272(%rbp)
movw %ax, -0x274(%rbp)
movw %ax, -0x276(%rbp)
movw %ax, -0x278(%rbp)
movw %ax, -0x27a(%rbp)
movw %ax, -0x27c(%rbp)
movw %ax, -0x27e(%rbp)
movw %ax, -0x280(%rbp)
movzwl -0x272(%rbp), %eax
movd %eax, %xmm1
movzwl -0x274(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x276(%rbp), %eax
movd %eax, %xmm2
movzwl -0x278(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x27a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x27c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x27e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x280(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x290(%rbp)
movdqa -0x290(%rbp), %xmm0
movdqa %xmm0, -0x470(%rbp)
movl -0x3ac(%rbp), %eax
movl %eax, -0x3b8(%rbp)
jmp 0x4a0a78
movl -0x3ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3ac(%rbp)
jmp 0x4a01ed
movl $0x0, -0x3a8(%rbp)
movl -0x3a8(%rbp), %eax
cmpl -0x3d0(%rbp), %eax
jge 0x4a0b13
movq -0x3e8(%rbp), %rax
movslq -0x3a8(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x500(%rbp)
movq -0x498(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movdqa -0x500(%rbp), %xmm0
movl -0x3a8(%rbp), %esi
movl -0x3d0(%rbp), %edx
movswl -0x432(%rbp), %ecx
callq 0x4a0e60
movl -0x3a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3a8(%rbp)
jmp 0x4a0a96
movswl -0x434(%rbp), %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
jne 0x4a0b31
movq -0x498(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
movq -0x498(%rbp), %rdi
callq 0x1c6390
cmpl $0x0, %eax
je 0x4a0b64
movw $0x7fff, -0x434(%rbp)   # imm = 0x7FFF
movl $0x0, -0x3b4(%rbp)
movl $0x0, -0x3b8(%rbp)
jmp 0x4a0cbe
movl -0x3b8(%rbp), %eax
movl -0x3ac(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4a0ba3
movq -0x3f8(%rbp), %rax
movq %rax, -0x508(%rbp)
movq -0x3e8(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x508(%rbp), %rax
movq %rax, -0x3e8(%rbp)
jmp 0x4a0be2
movl -0x3b8(%rbp), %eax
movl -0x3ac(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x4a0be0
movq -0x3f8(%rbp), %rax
movq %rax, -0x510(%rbp)
movq -0x3f0(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x3f0(%rbp)
jmp 0x4a0be2
movq -0x3f8(%rbp), %rax
movq %rax, -0x518(%rbp)
movl -0x3d0(%rbp), %eax
imull -0x3cc(%rbp), %eax
movl %eax, -0x51c(%rbp)
movl -0x3bc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x3b4(%rbp)
movl $0x0, -0x3a8(%rbp)
movl -0x3a8(%rbp), %eax
cmpl -0x51c(%rbp), %eax
jge 0x4a0cbc
movq -0x518(%rbp), %rax
movswl (%rax), %eax
movswl -0x434(%rbp), %ecx
cmpl %ecx, %eax
jne 0x4a0c94
movl -0x3a8(%rbp), %eax
cltd
idivl -0x3cc(%rbp)
movl %eax, -0x530(%rbp)
movl -0x3a8(%rbp), %eax
cltd
idivl -0x3cc(%rbp)
movl -0x530(%rbp), %eax
imull -0x3d0(%rbp), %edx
addl %edx, %eax
movl %eax, -0x520(%rbp)
movl -0x520(%rbp), %eax
cmpl -0x3b4(%rbp), %eax
jge 0x4a0c92
movl -0x520(%rbp), %eax
movl %eax, -0x3b4(%rbp)
jmp 0x4a0c94
jmp 0x4a0c96
movl -0x3a8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3a8(%rbp)
movq -0x518(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x518(%rbp)
jmp 0x4a0c1c
jmp 0x4a0cbe
movswl -0x434(%rbp), %ecx
movswl -0x432(%rbp), %eax
subl %eax, %ecx
movq -0x498(%rbp), %rax
movl %ecx, (%rax)
movl -0x3b4(%rbp), %ecx
movq -0x498(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x3b8(%rbp), %ecx
movq -0x498(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x400(%rbp), %rdi
callq 0x1c3590
movq -0x3f8(%rbp), %rdi
callq 0x1c3590
movq -0x3f0(%rbp), %rdi
callq 0x1c3590
movq -0x3e8(%rbp), %rdi
callq 0x1c3590
movq -0x498(%rbp), %rax
movq %rax, -0x388(%rbp)
movq -0x388(%rbp), %rax
addq $0x530, %rsp            # imm = 0x530
popq %rbp
retq
nopw %cs:(%rax,%rax)