// File: /workspace/github_c_makefile_star2_O2/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 $0x280, %rsp            # imm = 0x280
movq %rsi, 0x98(%rsp)
testq %rdi, %rdi
je 0x5096a9
movq 0x60(%rdi), %rax
movq %rax, 0x150(%rsp)
testq %rax, %rax
je 0x5096cd
movq 0x10(%rdi), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x5096f1
movl %ecx, %r12d
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x509715
cmpq $0x0, 0x98(%rsp)
je 0x509739
movl %r9d, %r14d
movl %edx, %r9d
testl %edx, %edx
jle 0x50975a
testl %r12d, %r12d
js 0x50977b
testl %r8d, %r8d
js 0x50979c
movl %r8d, 0x100(%rsp)
leal -0x1(%rcx), %eax
movq %rcx, 0x130(%rsp)
leaq 0x3(%rcx), %rdi
movq %rdi, %r13
shrq $0x2, %r13
movl %eax, 0x58(%rsp)
xorl %edx, %edx
divl %r13d
movl %eax, 0xe0(%rsp)
movl %edx, %r15d
movl %r12d, %ecx
negl %r12d
movq 0x90(%rsp), %rsi
movslq 0x20(%rsi), %rax
movq %rcx, 0x48(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq %rax, %rdx
cmpl %r12d, %eax
cmovgq %rcx, %rdx
movq %rdx, 0x38(%rsp)
movslq 0x1c(%rsi), %rax
movq %rax, 0xc0(%rsp)
andl $0x7ffffffc, %edi       # imm = 0x7FFFFFFC
movl %r9d, %esi
movq %r9, 0x60(%rsp)
callq 0x1ab93b
testq %rax, %rax
je 0x508fa4
movq %rax, %rbx
movl %r15d, 0xa0(%rsp)
xorl %eax, %eax
testl %r14d, %r14d
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
cmpl $0x0, 0x20(%rbp)
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)
pushq $0x20
popq %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x496aa4
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x496aa4
movq %r13, %rsi
movq %rax, %r13
movq %r15, %rdi
movq %rsi, 0x88(%rsp)
callq 0x496aa4
movq %rax, %r15
movq 0x60(%rsp), %rax
leal 0x1(%rax), %esi
pushq $0x20
popq %rdi
movq %rsi, 0x40(%rsp)
callq 0x1ab78c
cmpq $0x0, 0x10(%rsp)
sete %dl
movq %r13, 0x30(%rsp)
testq %r13, %r13
sete %cl
orb %dl, %cl
movq %r15, 0x50(%rsp)
testq %r15, %r15
sete %sil
movq %rax, 0x20(%rsp)
testq %rax, %rax
sete %dl
orb %sil, %dl
orb %cl, %dl
je 0x508fab
xorl %ebx, %ebx
jmp 0x5097c4
movq 0x60(%rsp), %r10
leal -0x1(%r10), %eax
movl %eax, 0x1c(%rsp)
pushq $0x3
popq %r15
subl 0xe0(%rsp), %r15d
vmovsd 0x48(%rsp), %xmm0
vbroadcastsd %xmm0, %ymm0
vmovaps %ymm0, 0x1e0(%rsp)
movl 0x100(%rsp), %r11d
movl %r11d, %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x1a0(%rsp)
movq 0x38(%rsp), %r13
incq %r13
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
subq 0xc0(%rsp), %rcx
addq $-0x2, %rcx
movq %r13, 0x38(%rsp)
vmovq %r13, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x180(%rsp)
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x1c0(%rsp)
movslq %r15d, %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
movslq %r12d, %rsi
movq 0x88(%rsp), %r13
movq %r13, %rcx
imulq %rax, %rcx
xorl %edx, %edx
movq %rsi, 0x158(%rsp)
cmpq %r13, %rdx
je 0x5090da
movq %rsi, %rdi
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x5090a3
testl %r14d, %r14d
je 0x509083
xorl %r9d, %r9d
jmp 0x509086
movq %rdi, %r9
movq %r9, 0x240(%rsp,%r8,8)
subq 0x48(%rsp), %r9
movq %r9, 0x220(%rsp,%r8,8)
incq %r8
subq %rcx, %rdi
jmp 0x509073
movq %rdx, %rdi
shlq $0x5, %rdi
vmovaps 0x240(%rsp), %ymm1
movq 0x10(%rsp), %r8
vmovaps %ymm1, (%r8,%rdi)
vmovdqa 0x220(%rsp), %ymm1
movq 0x50(%rsp), %r8
vmovdqa %ymm1, (%r8,%rdi)
incq %rdx
subq %rax, %rsi
jmp 0x509068
movq 0x20(%rsp), %rax
andq $0x0, (%rax)
pushq $0x1
popq %rax
movq 0x40(%rsp), %rsi
movq 0x20(%rsp), %rdx
cmpq %rax, %rsi
je 0x509111
cmpl $0x0, 0x18(%rbp)
movl $0x0, %ecx
cmovel %r12d, %ecx
movslq %ecx, %rcx
movq %rcx, (%rdx,%rax,8)
incq %rax
subl %r11d, %r12d
jmp 0x5090f0
leal -0x1(%r13), %ecx
movl 0xa0(%rsp), %eax
movl %r10d, %edx
movq %rdx, 0x148(%rsp)
movq %r13, %r14
shlq $0x5, %r14
leaq 0x20(%r14), %rdx
movq %rdx, 0x40(%rsp)
xorl %edx, %edx
shlq $0x5, %rcx
movq %rcx, 0x138(%rsp)
vpcmpeqq 0xc2672(%rip), %ymm0, %ymm0 # 0x5cb7c0
vmovdqa %ymm0, 0x200(%rsp)
shlq $0x5, %rax
movq %rax, 0x80(%rsp)
vmovaps 0x1c0(%rsp), %ymm0
vmovaps %ymm0, 0xe0(%rsp)
vmovdqa 0x180(%rsp), %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovdqa %ymm0, 0x160(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x30(%rsp), %rax
movq %rbx, 0x140(%rsp)
movl %r15d, 0x5c(%rsp)
movl %ecx, 0x2c(%rsp)
movq %rax, %r12
cmpq 0x148(%rsp), %rdx
je 0x5094d9
movq 0x10(%rsp), %rax
movq 0x138(%rsp), %rcx
vmovdqa (%rax,%rcx), %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]
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x98(%rsp), %rcx
movzbl (%rcx,%rdx), %ecx
movl (%rax,%rcx,4), %eax
imull %r13d, %eax
movslq %eax, %rbx
shlq $0x5, %rbx
addq 0x150(%rsp), %rbx
movq 0x20(%rsp), %rax
movq %rdx, 0x30(%rsp)
vmovq (%rax,%rdx,8), %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[0,1],ymm0[2,3,4,5,6,7]
xorl %r13d, %r13d
vmovdqa 0x180(%rsp), %ymm2
cmpq %r13, %r14
je 0x509331
vpaddq (%rbx,%r13), %ymm0, %ymm0
movq 0x50(%rsp), %r15
vmovaps (%r15,%r13), %ymm1
vmovaps %ymm1, 0xc0(%rsp)
vmovdqa %ymm2, 0x60(%rsp)
callq 0x5097d6
vmovaps 0x60(%rsp), %ymm1
callq 0x5097d6
vmovdqa %ymm0, %ymm1
vmovdqa %ymm0, 0xa0(%rsp)
vmovdqa %ymm0, (%r12,%r13)
vmovaps 0x100(%rsp), %ymm0
callq 0x5097d6
vmovaps %ymm0, 0x100(%rsp)
vmovaps 0xe0(%rsp), %ymm0
vmovaps 0xa0(%rsp), %ymm1
callq 0x5097e2
vmovaps 0xc0(%rsp), %ymm1
callq 0x5097e2
vmovaps 0x60(%rsp), %ymm1
callq 0x5097e2
vmovaps %ymm0, 0xe0(%rsp)
vmovdqa 0xa0(%rsp), %ymm0
vpsubq 0x1e0(%rsp), %ymm0, %ymm1
vmovdqa %ymm1, 0xa0(%rsp)
vmovdqa 0xc0(%rsp), %ymm0
vpsubq 0x1a0(%rsp), %ymm0, %ymm0
callq 0x5097d6
vmovdqa %ymm0, (%r15,%r13)
vmovdqa 0x60(%rsp), %ymm0
vpsubq 0x1a0(%rsp), %ymm0, %ymm0
vmovdqa 0xa0(%rsp), %ymm1
callq 0x5097d6
vmovdqa %ymm0, %ymm2
movq 0x10(%rsp), %rax
vmovdqa (%rax,%r13), %ymm0
addq $0x20, %r13
jmp 0x509228
xorl %eax, %eax
movl 0x5c(%rsp), %r15d
cmpl $0x4, %eax
movq 0x30(%rsp), %rcx
je 0x509432
movl %eax, 0xa0(%rsp)
movq 0x158(%rsp), %rax
cmpl $0x0, 0x18(%rbp)
jne 0x50936a
movq 0x20(%rsp), %rax
movq 0x8(%rax,%rcx,8), %rax
subq 0x48(%rsp), %rax
vpermq $0x90, %ymm2, %ymm0     # ymm0 = ymm2[0,0,1,2]
vmovq %rax, %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm2 # ymm2 = ymm1[0,1],ymm0[2,3,4,5,6,7]
xorl %r13d, %r13d
leaq 0x20(%r13), %rbx
cmpq %rbx, 0x40(%rsp)
je 0x509424
vmovaps (%r12,%r13), %ymm0
vmovdqa %ymm2, 0x60(%rsp)
vmovaps 0x60(%rsp), %ymm1
callq 0x5097d6
vmovaps %ymm0, %ymm1
vmovaps %ymm0, 0xc0(%rsp)
vmovaps %ymm0, (%r12,%r13)
vmovaps 0xe0(%rsp), %ymm0
callq 0x5097e2
vmovaps %ymm0, 0xe0(%rsp)
vmovaps 0x100(%rsp), %ymm0
vmovdqa 0xc0(%rsp), %ymm1
callq 0x5097d6
vmovdqa 0x60(%rsp), %ymm2
vmovaps %ymm0, 0x100(%rsp)
vmovdqa 0xc0(%rsp), %ymm0
vpsubq 0x1e0(%rsp), %ymm0, %ymm0
vpsubq 0x1a0(%rsp), %ymm2, %ymm2
vpcmpgtq %ymm0, %ymm2, %ymm0
vtestpd %ymm0, %ymm0
movq %rbx, %r13
jne 0x50937e
jmp 0x509432
movl 0xa0(%rsp), %eax
incl %eax
jmp 0x509338
movq 0x80(%rsp), %rax
vmovdqa (%r12,%rax), %ymm0
vpcmpgtq 0x160(%rsp), %ymm0, %ymm1
vpand 0x200(%rsp), %ymm1, %ymm1
vpmovmskb %ymm1, %ebx
xorl %eax, %eax
vmovdqa %ymm0, %ymm2
movq 0x88(%rsp), %r13
cmpl %r15d, %eax
jge 0x50947a
vperm2i128 $0x8, %ymm2, %ymm2, %ymm1 # ymm1 = zero,zero,ymm2[0,1]
vpalignr $0x8, %ymm1, %ymm2, %ymm2 # ymm2 = ymm1[8,9,10,11,12,13,14,15],ymm2[0,1,2,3,4,5,6,7],ymm1[24,25,26,27,28,29,30,31],ymm2[16,17,18,19,20,21,22,23]
incl %eax
jmp 0x509465
vmovdqa 0x160(%rsp), %ymm1
vmovdqa %ymm2, 0x60(%rsp)
callq 0x5097d6
testl %ebx, %ebx
movl 0x2c(%rsp), %ecx
movq 0x30(%rsp), %rdx
cmovnel %edx, %ecx
vmovdqa %ymm0, 0x160(%rsp)
vmovdqa 0x60(%rsp), %ymm0
vextracti128 $0x1, %ymm0, %xmm0
movq 0x140(%rsp), %rbx
movq 0x10(%rbx), %rax
movq (%rax), %rax
vpextrd $0x2, %xmm0, (%rax,%rdx,4)
incq %rdx
movq 0x10(%rsp), %rax
movq %r12, 0x10(%rsp)
jmp 0x5091a6
imulq $0xc, %r13, %rax
leaq (,%r13,8), %rcx
movq %r13, %rdx
shlq $0x2, %rdx
xorl %esi, %esi
movl 0x58(%rsp), %r8d
movq 0x130(%rsp), %r9
movq 0x38(%rsp), %r10
movl 0x20(%rbp), %r14d
movq 0x10(%rsp), %r11
cmpq %rsi, %rdx
je 0x509544
movq 0x10(%rbx), %rdi
movq 0x8(%rdi), %rdi
vmovdqa (%r11,%rsi,8), %xmm0
vmovdqa 0x10(%r11,%rsi,8), %xmm1
vmovd %xmm0, (%rdi,%rsi)
addq %rsi, %rdi
vpextrd $0x2, %xmm0, (%rdx,%rdi)
vmovd %xmm1, (%rcx,%rdi)
vpextrd $0x2, %xmm1, (%rax,%rdi)
addq $0x4, %rsi
jmp 0x509509
testl %r14d, %r14d
movl 0x2c(%rsp), %r11d
je 0x50958c
xorl %eax, %eax
cmpl %r15d, %eax
jge 0x509577
vmovdqa 0x160(%rsp), %ymm1
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]
vmovdqa %ymm1, 0x160(%rsp)
incl %eax
jmp 0x509550
vmovdqa 0x160(%rsp), %ymm0
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %r10
cmpl $0x0, 0x10(%rbp)
je 0x5095ee
movl %r13d, %ecx
andl $0x1fffffff, %ecx       # imm = 0x1FFFFFFF
shll $0x2, %ecx
xorl %edx, %edx
movl %r8d, %eax
cmpl %edx, %ecx
je 0x5095f1
movl %edx, %edi
shrl $0x2, %edi
movl %edx, %esi
andl $0x3, %esi
imull %r13d, %esi
addl %edi, %esi
cmpl %r9d, %esi
jge 0x5095e9
movq 0x10(%rsp), %rdi
movq (%rdi,%rdx,8), %rdi
cmpq %r10, %rdi
jle 0x5095d6
movq %rdi, %r10
movl 0x1c(%rsp), %r11d
movl %esi, %eax
jmp 0x5095e9
cmpl %eax, %esi
cmovgel %eax, %esi
cmpl 0x1c(%rsp), %r11d
cmovnel %eax, %esi
cmpq %r10, %rdi
cmovel %esi, %eax
incq %rdx
jmp 0x5095a3
movl %r8d, %eax
orl 0x10(%rbp), %r14d
jne 0x509634
movq 0x10(%rsp), %rax
movq 0x80(%rsp), %rcx
vmovdqa (%rax,%rcx), %ymm0
xorl %eax, %eax
cmpl %r15d, %eax
jge 0x509620
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
jmp 0x50960b
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %r10
movl 0x1c(%rsp), %r11d
movl %r8d, %eax
vmovdqa 0x180(%rsp), %ymm0
vpcmpgtq 0xe0(%rsp), %ymm0, %ymm0
vmovdqa 0x100(%rsp), %ymm1
vpcmpgtq 0x1c0(%rsp), %ymm1, %ymm1
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
je 0x509671
orb $0x40, 0xc(%rbx)
xorl %r10d, %r10d
xorl %r11d, %r11d
xorl %eax, %eax
movl %r10d, (%rbx)
movl %eax, 0x4(%rbx)
movl %r11d, 0x8(%rbx)
movq 0x20(%rsp), %rdi
vzeroupper
callq 0x1ab763
movq 0x50(%rsp), %rdi
callq 0x1ab763
movq %r12, %rdi
callq 0x1ab763
movq 0x10(%rsp), %rdi
callq 0x1ab763
jmp 0x5097c4
movq 0x231928(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbd931(%rip), %rsi     # 0x5c6feb
leaq 0xc3a6a(%rip), %rdx     # 0x5cd12b
leaq 0x93e15(%rip), %rcx     # 0x59d4dd
jmp 0x5097bb
movq 0x231904(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbd90d(%rip), %rsi     # 0x5c6feb
leaq 0xc3a46(%rip), %rdx     # 0x5cd12b
leaq 0xbe234(%rip), %rcx     # 0x5c7920
jmp 0x5097bb
movq 0x2318e0(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbd8e9(%rip), %rsi     # 0x5c6feb
leaq 0xc3a22(%rip), %rdx     # 0x5cd12b
leaq 0xbe229(%rip), %rcx     # 0x5c7939
jmp 0x5097bb
movq 0x2318bc(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbdfdb(%rip), %rsi     # 0x5c7701
leaq 0xc39fe(%rip), %rdx     # 0x5cd12b
leaq 0xbe215(%rip), %rcx     # 0x5c7949
jmp 0x5097bb
movq 0x231898(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbd8a1(%rip), %rsi     # 0x5c6feb
leaq 0xc39da(%rip), %rdx     # 0x5cd12b
leaq 0xbdfa6(%rip), %rcx     # 0x5c76fe
jmp 0x5097bb
movq 0x231877(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbdf96(%rip), %rsi     # 0x5c7701
leaq 0xc39b9(%rip), %rdx     # 0x5cd12b
leaq 0xbdf9c(%rip), %rcx     # 0x5c7715
jmp 0x5097bb
movq 0x231856(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbdf8f(%rip), %rsi     # 0x5c771b
leaq 0xc3998(%rip), %rdx     # 0x5cd12b
leaq 0xbdf96(%rip), %rcx     # 0x5c7730
jmp 0x5097bb
movq 0x231835(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xbdf6e(%rip), %rsi     # 0x5c771b
leaq 0xc3977(%rip), %rdx     # 0x5cd12b
leaq 0xbdf7a(%rip), %rcx     # 0x5c7735
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq