// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_trace_striped_avx2_256_32.c
// Function: parasail_nw_trace_striped_profile_avx2_256_32
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;
    int32_t* restrict boundary = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    int32_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->profile32.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 = 8; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m256i*)profile->profile32.score;
    vGapO = _mm256_set1_epi32(open);
    vGapE = _mm256_set1_epi32(gap);
    NEG_LIMIT = (-open < matrix->min ? INT32_MIN + open : INT32_MIN - matrix->min) + 1;
    POS_LIMIT = INT32_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm256_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vTIns  = _mm256_set1_epi32(PARASAIL_INS);
    vTDel  = _mm256_set1_epi32(PARASAIL_DEL);
    vTDiag = _mm256_set1_epi32(PARASAIL_DIAG);
    vTDiagE = _mm256_set1_epi32(PARASAIL_DIAG_E);
    vTInsE = _mm256_set1_epi32(PARASAIL_INS_E);
    vTDiagF = _mm256_set1_epi32(PARASAIL_DIAG_F);
    vTDelF = _mm256_set1_epi32(PARASAIL_DEL_F);
    vTMask = _mm256_set1_epi32(PARASAIL_ZERO_MASK);
    vFTMask = _mm256_set1_epi32(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_32 | PARASAIL_FLAG_LANES_8;

    /* 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_int32_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_32_t h;
            __m256i_32_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT32_MIN ? INT32_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT32_MIN ? INT32_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 < INT32_MIN ? INT32_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 4 bytes */
        vH = _mm256_load_si256(&pvHStore[segLen - 1]);
        vH = _mm256_slli_si256_rpl(vH, 4);

        /* insert upper boundary condition */
        vH = _mm256_insert_epi32_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_epi32(vH, _mm256_load_si256(vP + i));
            vH = _mm256_max_epi32(vH_dag, vE);
            vH = _mm256_max_epi32(vH, vF);
            /* Save vH values. */
            _mm256_store_si256(pvHStore + i, vH);
            vSaturationCheckMax = _mm256_max_epi32(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm256_min_epi32(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm256_min_epi32(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm256_min_epi32(vSaturationCheckMin, vF);

            {
                __m256i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m256i case1 = _mm256_cmpeq_epi32(vH, vH_dag);
                __m256i case2 = _mm256_cmpeq_epi32(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_epi32(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm256_sub_epi32(vE, vGapE);
            vE = _mm256_max_epi32(vEF_opn, vE_ext);
            _mm256_store_si256(pvE + i, vE);
            {
                __m256i vEa = _mm256_load_si256(pvEaLoad + i);
                __m256i vEa_ext = _mm256_sub_epi32(vEa, vGapE);
                vEa = _mm256_max_epi32(vEF_opn, vEa_ext);
                _mm256_store_si256(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m256i cond = _mm256_cmpgt_epi32(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_epi32(vF, vGapE);
            vF = _mm256_max_epi32(vEF_opn, vF_ext);
            if (i+1<segLen) {
                __m256i vTAll = arr_load(result->trace->trace_table, i+1, segLen, j);
                __m256i cond = _mm256_cmpgt_epi32(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;
            int32_t tmp2 = tmp < INT32_MIN ? INT32_MIN : tmp;
            __m256i vHp = _mm256_load_si256(&pvHLoad[segLen - 1]);
            vHp = _mm256_slli_si256_rpl(vHp, 4);
            vHp = _mm256_insert_epi32_rpl(vHp, boundary[j], 0);
            vEF_opn = _mm256_slli_si256_rpl(vEF_opn, 4);
            vEF_opn = _mm256_insert_epi32_rpl(vEF_opn, tmp2, 0);
            vF_ext = _mm256_slli_si256_rpl(vF_ext, 4);
            vF_ext = _mm256_insert_epi32_rpl(vF_ext, NEG_LIMIT, 0);
            vF = _mm256_slli_si256_rpl(vF, 4);
            vF = _mm256_insert_epi32_rpl(vF, tmp2, 0);
            vFa_ext = _mm256_slli_si256_rpl(vFa_ext, 4);
            vFa_ext = _mm256_insert_epi32_rpl(vFa_ext, NEG_LIMIT, 0);
            vFa = _mm256_slli_si256_rpl(vFa, 4);
            vFa = _mm256_insert_epi32_rpl(vFa, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm256_load_si256(pvHStore + i);
                vH = _mm256_max_epi32(vH,vF);
                _mm256_store_si256(pvHStore + i, vH);
                vSaturationCheckMin = _mm256_min_epi32(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm256_max_epi32(vSaturationCheckMax, vH);
                {
                    __m256i vTAll;
                    __m256i vT;
                    __m256i case1;
                    __m256i case2;
                    __m256i cond;
                    vHp = _mm256_add_epi32(vHp, _mm256_load_si256(vP + i));
                    case1 = _mm256_cmpeq_epi32(vH, vHp);
                    case2 = _mm256_cmpeq_epi32(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_epi32(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_epi32(vH, vGapO);
                vF_ext = _mm256_sub_epi32(vF, vGapE);
                {
                    __m256i vEa = _mm256_load_si256(pvEaLoad + i);
                    __m256i vEa_ext = _mm256_sub_epi32(vEa, vGapE);
                    vEa = _mm256_max_epi32(vEF_opn, vEa_ext);
                    _mm256_store_si256(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m256i cond = _mm256_cmpgt_epi32(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_epi32(vF_ext, vEF_opn),
                                _mm256_cmpeq_epi32(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm256_max_epi32(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm256_sub_epi32(vFa, vGapE);
                vFa = _mm256_max_epi32(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, 4);
        }
        score = (int32_t) _mm256_extract_epi32_rpl (vH, 7);
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi32_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi32(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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x20, %rsp
subq $0x200, %rsp            # imm = 0x200
movl %ecx, 0xc(%rsp)
movq %rsi, 0x78(%rsp)
testq %rdi, %rdi
je 0x58f426
movq 0x48(%rdi), %rax
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0x58f42d
movq 0x10(%rdi), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x58f434
movl 0x8(%rdi), %edi
testl %edi, %edi
jle 0x58f43b
cmpq $0x0, 0x78(%rsp)
je 0x58f442
movl %r8d, %r12d
movl %edx, %r8d
testl %edx, %edx
jle 0x58f449
cmpl $0x0, 0xc(%rsp)
js 0x58f450
testl %r12d, %r12d
js 0x58f457
leal -0x1(%rdi), %r14d
addq $0x7, %rdi
shrq $0x3, %rdi
movq %rdi, 0xc0(%rsp)
movl %r14d, %eax
cltd
idivl %edi
movl %eax, %r15d
movl %edx, 0x64(%rsp)
movl 0xc(%rsp), %ecx
movl %ecx, %r13d
negl %r13d
movq 0x70(%rsp), %rdx
movl 0x20(%rdx), %eax
movl $0x80000000, %esi       # imm = 0x80000000
orl %esi, %ecx
subl %eax, %esi
cmpl %r13d, %eax
cmovgl %ecx, %esi
movl %esi, 0x20(%rsp)
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %eax
movl %eax, 0xe0(%rsp)
movl $0x20, %edx
movl $0x20, %ecx
movl %r8d, %esi
movq %r8, 0xa0(%rsp)
callq 0x2097d1
testq %rax, %rax
je 0x58f45c
movq %rax, %rbx
movl %r15d, 0x34(%rsp)
movl %r14d, 0x60(%rsp)
orl $0x8480801, 0xc(%rax)   # imm = 0x8480801
movl $0x20, %edi
movq 0xc0(%rsp), %r15
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, 0x48(%rsp)
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, %r14
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, 0x68(%rsp)
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, 0x10(%rsp)
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, 0x18(%rsp)
movl $0x20, %edi
movq %r15, %rsi
callq 0x4c5e3c
movq %rax, %r15
movq 0xa0(%rsp), %rax
leal 0x1(%rax), %esi
movl $0x20, %edi
movq %rsi, 0x40(%rsp)
callq 0x2094d5
movq 0x48(%rsp), %r11
testq %r11, %r11
sete %dl
movq %r14, 0x28(%rsp)
testq %r14, %r14
movq 0x68(%rsp), %r14
sete %cl
orb %dl, %cl
testq %r14, %r14
sete %sil
cmpq $0x0, 0x10(%rsp)
sete %dl
orb %sil, %dl
orb %cl, %dl
cmpq $0x0, 0x18(%rsp)
sete %sil
testq %r15, %r15
sete %cl
orb %sil, %cl
testq %rax, %rax
sete %sil
orb %cl, %sil
orb %dl, %sil
testb $0x1, %sil
jne 0x58f45c
movq %rax, 0x50(%rsp)
movq 0xa0(%rsp), %rax
decl %eax
movl %eax, 0x30(%rsp)
movl $0x7, %eax
subl 0x34(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl 0xc(%rsp), %eax
vmovd %eax, %xmm0
vpbroadcastd %xmm0, %ymm2
vmovd %r12d, %xmm0
vpbroadcastd %xmm0, %ymm3
movl 0x20(%rsp), %ecx
incl %ecx
vmovd %ecx, %xmm0
vmovdqa %ymm0, 0x180(%rsp)
vpbroadcastd %xmm0, %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovd 0xe0(%rsp), %xmm0
vpbroadcastd %xmm0, %ymm6
movl %eax, %eax
movq 0xc0(%rsp), %rdx
movl %edx, %ecx
movq %rcx, 0x38(%rsp)
movl %r12d, %ecx
imull %edx, %ecx
xorl %esi, %esi
movq $-0x80000000, %rdi      # imm = 0x80000000
movl %r13d, %r8d
movq %r11, %rdx
movl %r8d, %r9d
xorl %r10d, %r10d
movslq %r9d, %r9
movl %r9d, 0x1c0(%rsp,%r10,4)
movq %r9, %r11
subq %rax, %r11
cmpq $-0x7fffffff, %r11      # imm = 0x80000001
cmovlq %rdi, %r11
movl %r11d, 0x1a0(%rsp,%r10,4)
incq %r10
subl %ecx, %r9d
cmpq $0x8, %r10
jne 0x58ee14
movq %rsi, %r9
shlq $0x5, %r9
vmovaps 0x1c0(%rsp), %ymm0
movq %rdx, %r11
vmovaps %ymm0, (%rdx,%r9)
vmovdqa 0x1a0(%rsp), %ymm0
vmovdqa %ymm0, (%r14,%r9)
movq 0x10(%rsp), %rdx
vmovdqa %ymm0, (%rdx,%r9)
incq %rsi
subl %r12d, %r8d
cmpq 0x38(%rsp), %rsi
jne 0x58ee0b
movq 0x50(%rsp), %rdi
movl $0x0, (%rdi)
movl $0x1, %eax
movq 0x40(%rsp), %rcx
movl %r13d, (%rdi,%rax,4)
incq %rax
subl %r12d, %r13d
cmpq %rax, %rcx
jne 0x58ee99
movq 0xc0(%rsp), %rsi
cmpl $0x1, %esi
movl %esi, %edx
adcl $0x0, %edx
shlq $0x5, %rdx
xorl %eax, %eax
vbroadcastsd 0x6c7f1(%rip), %ymm0 # 0x5fb6b8
movq 0xa0(%rsp), %r8
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
vmovaps %ymm0, (%rcx,%rax)
addq $0x20, %rax
cmpq %rax, %rdx
jne 0x58eecf
decl %esi
movl %r8d, %r9d
cmpl $0x2, %r8d
movl $0x1, %eax
cmovgel %r8d, %eax
movq %rax, 0x88(%rsp)
movq 0x38(%rsp), %rax
shlq $0x5, %rax
xorl %ecx, %ecx
shlq $0x5, %rsi
movq %rsi, 0x90(%rsp)
vpbroadcastd 0x6c4f2(%rip), %ymm8 # 0x5fb410
vbroadcastss 0x6c4ed(%rip), %ymm12 # 0x5fb414
vbroadcastss 0x6aad0(%rip), %ymm0 # 0x5f9a00
vmovaps %ymm0, 0xe0(%rsp)
vbroadcastss 0x6c4c2(%rip), %ymm15 # 0x5fb404
vbroadcastsd 0x6c775(%rip), %ymm13 # 0x5fb6c0
vbroadcastss 0x6c4b4(%rip), %ymm14 # 0x5fb408
vbroadcastss 0x6c4af(%rip), %ymm0 # 0x5fb40c
vmovaps %ymm0, 0xa0(%rsp)
vpbroadcastq 0x6c759(%rip), %ymm0 # 0x5fb6c8
vmovdqa %ymm0, 0xc0(%rsp)
movq %rax, 0x80(%rsp)
movq %rax, 0x20(%rsp)
xorl %r10d, %r10d
vmovdqa %ymm6, 0x120(%rsp)
vmovdqa 0x100(%rsp), %ymm5
movq 0x10(%rsp), %rax
vmovaps %ymm12, 0x140(%rsp)
vmovdqa %ymm8, 0x160(%rsp)
movq 0x18(%rsp), %r12
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %r13
movq 0x90(%rsp), %rsi
vpmovsxbd 0x6b07f(%rip), %ymm0 # 0x5fa050
vpermd (%r11,%rsi), %ymm0, %ymm0
movq %r11, 0x28(%rsp)
leaq (%r11,%rsi), %rax
movq %rax, 0x40(%rsp)
vmovd (%rdi,%r10,4), %xmm1
vpblendd $0x1, %ymm1, %ymm0, %ymm7 # ymm7 = ymm1[0],ymm0[1,2,3,4,5,6,7]
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rsi
movzbl (%rsi,%r10), %esi
movslq (%rax,%rsi,4), %rax
movq 0x38(%rsp), %rdi
movq %rdi, %rsi
imulq %rax, %rsi
shlq $0x5, %rsi
addq 0x98(%rsp), %rsi
movq %r10, 0x48(%rsp)
incq %r10
movl $0x1, %eax
xorl %r8d, %r8d
vmovdqa 0x100(%rsp), %ymm0
vmovdqa (%r14,%r8), %ymm1
vpaddd (%rsi,%r8), %ymm7, %ymm4
vpmaxsd %ymm1, %ymm4, %ymm9
vpmaxsd %ymm0, %ymm9, %ymm7
vmovdqa %ymm7, (%r13,%r8)
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
vpcmpeqd %ymm4, %ymm7, %ymm4
vpcmpgtd %ymm0, %ymm9, %ymm9
vpaddd %ymm8, %ymm9, %ymm9
vblendvps %ymm4, %ymm12, %ymm9, %ymm4
vorps (%r8,%r11), %ymm4, %ymm9
vmovaps %ymm4, (%r15,%r8)
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
vmovaps %ymm9, (%r8,%r11)
vpsubd %ymm2, %ymm7, %ymm4
vpsubd %ymm3, %ymm1, %ymm9
vpmaxsd %ymm9, %ymm4, %ymm9
vmovdqa %ymm9, (%r14,%r8)
movq 0x18(%rsp), %r11
vmovdqa (%r11,%r8), %ymm9
vpsubd %ymm3, %ymm9, %ymm9
vpmaxsd %ymm9, %ymm4, %ymm10
vmovdqa %ymm10, (%r12,%r8)
cmpq %r9, %r10
jae 0x58f0e3
vpcmpgtd %ymm9, %ymm4, %ymm9
vblendvps %ymm9, 0xe0(%rsp), %ymm15, %ymm9
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq 0x20(%rsp), %r11
vmovaps %ymm9, (%r8,%r11)
vpsubd %ymm3, %ymm0, %ymm9
cmpq %rdi, %rax
jae 0x58f118
movq 0x10(%rbx), %r11
movq (%r11), %r11
addq %rcx, %r11
vpcmpgtd %ymm9, %ymm4, %ymm10
vmovaps 0xa0(%rsp), %ymm11
vblendvps %ymm10, %ymm14, %ymm11, %ymm10
vorps 0x20(%r8,%r11), %ymm10, %ymm10
vmovaps %ymm10, 0x20(%r8,%r11)
vpmaxsd %ymm7, %ymm5, %ymm5
vpminsd %ymm1, %ymm6, %ymm1
vpminsd %ymm0, %ymm1, %ymm0
vpminsd %ymm7, %ymm0, %ymm6
vpmaxsd %ymm9, %ymm4, %ymm0
movq 0x28(%rsp), %r11
vmovdqa (%r11,%r8), %ymm7
addq $0x20, %r8
incq %rax
cmpq %r8, %rdx
jne 0x58f039
movq $0x0, 0x10(%rsp)
vmovdqa %ymm0, %ymm7
movq 0x50(%rsp), %rdi
movl (%rdi,%r10,4), %eax
subl 0xc(%rsp), %eax
vpmovsxbd 0x6aee1(%rip), %ymm1 # 0x5fa050
vmovaps %ymm14, %ymm8
vmovdqa %ymm2, %ymm12
vmovdqa %ymm1, %ymm2
movq 0x40(%rsp), %r8
vpermd (%r8), %ymm1, %ymm1
movq 0x48(%rsp), %r8
vmovd (%rdi,%r8,4), %xmm10
vpblendd $0x1, %ymm10, %ymm1, %ymm10 # ymm10 = ymm10[0],ymm1[1,2,3,4,5,6,7]
vpermd %ymm4, %ymm2, %ymm1
vmovd %eax, %xmm11
vpblendd $0x1, %ymm11, %ymm1, %ymm4 # ymm4 = ymm11[0],ymm1[1,2,3,4,5,6,7]
vpermd %ymm7, %ymm2, %ymm1
vpblendd $0x1, %ymm11, %ymm1, %ymm1 # ymm1 = ymm11[0],ymm1[1,2,3,4,5,6,7]
vpermd %ymm9, %ymm2, %ymm7
vpblendd $0x1, 0x180(%rsp), %ymm7, %ymm9 # ymm9 = mem[0],ymm7[1,2,3,4,5,6,7]
vpermd %ymm0, %ymm2, %ymm0
vmovdqa %ymm12, %ymm2
vmovaps %ymm8, %ymm14
vmovaps 0x160(%rsp), %ymm8
vpblendd $0x1, %ymm11, %ymm0, %ymm0 # ymm0 = ymm11[0],ymm0[1,2,3,4,5,6,7]
movb $0x1, %al
movl $0x1, %r8d
xorl %r11d, %r11d
movq 0x38(%rsp), %rdi
vmovdqa (%r13,%r11), %ymm11
vpmaxsd %ymm1, %ymm11, %ymm7
vmovdqa %ymm7, (%r13,%r11)
vpaddd (%rsi,%r11), %ymm10, %ymm10
vpcmpeqd %ymm7, %ymm10, %ymm10
vpcmpgtd %ymm1, %ymm11, %ymm11
vpor %ymm11, %ymm10, %ymm10
movq 0x10(%rbx), %r14
vblendvps %ymm10, (%r15,%r11), %ymm8, %ymm10
movq (%r14), %r14
addq %rcx, %r14
vandps (%r11,%r14), %ymm13, %ymm11
vmovaps %ymm10, (%r15,%r11)
vorps %ymm10, %ymm11, %ymm10
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq %rcx, %r14
vmovaps %ymm10, (%r11,%r14)
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq %rcx, %r14
vpcmpgtd %ymm9, %ymm4, %ymm4
vmovaps 0xa0(%rsp), %ymm10
vblendvps %ymm4, %ymm14, %ymm10, %ymm4
vmovaps 0xc0(%rsp), %ymm10
vandps (%r11,%r14), %ymm10, %ymm10
vorps %ymm4, %ymm10, %ymm4
vmovaps %ymm4, (%r11,%r14)
vpsubd %ymm2, %ymm7, %ymm4
movq 0x18(%rsp), %r14
vmovdqa (%r14,%r11), %ymm10
vpsubd %ymm3, %ymm10, %ymm10
vpmaxsd %ymm10, %ymm4, %ymm11
vmovdqa %ymm11, (%r12,%r11)
cmpq %r9, %r10
jae 0x58f2c2
vpcmpgtd %ymm10, %ymm4, %ymm10
vblendvps %ymm10, 0xe0(%rsp), %ymm15, %ymm10
movq 0x10(%rbx), %r14
movq (%r14), %r14
addq 0x20(%rsp), %r14
vmovaps %ymm10, (%r11,%r14)
vpminsd %ymm7, %ymm6, %ymm6
vpmaxsd %ymm7, %ymm5, %ymm5
vpsubd %ymm3, %ymm1, %ymm7
vpcmpgtd %ymm7, %ymm4, %ymm10
vtestps 0x6a7c3(%rip), %ymm10   # 0x5f9aa0
jb 0x58f30f
vpsubd %ymm3, %ymm0, %ymm9
vpmaxsd %ymm9, %ymm4, %ymm0
movq 0x28(%rsp), %rax
vmovaps (%rax,%r11), %ymm10
cmpq %rdi, %r8
setb %al
addq $0x20, %r11
incq %r8
vmovdqa %ymm7, %ymm1
cmpq %r11, %rdx
jne 0x58f1ee
jmp 0x58f313
vmovdqa %ymm1, %ymm7
testb $0x1, %al
jne 0x58f32d
movq 0x10(%rsp), %rdi
leal 0x1(%rdi), %eax
cmpl $0x7, %edi
movq %rax, 0x10(%rsp)
jb 0x58f159
movq 0x80(%rsp), %rax
addq %rax, 0x20(%rsp)
addq %rax, %rcx
movq %r13, %r11
movq %r12, %rax
cmpq 0x88(%rsp), %r10
movq 0x68(%rsp), %r14
movq 0x50(%rsp), %rdi
vmovaps 0x140(%rsp), %ymm12
jne 0x58efb1
movl 0x64(%rsp), %eax
shlq $0x5, %rax
vmovdqa (%r13,%rax), %ymm0
cmpl $0x6, 0x34(%rsp)
jg 0x58f39f
movl 0x5c(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
movl 0x30(%rsp), %edx
vperm2i128 $0x28, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0xc, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[12,13,14,15],ymm0[0,1,2,3,4,5,6,7,8,9,10,11],ymm1[28,29,30,31],ymm0[16,17,18,19,20,21,22,23,24,25,26,27]
decl %eax
jne 0x58f38d
jmp 0x58f3a3
movl 0x30(%rsp), %edx
vmovdqa 0x100(%rsp), %ymm1
vpcmpgtd %ymm6, %ymm1, %ymm1
vpcmpgtd 0x120(%rsp), %ymm5, %ymm2
vpor %ymm2, %ymm1, %ymm1
vtestps %ymm1, %ymm1
je 0x58f3d0
orb $0x40, 0xc(%rbx)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0x58f3e0
vextracti128 $0x1, %ymm0, %xmm0
vpextrd $0x3, %xmm0, %eax
movl 0x60(%rsp), %ecx
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
movl %edx, 0x8(%rbx)
vzeroupper
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq 0x18(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq 0x28(%rsp), %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
jmp 0x58f45e
callq 0x1fa683
jmp 0x58f45c
callq 0x1fa65d
jmp 0x58f45c
callq 0x1fa637
jmp 0x58f45c
callq 0x1fa611
jmp 0x58f45c
callq 0x1fa5eb
jmp 0x58f45c
callq 0x1fa5c5
jmp 0x58f45c
callq 0x1fa59f
jmp 0x58f45c
callq 0x1fa579
xorl %ebx, %ebx
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq