// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sg_scan_avx2_256_64.c
// Function: parasail_sg_flags_rowcol_scan_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 end_query = 0;
    int32_t end_ref = 0;
    int32_t s1Len = 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 pvP = NULL;
    __m256i* restrict pvE = NULL;
    int64_t* restrict boundary = NULL;
    __m256i* restrict pvHt = NULL;
    __m256i* restrict pvH = NULL;
    __m256i* restrict pvGapper = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    __m256i vZero;
    int64_t score = 0;
    __m256i vNegLimit;
    __m256i vPosLimit;
    __m256i vSaturationCheckMin;
    __m256i vSaturationCheckMax;
    __m256i vMaxH;
    __m256i vPosMask;
    __m256i vNegInfFront;
    __m256i vSegLenXgap;
    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;
    pvP = (__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;
    vZero = _mm256_setzero_si256();
    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));
    vNegInfFront = vZero;
    vNegInfFront = _mm256_insert_epi64_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm256_add_epi64(vNegInfFront,
            _mm256_slli_si256_rpl(_mm256_set1_epi64x_rpl(-segLen*gap), 8));

    /* 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_SCAN
        | 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 */
    pvE = parasail_memalign___m256i(32, segLen);
    boundary = parasail_memalign_int64_t(32, s2Len+1);
    pvHt= parasail_memalign___m256i(32, segLen);
    pvH = parasail_memalign___m256i(32, segLen);
    pvGapper = parasail_memalign___m256i(32, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!boundary) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvGapper) 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(&pvH[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;
        }
    }

    {
        __m256i vGapper = _mm256_sub_epi64(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm256_store_si256(pvGapper+i, vGapper);
            vGapper = _mm256_sub_epi64(vGapper, vGapE);
            /* long queries and/or large penalties will break the pseudo prefix scan */
            vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vGapper);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m256i vE;
        __m256i vHt;
        __m256i vF;
        __m256i vH;
        __m256i vHp;
        __m256i *pvW;
        __m256i vW;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm256_load_si256(pvH+(segLen-1));
        vHp = _mm256_slli_si256_rpl(vHp, 8);
        vHp = _mm256_insert_epi64_rpl(vHp, boundary[j], 0);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = _mm256_sub_epi64(vNegLimit, pvGapper[0]);
        vF = vNegLimit;
        for (i=0; i<segLen; ++i) {
            vH = _mm256_load_si256(pvH+i);
            vE = _mm256_load_si256(pvE+i);
            vW = _mm256_load_si256(pvW+i);
            vE = _mm256_max_epi64_rpl(
                    _mm256_sub_epi64(vE, vGapE),
                    _mm256_sub_epi64(vH, vGapO));
            vHp = _mm256_add_epi64(vHp, vW);
            vF = _mm256_max_epi64_rpl(vF, _mm256_add_epi64(vHt, pvGapper[i]));
            vHt = _mm256_max_epi64_rpl(vE, vHp);
            _mm256_store_si256(pvE+i, vE);
            _mm256_store_si256(pvHt+i, vHt);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm256_slli_si256_rpl(vHt, 8);
        vHt = _mm256_insert_epi64_rpl(vHt, boundary[j+1], 0);
        vF = _mm256_max_epi64_rpl(vF, _mm256_add_epi64(vHt, pvGapper[0]));
        for (i=0; i<segWidth-2; ++i) {
            __m256i vFt = _mm256_slli_si256_rpl(vF, 8);
            vFt = _mm256_add_epi64(vFt, vSegLenXgap);
            vF = _mm256_max_epi64_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm256_slli_si256_rpl(vF, 8);
        vF = _mm256_add_epi64(vF, vNegInfFront);
        vH = _mm256_max_epi64_rpl(vHt, vF);
        for (i=0; i<segLen; ++i) {
            vHt = _mm256_load_si256(pvHt+i);
            vF = _mm256_max_epi64_rpl(
                    _mm256_sub_epi64(vF, vGapE),
                    _mm256_sub_epi64(vH, vGapO));
            vH = _mm256_max_epi64_rpl(vHt, vF);
            _mm256_store_si256(pvH+i, vH);
            vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vF);
            vSaturationCheckMax = _mm256_max_epi64_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
            arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
        } 

        /* extract vector containing last value from column */
        {
            __m256i vCompare;
            vH = _mm256_load_si256(pvH + 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(pvH + 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*)pvH;
        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(pvH + 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(pvGapper);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(boundary);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x20, %rsp
subq $0x300, %rsp            # imm = 0x300
movq %rsi, 0xb0(%rsp)
testq %rdi, %rdi
je 0x4f105a
movq 0x60(%rdi), %rax
movq %rax, 0xf8(%rsp)
testq %rax, %rax
je 0x4f107e
movq 0x10(%rdi), %rax
movq %rax, 0xa8(%rsp)
testq %rax, %rax
je 0x4f10a2
movl 0x8(%rdi), %eax
movq %rax, 0x90(%rsp)
testl %eax, %eax
jle 0x4f10c6
cmpq $0x0, 0xb0(%rsp)
je 0x4f10ea
movl %edx, %ebx
testl %edx, %edx
jle 0x4f110b
testl %ecx, %ecx
js 0x4f112c
movl %r8d, %r15d
testl %r8d, %r8d
js 0x4f114d
movl %r9d, %r12d
movq 0x90(%rsp), %rdx
leal -0x1(%rdx), %eax
leaq 0x3(%rdx), %rdi
movq %rdi, %r14
shrq $0x2, %r14
movl %eax, 0x8c(%rsp)
xorl %edx, %edx
divl %r14d
movl %eax, 0x160(%rsp)
movl %edx, 0xc0(%rsp)
movl %ecx, %r13d
negl %ecx
movq 0xa8(%rsp), %rsi
movslq 0x20(%rsi), %rax
movq %r13, %r8
btsq $0x3f, %r8
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq %rax, %rdx
movl %ecx, 0x40(%rsp)
cmpl %ecx, %eax
cmovgq %r8, %rdx
movq %rdx, 0x78(%rsp)
movslq 0x1c(%rsi), %rax
movq %rax, 0x140(%rsp)
andl $0x7ffffffc, %edi       # imm = 0x7FFFFFFC
movl %ebx, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x4f08ce
movl %r15d, 0x120(%rsp)
xorl %edi, %edi
testl %r12d, %r12d
setne %dil
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,%rdi,8), %ecx
orl %edx, %ecx
orl %esi, %ecx
orl 0xc(%rax), %ecx
orl $0x4840402, %ecx        # imm = 0x4840402
movq %rax, 0xa0(%rsp)
movl %ecx, 0xc(%rax)
pushq $0x20
popq %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x496aa4
movq %rax, 0x38(%rsp)
leal 0x1(%rbx), %esi
movq %r15, %rdi
movq %rsi, 0x1c0(%rsp)
callq 0x1ab78c
movq %rax, 0x20(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x496aa4
movq %rax, %r15
pushq $0x20
popq %rdi
movq %r14, %rsi
callq 0x496aa4
movq %rbx, 0x100(%rsp)
movq %rax, %rbx
pushq $0x20
popq %rdi
movq %r14, 0x18(%rsp)
movq %r14, %rsi
callq 0x496aa4
cmpq $0x0, 0x38(%rsp)
sete %dl
cmpq $0x0, 0x20(%rsp)
sete %cl
orb %dl, %cl
movq %r15, 0x80(%rsp)
testq %r15, %r15
sete %sil
testq %rbx, %rbx
sete %dl
orb %sil, %dl
orb %cl, %dl
movq %rax, 0x28(%rsp)
testq %rax, %rax
sete %al
orb %dl, %al
je 0x4f08d6
xorl %r15d, %r15d
jmp 0x4f1176
movq 0x100(%rsp), %rax
decl %eax
movl %eax, 0x30(%rsp)
pushq $0x3
popq %rdx
subl 0x160(%rsp), %edx
vmovq %r13, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x1e0(%rsp)
movl 0x120(%rsp), %r10d
movl %r10d, %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x160(%rsp)
movq 0x78(%rsp), %rcx
incq %rcx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
subq 0x140(%rsp), %rsi
addq $-0x2, %rsi
movq %rcx, 0x78(%rsp)
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm1
vmovq %rsi, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x200(%rsp)
movl %edx, 0x34(%rsp)
movslq %edx, %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x1a0(%rsp)
vmovdqa %ymm1, 0x180(%rsp)
vmovq %xmm1, %xmm2            # xmm2 = xmm1[0],zero
movq 0x18(%rsp), %r14
movl %r14d, %ecx
imull %r10d, %ecx
negl %ecx
movslq %ecx, %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vpxor %xmm1, %xmm1, %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[0,1],ymm0[2,3,4,5,6,7]
vmovdqa %ymm2, 0x240(%rsp)
vpaddq %ymm0, %ymm2, %ymm0
vmovdqa %ymm0, 0x280(%rsp)
movl 0x40(%rsp), %r11d
movslq %r11d, %rcx
movq %r14, %rdx
imulq %rax, %rdx
xorl %esi, %esi
cmpq %r14, %rsi
je 0x4f0a3c
movq %rcx, %rdi
xorl %r8d, %r8d
cmpq $0x4, %r8
je 0x4f0a0b
testl %r12d, %r12d
je 0x4f09ed
xorl %r9d, %r9d
jmp 0x4f09f0
movq %rdi, %r9
movq %r9, 0x2c0(%rsp,%r8,8)
subq %r13, %r9
movq %r9, 0x2a0(%rsp,%r8,8)
incq %r8
subq %rdx, %rdi
jmp 0x4f09dd
movq %rsi, %rdi
shlq $0x5, %rdi
vmovaps 0x2c0(%rsp), %ymm0
vmovaps %ymm0, (%rbx,%rdi)
vmovdqa 0x2a0(%rsp), %ymm0
movq 0x38(%rsp), %r8
vmovdqa %ymm0, (%r8,%rdi)
incq %rsi
subq %rax, %rcx
jmp 0x4f09d2
movq 0x20(%rsp), %rax
andq $0x0, (%rax)
pushq $0x1
popq %rax
movl 0x34(%rsp), %r13d
movl 0x18(%rbp), %esi
movq 0x1c0(%rsp), %rdi
movq 0x20(%rsp), %rdx
cmpq %rax, %rdi
je 0x4f0a7c
testl %esi, %esi
movl $0x0, %ecx
cmovel %r11d, %ecx
movslq %ecx, %rcx
movq %rcx, (%rdx,%rax,8)
incq %rax
subl %r10d, %r11d
jmp 0x4f0a5d
vpxor %xmm0, %xmm0, %xmm0
vpsubq 0x1e0(%rsp), %ymm0, %ymm0
vmovdqa %ymm0, 0x40(%rsp)
leal -0x1(%r14), %r15d
vmovdqa 0x200(%rsp), %ymm0
movl %r15d, %r12d
testl %r12d, %r12d
js 0x4f0ad4
movl %r12d, %eax
shlq $0x5, %rax
movq 0x28(%rsp), %rcx
vmovdqa 0x40(%rsp), %ymm1
vmovdqa %ymm1, (%rcx,%rax)
vpsubq 0x160(%rsp), %ymm1, %ymm1
vmovdqa %ymm1, 0x40(%rsp)
callq 0x4f1188
decl %r12d
jmp 0x4f0a9f
vmovdqa %ymm0, 0x140(%rsp)
movl %r15d, %eax
shlq $0x5, %rax
addq %rbx, %rax
movq %rax, 0xe8(%rsp)
movl 0xc0(%rsp), %eax
shlq $0x5, %rax
addq %rbx, %rax
movq %rax, 0x98(%rsp)
movl 0x100(%rsp), %eax
movq %rax, 0xf0(%rsp)
movq 0x18(%rsp), %r12
shlq $0x5, %r12
xorl %ecx, %ecx
vmovdqa 0x1a0(%rsp), %ymm0
vpcmpeqq 0xdac8f(%rip), %ymm0, %ymm0 # 0x5cb7c0
vmovdqa %ymm0, 0x220(%rsp)
vmovdqa 0x180(%rsp), %ymm0
vmovdqa %ymm0, 0x100(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0xa0(%rsp), %r15
cmpq 0xf0(%rsp), %rcx
je 0x4f0e95
vmovdqa %ymm0, 0x260(%rsp)
movq 0xe8(%rsp), %rax
vmovdqa (%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]
movq 0x20(%rsp), %rax
vmovq (%rax,%rcx,8), %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm2 # ymm2 = ymm1[0,1],ymm0[2,3,4,5,6,7]
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, %rdx
movq 0xb0(%rsp), %rcx
movq %rdx, 0xb8(%rsp)
movzbl (%rcx,%rdx), %ecx
movl (%rax,%rcx,4), %eax
imull 0x18(%rsp), %eax
movslq %eax, %r13
shlq $0x5, %r13
addq 0xf8(%rsp), %r13
movq 0x28(%rsp), %rax
vmovdqa 0x180(%rsp), %ymm0
vpsubq (%rax), %ymm0, %ymm1
xorl %r15d, %r15d
vmovdqa %ymm0, 0xc0(%rsp)
cmpq %r15, %r12
je 0x4f0cbb
vmovdqa (%rbx,%r15), %ymm3
vmovdqa %ymm3, 0x120(%rsp)
movq 0x38(%rsp), %r14
vmovdqa (%r14,%r15), %ymm0
vpsubq 0x160(%rsp), %ymm0, %ymm0
vmovdqa %ymm1, 0x1a0(%rsp)
vpsubq 0x1e0(%rsp), %ymm3, %ymm1
vpaddq (%r13,%r15), %ymm2, %ymm2
vmovdqa %ymm2, 0x1c0(%rsp)
callq 0x4f1194
vmovdqa %ymm0, 0x40(%rsp)
movq 0x28(%rsp), %rax
vmovdqa 0x1a0(%rsp), %ymm0
vpaddq (%rax,%r15), %ymm0, %ymm1
vmovaps 0xc0(%rsp), %ymm0
callq 0x4f1194
vmovaps %ymm0, 0xc0(%rsp)
vmovdqa 0x40(%rsp), %ymm0
vmovaps 0x1c0(%rsp), %ymm1
callq 0x4f1194
vmovaps 0x40(%rsp), %ymm1
vmovaps %ymm1, (%r14,%r15)
vmovdqa %ymm0, %ymm1
movq 0x80(%rsp), %rax
vmovdqa %ymm0, (%rax,%r15)
addq $0x20, %r15
vmovdqa 0x120(%rsp), %ymm2
jmp 0x4f0bf3
vpermq $0x90, %ymm1, %ymm0     # ymm0 = ymm1[0,0,1,2]
movq 0xb8(%rsp), %rcx
leaq 0x1(%rcx), %r14
movq 0x20(%rsp), %rax
vmovq 0x8(%rax,%rcx,8), %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[0,1],ymm0[2,3,4,5,6,7]
movq 0x28(%rsp), %rax
vmovdqa %ymm0, 0x40(%rsp)
vpaddq (%rax), %ymm0, %ymm1
vmovdqa 0xc0(%rsp), %ymm0
callq 0x4f1194
pushq $0x2
popq %r15
vperm2i128 $0x8, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0x8, %ymm1, %ymm0, %ymm1 # ymm1 = 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]
subl $0x1, %r15d
jb 0x4f0d21
vpaddq 0x280(%rsp), %ymm1, %ymm1
callq 0x4f1194
jmp 0x4f0cff
vpaddq 0x240(%rsp), %ymm1, %ymm1
vmovaps 0x40(%rsp), %ymm0
vmovdqa %ymm1, 0x40(%rsp)
callq 0x4f1194
vmovaps %ymm0, 0xc0(%rsp)
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x4f0e03
movq 0x80(%rsp), %rax
vmovaps (%rax,%r13), %ymm0
vmovaps %ymm0, 0x120(%rsp)
vmovdqa 0x40(%rsp), %ymm0
vpsubq 0x160(%rsp), %ymm0, %ymm0
vmovdqa 0xc0(%rsp), %ymm1
vpsubq 0x1e0(%rsp), %ymm1, %ymm1
callq 0x4f1194
vmovdqa %ymm0, %ymm1
vmovdqa %ymm0, 0x40(%rsp)
vmovaps 0x120(%rsp), %ymm0
callq 0x4f1194
vmovaps %ymm0, %ymm1
vmovaps %ymm0, 0xc0(%rsp)
vmovaps %ymm0, (%rbx,%r13)
vmovaps 0x140(%rsp), %ymm0
callq 0x4f1188
vmovaps 0x40(%rsp), %ymm1
callq 0x4f1188
vmovaps %ymm0, 0x140(%rsp)
vmovdqa 0x100(%rsp), %ymm0
vmovdqa 0xc0(%rsp), %ymm1
callq 0x4f1194
vmovdqa %ymm0, 0x100(%rsp)
addq $0x20, %r13
jmp 0x4f0d47
movq 0x98(%rsp), %rax
vmovdqa (%rax), %ymm0
vmovdqa 0x260(%rsp), %ymm1
vpcmpgtq %ymm1, %ymm0, %ymm2
vpand 0x220(%rsp), %ymm2, %ymm2
vpmovmskb %ymm2, %r15d
xorl %eax, %eax
vmovdqa %ymm0, %ymm3
movl 0x34(%rsp), %r13d
cmpl %r13d, %eax
jge 0x4f0e4a
vperm2i128 $0x8, %ymm3, %ymm3, %ymm2 # ymm2 = zero,zero,ymm3[0,1]
vpalignr $0x8, %ymm2, %ymm3, %ymm3 # ymm3 = ymm2[8,9,10,11,12,13,14,15],ymm3[0,1,2,3,4,5,6,7],ymm2[24,25,26,27,28,29,30,31],ymm3[16,17,18,19,20,21,22,23]
incl %eax
jmp 0x4f0e35
vmovdqa %ymm3, 0x40(%rsp)
callq 0x4f1194
testl %r15d, %r15d
movl 0x14(%rsp), %eax
movq 0xb8(%rsp), %rcx
cmovnel %ecx, %eax
movl %eax, 0x14(%rsp)
vmovdqa 0x40(%rsp), %ymm1
vextracti128 $0x1, %ymm1, %xmm1
movq 0xa0(%rsp), %r15
movq 0x10(%r15), %rax
movq (%rax), %rax
vpextrd $0x2, %xmm1, (%rax,%rcx,4)
movq %r14, %rcx
jmp 0x4f0b5c
movq 0x18(%rsp), %rdx
imulq $0xc, %rdx, %rax
leaq (,%rdx,8), %rcx
shlq $0x2, %rdx
xorl %esi, %esi
movl 0x8c(%rsp), %r8d
movq 0x90(%rsp), %r9
movq 0x78(%rsp), %r10
movl 0x20(%rbp), %r11d
movl 0x10(%rbp), %r14d
movl 0x30(%rsp), %r12d
cmpq %rsi, %rdx
je 0x4f0f07
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rdi
vmovdqa (%rbx,%rsi,8), %xmm2
vmovdqa 0x10(%rbx,%rsi,8), %xmm1
vmovd %xmm2, (%rdi,%rsi)
addq %rsi, %rdi
vpextrd $0x2, %xmm2, (%rdx,%rdi)
vmovd %xmm1, (%rcx,%rdi)
vpextrd $0x2, %xmm1, (%rax,%rdi)
addq $0x4, %rsi
jmp 0x4f0ece
testl %r11d, %r11d
je 0x4f0f2f
xorl %eax, %eax
cmpl %r13d, %eax
jge 0x4f0f23
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 0x4f0f0e
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %r10
testl %r14d, %r14d
je 0x4f0f8e
movq 0x18(%rsp), %rcx
andl $0x1fffffff, %ecx       # imm = 0x1FFFFFFF
shll $0x2, %ecx
xorl %edx, %edx
movl %r8d, %eax
cmpl %edx, %ecx
je 0x4f0f91
movl %edx, %edi
shrl $0x2, %edi
movl %edx, %esi
andl $0x3, %esi
imull 0x18(%rsp), %esi
addl %edi, %esi
cmpl %r9d, %esi
jge 0x4f0f89
movq (%rbx,%rdx,8), %rdi
cmpq %r10, %rdi
jle 0x4f0f76
movq %rdi, %r10
movl %r12d, 0x14(%rsp)
movl %esi, %eax
jmp 0x4f0f89
cmpl %eax, %esi
cmovgel %eax, %esi
cmpl %r12d, 0x14(%rsp)
cmovnel %eax, %esi
cmpq %r10, %rdi
cmovel %esi, %eax
incq %rdx
jmp 0x4f0f47
movl %r8d, %eax
orl %r14d, %r11d
jne 0x4f0fcd
movq 0x98(%rsp), %rax
vmovdqa (%rax), %ymm0
xorl %eax, %eax
cmpl %r13d, %eax
jge 0x4f0fb9
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 0x4f0fa4
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %r10
movl %r12d, 0x14(%rsp)
movl %r8d, %eax
vmovdqa 0x180(%rsp), %ymm0
vpcmpgtq 0x140(%rsp), %ymm0, %ymm0
vmovdqa 0x100(%rsp), %ymm1
vpcmpgtq 0x200(%rsp), %ymm1, %ymm1
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
je 0x4f1010
orb $0x40, 0xc(%r15)
xorl %r10d, %r10d
movl $0x0, 0x14(%rsp)
xorl %eax, %eax
movl %r10d, (%r15)
movl %eax, 0x4(%r15)
movl 0x14(%rsp), %eax
movl %eax, 0x8(%r15)
movq 0x28(%rsp), %rdi
vzeroupper
callq 0x1ab763
movq %rbx, %rdi
callq 0x1ab763
movq 0x80(%rsp), %rdi
callq 0x1ab763
movq 0x20(%rsp), %rdi
callq 0x1ab763
movq 0x38(%rsp), %rdi
callq 0x1ab763
jmp 0x4f1176
movq 0x249f77(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5f80(%rip), %rsi     # 0x5c6feb
leaq 0xdbe8a(%rip), %rdx     # 0x5ccefc
leaq 0xac464(%rip), %rcx     # 0x59d4dd
jmp 0x4f116c
movq 0x249f53(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5f5c(%rip), %rsi     # 0x5c6feb
leaq 0xdbe66(%rip), %rdx     # 0x5ccefc
leaq 0xd6883(%rip), %rcx     # 0x5c7920
jmp 0x4f116c
movq 0x249f2f(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5f38(%rip), %rsi     # 0x5c6feb
leaq 0xdbe42(%rip), %rdx     # 0x5ccefc
leaq 0xd6878(%rip), %rcx     # 0x5c7939
jmp 0x4f116c
movq 0x249f0b(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd662a(%rip), %rsi     # 0x5c7701
leaq 0xdbe1e(%rip), %rdx     # 0x5ccefc
leaq 0xd6864(%rip), %rcx     # 0x5c7949
jmp 0x4f116c
movq 0x249ee7(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5ef0(%rip), %rsi     # 0x5c6feb
leaq 0xdbdfa(%rip), %rdx     # 0x5ccefc
leaq 0xd65f5(%rip), %rcx     # 0x5c76fe
jmp 0x4f116c
movq 0x249ec6(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd65e5(%rip), %rsi     # 0x5c7701
leaq 0xdbdd9(%rip), %rdx     # 0x5ccefc
leaq 0xd65eb(%rip), %rcx     # 0x5c7715
jmp 0x4f116c
movq 0x249ea5(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd65de(%rip), %rsi     # 0x5c771b
leaq 0xdbdb8(%rip), %rdx     # 0x5ccefc
leaq 0xd65e5(%rip), %rcx     # 0x5c7730
jmp 0x4f116c
movq 0x249e84(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd65bd(%rip), %rsi     # 0x5c771b
leaq 0xdbd97(%rip), %rdx     # 0x5ccefc
leaq 0xd65c9(%rip), %rcx     # 0x5c7735
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x19e180
movq %r15, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq