// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/nw_trace_striped_sse2_128_32.c
// Function: parasail_nw_trace_striped_profile_sse2_128_32
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;
    int32_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    int32_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->profile32.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 = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m128i*)profile->profile32.score;
    vGapO = _mm_set1_epi32(open);
    vGapE = _mm_set1_epi32(gap);
    NEG_LIMIT = (-open < matrix->min ? INT32_MIN + open : INT32_MIN - matrix->min) + 1;
    POS_LIMIT = INT32_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vTIns  = _mm_set1_epi32(PARASAIL_INS);
    vTDel  = _mm_set1_epi32(PARASAIL_DEL);
    vTDiag = _mm_set1_epi32(PARASAIL_DIAG);
    vTDiagE = _mm_set1_epi32(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi32(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi32(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi32(PARASAIL_DEL_F);
    vTMask = _mm_set1_epi32(PARASAIL_ZERO_MASK);
    vFTMask = _mm_set1_epi32(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_32 | PARASAIL_FLAG_LANES_4;

    /* 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_int32_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_32_t h;
            __m128i_32_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT32_MIN ? INT32_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT32_MIN ? INT32_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 < INT32_MIN ? INT32_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 4 bytes */
        vH = _mm_load_si128(&pvHStore[segLen - 1]);
        vH = _mm_slli_si128(vH, 4);

        /* insert upper boundary condition */
        vH = _mm_insert_epi32_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_epi32(vH, _mm_load_si128(vP + i));
            vH = _mm_max_epi32_rpl(vH_dag, vE);
            vH = _mm_max_epi32_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
            vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vF);

            {
                __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m128i case1 = _mm_cmpeq_epi32(vH, vH_dag);
                __m128i case2 = _mm_cmpeq_epi32(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_epi32(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm_sub_epi32(vE, vGapE);
            vE = _mm_max_epi32_rpl(vEF_opn, vE_ext);
            _mm_store_si128(pvE + i, vE);
            {
                __m128i vEa = _mm_load_si128(pvEaLoad + i);
                __m128i vEa_ext = _mm_sub_epi32(vEa, vGapE);
                vEa = _mm_max_epi32_rpl(vEF_opn, vEa_ext);
                _mm_store_si128(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m128i cond = _mm_cmpgt_epi32(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_epi32(vF, vGapE);
            vF = _mm_max_epi32_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_epi32(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;
            int32_t tmp2 = tmp < INT32_MIN ? INT32_MIN : tmp;
            __m128i vHp = _mm_load_si128(&pvHLoad[segLen - 1]);
            vHp = _mm_slli_si128(vHp, 4);
            vHp = _mm_insert_epi32_rpl(vHp, boundary[j], 0);
            vEF_opn = _mm_slli_si128(vEF_opn, 4);
            vEF_opn = _mm_insert_epi32_rpl(vEF_opn, tmp2, 0);
            vF_ext = _mm_slli_si128(vF_ext, 4);
            vF_ext = _mm_insert_epi32_rpl(vF_ext, NEG_LIMIT, 0);
            vF = _mm_slli_si128(vF, 4);
            vF = _mm_insert_epi32_rpl(vF, tmp2, 0);
            vFa_ext = _mm_slli_si128(vFa_ext, 4);
            vFa_ext = _mm_insert_epi32_rpl(vFa_ext, NEG_LIMIT, 0);
            vFa = _mm_slli_si128(vFa, 4);
            vFa = _mm_insert_epi32_rpl(vFa, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi32_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
                vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vH);
                {
                    __m128i vTAll;
                    __m128i vT;
                    __m128i case1;
                    __m128i case2;
                    __m128i cond;
                    vHp = _mm_add_epi32(vHp, _mm_load_si128(vP + i));
                    case1 = _mm_cmpeq_epi32(vH, vHp);
                    case2 = _mm_cmpeq_epi32(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_epi32(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_epi32(vH, vGapO);
                vF_ext = _mm_sub_epi32(vF, vGapE);
                {
                    __m128i vEa = _mm_load_si128(pvEaLoad + i);
                    __m128i vEa_ext = _mm_sub_epi32(vEa, vGapE);
                    vEa = _mm_max_epi32_rpl(vEF_opn, vEa_ext);
                    _mm_store_si128(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m128i cond = _mm_cmpgt_epi32(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_epi32(vF_ext, vEF_opn),
                                _mm_cmpeq_epi32(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm_max_epi32_rpl(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm_sub_epi32(vFa, vGapE);
                vFa = _mm_max_epi32_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, 4);
        }
        score = (int32_t) _mm_extract_epi32_rpl (vH, 3);
    }

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi32(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi32(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 $0xc8, %rsp
movl %ecx, 0x4(%rsp)
movq %rsi, 0x78(%rsp)
testq %rdi, %rdi
je 0x359f6b
movq 0x48(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x359f8f
movq 0x10(%rdi), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x359fb3
movl 0x8(%rdi), %r14d
testl %r14d, %r14d
jle 0x359fd7
cmpq $0x0, 0x78(%rsp)
je 0x359ffb
movl %edx, %r9d
testl %edx, %edx
jle 0x35a01c
cmpl $0x0, 0x4(%rsp)
js 0x35a03d
testl %r8d, %r8d
js 0x35a05e
movl %r8d, 0x30(%rsp)
leal -0x1(%r14), %ebp
addq $0x3, %r14
shrq $0x2, %r14
movl %ebp, %eax
xorl %edx, %edx
divl %r14d
movl %eax, %r12d
movl %edx, %r15d
movl 0x4(%rsp), %ecx
movl %ecx, %r13d
negl %r13d
movq 0x70(%rsp), %rdx
movl 0x20(%rdx), %eax
movl $0x80000000, %esi       # imm = 0x80000000
orl %esi, %ecx
subl %eax, %esi
cmpl %r13d, %eax
cmovgl %ecx, %esi
movl %esi, 0x14(%rsp)
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %eax
movl %eax, 0x48(%rsp)
pushq $0x10
popq %rcx
movl %r14d, %edi
movl %r9d, %esi
movq %rcx, %rdx
movq %r9, 0x18(%rsp)
callq 0x1abb59
testq %rax, %rax
je 0x35985e
movq %rax, %rbx
movl %r12d, 0x60(%rsp)
movl %r15d, 0x5c(%rsp)
movl %ebp, 0x58(%rsp)
orl $0x4480801, 0xc(%rax)   # imm = 0x4480801
pushq $0x10
popq %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x297cd8
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
callq 0x297cd8
movq %r14, %rbp
movq %rax, %r14
movq %r12, %rdi
movq %rbp, %rsi
callq 0x297cd8
movq %rax, 0x38(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x297cd8
movq %rax, %r12
pushq $0x10
popq %rdi
movq %rbp, %rsi
callq 0x297cd8
movq %rax, 0x28(%rsp)
pushq $0x10
popq %rdi
movq %rbp, 0x8(%rsp)
movq %rbp, %rsi
callq 0x297cd8
movq %rax, %rbp
movq 0x18(%rsp), %rax
leal 0x1(%rax), %esi
pushq $0x10
popq %rdi
movq %rsi, 0x40(%rsp)
callq 0x1ab783
movq %r15, %xmm0
movq %r14, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq 0x38(%rsp), %xmm1
movq %r12, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
pxor %xmm2, %xmm2
cmpq $0x0, 0x28(%rsp)
sete %dil
testq %rbp, %rbp
sete %cl
movq %rax, 0x20(%rsp)
testq %rax, %rax
sete %dl
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
movdqa %xmm0, %xmm2
shufps $0xdd, %xmm1, %xmm2     # xmm2 = xmm2[1,3],xmm1[1,3]
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
andps %xmm2, %xmm0
movmskps %xmm0, %esi
testl %esi, %esi
setne %sil
orb %dil, %cl
orb %dl, %cl
orb %sil, %cl
je 0x359865
xorl %ebx, %ebx
jmp 0x35a086
movq 0x18(%rsp), %r9
leal -0x1(%r9), %eax
movl %eax, 0x54(%rsp)
pushq $0x3
popq %rax
subl 0x60(%rsp), %eax
movl %eax, 0x50(%rsp)
movl 0x4(%rsp), %eax
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm2      # xmm2 = xmm0[0,0,0,0]
movl 0x30(%rsp), %r11d
movd %r11d, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
movl 0x14(%rsp), %ecx
incl %ecx
movl %ecx, 0x14(%rsp)
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x60(%rsp)
movd 0x48(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm6      # xmm6 = xmm0[0,0,0,0]
movl %eax, %eax
movl %r11d, %ecx
imull 0x8(%rsp), %ecx
xorl %edx, %edx
movq $-0x80000000, %rsi      # imm = 0x80000000
movl %r13d, %edi
cmpq 0x8(%rsp), %rdx
je 0x35994d
movl %edi, %r8d
xorl %r9d, %r9d
cmpq $0x4, %r9
je 0x359912
movslq %r8d, %r8
movq %r8, %r10
subq %rax, %r10
cmpq $-0x7fffffff, %r10      # imm = 0x80000001
cmovlq %rsi, %r10
movl %r8d, 0xb0(%rsp,%r9,4)
movl %r10d, 0xa0(%rsp,%r9,4)
incq %r9
subl %ecx, %r8d
jmp 0x3598e0
movq %rdx, %r8
shlq $0x4, %r8
movaps 0xb0(%rsp), %xmm0
movaps %xmm0, (%r15,%r8)
movdqa 0xa0(%rsp), %xmm0
movq 0x38(%rsp), %r9
movdqa %xmm0, (%r9,%r8)
movdqa %xmm0, (%r12,%r8)
incq %rdx
subl %r11d, %edi
movq 0x18(%rsp), %r9
jmp 0x3598d3
movq 0x20(%rsp), %rax
andl $0x0, (%rax)
pushq $0x1
popq %rax
movq 0x40(%rsp), %rdx
movq 0x20(%rsp), %rcx
cmpq %rax, %rdx
je 0x359973
movl %r13d, (%rcx,%rax,4)
incq %rax
subl %r11d, %r13d
jmp 0x359962
movq 0x8(%rsp), %rsi
shlq $0x4, %rsi
xorl %eax, %eax
movaps 0x27002b(%rip), %xmm0   # 0x5c99b0
cmpq %rax, %rsi
je 0x35999b
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
movaps %xmm0, (%rcx,%rax)
addq $0x10, %rax
jmp 0x359985
movq 0x8(%rsp), %rax
decl %eax
movl %r9d, %ecx
movq %rcx, 0x40(%rsp)
xorl %r10d, %r10d
shlq $0x4, %rax
movq %rax, 0x80(%rsp)
movdqa 0x26fcaf(%rip), %xmm5   # 0x5c9670
movdqa 0x26fc86(%rip), %xmm8   # 0x5c9650
movdqa 0x26fc8d(%rip), %xmm10  # 0x5c9660
movdqa 0x26e1e4(%rip), %xmm13  # 0x5c7bc0
movq %rsi, 0x30(%rsp)
xorl %edx, %edx
movdqa 0x60(%rsp), %xmm4
movdqa %xmm6, 0x90(%rsp)
movq 0x28(%rsp), %rax
movq %r14, %r13
movq %rax, %r14
cmpq 0x40(%rsp), %rdx
je 0x359ec6
movq 0x80(%rsp), %rax
leaq (%r15,%rax), %rcx
movq %rcx, 0x48(%rsp)
pshufd $0x90, (%r15,%rax), %xmm9 # xmm9 = mem[0,0,1,2]
movq 0x20(%rsp), %rax
movss (%rax,%rdx,4), %xmm0
movss %xmm0, %xmm9            # xmm9 = xmm0[0],xmm9[1,2,3]
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rcx
movzbl (%rcx,%rdx), %ecx
movl (%rax,%rcx,4), %eax
imull 0x8(%rsp), %eax
movslq %eax, %r8
shlq $0x4, %r8
addq 0x88(%rsp), %r8
movq %rdx, 0x28(%rsp)
leaq 0x1(%rdx), %rcx
pushq $0x1
popq %rdi
xorl %edx, %edx
movdqa 0x60(%rsp), %xmm15
cmpq %rdx, %rsi
je 0x359c6b
paddd (%r8,%rdx), %xmm9
movq 0x38(%rsp), %r11
movdqa (%r11,%rdx), %xmm0
movdqa %xmm9, %xmm7
pcmpgtd %xmm0, %xmm7
movdqa %xmm9, %xmm1
pand %xmm7, %xmm1
pandn %xmm0, %xmm7
por %xmm1, %xmm7
movdqa %xmm7, %xmm11
pcmpgtd %xmm15, %xmm11
pand %xmm11, %xmm7
movdqa %xmm11, %xmm1
pandn %xmm15, %xmm1
por %xmm7, %xmm1
movdqa %xmm1, (%r13,%rdx)
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r10, %rax
pcmpeqd %xmm1, %xmm9
paddd %xmm5, %xmm11
movdqa %xmm9, %xmm7
pandn %xmm11, %xmm7
pand %xmm13, %xmm9
por %xmm7, %xmm9
movdqa (%rdx,%rax), %xmm7
por %xmm9, %xmm7
movdqa %xmm9, (%rbp,%rdx)
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r10, %rax
movdqa %xmm7, (%rdx,%rax)
movdqa %xmm1, %xmm12
psubd %xmm2, %xmm12
movdqa %xmm0, %xmm7
psubd %xmm3, %xmm7
movdqa %xmm12, %xmm9
pcmpgtd %xmm7, %xmm9
movdqa %xmm12, %xmm14
pand %xmm9, %xmm14
pandn %xmm7, %xmm9
por %xmm14, %xmm9
movdqa %xmm9, (%r11,%rdx)
movdqa (%r12,%rdx), %xmm9
psubd %xmm3, %xmm9
movdqa %xmm12, %xmm11
pcmpgtd %xmm9, %xmm11
movdqa %xmm12, %xmm14
pand %xmm11, %xmm14
movdqa %xmm11, %xmm7
pandn %xmm9, %xmm7
por %xmm14, %xmm7
movdqa %xmm7, (%r14,%rdx)
cmpl %r9d, %ecx
jge 0x359ba0
pand 0x26faab(%rip), %xmm11  # 0x5c9630
pxor 0x26fab2(%rip), %xmm11  # 0x5c9640
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq 0x30(%rsp), %rax
movdqa %xmm11, (%rdx,%rax)
movdqa %xmm15, %xmm7
psubd %xmm3, %xmm7
movdqa %xmm12, %xmm14
pcmpgtd %xmm7, %xmm14
cmpq 0x8(%rsp), %rdi
jae 0x359be1
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r10, %rax
movdqa %xmm14, %xmm9
pand %xmm8, %xmm9
pxor %xmm10, %xmm9
por 0x10(%rdx,%rax), %xmm9
movdqa %xmm9, 0x10(%rdx,%rax)
movdqa %xmm4, %xmm9
pcmpgtd %xmm1, %xmm9
pand %xmm9, %xmm4
pandn %xmm1, %xmm9
por %xmm9, %xmm4
movdqa %xmm6, %xmm9
pcmpgtd %xmm1, %xmm9
pand %xmm9, %xmm1
pandn %xmm6, %xmm9
por %xmm1, %xmm9
movdqa %xmm9, %xmm1
pcmpgtd %xmm0, %xmm1
pand %xmm1, %xmm0
pandn %xmm9, %xmm1
por %xmm0, %xmm1
movdqa %xmm1, %xmm6
pcmpgtd %xmm15, %xmm6
pand %xmm6, %xmm15
pandn %xmm1, %xmm6
por %xmm15, %xmm6
movdqa %xmm12, %xmm0
pand %xmm14, %xmm0
pandn %xmm7, %xmm14
por %xmm0, %xmm14
movdqa (%r15,%rdx), %xmm9
addq $0x10, %rdx
incq %rdi
movdqa %xmm14, %xmm15
jmp 0x359a6d
xorl %r11d, %r11d
movdqa %xmm15, %xmm0
movdqa %xmm7, %xmm1
cmpl $0x4, %r11d
je 0x359eaa
movq 0x20(%rsp), %rdx
movl (%rdx,%rcx,4), %eax
subl 0x4(%rsp), %eax
movd %eax, %xmm11
movq 0x48(%rsp), %rax
pshufd $0x90, (%rax), %xmm9    # xmm9 = mem[0,0,1,2]
movq 0x28(%rsp), %rax
movss (%rdx,%rax,4), %xmm14
movss %xmm14, %xmm9           # xmm9 = xmm14[0],xmm9[1,2,3]
pshufd $0x90, %xmm12, %xmm12   # xmm12 = xmm12[0,0,1,2]
movss %xmm11, %xmm12          # xmm12 = xmm11[0],xmm12[1,2,3]
pshufd $0x90, %xmm7, %xmm7     # xmm7 = xmm7[0,0,1,2]
movss 0x14(%rsp), %xmm14
movss %xmm14, %xmm7           # xmm7 = xmm14[0],xmm7[1,2,3]
pshufd $0x90, %xmm15, %xmm15   # xmm15 = xmm15[0,0,1,2]
movss %xmm11, %xmm15          # xmm15 = xmm11[0],xmm15[1,2,3]
pshufd $0x90, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,2]
movss %xmm14, %xmm1           # xmm1 = xmm14[0],xmm1[1,2,3]
pshufd $0x90, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,2]
movss %xmm11, %xmm0           # xmm0 = xmm11[0],xmm0[1,2,3]
xorl %edx, %edx
movq %r10, %r9
movq 0x8(%rsp), %rax
subq $0x1, %rax
jb 0x359e93
movdqa (%r13,%rdx), %xmm11
movdqa %xmm11, %xmm14
pcmpgtd %xmm15, %xmm14
pand %xmm14, %xmm11
movdqa %xmm14, %xmm7
pandn %xmm15, %xmm7
por %xmm11, %xmm7
movdqa %xmm7, (%r13,%rdx)
paddd (%r8,%rdx), %xmm9
pcmpeqd %xmm7, %xmm9
por %xmm14, %xmm9
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
movdqa (%rdi,%r9), %xmm11
pand 0x26fc72(%rip), %xmm11  # 0x5c99c0
movdqa (%rbp,%rdx), %xmm14
pand %xmm9, %xmm14
pandn %xmm5, %xmm9
por %xmm14, %xmm9
movdqa %xmm9, (%rbp,%rdx)
por %xmm11, %xmm9
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
movdqa %xmm9, (%rdi,%r9)
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
pcmpgtd %xmm1, %xmm12
pand %xmm8, %xmm12
movdqa (%rdi,%r9), %xmm1
pand 0x26fc34(%rip), %xmm1   # 0x5c99d0
por %xmm12, %xmm1
pxor %xmm10, %xmm1
movdqa %xmm1, (%rdi,%r9)
movdqa %xmm7, %xmm12
psubd %xmm2, %xmm12
movdqa (%r12,%rdx), %xmm9
psubd %xmm3, %xmm9
movdqa %xmm12, %xmm1
pcmpgtd %xmm9, %xmm1
movdqa %xmm12, %xmm11
pand %xmm1, %xmm11
movdqa %xmm1, %xmm14
pandn %xmm9, %xmm14
por %xmm11, %xmm14
movdqa %xmm14, (%r14,%rdx)
cmpl 0x18(%rsp), %ecx
jge 0x359e10
pand 0x26f838(%rip), %xmm1   # 0x5c9630
pxor 0x26f840(%rip), %xmm1   # 0x5c9640
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
addq %rsi, %rdi
movdqa %xmm1, (%r9,%rdi)
movdqa %xmm6, %xmm1
pcmpgtd %xmm7, %xmm1
movdqa %xmm7, %xmm9
pand %xmm1, %xmm9
pandn %xmm6, %xmm1
movdqa %xmm1, %xmm6
por %xmm9, %xmm6
movdqa %xmm4, %xmm1
pcmpgtd %xmm7, %xmm4
pand %xmm4, %xmm1
pandn %xmm7, %xmm4
por %xmm1, %xmm4
psubd %xmm3, %xmm15
movdqa %xmm12, %xmm1
pcmpgtd %xmm15, %xmm1
movmskps %xmm1, %edi
cmpl $0xf, %edi
je 0x359ea0
movaps %xmm0, %xmm1
psubd %xmm3, %xmm1
movdqa %xmm12, %xmm0
pcmpgtd %xmm1, %xmm0
movdqa %xmm12, %xmm7
pand %xmm0, %xmm7
pandn %xmm1, %xmm0
por %xmm7, %xmm0
movdqa (%r15,%rdx), %xmm9
addq $0x10, %r9
addq $0x10, %rdx
movdqa %xmm15, %xmm7
jmp 0x359cf2
incl %r11d
movq 0x18(%rsp), %r9
jmp 0x359c77
movdqa %xmm15, %xmm7
movq 0x18(%rsp), %r9
addq %rsi, 0x30(%rsp)
addq %rsi, %r10
movq %rcx, %rdx
movq %r12, %rax
movq %r14, %r12
movq %r15, %r14
movq %r13, %r15
jmp 0x3599f7
movl 0x5c(%rsp), %eax
shlq $0x4, %rax
movdqa (%r15,%rax), %xmm0
xorl %eax, %eax
movl 0x54(%rsp), %edx
movl 0x50(%rsp), %ecx
cmpl %ecx, %eax
jge 0x359eeb
pslldq $0x4, %xmm0             # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
incl %eax
jmp 0x359ede
movdqa 0x60(%rsp), %xmm1
pcmpgtd %xmm6, %xmm1
pcmpgtd 0x90(%rsp), %xmm4
por %xmm1, %xmm4
movmskps %xmm4, %eax
testl %eax, %eax
je 0x359f15
orb $0x40, 0xc(%rbx)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x359f22
pshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
movd %xmm0, %eax
movl 0x58(%rsp), %ecx
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
movl %edx, 0x8(%rbx)
movq 0x20(%rsp), %rdi
callq 0x1ab763
movq %rbp, %rdi
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
movq %r12, %rdi
callq 0x1ab763
movq 0x38(%rsp), %rdi
callq 0x1ab763
movq %r13, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
jmp 0x35a086
movq 0x3e1066(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d06f(%rip), %rsi    # 0x5c6feb
leaq 0x26731e(%rip), %rdx    # 0x5c12a1
leaq 0x243553(%rip), %rcx    # 0x59d4dd
jmp 0x35a07d
movq 0x3e1042(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d04b(%rip), %rsi    # 0x5c6feb
leaq 0x2672fa(%rip), %rdx    # 0x5c12a1
leaq 0x26d9f8(%rip), %rcx    # 0x5c79a6
jmp 0x35a07d
movq 0x3e101e(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d027(%rip), %rsi    # 0x5c6feb
leaq 0x2672d6(%rip), %rdx    # 0x5c12a1
leaq 0x26d967(%rip), %rcx    # 0x5c7939
jmp 0x35a07d
movq 0x3e0ffa(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d719(%rip), %rsi    # 0x5c7701
leaq 0x2672b2(%rip), %rdx    # 0x5c12a1
leaq 0x26d953(%rip), %rcx    # 0x5c7949
jmp 0x35a07d
movq 0x3e0fd6(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26cfdf(%rip), %rsi    # 0x5c6feb
leaq 0x26728e(%rip), %rdx    # 0x5c12a1
leaq 0x26d6e4(%rip), %rcx    # 0x5c76fe
jmp 0x35a07d
movq 0x3e0fb5(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d6d4(%rip), %rsi    # 0x5c7701
leaq 0x26726d(%rip), %rdx    # 0x5c12a1
leaq 0x26d6da(%rip), %rcx    # 0x5c7715
jmp 0x35a07d
movq 0x3e0f94(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d6cd(%rip), %rsi    # 0x5c771b
leaq 0x26724c(%rip), %rdx    # 0x5c12a1
leaq 0x26d6d4(%rip), %rcx    # 0x5c7730
jmp 0x35a07d
movq 0x3e0f73(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x26d6ac(%rip), %rsi    # 0x5c771b
leaq 0x26722b(%rip), %rdx    # 0x5c12a1
leaq 0x26d6b8(%rip), %rcx    # 0x5c7735
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop