// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sg_striped_avx2_256_8.c
// Function: parasail_sg_flags_rowcol_striped_profile_avx2_256_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 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;
    __m256i* restrict vProfile = NULL;
    __m256i* restrict pvHStore = NULL;
    __m256i* restrict pvHLoad = NULL;
    __m256i* restrict pvE = NULL;
    int8_t* restrict boundary = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int8_t NEG_LIMIT = 0;
    int8_t POS_LIMIT = 0;
    int8_t score = 0;
    __m256i vNegLimit;
    __m256i vPosLimit;
    __m256i vSaturationCheckMin;
    __m256i vSaturationCheckMax;
    __m256i vMaxH;
    __m256i vPosMask;
    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 = 32; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m256i*)profile->profile8.score;
    vGapO = _mm256_set1_epi8(open);
    vGapE = _mm256_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 = _mm256_set1_epi8(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi8(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm256_cmpeq_epi8(_mm256_set1_epi8(position),
            _mm256_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31));

    /* 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_STRIPED
        | PARASAIL_FLAG_BITS_8 | PARASAIL_FLAG_LANES_32;
    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 */
    pvHStore = parasail_memalign___m256i(32, segLen);
    pvHLoad =  parasail_memalign___m256i(32, segLen);
    pvE      = parasail_memalign___m256i(32, segLen);
    boundary = parasail_memalign_int8_t(32, s2Len+1);

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

    /* initialize H and E */
    {
        int32_t index = 0;
        for (i=0; i<segLen; ++i) {
            int32_t segNum = 0;
            __m256i_8_t h;
            __m256i_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;
            }
            _mm256_store_si256(&pvHStore[index], h.m);
            _mm256_store_si256(&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;
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m256i vE;
        /* Initialize F value to -inf.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        __m256i vF = vNegLimit;

        /* load final segment of pvHStore and shift left by 2 bytes */
        __m256i vH = _mm256_slli_si256_rpl(pvHStore[segLen - 1], 1);

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

        /* Swap the 2 H buffers. */
        __m256i* pv = pvHLoad;
        pvHLoad = pvHStore;
        pvHStore = pv;

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

        /* inner loop to process the query sequence */
        for (i=0; i<segLen; ++i) {
            vH = _mm256_adds_epi8(vH, _mm256_load_si256(vP + i));
            vE = _mm256_load_si256(pvE + i);

            /* Get max from vH, vE and vF. */
            vH = _mm256_max_epi8(vH, vE);
            vH = _mm256_max_epi8(vH, vF);
            /* Save vH values. */
            _mm256_store_si256(pvHStore + i, vH);
            vSaturationCheckMax = _mm256_max_epi8(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm256_min_epi8(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm256_min_epi8(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm256_min_epi8(vSaturationCheckMin, vF);
#ifdef PARASAIL_TABLE
            arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif

            /* Update vE value. */
            vH = _mm256_subs_epi8(vH, vGapO);
            vE = _mm256_subs_epi8(vE, vGapE);
            vE = _mm256_max_epi8(vE, vH);
            _mm256_store_si256(pvE + i, vE);

            /* Update vF value. */
            vF = _mm256_subs_epi8(vF, vGapE);
            vF = _mm256_max_epi8(vF, vH);

            /* Load the next vH. */
            vH = _mm256_load_si256(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 */
        for (k=0; k<segWidth; ++k) {
            int64_t tmp = s2_beg ? -open : (boundary[j+1]-open);
            int8_t tmp2 = tmp < INT8_MIN ? INT8_MIN : tmp;
            vF = _mm256_slli_si256_rpl(vF, 1);
            vF = _mm256_insert_epi8_rpl(vF, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm256_load_si256(pvHStore + i);
                vH = _mm256_max_epi8(vH,vF);
                _mm256_store_si256(pvHStore + i, vH);
                vSaturationCheckMin = _mm256_min_epi8(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm256_max_epi8(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
                arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vH = _mm256_subs_epi8(vH, vGapO);
                vF = _mm256_subs_epi8(vF, vGapE);
                if (! _mm256_movemask_epi8(_mm256_cmpgt_epi8(vF, vH))) goto end;
                /*vF = _mm256_max_epi8(vF, vH);*/
            }
        }
end:
        {
            /* extract vector containing last value from the column */
            __m256i vCompare;
            vH = _mm256_load_si256(pvHStore + offset);
            vCompare = _mm256_and_si256(vPosMask, _mm256_cmpgt_epi8(vH, vMaxH));
            vMaxH = _mm256_max_epi8(vH, vMaxH);
            if (_mm256_movemask_epi8(vCompare)) {
                end_ref = j;
            }
#ifdef PARASAIL_ROWCOL
            for (k=0; k<position; ++k) {
                vH = _mm256_slli_si256_rpl(vH, 1);
            }
            result->rowcols->score_row[j] = (int8_t) _mm256_extract_epi8_rpl (vH, 31);
#endif
        }
    }

#ifdef PARASAIL_ROWCOL
    for (i=0; i<segLen; ++i) {
        __m256i vH = _mm256_load_si256(pvHStore + 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 = _mm256_slli_si256_rpl(vMaxH, 1);
        }
        score = (int8_t) _mm256_extract_epi8_rpl(vMaxH, 31);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int8_t *t = (int8_t*)pvHStore;
        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 */
        {
            __m256i vH = _mm256_load_si256(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm256_slli_si256_rpl(vH, 1);
            }
            score = (int8_t) _mm256_extract_epi8_rpl (vH, 31);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi8_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_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(pvE);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x20, %rsp
subq $0x180, %rsp            # imm = 0x180
movl %ecx, 0x28(%rsp)
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x50f6b5
movq 0x18(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x50f6d9
movq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x50f6fd
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x50f721
cmpq $0x0, 0x68(%rsp)
je 0x50f745
movl %edx, %r15d
testl %edx, %edx
jle 0x50f766
cmpl $0x0, 0x28(%rsp)
js 0x50f787
movl %r8d, %r12d
testl %r8d, %r8d
js 0x50f7a8
movl %r9d, %ebx
leal -0x1(%rcx), %eax
movq %rcx, 0xa0(%rsp)
leaq 0x1f(%rcx), %rdi
movq %rdi, %r13
shrq $0x5, %r13
movl %eax, 0x9c(%rsp)
xorl %edx, %edx
divl %r13d
movl %eax, 0x58(%rsp)
movl %edx, 0x30(%rsp)
movq 0x60(%rsp), %rdx
movl 0x20(%rdx), %eax
movl %eax, %ecx
negb %cl
movzbl %cl, %r8d
movl 0x28(%rsp), %ecx
movl %ecx, %esi
negl %esi
movl %esi, 0x38(%rsp)
cmpl %esi, %eax
cmovgl %ecx, %r8d
movl %r8d, 0x24(%rsp)
movb $0x7e, %al
subb 0x1c(%rdx), %al
movl %eax, 0x80(%rsp)
andl $0x7fffffe0, %edi       # imm = 0x7FFFFFE0
movl %r15d, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x50ee66
movl %r12d, 0x48(%rsp)
xorl %edi, %edi
testl %ebx, %ebx
setne %dil
xorl %ecx, %ecx
cmpl $0x0, 0x10(%rbp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x18(%rbp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x20(%rbp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rdi,8), %ecx
orl %edx, %ecx
orl %esi, %ecx
orl 0xc(%rax), %ecx
orl $0x20140802, %ecx       # imm = 0x20140802
movq %rax, 0x90(%rsp)
movl %ecx, 0xc(%rax)
pushq $0x20
popq %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x496aa4
movq %rax, %r14
movq %r12, %rdi
movq %r13, %rsi
callq 0x496aa4
movq %rax, %r12
pushq $0x20
popq %rdi
movq %r13, %rsi
callq 0x496aa4
movq %r13, 0x18(%rsp)
movq %rax, %r13
movq %r15, 0x50(%rsp)
leal 0x1(%r15), %esi
pushq $0x20
popq %rdi
movq %rsi, 0x70(%rsp)
callq 0x1ab776
testq %r14, %r14
sete %dl
movq %r12, 0x78(%rsp)
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %r13, %r13
sete %sil
movq %rax, 0x40(%rsp)
testq %rax, %rax
sete %dl
orb %sil, %dl
orb %cl, %dl
je 0x50ee6d
xorl %ebx, %ebx
jmp 0x50f7d0
movq 0x50(%rsp), %rax
decl %eax
movl %eax, 0x14(%rsp)
pushq $0x1f
popq %rdx
subl 0x58(%rsp), %edx
movl 0x28(%rsp), %eax
vmovd %eax, %xmm0
vpbroadcastb %xmm0, %ymm5
movl 0x48(%rsp), %ecx
vmovd %ecx, %xmm0
vpbroadcastb %xmm0, %ymm6
movl 0x24(%rsp), %r12d
addb $-0x7f, %r12b
movl %r12d, 0x24(%rsp)
vmovd %r12d, %xmm0
vpbroadcastb %xmm0, %ymm0
vmovd 0x80(%rsp), %xmm1
vpbroadcastb %xmm1, %ymm1
vmovd %edx, %xmm2
vpbroadcastb %xmm2, %ymm2
movl %eax, %eax
movl %ecx, %ecx
movslq 0x38(%rsp), %r15
movq 0x18(%rsp), %rdi
imulq %rcx, %rdi
xorl %r8d, %r8d
pushq $-0x80
popq %r12
cmpq 0x18(%rsp), %r8
je 0x50ef5c
movq %r15, %rsi
xorl %r11d, %r11d
cmpq $0x20, %r11
je 0x50ef2e
testl %ebx, %ebx
je 0x50eefd
xorl %r10d, %r10d
jmp 0x50ef00
movq %rsi, %r10
cmpq $-0x7f, %r10
movq %r12, %r9
cmovgeq %r10, %r9
subq %rax, %r10
cmpq $-0x7f, %r10
cmovlq %r12, %r10
movb %r9b, 0x140(%rsp,%r11)
movb %r10b, 0x120(%rsp,%r11)
incq %r11
subq %rdi, %rsi
jmp 0x50eeee
movq %r8, %rsi
shlq $0x5, %rsi
vmovaps 0x140(%rsp), %ymm3
vmovaps %ymm3, (%r14,%rsi)
vmovaps 0x120(%rsp), %ymm3
vmovaps %ymm3, (%r13,%rsi)
incq %r8
subq %rcx, %r15
jmp 0x50eee1
movq 0x40(%rsp), %rax
movb $0x0, (%rax)
pushq $0x1
popq %rax
pushq $-0x80
popq %r9
xorl %ecx, %ecx
movl 0x38(%rsp), %esi
movl 0x48(%rsp), %r10d
movq 0x70(%rsp), %r11
movq 0x40(%rsp), %r8
cmpq %rax, %r11
je 0x50efa1
cmpl $-0x7f, %esi
movl %r9d, %edi
cmovgel %esi, %edi
cmpl $0x0, 0x18(%rbp)
cmovnel %ecx, %edi
movb %dil, (%r8,%rax)
incq %rax
subl %r10d, %esi
jmp 0x50ef80
movq 0x18(%rsp), %r8
leal -0x1(%r8), %r10d
movl 0x30(%rsp), %eax
movl 0x50(%rsp), %ecx
movq %rcx, 0x30(%rsp)
shlq $0x5, %r8
leaq 0x20(%r8), %rbx
xorl %ecx, %ecx
shlq $0x5, %r10
vpcmpeqb 0xbca13(%rip), %ymm2, %ymm7 # 0x5cb9e0
shlq $0x5, %rax
movq %rax, 0x58(%rsp)
vmovdqa %ymm1, %ymm3
vmovdqa %ymm0, %ymm2
vmovdqa %ymm0, %ymm4
movl 0x14(%rsp), %r11d
movq 0x78(%rsp), %rax
movq %rax, %r15
cmpq 0x30(%rsp), %rcx
je 0x50f191
vmovdqa (%r14,%r10), %ymm8
vinserti128 $0x1, %xmm8, %ymm0, %ymm9
vpalignr $0xf, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm9[31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x68(%rsp), %rsi
movzbl (%rsi,%rcx), %esi
movl (%rax,%rsi,4), %eax
imull 0x18(%rsp), %eax
cltq
shlq $0x5, %rax
addq 0x88(%rsp), %rax
movq 0x40(%rsp), %rsi
vpinsrb $0x0, (%rsi,%rcx), %xmm8, %xmm9
vpblendd $0xf, %ymm9, %ymm8, %ymm9 # ymm9 = ymm9[0,1,2,3],ymm8[4,5,6,7]
xorl %esi, %esi
vmovdqa %ymm0, %ymm8
cmpq %rsi, %r8
je 0x50f0aa
vpaddsb (%rax,%rsi), %ymm9, %ymm9
vmovdqa (%r13,%rsi), %ymm10
vpmaxsb %ymm8, %ymm10, %ymm11
vpmaxsb %ymm11, %ymm9, %ymm9
vmovdqa %ymm9, (%r15,%rsi)
vpmaxsb %ymm9, %ymm2, %ymm2
vpminsb %ymm10, %ymm3, %ymm3
vpminsb %ymm8, %ymm3, %ymm3
vpminsb %ymm9, %ymm3, %ymm3
vpsubsb %ymm5, %ymm9, %ymm9
vpsubsb %ymm6, %ymm10, %ymm10
vpmaxsb %ymm9, %ymm10, %ymm10
vmovdqa %ymm10, (%r13,%rsi)
vpsubsb %ymm6, %ymm8, %ymm8
vpmaxsb %ymm9, %ymm8, %ymm8
vmovdqa (%r14,%rsi), %ymm9
addq $0x20, %rsi
jmp 0x50f04c
xorl %eax, %eax
cmpl $0x20, %eax
je 0x50f129
movl 0x38(%rsp), %esi
cmpl $0x0, 0x18(%rbp)
jne 0x50f0c9
movq 0x40(%rsp), %rsi
movsbl 0x1(%rsi,%rcx), %esi
subl 0x28(%rsp), %esi
cmpl $-0x7f, %esi
cmovll %r9d, %esi
vinserti128 $0x1, %xmm8, %ymm0, %ymm9
vpalignr $0xf, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm9[31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
vpinsrb $0x0, %esi, %xmm8, %xmm9
vpblendd $0xf, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[0,1,2,3],ymm8[4,5,6,7]
xorl %esi, %esi
leaq 0x20(%rsi), %rdi
cmpq %rdi, %rbx
je 0x50f125
vpmaxsb (%r15,%rsi), %ymm8, %ymm9
vmovdqa %ymm9, (%r15,%rsi)
vpminsb %ymm9, %ymm3, %ymm3
vpmaxsb %ymm9, %ymm2, %ymm2
vpsubsb %ymm5, %ymm9, %ymm9
vpsubsb %ymm6, %ymm8, %ymm8
vpcmpgtb %ymm9, %ymm8, %ymm9
vpmovmskb %ymm9, %r12d
movq %rdi, %rsi
testl %r12d, %r12d
jne 0x50f0ea
jmp 0x50f129
incl %eax
jmp 0x50f0ac
movq 0x58(%rsp), %rax
vmovdqa (%r15,%rax), %ymm8
vpcmpgtb %ymm4, %ymm8, %ymm9
vpand %ymm7, %ymm9, %ymm9
vpmaxsb %ymm4, %ymm8, %ymm4
vpmovmskb %ymm9, %eax
xorl %esi, %esi
cmpl %edx, %esi
jge 0x50f15c
vperm2i128 $0x28, %ymm8, %ymm8, %ymm9 # ymm9 = zero,zero,ymm8[0,1]
vpalignr $0xf, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm9[31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
incl %esi
jmp 0x50f148
testl %eax, %eax
cmovnel %ecx, %r11d
vextracti128 $0x1, %ymm8, %xmm8
vpextrb $0xf, %xmm8, %eax
movsbl %al, %eax
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rsi
movq (%rsi), %rsi
movl %eax, (%rsi,%rcx,4)
incq %rcx
movq %r14, %rax
movq %r15, %r14
jmp 0x50efec
movl %r11d, 0x98(%rsp)
movq 0x18(%rsp), %r9
leal (,%r9,4), %ecx
leal (,%r9,8), %eax
movq %rax, 0x38(%rsp)
movl %r9d, %eax
imulq $0xc, %rax, %rsi
movq %rsi, 0x68(%rsp)
movl %r9d, %esi
shll $0x4, %esi
movq %rsi, 0x60(%rsp)
imulq $0x14, %rax, %rsi
movq %rsi, 0x88(%rsp)
imulq $0x18, %rax, %rsi
movq %rsi, 0x28(%rsp)
imulq $0x1c, %rax, %rax
movq %rax, 0x30(%rsp)
imulq $0x7c, %r9, %rax
movq %rax, 0x80(%rsp)
imulq $0x78, %r9, %rax
movq %rax, 0x50(%rsp)
imulq $0x74, %r9, %rax
movq %rax, 0x48(%rsp)
imulq $0x70, %r9, %rax
movq %rax, 0x78(%rsp)
imulq $0x6c, %r9, %rax
movq %rax, 0x70(%rsp)
movq %r9, %rax
shlq $0x6, %rax
movq %rax, 0x118(%rsp)
imulq $0x68, %r9, %rax
movq %rax, 0x110(%rsp)
imulq $0x64, %r9, %rax
movq %rax, 0x108(%rsp)
imulq $0x60, %r9, %rax
movq %rax, 0x100(%rsp)
imulq $0x5c, %r9, %rax
movq %rax, 0xf8(%rsp)
imulq $0x58, %r9, %rax
movq %rax, 0xf0(%rsp)
imulq $0x54, %r9, %rax
movq %rax, 0xe8(%rsp)
imulq $0x50, %r9, %rax
movq %rax, 0xe0(%rsp)
imulq $0x4c, %r9, %rax
movq %rax, 0xd8(%rsp)
imulq $0x48, %r9, %rax
movq %rax, 0xd0(%rsp)
imulq $0x44, %r9, %rax
movq %rax, 0xc8(%rsp)
imulq $0x3c, %r9, %rax
movq %rax, 0xc0(%rsp)
imulq $0x38, %r9, %rax
movq %rax, 0xb8(%rsp)
imulq $0x34, %r9, %rax
movq %rax, 0xb0(%rsp)
imulq $0x30, %r9, %rax
movq %rax, 0xa8(%rsp)
imulq $0x2c, %r9, %rdi
imulq $0x28, %r9, %rsi
imulq $0x24, %r9, %rax
xorl %r9d, %r9d
cmpq %r9, %rcx
je 0x50f570
movq 0x90(%rsp), %r10
movq 0x10(%r10), %r10
movq 0x8(%r10), %r10
vmovdqa (%r14,%r9,8), %xmm6
vmovdqa 0x10(%r14,%r9,8), %xmm5
vmovd %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%r10,%r9)
addq %r9, %r10
vpextrb $0x1, %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%rcx,%r10)
vpextrb $0x2, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x38(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x3, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x68(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x4, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x60(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x5, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x88(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x6, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x28(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x7, %xmm6, %ebx
movsbl %bl, %ebx
movq 0x30(%rsp), %r12
movl %ebx, (%r12,%r10)
vpextrb $0x8, %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%r8,%r10)
vpextrb $0x9, %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%rax,%r10)
vpextrb $0xa, %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%rsi,%r10)
vpextrb $0xb, %xmm6, %ebx
movsbl %bl, %ebx
movl %ebx, (%rdi,%r10)
vpextrb $0xc, %xmm6, %ebx
movsbl %bl, %ebx
movq 0xa8(%rsp), %r11
movl %ebx, (%r11,%r10)
vpextrb $0xd, %xmm6, %ebx
movsbl %bl, %ebx
movq 0xb0(%rsp), %r11
movl %ebx, (%r11,%r10)
vpextrb $0xe, %xmm6, %ebx
movsbl %bl, %ebx
movq 0xb8(%rsp), %r11
movl %ebx, (%r11,%r10)
vpextrb $0xf, %xmm6, %ebx
movsbl %bl, %ebx
movq 0xc0(%rsp), %r11
movl %ebx, (%r11,%r10)
vmovd %xmm5, %ebx
movsbl %bl, %ebx
vpextrb $0x1, %xmm5, %r12d
movq 0x118(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x2, %xmm5, %r12d
movq 0xc8(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x3, %xmm5, %r12d
movq 0xd0(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x4, %xmm5, %r12d
movq 0xd8(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x5, %xmm5, %r12d
movq 0xe0(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x6, %xmm5, %r12d
movq 0xe8(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x7, %xmm5, %r12d
movq 0xf0(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x8, %xmm5, %r12d
movq 0xf8(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0x9, %xmm5, %r12d
movq 0x100(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xa, %xmm5, %r12d
movq 0x108(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xb, %xmm5, %r12d
movq 0x110(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xc, %xmm5, %r12d
movq 0x70(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xd, %xmm5, %r12d
movq 0x78(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xe, %xmm5, %r12d
movq 0x48(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
vpextrb $0xf, %xmm5, %r12d
movq 0x50(%rsp), %r11
movl %ebx, (%r11,%r10)
movsbl %r12b, %ebx
movq 0x80(%rsp), %r12
movl %ebx, (%r12,%r10)
addq $0x4, %r9
jmp 0x50f2de
movl 0x20(%rbp), %ebx
testl %ebx, %ebx
movl 0x9c(%rsp), %r9d
movq 0xa0(%rsp), %r10
movl 0x24(%rsp), %r11d
movl 0x98(%rsp), %r12d
je 0x50f5b6
xorl %eax, %eax
cmpl %edx, %eax
jge 0x50f5aa
vperm2i128 $0x28, %ymm4, %ymm4, %ymm5 # ymm5 = zero,zero,ymm4[0,1]
vpalignr $0xf, %ymm5, %ymm4, %ymm4 # ymm4 = ymm5[15],ymm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm5[31],ymm4[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
incl %eax
jmp 0x50f596
vextracti128 $0x1, %ymm4, %xmm4
vpextrb $0xf, %xmm4, %r11d
cmpl $0x0, 0x10(%rbp)
je 0x50f619
movq 0x18(%rsp), %rcx
andl $0x3ffffff, %ecx        # imm = 0x3FFFFFF
shll $0x5, %ecx
xorl %esi, %esi
movl %r9d, %eax
cmpl %esi, %ecx
je 0x50f61c
movl %esi, %r8d
shrl $0x5, %r8d
movl %esi, %edi
andl $0x1f, %edi
imull 0x18(%rsp), %edi
addl %r8d, %edi
cmpl %r10d, %edi
jge 0x50f614
movb (%r14,%rsi), %r8b
cmpb %r11b, %r8b
jle 0x50f601
movl %r8d, %r11d
movl 0x14(%rsp), %r12d
movl %edi, %eax
jmp 0x50f614
cmpl %eax, %edi
cmovgel %eax, %edi
cmpl 0x14(%rsp), %r12d
cmovnel %eax, %edi
cmpb %r11b, %r8b
cmovel %edi, %eax
incq %rsi
jmp 0x50f5cf
movl %r9d, %eax
orl 0x10(%rbp), %ebx
jne 0x50f656
movq 0x58(%rsp), %rax
vmovdqa (%r14,%rax), %ymm4
xorl %eax, %eax
cmpl %edx, %eax
jge 0x50f642
vperm2i128 $0x28, %ymm4, %ymm4, %ymm5 # ymm5 = zero,zero,ymm4[0,1]
vpalignr $0xf, %ymm5, %ymm4, %ymm4 # ymm4 = ymm5[15],ymm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm5[31],ymm4[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
incl %eax
jmp 0x50f62e
vextracti128 $0x1, %ymm4, %xmm4
vpextrb $0xf, %xmm4, %r11d
movl 0x14(%rsp), %r12d
movl %r9d, %eax
vpcmpgtb %ymm3, %ymm0, %ymm0
vpcmpgtb %ymm1, %ymm2, %ymm1
vpor %ymm0, %ymm1, %ymm0
vpmovmskb %ymm0, %ecx
testl %ecx, %ecx
movq 0x90(%rsp), %rbx
je 0x50f67e
orb $0x40, 0xc(%rbx)
xorl %r11d, %r11d
xorl %r12d, %r12d
xorl %eax, %eax
movsbl %r11b, %ecx
movl %ecx, (%rbx)
movl %eax, 0x4(%rbx)
movl %r12d, 0x8(%rbx)
movq 0x40(%rsp), %rdi
vzeroupper
callq 0x1ab763
movq %r13, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
jmp 0x50f7d0
movq 0x22b91c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7925(%rip), %rsi     # 0x5c6feb
leaq 0xbdb85(%rip), %rdx     # 0x5cd252
leaq 0x8de09(%rip), %rcx     # 0x59d4dd
jmp 0x50f7c7
movq 0x22b8f8(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7901(%rip), %rsi     # 0x5c6feb
leaq 0xbdb61(%rip), %rdx     # 0x5cd252
leaq 0xb83b8(%rip), %rcx     # 0x5c7ab0
jmp 0x50f7c7
movq 0x22b8d4(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb78dd(%rip), %rsi     # 0x5c6feb
leaq 0xbdb3d(%rip), %rdx     # 0x5cd252
leaq 0xb821d(%rip), %rcx     # 0x5c7939
jmp 0x50f7c7
movq 0x22b8b0(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7fcf(%rip), %rsi     # 0x5c7701
leaq 0xbdb19(%rip), %rdx     # 0x5cd252
leaq 0xb8209(%rip), %rcx     # 0x5c7949
jmp 0x50f7c7
movq 0x22b88c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7895(%rip), %rsi     # 0x5c6feb
leaq 0xbdaf5(%rip), %rdx     # 0x5cd252
leaq 0xb7f9a(%rip), %rcx     # 0x5c76fe
jmp 0x50f7c7
movq 0x22b86b(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7f8a(%rip), %rsi     # 0x5c7701
leaq 0xbdad4(%rip), %rdx     # 0x5cd252
leaq 0xb7f90(%rip), %rcx     # 0x5c7715
jmp 0x50f7c7
movq 0x22b84a(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7f83(%rip), %rsi     # 0x5c771b
leaq 0xbdab3(%rip), %rdx     # 0x5cd252
leaq 0xb7f8a(%rip), %rcx     # 0x5c7730
jmp 0x50f7c7
movq 0x22b829(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb7f62(%rip), %rsi     # 0x5c771b
leaq 0xbda92(%rip), %rdx     # 0x5cd252
leaq 0xb7f6e(%rip), %rcx     # 0x5c7735
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq