// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sg_striped_avx2_256_16.c
// Function: parasail_sg_flags_rowcol_striped_profile_avx2_256_16
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;
    int16_t* restrict boundary = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int16_t NEG_LIMIT = 0;
    int16_t POS_LIMIT = 0;
    int16_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->profile16.score);
    PARASAIL_CHECK_NULL(profile->matrix);
    PARASAIL_CHECK_GT0(profile->s1Len);
    PARASAIL_CHECK_NULL(s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);

    /* initialize stack variables */
    i = 0;
    j = 0;
    k = 0;
    s1Len = profile->s1Len;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    matrix = profile->matrix;
    segWidth = 16; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m256i*)profile->profile16.score;
    vGapO = _mm256_set1_epi16(open);
    vGapE = _mm256_set1_epi16(gap);
    NEG_LIMIT = (-open < matrix->min ? INT16_MIN + open : INT16_MIN - matrix->min) + 1;
    POS_LIMIT = INT16_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm256_set1_epi16(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi16(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm256_cmpeq_epi16(_mm256_set1_epi16(position),
            _mm256_set_epi16(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15));

    /* 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_16 | 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 */
    pvHStore = parasail_memalign___m256i(32, segLen);
    pvHLoad =  parasail_memalign___m256i(32, segLen);
    pvE      = parasail_memalign___m256i(32, segLen);
    boundary = parasail_memalign_int16_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_16_t h;
            __m256i_16_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = s1_beg ? 0 : (-open-gap*(segNum*segLen+i));
                h.v[segNum] = tmp < INT16_MIN ? INT16_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT16_MIN ? INT16_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 < INT16_MIN ? INT16_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], 2);

        /* 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_epi16_rpl(vH, boundary[j], 0);

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

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

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

            /* Update vF value. */
            vF = _mm256_subs_epi16(vF, vGapE);
            vF = _mm256_max_epi16(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);
            int16_t tmp2 = tmp < INT16_MIN ? INT16_MIN : tmp;
            vF = _mm256_slli_si256_rpl(vF, 2);
            vF = _mm256_insert_epi16_rpl(vF, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm256_load_si256(pvHStore + i);
                vH = _mm256_max_epi16(vH,vF);
                _mm256_store_si256(pvHStore + i, vH);
                vSaturationCheckMin = _mm256_min_epi16(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm256_max_epi16(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
                arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vH = _mm256_subs_epi16(vH, vGapO);
                vF = _mm256_subs_epi16(vF, vGapE);
                if (! _mm256_movemask_epi8(_mm256_cmpgt_epi16(vF, vH))) goto end;
                /*vF = _mm256_max_epi16(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_epi16(vH, vMaxH));
            vMaxH = _mm256_max_epi16(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, 2);
            }
            result->rowcols->score_row[j] = (int16_t) _mm256_extract_epi16_rpl (vH, 15);
#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, 2);
        }
        score = (int16_t) _mm256_extract_epi16_rpl(vMaxH, 15);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int16_t *t = (int16_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, 2);
            }
            score = (int16_t) _mm256_extract_epi16_rpl (vH, 15);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi16_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi16(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 $0x100, %rsp            # imm = 0x100
movl %ecx, 0x28(%rsp)
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x50d259
movq 0x30(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x50d27d
movq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x50d2a1
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x50d2c5
cmpq $0x0, 0x68(%rsp)
je 0x50d2e9
movl %edx, %r14d
testl %edx, %edx
jle 0x50d30a
cmpl $0x0, 0x28(%rsp)
js 0x50d32b
movl %r8d, %r12d
testl %r8d, %r8d
js 0x50d34c
movl %r9d, %ebx
leal -0x1(%rcx), %eax
movq %rcx, 0x98(%rsp)
leaq 0xf(%rcx), %rdi
movq %rdi, %r15
shrq $0x4, %r15
movl %eax, 0x20(%rsp)
xorl %edx, %edx
divl %r15d
movl %eax, 0x58(%rsp)
movl %edx, %r13d
movl 0x28(%rsp), %edx
movl %edx, %r8d
negl %r8d
movq 0x60(%rsp), %rsi
movl 0x20(%rsi), %eax
movl %eax, %ecx
negl %ecx
movl %r8d, 0x38(%rsp)
cmpl %r8d, %eax
cmovgl %edx, %ecx
movl %ecx, 0x24(%rsp)
movw $0x7ffe, %ax            # imm = 0x7FFE
subw 0x1c(%rsi), %ax
movl %eax, 0x10(%rsp)
andl $0x7ffffff0, %edi       # imm = 0x7FFFFFF0
movl %r14d, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x50cc2a
movl %r13d, 0x80(%rsp)
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 $0x10240802, %ecx       # imm = 0x10240802
movq %rax, 0x90(%rsp)
movl %ecx, 0xc(%rax)
pushq $0x20
popq %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x496aa4
movq %r15, %r13
movq %r14, %r15
movq %rax, %r14
movq %r12, %rdi
movq %r13, %rsi
callq 0x496aa4
movq %rax, %r12
pushq $0x20
popq %rdi
movq %r13, 0x30(%rsp)
movq %r13, %rsi
callq 0x496aa4
movq %rax, %r13
movq %r15, 0x50(%rsp)
leal 0x1(%r15), %esi
pushq $0x20
popq %rdi
movq %rsi, 0x70(%rsp)
callq 0x1ab77b
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 0x50cc31
xorl %ebx, %ebx
jmp 0x50d374
movq 0x50(%rsp), %rax
decl %eax
movl %eax, 0x1c(%rsp)
pushq $0xf
popq %rdx
subl 0x58(%rsp), %edx
movl 0x28(%rsp), %ecx
vmovd %ecx, %xmm0
vpbroadcastw %xmm0, %ymm4
movl 0x48(%rsp), %esi
vmovd %esi, %xmm0
vpbroadcastw %xmm0, %ymm5
movl 0x24(%rsp), %eax
addl $0xffff8001, %eax       # imm = 0xFFFF8001
movl %eax, 0x24(%rsp)
vmovd %eax, %xmm0
vpbroadcastw %xmm0, %ymm0
vmovd 0x10(%rsp), %xmm1
vpbroadcastw %xmm1, %ymm1
vmovd %edx, %xmm2
vpbroadcastw %xmm2, %ymm2
movl %ecx, %eax
movl %esi, %ecx
movslq 0x38(%rsp), %r12
movq 0x30(%rsp), %rdi
movq %rcx, 0x10(%rsp)
imulq %rcx, %rdi
xorl %r8d, %r8d
movq $-0x7fff, %r9           # imm = 0x8001
movq $-0x8000, %r10          # imm = 0x8000
cmpq 0x30(%rsp), %r8
je 0x50cd33
movq %r12, %rsi
xorl %r15d, %r15d
cmpq $0x10, %r15
je 0x50cd00
testl %ebx, %ebx
je 0x50cccb
xorl %r11d, %r11d
jmp 0x50ccce
movq %rsi, %r11
cmpq %r9, %r11
movq $-0x8000, %rcx          # imm = 0x8000
cmovgeq %r11, %rcx
subq %rax, %r11
cmpq %r9, %r11
cmovlq %r10, %r11
movw %cx, 0xc0(%rsp,%r15,2)
movw %r11w, 0xa0(%rsp,%r15,2)
incq %r15
subq %rdi, %rsi
jmp 0x50ccbc
movq %r8, %rcx
shlq $0x5, %rcx
vmovaps 0xc0(%rsp), %ymm3
vmovaps %ymm3, (%r14,%rcx)
vmovaps 0xa0(%rsp), %ymm3
vmovaps %ymm3, (%r13,%rcx)
incq %r8
subq 0x10(%rsp), %r12
jmp 0x50ccaf
movq 0x40(%rsp), %rax
andw $0x0, (%rax)
pushq $0x1
popq %rax
xorl %ecx, %ecx
movl 0x38(%rsp), %esi
movq 0x30(%rsp), %r8
movl 0x48(%rsp), %r10d
movq 0x70(%rsp), %r11
movq 0x40(%rsp), %r9
cmpq %rax, %r11
je 0x50cd80
cmpl $0xffff8001, %esi       # imm = 0xFFFF8001
movl $0xffff8000, %edi       # imm = 0xFFFF8000
cmovgel %esi, %edi
cmpl $0x0, 0x18(%rbp)
cmovnel %ecx, %edi
movw %di, (%r9,%rax,2)
incq %rax
subl %r10d, %esi
jmp 0x50cd59
leal -0x1(%r8), %r9d
movl 0x80(%rsp), %eax
movl 0x50(%rsp), %r10d
shlq $0x5, %r8
leaq 0x20(%r8), %r11
xorl %ebx, %ebx
shlq $0x5, %r9
vpcmpeqw 0xbeb9a(%rip), %ymm2, %ymm7 # 0x5cb940
shlq $0x5, %rax
movq %rax, 0x58(%rsp)
movl $0xffff8000, %ecx       # imm = 0xFFFF8000
vmovdqa %ymm1, %ymm3
vmovdqa %ymm0, %ymm2
vmovdqa %ymm0, %ymm6
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq %rax, %r15
cmpq %r10, %rbx
je 0x50cf6e
vmovdqa (%r14,%r9), %ymm8
vinserti128 $0x1, %xmm8, %ymm0, %ymm9
vpalignr $0xe, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[14,15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13],ymm9[30,31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x68(%rsp), %rsi
movzbl (%rsi,%rbx), %esi
movl (%rax,%rsi,4), %eax
imull 0x30(%rsp), %eax
cltq
shlq $0x5, %rax
addq 0x88(%rsp), %rax
movq 0x40(%rsp), %rsi
vpinsrw $0x0, (%rsi,%rbx,2), %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 0x50ce84
vpaddsw (%rax,%rsi), %ymm9, %ymm9
vmovdqa (%r13,%rsi), %ymm10
vpmaxsw %ymm8, %ymm10, %ymm11
vpmaxsw %ymm11, %ymm9, %ymm9
vmovdqa %ymm9, (%r15,%rsi)
vpmaxsw %ymm2, %ymm9, %ymm2
vpminsw %ymm3, %ymm10, %ymm3
vpminsw %ymm3, %ymm8, %ymm3
vpminsw %ymm3, %ymm9, %ymm3
vpsubsw %ymm4, %ymm9, %ymm9
vpsubsw %ymm5, %ymm10, %ymm10
vpmaxsw %ymm9, %ymm10, %ymm10
vmovdqa %ymm10, (%r13,%rsi)
vpsubsw %ymm5, %ymm8, %ymm8
vpmaxsw %ymm9, %ymm8, %ymm8
vmovdqa (%r14,%rsi), %ymm9
addq $0x20, %rsi
jmp 0x50ce2a
xorl %eax, %eax
cmpl $0x10, %eax
je 0x50cf02
movl 0x38(%rsp), %esi
cmpl $0x0, 0x18(%rbp)
jne 0x50cea3
movq 0x40(%rsp), %rsi
movswl 0x2(%rsi,%rbx,2), %esi
subl 0x28(%rsp), %esi
cmpl $0xffff8001, %esi       # imm = 0xFFFF8001
cmovll %ecx, %esi
vinserti128 $0x1, %xmm8, %ymm0, %ymm9
vpalignr $0xe, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[14,15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13],ymm9[30,31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
vpinsrw $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, %r11
je 0x50cefe
vpmaxsw (%r15,%rsi), %ymm8, %ymm9
vmovdqa %ymm9, (%r15,%rsi)
vpminsw %ymm3, %ymm9, %ymm3
vpmaxsw %ymm2, %ymm9, %ymm2
vpsubsw %ymm4, %ymm9, %ymm9
vpsubsw %ymm5, %ymm8, %ymm8
vpcmpgtw %ymm9, %ymm8, %ymm9
vpmovmskb %ymm9, %r12d
movq %rdi, %rsi
testl %r12d, %r12d
jne 0x50cec5
jmp 0x50cf02
incl %eax
jmp 0x50ce86
movq 0x58(%rsp), %rax
vmovdqa (%r15,%rax), %ymm8
vpcmpgtw %ymm6, %ymm8, %ymm9
vpand %ymm7, %ymm9, %ymm9
vpmaxsw %ymm6, %ymm8, %ymm6
vpmovmskb %ymm9, %eax
xorl %esi, %esi
cmpl %edx, %esi
jge 0x50cf34
vperm2i128 $0x28, %ymm8, %ymm8, %ymm9 # ymm9 = zero,zero,ymm8[0,1]
vpalignr $0xe, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[14,15],ymm8[0,1,2,3,4,5,6,7,8,9,10,11,12,13],ymm9[30,31],ymm8[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
incl %esi
jmp 0x50cf20
testl %eax, %eax
movl 0x10(%rsp), %eax
cmovnel %ebx, %eax
movl %eax, 0x10(%rsp)
vextracti128 $0x1, %ymm8, %xmm8
vpextrw $0x7, %xmm8, %eax
cwtl
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rsi
movq (%rsi), %rsi
movl %eax, (%rsi,%rbx,4)
incq %rbx
movq %r14, %rax
movq %r15, %r14
jmp 0x50cdcd
movq 0x30(%rsp), %rsi
leal (,%rsi,4), %ecx
leal (,%rsi,8), %eax
movq %rax, 0x38(%rsp)
movl %esi, %eax
imulq $0xc, %rax, %rax
movq %rax, 0x68(%rsp)
imulq $0x3c, %rsi, %rax
movq %rax, 0x60(%rsp)
imulq $0x38, %rsi, %rax
movq %rax, 0x88(%rsp)
imulq $0x34, %rsi, %rax
movq %rax, 0x28(%rsp)
imulq $0x30, %rsi, %rax
movq %rax, 0x50(%rsp)
imulq $0x2c, %rsi, %rax
movq %rax, 0x48(%rsp)
imulq $0x28, %rsi, %rax
movq %rax, 0x80(%rsp)
imulq $0x24, %rsi, %rax
movq %rax, 0x78(%rsp)
imulq $0x1c, %rsi, %rax
movq %rax, 0x70(%rsp)
imulq $0x18, %rsi, %r11
movq %rsi, %rbx
shlq $0x4, %rbx
imulq $0x14, %rsi, %r12
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x50d10a
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x8(%rsi), %rsi
vmovdqa (%r14,%rdi,8), %xmm5
vmovdqa 0x10(%r14,%rdi,8), %xmm4
vmovd %xmm5, %eax
cwtl
movl %eax, (%rsi,%rdi)
addq %rdi, %rsi
vpextrw $0x1, %xmm5, %eax
cwtl
movl %eax, (%rcx,%rsi)
vpextrw $0x2, %xmm5, %eax
cwtl
movq 0x38(%rsp), %r9
movl %eax, (%r9,%rsi)
vpextrw $0x3, %xmm5, %eax
cwtl
movq 0x68(%rsp), %r9
movl %eax, (%r9,%rsi)
vpextrw $0x4, %xmm5, %eax
cwtl
movl %eax, (%rbx,%rsi)
vpextrw $0x5, %xmm5, %eax
cwtl
movl %eax, (%r12,%rsi)
vpextrw $0x6, %xmm5, %eax
cwtl
movl %eax, (%r11,%rsi)
vpextrw $0x7, %xmm5, %eax
cwtl
movq 0x70(%rsp), %r9
movl %eax, (%r9,%rsi)
vmovd %xmm4, %eax
cwtl
vpextrw $0x1, %xmm4, %r9d
movl %eax, (%r8,%rsi)
movswl %r9w, %eax
vpextrw $0x2, %xmm4, %r9d
movq 0x78(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
vpextrw $0x3, %xmm4, %r9d
movq 0x80(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
vpextrw $0x4, %xmm4, %r9d
movq 0x48(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
vpextrw $0x5, %xmm4, %r9d
movq 0x50(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
vpextrw $0x6, %xmm4, %r9d
movq 0x28(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
vpextrw $0x7, %xmm4, %r9d
movq 0x88(%rsp), %r10
movl %eax, (%r10,%rsi)
movswl %r9w, %eax
movq 0x60(%rsp), %r9
movl %eax, (%r9,%rsi)
addq $0x4, %rdi
jmp 0x50cff0
movl 0x20(%rbp), %r12d
testl %r12d, %r12d
movq 0x98(%rsp), %r10
movl 0x24(%rsp), %r11d
movq 0x30(%rsp), %rbx
je 0x50d146
xorl %eax, %eax
cmpl %edx, %eax
jge 0x50d13b
vperm2i128 $0x28, %ymm6, %ymm6, %ymm4 # ymm4 = zero,zero,ymm6[0,1]
vpalignr $0xe, %ymm4, %ymm6, %ymm6 # ymm6 = ymm4[14,15],ymm6[0,1,2,3,4,5,6,7,8,9,10,11,12,13],ymm4[30,31],ymm6[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
incl %eax
jmp 0x50d127
vextracti128 $0x1, %ymm6, %xmm4
vpextrw $0x7, %xmm4, %r11d
cmpl $0x0, 0x10(%rbp)
je 0x50d1b0
movl %ebx, %ecx
andl $0x7ffffff, %ecx        # imm = 0x7FFFFFF
shll $0x4, %ecx
xorl %esi, %esi
movl 0x20(%rsp), %eax
cmpl %esi, %ecx
je 0x50d1b4
movl %esi, %r8d
shrl $0x4, %r8d
movl %esi, %edi
andl $0xf, %edi
imull %ebx, %edi
addl %r8d, %edi
cmpl %r10d, %edi
jge 0x50d1ab
movzwl (%r14,%rsi,2), %r8d
cmpw %r11w, %r8w
jle 0x50d192
movl %r8d, %r11d
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
movl %edi, %eax
jmp 0x50d1ab
cmpl %eax, %edi
cmovgel %eax, %edi
movl 0x10(%rsp), %r9d
cmpl 0x1c(%rsp), %r9d
cmovnel %eax, %edi
cmpw %r11w, %r8w
cmovel %edi, %eax
incq %rsi
jmp 0x50d15d
movl 0x20(%rsp), %eax
orl 0x10(%rbp), %r12d
jne 0x50d1f2
movq 0x58(%rsp), %rax
vmovdqa (%r14,%rax), %ymm4
xorl %eax, %eax
cmpl %edx, %eax
jge 0x50d1db
vperm2i128 $0x28, %ymm4, %ymm4, %ymm5 # ymm5 = zero,zero,ymm4[0,1]
vpalignr $0xe, %ymm5, %ymm4, %ymm4 # ymm4 = ymm5[14,15],ymm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13],ymm5[30,31],ymm4[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
incl %eax
jmp 0x50d1c7
vextracti128 $0x1, %ymm4, %xmm4
vpextrw $0x7, %xmm4, %r11d
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x20(%rsp), %eax
vpcmpgtw %ymm3, %ymm0, %ymm0
vpcmpgtw %ymm1, %ymm2, %ymm1
vpor %ymm0, %ymm1, %ymm0
vpmovmskb %ymm0, %ecx
testl %ecx, %ecx
movq 0x90(%rsp), %rbx
je 0x50d21f
orb $0x40, 0xc(%rbx)
xorl %r11d, %r11d
movl $0x0, 0x10(%rsp)
xorl %eax, %eax
movswl %r11w, %ecx
movl %ecx, (%rbx)
movl %eax, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 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 0x50d374
movq 0x22dd78(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb9d81(%rip), %rsi     # 0x5c6feb
leaq 0xbff7e(%rip), %rdx     # 0x5cd1ef
leaq 0x90265(%rip), %rcx     # 0x59d4dd
jmp 0x50d36b
movq 0x22dd54(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb9d5d(%rip), %rsi     # 0x5c6feb
leaq 0xbff5a(%rip), %rdx     # 0x5cd1ef
leaq 0xba782(%rip), %rcx     # 0x5c7a1e
jmp 0x50d36b
movq 0x22dd30(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb9d39(%rip), %rsi     # 0x5c6feb
leaq 0xbff36(%rip), %rdx     # 0x5cd1ef
leaq 0xba679(%rip), %rcx     # 0x5c7939
jmp 0x50d36b
movq 0x22dd0c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xba42b(%rip), %rsi     # 0x5c7701
leaq 0xbff12(%rip), %rdx     # 0x5cd1ef
leaq 0xba665(%rip), %rcx     # 0x5c7949
jmp 0x50d36b
movq 0x22dce8(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xb9cf1(%rip), %rsi     # 0x5c6feb
leaq 0xbfeee(%rip), %rdx     # 0x5cd1ef
leaq 0xba3f6(%rip), %rcx     # 0x5c76fe
jmp 0x50d36b
movq 0x22dcc7(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xba3e6(%rip), %rsi     # 0x5c7701
leaq 0xbfecd(%rip), %rdx     # 0x5cd1ef
leaq 0xba3ec(%rip), %rcx     # 0x5c7715
jmp 0x50d36b
movq 0x22dca6(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xba3df(%rip), %rsi     # 0x5c771b
leaq 0xbfeac(%rip), %rdx     # 0x5cd1ef
leaq 0xba3e6(%rip), %rcx     # 0x5c7730
jmp 0x50d36b
movq 0x22dc85(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xba3be(%rip), %rsi     # 0x5c771b
leaq 0xbfe8b(%rip), %rdx     # 0x5cd1ef
leaq 0xba3ca(%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