// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_trace_striped_avx2_256_64.c
// Function: parasail_nw_trace_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)
{
    /* 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;
    __m256i* restrict pvEaStore = NULL;
    __m256i* restrict pvEaLoad = NULL;
    __m256i* restrict pvHT = 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;
    parasail_result_t *result = NULL;
    __m256i vTIns;
    __m256i vTDel;
    __m256i vTDiag;
    __m256i vTDiagE;
    __m256i vTInsE;
    __m256i vTDiagF;
    __m256i vTDelF;
    __m256i vTMask;
    __m256i vFTMask;

    /* 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;
    vTIns  = _mm256_set1_epi64x_rpl(PARASAIL_INS);
    vTDel  = _mm256_set1_epi64x_rpl(PARASAIL_DEL);
    vTDiag = _mm256_set1_epi64x_rpl(PARASAIL_DIAG);
    vTDiagE = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_E);
    vTInsE = _mm256_set1_epi64x_rpl(PARASAIL_INS_E);
    vTDiagF = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_F);
    vTDelF = _mm256_set1_epi64x_rpl(PARASAIL_DEL_F);
    vTMask = _mm256_set1_epi64x_rpl(PARASAIL_ZERO_MASK);
    vFTMask = _mm256_set1_epi64x_rpl(PARASAIL_F_MASK);

    /* initialize result */
    result = parasail_result_new_trace(segLen, s2Len, 32, sizeof(__m256i));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_4;

    /* initialize heap variables */
    pvHStore = parasail_memalign___m256i(32, segLen);
    pvHLoad = parasail_memalign___m256i(32, segLen);
    pvE = parasail_memalign___m256i(32, segLen);
    pvEaStore = parasail_memalign___m256i(32, segLen);
    pvEaLoad = parasail_memalign___m256i(32, segLen);
    pvHT = 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 (!pvEaStore) return NULL;
    if (!pvEaLoad) return NULL;
    if (!pvHT) 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 = -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);
            _mm256_store_si256(&pvEaStore[index], e.m);
            ++index;
        }
    }

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

    for (i=0; i<segLen; ++i) {
        arr_store(result->trace->trace_table, vTDiagE, i, segLen, 0);
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m256i vEF_opn;
        __m256i vE;
        __m256i vE_ext;
        __m256i vF;
        __m256i vF_ext;
        __m256i vFa;
        __m256i vFa_ext;
        __m256i vH;
        __m256i vH_dag;
        const __m256i* vP = NULL;

        /* Initialize F value to -inf.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        vF = vNegLimit;

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

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

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

        /* Swap the 2 H buffers. */
        SWAP(pvHLoad, pvHStore)
        SWAP(pvEaLoad, pvEaStore)

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

            /* Get max from vH, vE and vF. */
            vH_dag = _mm256_add_epi64(vH, _mm256_load_si256(vP + i));
            vH = _mm256_max_epi64_rpl(vH_dag, 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);

            {
                __m256i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m256i case1 = _mm256_cmpeq_epi64(vH, vH_dag);
                __m256i case2 = _mm256_cmpeq_epi64(vH, vF);
                __m256i vT = _mm256_blendv_epi8(
                        _mm256_blendv_epi8(vTIns, vTDel, case2),
                        vTDiag, case1);
                _mm256_store_si256(pvHT + i, vT);
                vT = _mm256_or_si256(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i, segLen, j);
            }

            vEF_opn = _mm256_sub_epi64(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm256_sub_epi64(vE, vGapE);
            vE = _mm256_max_epi64_rpl(vEF_opn, vE_ext);
            _mm256_store_si256(pvE + i, vE);
            {
                __m256i vEa = _mm256_load_si256(pvEaLoad + i);
                __m256i vEa_ext = _mm256_sub_epi64(vEa, vGapE);
                vEa = _mm256_max_epi64_rpl(vEF_opn, vEa_ext);
                _mm256_store_si256(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m256i cond = _mm256_cmpgt_epi64(vEF_opn, vEa_ext);
                    __m256i vT = _mm256_blendv_epi8(vTInsE, vTDiagE, cond);
                    arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                }
            }

            /* Update vF value. */
            vF_ext = _mm256_sub_epi64(vF, vGapE);
            vF = _mm256_max_epi64_rpl(vEF_opn, vF_ext);
            if (i+1<segLen) {
                __m256i vTAll = arr_load(result->trace->trace_table, i+1, segLen, j);
                __m256i cond = _mm256_cmpgt_epi64(vEF_opn, vF_ext);
                __m256i vT = _mm256_blendv_epi8(vTDelF, vTDiagF, cond);
                vT = _mm256_or_si256(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i+1, segLen, j);
            }

            /* 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 */
        vFa_ext = vF_ext;
        vFa = vF;
        for (k=0; k<segWidth; ++k) {
            int64_t tmp = boundary[j+1]-open;
            int64_t tmp2 = tmp < INT64_MIN ? INT64_MIN : tmp;
            __m256i vHp = _mm256_load_si256(&pvHLoad[segLen - 1]);
            vHp = _mm256_slli_si256_rpl(vHp, 8);
            vHp = _mm256_insert_epi64_rpl(vHp, boundary[j], 0);
            vEF_opn = _mm256_slli_si256_rpl(vEF_opn, 8);
            vEF_opn = _mm256_insert_epi64_rpl(vEF_opn, tmp2, 0);
            vF_ext = _mm256_slli_si256_rpl(vF_ext, 8);
            vF_ext = _mm256_insert_epi64_rpl(vF_ext, NEG_LIMIT, 0);
            vF = _mm256_slli_si256_rpl(vF, 8);
            vF = _mm256_insert_epi64_rpl(vF, tmp2, 0);
            vFa_ext = _mm256_slli_si256_rpl(vFa_ext, 8);
            vFa_ext = _mm256_insert_epi64_rpl(vFa_ext, NEG_LIMIT, 0);
            vFa = _mm256_slli_si256_rpl(vFa, 8);
            vFa = _mm256_insert_epi64_rpl(vFa, 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);
                {
                    __m256i vTAll;
                    __m256i vT;
                    __m256i case1;
                    __m256i case2;
                    __m256i cond;
                    vHp = _mm256_add_epi64(vHp, _mm256_load_si256(vP + i));
                    case1 = _mm256_cmpeq_epi64(vH, vHp);
                    case2 = _mm256_cmpeq_epi64(vH, vF);
                    cond = _mm256_andnot_si256(case1,case2);
                    vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    vT = _mm256_load_si256(pvHT + i);
                    vT = _mm256_blendv_epi8(vT, vTDel, cond);
                    _mm256_store_si256(pvHT + i, vT);
                    vTAll = _mm256_and_si256(vTAll, vTMask);
                    vTAll = _mm256_or_si256(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                /* Update vF value. */
                {
                    __m256i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    __m256i cond = _mm256_cmpgt_epi64(vEF_opn, vFa_ext);
                    __m256i vT = _mm256_blendv_epi8(vTDelF, vTDiagF, cond);
                    vTAll = _mm256_and_si256(vTAll, vFTMask);
                    vTAll = _mm256_or_si256(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                vEF_opn = _mm256_sub_epi64(vH, vGapO);
                vF_ext = _mm256_sub_epi64(vF, vGapE);
                {
                    __m256i vEa = _mm256_load_si256(pvEaLoad + i);
                    __m256i vEa_ext = _mm256_sub_epi64(vEa, vGapE);
                    vEa = _mm256_max_epi64_rpl(vEF_opn, vEa_ext);
                    _mm256_store_si256(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m256i cond = _mm256_cmpgt_epi64(vEF_opn, vEa_ext);
                        __m256i vT = _mm256_blendv_epi8(vTInsE, vTDiagE, cond);
                        arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                    }
                }
                if (! _mm256_movemask_epi8(
                            _mm256_or_si256(
                                _mm256_cmpgt_epi64(vF_ext, vEF_opn),
                                _mm256_cmpeq_epi64(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm256_max_epi64_rpl(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm256_sub_epi64(vFa, vGapE);
                vFa = _mm256_max_epi64_rpl(vEF_opn, vFa_ext);
                vHp = _mm256_load_si256(pvHLoad + i);
            }
        }
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);
    }

    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(pvHT);
    parasail_free(pvEaLoad);
    parasail_free(pvEaStore);
    parasail_free(pvE);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, 0x58(%rsp)
testq %rdi, %rdi
je 0x5bee74
movq 0x60(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x5bee7b
movq 0x10(%rdi), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x5bee82
movl 0x8(%rdi), %esi
testl %esi, %esi
jle 0x5bee89
cmpq $0x0, 0x58(%rsp)
je 0x5bee90
movl %edx, %r12d
testl %edx, %edx
jle 0x5bee97
movl %ecx, %r13d
testl %ecx, %ecx
js 0x5bee9e
testl %r8d, %r8d
js 0x5beea5
movl %r8d, 0xc0(%rsp)
leal -0x1(%rsi), %r14d
addq $0x3, %rsi
shrq $0x2, %rsi
movl %r14d, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r15d
movl %edx, 0x4c(%rsp)
movl %r13d, %ecx
negl %r13d
movq 0x50(%rsp), %rdx
movslq 0x20(%rdx), %rax
movq %rcx, 0x60(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
subq %rax, %rbp
cmpl %r13d, %eax
cmovgq %rcx, %rbp
movslq 0x1c(%rdx), %rax
movq %rax, 0x80(%rsp)
movl $0x20, %edx
movl $0x20, %ecx
movq %rsi, %rdi
movq %rsi, 0x18(%rsp)
movl %r12d, %esi
callq 0x20adf4
testq %rax, %rax
je 0x5beeaa
movq %rax, %rbx
movl %r13d, 0x20(%rsp)
movl %r15d, 0x14(%rsp)
movl %r14d, 0x48(%rsp)
orl $0x4880801, 0xc(%rax)   # imm = 0x4880801
movl $0x20, %edi
movq 0x18(%rsp), %r14
movq %r14, %rsi
callq 0x4f1904
movq %rax, 0x30(%rsp)
movl $0x20, %edi
movq %r14, %rsi
callq 0x4f1904
movq %rax, %r15
movl $0x20, %edi
movq %r14, %rsi
callq 0x4f1904
movq %rax, 0x38(%rsp)
movl $0x20, %edi
movq %r14, %rsi
callq 0x4f1904
movq %rax, 0x28(%rsp)
movl $0x20, %edi
movq %r14, %rsi
callq 0x4f1904
movq %rax, %r13
movl $0x20, %edi
movq %r14, %rsi
callq 0x4f1904
movq %rax, %r14
leal 0x1(%r12), %esi
movl $0x20, %edi
callq 0x20a636
movq 0x28(%rsp), %r10
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %rsi
testq %r8, %r8
sete %dl
testq %r15, %r15
sete %cl
orb %dl, %cl
testq %rsi, %rsi
sete %dil
testq %r10, %r10
sete %dl
orb %dil, %dl
orb %cl, %dl
movq %r13, 0x8(%rsp)
testq %r13, %r13
movq %rax, %r13
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
testq %r13, %r13
sete %al
orb %cl, %al
orb %dl, %al
testb $0x1, %al
jne 0x5beeaa
leal -0x1(%r12), %eax
movl %eax, 0x10(%rsp)
movl $0x3, %eax
subl 0x14(%rsp), %eax
movl %eax, 0x44(%rsp)
vmovq 0x60(%rsp), %xmm0
vpbroadcastq %xmm0, %ymm2
movl 0xc0(%rsp), %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm3
incq %rbp
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
subq 0x80(%rsp), %rcx
addq $-0x2, %rcx
vmovq %rbp, %xmm0
vmovdqu %ymm0, 0x100(%rsp)
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0xa0(%rsp)
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm14
movslq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdi
vmovd %edi, %xmm0
vpbroadcastd %xmm0, %ymm4
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovq %rcx, %xmm1
vpbroadcastq %xmm1, %ymm1
vpmuldq 0x6f298(%rip), %ymm4, %ymm4 # 0x62db40
xorl %eax, %eax
movq %r8, %rcx
movq %rsi, %rdx
movq %r10, %rsi
vmovq %rax, %xmm5
vpbroadcastq %xmm5, %ymm5
vpaddq %ymm5, %ymm4, %ymm5
vpmuludq %ymm0, %ymm5, %ymm6
vpsrlq $0x20, %ymm5, %ymm5
vpmuludq %ymm0, %ymm5, %ymm5
vpsllq $0x20, %ymm5, %ymm5
vpaddq %ymm5, %ymm6, %ymm5
vpsubq %ymm5, %ymm1, %ymm5
vpsubq %ymm2, %ymm5, %ymm6
vmovdqa %ymm5, (%rcx)
vmovdqa %ymm6, (%rdx)
vmovdqa %ymm6, (%rsi)
incq %rax
addq $0x20, %rsi
addq $0x20, %rdx
addq $0x20, %rcx
cmpq %rax, %rdi
jne 0x5be8b3
movq $0x0, (%r13)
movl %r12d, %esi
addl $0x3, %r12d
andl $-0x4, %r12d
leaq -0x1(%rsi), %rax
vmovq %rax, %xmm4
vpbroadcastq %xmm4, %ymm5
vpmovsxbq 0x6d533(%rip), %ymm4 # 0x62be5c
xorl %eax, %eax
vpmovsxbq 0x6d454(%rip), %ymm6 # 0x62bd88
vpbroadcastq 0x6f243(%rip), %ymm7 # 0x62db80
vpxor %ymm7, %ymm5, %ymm8
vpcmpeqd %ymm9, %ymm9, %ymm9
vpbroadcastq 0x6f239(%rip), %ymm12 # 0x62db88
vmovq %rax, %xmm5
vpbroadcastq %xmm5, %ymm5
vpor %ymm6, %ymm5, %ymm5
vpxor %ymm7, %ymm5, %ymm5
vpcmpgtq %ymm8, %ymm5, %ymm5
vpxor %ymm5, %ymm9, %ymm5
vpaddq %ymm4, %ymm9, %ymm10
vpmuludq %ymm0, %ymm10, %ymm11
vpsrlq $0x20, %ymm10, %ymm10
vpmuludq %ymm0, %ymm10, %ymm10
vpsllq $0x20, %ymm10, %ymm10
vpaddq %ymm10, %ymm11, %ymm10
vpsubq %ymm10, %ymm1, %ymm10
vpmaskmovq %ymm10, %ymm5, 0x8(%r13,%rax,8)
addq $0x4, %rax
vpaddq %ymm4, %ymm12, %ymm4
cmpq %rax, %r12
jne 0x5be94f
vmovdqu %ymm12, 0xc0(%rsp)
shlq $0x5, %rdi
xorl %eax, %eax
vbroadcastsd 0x712f0(%rip), %ymm0 # 0x62fca8
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
vmovapd %ymm0, (%rcx,%rax)
addq $0x20, %rax
cmpq %rax, %rdi
jne 0x5be9b8
vmovupd %ymm0, 0x80(%rsp)
movq 0x18(%rsp), %rax
leal -0x1(%rax), %ecx
xorl %r9d, %r9d
shlq $0x5, %rcx
movq %rcx, 0x20(%rsp)
movl %eax, %eax
movq %rax, 0x68(%rsp)
vpbroadcastq 0x712ce(%rip), %ymm9 # 0x62fcc8
vbroadcastsd 0x71555(%rip), %ymm10 # 0x62ff58
vbroadcastsd 0x712ac(%rip), %ymm11 # 0x62fcb8
vbroadcastsd 0x712ab(%rip), %ymm12 # 0x62fcc0
vbroadcastsd 0x71542(%rip), %ymm13 # 0x62ff60
movq %rdi, %r11
xorl %ecx, %ecx
vmovdqu %ymm14, 0xe0(%rsp)
vmovdqa %ymm14, %ymm8
vmovdqu 0xa0(%rsp), %ymm7
movq %r13, 0x70(%rsp)
movq 0x8(%rsp), %rbp
movq %r10, 0x8(%rsp)
movq %r15, %r12
movq %r8, %r15
movq %rcx, %r10
movq 0x20(%rsp), %rax
leaq (%r8,%rax), %rcx
movq %rcx, 0x28(%rsp)
vmovdqa (%r8,%rax), %ymm0
vinserti128 $0x1, %xmm0, %ymm0, %ymm1
vpalignr $0x8, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[8,9,10,11,12,13,14,15],ymm0[0,1,2,3,4,5,6,7],ymm1[24,25,26,27,28,29,30,31],ymm0[16,17,18,19,20,21,22,23]
vmovq (%r13,%r10,8), %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm14 # ymm14 = ymm1[0,1],ymm0[2,3,4,5,6,7]
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x58(%rsp), %rax
movzbl (%rax,%r10), %edx
movslq (%rcx,%rdx,4), %r8
imulq 0x68(%rsp), %r8
shlq $0x5, %r8
addq 0x78(%rsp), %r8
movq %r10, 0x30(%rsp)
leaq 0x1(%r10), %rcx
movl $0x1, %r10d
xorl %edx, %edx
vmovdqu 0xa0(%rsp), %ymm0
movq %r15, %r13
vpaddq (%r8,%rdx), %ymm14, %ymm1
movq 0x38(%rsp), %r15
vmovdqa (%r15,%rdx), %ymm15
vpcmpgtq %ymm15, %ymm1, %ymm4
vblendvpd %ymm4, %ymm1, %ymm15, %ymm4
vpcmpgtq %ymm0, %ymm4, %ymm5
vblendvpd %ymm5, %ymm4, %ymm0, %ymm14
vmovapd %ymm14, (%r12,%rdx)
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r9, %rax
vpcmpeqq %ymm1, %ymm14, %ymm1
vpaddq %ymm5, %ymm9, %ymm4
vblendvpd %ymm1, 0xc0(%rsp), %ymm4, %ymm1
vorpd (%rdx,%rax), %ymm1, %ymm4
vmovapd %ymm1, (%r14,%rdx)
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r9, %rax
vmovapd %ymm4, (%rdx,%rax)
vpsubq %ymm2, %ymm14, %ymm1
vpsubq %ymm3, %ymm15, %ymm4
vpcmpgtq %ymm4, %ymm1, %ymm5
vblendvpd %ymm5, %ymm1, %ymm4, %ymm4
vmovapd %ymm4, (%r15,%rdx)
movq 0x8(%rsp), %rax
vmovdqa (%rax,%rdx), %ymm4
vpsubq %ymm3, %ymm4, %ymm5
vpcmpgtq %ymm5, %ymm1, %ymm4
vblendvpd %ymm4, %ymm1, %ymm5, %ymm5
vmovapd %ymm5, (%rbp,%rdx)
cmpq %rsi, %rcx
jae 0x5beb87
vbroadcastsd 0x71143(%rip), %ymm5 # 0x62fcb0
vblendvpd %ymm4, 0x80(%rsp), %ymm5, %ymm4
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r11, %rax
vmovapd %ymm4, (%rdx,%rax)
vpsubq %ymm3, %ymm0, %ymm4
vpcmpgtq %ymm4, %ymm1, %ymm5
cmpq 0x18(%rsp), %r10
movq %r13, %r15
jae 0x5bebb6
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r9, %rax
vblendvpd %ymm5, %ymm11, %ymm12, %ymm6
vorpd 0x20(%rdx,%rax), %ymm6, %ymm6
vmovapd %ymm6, 0x20(%rdx,%rax)
vpcmpgtq %ymm14, %ymm7, %ymm6
vblendvpd %ymm6, %ymm7, %ymm14, %ymm7
vpcmpgtq %ymm8, %ymm14, %ymm6
vblendvpd %ymm6, %ymm8, %ymm14, %ymm6
vpcmpgtq %ymm6, %ymm15, %ymm8
vblendvpd %ymm8, %ymm6, %ymm15, %ymm6
vpcmpgtq %ymm6, %ymm0, %ymm8
vblendvpd %ymm8, %ymm6, %ymm0, %ymm8
vblendvpd %ymm5, %ymm1, %ymm4, %ymm0
vmovdqa (%r15,%rdx), %ymm14
addq $0x20, %rdx
incq %r10
cmpq %rdx, %rdi
jne 0x5beabf
xorl %r10d, %r10d
vmovapd %ymm0, %ymm15
movq 0x70(%rsp), %r13
movq (%r13,%rcx,8), %rax
subq 0x60(%rsp), %rax
movq 0x28(%rsp), %rdx
vmovapd (%rdx), %ymm5
vinsertf128 $0x1, %xmm5, %ymm0, %ymm6
vpalignr $0x8, %ymm6, %ymm5, %ymm5 # ymm5 = ymm6[8,9,10,11,12,13,14,15],ymm5[0,1,2,3,4,5,6,7],ymm6[24,25,26,27,28,29,30,31],ymm5[16,17,18,19,20,21,22,23]
movq 0x30(%rsp), %rdx
vmovq (%r13,%rdx,8), %xmm6
vpblendd $0x3, %ymm6, %ymm5, %ymm14 # ymm14 = ymm6[0,1],ymm5[2,3,4,5,6,7]
vpermq $0x90, %ymm1, %ymm1     # ymm1 = ymm1[0,0,1,2]
vmovq %rax, %xmm5
vpblendd $0x3, %ymm5, %ymm1, %ymm1 # ymm1 = ymm5[0,1],ymm1[2,3,4,5,6,7]
vpermpd $0x90, %ymm15, %ymm6    # ymm6 = ymm15[0,0,1,2]
vblendpd $0x1, %ymm5, %ymm6, %ymm15 # ymm15 = ymm5[0],ymm6[1,2,3]
vpermq $0x90, %ymm4, %ymm4     # ymm4 = ymm4[0,0,1,2]
vpblendd $0x3, 0x100(%rsp), %ymm4, %ymm4 # ymm4 = mem[0,1],ymm4[2,3,4,5,6,7]
vpermpd $0x90, %ymm0, %ymm0     # ymm0 = ymm0[0,0,1,2]
vblendpd $0x1, %ymm5, %ymm0, %ymm0 # ymm0 = ymm5[0],ymm0[1,2,3]
xorl %edx, %edx
vpcmpgtq %ymm4, %ymm1, %ymm1
vmovdqa (%r12,%rdx), %ymm4
vpcmpgtq %ymm15, %ymm4, %ymm5
vblendvpd %ymm5, %ymm4, %ymm15, %ymm4
vmovapd %ymm4, (%r12,%rdx)
vpaddq (%r8,%rdx), %ymm14, %ymm6
vpcmpeqq %ymm6, %ymm4, %ymm6
vpor %ymm5, %ymm6, %ymm5
movq 0x10(%rbx), %rax
vblendvpd %ymm5, (%r14,%rdx), %ymm9, %ymm5
movq (%rax), %rax
addq %r9, %rax
vandpd (%rdx,%rax), %ymm10, %ymm6
vmovapd %ymm5, (%r14,%rdx)
vorpd %ymm6, %ymm5, %ymm5
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r9, %rax
vmovapd %ymm5, (%rdx,%rax)
movq 0x10(%rbx), %rax
movq (%rax), %rax
vblendvpd %ymm1, %ymm11, %ymm12, %ymm1
addq %r9, %rax
vandpd (%rdx,%rax), %ymm13, %ymm5
vorpd %ymm1, %ymm5, %ymm1
vmovapd %ymm1, (%rdx,%rax)
vpsubq %ymm2, %ymm4, %ymm1
movq 0x8(%rsp), %rax
vmovdqa (%rax,%rdx), %ymm5
vpsubq %ymm3, %ymm5, %ymm6
vpcmpgtq %ymm6, %ymm1, %ymm5
vblendvpd %ymm5, %ymm1, %ymm6, %ymm6
vmovapd %ymm6, (%rbp,%rdx)
cmpq %rsi, %rcx
jae 0x5bed3a
vbroadcastsd 0x70f90(%rip), %ymm6 # 0x62fcb0
vblendvpd %ymm5, 0x80(%rsp), %ymm6, %ymm5
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %r11, %rax
vmovapd %ymm5, (%rdx,%rax)
vpcmpgtq %ymm8, %ymm4, %ymm5
vblendvpd %ymm5, %ymm8, %ymm4, %ymm8
vpcmpgtq %ymm4, %ymm7, %ymm5
vblendvpd %ymm5, %ymm7, %ymm4, %ymm7
vpsubq %ymm3, %ymm15, %ymm15
vpcmpgtq %ymm15, %ymm1, %ymm4
vtestpd 0x6f4fe(%rip), %ymm4    # 0x62e260
jb 0x5bed93
vpsubq %ymm3, %ymm0, %ymm4
vpcmpgtq %ymm4, %ymm1, %ymm0
vblendvpd %ymm0, %ymm1, %ymm4, %ymm0
vmovdqa (%r15,%rdx), %ymm14
addq $0x20, %rdx
cmpq %rdx, %rdi
jne 0x5bec77
incl %r10d
cmpl $0x4, %r10d
jne 0x5bec0a
addq %rdi, %r11
addq %rdi, %r9
movq %r12, %r8
movq %rbp, %r10
cmpq %rsi, %rcx
jne 0x5bea3f
movl 0x4c(%rsp), %eax
shlq $0x5, %rax
vmovdqa (%r12,%rax), %ymm0
cmpl $0x2, 0x14(%rsp)
jg 0x5bede4
xorl %eax, %eax
movl 0x10(%rsp), %edx
movl 0x44(%rsp), %ecx
vmovdqu 0xe0(%rsp), %ymm2
vperm2i128 $0x8, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0x8, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[8,9,10,11,12,13,14,15],ymm0[0,1,2,3,4,5,6,7],ymm1[24,25,26,27,28,29,30,31],ymm0[16,17,18,19,20,21,22,23]
incl %eax
cmpl %ecx, %eax
jl 0x5bedd0
jmp 0x5bedf1
movl 0x10(%rsp), %edx
vmovdqu 0xe0(%rsp), %ymm2
vmovdqu 0xa0(%rsp), %ymm1
vpcmpgtq %ymm8, %ymm1, %ymm1
vpcmpgtq %ymm2, %ymm7, %ymm2
vpor %ymm2, %ymm1, %ymm1
vtestpd %ymm1, %ymm1
je 0x5bee1b
orb $0x40, 0xc(%rbx)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x5bee2b
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %rax
movl 0x48(%rsp), %ecx
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
movl %edx, 0x8(%rbx)
movq %r13, %rdi
vzeroupper
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq 0x8(%rsp), %rdi
callq 0x20a60d
movq %rbp, %rdi
callq 0x20a60d
movq 0x38(%rsp), %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
jmp 0x5beeac
callq 0x1f9fc9
jmp 0x5beeaa
callq 0x1f9fa3
jmp 0x5beeaa
callq 0x1f9f7d
jmp 0x5beeaa
callq 0x1f9f57
jmp 0x5beeaa
callq 0x1f9f31
jmp 0x5beeaa
callq 0x1f9f0b
jmp 0x5beeaa
callq 0x1f9ee5
jmp 0x5beeaa
callq 0x1f9ebf
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)