// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sg_striped_avx2_256_64.c
// Function: parasail_sg_flags_rowcol_striped_profile_avx2_256_64
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;
    int64_t* restrict boundary = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    int64_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->profile64.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 = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m256i*)profile->profile64.score;
    vGapO = _mm256_set1_epi64x_rpl(open);
    vGapE = _mm256_set1_epi64x_rpl(gap);
    NEG_LIMIT = (-open < matrix->min ? INT64_MIN + open : INT64_MIN - matrix->min) + 1;
    POS_LIMIT = INT64_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm256_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm256_cmpeq_epi64(_mm256_set1_epi64x_rpl(position),
            _mm256_set_epi64x_rpl(0,1,2,3));

    /* 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_64 | PARASAIL_FLAG_LANES_4;
    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_int64_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_64_t h;
            __m256i_64_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = s1_beg ? 0 : (-open-gap*(segNum*segLen+i));
                h.v[segNum] = tmp < INT64_MIN ? INT64_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT64_MIN ? INT64_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 < INT64_MIN ? INT64_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], 8);

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

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

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

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

            /* Update vF value. */
            vF = _mm256_sub_epi64(vF, vGapE);
            vF = _mm256_max_epi64_rpl(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);
            int64_t tmp2 = tmp < INT64_MIN ? INT64_MIN : tmp;
            vF = _mm256_slli_si256_rpl(vF, 8);
            vF = _mm256_insert_epi64_rpl(vF, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm256_load_si256(pvHStore + i);
                vH = _mm256_max_epi64_rpl(vH,vF);
                _mm256_store_si256(pvHStore + i, vH);
                vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm256_max_epi64_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
                arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vH = _mm256_sub_epi64(vH, vGapO);
                vF = _mm256_sub_epi64(vF, vGapE);
                if (! _mm256_movemask_epi8(_mm256_cmpgt_epi64(vF, vH))) goto end;
                /*vF = _mm256_max_epi64_rpl(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_epi64(vH, vMaxH));
            vMaxH = _mm256_max_epi64_rpl(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, 8);
            }
            result->rowcols->score_row[j] = (int64_t) _mm256_extract_epi64_rpl (vH, 3);
#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, 8);
        }
        score = (int64_t) _mm256_extract_epi64_rpl(vMaxH, 3);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int64_t *t = (int64_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, 8);
            }
            score = (int64_t) _mm256_extract_epi64_rpl (vH, 3);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi64_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi64(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 $0x1e0, %rsp            # imm = 0x1E0
movq %rsi, 0x90(%rsp)
testq %rdi, %rdi
je 0x5387fe
movq 0x60(%rdi), %rax
movq %rax, 0xe0(%rsp)
testq %rax, %rax
je 0x538805
movq 0x10(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x53880c
movl 0x8(%rdi), %eax
movq %rax, 0x80(%rsp)
testl %eax, %eax
jle 0x538813
cmpq $0x0, 0x90(%rsp)
je 0x53881a
movl %edx, %r10d
testl %edx, %edx
jle 0x538821
movl %r9d, %r15d
movl %ecx, %r9d
testl %ecx, %ecx
js 0x538828
testl %r8d, %r8d
js 0x53882f
movl %r8d, 0x60(%rsp)
movq 0x80(%rsp), %rcx
leal -0x1(%rcx), %eax
leaq 0x3(%rcx), %r13
movq %r13, %r12
shrq $0x2, %r12
movl %eax, 0x54(%rsp)
cltd
idivl %r12d
movl %eax, 0x4(%rsp)
movl %edx, 0x48(%rsp)
movl %r9d, %ecx
negl %r9d
movq 0x88(%rsp), %rdx
movslq 0x20(%rdx), %rax
movq %rcx, 0x98(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
subq %rax, %r14
movl %r9d, 0x70(%rsp)
cmpl %r9d, %eax
cmovgq %rcx, %r14
movslq 0x1c(%rdx), %rax
movq %rax, 0x18(%rsp)
andl $0x7ffffffc, %r13d      # imm = 0x7FFFFFFC
movl %r13d, %edi
movl %r10d, %esi
movq %r10, 0x20(%rsp)
callq 0x209630
testq %rax, %rax
je 0x538834
movq %rax, %rbx
movq %r13, 0xb8(%rsp)
movq %r14, 0x8(%rsp)
movl 0x20(%rbp), %edi
xorl %eax, %eax
testl %r15d, %r15d
setne %al
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
movl %edi, 0x50(%rsp)
testl %edi, %edi
setne %sil
shll $0xf, %esi
leal (%rcx,%rax,8), %eax
orl %edx, %eax
orl %esi, %eax
orl 0xc(%rbx), %eax
orl $0x4840802, %eax        # imm = 0x4840802
movl %eax, 0xc(%rbx)
movl $0x20, %edi
movq %r12, %rsi
callq 0x4c5e3c
movq %rax, 0x40(%rsp)
movl $0x20, %edi
movq %r12, %rsi
callq 0x4c5e3c
movq %rax, %r14
movl $0x20, %edi
movq %r12, %rsi
callq 0x4c5e3c
movq %rax, %r13
movq %r12, 0x28(%rsp)
movq 0x20(%rsp), %rax
leal 0x1(%rax), %r12d
movl $0x20, %edi
movq %r12, %rsi
callq 0x2094de
movq 0x40(%rsp), %r9
movq %rax, %r10
testq %r9, %r9
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
movq %r13, 0x38(%rsp)
testq %r13, %r13
sete %al
testq %r10, %r10
sete %dl
orb %al, %dl
orb %cl, %dl
jne 0x538834
movq %r14, 0x30(%rsp)
movq 0x20(%rsp), %rax
decl %eax
movl %eax, (%rsp)
movl $0x3, %esi
subl 0x4(%rsp), %esi
movq 0x98(%rsp), %r11
vmovq %r11, %xmm0
vpbroadcastq %xmm0, %ymm3
movl 0x60(%rsp), %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm14
movq 0x8(%rsp), %rdx
incq %rdx
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
subq 0x18(%rsp), %rdi
addq $-0x2, %rdi
movq %rdx, 0x8(%rsp)
vmovq %rdx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovq %rdi, %xmm1
vpbroadcastq %xmm1, %ymm0
movl %esi, 0x14(%rsp)
movslq %esi, %rcx
vmovq %rcx, %xmm1
vpbroadcastq %xmm1, %ymm4
movslq 0x70(%rsp), %rcx
movl 0x28(%rsp), %edx
movq %rdx, 0x18(%rsp)
imulq %rax, %rdx
xorl %esi, %esi
movq 0x38(%rsp), %r13
movq %r9, %r14
movq %rcx, %rdi
xorl %r8d, %r8d
testl %r15d, %r15d
je 0x537e91
xorl %r9d, %r9d
jmp 0x537e94
movq %rdi, %r9
movq %r9, 0x1a0(%rsp,%r8,8)
subq %r11, %r9
movq %r9, 0x180(%rsp,%r8,8)
incq %r8
subq %rdx, %rdi
cmpq $0x4, %r8
jne 0x537e87
movq %rsi, %rdi
shlq $0x5, %rdi
vmovaps 0x1a0(%rsp), %ymm1
movq %r14, %r9
vmovaps %ymm1, (%r14,%rdi)
vmovdqa 0x180(%rsp), %ymm1
vmovdqa %ymm1, (%r13,%rdi)
incq %rsi
subq %rax, %rcx
cmpq 0x18(%rsp), %rsi
jne 0x537e7e
movq $0x0, (%r10)
movl $0x1, %eax
movl 0x70(%rsp), %edi
movl %edi, %ecx
movl 0x18(%rbp), %esi
movl 0x60(%rsp), %r8d
testl %esi, %esi
movl $0x0, %edx
cmovel %ecx, %edx
movslq %edx, %rdx
movq %rdx, (%r10,%rax,8)
incq %rax
subl %r8d, %ecx
cmpq %rax, %r12
jne 0x537f03
movq 0x28(%rsp), %rax
leal -0x1(%rax), %edx
movslq %edi, %rcx
movq %rcx, 0xe8(%rsp)
movl 0x48(%rsp), %ecx
movl $0x1, %esi
cmpl %esi, %eax
movl %eax, %edi
adcl $0x0, %edi
movl 0x14(%rsp), %eax
cmpl $0x2, %eax
movl $0x1, %r8d
cmovgel %eax, %r8d
movl %r8d, 0x58(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x2, %eax
cmovgel %eax, %esi
movq %rsi, 0xc8(%rsp)
shlq $0x5, %rdi
xorl %r8d, %r8d
shlq $0x5, %rdx
movq %rdx, 0xd0(%rsp)
vpcmpeqq 0xc1739(%rip), %ymm4, %ymm1 # 0x5f96c0
vmovdqa %ymm1, 0x140(%rsp)
movq %rcx, 0xb0(%rsp)
shlq $0x5, %rcx
movq %rcx, 0xc0(%rsp)
movl (%rsp), %r11d
vmovdqa 0x100(%rsp), %ymm5
vmovdqa %ymm5, %ymm2
vmovdqa %ymm0, 0x120(%rsp)
vmovdqa %ymm0, %ymm4
movq 0x30(%rsp), %r14
movq %rbx, 0xd8(%rsp)
movq %r10, 0xa0(%rsp)
movq %rdi, 0x20(%rsp)
vmovdqa %ymm2, 0x160(%rsp)
movl %r11d, 0x5c(%rsp)
movq %r14, %r12
movq 0xd0(%rsp), %rax
movq %r9, 0x30(%rsp)
vmovdqa (%r9,%rax), %ymm1
vinserti128 $0x1, %xmm1, %ymm0, %ymm8
vpalignr $0x8, %ymm8, %ymm1, %ymm1 # ymm1 = ymm8[8,9,10,11,12,13,14,15],ymm1[0,1,2,3,4,5,6,7],ymm8[24,25,26,27,28,29,30,31],ymm1[16,17,18,19,20,21,22,23]
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
movzbl (%rcx,%r8), %ecx
movslq (%rax,%rcx,4), %rax
movq 0x18(%rsp), %rcx
imulq %rax, %rcx
shlq $0x5, %rcx
addq 0xe0(%rsp), %rcx
movq %rcx, 0xf0(%rsp)
movq %r8, 0xa8(%rsp)
vmovq (%r10,%r8,8), %xmm8
vpblendd $0x3, %ymm8, %ymm1, %ymm1 # ymm1 = ymm8[0,1],ymm1[2,3,4,5,6,7]
xorl %ebx, %ebx
vmovdqa 0x100(%rsp), %ymm8
movq 0xf0(%rsp), %rax
vpaddq (%rax,%rbx), %ymm1, %ymm1
vmovq %xmm1, %r11
movq (%r13,%rbx), %rax
movq %rax, 0x70(%rsp)
cmpq %rax, %r11
cmovleq %rax, %r11
movq 0x8(%r13,%rbx), %rax
movq %rax, 0x60(%rsp)
vpextrq $0x1, %xmm1, %rdi
cmpq %rax, %rdi
cmovleq %rax, %rdi
vextracti128 $0x1, %ymm1, %xmm1
vmovq %xmm1, %rcx
movq 0x10(%r13,%rbx), %rax
movq %rax, 0x40(%rsp)
cmpq %rax, %rcx
cmovleq %rax, %rcx
movq 0x18(%r13,%rbx), %r10
vpextrq $0x1, %xmm1, %r13
cmpq %r10, %r13
cmovleq %r10, %r13
vmovq %xmm8, %r15
cmpq %r15, %r11
cmovleq %r15, %r11
vpextrq $0x1, %xmm8, %rax
movq %rax, 0x48(%rsp)
cmpq %rax, %rdi
cmovleq %rax, %rdi
vextracti128 $0x1, %ymm8, %xmm1
vmovq %xmm1, %rax
movq %rax, 0xf8(%rsp)
cmpq %rax, %rcx
cmovleq %rax, %rcx
vpextrq $0x1, %xmm1, %r14
cmpq %r14, %r13
cmovleq %r14, %r13
vmovq %xmm5, %r8
cmpq %r11, %r8
cmovleq %r11, %r8
vpextrq $0x1, %xmm5, %rsi
cmpq %rdi, %rsi
cmovleq %rdi, %rsi
vextracti128 $0x1, %ymm5, %xmm1
vmovq %xmm1, %rdx
cmpq %rcx, %rdx
cmovleq %rcx, %rdx
vmovq %r11, %xmm9
vpextrq $0x1, %xmm1, %rax
cmpq %r13, %rax
cmovleq %r13, %rax
vmovq %xmm4, %r9
cmpq %r11, %r9
cmovlq %r9, %r11
vpextrq $0x1, %xmm4, %r9
vmovq %rdi, %xmm1
cmpq %rdi, %r9
cmovlq %r9, %rdi
vmovq %rcx, %xmm10
vextracti128 $0x1, %ymm4, %xmm4
vmovq %xmm4, %r9
cmpq %rcx, %r9
cmovlq %r9, %rcx
vpextrq $0x1, %xmm4, %r9
vmovq %r13, %xmm11
cmpq %r13, %r9
cmovlq %r9, %r13
movq 0x70(%rsp), %r9
cmpq %r9, %r11
cmovgeq %r9, %r11
movq 0x60(%rsp), %r9
cmpq %r9, %rdi
cmovgeq %r9, %rdi
movq 0x40(%rsp), %r9
cmpq %r9, %rcx
cmovgeq %r9, %rcx
cmpq %r10, %r13
cmovgeq %r10, %r13
vmovq %rax, %xmm0
vmovdqa %xmm0, 0x70(%rsp)
cmpq %r15, %r11
cmovgeq %r15, %r11
vmovq %rdx, %xmm5
movq 0x38(%rsp), %rax
vmovdqa (%rax,%rbx), %ymm13
vpunpcklqdq %xmm11, %xmm10, %xmm10 # xmm10 = xmm10[0],xmm11[0]
vpunpcklqdq %xmm1, %xmm9, %xmm1 # xmm1 = xmm9[0],xmm1[0]
vinserti128 $0x1, %xmm10, %ymm1, %ymm10
movq 0x48(%rsp), %rax
cmpq %rax, %rdi
cmovgeq %rax, %rdi
vmovq %rsi, %xmm0
vmovdqa %xmm0, 0x60(%rsp)
movq 0xf8(%rsp), %rax
cmpq %rax, %rcx
cmovgeq %rax, %rcx
vmovq %r8, %xmm9
cmpq %r14, %r13
cmovgeq %r14, %r13
vmovq %r13, %xmm4
movq 0x38(%rsp), %r13
vpsubq %ymm3, %ymm10, %ymm1
vpsubq %ymm14, %ymm13, %ymm15
vmovq %xmm15, %rsi
vmovq %xmm1, %rax
cmpq %rax, %rsi
cmovleq %rax, %rsi
vpextrq $0x1, %xmm15, %r9
vpextrq $0x1, %xmm1, %rdx
vmovq %rcx, %xmm13
cmpq %rdx, %r9
cmovleq %rdx, %r9
vmovq %rdi, %xmm11
vextracti128 $0x1, %ymm15, %xmm15
vmovq %xmm15, %rdi
vextracti128 $0x1, %ymm1, %xmm1
vmovq %xmm1, %rcx
cmpq %rcx, %rdi
cmovleq %rcx, %rdi
vpextrq $0x1, %xmm15, %r10
vpextrq $0x1, %xmm1, %r8
vmovq %r11, %xmm15
cmpq %r8, %r10
cmovleq %r8, %r10
vmovq %r9, %xmm1
vpsubq %ymm14, %ymm8, %ymm8
vmovq %xmm8, %r9
cmpq %rax, %r9
cmovgq %r9, %rax
vpextrq $0x1, %xmm8, %r9
vmovq %rsi, %xmm0
cmpq %rdx, %r9
cmovgq %r9, %rdx
vmovq %r10, %xmm7
vextracti128 $0x1, %ymm8, %xmm8
vmovq %xmm8, %rsi
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
vpextrq $0x1, %xmm8, %rsi
vmovq %rdi, %xmm8
movq 0x20(%rsp), %rdi
cmpq %r8, %rsi
cmovgq %rsi, %r8
vmovq %r8, %xmm6
vmovq %rcx, %xmm2
vmovdqa %ymm10, (%r12,%rbx)
vmovq %rdx, %xmm10
vmovq %rax, %xmm12
vpunpcklqdq 0x70(%rsp), %xmm5, %xmm5 # xmm5 = xmm5[0],mem[0]
vpunpcklqdq 0x60(%rsp), %xmm9, %xmm9 # xmm9 = xmm9[0],mem[0]
vinserti128 $0x1, %xmm5, %ymm9, %ymm5
vpunpcklqdq %xmm4, %xmm13, %xmm4 # xmm4 = xmm13[0],xmm4[0]
vpunpcklqdq %xmm11, %xmm15, %xmm9 # xmm9 = xmm15[0],xmm11[0]
vinserti128 $0x1, %xmm4, %ymm9, %ymm4
vpunpcklqdq %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0]
vpunpcklqdq %xmm7, %xmm8, %xmm1 # xmm1 = xmm8[0],xmm7[0]
vmovdqa %xmm1, 0x10(%r13,%rbx)
vmovdqa %xmm0, (%r13,%rbx)
vpunpcklqdq %xmm6, %xmm2, %xmm0 # xmm0 = xmm2[0],xmm6[0]
vpunpcklqdq %xmm10, %xmm12, %xmm1 # xmm1 = xmm12[0],xmm10[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm8
movq 0x30(%rsp), %rax
vmovdqa (%rax,%rbx), %ymm1
addq $0x20, %rbx
cmpq %rbx, %rdi
jne 0x538065
xorl %esi, %esi
movq 0xe8(%rsp), %rax
cmpl $0x0, 0x18(%rbp)
jne 0x538393
movq 0xa0(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
subq 0x98(%rsp), %rax
vpermq $0x90, %ymm8, %ymm0     # ymm0 = ymm8[0,0,1,2]
vmovq %rax, %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm8 # ymm8 = ymm1[0,1],ymm0[2,3,4,5,6,7]
movb $0x1, %cl
movl $0x1, %edi
xorl %r9d, %r9d
vmovq %xmm8, %rax
movq (%r12,%r9), %rdx
cmpq %rax, %rdx
cmovgq %rdx, %rax
vpextrq $0x1, %xmm8, %rdx
movq 0x8(%r12,%r9), %r8
cmpq %rdx, %r8
cmovgq %r8, %rdx
movq 0x10(%r12,%r9), %r10
vextracti128 $0x1, %ymm8, %xmm0
vmovq %xmm0, %r8
cmpq %r8, %r10
cmovgq %r10, %r8
vpextrq $0x1, %xmm0, %r10
movq 0x18(%r12,%r9), %r11
cmpq %r10, %r11
cmovgq %r11, %r10
vmovq %r10, %xmm0
vmovq %r8, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rdx, %xmm1
vmovq %rax, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm9
vmovdqa %ymm9, (%r12,%r9)
vmovq %xmm4, %r11
cmpq %rax, %r11
cmovgeq %rax, %r11
vpextrq $0x1, %xmm4, %rbx
cmpq %rdx, %rbx
cmovgeq %rdx, %rbx
vextracti128 $0x1, %ymm4, %xmm0
vmovq %xmm0, %r14
cmpq %r8, %r14
cmovgeq %r8, %r14
vpextrq $0x1, %xmm0, %r15
cmpq %r10, %r15
jl 0x53845a
movq %r10, %r15
vmovq %xmm5, %r13
cmpq %rax, %r13
cmovgq %r13, %rax
vpextrq $0x1, %xmm5, %r13
cmpq %rdx, %r13
cmovgq %r13, %rdx
vextracti128 $0x1, %ymm5, %xmm0
vmovq %xmm0, %r13
cmpq %r8, %r13
cmovgq %r13, %r8
vpextrq $0x1, %xmm0, %r13
cmpq %r10, %r13
jg 0x538493
movq %r10, %r13
vmovq %r15, %xmm0
vmovq %r14, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rbx, %xmm1
vmovq %r11, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm4
vmovq %r13, %xmm0
vmovq %r8, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rdx, %xmm1
vmovq %rax, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm5
vpsubq %ymm3, %ymm9, %ymm0
vpsubq %ymm14, %ymm8, %ymm8
vpcmpgtq %ymm0, %ymm8, %ymm0
vtestpd %ymm0, %ymm0
je 0x538506
cmpq 0x18(%rsp), %rdi
setb %cl
addq $0x20, %r9
incq %rdi
cmpq %r9, 0x20(%rsp)
jne 0x5383ae
testb $0x1, %cl
jne 0x538519
leal 0x1(%rsi), %eax
cmpl $0x3, %esi
movl %eax, %esi
jb 0x538368
movq 0xc0(%rsp), %rdi
vmovdqa (%r12,%rdi), %ymm8
vmovdqa 0x160(%rsp), %ymm1
vpcmpgtq %ymm1, %ymm8, %ymm0
movq (%r12,%rdi), %rcx
vmovq %xmm1, %rax
cmpq %rax, %rcx
cmovgq %rcx, %rax
vpextrq $0x1, %xmm1, %rcx
movq 0x8(%r12,%rdi), %rdx
cmpq %rcx, %rdx
cmovgq %rdx, %rcx
movq 0x10(%r12,%rdi), %rsi
vextracti128 $0x1, %ymm1, %xmm1
vmovq %xmm1, %rdx
cmpq %rdx, %rsi
cmovgq %rsi, %rdx
vpextrq $0x1, %xmm1, %rsi
movq 0x18(%r12,%rdi), %rdi
cmpq %rsi, %rdi
cmovgq %rdi, %rsi
vtestpd 0x140(%rsp), %ymm0
movl 0x5c(%rsp), %r11d
movq 0xa8(%rsp), %r8
cmovnel %r8d, %r11d
cmpl $0x2, 0x4(%rsp)
movq 0xd8(%rsp), %rbx
movq 0xa0(%rsp), %r10
jg 0x5385d2
movl 0x58(%rsp), %edi
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
vperm2i128 $0x8, %ymm8, %ymm8, %ymm0 # ymm0 = zero,zero,ymm8[0,1]
vpalignr $0x8, %ymm0, %ymm8, %ymm8 # ymm8 = ymm0[8,9,10,11,12,13,14,15],ymm8[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm8[16,17,18,19,20,21,22,23]
decl %edi
jne 0x5385c0
jmp 0x5385dc
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
vmovq %rsi, %xmm0
vmovq %rdx, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rcx, %xmm1
vmovq %rax, %xmm2
vextracti128 $0x1, %ymm8, %xmm6
movq 0x10(%rbx), %rax
movq (%rax), %rax
vpextrd $0x2, %xmm6, (%rax,%r8,4)
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm2
incq %r8
movq %r12, %r9
cmpq 0xc8(%rsp), %r8
jne 0x537fdc
movq 0x28(%rsp), %rax
cmpl $0x1, %eax
adcl $0x0, %eax
movq 0x18(%rsp), %rsi
leaq (,%rsi,4), %rcx
leaq (%rcx,%rcx,2), %rdx
leaq (,%rsi,8), %rsi
shlq $0x2, %rax
xorl %edi, %edi
movq 0x10(%rbx), %r8
movq 0x8(%r8), %r8
vmovdqa (%r12,%rdi,8), %xmm0
vmovdqa 0x10(%r12,%rdi,8), %xmm1
vmovd %xmm0, (%r8,%rdi)
addq %rdi, %r8
vpextrd $0x2, %xmm0, (%rcx,%r8)
vmovd %xmm1, (%rsi,%r8)
vpextrd $0x2, %xmm1, (%rdx,%r8)
addq $0x4, %rdi
cmpq %rdi, %rax
jne 0x538650
cmpl $0x0, 0x20(%rbp)
movl 0x54(%rsp), %r8d
je 0x5386ca
cmpl $0x2, 0x4(%rsp)
jg 0x5386bc
movl 0x14(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
vperm2i128 $0x8, %ymm2, %ymm2, %ymm0 # ymm0 = zero,zero,ymm2[0,1]
vpalignr $0x8, %ymm0, %ymm2, %ymm2 # ymm2 = ymm0[8,9,10,11,12,13,14,15],ymm2[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm2[16,17,18,19,20,21,22,23]
decl %eax
jne 0x5386ac
vextracti128 $0x1, %ymm2, %xmm0
vpextrq $0x1, %xmm0, 0x8(%rsp)
cmpl $0x0, 0x10(%rbp)
je 0x53873d
cmpl $0x0, 0xb8(%rsp)
je 0x53873d
movq 0x28(%rsp), %rcx
andl $0x1fffffff, %ecx       # imm = 0x1FFFFFFF
shll $0x2, %ecx
xorl %edx, %edx
movl %r8d, %eax
movl %edx, %edi
shrl $0x2, %edi
movl %edx, %esi
andl $0x3, %esi
imull 0x28(%rsp), %esi
addl %edi, %esi
cmpl 0x80(%rsp), %esi
jge 0x538734
movq (%r12,%rdx,8), %rdi
movq 0x8(%rsp), %r9
cmpq %r9, %rdi
jle 0x538722
movq %rdi, 0x8(%rsp)
movl (%rsp), %r11d
movl %esi, %eax
jmp 0x538734
cmpl %eax, %esi
cmovgel %eax, %esi
cmpl (%rsp), %r11d
cmovnel %eax, %esi
cmpq %r9, %rdi
cmovel %esi, %eax
incq %rdx
cmpl %edx, %ecx
jne 0x5386ed
jmp 0x538740
movl %r8d, %eax
movl 0x10(%rbp), %ecx
orl %ecx, 0x50(%rsp)
jne 0x538796
movq 0xb0(%rsp), %rax
shlq $0x5, %rax
vmovdqa (%r12,%rax), %ymm1
cmpl $0x2, 0x4(%rsp)
jg 0x538781
movl 0x14(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
vperm2i128 $0x8, %ymm1, %ymm1, %ymm0 # ymm0 = zero,zero,ymm1[0,1]
vpalignr $0x8, %ymm0, %ymm1, %ymm1 # ymm1 = ymm0[8,9,10,11,12,13,14,15],ymm1[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm1[16,17,18,19,20,21,22,23]
decl %eax
jne 0x538771
vextracti128 $0x1, %ymm1, %xmm0
vpextrq $0x1, %xmm0, 0x8(%rsp)
movl (%rsp), %r11d
movl %r8d, %eax
vmovdqa 0x100(%rsp), %ymm0
vpcmpgtq %ymm4, %ymm0, %ymm0
vpcmpgtq 0x120(%rsp), %ymm5, %ymm1
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
je 0x5387cb
orb $0x40, 0xc(%rbx)
movq $0x0, 0x8(%rsp)
xorl %r11d, %r11d
xorl %eax, %eax
movq 0x8(%rsp), %rcx
movl %ecx, (%rbx)
movl %eax, 0x4(%rbx)
movl %r11d, 0x8(%rbx)
movq %r10, %rdi
vzeroupper
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
jmp 0x538836
callq 0x1f19e3
jmp 0x538834
callq 0x1f19bd
jmp 0x538834
callq 0x1f1997
jmp 0x538834
callq 0x1f1971
jmp 0x538834
callq 0x1f194b
jmp 0x538834
callq 0x1f1925
jmp 0x538834
callq 0x1f18ff
jmp 0x538834
callq 0x1f18d9
xorl %ebx, %ebx
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq