// File: /workspace/github_c_makefile_star2_O1/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 $0x1a0, %rsp            # imm = 0x1A0
movl %ecx, 0x48(%rsp)
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x53de83
movq 0x18(%rdi), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x53de8a
movq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x53de91
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x53de98
cmpq $0x0, 0x68(%rsp)
je 0x53de9f
movl %edx, %r12d
testl %edx, %edx
jle 0x53dea6
cmpl $0x0, 0x48(%rsp)
js 0x53dead
testl %r8d, %r8d
js 0x53deb4
movl %r9d, %ebx
movl %r8d, 0x40(%rsp)
leal -0x1(%rcx), %eax
movq %rcx, 0xa8(%rsp)
leaq 0x1f(%rcx), %r14
movq %r14, %r15
shrq $0x5, %r15
movl %eax, 0x24(%rsp)
cltd
idivl %r15d
movl %eax, 0x2c(%rsp)
movl %edx, 0x78(%rsp)
movq 0x60(%rsp), %rdx
movl 0x20(%rdx), %eax
movl %eax, %ecx
negb %cl
movzbl %cl, %esi
movl 0x48(%rsp), %ecx
movl %ecx, %r13d
negl %r13d
cmpl %r13d, %eax
cmovgl %ecx, %esi
movl %esi, 0x3c(%rsp)
movb $0x7e, %al
subb 0x1c(%rdx), %al
movl %eax, 0x18(%rsp)
andl $0x7fffffe0, %r14d      # imm = 0x7FFFFFE0
movl %r14d, %edi
movl %r12d, %esi
movq %r12, 0x30(%rsp)
callq 0x209630
testq %rax, %rax
je 0x53deb9
movq %r14, 0xa0(%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, 0x88(%rsp)
movl %ecx, 0xc(%rax)
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, %r12
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %r15, %rsi
movq %rax, %r15
movl $0x20, %edi
movq %rsi, 0x50(%rsp)
callq 0x4c5e3c
movq %rax, %r14
movq 0x30(%rsp), %rax
leal 0x1(%rax), %esi
movl $0x20, %edi
callq 0x2094c8
testq %r12, %r12
sete %cl
movq %r15, 0x70(%rsp)
testq %r15, %r15
sete %dl
orb %cl, %dl
testq %r14, %r14
sete %cl
testq %rax, %rax
sete %sil
orb %cl, %sil
orb %dl, %sil
jne 0x53deb9
movq %r12, 0x58(%rsp)
movq 0x30(%rsp), %rcx
decl %ecx
movl %ecx, 0x28(%rsp)
movl $0x1f, %ecx
subl 0x2c(%rsp), %ecx
movl 0x48(%rsp), %edx
vmovd %edx, %xmm0
vpbroadcastb %xmm0, %ymm5
movl 0x40(%rsp), %esi
vmovd %esi, %xmm0
vpbroadcastb %xmm0, %ymm6
movl 0x3c(%rsp), %r12d
addb $-0x7f, %r12b
movl %r12d, 0x3c(%rsp)
vmovd %r12d, %xmm0
vpbroadcastb %xmm0, %ymm0
vmovd 0x18(%rsp), %xmm1
vpbroadcastb %xmm1, %ymm1
movl %ecx, 0x38(%rsp)
vmovd %ecx, %xmm2
vpbroadcastb %xmm2, %ymm2
movl %edx, %ecx
movl %esi, %esi
movslq %r13d, %rdx
movl 0x50(%rsp), %r8d
movq %r8, %rdi
movq %rsi, 0x18(%rsp)
imulq %rsi, %rdi
xorl %r9d, %r9d
movq $-0x80, %r10
movq %rdx, %rsi
xorl %r12d, %r12d
testl %ebx, %ebx
je 0x53d5c6
xorl %r11d, %r11d
jmp 0x53d5c9
movq %rsi, %r11
cmpq $-0x7f, %r11
movq $-0x80, %r15
cmovgeq %r11, %r15
movb %r15b, 0x160(%rsp,%r12)
subq %rcx, %r11
cmpq $-0x7f, %r11
cmovlq %r10, %r11
movb %r11b, 0x140(%rsp,%r12)
incq %r12
subq %rdi, %rsi
cmpq $0x20, %r12
jne 0x53d5bd
movq %r9, %rsi
shlq $0x5, %rsi
vmovaps 0x160(%rsp), %ymm3
movq 0x58(%rsp), %r11
vmovaps %ymm3, (%r11,%rsi)
vmovaps 0x140(%rsp), %ymm3
vmovaps %ymm3, (%r14,%rsi)
incq %r9
subq 0x18(%rsp), %rdx
cmpq %r8, %r9
jne 0x53d5b7
movb $0x0, (%rax)
movq 0x30(%rsp), %r11
cmpl $0x2, %r11d
movl $0x1, %ecx
cmovgel %r11d, %ecx
xorl %edx, %edx
xorl %esi, %esi
movl %r13d, %edi
movl 0x18(%rbp), %ebx
movl 0x40(%rsp), %r10d
cmpl $-0x7f, %edi
movl $0xffffff80, %r9d       # imm = 0xFFFFFF80
cmovgel %edi, %r9d
testl %ebx, %ebx
cmovnel %edx, %r9d
movb %r9b, 0x1(%rax,%rsi)
subl %r10d, %edi
incq %rsi
cmpq %rsi, %rcx
jne 0x53d65a
movl $0x1, %esi
movq 0x50(%rsp), %rcx
cmpl %esi, %ecx
movl %ecx, %r10d
adcl $0x0, %r10d
movl 0x38(%rsp), %edx
cmpl $0x2, %edx
movl $0x1, %edi
cmovgel %edx, %edi
movl %edi, 0x80(%rsp)
leal -0x1(%rcx), %edx
cmpl $0x2, %r11d
cmovgel %r11d, %esi
movq %rsi, 0x30(%rsp)
movl 0x78(%rsp), %ecx
shlq $0x5, %r10
xorl %edi, %edi
shlq $0x5, %rdx
movq %rdx, 0x40(%rsp)
movl $0xffffff80, %edx       # imm = 0xFFFFFF80
vpcmpeqb 0xbc20a(%rip), %ymm2, %ymm7 # 0x5f98e0
movq %rcx, 0x98(%rsp)
shlq $0x5, %rcx
movl 0x28(%rsp), %esi
movl %esi, 0x18(%rsp)
vmovdqa %ymm0, %ymm4
vmovdqa %ymm0, %ymm2
vmovdqa %ymm1, %ymm3
movq 0x70(%rsp), %rsi
movq 0x58(%rsp), %r11
movq %rsi, %r12
movq 0x60(%rsp), %rsi
movq 0x10(%rsi), %rsi
movq 0x68(%rsp), %r9
movzbl (%r9,%rdi), %r9d
movslq (%rsi,%r9,4), %r9
movq %r8, %rsi
imulq %r9, %rsi
shlq $0x5, %rsi
addq 0x90(%rsp), %rsi
movq 0x40(%rsp), %r9
vmovdqa (%r11,%r9), %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]
vpinsrb $0x0, (%rax,%rdi), %xmm8, %xmm9
vpblendd $0xf, %ymm9, %ymm8, %ymm9 # ymm9 = ymm9[0,1,2,3],ymm8[4,5,6,7]
xorl %r9d, %r9d
vmovdqa %ymm0, %ymm8
vpaddsb (%rsi,%r9), %ymm9, %ymm9
vmovdqa (%r14,%r9), %ymm10
vpmaxsb %ymm8, %ymm10, %ymm11
vpmaxsb %ymm11, %ymm9, %ymm9
vmovdqa %ymm9, (%r12,%r9)
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, (%r14,%r9)
vpsubsb %ymm6, %ymm8, %ymm8
vpmaxsb %ymm9, %ymm8, %ymm8
vmovdqa (%r11,%r9), %ymm9
addq $0x20, %r9
cmpq %r9, %r10
jne 0x53d758
movq %r11, 0x70(%rsp)
xorl %esi, %esi
movl %r13d, %r9d
testl %ebx, %ebx
jne 0x53d7cc
movsbl 0x1(%rax,%rdi), %r9d
subl 0x48(%rsp), %r9d
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]
cmpl $-0x7f, %r9d
cmovll %edx, %r9d
vpinsrb $0x0, %r9d, %xmm8, %xmm9
vpblendd $0xf, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[0,1,2,3],ymm8[4,5,6,7]
movb $0x1, %r11b
movl $0x1, %r9d
xorl %ebx, %ebx
vpmaxsb (%r12,%rbx), %ymm8, %ymm9
vmovdqa %ymm9, (%r12,%rbx)
vpminsb %ymm9, %ymm3, %ymm3
vpmaxsb %ymm9, %ymm2, %ymm2
vpsubsb %ymm5, %ymm9, %ymm9
vpsubsb %ymm6, %ymm8, %ymm8
vpcmpgtb %ymm9, %ymm8, %ymm9
vpmovmskb %ymm9, %r15d
testl %r15d, %r15d
je 0x53d837
cmpq %r8, %r9
setb %r11b
addq $0x20, %rbx
incq %r9
cmpq %rbx, %r10
jne 0x53d7f7
testb $0x1, %r11b
movl 0x18(%rbp), %ebx
jne 0x53d850
leal 0x1(%rsi), %r9d
cmpl $0x1f, %esi
movl %r9d, %esi
jb 0x53d7ba
vmovdqa (%r12,%rcx), %ymm8
vpcmpgtb %ymm4, %ymm8, %ymm9
vpand %ymm7, %ymm9, %ymm9
vpmovmskb %ymm9, %esi
testl %esi, %esi
movl 0x18(%rsp), %esi
cmovnel %edi, %esi
movl %esi, 0x18(%rsp)
vmovdqa %ymm8, %ymm9
cmpl $0x1e, 0x2c(%rsp)
jg 0x53d898
movl 0x80(%rsp), %esi
vmovdqa %ymm8, %ymm9
vperm2i128 $0x28, %ymm9, %ymm9, %ymm10 # ymm10 = zero,zero,ymm9[0,1]
vpalignr $0xf, %ymm10, %ymm9, %ymm9 # ymm9 = ymm10[15],ymm9[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm10[31],ymm9[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
decl %esi
jne 0x53d888
vpmaxsb %ymm4, %ymm8, %ymm4
vextracti128 $0x1, %ymm9, %xmm8
vpextrb $0xf, %xmm8, %esi
movsbl %sil, %esi
movq 0x88(%rsp), %r9
movq 0x10(%r9), %r9
movq (%r9), %r9
movl %esi, (%r9,%rdi,4)
incq %rdi
movq %r12, %r11
cmpq 0x30(%rsp), %rdi
movq 0x70(%rsp), %rsi
jne 0x53d700
movq 0x50(%rsp), %rsi
movl %esi, %ecx
shll $0x4, %ecx
movq %rcx, 0x48(%rsp)
leaq (%r8,%r8,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %r8, %rcx
movq %rcx, 0x68(%rsp)
cmpl $0x1, %esi
movl %esi, %edi
adcl $0x0, %edi
imulq $0x7c, %r8, %rcx
movq %rcx, 0x90(%rsp)
imulq $0x78, %r8, %rcx
movq %rcx, 0x58(%rsp)
imulq $0x74, %r8, %rcx
movq %rcx, 0x30(%rsp)
imulq $0x70, %r8, %rcx
movq %rcx, 0x40(%rsp)
imulq $0x6c, %r8, %rcx
movq %rcx, 0x80(%rsp)
movq %r8, %r9
shlq $0x5, %r9
movl %r8d, %ecx
shll $0x4, %ecx
leaq (%rcx,%rcx,4), %rdx
movq %rdx, 0x78(%rsp)
movq %r8, %r10
shlq $0x6, %r10
leaq (%rcx,%rcx,2), %rcx
movq %rcx, 0x130(%rsp)
imulq $0x68, %r8, %rcx
movq %rcx, 0x128(%rsp)
imulq $0x64, %r8, %rcx
movq %rcx, 0x120(%rsp)
imulq $0x5c, %r8, %rcx
movq %rcx, 0x118(%rsp)
imulq $0x58, %r8, %rcx
movq %rcx, 0x110(%rsp)
imulq $0x54, %r8, %rcx
movq %rcx, 0x108(%rsp)
imulq $0x4c, %r8, %rcx
movq %rcx, 0x100(%rsp)
leal (,%r8,8), %ecx
leal (,%r8,4), %edx
imulq $0x3c, %r8, %r11
movq %r11, 0xf8(%rsp)
imulq $0x38, %r8, %r11
movq %r11, 0xf0(%rsp)
imulq $0x34, %r8, %r11
movq %r11, 0xe8(%rsp)
imulq $0x2c, %r8, %r8
movq %r8, 0xe0(%rsp)
leaq (%rcx,%rcx,8), %r8
movq %r8, 0xd8(%rsp)
leaq (%rcx,%rcx,4), %rcx
movq %rcx, 0xd0(%rsp)
movq %r10, 0x138(%rsp)
leaq (%r10,%rdx), %rcx
movq %rcx, 0xc8(%rsp)
leaq (%rdx,%rdx,8), %rcx
movq %rcx, 0xc0(%rsp)
shll $0x2, %edi
movq %rdi, 0x60(%rsp)
leal (,%rsi,4), %ecx
leal (,%rsi,8), %esi
leaq (%rcx,%rcx,2), %rdx
movq %rdx, 0xb8(%rsp)
leaq (%rcx,%rcx,4), %rdx
movq %rdx, 0xb0(%rsp)
leaq (%rsi,%rsi,2), %r8
movq %r9, %rbx
leaq (%r9,%r9,2), %r13
xorl %r9d, %r9d
movq 0x88(%rsp), %rdx
movq 0x10(%rdx), %r10
movq 0x8(%r10), %r10
vmovdqa (%r12,%r9,8), %xmm6
vmovdqa 0x10(%r12,%r9,8), %xmm5
vmovd %xmm6, %r15d
movsbl %r15b, %r15d
movl %r15d, (%r10,%r9)
vpextrb $0x1, %xmm6, %r15d
addq %r9, %r10
movsbl %r15b, %r15d
vpextrb $0x2, %xmm6, %edi
movl %r15d, (%rcx,%r10)
movsbl %dil, %edi
vpextrb $0x3, %xmm6, %r15d
movl %edi, (%rsi,%r10)
movsbl %r15b, %edi
vpextrb $0x4, %xmm6, %r15d
movq 0xb8(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0x5, %xmm6, %r15d
movq 0x48(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0x6, %xmm6, %r15d
movq 0xb0(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0x7, %xmm6, %r15d
movl %edi, (%r8,%r10)
movsbl %r15b, %edi
vpextrb $0x8, %xmm6, %r15d
movq 0x68(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0x9, %xmm6, %r15d
movl %edi, (%rbx,%r10)
movsbl %r15b, %edi
vpextrb $0xa, %xmm6, %r15d
movq 0xc0(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0xb, %xmm6, %r15d
movq 0xd0(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0xc, %xmm6, %r15d
movq 0xe0(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0xd, %xmm6, %r15d
movq 0x130(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0xe, %xmm6, %r15d
movq 0xe8(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
vpextrb $0xf, %xmm6, %r15d
movq 0xf0(%rsp), %r11
movl %edi, (%r11,%r10)
movsbl %r15b, %edi
movq 0xf8(%rsp), %r11
movl %edi, (%r11,%r10)
vmovd %xmm5, %edi
movsbl %dil, %edi
movq 0x138(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x1, %xmm5, %edi
movsbl %dil, %edi
movq 0xc8(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x2, %xmm5, %edi
movsbl %dil, %edi
movq 0xd8(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x3, %xmm5, %edi
movsbl %dil, %edi
movq 0x100(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x4, %xmm5, %edi
movsbl %dil, %edi
movq 0x78(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x5, %xmm5, %edi
movsbl %dil, %edi
movq 0x108(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x6, %xmm5, %edi
movsbl %dil, %edi
movq 0x110(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x7, %xmm5, %edi
movsbl %dil, %edi
movq 0x118(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0x8, %xmm5, %edi
movsbl %dil, %edi
movl %edi, (%r13,%r10)
vpextrb $0x9, %xmm5, %edi
movsbl %dil, %edi
movq 0x120(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xa, %xmm5, %edi
movsbl %dil, %edi
movq 0x128(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xb, %xmm5, %edi
movsbl %dil, %edi
movq 0x80(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xc, %xmm5, %edi
movsbl %dil, %edi
movq 0x40(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xd, %xmm5, %edi
movsbl %dil, %edi
movq 0x30(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xe, %xmm5, %edi
movsbl %dil, %edi
movq 0x58(%rsp), %r11
movl %edi, (%r11,%r10)
vpextrb $0xf, %xmm5, %edi
movsbl %dil, %edi
movq 0x90(%rsp), %r11
movl %edi, (%r11,%r10)
addq $0x4, %r9
cmpq %r9, 0x60(%rsp)
jne 0x53da5d
movl 0x20(%rbp), %r13d
testl %r13d, %r13d
movq %rdx, %r9
movq 0xa8(%rsp), %r10
movl 0x3c(%rsp), %r11d
movq 0x50(%rsp), %r15
je 0x53dd50
cmpl $0x1e, 0x2c(%rsp)
jg 0x53dd44
movl 0x38(%rsp), %edx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
vperm2i128 $0x8, %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]
decl %ecx
jne 0x53dd34
vextracti128 $0x1, %ymm4, %xmm4
vpextrb $0xf, %xmm4, %r11d
cmpl $0x0, 0x10(%rbp)
je 0x53ddc1
cmpl $0x0, 0xa0(%rsp)
je 0x53ddc1
movl %r15d, %edx
andl $0x3ffffff, %edx        # imm = 0x3FFFFFF
shll $0x5, %edx
xorl %esi, %esi
movl 0x24(%rsp), %ecx
movl %esi, %r8d
shrl $0x5, %r8d
movl %esi, %edi
andl $0x1f, %edi
imull %r15d, %edi
addl %r8d, %edi
cmpl %r10d, %edi
jge 0x53ddb8
movb (%r12,%rsi), %r8b
cmpb %r11b, %r8b
jle 0x53dda2
movl %r8d, %r11d
movl 0x28(%rsp), %ecx
movl %ecx, 0x18(%rsp)
movl %edi, %ecx
jmp 0x53ddb8
cmpl %ecx, %edi
cmovgel %ecx, %edi
movl 0x18(%rsp), %ebx
cmpl 0x28(%rsp), %ebx
cmovnel %ecx, %edi
cmpb %r11b, %r8b
cmovel %edi, %ecx
incq %rsi
cmpl %esi, %edx
jne 0x53dd72
jmp 0x53ddc5
movl 0x24(%rsp), %ecx
orl 0x10(%rbp), %r13d
jne 0x53de1b
movq 0x98(%rsp), %rcx
shlq $0x5, %rcx
vmovdqa (%r12,%rcx), %ymm4
cmpl $0x1e, 0x2c(%rsp)
jg 0x53de03
movl 0x38(%rsp), %edx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
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]
decl %ecx
jne 0x53ddf3
vextracti128 $0x1, %ymm4, %xmm4
vpextrb $0xf, %xmm4, %r11d
movl 0x28(%rsp), %ecx
movl %ecx, 0x18(%rsp)
movl 0x24(%rsp), %ecx
vpcmpgtb %ymm3, %ymm0, %ymm0
vpcmpgtb %ymm1, %ymm2, %ymm1
vpor %ymm0, %ymm1, %ymm0
vpmovmskb %ymm0, %edx
testl %edx, %edx
je 0x53de41
orb $0x40, 0xc(%r9)
xorl %r11d, %r11d
movl $0x0, 0x18(%rsp)
xorl %ecx, %ecx
movsbl %r11b, %edx
movl %edx, (%r9)
movl %ecx, 0x4(%r9)
movl 0x18(%rsp), %ecx
movl %ecx, 0x8(%r9)
movq %rax, %rdi
vzeroupper
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq 0x70(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq 0x88(%rsp), %rax
jmp 0x53debb
callq 0x1f2ded
jmp 0x53deb9
callq 0x1f2dc7
jmp 0x53deb9
callq 0x1f2da1
jmp 0x53deb9
callq 0x1f2d7b
jmp 0x53deb9
callq 0x1f2d55
jmp 0x53deb9
callq 0x1f2d2f
jmp 0x53deb9
callq 0x1f2d09
jmp 0x53deb9
callq 0x1f2ce3
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq