// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_trace_striped_sse2_128_8.c
// Function: parasail_nw_trace_striped_profile_sse2_128_8
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;
    int8_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int8_t NEG_LIMIT = 0;
    int8_t POS_LIMIT = 0;
    int8_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->profile8.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 = 16; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m128i*)profile->profile8.score;
    vGapO = _mm_set1_epi8(open);
    vGapE = _mm_set1_epi8(gap);
    NEG_LIMIT = (-open < matrix->min ? INT8_MIN + open : INT8_MIN - matrix->min) + 1;
    POS_LIMIT = INT8_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi8(NEG_LIMIT);
    vPosLimit = _mm_set1_epi8(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vTIns  = _mm_set1_epi8(PARASAIL_INS);
    vTDel  = _mm_set1_epi8(PARASAIL_DEL);
    vTDiag = _mm_set1_epi8(PARASAIL_DIAG);
    vTDiagE = _mm_set1_epi8(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi8(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi8(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi8(PARASAIL_DEL_F);
    vTMask = _mm_set1_epi8(PARASAIL_ZERO_MASK);
    vFTMask = _mm_set1_epi8(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_8 | PARASAIL_FLAG_LANES_16;

    /* 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_int8_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_8_t h;
            __m128i_8_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT8_MIN ? INT8_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT8_MIN ? INT8_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 < INT8_MIN ? INT8_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 1 bytes */
        vH = _mm_load_si128(&pvHStore[segLen - 1]);
        vH = _mm_slli_si128(vH, 1);

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

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

            /* Update vE value. */
            vE_ext = _mm_subs_epi8(vE, vGapE);
            vE = _mm_max_epi8_rpl(vEF_opn, vE_ext);
            _mm_store_si128(pvE + i, vE);
            {
                __m128i vEa = _mm_load_si128(pvEaLoad + i);
                __m128i vEa_ext = _mm_subs_epi8(vEa, vGapE);
                vEa = _mm_max_epi8_rpl(vEF_opn, vEa_ext);
                _mm_store_si128(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m128i cond = _mm_cmpgt_epi8(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_subs_epi8(vF, vGapE);
            vF = _mm_max_epi8_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_epi8(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;
            int8_t tmp2 = tmp < INT8_MIN ? INT8_MIN : tmp;
            __m128i vHp = _mm_load_si128(&pvHLoad[segLen - 1]);
            vHp = _mm_slli_si128(vHp, 1);
            vHp = _mm_insert_epi8_rpl(vHp, boundary[j], 0);
            vEF_opn = _mm_slli_si128(vEF_opn, 1);
            vEF_opn = _mm_insert_epi8_rpl(vEF_opn, tmp2, 0);
            vF_ext = _mm_slli_si128(vF_ext, 1);
            vF_ext = _mm_insert_epi8_rpl(vF_ext, NEG_LIMIT, 0);
            vF = _mm_slli_si128(vF, 1);
            vF = _mm_insert_epi8_rpl(vF, tmp2, 0);
            vFa_ext = _mm_slli_si128(vFa_ext, 1);
            vFa_ext = _mm_insert_epi8_rpl(vFa_ext, NEG_LIMIT, 0);
            vFa = _mm_slli_si128(vFa, 1);
            vFa = _mm_insert_epi8_rpl(vFa, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi8_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
                vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm_max_epi8_rpl(vSaturationCheckMax, vH);
                {
                    __m128i vTAll;
                    __m128i vT;
                    __m128i case1;
                    __m128i case2;
                    __m128i cond;
                    vHp = _mm_adds_epi8(vHp, _mm_load_si128(vP + i));
                    case1 = _mm_cmpeq_epi8(vH, vHp);
                    case2 = _mm_cmpeq_epi8(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_epi8(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_subs_epi8(vH, vGapO);
                vF_ext = _mm_subs_epi8(vF, vGapE);
                {
                    __m128i vEa = _mm_load_si128(pvEaLoad + i);
                    __m128i vEa_ext = _mm_subs_epi8(vEa, vGapE);
                    vEa = _mm_max_epi8_rpl(vEF_opn, vEa_ext);
                    _mm_store_si128(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m128i cond = _mm_cmpgt_epi8(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_epi8(vF_ext, vEF_opn),
                                _mm_cmpeq_epi8(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm_max_epi8_rpl(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm_subs_epi8(vFa, vGapE);
                vFa = _mm_max_epi8_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, 1);
        }
        score = (int8_t) _mm_extract_epi8_rpl (vH, 15);
    }

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi8(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi8(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 $0xf8, %rsp
movl %ecx, 0xc(%rsp)
movq %rsi, 0x88(%rsp)
testq %rdi, %rdi
je 0x3a017c
movq 0x18(%rdi), %rax
movq %rax, 0xb8(%rsp)
testq %rax, %rax
je 0x3a0183
movq 0x10(%rdi), %rax
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0x3a018a
movl 0x8(%rdi), %r13d
testl %r13d, %r13d
jle 0x3a0191
cmpq $0x0, 0x88(%rsp)
je 0x3a0198
movl %edx, %r12d
testl %edx, %edx
jle 0x3a019f
cmpl $0x0, 0xc(%rsp)
js 0x3a01a6
testl %r8d, %r8d
js 0x3a01ad
movl %r8d, 0x20(%rsp)
leal -0x1(%r13), %eax
addq $0xf, %r13
shrq $0x4, %r13
movl %eax, 0x74(%rsp)
cltd
idivl %r13d
movl %eax, %r14d
movl %edx, %r15d
movl 0xc(%rsp), %edx
movl %edx, %ebp
negl %ebp
movq 0x80(%rsp), %rsi
movl 0x20(%rsi), %eax
movl %eax, %ecx
negb %cl
cmpl %ebp, %eax
movzbl %cl, %eax
cmovgl %edx, %eax
movl %eax, 0x58(%rsp)
movb $0x7e, %al
subb 0x1c(%rsi), %al
movb %al, 0x10(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r13d, %edi
movl %r12d, %esi
callq 0x2097d1
testq %rax, %rax
je 0x3a01b2
movq %rax, %rbx
movl %r15d, 0x70(%rsp)
movl %r14d, 0x2c(%rsp)
orl $0x10180801, 0xc(%rax)  # imm = 0x10180801
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x50(%rsp)
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x18(%rsp)
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, %r14
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x48(%rsp)
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %r13, %rsi
movq %rax, %r13
movl $0x10, %edi
movq %rsi, 0x30(%rsp)
callq 0x2ea474
movq %rax, %r15
movq %r12, 0x38(%rsp)
leal 0x1(%r12), %esi
movl $0x10, %edi
movq %rsi, 0x90(%rsp)
callq 0x2094c8
movq 0x48(%rsp), %r10
movq 0x50(%rsp), %r11
testq %r11, %r11
sete %dl
cmpq $0x0, 0x18(%rsp)
sete %cl
orb %dl, %cl
movq %r14, 0x78(%rsp)
testq %r14, %r14
sete %sil
testq %r10, %r10
sete %dl
orb %sil, %dl
orb %cl, %dl
testq %r13, %r13
sete %sil
testq %r15, %r15
sete %cl
orb %sil, %cl
testq %rax, %rax
sete %sil
orb %cl, %sil
orb %dl, %sil
testb $0x1, %sil
jne 0x3a01b2
movq %r13, 0x40(%rsp)
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
decl %eax
movl %eax, 0x28(%rsp)
movl $0xf, %eax
subl 0x2c(%rsp), %eax
movl %eax, 0x6c(%rsp)
movl 0xc(%rsp), %ecx
movd %ecx, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm2      # xmm2 = xmm0[0,0,0,0]
movl 0x20(%rsp), %edx
movd %edx, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
movl 0x58(%rsp), %eax
addb $-0x7f, %al
movzbl %al, %eax
movd %eax, %xmm0
movdqa %xmm0, 0xc0(%rsp)
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xa0(%rsp)
movzbl 0x10(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm6      # xmm6 = xmm0[0,0,0,0]
movl %ecx, %eax
movl %edx, %ecx
movslq %ebp, %rsi
movl 0x30(%rsp), %edx
negq %rax
movq %rdx, %rdi
movq %rcx, 0x10(%rsp)
imulq %rcx, %rdi
xorl %r8d, %r8d
movq $-0x80, %r9
movq 0x78(%rsp), %r14
movq %r10, %rcx
movq %r11, %r13
movq %rsi, %r10
xorl %r11d, %r11d
cmpq $-0x7f, %r10
movq $-0x80, %r12
cmovgeq %r10, %r12
movb %r12b, 0xe0(%rsp,%r11)
leaq (%rax,%r10), %r12
cmpq $-0x7f, %r12
cmovlq %r9, %r12
movb %r12b, 0xd0(%rsp,%r11)
incq %r11
subq %rdi, %r10
cmpq $0x10, %r11
jne 0x39fa35
movq %r8, %r10
shlq $0x4, %r10
movaps 0xe0(%rsp), %xmm0
movq %r13, %r11
movaps %xmm0, (%r13,%r10)
movdqa 0xd0(%rsp), %xmm0
movdqa %xmm0, (%r14,%r10)
movdqa %xmm0, (%rcx,%r10)
movq %rcx, %r10
incq %r8
subq 0x10(%rsp), %rsi
cmpq %rdx, %r8
jne 0x39fa29
movq 0x60(%rsp), %rdi
movb $0x0, (%rdi)
movl $0x1, %eax
movl 0x20(%rsp), %esi
movq 0x90(%rsp), %r8
cmpl $-0x7f, %ebp
movl $0xffffff80, %ecx       # imm = 0xFFFFFF80
cmovgel %ebp, %ecx
movb %cl, (%rdi,%rax)
incq %rax
subl %esi, %ebp
cmpq %rax, %r8
jne 0x39fac2
movq 0x30(%rsp), %r13
cmpl $0x1, %r13d
movq %r13, %r8
adcl $0x0, %r13d
shlq $0x4, %r13
xorl %eax, %eax
movdqa 0x1f6688(%rip), %xmm0   # 0x596180
movq 0x38(%rsp), %rsi
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
movdqa %xmm0, (%rcx,%rax)
addq $0x10, %rax
cmpq %rax, %r13
jne 0x39fafd
leal -0x1(%r8), %eax
movl %esi, %r9d
cmpl $0x2, %esi
movl $0x1, %ecx
cmovgel %esi, %ecx
movq %rcx, 0x50(%rsp)
movq %rdx, %rsi
shlq $0x4, %rsi
xorl %ecx, %ecx
shlq $0x4, %rax
movq %rax, 0x30(%rsp)
movdqa 0x1f660c(%rip), %xmm8   # 0x596150
movdqa 0x257b33(%rip), %xmm12  # 0x5f7680
movdqa 0x1f665a(%rip), %xmm13  # 0x5961b0
movq %rsi, 0x48(%rsp)
movq %rsi, 0x10(%rsp)
xorl %r8d, %r8d
movdqa %xmm6, 0x90(%rsp)
movdqa 0xa0(%rsp), %xmm5
movq 0x40(%rsp), %rbp
movq %r10, %rsi
movq 0x18(%rsp), %r12
movq %r11, %rax
movq %r8, %r10
movq 0x30(%rsp), %r8
addq %r8, %r11
movq %r11, 0x38(%rsp)
movq %rax, 0x18(%rsp)
movdqa (%rax,%r8), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movzbl (%rdi,%r10), %eax
movq %rsi, %rdi
movd %eax, %xmm1
movdqa 0x255ec6(%rip), %xmm10  # 0x5f5a80
pandn %xmm1, %xmm10
por %xmm0, %xmm10
movq 0x80(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x88(%rsp), %rsi
movzbl (%rsi,%r10), %esi
movslq (%rax,%rsi,4), %rax
movq %rdx, %rsi
imulq %rax, %rsi
shlq $0x4, %rsi
addq 0xb8(%rsp), %rsi
movq %r10, 0x58(%rsp)
leaq 0x1(%r10), %r8
movl $0x1, %r10d
xorl %eax, %eax
movdqa 0xa0(%rsp), %xmm0
paddsb (%rsi,%rax), %xmm10
movdqa (%r14,%rax), %xmm4
movdqa %xmm10, %xmm1
pcmpgtb %xmm4, %xmm1
movdqa %xmm10, %xmm7
pand %xmm1, %xmm7
pandn %xmm4, %xmm1
por %xmm7, %xmm1
movdqa %xmm1, %xmm9
pcmpgtb %xmm0, %xmm9
pand %xmm9, %xmm1
movdqa %xmm9, %xmm7
pandn %xmm0, %xmm7
por %xmm1, %xmm7
movdqa %xmm7, (%r12,%rax)
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
pcmpeqb %xmm7, %xmm10
paddb %xmm8, %xmm9
movdqa %xmm10, %xmm1
pandn %xmm9, %xmm1
pand 0x1f64f3(%rip), %xmm10  # 0x596170
por %xmm1, %xmm10
movdqa (%rax,%r11), %xmm1
por %xmm10, %xmm1
movdqa %xmm10, (%r15,%rax)
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
movdqa %xmm1, (%rax,%r11)
movdqa %xmm7, %xmm15
psubsb %xmm2, %xmm15
movdqa %xmm4, %xmm9
psubsb %xmm3, %xmm9
movdqa %xmm15, %xmm10
pcmpgtb %xmm9, %xmm10
movdqa %xmm15, %xmm11
pand %xmm10, %xmm11
pandn %xmm9, %xmm10
por %xmm11, %xmm10
movdqa %xmm10, (%r14,%rax)
movdqa (%rdi,%rax), %xmm10
psubsb %xmm3, %xmm10
movdqa %xmm15, %xmm14
pcmpgtb %xmm10, %xmm14
movdqa %xmm15, %xmm11
pand %xmm14, %xmm11
movdqa %xmm14, %xmm9
pandn %xmm10, %xmm9
por %xmm11, %xmm9
movdqa %xmm9, (%rbp,%rax)
cmpq %r9, %r8
jae 0x39fd39
pand 0x257952(%rip), %xmm14  # 0x5f7670
pxor 0x1f6469(%rip), %xmm14  # 0x596190
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq 0x10(%rsp), %r11
movdqa %xmm14, (%rax,%r11)
movdqa %xmm0, %xmm9
psubsb %xmm3, %xmm9
movdqa %xmm15, %xmm10
pcmpgtb %xmm9, %xmm10
cmpq %rdx, %r10
jae 0x39fd79
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
movdqa %xmm10, %xmm11
pand %xmm12, %xmm11
pxor %xmm13, %xmm11
por 0x10(%rax,%r11), %xmm11
movdqa %xmm11, 0x10(%rax,%r11)
movdqa %xmm5, %xmm11
pcmpgtb %xmm7, %xmm5
pand %xmm5, %xmm11
pandn %xmm7, %xmm5
por %xmm11, %xmm5
movdqa %xmm6, %xmm11
pcmpgtb %xmm7, %xmm11
pand %xmm11, %xmm7
pandn %xmm6, %xmm11
por %xmm7, %xmm11
movdqa %xmm11, %xmm7
pcmpgtb %xmm4, %xmm7
pand %xmm7, %xmm4
pandn %xmm11, %xmm7
por %xmm4, %xmm7
movdqa %xmm7, %xmm6
pcmpgtb %xmm0, %xmm6
pand %xmm6, %xmm0
pandn %xmm7, %xmm6
por %xmm0, %xmm6
movdqa %xmm15, %xmm4
pand %xmm10, %xmm4
pandn %xmm9, %xmm10
movdqa %xmm10, %xmm0
por %xmm4, %xmm0
movq 0x18(%rsp), %r11
movdqa (%r11,%rax), %xmm10
addq $0x10, %rax
incq %r10
cmpq %rax, %r13
jne 0x39fc0e
movq %rdi, 0x40(%rsp)
movq $0x0, 0x20(%rsp)
movdqa %xmm0, %xmm4
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %r11
movsbl 0x1(%rdi,%r11), %eax
subl 0xc(%rsp), %eax
cmpl $-0x7f, %eax
movl $0xffffff80, %r10d      # imm = 0xFFFFFF80
cmovll %r10d, %eax
movq 0x38(%rsp), %r10
movdqa (%r10), %xmm7
pslldq $0x1, %xmm7             # xmm7 = zero,xmm7[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movzbl (%rdi,%r11), %r10d
movd %r10d, %xmm11
movdqa 0x255c26(%rip), %xmm1   # 0x5f5a80
movdqa %xmm1, %xmm10
pandn %xmm11, %xmm10
por %xmm7, %xmm10
pslldq $0x1, %xmm15            # xmm15 = zero,xmm15[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movd %eax, %xmm7
movdqa %xmm1, %xmm11
pandn %xmm7, %xmm11
por %xmm11, %xmm15
pslldq $0x1, %xmm4             # xmm4 = zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm11, %xmm4
pslldq $0x1, %xmm9             # xmm9 = zero,xmm9[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm1, %xmm7
pandn 0xc0(%rsp), %xmm7
por %xmm7, %xmm9
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm11, %xmm0
movb $0x1, %r11b
movl $0x1, %eax
xorl %r10d, %r10d
movdqa %xmm4, %xmm7
movq 0x40(%rsp), %rdi
movdqa (%r12,%r10), %xmm11
movdqa %xmm11, %xmm14
pcmpgtb %xmm7, %xmm14
pand %xmm14, %xmm11
movdqa %xmm14, %xmm4
pandn %xmm7, %xmm4
por %xmm11, %xmm4
movdqa %xmm4, (%r12,%r10)
paddsb (%rsi,%r10), %xmm10
pcmpeqb %xmm4, %xmm10
por %xmm14, %xmm10
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq %rcx, %r14
movdqa (%r10,%r14), %xmm11
pand 0x257a9c(%rip), %xmm11  # 0x5f79b0
movdqa (%r15,%r10), %xmm14
pand %xmm10, %xmm14
pandn %xmm8, %xmm10
por %xmm14, %xmm10
movdqa %xmm10, (%r15,%r10)
por %xmm11, %xmm10
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq %rcx, %r14
movdqa %xmm10, (%r10,%r14)
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq %rcx, %r14
pcmpgtb %xmm9, %xmm15
pand %xmm12, %xmm15
movdqa (%r10,%r14), %xmm10
pand 0x257a59(%rip), %xmm10  # 0x5f79c0
por %xmm15, %xmm10
pxor %xmm13, %xmm10
movdqa %xmm10, (%r10,%r14)
movdqa %xmm4, %xmm15
psubsb %xmm2, %xmm15
movdqa (%rdi,%r10), %xmm11
psubsb %xmm3, %xmm11
movdqa %xmm15, %xmm1
pcmpgtb %xmm11, %xmm1
movdqa %xmm15, %xmm14
pand %xmm1, %xmm14
movdqa %xmm1, %xmm10
pandn %xmm11, %xmm10
por %xmm14, %xmm10
movdqa %xmm10, (%rbp,%r10)
cmpq %r9, %r8
jae 0x39ffdd
pand 0x2576ad(%rip), %xmm1   # 0x5f7670
pxor 0x1f61c5(%rip), %xmm1   # 0x596190
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq 0x10(%rsp), %r14
movdqa %xmm1, (%r10,%r14)
movdqa %xmm6, %xmm1
pcmpgtb %xmm4, %xmm1
movdqa %xmm4, %xmm10
pand %xmm1, %xmm10
pandn %xmm6, %xmm1
movdqa %xmm1, %xmm6
por %xmm10, %xmm6
movdqa %xmm5, %xmm1
pcmpgtb %xmm4, %xmm5
pand %xmm5, %xmm1
pandn %xmm4, %xmm5
por %xmm1, %xmm5
movdqa %xmm7, %xmm4
psubsb %xmm3, %xmm4
movdqa %xmm15, %xmm1
pcmpgtb %xmm4, %xmm1
pmovmskb %xmm1, %r14d
cmpl $0xffff, %r14d          # imm = 0xFFFF
je 0x3a007d
movdqa %xmm0, %xmm9
psubsb %xmm3, %xmm9
movdqa %xmm15, %xmm0
pcmpgtb %xmm9, %xmm0
movdqa %xmm15, %xmm1
pand %xmm0, %xmm1
pandn %xmm9, %xmm0
por %xmm1, %xmm0
movq 0x18(%rsp), %r11
movdqa (%r11,%r10), %xmm10
cmpq %rdx, %rax
setb %r11b
addq $0x10, %r10
incq %rax
movdqa %xmm4, %xmm7
cmpq %r10, %r13
jne 0x39fec2
jmp 0x3a0081
movdqa %xmm7, %xmm4
testb $0x1, %r11b
jne 0x3a009d
movq 0x20(%rsp), %rdi
leal 0x1(%rdi), %eax
cmpl $0xf, %edi
movq %rax, 0x20(%rsp)
jb 0x39fe18
movq 0x48(%rsp), %rax
addq %rax, 0x10(%rsp)
addq %rax, %rcx
movq %r12, %r11
movq %rbp, %r10
cmpq 0x50(%rsp), %r8
movq 0x78(%rsp), %r14
movq 0x60(%rsp), %rdi
jne 0x39fb75
movl 0x70(%rsp), %eax
shlq $0x4, %rax
movdqa (%r12,%rax), %xmm0
cmpl $0xe, 0x2c(%rsp)
jg 0x3a00f8
movl 0x6c(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
movl 0x28(%rsp), %edx
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %eax
jne 0x3a00ed
jmp 0x3a00fc
movl 0x28(%rsp), %edx
movdqa 0xa0(%rsp), %xmm1
pcmpgtb %xmm6, %xmm1
pcmpgtb 0x90(%rsp), %xmm5
por %xmm1, %xmm5
pmovmskb %xmm5, %eax
testl %eax, %eax
je 0x3a012a
orb $0x40, 0xc(%rbx)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x3a0136
pextrw $0x7, %xmm0, %eax
shrl $0x8, %eax
movl 0x74(%rsp), %ecx
movsbl %al, %eax
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
movl %edx, 0x8(%rbx)
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq 0x40(%rsp), %rdi
callq 0x2094b5
movq %rbp, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq 0x18(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
jmp 0x3a01b4
callq 0x1bfca7
jmp 0x3a01b2
callq 0x1bfc81
jmp 0x3a01b2
callq 0x1bfc5b
jmp 0x3a01b2
callq 0x1bfc35
jmp 0x3a01b2
callq 0x1bfc0f
jmp 0x3a01b2
callq 0x1bfbe9
jmp 0x3a01b2
callq 0x1bfbc3
jmp 0x3a01b2
callq 0x1bfb9d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)