// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/sw_striped_sse2_128_64.c
// Function: parasail_sw_rowcol_striped_profile_sse2_128_64
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;
    __m128i vNegInf;
    int64_t score = 0;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    int64_t maxp = 0;
    /*int64_t stop = 0;*/
    parasail_result_t *result = NULL;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile64.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 = 2; /* 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->profile64.score;
    vGapO = _mm_set1_epi64x_rpl(open);
    vGapE = _mm_set1_epi64x_rpl(gap);
    vZero = _mm_setzero_si128();
    vNegInf = _mm_set1_epi64x_rpl(NEG_INF);
    score = NEG_INF;
    vMaxH = vNegInf;
    vMaxHUnit = vNegInf;
    maxp = INT64_MAX - (int64_t)(matrix->max+1);
    /*stop = profile->stop == INT32_MAX ?  INT64_MAX : (int64_t)profile->stop;*/

    /* 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_64 | PARASAIL_FLAG_LANES_2;
#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, vZero, segLen);
    parasail_memset___m128i(pvE, _mm_set1_epi64x_rpl(-open), 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 = vZero;

        /* load final segment of pvHStore and shift left by 8 bytes */
        vH = _mm_load_si128(&pvHStore[segLen - 1]);
        vH = _mm_slli_si128(vH, 8);

        /* 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_add_epi64(vH, _mm_load_si128(vP + i));
            vE = _mm_load_si128(pvE + i);

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

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

            /* Update vF value. */
            vF = _mm_sub_epi64(vF, vGapE);
            vF = _mm_max_epi64_rpl(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, 8);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi64_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
                arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
                vH = _mm_sub_epi64(vH, vGapO);
                vF = _mm_sub_epi64(vF, vGapE);
                if (! _mm_movemask_epi8(_mm_cmpgt_epi64_rpl(vF, vH))) goto end;
                /*vF = _mm_max_epi64_rpl(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, 8);
            }
            result->rowcols->score_row[j] = (int64_t) _mm_extract_epi64_rpl (vH, 1);
        }
#endif

        {
            __m128i vCompare = _mm_cmpgt_epi64_rpl(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi64_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm_set1_epi64x_rpl(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);
    }
#endif

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

    if (parasail_result_is_saturated(result)) {
        score = INT64_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. */
        {
            int64_t *t = (int64_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;
    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 $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x268(%rbp)
movq %rsi, -0x270(%rbp)
movl %edx, -0x274(%rbp)
movl %ecx, -0x278(%rbp)
movl %r8d, -0x27c(%rbp)
movl $0x0, -0x280(%rbp)
movl $0x0, -0x284(%rbp)
movl $0x0, -0x288(%rbp)
movl $0x0, -0x28c(%rbp)
movl $0x0, -0x290(%rbp)
movl $0x0, -0x294(%rbp)
movq $0x0, -0x2a0(%rbp)
movl $0x0, -0x2a4(%rbp)
movl $0x0, -0x2a8(%rbp)
movl $0x0, -0x2ac(%rbp)
movl $0x0, -0x2b0(%rbp)
movq $0x0, -0x2b8(%rbp)
movq $0x0, -0x2c0(%rbp)
movq $0x0, -0x2c8(%rbp)
movq $0x0, -0x2d0(%rbp)
movq $0x0, -0x2d8(%rbp)
movq $0x0, -0x328(%rbp)
movq $0x0, -0x358(%rbp)
movq $0x0, -0x360(%rbp)
cmpq $0x0, -0x268(%rbp)
jne 0x495203
movq 0x991e04(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x856e0d(%rip), %rsi    # 0xcebfeb
leaq 0x845423(%rip), %rdx    # 0xcda608
leaq 0x82d2f1(%rip), %rcx    # 0xcc24dd
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x495205
jmp 0x495207
movq -0x268(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x49524b
movq 0x991dbc(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x856dc5(%rip), %rsi    # 0xcebfeb
leaq 0x8453db(%rip), %rdx    # 0xcda608
leaq 0x8576cf(%rip), %rcx    # 0xcec903
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x49524d
jmp 0x49524f
movq -0x268(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x495293
movq 0x991d74(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x856d7d(%rip), %rsi    # 0xcebfeb
leaq 0x845393(%rip), %rdx    # 0xcda608
leaq 0x8576a0(%rip), %rcx    # 0xcec91c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x495295
jmp 0x495297
movq -0x268(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x4952da
movq 0x991d2d(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x85744c(%rip), %rsi    # 0xcec701
leaq 0x84534c(%rip), %rdx    # 0xcda608
leaq 0x857669(%rip), %rcx    # 0xcec92c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x4952dc
jmp 0x4952de
cmpq $0x0, -0x270(%rbp)
jne 0x49531e
movq 0x991ce9(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x856cf2(%rip), %rsi    # 0xcebfeb
leaq 0x845308(%rip), %rdx    # 0xcda608
leaq 0x8573f7(%rip), %rcx    # 0xcec6fe
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x495320
jmp 0x495322
cmpl $0x0, -0x274(%rbp)
jg 0x495361
movq 0x991ca6(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8573c5(%rip), %rsi    # 0xcec701
leaq 0x8452c5(%rip), %rdx    # 0xcda608
leaq 0x8573cb(%rip), %rcx    # 0xcec715
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x495363
jmp 0x495365
cmpl $0x0, -0x278(%rbp)
jge 0x4953a4
movq 0x991c63(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x85739c(%rip), %rsi    # 0xcec71b
leaq 0x845282(%rip), %rdx    # 0xcda608
leaq 0x8573a3(%rip), %rcx    # 0xcec730
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x4953a6
jmp 0x4953a8
cmpl $0x0, -0x27c(%rbp)
jge 0x4953e7
movq 0x991c20(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x857359(%rip), %rsi    # 0xcec71b
leaq 0x84523f(%rip), %rdx    # 0xcda608
leaq 0x857365(%rip), %rcx    # 0xcec735
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x260(%rbp)
jmp 0x496134
jmp 0x4953e9
movl $0x0, -0x280(%rbp)
movl $0x0, -0x284(%rbp)
movl $0x0, -0x288(%rbp)
movl $0x0, -0x28c(%rbp)
movl $0x0, -0x290(%rbp)
movq -0x268(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x294(%rbp)
movq -0x268(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x2a0(%rbp)
movl $0x2, -0x2a4(%rbp)
movl -0x294(%rbp), %esi
movl -0x2a4(%rbp), %ecx
movl %ecx, %edx
movl %esi, %eax
leal -0x1(%rax,%rdx), %eax
cltd
idivl %ecx
movl %eax, -0x2a8(%rbp)
movl -0x294(%rbp), %eax
decl %eax
movl -0x2a8(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x2ac(%rbp)
movl -0x2a4(%rbp), %ecx
movl -0x294(%rbp), %eax
decl %eax
movl -0x2a8(%rbp), %esi
cltd
idivl %esi
notl %eax
addl %ecx, %eax
movl %eax, -0x2b0(%rbp)
movq -0x268(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x2b8(%rbp)
movslq -0x278(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %xmm1
movq -0x90(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0xa0(%rbp)
movaps -0xa0(%rbp), %xmm0
movaps %xmm0, -0x2f0(%rbp)
movslq -0x27c(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %xmm1
movq -0x70(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x80(%rbp)
movaps -0x80(%rbp), %xmm0
movaps %xmm0, -0x300(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x230(%rbp)
movaps -0x230(%rbp), %xmm0
movaps %xmm0, -0x310(%rbp)
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %xmm1
movq -0x50(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x60(%rbp)
movdqa -0x60(%rbp), %xmm0
movdqa %xmm0, -0x320(%rbp)
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
movq %rax, -0x328(%rbp)
movdqa -0x320(%rbp), %xmm0
movdqa %xmm0, -0x340(%rbp)
movdqa -0x320(%rbp), %xmm0
movdqa %xmm0, -0x350(%rbp)
movq -0x2a0(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
subq %rcx, %rax
movq %rax, -0x358(%rbp)
movl -0x2a8(%rbp), %edi
imull -0x2a4(%rbp), %edi
movl -0x274(%rbp), %esi
callq 0x1c3af0
movq %rax, -0x360(%rbp)
cmpq $0x0, -0x360(%rbp)
jne 0x49561a
movq $0x0, -0x260(%rbp)
jmp 0x496134
movq -0x360(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x2800804, %ecx        # imm = 0x2800804
movl %ecx, 0xc(%rax)
movq -0x360(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
movl %ecx, 0xc(%rax)
movslq -0x2a8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x2c0(%rbp)
movslq -0x2a8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x2c8(%rbp)
movslq -0x2a8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x2d0(%rbp)
movslq -0x2a8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x2d8(%rbp)
cmpq $0x0, -0x2c0(%rbp)
jne 0x4956ba
movq $0x0, -0x260(%rbp)
jmp 0x496134
cmpq $0x0, -0x2c8(%rbp)
jne 0x4956d4
movq $0x0, -0x260(%rbp)
jmp 0x496134
cmpq $0x0, -0x2d0(%rbp)
jne 0x4956ee
movq $0x0, -0x260(%rbp)
jmp 0x496134
cmpq $0x0, -0x2d8(%rbp)
jne 0x495708
movq $0x0, -0x260(%rbp)
jmp 0x496134
movq -0x2c0(%rbp), %rdi
movaps -0x310(%rbp), %xmm0
movslq -0x2a8(%rbp), %rsi
callq 0x381e50
movq -0x2d8(%rbp), %rdi
movl -0x278(%rbp), %eax
negl %eax
cltq
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %xmm1
movq -0x30(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x40(%rbp)
movdqa -0x40(%rbp), %xmm0
movslq -0x2a8(%rbp), %rsi
callq 0x381e50
movl $0x0, -0x284(%rbp)
movl -0x284(%rbp), %eax
cmpl -0x274(%rbp), %eax
jge 0x495e8e
movq $0x0, -0x398(%rbp)
movq $0x0, -0x3a0(%rbp)
movaps -0x310(%rbp), %xmm0
movaps %xmm0, -0x380(%rbp)
movq -0x2c0(%rbp), %rax
movl -0x2a8(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x390(%rbp)
movaps -0x390(%rbp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm0, -0x390(%rbp)
movq -0x2b8(%rbp), %rax
movq -0x2a0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x270(%rbp), %rdx
movslq -0x284(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
movl (%rcx,%rdx,4), %ecx
imull -0x2a8(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x398(%rbp)
movl -0x290(%rbp), %eax
movl -0x284(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x49587e
movq -0x2d0(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x3a0(%rbp), %rax
movq %rax, -0x2c0(%rbp)
jmp 0x4958a8
movq -0x2c8(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x3a0(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movl $0x0, -0x280(%rbp)
movl -0x280(%rbp), %eax
cmpl -0x2a8(%rbp), %eax
jge 0x495b61
movdqa -0x390(%rbp), %xmm1
movq -0x398(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
paddq -0x1e0(%rbp), %xmm0
movdqa %xmm0, -0x390(%rbp)
movq -0x2d8(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x370(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x370(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x390(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x380(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x390(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x310(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x390(%rbp)
movq -0x2c0(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x390(%rbp), %xmm0
movq %rax, -0x168(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x180(%rbp), %xmm0
movq -0x168(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x390(%rbp), %xmm0
movdqa -0x340(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x340(%rbp)
movdqa -0x390(%rbp), %xmm1
movdqa -0x2f0(%rbp), %xmm0
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
psubq -0xe0(%rbp), %xmm0
movdqa %xmm0, -0x390(%rbp)
movdqa -0x370(%rbp), %xmm1
movdqa -0x300(%rbp), %xmm0
movdqa %xmm1, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm0
psubq -0x100(%rbp), %xmm0
movdqa %xmm0, -0x370(%rbp)
movdqa -0x370(%rbp), %xmm0
movdqa -0x390(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x370(%rbp)
movq -0x2d8(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x370(%rbp), %xmm0
movq %rax, -0x188(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x1a0(%rbp), %xmm0
movq -0x188(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x380(%rbp), %xmm1
movdqa -0x300(%rbp), %xmm0
movdqa %xmm1, -0x110(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x110(%rbp), %xmm0
psubq -0x120(%rbp), %xmm0
movdqa %xmm0, -0x380(%rbp)
movdqa -0x380(%rbp), %xmm0
movdqa -0x390(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x380(%rbp)
movq -0x2c8(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x390(%rbp)
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
jmp 0x4958b2
movl $0x0, -0x288(%rbp)
movl -0x288(%rbp), %eax
cmpl -0x2a4(%rbp), %eax
jge 0x495d21
movaps -0x380(%rbp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm0, -0x380(%rbp)
movl $0x0, -0x280(%rbp)
movl -0x280(%rbp), %eax
cmpl -0x2a8(%rbp), %eax
jge 0x495d0b
movq -0x2c0(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x390(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x380(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x390(%rbp)
movq -0x2c0(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x390(%rbp), %xmm0
movq %rax, -0x1a8(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1c0(%rbp), %xmm0
movq -0x1a8(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x390(%rbp), %xmm0
movdqa -0x340(%rbp), %xmm1
callq 0x496150
movdqa %xmm0, -0x340(%rbp)
movdqa -0x390(%rbp), %xmm1
movdqa -0x2f0(%rbp), %xmm0
movdqa %xmm1, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm0
psubq -0x140(%rbp), %xmm0
movdqa %xmm0, -0x390(%rbp)
movdqa -0x380(%rbp), %xmm1
movdqa -0x300(%rbp), %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
psubq -0x160(%rbp), %xmm0
movdqa %xmm0, -0x380(%rbp)
movdqa -0x380(%rbp), %xmm0
movdqa -0x390(%rbp), %xmm1
callq 0x4961d0
movdqa %xmm0, -0xb0(%rbp)
movdqa -0xb0(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
jne 0x495cf5
jmp 0x495d23
jmp 0x495cf7
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
jmp 0x495b9b
jmp 0x495d0d
movl -0x288(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x288(%rbp)
jmp 0x495b6b
jmp 0x495d23
movq -0x2c0(%rbp), %rax
movslq -0x2ac(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x210(%rbp)
movq -0x210(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x390(%rbp)
movl $0x0, -0x288(%rbp)
movl -0x288(%rbp), %eax
cmpl -0x2b0(%rbp), %eax
jge 0x495d8f
movaps -0x390(%rbp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm0, -0x390(%rbp)
movl -0x288(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x288(%rbp)
jmp 0x495d5c
movdqa -0x390(%rbp), %xmm0
movl $0x1, %edi
callq 0x496240
movl %eax, %edx
movq -0x360(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movslq -0x284(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movdqa -0x340(%rbp), %xmm0
movdqa -0x350(%rbp), %xmm1
callq 0x4961d0
movdqa %xmm0, -0x3b0(%rbp)
movdqa -0x3b0(%rbp), %xmm0
movdqa %xmm0, -0xc0(%rbp)
movdqa -0xc0(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x495e78
movdqa -0x340(%rbp), %xmm0
callq 0x496270
movq %rax, -0x328(%rbp)
movq -0x328(%rbp), %rax
cmpq -0x358(%rbp), %rax
jle 0x495e2f
movq -0x360(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
jmp 0x495e8e
movq -0x328(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %xmm1
movq -0x10(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x20(%rbp)
movdqa -0x20(%rbp), %xmm0
movdqa %xmm0, -0x350(%rbp)
movl -0x284(%rbp), %eax
movl %eax, -0x290(%rbp)
jmp 0x495e7a
movl -0x284(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x284(%rbp)
jmp 0x495777
movl $0x0, -0x280(%rbp)
movl -0x280(%rbp), %eax
cmpl -0x2a8(%rbp), %eax
jge 0x495f0e
movq -0x2c0(%rbp), %rax
movslq -0x280(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x3c0(%rbp)
movq -0x360(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movdqa -0x3c0(%rbp), %xmm0
movl -0x280(%rbp), %esi
movl -0x2a8(%rbp), %edx
callq 0x4962b0
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
jmp 0x495e98
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x328(%rbp)
jne 0x495f31
movq -0x360(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
movq -0x360(%rbp), %rdi
callq 0x1c6390
cmpl $0x0, %eax
je 0x495f6c
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, -0x328(%rbp)
movl $0x0, -0x28c(%rbp)
movl $0x0, -0x290(%rbp)
jmp 0x4960c4
movl -0x290(%rbp), %eax
movl -0x284(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x495fab
movq -0x2d0(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x3c8(%rbp), %rax
movq %rax, -0x2c0(%rbp)
jmp 0x495fea
movl -0x290(%rbp), %eax
movl -0x284(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0x495fe8
movq -0x2d0(%rbp), %rax
movq %rax, -0x3d0(%rbp)
movq -0x2c8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x3d0(%rbp), %rax
movq %rax, -0x2c8(%rbp)
jmp 0x495fea
movq -0x2d0(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movl -0x2a8(%rbp), %eax
imull -0x2a4(%rbp), %eax
movl %eax, -0x3dc(%rbp)
movl -0x294(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28c(%rbp)
movl $0x0, -0x280(%rbp)
movl -0x280(%rbp), %eax
cmpl -0x3dc(%rbp), %eax
jge 0x4960c2
movq -0x3d8(%rbp), %rax
movq (%rax), %rax
cmpq -0x328(%rbp), %rax
jne 0x49609a
movl -0x280(%rbp), %eax
cltd
idivl -0x2a4(%rbp)
movl %eax, -0x3e4(%rbp)
movl -0x280(%rbp), %eax
cltd
idivl -0x2a4(%rbp)
movl -0x3e4(%rbp), %eax
imull -0x2a8(%rbp), %edx
addl %edx, %eax
movl %eax, -0x3e0(%rbp)
movl -0x3e0(%rbp), %eax
cmpl -0x28c(%rbp), %eax
jge 0x496098
movl -0x3e0(%rbp), %eax
movl %eax, -0x28c(%rbp)
jmp 0x49609a
jmp 0x49609c
movl -0x280(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x280(%rbp)
movq -0x3d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x3d8(%rbp)
jmp 0x496024
jmp 0x4960c4
movq -0x328(%rbp), %rax
movl %eax, %ecx
movq -0x360(%rbp), %rax
movl %ecx, (%rax)
movl -0x28c(%rbp), %ecx
movq -0x360(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x290(%rbp), %ecx
movq -0x360(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x2d8(%rbp), %rdi
callq 0x1c3590
movq -0x2d0(%rbp), %rdi
callq 0x1c3590
movq -0x2c8(%rbp), %rdi
callq 0x1c3590
movq -0x2c0(%rbp), %rdi
callq 0x1c3590
movq -0x360(%rbp), %rax
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rax
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
nopw %cs:(%rax,%rax)