// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_trace_striped_sse2_128_64.c
// Function: parasail_nw_trace_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 s1Len = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvE = NULL;
    __m128i* restrict pvEaStore = NULL;
    __m128i* restrict pvEaLoad = NULL;
    __m128i* restrict pvHT = NULL;
    int64_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    int64_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    parasail_result_t *result = NULL;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTDiag;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;
    __m128i vTMask;
    __m128i vFTMask;

    /* 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;
    s1Len = profile->s1Len;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    matrix = profile->matrix;
    segWidth = 2; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__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;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vTIns  = _mm_set1_epi64x_rpl(PARASAIL_INS);
    vTDel  = _mm_set1_epi64x_rpl(PARASAIL_DEL);
    vTDiag = _mm_set1_epi64x_rpl(PARASAIL_DIAG);
    vTDiagE = _mm_set1_epi64x_rpl(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi64x_rpl(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi64x_rpl(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi64x_rpl(PARASAIL_DEL_F);
    vTMask = _mm_set1_epi64x_rpl(PARASAIL_ZERO_MASK);
    vFTMask = _mm_set1_epi64x_rpl(PARASAIL_F_MASK);

    /* initialize result */
    result = parasail_result_new_trace(segLen, s2Len, 16, sizeof(__m128i));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_2;

    /* initialize heap variables */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad = parasail_memalign___m128i(16, segLen);
    pvE = parasail_memalign___m128i(16, segLen);
    pvEaStore = parasail_memalign___m128i(16, segLen);
    pvEaLoad = parasail_memalign___m128i(16, segLen);
    pvHT = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int64_t(16, s2Len+1);

    /* validate heap variables */
    if (!pvHStore) return NULL;
    if (!pvHLoad) return NULL;
    if (!pvE) return NULL;
    if (!pvEaStore) return NULL;
    if (!pvEaLoad) return NULL;
    if (!pvHT) return NULL;
    if (!boundary) return NULL;

    /* initialize H and E */
    {
        int32_t index = 0;
        for (i=0; i<segLen; ++i) {
            int32_t segNum = 0;
            __m128i_64_t h;
            __m128i_64_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT64_MIN ? INT64_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT64_MIN ? INT64_MIN : tmp;
            }
            _mm_store_si128(&pvHStore[index], h.m);
            _mm_store_si128(&pvE[index], e.m);
            _mm_store_si128(&pvEaStore[index], e.m);
            ++index;
        }
    }

    /* initialize uppder boundary */
    {
        boundary[0] = 0;
        for (i=1; i<=s2Len; ++i) {
            int64_t tmp = -open-gap*(i-1);
            boundary[i] = tmp < INT64_MIN ? INT64_MIN : tmp;
        }
    }

    for (i=0; i<segLen; ++i) {
        arr_store(result->trace->trace_table, vTDiagE, i, segLen, 0);
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vEF_opn;
        __m128i vE;
        __m128i vE_ext;
        __m128i vF;
        __m128i vF_ext;
        __m128i vFa;
        __m128i vFa_ext;
        __m128i vH;
        __m128i vH_dag;
        const __m128i* vP = NULL;

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

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

        /* insert upper boundary condition */
        vH = _mm_insert_epi64_rpl(vH, boundary[j], 0);

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

        /* Swap the 2 H buffers. */
        SWAP(pvHLoad, pvHStore)
        SWAP(pvEaLoad, pvEaStore)

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

            /* Get max from vH, vE and vF. */
            vH_dag = _mm_add_epi64(vH, _mm_load_si128(vP + i));
            vH = _mm_max_epi64_rpl(vH_dag, vE);
            vH = _mm_max_epi64_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
            vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vF);

            {
                __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m128i case1 = _mm_cmpeq_epi64_rpl(vH, vH_dag);
                __m128i case2 = _mm_cmpeq_epi64_rpl(vH, vF);
                __m128i vT = _mm_blendv_epi8_rpl(
                        _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                        vTDiag, case1);
                _mm_store_si128(pvHT + i, vT);
                vT = _mm_or_si128(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i, segLen, j);
            }

            vEF_opn = _mm_sub_epi64(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm_sub_epi64(vE, vGapE);
            vE = _mm_max_epi64_rpl(vEF_opn, vE_ext);
            _mm_store_si128(pvE + i, vE);
            {
                __m128i vEa = _mm_load_si128(pvEaLoad + i);
                __m128i vEa_ext = _mm_sub_epi64(vEa, vGapE);
                vEa = _mm_max_epi64_rpl(vEF_opn, vEa_ext);
                _mm_store_si128(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vEa_ext);
                    __m128i vT = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, cond);
                    arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                }
            }

            /* Update vF value. */
            vF_ext = _mm_sub_epi64(vF, vGapE);
            vF = _mm_max_epi64_rpl(vEF_opn, vF_ext);
            if (i+1<segLen) {
                __m128i vTAll = arr_load(result->trace->trace_table, i+1, segLen, j);
                __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vF_ext);
                __m128i vT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, cond);
                vT = _mm_or_si128(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i+1, segLen, j);
            }

            /* 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 */
        vFa_ext = vF_ext;
        vFa = vF;
        for (k=0; k<segWidth; ++k) {
            int64_t tmp = boundary[j+1]-open;
            int64_t tmp2 = tmp < INT64_MIN ? INT64_MIN : tmp;
            __m128i vHp = _mm_load_si128(&pvHLoad[segLen - 1]);
            vHp = _mm_slli_si128(vHp, 8);
            vHp = _mm_insert_epi64_rpl(vHp, boundary[j], 0);
            vEF_opn = _mm_slli_si128(vEF_opn, 8);
            vEF_opn = _mm_insert_epi64_rpl(vEF_opn, tmp2, 0);
            vF_ext = _mm_slli_si128(vF_ext, 8);
            vF_ext = _mm_insert_epi64_rpl(vF_ext, NEG_LIMIT, 0);
            vF = _mm_slli_si128(vF, 8);
            vF = _mm_insert_epi64_rpl(vF, tmp2, 0);
            vFa_ext = _mm_slli_si128(vFa_ext, 8);
            vFa_ext = _mm_insert_epi64_rpl(vFa_ext, NEG_LIMIT, 0);
            vFa = _mm_slli_si128(vFa, 8);
            vFa = _mm_insert_epi64_rpl(vFa, tmp2, 0);
            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);
                vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
                {
                    __m128i vTAll;
                    __m128i vT;
                    __m128i case1;
                    __m128i case2;
                    __m128i cond;
                    vHp = _mm_add_epi64(vHp, _mm_load_si128(vP + i));
                    case1 = _mm_cmpeq_epi64_rpl(vH, vHp);
                    case2 = _mm_cmpeq_epi64_rpl(vH, vF);
                    cond = _mm_andnot_si128(case1,case2);
                    vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    vT = _mm_load_si128(pvHT + i);
                    vT = _mm_blendv_epi8_rpl(vT, vTDel, cond);
                    _mm_store_si128(pvHT + i, vT);
                    vTAll = _mm_and_si128(vTAll, vTMask);
                    vTAll = _mm_or_si128(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                /* Update vF value. */
                {
                    __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vFa_ext);
                    __m128i vT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, cond);
                    vTAll = _mm_and_si128(vTAll, vFTMask);
                    vTAll = _mm_or_si128(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                vEF_opn = _mm_sub_epi64(vH, vGapO);
                vF_ext = _mm_sub_epi64(vF, vGapE);
                {
                    __m128i vEa = _mm_load_si128(pvEaLoad + i);
                    __m128i vEa_ext = _mm_sub_epi64(vEa, vGapE);
                    vEa = _mm_max_epi64_rpl(vEF_opn, vEa_ext);
                    _mm_store_si128(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vEa_ext);
                        __m128i vT = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, cond);
                        arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                    }
                }
                if (! _mm_movemask_epi8(
                            _mm_or_si128(
                                _mm_cmpgt_epi64_rpl(vF_ext, vEF_opn),
                                _mm_cmpeq_epi64_rpl(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm_max_epi64_rpl(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm_sub_epi64(vFa, vGapE);
                vFa = _mm_max_epi64_rpl(vEF_opn, vFa_ext);
                vHp = _mm_load_si128(pvHLoad + i);
            }
        }
end:
        {
        }
    }

    /* extract last value from the last column */
    {
        __m128i vH = _mm_load_si128(pvHStore + offset);
        for (k=0; k<position; ++k) {
            vH = _mm_slli_si128 (vH, 8);
        }
        score = (int64_t) _mm_extract_epi64_rpl (vH, 1);
    }

    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(boundary);
    parasail_free(pvHT);
    parasail_free(pvEaLoad);
    parasail_free(pvEaStore);
    parasail_free(pvE);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, 0xa0(%rsp)
testq %rdi, %rdi
je 0x398fec
movq 0x60(%rdi), %rax
movq %rax, 0xe0(%rsp)
testq %rax, %rax
je 0x398ff3
movq 0x10(%rdi), %rax
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0x398ffa
movl 0x8(%rdi), %r13d
testl %r13d, %r13d
jle 0x399001
cmpq $0x0, 0xa0(%rsp)
je 0x399008
movl %edx, %r15d
testl %edx, %edx
jle 0x39900f
movl %ecx, %r12d
testl %ecx, %ecx
js 0x399016
testl %r8d, %r8d
js 0x39901d
movl %r8d, 0x10(%rsp)
leal -0x1(%r13), %eax
incq %r13
shrq %r13
movl %eax, 0x94(%rsp)
cltd
idivl %r13d
movl %eax, %ebp
movl %edx, %r14d
movl %r12d, %ecx
negl %r12d
movq 0x98(%rsp), %rsi
movslq 0x20(%rsi), %rax
movq %rcx, 0xa8(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
subq %rax, %rbx
cmpl %r12d, %eax
cmovgq %rcx, %rbx
movslq 0x1c(%rsi), %rax
movq %rax, 0x28(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r13d, %edi
movl %r15d, %esi
callq 0x2097d1
testq %rax, %rax
je 0x399022
movl %r12d, 0x58(%rsp)
movl %r14d, 0x8c(%rsp)
movl %ebp, 0x90(%rsp)
movq %rbx, 0x68(%rsp)
movq %rax, 0x8(%rsp)
orl $0x2880801, 0xc(%rax)   # imm = 0x2880801
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x20(%rsp)
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, %r12
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, %rbp
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x60(%rsp)
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, %rbx
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %r15, %rcx
movq %rax, %r15
movq %rcx, 0x48(%rsp)
leal 0x1(%rcx), %r14d
movl $0x10, %edi
movq %r14, %rsi
callq 0x2094de
movq 0x60(%rsp), %r8
movq 0x20(%rsp), %r10
testq %r10, %r10
sete %dl
movq %r12, 0x18(%rsp)
testq %r12, %r12
sete %cl
orb %dl, %cl
movq %rbp, 0x40(%rsp)
testq %rbp, %rbp
sete %sil
testq %r8, %r8
sete %dl
orb %sil, %dl
orb %cl, %dl
movq %rbx, 0x30(%rsp)
testq %rbx, %rbx
sete %sil
movq %r15, 0x80(%rsp)
testq %r15, %r15
sete %cl
orb %sil, %cl
testq %rax, %rax
sete %sil
orb %cl, %sil
orb %dl, %sil
testb $0x1, %sil
jne 0x399022
movq %rax, 0x70(%rsp)
movq 0x48(%rsp), %r11
leal -0x1(%r11), %eax
movl %eax, 0x88(%rsp)
movq 0xa8(%rsp), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movl 0x10(%rsp), %esi
movd %esi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movq 0x68(%rsp), %rax
leaq 0x1(%rax), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x28(%rsp), %rax
addq $-0x2, %rax
movq %rcx, 0xe8(%rsp)
movq %rcx, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movdqa %xmm2, 0x110(%rsp)
movq %rax, 0xb8(%rsp)
movq %rax, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movl %esi, %eax
movl 0x58(%rsp), %ebp
movslq %ebp, %rcx
movl %r13d, %esi
negq %rdx
movq %rsi, 0x50(%rsp)
imulq %rax, %rsi
xorl %edi, %edi
movq %r8, %r15
movq %r10, %rbx
movq %rcx, %r8
xorl %r9d, %r9d
movq %r8, 0x130(%rsp,%r9,8)
leaq (%rdx,%r8), %r10
movq %r10, 0x120(%rsp,%r9,8)
incq %r9
subq %rsi, %r8
cmpq $0x1, %r9
je 0x39856f
movq %rdi, %r8
shlq $0x4, %r8
movaps 0x130(%rsp), %xmm3
movq %rbx, %r10
movaps %xmm3, (%rbx,%r8)
movaps 0x120(%rsp), %xmm3
movq 0x40(%rsp), %r9
movaps %xmm3, (%r9,%r8)
movaps %xmm3, (%r15,%r8)
movq %r15, %r8
incq %rdi
subq %rax, %rcx
cmpq 0x50(%rsp), %rdi
jne 0x398563
movq 0x70(%rsp), %rdi
movq $0x0, (%rdi)
movslq %ebp, %rcx
movl $0x1, %edx
movq %rcx, (%rdi,%rdx,8)
incq %rdx
subq %rax, %rcx
cmpq %rdx, %r14
jne 0x3985e1
cmpl $0x1, %r13d
movl %r13d, %eax
adcl $0x0, %eax
movq %rax, %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movdqa 0x25f1e5(%rip), %xmm3   # 0x5f77f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsi), %rsi
movq (%rsi), %rsi
movdqa %xmm3, (%rsi,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x39860b
leal -0x1(%r13), %ecx
movl %r11d, %edx
movq %rdx, 0xb0(%rsp)
cmpl $0x2, %r11d
movl $0x1, %edx
cmovgel %r11d, %edx
movq %rdx, 0xd0(%rsp)
movl %eax, %eax
movq 0x50(%rsp), %rdx
shlq $0x4, %rdx
shlq $0x4, %rax
movq %rax, 0x48(%rsp)
movq $0x0, 0x10(%rsp)
shlq $0x4, %rcx
movq %rcx, 0xd8(%rsp)
movslq %r13d, %rax
movq %rax, 0xc0(%rsp)
movdqa 0x25ee0b(%rip), %xmm7   # 0x5f7490
movdqa 0x25d842(%rip), %xmm10  # 0x5f5ed0
movdqa 0x25ee09(%rip), %xmm14  # 0x5f74a0
movdqa 0x25edd0(%rip), %xmm8   # 0x5f7470
movdqa 0x25edd7(%rip), %xmm9   # 0x5f7480
movdqa 0x25f14e(%rip), %xmm11  # 0x5f7800
movdqa 0x25f155(%rip), %xmm12  # 0x5f7810
movq %rdx, 0xc8(%rsp)
movq %rdx, 0x78(%rsp)
xorl %ebp, %ebp
movdqa 0x110(%rsp), %xmm4
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r8, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd8(%rsp), %rcx
leaq (%r10,%rcx), %rdx
movq %rdx, 0xf0(%rsp)
movq (%rdi,%rbp,8), %xmm3
movq %r10, 0x18(%rsp)
punpcklqdq (%r10,%rcx), %xmm3 # xmm3 = xmm3[0],mem[0]
movq 0x98(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rcx
movzbl (%rcx,%rbp), %edx
movslq (%rax,%rdx,4), %rax
imulq 0xc0(%rsp), %rax
shlq $0x4, %rax
addq 0xe0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %rbp, 0xf8(%rsp)
incq %rbp
movl $0x1, %ecx
xorl %esi, %esi
movdqa 0x110(%rsp), %xmm13
movq %rbp, 0x60(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x58(%rsp), %rax
paddq (%rax,%rsi), %xmm3
movq %xmm3, %rdx
movq 0x40(%rsp), %r14
movq (%r14,%rsi), %rbx
cmpq %rbx, %rdx
movq %rbx, %r10
cmovgq %rdx, %r10
movq 0x8(%r14,%rsi), %r8
pshufd $0xee, %xmm3, %xmm3     # xmm3 = xmm3[2,3,2,3]
movq %xmm3, %rdi
cmpq %r8, %rdi
movq %r8, %rax
cmovgq %rdi, %rax
movq %xmm13, %r11
cmpq %r11, %r10
movq %r11, %r9
cmovgq %r10, %r9
pshufd $0xee, %xmm13, %xmm3    # xmm3 = xmm13[2,3,2,3]
movq %xmm3, %r13
cmpq %r13, %rax
movq %r13, %rbp
cmovgq %rax, %rbp
movq %xmm4, %rcx
cmpq %r9, %rcx
cmovleq %r9, %rcx
movq %rcx, 0x108(%rsp)
pshufd $0xee, %xmm4, %xmm3     # xmm3 = xmm4[2,3,2,3]
movq %xmm3, %rcx
cmpq %rbp, %rcx
cmovleq %rbp, %rcx
movq %rcx, 0x100(%rsp)
movq %xmm2, %r15
cmpq %r9, %r15
cmovgeq %r9, %r15
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %r12
cmpq %rbp, %r12
cmovgeq %rbp, %r12
movdqa (%r14,%rsi), %xmm2
cmpq %rbx, %r15
cmovgeq %rbx, %r15
movq %r9, %xmm5
cmpq %r8, %r12
cmovgeq %r8, %r12
movq %rbp, %xmm3
cmpq %r11, %r15
cmovgeq %r11, %r15
punpcklqdq %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0]
cmpq %r13, %r12
cmovgeq %r13, %r12
movq 0x28(%rsp), %r8
movdqa %xmm5, (%r8,%rsi)
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %r8
movq (%r8), %rbx
movq 0x10(%rsp), %r14
addq %r14, %rbx
xorl %r8d, %r8d
cmpq %rdx, %r9
sete %r8b
negq %r8
xorl %edx, %edx
cmpq %rdi, %rbp
movq 0x60(%rsp), %rbp
sete %dl
negq %rdx
xorl %edi, %edi
cmpq %r10, %r11
movq %r8, %xmm3
movq %rdx, %xmm4
punpcklqdq %xmm4, %xmm3    # xmm3 = xmm3[0],xmm4[0]
setge %dil
negq %rdi
xorl %edx, %edx
cmpq %rax, %r13
setge %dl
negq %rdx
movq %rdi, %xmm4
movq %rdx, %xmm6
punpcklqdq %xmm6, %xmm4    # xmm4 = xmm4[0],xmm6[0]
pand %xmm7, %xmm4
pxor %xmm10, %xmm4
movdqa %xmm3, %xmm6
pandn %xmm4, %xmm6
pand %xmm14, %xmm3
por %xmm6, %xmm3
movdqa (%rsi,%rbx), %xmm4
movq 0x80(%rsp), %rax
movdqa %xmm3, (%rax,%rsi)
movq 0x10(%rcx), %rax
movq (%rax), %rax
addq %r14, %rax
psubq %xmm0, %xmm5
psubq %xmm1, %xmm2
movq %xmm5, %r10
movq %xmm2, %rdx
cmpq %rdx, %r10
cmovgq %r10, %rdx
por %xmm3, %xmm4
pshufd $0xee, %xmm5, %xmm3     # xmm3 = xmm5[2,3,2,3]
movq %xmm3, %r8
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %rdi
cmpq %rdi, %r8
cmovgq %r8, %rdi
movdqa %xmm4, (%rsi,%rax)
movq %rdx, %xmm2
movq %rdi, %xmm3
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
movq 0x40(%rsp), %rax
movdqa %xmm2, (%rax,%rsi)
movq 0x30(%rsp), %rax
movdqa (%rax,%rsi), %xmm2
psubq %xmm1, %xmm2
movq %xmm2, %rdx
cmpq %rdx, %r10
movq %rdx, %rdi
cmovgq %r10, %rdi
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %rax
cmpq %rax, %r8
movq %rdi, %xmm2
movq %rax, %rdi
cmovgq %r8, %rdi
movq %rdi, %xmm3
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
movq 0x20(%rsp), %rdi
movdqa %xmm2, (%rdi,%rsi)
cmpq 0xb0(%rsp), %rbp
jae 0x3989dd
xorl %edi, %edi
cmpq %rdx, %r10
setg %dil
negq %rdi
xorl %edx, %edx
cmpq %rax, %r8
setg %dl
negq %rdx
movq %rdx, %xmm2
movq %rdi, %xmm3
punpcklqdq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0]
pand 0x25ea91(%rip), %xmm3   # 0x5f7450
pxor 0x25ea99(%rip), %xmm3   # 0x5f7460
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
addq 0x78(%rsp), %rax
movdqa %xmm3, (%rsi,%rax)
movdqa %xmm13, %xmm15
psubq %xmm1, %xmm15
movq %xmm15, %r9
cmpq %r9, %r10
movq %r9, %rdx
cmovgq %r10, %rdx
pshufd $0xee, %xmm15, %xmm2    # xmm2 = xmm15[2,3,2,3]
movq %xmm2, %rax
cmpq %rax, %r8
movq %rax, %rdi
cmovgq %r8, %rdi
movq 0x38(%rsp), %rcx
cmpq 0x50(%rsp), %rcx
jae 0x398a66
movq 0x8(%rsp), %r11
movq 0x10(%r11), %r11
movq (%r11), %r11
addq 0x10(%rsp), %r11
xorl %ebx, %ebx
cmpq %r9, %r10
setg %bl
negq %rbx
xorl %r9d, %r9d
cmpq %rax, %r8
setg %r9b
negq %r9
movq %r9, %xmm2
movq %rbx, %xmm3
punpcklqdq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0]
pand %xmm8, %xmm3
pxor %xmm9, %xmm3
por 0x10(%rsi,%r11), %xmm3
movdqa %xmm3, 0x10(%rsi,%r11)
movq 0x108(%rsp), %xmm4
movq 0x100(%rsp), %xmm2
punpcklqdq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0]
movq %r15, %xmm2
movq %r12, %xmm3
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
movq %rdx, %xmm13
movq %rdi, %xmm3
punpcklqdq %xmm3, %xmm13   # xmm13 = xmm13[0],xmm3[0]
movq 0x18(%rsp), %rax
movdqa (%rax,%rsi), %xmm3
addq $0x10, %rsi
incq %rcx
cmpq %rsi, 0x48(%rsp)
jne 0x398767
movq $0x0, 0x38(%rsp)
movdqa %xmm13, %xmm14
movq 0x70(%rsp), %rcx
movq (%rcx,%rbp,8), %rax
subq 0xa8(%rsp), %rax
movq %rax, %xmm7
movq 0xf8(%rsp), %rax
movq (%rcx,%rax,8), %xmm6
movq 0xf0(%rsp), %rax
punpcklqdq (%rax), %xmm6   # xmm6 = xmm6[0],mem[0]
movdqa %xmm7, %xmm10
punpcklqdq %xmm5, %xmm10   # xmm10 = xmm10[0],xmm5[0]
movdqa %xmm7, %xmm3
punpcklqdq %xmm14, %xmm3   # xmm3 = xmm3[0],xmm14[0]
movq 0xe8(%rsp), %xmm5
punpcklqdq %xmm15, %xmm5   # xmm5 = xmm5[0],xmm15[0]
punpcklqdq %xmm13, %xmm7   # xmm7 = xmm7[0],xmm13[0]
movb $0x1, %r13b
movl $0x1, %r15d
xorl %esi, %esi
movdqa %xmm5, %xmm15
movdqa %xmm7, %xmm13
movdqa %xmm10, %xmm5
movq %xmm3, %rbp
movq 0x28(%rsp), %rcx
movq (%rcx,%rsi), %rbx
movq 0x8(%rcx,%rsi), %r10
cmpq %rbp, %rbx
movq %rbp, %rdx
cmovgq %rbx, %rdx
pshufd $0xee, %xmm3, %xmm7     # xmm7 = xmm3[2,3,2,3]
movq %xmm7, %r8
cmpq %r8, %r10
movq %r8, %rdi
cmovgq %r10, %rdi
movq %rdx, %xmm14
movq %rdi, %xmm7
punpcklqdq %xmm7, %xmm14   # xmm14 = xmm14[0],xmm7[0]
movq %xmm2, %r12
cmpq %rdx, %r12
cmovgeq %rdx, %r12
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %r11
cmpq %rdi, %r11
cmovgeq %rdi, %r11
movq %xmm4, %rax
cmpq %rdx, %rax
cmovleq %rdx, %rax
movdqa %xmm14, (%rcx,%rsi)
pshufd $0xee, %xmm4, %xmm2     # xmm2 = xmm4[2,3,2,3]
movq %xmm2, %r9
cmpq %rdi, %r9
cmovleq %rdi, %r9
movq 0x58(%rsp), %rcx
paddq (%rcx,%rsi), %xmm6
movq %xmm6, %r14
xorl %ecx, %ecx
cmpq %r14, %rdx
sete %cl
negq %rcx
pshufd $0xee, %xmm6, %xmm2     # xmm2 = xmm6[2,3,2,3]
movq %xmm2, %r14
xorl %edx, %edx
cmpq %r14, %rdi
sete %dl
negq %rdx
xorl %edi, %edi
cmpq %rbx, %rbp
movq 0x60(%rsp), %rbp
movq %rcx, %xmm2
movq %xmm5, %rbx
pshufd $0xee, %xmm5, %xmm4     # xmm4 = xmm5[2,3,2,3]
movq %rdx, %xmm5
punpcklqdq %xmm5, %xmm2    # xmm2 = xmm2[0],xmm5[0]
setge %dil
negq %rdi
xorl %ecx, %ecx
cmpq %r10, %r8
setge %cl
negq %rcx
movq %rdi, %xmm5
movq %rcx, %xmm6
punpcklqdq %xmm6, %xmm5    # xmm5 = xmm5[0],xmm6[0]
pandn %xmm5, %xmm2
movq 0x8(%rsp), %r14
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
movq 0x10(%rsp), %rdi
addq %rdi, %rcx
movdqa (%rsi,%rcx), %xmm5
movdqa %xmm2, %xmm6
movq 0x80(%rsp), %rcx
pandn (%rcx,%rsi), %xmm6
pand %xmm11, %xmm5
pand 0x25ced2(%rip), %xmm2   # 0x5f5b30
por %xmm6, %xmm2
movdqa %xmm2, (%rcx,%rsi)
por %xmm5, %xmm2
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
addq %rdi, %rcx
movdqa %xmm2, (%rsi,%rcx)
movq 0x10(%r14), %rcx
movq (%rcx), %rdx
addq %rdi, %rdx
movq %xmm15, %rcx
xorl %edi, %edi
cmpq %rcx, %rbx
setg %dil
negq %rdi
movq %xmm4, %rcx
pshufd $0xee, %xmm15, %xmm2    # xmm2 = xmm15[2,3,2,3]
movq %xmm2, %r8
xorl %r10d, %r10d
cmpq %r8, %rcx
setg %r10b
negq %r10
movq %rdi, %xmm2
movq %r10, %xmm4
punpcklqdq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0]
pand %xmm8, %xmm2
movdqa (%rsi,%rdx), %xmm4
pand %xmm12, %xmm4
por %xmm2, %xmm4
pxor %xmm9, %xmm4
movdqa %xmm4, (%rsi,%rdx)
movdqa %xmm14, %xmm5
psubq %xmm0, %xmm5
movq 0x30(%rsp), %rcx
movdqa (%rcx,%rsi), %xmm2
psubq %xmm1, %xmm2
movq %xmm5, %r8
movq %xmm2, %rdi
cmpq %rdi, %r8
movq %rdi, %rcx
cmovgq %r8, %rcx
pshufd $0xee, %xmm5, %xmm4     # xmm4 = xmm5[2,3,2,3]
movq %xmm4, %r10
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %rdx
cmpq %rdx, %r10
movq %rcx, %xmm2
movq %rdx, %rcx
cmovgq %r10, %rcx
movq %rcx, %xmm4
punpcklqdq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0]
movq 0x20(%rsp), %rcx
movdqa %xmm2, (%rcx,%rsi)
cmpq 0xb0(%rsp), %rbp
jae 0x398d8e
xorl %ecx, %ecx
cmpq %rdi, %r8
setg %cl
negq %rcx
xorl %edi, %edi
cmpq %rdx, %r10
setg %dil
negq %rdi
movq %rdi, %xmm2
movq %rcx, %xmm4
punpcklqdq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0]
pand 0x25e6db(%rip), %xmm4   # 0x5f7450
pxor 0x25e6e3(%rip), %xmm4   # 0x5f7460
movq 0x10(%r14), %rcx
movq (%rcx), %rcx
addq 0x78(%rsp), %rcx
movdqa %xmm4, (%rsi,%rcx)
movq %r12, %xmm2
movq %r11, %xmm4
punpcklqdq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0]
movq %rax, %xmm4
movq %r9, %xmm6
punpcklqdq %xmm6, %xmm4    # xmm4 = xmm4[0],xmm6[0]
movdqa %xmm3, %xmm14
psubq %xmm1, %xmm14
movq %xmm14, %rcx
pshufd $0xee, %xmm14, %xmm6    # xmm6 = xmm14[2,3,2,3]
movq %xmm6, %rdi
xorl %ebx, %ebx
xorl %edx, %edx
cmpq %r10, %rdi
setg %bl
sete %dl
xorl %edi, %edi
xorl %r14d, %r14d
cmpq %r8, %rcx
setg %dil
sete %r14b
negq %rdi
negq %rbx
movq %rdi, %xmm6
movq %rbx, %xmm7
punpcklqdq %xmm7, %xmm6    # xmm6 = xmm6[0],xmm7[0]
negq %r14
negq %rdx
movq %r14, %xmm7
movq %rdx, %xmm10
punpcklqdq %xmm10, %xmm7   # xmm7 = xmm7[0],xmm10[0]
por %xmm6, %xmm7
pmovmskb %xmm7, %ecx
testl %ecx, %ecx
je 0x398e79
movdqa %xmm13, %xmm15
psubq %xmm1, %xmm15
movq %xmm15, %rcx
cmpq %rcx, %r8
cmovgq %r8, %rcx
pshufd $0xee, %xmm15, %xmm3    # xmm3 = xmm15[2,3,2,3]
movq %xmm3, %rdx
cmpq %rdx, %r10
cmovgq %r10, %rdx
movq %rcx, %xmm13
movq %rdx, %xmm3
punpcklqdq %xmm3, %xmm13   # xmm13 = xmm13[0],xmm3[0]
movq 0x18(%rsp), %rcx
movdqa (%rcx,%rsi), %xmm6
cmpq 0x50(%rsp), %r15
setb %r13b
addq $0x10, %rsi
incq %r15
movdqa %xmm14, %xmm3
cmpq %rsi, 0x48(%rsp)
jne 0x398b32
jmp 0x398e7e
movdqa %xmm3, %xmm14
testb $0x1, %r13b
jne 0x398e99
movq 0x38(%rsp), %rdx
leal 0x1(%rdx), %ecx
testl %edx, %edx
movq %rcx, 0x38(%rsp)
je 0x398ac3
movq 0xc8(%rsp), %rcx
addq %rcx, 0x78(%rsp)
addq %rcx, 0x10(%rsp)
movq 0x28(%rsp), %rbx
movq %rbx, %r10
movq 0x20(%rsp), %r15
movq %r15, %r8
cmpq 0xd0(%rsp), %rbp
movq 0x70(%rsp), %rdi
movdqa 0x25e5c0(%rip), %xmm7   # 0x5f7490
movdqa 0x25cff7(%rip), %xmm10  # 0x5f5ed0
movdqa 0x25e5be(%rip), %xmm14  # 0x5f74a0
jne 0x3986d3
movl 0x8c(%rsp), %ecx
shlq $0x4, %rcx
movdqa (%rbx,%rcx), %xmm0
movl 0x90(%rsp), %ecx
testl %ecx, %ecx
jle 0x398f0a
movq 0x68(%rsp), %rsi
jmp 0x398f18
movq 0x68(%rsp), %rsi
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
testl %ecx, %ecx
js 0x398f0f
xorl %ecx, %ecx
cmpq %rsi, %r12
setle %cl
negq %rcx
xorl %edx, %edx
cmpq %rsi, %r11
setle %dl
negq %rdx
movq %rdx, %xmm1
movq %rcx, %xmm2
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
xorl %ecx, %ecx
movq 0xb8(%rsp), %rdx
cmpq %rdx, %rax
setg %cl
negq %rcx
xorl %eax, %eax
cmpq %rdx, %r9
setg %al
negq %rax
movq %rax, %xmm1
movq %rcx, %xmm3
punpcklqdq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0]
por %xmm2, %xmm3
pmovmskb %xmm3, %eax
testl %eax, %eax
je 0x398f85
movq 0x8(%rsp), %rax
orb $0x40, 0xc(%rax)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x398f9d
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rax
movl 0x94(%rsp), %ecx
movl 0x88(%rsp), %edx
movq 0x8(%rsp), %rsi
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
movl %edx, 0x8(%rsi)
callq 0x2094b5
movq 0x80(%rsp), %rdi
callq 0x2094b5
movq 0x30(%rsp), %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq 0x40(%rsp), %rdi
callq 0x2094b5
movq 0x18(%rsp), %rdi
callq 0x2094b5
movq %rbx, %rdi
callq 0x2094b5
jmp 0x39902b
callq 0x1be89d
jmp 0x399022
callq 0x1be877
jmp 0x399022
callq 0x1be851
jmp 0x399022
callq 0x1be82b
jmp 0x399022
callq 0x1be805
jmp 0x399022
callq 0x1be7df
jmp 0x399022
callq 0x1be7b9
jmp 0x399022
callq 0x1be793
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop