// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sw_scan_avx2_256_64.c
// Function: parasail_sw_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)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 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;
#ifdef PARASAIL_ROWCOL
    int32_t offset = 0;
    int32_t position = 0;
#endif
    __m256i* restrict pvP = NULL;
    __m256i* restrict pvE = NULL;
    __m256i* restrict pvHt = NULL;
    __m256i* restrict pvH = NULL;
    __m256i* restrict pvHMax = 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 vMaxHUnit;
    __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;
    end_query = 0;
    end_ref = 0;
    s1Len = profile->s1Len;
    matrix = profile->matrix;
    segWidth = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
#ifdef PARASAIL_ROWCOL
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
#endif
    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;
    vMaxHUnit = vNegLimit;
    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_SW | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_4;
#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);
    pvHt= parasail_memalign___m256i(32, segLen);
    pvH = parasail_memalign___m256i(32, segLen);
    pvHMax = parasail_memalign___m256i(32, segLen);
    pvGapper = parasail_memalign___m256i(32, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvHMax) return NULL;
    if (!pvGapper) return NULL;

    parasail_memset___m256i(pvH, vZero, segLen);
    parasail_memset___m256i(pvE, vNegLimit, segLen);
    {
        __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);
        }
    }

    /* 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);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = vZero;
        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);
        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);
        vH = _mm256_max_epi64_rpl(vH, vZero);
        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);
            vH = _mm256_max_epi64_rpl(vH, vZero);
            _mm256_store_si256(pvH+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
            vMaxH = _mm256_max_epi64_rpl(vH, vMaxH);
        } 

        {
            __m256i vCompare = _mm256_cmpgt_epi64(vMaxH, vMaxHUnit);
            if (_mm256_movemask_epi8(vCompare)) {
                score = _mm256_hmax_epi64_rpl(vMaxH);
                vMaxHUnit = _mm256_set1_epi64x_rpl(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m256i)*segLen);
            }
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            int32_t k = 0;
            __m256i vH = _mm256_load_si256(pvH + offset);
            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
    }

    /* Trace the alignment ending position on read. */
    {
        int64_t *t = (int64_t*)pvHMax;
        int32_t column_len = segLen * segWidth;
        end_query = s1Len;
        for (i = 0; i<column_len; ++i, ++t) {
            if (*t == score) {
                int32_t temp = i / segWidth + i % segWidth * segLen;
                if (temp < end_query) {
                    end_query = temp;
                }
            }
        }
    }

#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

    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(pvHMax);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, 0x40(%rsp)
testq %rdi, %rdi
je 0x4f1d20
movq 0x60(%rdi), %rax
movq %rax, 0xb8(%rsp)
testq %rax, %rax
je 0x4f1d44
movq 0x10(%rdi), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x4f1d68
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x4f1d8c
cmpq $0x0, 0x40(%rsp)
je 0x4f1db0
movl %edx, %ebp
testl %edx, %edx
jle 0x4f1dd1
testl %ecx, %ecx
js 0x4f1df2
movl %r8d, %r12d
testl %r8d, %r8d
js 0x4f1e13
leaq 0x3(%rax), %rdi
movq %rdi, %r15
shrq $0x2, %r15
movq %rax, 0x90(%rsp)
decl %eax
xorl %edx, %edx
divl %r15d
movl %eax, %r13d
movl %edx, %r14d
movl %ecx, %edx
negl %ecx
movq 0x38(%rsp), %r8
movslq 0x20(%r8), %rax
movq %rdx, 0x50(%rsp)
btsq $0x3f, %rdx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
subq %rax, %rsi
cmpl %ecx, %eax
cmovgq %rdx, %rsi
movq %rsi, 0x18(%rsp)
movslq 0x1c(%r8), %rax
movq %rax, 0xc0(%rsp)
andl $0x7ffffffc, %edi       # imm = 0x7FFFFFFC
movl %ebp, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x4f1755
movq %rax, %rbx
movl %r13d, 0x120(%rsp)
movl %r12d, 0xe0(%rsp)
movl %r14d, 0x100(%rsp)
movl %ebp, 0x70(%rsp)
orl $0x4840404, 0xc(%rax)   # imm = 0x4840404
movq %r15, 0x8(%rsp)
pushq $0x20
popq %rbp
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x496aa4
movq %rax, %r15
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x496aa4
movq %rax, %r12
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x496aa4
movq %rax, %r13
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x496aa4
movq %rax, %r14
movq %rbp, %rdi
movq 0x8(%rsp), %rbp
movq %rbp, %rsi
callq 0x496aa4
testq %r15, %r15
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %r13, %r13
sete %sil
movq %r14, 0x30(%rsp)
testq %r14, %r14
sete %dl
orb %sil, %dl
orb %cl, %dl
movq %rax, 0x20(%rsp)
testq %rax, %rax
sete %al
orb %dl, %al
je 0x4f175c
xorl %ebx, %ebx
jmp 0x4f1e3b
pushq $0x3
popq %rax
subl 0x120(%rsp), %eax
movl %eax, 0x2c(%rsp)
vmovsd 0x50(%rsp), %xmm0
vbroadcastsd %xmm0, %ymm0
vmovups %ymm0, 0x180(%rsp)
movl 0xe0(%rsp), %ecx
movl %ecx, %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x120(%rsp)
movq 0x18(%rsp), %rax
incq %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq 0xc0(%rsp), %rdx
addq $-0x2, %rdx
movq %rax, 0x18(%rsp)
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm1
vmovdqu %ymm1, 0x140(%rsp)
vmovq %rdx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x1a0(%rsp)
vmovq %xmm1, %xmm2            # xmm2 = xmm1[0],zero
imull %ebp, %ecx
negl %ecx
movslq %ecx, %rax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vpxor %xmm1, %xmm1, %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[0,1],ymm0[2,3,4,5,6,7]
vmovdqu %ymm2, 0x1e0(%rsp)
vpaddq %ymm0, %ymm2, %ymm0
vmovdqu %ymm0, 0x200(%rsp)
vpxor %xmm0, %xmm0, %xmm0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x496aad
movq %r15, %rdi
vmovdqu 0x140(%rsp), %ymm0
movq %rbp, %rsi
callq 0x496aad
vpxor %xmm0, %xmm0, %xmm0
vpsubq 0x180(%rsp), %ymm0, %ymm0
leal -0x1(%rbp), %eax
movl %eax, %ecx
movq 0x20(%rsp), %rsi
testl %ecx, %ecx
js 0x4f186f
movl %ecx, %edx
shlq $0x5, %rdx
vmovdqa %ymm0, (%rsi,%rdx)
vpsubq 0x120(%rsp), %ymm0, %ymm0
decl %ecx
jmp 0x4f1853
movl %eax, %eax
shlq $0x5, %rax
addq %r13, %rax
movq %rax, 0xa0(%rsp)
movq %rbp, %r14
shlq $0x5, %r14
movl 0x100(%rsp), %eax
shlq $0x5, %rax
addq %r13, %rax
movq %rax, 0x98(%rsp)
movl 0x70(%rsp), %eax
movq %rax, 0xb0(%rsp)
xorl %edx, %edx
vmovups 0x1a0(%rsp), %ymm0
vmovups %ymm0, 0x100(%rsp)
vmovdqu 0x140(%rsp), %ymm1
vmovdqu %ymm1, 0xe0(%rsp)
vmovdqa %ymm1, %ymm0
vmovdqu %ymm1, 0x1c0(%rsp)
movl $0x0, 0x14(%rsp)
movq %rbx, 0xa8(%rsp)
cmpq 0xb0(%rsp), %rdx
je 0x4f1c15
vmovdqu %ymm0, 0xc0(%rsp)
movq 0xa0(%rsp), %rax
vmovdqa (%rax), %ymm0
vperm2i128 $0x8, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0x8, %ymm1, %ymm0, %ymm2 # ymm2 = 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 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x40(%rsp), %rcx
movq %rdx, 0x48(%rsp)
movzbl (%rcx,%rdx), %ecx
movl (%rax,%rcx,4), %eax
imull %ebp, %eax
movslq %eax, %rbp
shlq $0x5, %rbp
addq 0xb8(%rsp), %rbp
vpxor %xmm1, %xmm1, %xmm1
xorl %ebx, %ebx
vmovdqu 0x140(%rsp), %ymm0
vmovdqu %ymm0, 0x70(%rsp)
cmpq %rbx, %r14
je 0x4f1a10
vmovdqa (%r13,%rbx), %ymm3
vmovdqu %ymm3, 0x160(%rsp)
vmovdqa (%r15,%rbx), %ymm0
vpsubq 0x120(%rsp), %ymm0, %ymm0
vmovdqu %ymm1, 0x220(%rsp)
vpsubq 0x180(%rsp), %ymm3, %ymm1
vpaddq (%rbp,%rbx), %ymm2, %ymm2
vmovdqu %ymm2, 0x240(%rsp)
callq 0x4f1e50
vmovdqu %ymm0, 0x50(%rsp)
movq 0x20(%rsp), %rax
vmovdqu 0x220(%rsp), %ymm0
vpaddq (%rax,%rbx), %ymm0, %ymm1
vmovups 0x70(%rsp), %ymm0
callq 0x4f1e50
vmovups %ymm0, 0x70(%rsp)
vmovdqu 0x50(%rsp), %ymm0
vmovups 0x240(%rsp), %ymm1
callq 0x4f1e50
vmovups 0x50(%rsp), %ymm1
vmovaps %ymm1, (%r15,%rbx)
vmovdqa %ymm0, %ymm1
vmovdqa %ymm0, (%r12,%rbx)
addq $0x20, %rbx
vmovdqu 0x160(%rsp), %ymm2
jmp 0x4f195c
vperm2i128 $0x8, %ymm1, %ymm1, %ymm0 # ymm0 = zero,zero,ymm1[0,1]
vpalignr $0x8, %ymm0, %ymm1, %ymm0 # ymm0 = 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]
movq 0x20(%rsp), %rax
vmovdqu %ymm0, 0x50(%rsp)
vpaddq (%rax), %ymm0, %ymm1
vmovdqu 0x70(%rsp), %ymm0
callq 0x4f1e50
pushq $0x2
popq %rbx
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, %ebx
jb 0x4f1a5a
vpaddq 0x200(%rsp), %ymm1, %ymm1
callq 0x4f1e50
jmp 0x4f1a39
vpaddq 0x1e0(%rsp), %ymm1, %ymm1
vmovups 0x50(%rsp), %ymm0
vmovdqu %ymm1, 0x70(%rsp)
callq 0x4f1e50
vpxor %xmm1, %xmm1, %xmm1
callq 0x4f1e50
vmovups %ymm0, 0x50(%rsp)
xorl %ebp, %ebp
movq 0xa8(%rsp), %rbx
cmpq %rbp, %r14
je 0x4f1b58
vmovaps (%r12,%rbp), %ymm0
vmovups %ymm0, 0x160(%rsp)
vmovdqu 0x70(%rsp), %ymm0
vpsubq 0x120(%rsp), %ymm0, %ymm0
vmovdqu 0x50(%rsp), %ymm1
vpsubq 0x180(%rsp), %ymm1, %ymm1
callq 0x4f1e50
vmovdqa %ymm0, %ymm1
vmovdqu 0x160(%rsp), %ymm0
vmovdqu %ymm1, 0x70(%rsp)
callq 0x4f1e50
vpxor %xmm1, %xmm1, %xmm1
callq 0x4f1e50
vmovdqa %ymm0, %ymm2
vmovdqu %ymm0, 0x50(%rsp)
vmovdqa %ymm0, (%r13,%rbp)
vmovdqu 0x100(%rsp), %ymm1
vpcmpgtq %ymm1, %ymm0, %ymm0
vblendvpd %ymm0, %ymm1, %ymm2, %ymm1
vmovupd %ymm1, 0x100(%rsp)
vmovups 0xe0(%rsp), %ymm0
vmovapd %ymm2, %ymm1
callq 0x4f1e50
vmovups %ymm0, 0xe0(%rsp)
vmovdqu 0x50(%rsp), %ymm0
vmovdqu 0xc0(%rsp), %ymm1
callq 0x4f1e50
vmovdqu %ymm0, 0xc0(%rsp)
addq $0x20, %rbp
jmp 0x4f1a8d
vmovdqu 0xc0(%rsp), %ymm0
vpcmpgtq 0x1c0(%rsp), %ymm0, %ymm1
vtestpd %ymm1, %ymm1
je 0x4f1bc9
vpermq $0x44, %ymm0, %ymm1     # ymm1 = ymm0[0,1,0,1]
callq 0x4f1e50
vpslldq $0x8, %ymm0, %ymm1      # ymm1 = zero,zero,zero,zero,zero,zero,zero,zero,ymm0[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm0[16,17,18,19,20,21,22,23]
callq 0x4f1e50
vextracti128 $0x1, %ymm0, %xmm1
vpextrq $0x1, %xmm1, 0x18(%rsp)
vpermq $0xff, %ymm0, %ymm0     # ymm0 = ymm0[3,3,3,3]
vmovdqu %ymm0, 0x1c0(%rsp)
movq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
vzeroupper
callq 0x19e0c0
vmovdqu 0xc0(%rsp), %ymm0
movq 0x48(%rsp), %rax
movl %eax, 0x14(%rsp)
movq 0x98(%rsp), %rax
vmovdqa (%rax), %ymm2
xorl %eax, %eax
movq 0x8(%rsp), %rbp
movl 0x2c(%rsp), %ecx
movq 0x48(%rsp), %rdx
cmpl %ecx, %eax
jge 0x4f1bf9
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 0x4f1be5
vextracti128 $0x1, %ymm2, %xmm1
movq 0x10(%rbx), %rax
movq (%rax), %rax
vpextrd $0x2, %xmm1, (%rax,%rdx,4)
incq %rdx
jmp 0x4f18ec
movl %ebp, %eax
andl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
shll $0x2, %eax
xorl %ecx, %ecx
movq 0x90(%rsp), %rdi
movq 0x18(%rsp), %r8
movq 0x30(%rsp), %r14
cmpl %ecx, %eax
je 0x4f1c56
cmpq %r8, (%r14,%rcx,8)
jne 0x4f1c51
movl %ecx, %edx
shrl $0x2, %edx
movl %ecx, %esi
andl $0x3, %esi
imull %ebp, %esi
addl %edx, %esi
cmpl %edi, %esi
cmovll %esi, %edi
incq %rcx
jmp 0x4f1c33
imulq $0xc, %rbp, %rax
leaq (,%rbp,8), %rcx
shlq $0x2, %rbp
xorl %edx, %edx
cmpq %rdx, %rbp
je 0x4f1ca5
movq 0x10(%rbx), %rsi
movq 0x8(%rsi), %rsi
vmovdqa (%r13,%rdx,8), %xmm0
vmovdqa 0x10(%r13,%rdx,8), %xmm1
vmovd %xmm0, (%rsi,%rdx)
addq %rdx, %rsi
vpextrd $0x2, %xmm0, (%rbp,%rsi)
vmovd %xmm1, (%rcx,%rsi)
vpextrd $0x2, %xmm1, (%rax,%rsi)
addq $0x4, %rdx
jmp 0x4f1c68
vmovdqu 0x140(%rsp), %ymm0
vpcmpgtq 0x100(%rsp), %ymm0, %ymm0
vmovdqu 0xe0(%rsp), %ymm1
vpcmpgtq 0x1a0(%rsp), %ymm1, %ymm1
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
movl 0x14(%rsp), %eax
je 0x4f1ce5
orb $0x40, 0xc(%rbx)
xorl %r8d, %r8d
xorl %eax, %eax
xorl %edi, %edi
movl %r8d, (%rbx)
movl %edi, 0x4(%rbx)
movl %eax, 0x8(%rbx)
movq 0x20(%rsp), %rdi
vzeroupper
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
movq %r13, %rdi
callq 0x1ab763
movq %r12, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
jmp 0x4f1e3b
movq 0x2492b1(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd52ba(%rip), %rsi     # 0x5c6feb
leaq 0xc3b8c(%rip), %rdx     # 0x5b58c4
leaq 0xab79e(%rip), %rcx     # 0x59d4dd
jmp 0x4f1e32
movq 0x24928d(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5296(%rip), %rsi     # 0x5c6feb
leaq 0xc3b68(%rip), %rdx     # 0x5b58c4
leaq 0xd5bbd(%rip), %rcx     # 0x5c7920
jmp 0x4f1e32
movq 0x249269(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5272(%rip), %rsi     # 0x5c6feb
leaq 0xc3b44(%rip), %rdx     # 0x5b58c4
leaq 0xd5bb2(%rip), %rcx     # 0x5c7939
jmp 0x4f1e32
movq 0x249245(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5964(%rip), %rsi     # 0x5c7701
leaq 0xc3b20(%rip), %rdx     # 0x5b58c4
leaq 0xd5b9e(%rip), %rcx     # 0x5c7949
jmp 0x4f1e32
movq 0x249221(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd522a(%rip), %rsi     # 0x5c6feb
leaq 0xc3afc(%rip), %rdx     # 0x5b58c4
leaq 0xd592f(%rip), %rcx     # 0x5c76fe
jmp 0x4f1e32
movq 0x249200(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd591f(%rip), %rsi     # 0x5c7701
leaq 0xc3adb(%rip), %rdx     # 0x5b58c4
leaq 0xd5925(%rip), %rcx     # 0x5c7715
jmp 0x4f1e32
movq 0x2491df(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd5918(%rip), %rsi     # 0x5c771b
leaq 0xc3aba(%rip), %rdx     # 0x5b58c4
leaq 0xd591f(%rip), %rcx     # 0x5c7730
jmp 0x4f1e32
movq 0x2491be(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xd58f7(%rip), %rsi     # 0x5c771b
leaq 0xc3a99(%rip), %rdx     # 0x5b58c4
leaq 0xd5903(%rip), %rcx     # 0x5c7735
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq