// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x567508
movq 0x60(%rdi), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x56750f
movq 0x10(%rdi), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x567516
movl 0x8(%rdi), %r14d
testl %r14d, %r14d
jle 0x56751d
cmpq $0x0, 0x50(%rsp)
je 0x567524
movl %edx, %r12d
testl %edx, %edx
jle 0x56752b
movl %ecx, %r10d
testl %ecx, %ecx
js 0x567532
testl %r8d, %r8d
js 0x567539
movl %r9d, 0x18(%rsp)
movl %r8d, 0x20(%rsp)
leal -0x1(%r14), %eax
leaq 0x3(%r14), %rbp
movq %rbp, %r15
shrq $0x2, %r15
movl %eax, 0x3c(%rsp)
xorl %edx, %edx
divl %r15d
movl %eax, 0xc(%rsp)
movl %edx, 0x38(%rsp)
movl %r10d, %ecx
negl %r10d
movq 0x48(%rsp), %rdx
movslq 0x20(%rdx), %rax
movq %rcx, 0x40(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
subq %rax, %r13
movl %r10d, 0x10(%rsp)
cmpl %r10d, %eax
cmovgq %rcx, %r13
movslq 0x1c(%rdx), %rax
movq %rax, 0x68(%rsp)
andl $0x7ffffffc, %ebp       # imm = 0x7FFFFFFC
movl %ebp, %edi
movl %r12d, %esi
callq 0x20ac53
testq %rax, %rax
je 0x56753e
movq %rax, %rbx
movq %rbp, 0x58(%rsp)
movq %r13, 0x28(%rsp)
movq %r14, 0x60(%rsp)
movl 0xc0(%rsp), %edi
xorl %eax, %eax
cmpl $0x0, 0x18(%rsp)
setne %al
xorl %ecx, %ecx
cmpl $0x0, 0xb0(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0xb8(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
movl %edi, 0x34(%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 %r15, %rsi
callq 0x4f1904
movq %rax, %rbp
movl $0x20, %edi
movq %r15, %rsi
callq 0x4f1904
movq %rax, %r14
movl $0x20, %edi
movq %r15, %rsi
callq 0x4f1904
movq %rax, %r13
leal 0x1(%r12), %esi
movl $0x20, %edi
callq 0x20a636
testq %rbp, %rbp
sete %cl
testq %r14, %r14
sete %dl
orb %cl, %dl
testq %r13, %r13
sete %cl
testq %rax, %rax
sete %sil
orb %cl, %sil
orb %dl, %sil
jne 0x56753e
leal -0x1(%r12), %ecx
movl %ecx, 0x8(%rsp)
movl $0x3, %edx
subl 0xc(%rsp), %edx
vmovq 0x40(%rsp), %xmm0
vpbroadcastq %xmm0, %ymm4
movl 0x20(%rsp), %r10d
movl %r10d, %ecx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm5
movq 0x28(%rsp), %rsi
incq %rsi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
subq 0x68(%rsp), %rdi
addq $-0x2, %rdi
movq %rsi, 0x28(%rsp)
vmovq %rsi, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovq %rdi, %xmm1
vpbroadcastq %xmm1, %ymm1
movslq %edx, %rsi
vmovq %rsi, %xmm2
vpbroadcastq %xmm2, %ymm2
cmpl $0x0, 0x18(%rsp)
setne %sil
movl 0x10(%rsp), %r9d
movslq %r9d, %r8
vmovd %r15d, %xmm3
vpbroadcastd %xmm3, %ymm7
vmovq %rcx, %xmm3
vpbroadcastq %xmm3, %ymm3
vmovq %r8, %xmm6
vpbroadcastq %xmm6, %ymm6
vpmuldq 0xc6b0e(%rip), %ymm7, %ymm7 # 0x62db40
vmovd %esi, %xmm8
vpbroadcastb %xmm8, %xmm8
xorl %ecx, %ecx
vpslld $0x1f, %xmm8, %xmm8
vpsrad $0x1f, %xmm8, %xmm8
vpmovsxdq %xmm8, %ymm8
movq %rbp, %rsi
movq %r13, %rdi
vmovq %rcx, %xmm9
vpbroadcastq %xmm9, %ymm9
vpaddq %ymm7, %ymm9, %ymm9
vpmuludq %ymm3, %ymm9, %ymm10
vpsrlq $0x20, %ymm9, %ymm9
vpmuludq %ymm3, %ymm9, %ymm9
vpsllq $0x20, %ymm9, %ymm9
vpaddq %ymm9, %ymm10, %ymm9
vpsubq %ymm9, %ymm6, %ymm9
vpandn %ymm9, %ymm8, %ymm9
vpsubq %ymm4, %ymm9, %ymm10
vmovdqa %ymm9, (%rsi)
vmovdqa %ymm10, (%rdi)
incq %rcx
addq $0x20, %rdi
addq $0x20, %rsi
cmpq %rcx, %r15
jne 0x567054
movq $0x0, (%rax)
movl %r12d, %ecx
addl $0x3, %r12d
andl $-0x4, %r12d
movq %rcx, 0x18(%rsp)
decq %rcx
vmovq %rcx, %xmm3
vpbroadcastq %xmm3, %ymm10
vmovd %r10d, %xmm3
vpbroadcastd %xmm3, %xmm3
vmovd %r9d, %xmm6
vpbroadcastd %xmm6, %xmm6
vpmovsxbd 0xc6ae2(%rip), %xmm7 # 0x62dbc4
xorl %ecx, %ecx
vpmovsxbq 0xc6adb(%rip), %ymm8 # 0x62dbc8
vpbroadcastq 0xc6a8a(%rip), %ymm9 # 0x62db80
vpxor %ymm9, %ymm10, %ymm10
vpcmpeqd %ymm11, %ymm11, %ymm11
vpcmpeqd %xmm12, %xmm12, %xmm12
vpbroadcastd 0xc6ab2(%rip), %xmm13 # 0x62dbc0
cmpl $0x0, 0xb8(%rsp)
je 0x56711f
vpxor %xmm14, %xmm14, %xmm14
jmp 0x567132
vpaddd %xmm7, %xmm12, %xmm14
vpmulld %xmm3, %xmm14, %xmm14
vpsubd %xmm14, %xmm6, %xmm14
vpmovsxdq %xmm14, %ymm14
vmovq %rcx, %xmm15
vpbroadcastq %xmm15, %ymm15
vpor %ymm8, %ymm15, %ymm15
vpxor %ymm9, %ymm15, %ymm15
vpcmpgtq %ymm10, %ymm15, %ymm15
vpxor %ymm11, %ymm15, %ymm15
vpmaskmovq %ymm14, %ymm15, 0x8(%rax,%rcx,8)
addq $0x4, %rcx
vpaddd %xmm7, %xmm13, %xmm7
cmpq %rcx, %r12
jne 0x56710e
leal -0x1(%r15), %r10d
movl 0x38(%rsp), %r9d
movq %r15, %r11
shlq $0x5, %r11
xorl %edi, %edi
shlq $0x5, %r10
movq %r15, 0x10(%rsp)
movl %r15d, %ecx
vpcmpeqq 0xc6a15(%rip), %ymm2, %ymm7 # 0x62dba0
movq %r9, 0x20(%rsp)
shlq $0x5, %r9
movl 0x8(%rsp), %esi
vmovdqa %ymm0, %ymm6
vmovdqa %ymm0, %ymm2
vmovdqa %ymm1, %ymm3
movq %r14, %r12
movq %rbp, %r14
vmovdqa (%rbp,%r10), %ymm8
vinserti128 $0x1, %xmm8, %ymm0, %ymm9
vpalignr $0x8, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[8,9,10,11,12,13,14,15],ymm8[0,1,2,3,4,5,6,7],ymm9[24,25,26,27,28,29,30,31],ymm8[16,17,18,19,20,21,22,23]
movq 0x48(%rsp), %r15
movq 0x10(%r15), %r15
movq 0x50(%rsp), %rbp
movzbl (%rbp,%rdi), %ebp
movslq (%r15,%rbp,4), %rbp
imulq %rcx, %rbp
shlq $0x5, %rbp
addq 0x70(%rsp), %rbp
vmovq (%rax,%rdi,8), %xmm9
vpblendd $0x3, %ymm9, %ymm8, %ymm9 # ymm9 = ymm9[0,1],ymm8[2,3,4,5,6,7]
xorl %r15d, %r15d
vmovdqa %ymm0, %ymm8
vpaddq (%rbp,%r15), %ymm9, %ymm9
vmovdqa (%r13,%r15), %ymm10
vpcmpgtq %ymm10, %ymm9, %ymm11
vblendvpd %ymm11, %ymm9, %ymm10, %ymm9
vpcmpgtq %ymm8, %ymm9, %ymm11
vblendvpd %ymm11, %ymm9, %ymm8, %ymm9
vmovapd %ymm9, (%r12,%r15)
vpcmpgtq %ymm9, %ymm2, %ymm11
vblendvpd %ymm11, %ymm2, %ymm9, %ymm2
vpcmpgtq %ymm3, %ymm9, %ymm11
vblendvpd %ymm11, %ymm3, %ymm9, %ymm3
vpcmpgtq %ymm3, %ymm10, %ymm11
vblendvpd %ymm11, %ymm3, %ymm10, %ymm3
vpcmpgtq %ymm3, %ymm8, %ymm11
vblendvpd %ymm11, %ymm3, %ymm8, %ymm3
vpsubq %ymm4, %ymm9, %ymm9
vpsubq %ymm5, %ymm10, %ymm10
vpcmpgtq %ymm9, %ymm10, %ymm11
vblendvpd %ymm11, %ymm10, %ymm9, %ymm10
vmovapd %ymm10, (%r13,%r15)
vpsubq %ymm5, %ymm8, %ymm8
vpcmpgtq %ymm9, %ymm8, %ymm10
vblendvpd %ymm10, %ymm8, %ymm9, %ymm8
vmovdqa (%r14,%r15), %ymm9
addq $0x20, %r15
cmpq %r15, %r11
jne 0x5671f3
xorl %ebp, %ebp
movq %r8, %r15
cmpl $0x0, 0xb8(%rsp)
jne 0x56729e
movq 0x8(%rax,%rdi,8), %r15
subq 0x40(%rsp), %r15
vpermpd $0x90, %ymm8, %ymm8     # ymm8 = ymm8[0,0,1,2]
vmovq %r15, %xmm9
vblendpd $0x1, %ymm9, %ymm8, %ymm8 # ymm8 = ymm9[0],ymm8[1,2,3]
xorl %r15d, %r15d
vmovdqa (%r12,%r15), %ymm9
vpcmpgtq %ymm8, %ymm9, %ymm10
vblendvpd %ymm10, %ymm9, %ymm8, %ymm9
vmovapd %ymm9, (%r12,%r15)
vpcmpgtq %ymm3, %ymm9, %ymm10
vblendvpd %ymm10, %ymm3, %ymm9, %ymm3
vpcmpgtq %ymm9, %ymm2, %ymm10
vblendvpd %ymm10, %ymm2, %ymm9, %ymm2
vpsubq %ymm4, %ymm9, %ymm9
vpsubq %ymm5, %ymm8, %ymm8
vpcmpgtq %ymm9, %ymm8, %ymm9
vtestpd %ymm9, %ymm9
je 0x567303
addq $0x20, %r15
cmpq %r15, %r11
jne 0x5672b2
incl %ebp
cmpl $0x4, %ebp
jne 0x567287
vmovdqa (%r12,%r9), %ymm8
vpcmpgtq %ymm6, %ymm8, %ymm9
vtestpd %ymm7, %ymm9
cmovnel %edi, %esi
vmovdqa %ymm8, %ymm10
cmpl $0x2, 0xc(%rsp)
jg 0x56733b
xorl %ebp, %ebp
vmovdqa %ymm8, %ymm10
vperm2i128 $0x8, %ymm10, %ymm10, %ymm11 # ymm11 = zero,zero,ymm10[0,1]
vpalignr $0x8, %ymm11, %ymm10, %ymm10 # ymm10 = ymm11[8,9,10,11,12,13,14,15],ymm10[0,1,2,3,4,5,6,7],ymm11[24,25,26,27,28,29,30,31],ymm10[16,17,18,19,20,21,22,23]
incl %ebp
cmpl %edx, %ebp
jl 0x567329
vextracti128 $0x1, %ymm10, %xmm10
movq 0x10(%rbx), %r15
movq (%r15), %r15
vpextrd $0x2, %xmm10, (%r15,%rdi,4)
vblendvpd %ymm9, %ymm8, %ymm6, %ymm6
incq %rdi
movq %r12, %rbp
cmpq 0x18(%rsp), %rdi
jne 0x5671a4
movq 0x10(%rsp), %r8
leaq (,%r8,4), %rcx
leaq (%rcx,%rcx,2), %rdi
shlq $0x3, %r8
xorl %r9d, %r9d
movq 0x10(%rbx), %r10
movq 0x8(%r10), %r10
vmovdqa (%r12,%r9,8), %xmm4
vmovdqa 0x10(%r12,%r9,8), %xmm5
vmovd %xmm4, (%r10,%r9)
addq %r9, %r10
vpextrd $0x2, %xmm4, (%rcx,%r10)
vmovd %xmm5, (%r8,%r10)
vpextrd $0x2, %xmm5, (%rdi,%r10)
addq $0x4, %r9
cmpq %r9, %rcx
jne 0x56737e
cmpl $0x0, 0xc0(%rsp)
movl 0x3c(%rsp), %r11d
movq 0x60(%rsp), %r15
movq 0x28(%rsp), %rbp
movq 0x10(%rsp), %rdi
je 0x5673fe
cmpl $0x2, 0xc(%rsp)
jg 0x5673f2
xorl %ecx, %ecx
vperm2i128 $0x8, %ymm6, %ymm6, %ymm4 # ymm4 = zero,zero,ymm6[0,1]
vpalignr $0x8, %ymm4, %ymm6, %ymm6 # ymm6 = ymm4[8,9,10,11,12,13,14,15],ymm6[0,1,2,3,4,5,6,7],ymm4[24,25,26,27,28,29,30,31],ymm6[16,17,18,19,20,21,22,23]
incl %ecx
cmpl %edx, %ecx
jl 0x5673e0
vextracti128 $0x1, %ymm6, %xmm4
vpextrq $0x1, %xmm4, %rbp
cmpl $0x0, 0xb0(%rsp)
je 0x56746f
cmpl $0x0, 0x58(%rsp)
je 0x56746f
andl $0x1fffffff, %edi       # imm = 0x1FFFFFFF
shll $0x2, %edi
xorl %r8d, %r8d
movl %r11d, %ecx
movl %r8d, %r10d
shrl $0x2, %r10d
movl %r8d, %r9d
andl $0x3, %r9d
imull 0x10(%rsp), %r9d
addl %r10d, %r9d
cmpl %r15d, %r9d
jge 0x567465
movq (%r12,%r8,8), %r10
cmpq %rbp, %r10
jle 0x56744f
movq %r10, %rbp
movl 0x8(%rsp), %esi
movl %r9d, %ecx
jmp 0x567465
cmpl %ecx, %r9d
cmovgel %ecx, %r9d
cmpl 0x8(%rsp), %esi
cmovnel %ecx, %r9d
cmpq %rbp, %r10
cmovel %r9d, %ecx
incq %r8
cmpl %r8d, %edi
jne 0x56741e
jmp 0x567472
movl %r11d, %ecx
movl 0xb0(%rsp), %edi
orl %edi, 0x34(%rsp)
jne 0x5674bc
movq 0x20(%rsp), %rcx
shlq $0x5, %rcx
vmovdqa (%r12,%rcx), %ymm4
cmpl $0x2, 0xc(%rsp)
jg 0x5674a9
xorl %ecx, %ecx
vperm2i128 $0x8, %ymm4, %ymm4, %ymm5 # ymm5 = zero,zero,ymm4[0,1]
vpalignr $0x8, %ymm5, %ymm4, %ymm4 # ymm4 = ymm5[8,9,10,11,12,13,14,15],ymm4[0,1,2,3,4,5,6,7],ymm5[24,25,26,27,28,29,30,31],ymm4[16,17,18,19,20,21,22,23]
incl %ecx
cmpl %edx, %ecx
jl 0x567497
vextracti128 $0x1, %ymm4, %xmm4
vpextrq $0x1, %xmm4, %rbp
movl 0x8(%rsp), %esi
movl %r11d, %ecx
vpcmpgtq %ymm3, %ymm0, %ymm0
vpcmpgtq %ymm1, %ymm2, %ymm1
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
je 0x5674db
orb $0x40, 0xc(%rbx)
xorl %ebp, %ebp
xorl %esi, %esi
xorl %ecx, %ecx
movl %ebp, (%rbx)
movl %ecx, 0x4(%rbx)
movl %esi, 0x8(%rbx)
movq %rax, %rdi
vzeroupper
callq 0x20a60d
movq %r13, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
jmp 0x567540
callq 0x1f19d7
jmp 0x56753e
callq 0x1f19b1
jmp 0x56753e
callq 0x1f198b
jmp 0x56753e
callq 0x1f1965
jmp 0x56753e
callq 0x1f193f
jmp 0x56753e
callq 0x1f1919
jmp 0x56753e
callq 0x1f18f3
jmp 0x56753e
callq 0x1f18cd
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq