// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_trace_striped_sse41_128_8.c
// Function: parasail_sw_trace_striped_profile_sse41_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 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;
    __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;
    __m128i* restrict pvHMax = NULL;
    __m128i vGapO;
    __m128i vGapE;
    __m128i vZero;
    int8_t score = 0;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    int8_t maxp = 0;
    parasail_result_t *result = NULL;
    __m128i vTZero;
    __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;
    end_query = 0;
    end_ref = 0;
    s1Len = profile->s1Len;
    matrix = profile->matrix;
    segWidth = 16; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    vProfile = (__m128i*)profile->profile8.score;
    vGapO = _mm_set1_epi8(open);
    vGapE = _mm_set1_epi8(gap);
    vZero = _mm_setzero_si128();
    score = NEG_INF;
    vMaxH = vZero;
    vMaxHUnit = vZero;
    maxp = INT8_MAX - (int8_t)(matrix->max+1);
    vTZero = _mm_set1_epi8(PARASAIL_ZERO);
    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_SW | 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);
    pvHMax = parasail_memalign___m128i(16, segLen);

    /* 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 (!pvHMax) return NULL;

    /* initialize H and E */
    parasail_memset___m128i(pvHStore, vZero, segLen);
    parasail_memset___m128i(pvE, _mm_set1_epi8(-open), segLen);
    parasail_memset___m128i(pvEaStore, _mm_set1_epi8(-open), segLen);

    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 0.  Any errors to vH values will be
         * corrected in the Lazy_F loop. */
        vF = _mm_subs_epi8(vZero,vGapO);

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

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

        if (end_ref == j-2) {
            /* Swap in the max buffer. */
            SWAP3(pvHMax,  pvHLoad,  pvHStore)
            SWAP(pvEaLoad,  pvEaStore)
        }
        else {
            /* 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_dag = _mm_max_epi8(vH_dag, vZero);
            vH = _mm_max_epi8(vH_dag, vE);
            vH = _mm_max_epi8(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);

            {
                __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m128i cond_zero = _mm_cmpeq_epi8(vH, vZero);
                __m128i case1 = _mm_cmpeq_epi8(vH, vH_dag);
                __m128i case2 = _mm_cmpeq_epi8(vH, vF);
                __m128i vT = _mm_blendv_epi8(
                        _mm_blendv_epi8(vTIns, vTDel, case2),
                        _mm_blendv_epi8(vTDiag, vTZero, cond_zero),
                        case1);
                _mm_store_si128(pvHT + i, vT);
                vT = _mm_or_si128(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i, segLen, j);
            }
            vMaxH = _mm_max_epi8(vH, vMaxH);
            vEF_opn = _mm_subs_epi8(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm_subs_epi8(vE, vGapE);
            vE = _mm_max_epi8(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(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(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(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(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) {
            __m128i vHp = _mm_load_si128(&pvHLoad[segLen - 1]);
            vHp = _mm_slli_si128(vHp, 1);
            vEF_opn = _mm_slli_si128(vEF_opn, 1);
            vEF_opn = _mm_insert_epi8(vEF_opn, -open, 0);
            vF_ext = _mm_slli_si128(vF_ext, 1);
            vF_ext = _mm_insert_epi8(vF_ext, NEG_INF, 0);
            vF = _mm_slli_si128(vF, 1);
            vF = _mm_insert_epi8(vF, -open, 0);
            vFa_ext = _mm_slli_si128(vFa_ext, 1);
            vFa_ext = _mm_insert_epi8(vFa_ext, NEG_INF, 0);
            vFa = _mm_slli_si128(vFa, 1);
            vFa = _mm_insert_epi8(vFa, -open, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi8(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
                {
                    __m128i vTAll;
                    __m128i vT;
                    __m128i case1;
                    __m128i case2;
                    __m128i cond;
                    vHp = _mm_adds_epi8(vHp, _mm_load_si128(vP + i));
                    vHp = _mm_max_epi8(vHp, vZero);
                    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(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);
                }
                vMaxH = _mm_max_epi8(vH, vMaxH);
                /* 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(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(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(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(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm_subs_epi8(vFa, vGapE);
                vFa = _mm_max_epi8(vEF_opn, vFa_ext);
                vHp = _mm_load_si128(pvHLoad + i);
            }
        }
end:
        {
        }

        {
            __m128i vCompare = _mm_cmpgt_epi8(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi8_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm_set1_epi8(score);
                end_ref = j;
            }
        }

        /*if (score == stop) break;*/
    }

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

    if (parasail_result_is_saturated(result)) {
        score = 0;
        end_query = 0;
        end_ref = 0;
    }
    else {
        if (end_ref == j-1) {
            /* end_ref was the last store column */
            SWAP(pvHMax,  pvHStore)
        }
        else if (end_ref == j-2) {
            /* end_ref was the last load column */
            SWAP(pvHMax,  pvHLoad)
        }
        /* Trace the alignment ending position on read. */
        {
            int8_t *t = (int8_t*)pvHMax;
            int32_t column_len = segLen * segWidth;
            end_query = s1Len - 1;
            for (i = 0; i<column_len; ++i, ++t) {
                if (*t == score) {
                    int32_t temp = i / segWidth + i % segWidth * segLen;
                    if (temp < end_query) {
                        end_query = temp;
                    }
                }
            }
        }
    }

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

    parasail_free(pvHMax);
    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
movq %rsi, 0x80(%rsp)
testq %rdi, %rdi
je 0x484c43
movq 0x18(%rdi), %rax
movq %rax, 0xc8(%rsp)
testq %rax, %rax
je 0x484c4a
movq 0x10(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x484c51
movl 0x8(%rdi), %r14d
testl %r14d, %r14d
jle 0x484c58
cmpq $0x0, 0x80(%rsp)
je 0x484c5f
movl %edx, %ebp
testl %edx, %edx
jle 0x484c66
testl %ecx, %ecx
js 0x484c6d
testl %r8d, %r8d
js 0x484c74
movl %r8d, 0x60(%rsp)
movl %ecx, 0x30(%rsp)
leaq 0xf(%r14), %r15
movq %r15, %r12
shrq $0x4, %r12
movq 0x78(%rsp), %rax
movl 0x1c(%rax), %r13d
movl $0x10, %edx
movl $0x10, %ecx
movl %r12d, %edi
movl %ebp, %esi
callq 0x2097d1
testq %rax, %rax
je 0x484c79
movq %rax, %rbx
movl %r13d, 0xc(%rsp)
movl %ebp, 0x10(%rsp)
movq %r15, 0xa8(%rsp)
movq %r14, 0xb0(%rsp)
orl $0x10180804, 0xc(%rax)  # imm = 0x10180804
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
movq %rax, %r15
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
movq %r12, %r13
movq %rax, %r12
movl $0x10, %edi
movq %r13, %rsi
callq 0x2ea474
movq %rax, 0x28(%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, %rbp
movl $0x10, %edi
movq %r13, 0x48(%rsp)
movq %r13, %rsi
callq 0x2ea474
movq %rax, %rcx
xorl %eax, %eax
testq %r15, %r15
je 0x484cca
testq %r12, %r12
je 0x484cca
cmpq $0x0, 0x28(%rsp)
je 0x484cca
movq 0x18(%rsp), %rdx
testq %rdx, %rdx
je 0x484cca
testq %r14, %r14
je 0x484cca
testq %rbp, %rbp
je 0x484cca
testq %rcx, %rcx
je 0x484cca
movq %rcx, 0x20(%rsp)
movd 0x30(%rsp), %xmm1
pxor %xmm0, %xmm0
pshufb %xmm0, %xmm1
movdqa %xmm1, 0x90(%rsp)
movd 0x60(%rsp), %xmm1
pshufb %xmm0, %xmm1
movdqa %xmm1, 0x60(%rsp)
movq %r15, %rdi
movq 0x48(%rsp), %r13
movq %r13, %rsi
callq 0x2ea47d
movl 0x30(%rsp), %eax
negb %al
movzbl %al, %eax
movl %eax, 0x5c(%rsp)
movd %eax, %xmm0
pshufb 0x111cb0(%rip), %xmm0   # 0x596290
movdqa %xmm0, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x2ea47d
movq 0x18(%rsp), %rdi
movaps 0x30(%rsp), %xmm0
movq %r13, %rsi
callq 0x2ea47d
movl %r13d, %eax
movq %rax, 0x88(%rsp)
movq %rax, %rdx
shlq $0x4, %rdx
xorl %eax, %eax
movdqa 0x111b5f(%rip), %xmm0   # 0x596180
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
movdqa %xmm0, (%rcx,%rax)
addq $0x10, %rax
cmpq %rax, %rdx
jne 0x484621
pxor %xmm3, %xmm3
pxor %xmm0, %xmm0
psubsb 0x90(%rsp), %xmm0
movdqa %xmm0, 0xe0(%rsp)
movq 0x48(%rsp), %rsi
leal -0x1(%rsi), %ecx
movb $0x7e, %al
subb 0xc(%rsp), %al
cmpl $0x1, %esi
adcl $0x0, %esi
movsbl %al, %eax
movl %eax, 0x58(%rsp)
movl 0x10(%rsp), %edi
movl %edi, %r8d
cmpl $0x2, %edi
movl $0x1, %eax
cmovgel %edi, %eax
movq %rax, 0x50(%rsp)
shlq $0x4, %rsi
movb $-0x80, %al
movl %eax, 0x8(%rsp)
xorl %r9d, %r9d
shlq $0x4, %rcx
movq %rcx, 0xc0(%rsp)
movdqa 0x111aad(%rip), %xmm5   # 0x596150
movdqa 0x111ae5(%rip), %xmm7   # 0x596190
movdqa 0x111afc(%rip), %xmm8   # 0x5961b0
movdqa 0x111ae3(%rip), %xmm9   # 0x5961a0
movdqa 0x1732ea(%rip), %xmm10  # 0x5f79b0
movdqa 0x1732f1(%rip), %xmm11  # 0x5f79c0
movq %rdx, 0x30(%rsp)
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
pxor %xmm13, %xmm13
pxor %xmm0, %xmm0
movdqa %xmm0, 0xd0(%rsp)
movq 0x18(%rsp), %rcx
movq %rdx, 0xb8(%rsp)
movq 0x20(%rsp), %r10
movq %r10, 0x10(%rsp)
movq %r14, %r13
movq %rcx, %r14
movq %r12, %rdx
movq %r15, %r12
movq 0xc0(%rsp), %r11
leaq (%r15,%r11), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x80(%rsp), %rdi
movzbl (%rdi,%rcx), %edi
movslq (%rax,%rdi,4), %rdi
movq 0x88(%rsp), %rax
imulq %rdi, %rax
shlq $0x4, %rax
addq 0xc8(%rsp), %rax
leal -0x2(%rcx), %edi
cmpl %edi, 0xc(%rsp)
cmoveq %rdx, %r10
movq %r10, 0x20(%rsp)
movq %rdx, %r15
cmoveq 0x10(%rsp), %r15
movdqa (%r12,%r11), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movq %rcx, 0x10(%rsp)
leaq 0x1(%rcx), %rdi
movl $0x1, %ecx
xorl %edx, %edx
movdqa 0xe0(%rsp), %xmm14
movq 0x28(%rsp), %r11
movdqa (%r11,%rdx), %xmm4
paddsb (%rax,%rdx), %xmm0
pmaxsb %xmm3, %xmm0
movdqa %xmm0, %xmm6
pmaxsb %xmm4, %xmm6
movdqa %xmm6, %xmm1
pmaxsb %xmm14, %xmm1
movdqa %xmm1, (%r15,%rdx)
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq %r9, %r10
pcmpeqb %xmm1, %xmm0
pcmpgtb %xmm14, %xmm6
paddb %xmm5, %xmm6
movdqa %xmm1, %xmm12
pcmpgtb %xmm3, %xmm12
pand 0x111982(%rip), %xmm12  # 0x596170
pblendvb %xmm0, %xmm12, %xmm6
movdqa (%rdx,%r10), %xmm0
por %xmm6, %xmm0
movdqa %xmm6, (%rbp,%rdx)
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq %r9, %r10
movdqa %xmm0, (%rdx,%r10)
movdqa %xmm1, %xmm12
psubsb 0x90(%rsp), %xmm12
movdqa 0x60(%rsp), %xmm2
psubsb %xmm2, %xmm4
pmaxsb %xmm12, %xmm4
movdqa %xmm4, (%r11,%rdx)
movdqa (%r14,%rdx), %xmm4
psubsb %xmm2, %xmm4
movdqa %xmm12, %xmm0
pmaxsb %xmm4, %xmm0
movdqa %xmm0, (%r13,%rdx)
cmpq %r8, %rdi
jae 0x484881
movdqa %xmm12, %xmm0
pcmpgtb %xmm4, %xmm0
movdqa %xmm7, %xmm4
pblendvb %xmm0, 0x111911(%rip), %xmm4 # 0x596180
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq 0x30(%rsp), %r10
movdqa %xmm4, (%rdx,%r10)
movdqa %xmm14, %xmm15
psubsb %xmm2, %xmm15
cmpq 0x88(%rsp), %rcx
jae 0x4848c2
movq 0x10(%rbx), %r10
movq (%r10), %r10
movdqa %xmm12, %xmm0
pcmpgtb %xmm15, %xmm0
movdqa %xmm8, %xmm4
pblendvb %xmm0, %xmm9, %xmm4
addq %r9, %r10
por 0x10(%rdx,%r10), %xmm4
movdqa %xmm4, 0x10(%rdx,%r10)
pmaxsb %xmm1, %xmm13
movdqa %xmm12, %xmm14
pmaxsb %xmm15, %xmm14
movdqa (%r12,%rdx), %xmm0
addq $0x10, %rdx
incq %rcx
cmpq %rdx, %rsi
jne 0x484796
xorl %edx, %edx
movdqa %xmm14, %xmm1
movl $0x80, %r11d
pslldq $0x1, %xmm1             # xmm1 = zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movl 0x5c(%rsp), %ecx
pinsrb $0x0, %ecx, %xmm1
pslldq $0x1, %xmm15            # xmm15 = zero,xmm15[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
pinsrb $0x0, %r11d, %xmm15
pslldq $0x1, %xmm14            # xmm14 = zero,xmm14[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
pinsrb $0x0, %ecx, %xmm14
pslldq $0x1, %xmm12            # xmm12 = zero,xmm12[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
pinsrb $0x0, %ecx, %xmm12
movq 0x18(%rsp), %rcx
movdqa (%rcx), %xmm6
pslldq $0x1, %xmm6             # xmm6 = zero,xmm6[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
xorl %ecx, %ecx
movdqa 0x60(%rsp), %xmm2
movdqa (%r15,%rcx), %xmm0
movdqa %xmm0, %xmm4
pmaxsb %xmm14, %xmm4
movdqa %xmm4, (%r15,%rcx)
paddsb (%rax,%rcx), %xmm6
pmaxsb %xmm3, %xmm6
pcmpeqb %xmm4, %xmm6
pcmpgtb %xmm14, %xmm0
por %xmm6, %xmm0
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq %r9, %r10
movdqa %xmm5, %xmm6
pblendvb %xmm0, (%rbp,%rcx), %xmm6
movdqa (%rcx,%r10), %xmm0
pand %xmm10, %xmm0
movdqa %xmm6, (%rbp,%rcx)
por %xmm0, %xmm6
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq %r9, %r10
movdqa %xmm6, (%rcx,%r10)
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq %r9, %r10
pcmpgtb %xmm15, %xmm12
movdqa %xmm8, %xmm6
movdqa %xmm12, %xmm0
pblendvb %xmm0, %xmm9, %xmm6
movdqa (%rcx,%r10), %xmm0
pand %xmm11, %xmm0
por %xmm6, %xmm0
movdqa %xmm0, (%rcx,%r10)
movdqa %xmm4, %xmm12
psubsb 0x90(%rsp), %xmm12
movdqa (%r14,%rcx), %xmm6
psubsb %xmm2, %xmm6
movdqa %xmm12, %xmm0
pmaxsb %xmm6, %xmm0
movdqa %xmm0, (%r13,%rcx)
cmpq %r8, %rdi
jae 0x484a34
movdqa %xmm12, %xmm0
pcmpgtb %xmm6, %xmm0
movdqa %xmm7, %xmm6
pblendvb %xmm0, 0x11175e(%rip), %xmm6 # 0x596180
movq 0x10(%rbx), %r10
movq (%r10), %r10
addq 0x30(%rsp), %r10
movdqa %xmm6, (%rcx,%r10)
pmaxsb %xmm4, %xmm13
movdqa %xmm14, %xmm0
movdqa 0x60(%rsp), %xmm2
psubsb %xmm2, %xmm0
movdqa %xmm12, %xmm4
pcmpgtb %xmm0, %xmm4
pmovmskb %xmm4, %r10d
xorl $0xffff, %r10d          # imm = 0xFFFF
setne %r10b
je 0x484a9a
movdqa %xmm1, %xmm15
psubsb %xmm2, %xmm15
movdqa %xmm12, %xmm1
pmaxsb %xmm15, %xmm1
movdqa (%r12,%rcx), %xmm6
addq $0x10, %rcx
movdqa %xmm0, %xmm14
cmpq %rcx, %rsi
jne 0x484942
xorl %ecx, %ecx
movdqa %xmm0, %xmm14
jmp 0x484a9f
movl $0x21, %ecx
testl %ecx, %ecx
jne 0x484ab0
incl %edx
cmpl $0x10, %edx
jne 0x4848f6
jmp 0x484ab5
cmpl $0x21, %ecx
jne 0x484b07
movdqa %xmm13, %xmm0
pcmpgtb 0xd0(%rsp), %xmm0
pmovmskb %xmm0, %eax
movb $0x1, %r10b
testl %eax, %eax
je 0x484b07
movdqa %xmm13, %xmm0
pxor 0x1718c5(%rip), %xmm0   # 0x5f63a0
movdqa %xmm0, %xmm1
psrlw $0x8, %xmm1
pminub %xmm0, %xmm1
phminposuw %xmm1, %xmm0
movd %xmm0, %eax
xorb $0x7f, %al
movl %eax, 0x8(%rsp)
movsbl %al, %eax
cmpl %eax, 0x58(%rsp)
jge 0x484b0e
orb $0x40, 0xc(%rbx)
xorl %r10d, %r10d
movq 0x10(%rsp), %rax
jmp 0x484b5f
movdqa %xmm13, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
pmaxsb %xmm13, %xmm0
movdqa %xmm0, %xmm1
psrldq $0x4, %xmm1             # xmm1 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
pmaxsb %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
pmaxsb %xmm1, %xmm0
movdqa %xmm0, %xmm1
psrldq $0x1, %xmm1             # xmm1 = xmm1[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
pmaxsb %xmm0, %xmm1
pshufb %xmm3, %xmm1
movdqa %xmm1, 0xd0(%rsp)
movq 0x10(%rsp), %rax
movl %eax, 0xc(%rsp)
testb %r10b, %r10b
je 0x484b87
movq 0xb8(%rsp), %rdx
addq %rdx, 0x30(%rsp)
addq %rdx, %r9
movq %rdi, %rax
movq %r13, %rcx
cmpq 0x50(%rsp), %rdi
jne 0x4846fd
jmp 0x484b8c
movq %rax, 0x50(%rsp)
movl 0x8(%rsp), %eax
cmpb $0x7f, %al
jne 0x484b98
orb $0x40, 0xc(%rbx)
movq %rbx, %rdi
callq 0x20a805
xorl %ecx, %ecx
testl %eax, %eax
je 0x484bb6
movq 0x20(%rsp), %rdi
xorl %r11d, %r11d
xorl %r8d, %r8d
jmp 0x484c86
movq 0x50(%rsp), %rcx
leal -0x1(%rcx), %eax
addl $-0x2, %ecx
movl 0xc(%rsp), %r11d
cmpl %ecx, %r11d
movq 0x20(%rsp), %rcx
movq %rcx, %rdi
cmoveq %r12, %rdi
movq %r12, %rdx
cmoveq %rcx, %rdx
cmpl %eax, %r11d
cmoveq %r15, %rdi
cmoveq %r12, %rdx
movq %rdx, %r12
cmoveq %rcx, %r15
movq 0xb0(%rsp), %r8
decl %r8d
testl $0x7ffffff0, 0xa8(%rsp) # imm = 0x7FFFFFF0
je 0x484c7d
movq 0x48(%rsp), %r9
movl %r9d, %eax
andl $0x7ffffff, %eax        # imm = 0x7FFFFFF
shll $0x4, %eax
xorl %ecx, %ecx
movl 0x8(%rsp), %r10d
cmpb %r10b, (%rdi,%rcx)
jne 0x484c3a
movl %ecx, %edx
shrl $0x4, %edx
movl %ecx, %esi
andl $0xf, %esi
imull %r9d, %esi
addl %edx, %esi
cmpl %r8d, %esi
cmovll %esi, %r8d
incq %rcx
cmpl %ecx, %eax
jne 0x484c1d
jmp 0x484c82
callq 0x1ddb87
jmp 0x484c79
callq 0x1ddb61
jmp 0x484c79
callq 0x1ddb3b
jmp 0x484c79
callq 0x1ddb15
jmp 0x484c79
callq 0x1ddaef
jmp 0x484c79
callq 0x1ddac9
jmp 0x484c79
callq 0x1ddaa3
jmp 0x484c79
callq 0x1dda7d
xorl %eax, %eax
jmp 0x484cca
movl 0x8(%rsp), %r10d
movsbl %r10b, %ecx
movl %ecx, (%rbx)
movl %r8d, 0x4(%rbx)
movl %r11d, 0x8(%rbx)
callq 0x2094b5
movq %rbp, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq 0x28(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq