// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sg_scan_sse2_128_8.c
// Function: parasail_sg_flags_rowcol_scan_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,
        int s1_beg, int s1_end, int s2_beg, int s2_end)
{
    /* 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;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict pvP = NULL;
    __m128i* restrict pvE = NULL;
    int8_t* restrict boundary = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int8_t NEG_LIMIT = 0;
    int8_t POS_LIMIT = 0;
    __m128i vZero;
    int8_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vMaxH;
    __m128i vPosMask;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    parasail_result_t *result = NULL;

    /* 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;
    pvP = (__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;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi8(NEG_LIMIT);
    vPosLimit = _mm_set1_epi8(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm_cmpeq_epi8(_mm_set1_epi8(position),
            _mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15));
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi8_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_adds_epi8(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi8(-segLen*gap), 1));

    /* initialize result */
#ifdef PARASAIL_TABLE
    result = parasail_result_new_table1(segLen*segWidth, s2Len);
#else
#ifdef PARASAIL_ROWCOL
    result = parasail_result_new_rowcol1(segLen*segWidth, s2Len);
#else
    result = parasail_result_new();
#endif
#endif
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SG | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_BITS_8 | PARASAIL_FLAG_LANES_16;
    result->flag |= s1_beg ? PARASAIL_FLAG_SG_S1_BEG : 0;
    result->flag |= s1_end ? PARASAIL_FLAG_SG_S1_END : 0;
    result->flag |= s2_beg ? PARASAIL_FLAG_SG_S2_BEG : 0;
    result->flag |= s2_end ? PARASAIL_FLAG_SG_S2_END : 0;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    pvE = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int8_t(16, s2Len+1);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!boundary) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvGapper) 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 = s1_beg ? 0 : (-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(&pvH[index], h.m);
            _mm_store_si128(&pvE[index], e.m);
            ++index;
        }
    }

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

    {
        __m128i vGapper = _mm_subs_epi8(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_subs_epi8(vGapper, vGapE);
            /* long queries and/or large penalties will break the pseudo prefix scan */
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vGapper);
        }
    }

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

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

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 1);
        vHt = _mm_insert_epi8_rpl(vHt, boundary[j+1], 0);
        vF = _mm_max_epi8_rpl(vF, _mm_adds_epi8(vHt, pvGapper[0]));
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 1);
            vFt = _mm_adds_epi8(vFt, vSegLenXgap);
            vF = _mm_max_epi8_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 1);
        vF = _mm_adds_epi8(vF, vNegInfFront);
        vH = _mm_max_epi8_rpl(vHt, vF);
        for (i=0; i<segLen; ++i) {
            vHt = _mm_load_si128(pvHt+i);
            vF = _mm_max_epi8_rpl(
                    _mm_subs_epi8(vF, vGapE),
                    _mm_subs_epi8(vH, vGapO));
            vH = _mm_max_epi8_rpl(vHt, vF);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vF);
            vSaturationCheckMax = _mm_max_epi8_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
        } 

        /* extract vector containing last value from column */
        {
            __m128i vCompare;
            vH = _mm_load_si128(pvH + offset);
            vCompare = _mm_and_si128(vPosMask, _mm_cmpgt_epi8(vH, vMaxH));
            vMaxH = _mm_max_epi8_rpl(vH, vMaxH);
            if (_mm_movemask_epi8(vCompare)) {
                end_ref = j;
            }
#ifdef PARASAIL_ROWCOL
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 1);
            }
            result->rowcols->score_row[j] = (int8_t) _mm_extract_epi8_rpl (vH, 15);
#endif
        }
    }

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

    /* max last value from all columns */
    if (s2_end)
    {
        for (k=0; k<position; ++k) {
            vMaxH = _mm_slli_si128(vMaxH, 1);
        }
        score = (int8_t) _mm_extract_epi8_rpl(vMaxH, 15);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int8_t *t = (int8_t*)pvH;
        int32_t column_len = segLen * segWidth;
        for (i = 0; i<column_len; ++i, ++t) {
            int32_t temp = i / segWidth + i % segWidth * segLen;
            if (temp >= s1Len) continue;
            if (*t > score) {
                score = *t;
                end_query = temp;
                end_ref = s2Len-1;
            }
            else if (*t == score && end_ref == s2Len-1 && temp < end_query) {
                end_query = temp;
            }
        }
    }

    if (!s1_end && !s2_end) {
        /* extract last value from the last column */
        {
            __m128i vH = _mm_load_si128(pvH + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 1);
            }
            score = (int8_t) _mm_extract_epi8_rpl (vH, 15);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    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(pvGapper);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(boundary);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x33f7b8
movq 0x18(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x33f7bf
movq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x33f7c6
movl %edx, %r15d
movl 0x8(%rdi), %edx
testl %edx, %edx
jle 0x33f7cd
cmpq $0x0, 0x68(%rsp)
je 0x33f7d4
testl %r15d, %r15d
jle 0x33f7db
testl %ecx, %ecx
js 0x33f7e2
testl %r8d, %r8d
js 0x33f7e9
movl %r9d, %ebx
movl %r8d, 0x48(%rsp)
leal -0x1(%rdx), %eax
movq %rdx, 0xa8(%rsp)
leaq 0xf(%rdx), %r14
movq %r14, %rsi
shrq $0x4, %rsi
movl %eax, 0x28(%rsp)
cltd
movq %rsi, 0x30(%rsp)
idivl %esi
movl %eax, 0x8(%rsp)
movl %edx, %r13d
movl %ecx, %r12d
negl %r12d
movq 0x60(%rsp), %rdx
movl 0x20(%rdx), %eax
movl %eax, %esi
negb %sil
cmpl %r12d, %eax
movzbl %sil, %ebp
movl %ecx, (%rsp)
cmovgl %ecx, %ebp
movb $0x7e, %al
subb 0x1c(%rdx), %al
movb %al, 0x40(%rsp)
andl $0x7ffffff0, %r14d      # imm = 0x7FFFFFF0
movl %r14d, %edi
movl %r15d, %esi
callq 0x209630
testq %rax, %rax
je 0x33f7ee
movl %r13d, 0x70(%rsp)
movq %r14, 0xa0(%rsp)
movl %ebp, 0x2c(%rsp)
xorl %edi, %edi
testl %ebx, %ebx
setne %dil
xorl %ecx, %ecx
cmpl $0x0, 0x130(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x138(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x140(%rsp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rdi,8), %ecx
orl %edx, %ecx
orl %esi, %ecx
orl 0xc(%rax), %ecx
orl $0x10140402, %ecx       # imm = 0x10140402
movq %rax, 0x50(%rsp)
movl %ecx, 0xc(%rax)
movl $0x10, %edi
movq 0x30(%rsp), %rbp
movq %rbp, %rsi
callq 0x2ea474
movq %rax, %r14
leal 0x1(%r15), %esi
movl $0x10, %edi
callq 0x2094c8
movq %rax, 0x58(%rsp)
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
movq %rax, %r13
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
movq %r15, 0x38(%rsp)
movq %rax, %r15
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
testq %r14, %r14
sete %cl
cmpq $0x0, 0x58(%rsp)
sete %dl
orb %cl, %dl
testq %r13, %r13
sete %cl
testq %r15, %r15
sete %sil
orb %cl, %sil
orb %dl, %sil
testq %rax, %rax
sete %cl
orb %sil, %cl
jne 0x33f7ee
movq 0x38(%rsp), %rcx
decl %ecx
movl %ecx, 0xc(%rsp)
movl $0xf, %edx
subl 0x8(%rsp), %edx
movl (%rsp), %edi
movd %edi, %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, %xmm4      # xmm4 = xmm0[0,0,0,0]
movl 0x48(%rsp), %esi
movd %esi, %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, %xmm5      # xmm5 = xmm0[0,0,0,0]
movl 0x2c(%rsp), %ecx
addb $-0x7f, %cl
movl %ecx, 0x2c(%rsp)
movzbl %cl, %ecx
movd %ecx, %xmm3
movdqa %xmm3, %xmm0
punpcklbw %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3],xmm0[4],xmm3[4],xmm0[5],xmm3[5],xmm0[6],xmm3[6],xmm0[7],xmm3[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]
movzbl 0x40(%rsp), %ecx
movd %ecx, %xmm1
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movl %edx, 0x24(%rsp)
movd %edx, %xmm2
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm2, %xmm7      # xmm7 = xmm2[0,0,0,0]
movq 0x30(%rsp), %rdx
movl %edx, %ecx
imull %esi, %ecx
negb %cl
movzbl %cl, %ecx
movd %ecx, %xmm2
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm2, %xmm8      # xmm8 = xmm2[0,0,0,0]
pslldq $0x1, %xmm8             # xmm8 = zero,xmm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm3, 0x80(%rsp)
paddsb %xmm3, %xmm8
movl %edi, %ecx
movl %esi, %esi
movslq %r12d, %rbp
movl %edx, %edx
movq %rdx, 0x40(%rsp)
movq %rsi, (%rsp)
imulq %rsi, %rdx
xorl %r8d, %r8d
movq $-0x80, %r9
movq %rbp, %rdi
xorl %r11d, %r11d
testl %ebx, %ebx
je 0x33f0c2
xorl %r10d, %r10d
jmp 0x33f0c5
movq %rdi, %r10
cmpq $-0x7f, %r10
movq $-0x80, %rsi
cmovgeq %r10, %rsi
movb %sil, 0xe0(%rsp,%r11)
subq %rcx, %r10
cmpq $-0x7f, %r10
cmovlq %r9, %r10
movb %r10b, 0xd0(%rsp,%r11)
incq %r11
subq %rdx, %rdi
cmpq $0x10, %r11
jne 0x33f0b9
movq %r8, %rsi
shlq $0x4, %rsi
movaps 0xe0(%rsp), %xmm2
movaps %xmm2, (%r15,%rsi)
movdqa 0xd0(%rsp), %xmm2
movdqa %xmm2, (%r14,%rsi)
incq %r8
subq (%rsp), %rbp
cmpq 0x40(%rsp), %r8
jne 0x33f0b3
movq 0x58(%rsp), %r8
movb $0x0, (%r8)
movq 0x38(%rsp), %rdx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl 0x48(%rsp), %r9d
movl 0x138(%rsp), %r10d
cmpl $-0x7f, %r12d
movl $0xffffff80, %edi       # imm = 0xFFFFFF80
cmovgel %r12d, %edi
testl %r10d, %r10d
cmovnel %edx, %edi
movb %dil, 0x1(%r8,%rsi)
subl %r9d, %r12d
incq %rsi
cmpq %rsi, %rcx
jne 0x33f156
movq 0x30(%rsp), %rbx
leal -0x1(%rbx), %ecx
pxor %xmm3, %xmm3
psubsb %xmm4, %xmm3
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movl %ebx, %esi
movdqa %xmm1, 0xc0(%rsp)
movdqa %xmm1, %xmm2
movl 0x8(%rsp), %r8d
movdqa %xmm3, (%rdx)
psubsb %xmm5, %xmm3
movdqa %xmm2, %xmm9
pcmpgtb %xmm3, %xmm9
movdqa %xmm3, %xmm10
pand %xmm9, %xmm10
pandn %xmm2, %xmm9
movdqa %xmm9, %xmm2
por %xmm10, %xmm2
addq $-0x10, %rdx
decl %esi
jg 0x33f1aa
movl %ecx, %r9d
shlq $0x4, %r9
addq %r15, %r9
movl 0x70(%rsp), %r10d
movq %r10, 0x98(%rsp)
shlq $0x4, %r10
addq %r15, %r10
movl $0x1, %r11d
cmpl %r11d, %ebx
adcl $0x0, %ebx
movl 0x24(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %edi
cmovgel %ecx, %edi
movq 0x38(%rsp), %rcx
cmpl $0x2, %ecx
cmovgel %ecx, %r11d
shlq $0x4, %rbx
xorl %esi, %esi
pcmpeqb 0x2b6880(%rip), %xmm7   # 0x5f5ab0
movdqa 0x2b6847(%rip), %xmm10  # 0x5f5a80
movl 0xc(%rsp), %ecx
movl %ecx, (%rsp)
movdqa %xmm0, %xmm9
movdqa %xmm0, %xmm3
movq 0x50(%rsp), %rbp
movq %rsi, %r12
movq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x68(%rsp), %rdx
movzbl (%rdx,%rsi), %edx
movslq (%rcx,%rdx,4), %rsi
imulq 0x40(%rsp), %rsi
shlq $0x4, %rsi
addq 0x78(%rsp), %rsi
movdqa %xmm0, %xmm11
psubsb (%rax), %xmm11
movdqa (%r9), %xmm12
pslldq $0x1, %xmm12            # xmm12 = zero,xmm12[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movq 0x58(%rsp), %rdx
movzbl (%rdx,%r12), %ecx
movd %ecx, %xmm14
movdqa %xmm10, %xmm13
pandn %xmm14, %xmm13
por %xmm12, %xmm13
xorl %ecx, %ecx
movdqa %xmm0, %xmm12
movdqa (%r15,%rcx), %xmm1
movdqa (%r14,%rcx), %xmm6
psubsb %xmm5, %xmm6
movdqa %xmm1, %xmm14
psubsb %xmm4, %xmm14
movdqa %xmm6, %xmm15
pcmpgtb %xmm14, %xmm15
pand %xmm15, %xmm6
pandn %xmm14, %xmm15
por %xmm6, %xmm15
paddsb (%rsi,%rcx), %xmm13
paddsb (%rax,%rcx), %xmm11
movdqa %xmm12, %xmm6
pcmpgtb %xmm11, %xmm12
pand %xmm12, %xmm6
pandn %xmm11, %xmm12
por %xmm6, %xmm12
movdqa %xmm15, %xmm11
pcmpgtb %xmm13, %xmm11
movdqa %xmm15, (%r14,%rcx)
pand %xmm11, %xmm15
pandn %xmm13, %xmm11
por %xmm15, %xmm11
movdqa %xmm11, (%r13,%rcx)
addq $0x10, %rcx
movdqa %xmm1, %xmm13
cmpq %rcx, %rbx
jne 0x33f2b0
pslldq $0x1, %xmm11            # xmm11 = zero,xmm11[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
leaq 0x1(%r12), %rsi
movzbl 0x1(%rdx,%r12), %ecx
movd %ecx, %xmm1
movdqa %xmm10, %xmm13
pandn %xmm1, %xmm13
por %xmm11, %xmm13
movdqa (%rax), %xmm1
paddsb %xmm13, %xmm1
movdqa %xmm12, %xmm11
pcmpgtb %xmm1, %xmm11
pand %xmm11, %xmm12
pandn %xmm1, %xmm11
por %xmm12, %xmm11
movl $0xe, %ecx
movdqa %xmm11, %xmm1
movdqa %xmm11, %xmm6
pslldq $0x1, %xmm11            # xmm11 = zero,xmm11[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
paddsb %xmm8, %xmm11
pcmpgtb %xmm11, %xmm1
pand %xmm1, %xmm6
pandn %xmm11, %xmm1
movdqa %xmm1, %xmm11
por %xmm6, %xmm11
decl %ecx
jne 0x33f38b
pslldq $0x1, %xmm11            # xmm11 = zero,xmm11[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
paddsb 0x80(%rsp), %xmm11
movdqa %xmm13, %xmm12
pcmpgtb %xmm11, %xmm12
pand %xmm12, %xmm13
pandn %xmm11, %xmm12
por %xmm13, %xmm12
xorl %ecx, %ecx
movdqa (%r13,%rcx), %xmm1
psubsb %xmm5, %xmm11
psubsb %xmm4, %xmm12
movdqa %xmm11, %xmm6
pcmpgtb %xmm12, %xmm6
pand %xmm6, %xmm11
pandn %xmm12, %xmm6
por %xmm6, %xmm11
movdqa %xmm1, %xmm12
pcmpgtb %xmm11, %xmm12
pand %xmm12, %xmm1
pandn %xmm11, %xmm12
por %xmm1, %xmm12
movdqa %xmm12, (%r15,%rcx)
movdqa %xmm2, %xmm1
pcmpgtb %xmm12, %xmm1
movdqa %xmm12, %xmm6
pand %xmm1, %xmm6
pandn %xmm2, %xmm1
por %xmm6, %xmm1
movdqa %xmm1, %xmm2
pcmpgtb %xmm11, %xmm2
movdqa %xmm11, %xmm6
pand %xmm2, %xmm6
pandn %xmm1, %xmm2
por %xmm6, %xmm2
movdqa %xmm3, %xmm1
pcmpgtb %xmm12, %xmm3
pand %xmm3, %xmm1
pandn %xmm12, %xmm3
por %xmm1, %xmm3
addq $0x10, %rcx
cmpq %rcx, %rbx
jne 0x33f3e7
movdqa (%r10), %xmm11
movdqa %xmm11, %xmm12
pcmpgtb %xmm9, %xmm12
movdqa %xmm12, %xmm1
pand %xmm7, %xmm1
pmovmskb %xmm1, %ecx
testl %ecx, %ecx
movl (%rsp), %ecx
cmovnel %r12d, %ecx
movl %ecx, (%rsp)
movdqa %xmm11, %xmm13
cmpl $0xe, %r8d
jg 0x33f4cb
movl %edi, %ecx
movdqa %xmm11, %xmm13
pslldq $0x1, %xmm13            # xmm13 = zero,xmm13[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %ecx
jne 0x33f4c1
pand %xmm12, %xmm11
pandn %xmm9, %xmm12
movdqa %xmm12, %xmm9
por %xmm11, %xmm9
pextrw $0x7, %xmm13, %ecx
shrl $0x8, %ecx
movsbl %cl, %ecx
movq 0x10(%rbp), %rdx
movq (%rdx), %rdx
movl %ecx, (%rdx,%r12,4)
cmpq %r11, %rsi
jne 0x33f24e
movq 0x30(%rsp), %rcx
leal (,%rcx,4), %edx
leal (,%rcx,8), %esi
movq %rsi, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
leaq (%rdx,%rdx,2), %rdx
movq %rdx, 0x78(%rsp)
cmpl $0x1, %ecx
movl %ecx, %edi
adcl $0x0, %edi
movq 0x40(%rsp), %r10
imulq $0x3c, %r10, %rcx
movq %rcx, 0x80(%rsp)
imulq $0x38, %r10, %rcx
movq %rcx, 0x48(%rsp)
imulq $0x34, %r10, %rcx
movq %rcx, 0x38(%rsp)
movq %r10, %r11
shlq $0x4, %r11
imulq $0x2c, %r10, %rcx
movq %rcx, 0x70(%rsp)
leal (,%r10,8), %ecx
leaq (%rcx,%rcx,4), %rdx
movq %rdx, 0xb8(%rsp)
leal (,%r10,4), %ebx
leaq (%rbx,%rbx,8), %rdx
movq %rdx, 0xb0(%rsp)
leaq (%r10,%r10,8), %rsi
leaq (%rsi,%rsi,2), %r9
addq %r10, %r9
movq %r10, %rsi
shlq $0x5, %rsi
leaq (%rcx,%rcx,2), %r10
leaq (%rbx,%rbx,4), %rbx
shll $0x2, %edi
movq %r11, %rdx
leaq (%r11,%r11,2), %r12
xorl %ebp, %ebp
movdqa (%r15,%rbp,4), %xmm1
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rcx
movdqa %xmm1, 0x10(%rsp)
movsbl 0x10(%rsp), %r11d
movl %r11d, (%rcx,%rbp)
addq %rbp, %rcx
movsbl 0x11(%rsp), %r11d
movq 0x68(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x12(%rsp), %r11d
movq 0x60(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x13(%rsp), %r11d
movq 0x78(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x14(%rsp), %r11d
movl %r11d, (%rdx,%rcx)
movsbl 0x15(%rsp), %r11d
movl %r11d, (%rbx,%rcx)
movsbl 0x16(%rsp), %r11d
movl %r11d, (%r10,%rcx)
movsbl 0x17(%rsp), %r11d
movl %r11d, (%r9,%rcx)
movsbl 0x18(%rsp), %r11d
movl %r11d, (%rsi,%rcx)
movsbl 0x19(%rsp), %r11d
movq 0xb0(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x1a(%rsp), %r11d
movq 0xb8(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x1b(%rsp), %r11d
movq 0x70(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x1c(%rsp), %r11d
movl %r11d, (%r12,%rcx)
movsbl 0x1d(%rsp), %r11d
movq 0x38(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x1e(%rsp), %r11d
movq 0x48(%rsp), %r8
movl %r11d, (%r8,%rcx)
movsbl 0x1f(%rsp), %r11d
movq 0x80(%rsp), %r8
movl %r11d, (%r8,%rcx)
addq $0x4, %rbp
cmpq %rbp, %rdi
jne 0x33f5ae
movl 0x140(%rsp), %ebp
testl %ebp, %ebp
movl 0x28(%rsp), %esi
movq 0xa8(%rsp), %r10
movl 0x8(%rsp), %ecx
movl 0x2c(%rsp), %r11d
movq 0x30(%rsp), %rbx
movl 0x130(%rsp), %r9d
je 0x33f702
cmpl $0xe, %ecx
jg 0x33f6f8
movl 0x24(%rsp), %edx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
pslldq $0x1, %xmm9             # xmm9 = zero,xmm9[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %ecx
jne 0x33f6ee
pextrw $0x7, %xmm9, %r11d
shrl $0x8, %r11d
testl %r9d, %r9d
movdqa 0xc0(%rsp), %xmm1
je 0x33f773
cmpl $0x0, 0xa0(%rsp)
je 0x33f773
movl %ebx, %ecx
andl $0x7ffffff, %ecx        # imm = 0x7FFFFFF
shll $0x4, %ecx
xorl %edx, %edx
movl %edx, %r8d
shrl $0x4, %r8d
movl %edx, %edi
andl $0xf, %edi
imull %ebx, %edi
addl %r8d, %edi
cmpl %r10d, %edi
jge 0x33f76c
movb (%r15,%rdx), %r8b
cmpb %r11b, %r8b
jle 0x33f755
movl %r8d, %r11d
movl 0xc(%rsp), %esi
movl %esi, (%rsp)
movl %edi, %esi
jmp 0x33f76c
cmpl %esi, %edi
cmovgel %esi, %edi
movl (%rsp), %r12d
cmpl 0xc(%rsp), %r12d
cmovnel %esi, %edi
cmpb %r11b, %r8b
cmovel %edi, %esi
incq %rdx
cmpl %edx, %ecx
jne 0x33f727
orl %r9d, %ebp
movq 0x50(%rsp), %rdx
jne 0x33f817
movq 0x98(%rsp), %rcx
shlq $0x4, %rcx
movdqa (%r15,%rcx), %xmm4
cmpl $0xe, 0x8(%rsp)
jg 0x33f802
movl 0x24(%rsp), %esi
cmpl $0x2, %esi
movl $0x1, %ecx
cmovgel %esi, %ecx
movl 0x28(%rsp), %esi
pslldq $0x1, %xmm4             # xmm4 = zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %ecx
jne 0x33f7ad
jmp 0x33f806
callq 0x1b4f85
jmp 0x33f7ee
callq 0x1b4f5f
jmp 0x33f7ee
callq 0x1b4f39
jmp 0x33f7ee
callq 0x1b4f13
jmp 0x33f7ee
callq 0x1b4eed
jmp 0x33f7ee
callq 0x1b4ec7
jmp 0x33f7ee
callq 0x1b4ea1
jmp 0x33f7ee
callq 0x1b4e7b
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x28(%rsp), %esi
pextrw $0x7, %xmm4, %r11d
shrl $0x8, %r11d
movl 0xc(%rsp), %ecx
movl %ecx, (%rsp)
pcmpgtb %xmm2, %xmm0
pcmpgtb %xmm1, %xmm3
por %xmm0, %xmm3
pmovmskb %xmm3, %ecx
testl %ecx, %ecx
je 0x33f83b
orb $0x40, 0xc(%rdx)
xorl %r11d, %r11d
movl $0x0, (%rsp)
xorl %esi, %esi
movsbl %r11b, %ecx
movl %ecx, (%rdx)
movl %esi, 0x4(%rdx)
movl (%rsp), %ecx
movl %ecx, 0x8(%rdx)
movq %rax, %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq 0x58(%rsp), %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq 0x50(%rsp), %rax
jmp 0x33f7f0