// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/sw_scan_sse2_128_64.c
// Function: parasail_sw_rowcol_scan_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 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 pvP = NULL;
    __m128i* restrict pvE = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvHMax = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    __m128i vZero;
    int64_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    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;
    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
    pvP = (__m128i*)profile->profile64.score;
    vGapO = _mm_set1_epi64x_rpl(open);
    vGapE = _mm_set1_epi64x_rpl(gap);
    NEG_LIMIT = (-open < matrix->min ? INT64_MIN + open : INT64_MIN - matrix->min) + 1;
    POS_LIMIT = INT64_MAX - matrix->max - 1;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vMaxHUnit = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi64_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_add_epi64(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi64x_rpl(-segLen*gap), 8));

    /* 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_SCAN
        | 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 */
    pvE = parasail_memalign___m128i(16, segLen);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvHMax) return NULL;
    if (!pvGapper) return NULL;

    parasail_memset___m128i(pvH, vZero, segLen);
    parasail_memset___m128i(pvE, vNegLimit, segLen);
    {
        __m128i vGapper = _mm_sub_epi64(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_sub_epi64(vGapper, vGapE);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vHt;
        __m128i vF;
        __m128i vH;
        __m128i vHp;
        __m128i *pvW;
        __m128i vW;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm_load_si128(pvH+(segLen-1));
        vHp = _mm_slli_si128(vHp, 8);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = vZero;
        vF = vNegLimit;
        for (i=0; i<segLen; ++i) {
            vH = _mm_load_si128(pvH+i);
            vE = _mm_load_si128(pvE+i);
            vW = _mm_load_si128(pvW+i);
            vE = _mm_max_epi64_rpl(
                    _mm_sub_epi64(vE, vGapE),
                    _mm_sub_epi64(vH, vGapO));
            vHp = _mm_add_epi64(vHp, vW);
            vF = _mm_max_epi64_rpl(vF, _mm_add_epi64(vHt, pvGapper[i]));
            vHt = _mm_max_epi64_rpl(vE, vHp);
            _mm_store_si128(pvE+i, vE);
            _mm_store_si128(pvHt+i, vHt);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 8);
        vF = _mm_max_epi64_rpl(vF, _mm_add_epi64(vHt, pvGapper[0]));
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 8);
            vFt = _mm_add_epi64(vFt, vSegLenXgap);
            vF = _mm_max_epi64_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 8);
        vF = _mm_add_epi64(vF, vNegInfFront);
        vH = _mm_max_epi64_rpl(vHt, vF);
        vH = _mm_max_epi64_rpl(vH, vZero);
        for (i=0; i<segLen; ++i) {
            vHt = _mm_load_si128(pvHt+i);
            vF = _mm_max_epi64_rpl(
                    _mm_sub_epi64(vF, vGapE),
                    _mm_sub_epi64(vH, vGapO));
            vH = _mm_max_epi64_rpl(vHt, vF);
            vH = _mm_max_epi64_rpl(vH, vZero);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
            vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
        } 

        {
            __m128i vCompare = _mm_cmpgt_epi64_rpl(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi64_rpl(vMaxH);
                vMaxHUnit = _mm_set1_epi64x_rpl(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m128i)*segLen);
            }
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            int32_t k = 0;
            __m128i vH = _mm_load_si128(pvH + 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
    }

    /* Trace the alignment ending position on read. */
    {
        int64_t *t = (int64_t*)pvHMax;
        int32_t column_len = segLen * segWidth;
        end_query = s1Len;
        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;
                }
            }
        }
    }

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

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi64_rpl(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi64_rpl(vSaturationCheckMax, vPosLimit)))) {
        result->flag |= PARASAIL_FLAG_SATURATED;
        score = 0;
        end_query = 0;
        end_ref = 0;
    }

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

    parasail_free(pvGapper);
    parasail_free(pvHMax);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x5d0, %rsp            # imm = 0x5D0
movq %rdi, -0x380(%rbp)
movq %rsi, -0x388(%rbp)
movl %edx, -0x38c(%rbp)
movl %ecx, -0x390(%rbp)
movl %r8d, -0x394(%rbp)
movl $0x0, -0x398(%rbp)
movl $0x0, -0x39c(%rbp)
movl $0x0, -0x3a0(%rbp)
movl $0x0, -0x3a4(%rbp)
movl $0x0, -0x3a8(%rbp)
movq $0x0, -0x3b0(%rbp)
movl $0x0, -0x3b4(%rbp)
movl $0x0, -0x3b8(%rbp)
movl $0x0, -0x3bc(%rbp)
movl $0x0, -0x3c0(%rbp)
movq $0x0, -0x3c8(%rbp)
movq $0x0, -0x3d0(%rbp)
movq $0x0, -0x3d8(%rbp)
movq $0x0, -0x3e0(%rbp)
movq $0x0, -0x3e8(%rbp)
movq $0x0, -0x3f0(%rbp)
movq $0x0, -0x418(%rbp)
movq $0x0, -0x420(%rbp)
movq $0x0, -0x438(%rbp)
movq $0x0, -0x4c8(%rbp)
cmpq $0x0, -0x380(%rbp)
jne 0x45addf
movq 0x9cc228(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x891231(%rip), %rsi    # 0xcebfeb
leaq 0x87f76b(%rip), %rdx    # 0xcda52c
leaq 0x867715(%rip), %rcx    # 0xcc24dd
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45ade1
jmp 0x45ade3
movq -0x380(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x45ae27
movq 0x9cc1e0(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8911e9(%rip), %rsi    # 0xcebfeb
leaq 0x87f723(%rip), %rdx    # 0xcda52c
leaq 0x891af3(%rip), %rcx    # 0xcec903
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45ae29
jmp 0x45ae2b
movq -0x380(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x45ae6f
movq 0x9cc198(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8911a1(%rip), %rsi    # 0xcebfeb
leaq 0x87f6db(%rip), %rdx    # 0xcda52c
leaq 0x891ac4(%rip), %rcx    # 0xcec91c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45ae71
jmp 0x45ae73
movq -0x380(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x45aeb6
movq 0x9cc151(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x891870(%rip), %rsi    # 0xcec701
leaq 0x87f694(%rip), %rdx    # 0xcda52c
leaq 0x891a8d(%rip), %rcx    # 0xcec92c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45aeb8
jmp 0x45aeba
cmpq $0x0, -0x388(%rbp)
jne 0x45aefa
movq 0x9cc10d(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x891116(%rip), %rsi    # 0xcebfeb
leaq 0x87f650(%rip), %rdx    # 0xcda52c
leaq 0x89181b(%rip), %rcx    # 0xcec6fe
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45aefc
jmp 0x45aefe
cmpl $0x0, -0x38c(%rbp)
jg 0x45af3d
movq 0x9cc0ca(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8917e9(%rip), %rsi    # 0xcec701
leaq 0x87f60d(%rip), %rdx    # 0xcda52c
leaq 0x8917ef(%rip), %rcx    # 0xcec715
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45af3f
jmp 0x45af41
cmpl $0x0, -0x390(%rbp)
jge 0x45af80
movq 0x9cc087(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8917c0(%rip), %rsi    # 0xcec71b
leaq 0x87f5ca(%rip), %rdx    # 0xcda52c
leaq 0x8917c7(%rip), %rcx    # 0xcec730
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45af82
jmp 0x45af84
cmpl $0x0, -0x394(%rbp)
jge 0x45afc3
movq 0x9cc044(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x89177d(%rip), %rsi    # 0xcec71b
leaq 0x87f587(%rip), %rdx    # 0xcda52c
leaq 0x891789(%rip), %rcx    # 0xcec735
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
jmp 0x45afc5
movl $0x0, -0x398(%rbp)
movl $0x0, -0x39c(%rbp)
movl $0x0, -0x3a0(%rbp)
movl $0x0, -0x3a4(%rbp)
movq -0x380(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3a8(%rbp)
movq -0x380(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x3b0(%rbp)
movl $0x2, -0x3b4(%rbp)
movl -0x3a8(%rbp), %esi
movl -0x3b4(%rbp), %ecx
movl %ecx, %edx
movl %esi, %eax
leal -0x1(%rax,%rdx), %eax
cltd
idivl %ecx
movl %eax, -0x3b8(%rbp)
movl -0x3a8(%rbp), %eax
decl %eax
movl -0x3b8(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x3bc(%rbp)
movl -0x3b4(%rbp), %ecx
movl -0x3a8(%rbp), %eax
decl %eax
movl -0x3b8(%rbp), %esi
cltd
idivl %esi
notl %eax
addl %ecx, %eax
movl %eax, -0x3c0(%rbp)
movq -0x380(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x3c8(%rbp)
movslq -0x390(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %xmm1
movq -0xb0(%rbp), %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0xc0(%rbp)
movaps -0xc0(%rbp), %xmm0
movaps %xmm0, -0x400(%rbp)
movslq -0x394(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x350(%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]
movdqa %xmm0, -0xa0(%rbp)
movdqa -0xa0(%rbp), %xmm0
movdqa %xmm0, -0x410(%rbp)
xorl %eax, %eax
subl -0x390(%rbp), %eax
movq -0x3b0(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x45b14c
movslq -0x390(%rbp), %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
addq %rcx, %rax
movq %rax, -0x5b8(%rbp)
jmp 0x45b16b
movq -0x3b0(%rbp), %rax
movslq 0x20(%rax), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq %rcx, %rax
movq %rax, -0x5b8(%rbp)
movq -0x5b8(%rbp), %rax
incq %rax
movq %rax, -0x418(%rbp)
movq -0x3b0(%rbp), %rax
movslq 0x1c(%rax), %rcx
movabsq $0x7ffffffffffffffe, %rax # imm = 0x7FFFFFFFFFFFFFFE
subq %rcx, %rax
movq %rax, -0x420(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x340(%rbp)
movaps -0x340(%rbp), %xmm0
movaps %xmm0, -0x430(%rbp)
movq -0x418(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x418(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x358(%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, -0x450(%rbp)
movq -0x420(%rbp), %rax
movq %rax, -0x360(%rbp)
movq -0x360(%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]
movaps %xmm0, -0x60(%rbp)
movaps -0x60(%rbp), %xmm0
movaps %xmm0, -0x460(%rbp)
movaps -0x460(%rbp), %xmm0
movaps %xmm0, -0x470(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x480(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x490(%rbp)
movaps -0x450(%rbp), %xmm0
movaps %xmm0, -0x4a0(%rbp)
movaps -0x430(%rbp), %xmm0
movaps %xmm0, -0x4b0(%rbp)
movaps -0x4b0(%rbp), %xmm0
movq -0x418(%rbp), %rdi
xorl %esi, %esi
callq 0x45bfb0
movaps %xmm0, -0x4b0(%rbp)
movaps -0x4b0(%rbp), %xmm1
movl -0x3b8(%rbp), %eax
negl %eax
movl -0x394(%rbp), %ecx
imull %ecx, %eax
cltq
movq %rax, -0x368(%rbp)
movq -0x368(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %xmm2
movq -0x30(%rbp), %xmm0
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movaps %xmm0, -0x40(%rbp)
movaps -0x40(%rbp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm1, -0x280(%rbp)
movdqa %xmm0, -0x290(%rbp)
movdqa -0x280(%rbp), %xmm0
paddq -0x290(%rbp), %xmm0
movdqa %xmm0, -0x4c0(%rbp)
movl -0x3b8(%rbp), %edi
imull -0x3b4(%rbp), %edi
movl -0x38c(%rbp), %esi
callq 0x1c3af0
movq %rax, -0x4c8(%rbp)
cmpq $0x0, -0x4c8(%rbp)
jne 0x45b343
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
movq -0x4c8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x2800404, %ecx        # imm = 0x2800404
movl %ecx, 0xc(%rax)
movq -0x4c8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
movl %ecx, 0xc(%rax)
movslq -0x3b8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3d0(%rbp)
movslq -0x3b8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3d8(%rbp)
movslq -0x3b8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3e0(%rbp)
movslq -0x3b8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3e8(%rbp)
movslq -0x3b8(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x3f0(%rbp)
cmpq $0x0, -0x3d0(%rbp)
jne 0x45b3fb
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
cmpq $0x0, -0x3d8(%rbp)
jne 0x45b415
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
cmpq $0x0, -0x3e0(%rbp)
jne 0x45b42f
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
cmpq $0x0, -0x3e8(%rbp)
jne 0x45b449
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
cmpq $0x0, -0x3f0(%rbp)
jne 0x45b463
movq $0x0, -0x378(%rbp)
jmp 0x45bf92
movq -0x3e0(%rbp), %rdi
movdqa -0x430(%rbp), %xmm0
movslq -0x3b8(%rbp), %rsi
callq 0x381e50
movq -0x3d0(%rbp), %rdi
movdqa -0x450(%rbp), %xmm0
movslq -0x3b8(%rbp), %rsi
callq 0x381e50
movdqa -0x430(%rbp), %xmm1
movdqa -0x400(%rbp), %xmm0
movdqa %xmm1, -0x1c0(%rbp)
movdqa %xmm0, -0x1d0(%rbp)
movdqa -0x1c0(%rbp), %xmm0
psubq -0x1d0(%rbp), %xmm0
movdqa %xmm0, -0x4e0(%rbp)
movl -0x3b8(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x398(%rbp)
cmpl $0x0, -0x398(%rbp)
jl 0x45b578
movq -0x3f0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x4e0(%rbp), %xmm0
movq %rax, -0x140(%rbp)
movdqa %xmm0, -0x150(%rbp)
movdqa -0x150(%rbp), %xmm0
movq -0x140(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x4e0(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x1e0(%rbp)
movdqa %xmm0, -0x1f0(%rbp)
movdqa -0x1e0(%rbp), %xmm0
psubq -0x1f0(%rbp), %xmm0
movdqa %xmm0, -0x4e0(%rbp)
movl -0x398(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x398(%rbp)
jmp 0x45b4e0
movl $0x0, -0x39c(%rbp)
movl -0x39c(%rbp), %eax
cmpl -0x38c(%rbp), %eax
jge 0x45bd21
movq -0x3e0(%rbp), %rax
movl -0x3b8(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x530(%rbp)
movaps -0x530(%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, -0x530(%rbp)
movq -0x3c8(%rbp), %rax
movq -0x3b0(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x388(%rbp), %rdx
movslq -0x39c(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
movl (%rcx,%rdx,4), %ecx
imull -0x3b8(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x538(%rbp)
movdqa -0x430(%rbp), %xmm0
movdqa %xmm0, -0x500(%rbp)
movdqa -0x450(%rbp), %xmm0
movdqa %xmm0, -0x510(%rbp)
movl $0x0, -0x398(%rbp)
movl -0x398(%rbp), %eax
cmpl -0x3b8(%rbp), %eax
jge 0x45b89b
movq -0x3e0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x520(%rbp)
movq -0x3d0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x4f0(%rbp)
movq -0x538(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x550(%rbp)
movdqa -0x4f0(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x200(%rbp)
movdqa %xmm0, -0x210(%rbp)
movdqa -0x200(%rbp), %xmm0
psubq -0x210(%rbp), %xmm0
movdqa -0x520(%rbp), %xmm2
movdqa -0x400(%rbp), %xmm1
movdqa %xmm2, -0x220(%rbp)
movdqa %xmm1, -0x230(%rbp)
movdqa -0x220(%rbp), %xmm1
psubq -0x230(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x4f0(%rbp)
movdqa -0x530(%rbp), %xmm1
movdqa -0x550(%rbp), %xmm0
movdqa %xmm1, -0x2a0(%rbp)
movdqa %xmm0, -0x2b0(%rbp)
movdqa -0x2a0(%rbp), %xmm0
paddq -0x2b0(%rbp), %xmm0
movdqa %xmm0, -0x530(%rbp)
movdqa -0x510(%rbp), %xmm0
movdqa -0x500(%rbp), %xmm2
movq -0x3f0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa (%rax), %xmm1
movdqa %xmm2, -0x2c0(%rbp)
movdqa %xmm1, -0x2d0(%rbp)
movdqa -0x2c0(%rbp), %xmm1
paddq -0x2d0(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x510(%rbp)
movdqa -0x4f0(%rbp), %xmm0
movdqa -0x530(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x500(%rbp)
movq -0x3d0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x4f0(%rbp), %xmm0
movq %rax, -0x158(%rbp)
movdqa %xmm0, -0x170(%rbp)
movdqa -0x170(%rbp), %xmm0
movq -0x158(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x3d8(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x500(%rbp), %xmm0
movq %rax, -0x178(%rbp)
movdqa %xmm0, -0x190(%rbp)
movdqa -0x190(%rbp), %xmm0
movq -0x178(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x520(%rbp), %xmm0
movdqa %xmm0, -0x530(%rbp)
movl -0x398(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x398(%rbp)
jmp 0x45b642
movaps -0x500(%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, -0x500(%rbp)
movdqa -0x510(%rbp), %xmm0
movdqa -0x500(%rbp), %xmm2
movq -0x3f0(%rbp), %rax
movdqa (%rax), %xmm1
movdqa %xmm2, -0x2e0(%rbp)
movdqa %xmm1, -0x2f0(%rbp)
movdqa -0x2e0(%rbp), %xmm1
paddq -0x2f0(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x510(%rbp)
movl $0x0, -0x398(%rbp)
movl -0x398(%rbp), %eax
movl -0x3b4(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x45b991
movaps -0x510(%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, -0x560(%rbp)
movdqa -0x560(%rbp), %xmm1
movdqa -0x4c0(%rbp), %xmm0
movdqa %xmm1, -0x300(%rbp)
movdqa %xmm0, -0x310(%rbp)
movdqa -0x300(%rbp), %xmm0
paddq -0x310(%rbp), %xmm0
movdqa %xmm0, -0x560(%rbp)
movdqa -0x510(%rbp), %xmm0
movdqa -0x560(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x510(%rbp)
movl -0x398(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x398(%rbp)
jmp 0x45b901
movaps -0x510(%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, -0x510(%rbp)
movdqa -0x510(%rbp), %xmm1
movdqa -0x4b0(%rbp), %xmm0
movdqa %xmm1, -0x320(%rbp)
movdqa %xmm0, -0x330(%rbp)
movdqa -0x320(%rbp), %xmm0
paddq -0x330(%rbp), %xmm0
movdqa %xmm0, -0x510(%rbp)
movdqa -0x500(%rbp), %xmm0
movdqa -0x510(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x520(%rbp)
movdqa -0x520(%rbp), %xmm0
movdqa -0x430(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x520(%rbp)
movl $0x0, -0x398(%rbp)
movl -0x398(%rbp), %eax
cmpl -0x3b8(%rbp), %eax
jge 0x45bbb3
movq -0x3d8(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x500(%rbp)
movdqa -0x510(%rbp), %xmm1
movdqa -0x410(%rbp), %xmm0
movdqa %xmm1, -0x240(%rbp)
movdqa %xmm0, -0x250(%rbp)
movdqa -0x240(%rbp), %xmm0
psubq -0x250(%rbp), %xmm0
movdqa -0x520(%rbp), %xmm2
movdqa -0x400(%rbp), %xmm1
movdqa %xmm2, -0x260(%rbp)
movdqa %xmm1, -0x270(%rbp)
movdqa -0x260(%rbp), %xmm1
psubq -0x270(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x510(%rbp)
movdqa -0x500(%rbp), %xmm0
movdqa -0x510(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x520(%rbp)
movdqa -0x520(%rbp), %xmm0
movdqa -0x430(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x520(%rbp)
movq -0x3e0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x520(%rbp), %xmm0
movq %rax, -0x198(%rbp)
movdqa %xmm0, -0x1b0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movq -0x198(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x470(%rbp), %xmm0
movdqa -0x520(%rbp), %xmm1
callq 0x45c060
movdqa %xmm0, -0x470(%rbp)
movdqa -0x480(%rbp), %xmm0
movdqa -0x520(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x480(%rbp)
movdqa -0x520(%rbp), %xmm0
movdqa -0x490(%rbp), %xmm1
callq 0x45bfe0
movdqa %xmm0, -0x490(%rbp)
movl -0x398(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x398(%rbp)
jmp 0x45ba21
movdqa -0x490(%rbp), %xmm0
movdqa -0x4a0(%rbp), %xmm1
callq 0x45c0e0
movdqa %xmm0, -0x570(%rbp)
movdqa -0x570(%rbp), %xmm0
movdqa %xmm0, -0xf0(%rbp)
movdqa -0xf0(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x45bc6b
movaps -0x490(%rbp), %xmm0
callq 0x45c150
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x370(%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, -0x4a0(%rbp)
movl -0x39c(%rbp), %eax
movl %eax, -0x3a4(%rbp)
movq -0x3e8(%rbp), %rdi
movq -0x3e0(%rbp), %rsi
movslq -0x3b8(%rbp), %rdx
shlq $0x4, %rdx
callq 0x19e0a0
movl $0x0, -0x574(%rbp)
movq -0x3e0(%rbp), %rax
movslq -0x3bc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x590(%rbp)
movl $0x0, -0x574(%rbp)
movl -0x574(%rbp), %eax
cmpl -0x3c0(%rbp), %eax
jge 0x45bce1
movaps -0x590(%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, -0x590(%rbp)
movl -0x574(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x574(%rbp)
jmp 0x45bcae
movdqa -0x590(%rbp), %xmm0
movl $0x1, %edi
callq 0x45c190
movl %eax, %edx
movq -0x4c8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movslq -0x39c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x39c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x39c(%rbp)
jmp 0x45b582
movq -0x3e8(%rbp), %rax
movq %rax, -0x598(%rbp)
movl -0x3b8(%rbp), %eax
imull -0x3b4(%rbp), %eax
movl %eax, -0x59c(%rbp)
movl -0x3a8(%rbp), %eax
movl %eax, -0x3a0(%rbp)
movl $0x0, -0x398(%rbp)
movl -0x398(%rbp), %eax
cmpl -0x59c(%rbp), %eax
jge 0x45bdf6
movq -0x598(%rbp), %rax
movq (%rax), %rax
cmpq -0x438(%rbp), %rax
jne 0x45bdce
movl -0x398(%rbp), %eax
cltd
idivl -0x3b4(%rbp)
movl %eax, -0x5bc(%rbp)
movl -0x398(%rbp), %eax
cltd
idivl -0x3b4(%rbp)
movl -0x5bc(%rbp), %eax
imull -0x3b8(%rbp), %edx
addl %edx, %eax
movl %eax, -0x5a0(%rbp)
movl -0x5a0(%rbp), %eax
cmpl -0x3a0(%rbp), %eax
jge 0x45bdcc
movl -0x5a0(%rbp), %eax
movl %eax, -0x3a0(%rbp)
jmp 0x45bdce
jmp 0x45bdd0
movl -0x398(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x398(%rbp)
movq -0x598(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x598(%rbp)
jmp 0x45bd58
movl $0x0, -0x398(%rbp)
movl -0x398(%rbp), %eax
cmpl -0x3b8(%rbp), %eax
jge 0x45be76
movq -0x3e0(%rbp), %rax
movslq -0x398(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x5b0(%rbp)
movq -0x4c8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movdqa -0x5b0(%rbp), %xmm0
movl -0x398(%rbp), %esi
movl -0x3b8(%rbp), %edx
callq 0x45c1c0
movl -0x398(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x398(%rbp)
jmp 0x45be00
movdqa -0x470(%rbp), %xmm0
movdqa -0x450(%rbp), %xmm1
callq 0x45c220
movaps %xmm0, -0x5d0(%rbp)
movdqa -0x480(%rbp), %xmm0
movdqa -0x460(%rbp), %xmm1
callq 0x45c0e0
movaps -0x5d0(%rbp), %xmm1
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
por -0xe0(%rbp), %xmm0
movdqa %xmm0, -0x100(%rbp)
movdqa -0x100(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x45bf16
movq -0x4c8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
movq $0x0, -0x438(%rbp)
movl $0x0, -0x3a0(%rbp)
movl $0x0, -0x3a4(%rbp)
movq -0x438(%rbp), %rax
movl %eax, %ecx
movq -0x4c8(%rbp), %rax
movl %ecx, (%rax)
movl -0x3a0(%rbp), %ecx
movq -0x4c8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x3a4(%rbp), %ecx
movq -0x4c8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x3f0(%rbp), %rdi
callq 0x1c3590
movq -0x3e8(%rbp), %rdi
callq 0x1c3590
movq -0x3e0(%rbp), %rdi
callq 0x1c3590
movq -0x3d8(%rbp), %rdi
callq 0x1c3590
movq -0x3d0(%rbp), %rdi
callq 0x1c3590
movq -0x4c8(%rbp), %rax
movq %rax, -0x378(%rbp)
movq -0x378(%rbp), %rax
addq $0x5d0, %rsp            # imm = 0x5D0
popq %rbp
retq
nopw %cs:(%rax,%rax)