// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/nw_diag_avx2_256_64.c
// Function: parasail_nw_rowcol_diag_avx2_256_64
parasail_result_t* FNAME(
        const char * const restrict _s1, const int _s1Len,
        const char * const restrict _s2, const int s2Len,
        const int open, const int gap, const parasail_matrix_t *matrix)
{
    /* declare local variables */
    int32_t N = 0;
    int32_t PAD = 0;
    int32_t PAD2 = 0;
    int32_t s1Len = 0;
    int32_t s1Len_PAD = 0;
    int32_t s2Len_PAD = 0;
    int64_t * restrict s1 = NULL;
    int64_t * restrict s2B = NULL;
    int64_t * restrict _H_pr = NULL;
    int64_t * restrict _F_pr = NULL;
    int64_t * restrict s2 = NULL;
    int64_t * restrict H_pr = NULL;
    int64_t * restrict F_pr = NULL;
    parasail_result_t *result = NULL;
    int32_t i = 0;
    int32_t j = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    int64_t score = 0;
    __m256i vNegLimit;
    __m256i vPosLimit;
    __m256i vSaturationCheckMin;
    __m256i vSaturationCheckMax;
    __m256i vNegInf;
    __m256i vOpen;
    __m256i vGap;
    __m256i vOne;
    __m256i vN;
    __m256i vGapN;
    __m256i vNegOne;
    __m256i vI;
    __m256i vJreset;
    __m256i vMax;
    __m256i vILimit;
    __m256i vILimit1;
    __m256i vJLimit;
    __m256i vJLimit1;
    __m256i vIBoundary;

    /* validate inputs */
    PARASAIL_CHECK_NULL(_s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);
    PARASAIL_CHECK_NULL(matrix);
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        PARASAIL_CHECK_NULL(_s1);
        PARASAIL_CHECK_GT0(_s1Len);
    }

    /* initialize stack variables */
    N = 4; /* number of values in vector */
    PAD = N-1;
    PAD2 = PAD*2;
    s1Len = matrix->type == PARASAIL_MATRIX_TYPE_SQUARE ? _s1Len : matrix->length;
    s1Len_PAD = s1Len+PAD;
    s2Len_PAD = s2Len+PAD;
    i = 0;
    j = 0;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    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;
    vNegInf = _mm256_set1_epi64x_rpl(NEG_LIMIT);
    vOpen = _mm256_set1_epi64x_rpl(open);
    vGap  = _mm256_set1_epi64x_rpl(gap);
    vOne = _mm256_set1_epi64x_rpl(1);
    vN = _mm256_set1_epi64x_rpl(N);
    vGapN = _mm256_set1_epi64x_rpl(gap*N);
    vNegOne = _mm256_set1_epi64x_rpl(-1);
    vI = _mm256_set_epi64x_rpl(0,1,2,3);
    vJreset = _mm256_set_epi64x_rpl(0,-1,-2,-3);
    vMax = vNegInf;
    vILimit = _mm256_set1_epi64x_rpl(s1Len);
    vILimit1 = _mm256_sub_epi64(vILimit, vOne);
    vJLimit = _mm256_set1_epi64x_rpl(s2Len);
    vJLimit1 = _mm256_sub_epi64(vJLimit, vOne);
    vIBoundary = _mm256_set_epi64x_rpl(
            -open-0*gap,
            -open-1*gap,
            -open-2*gap,
            -open-3*gap);

    /* initialize result */
#ifdef PARASAIL_TABLE
    result = parasail_result_new_table1(s1Len, s2Len);
#else
#ifdef PARASAIL_ROWCOL
    result = parasail_result_new_rowcol1(s1Len, s2Len);
#else
    result = parasail_result_new();
#endif
#endif
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_DIAG
        | 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 */
    s2B= parasail_memalign_int64_t(32, s2Len+PAD2);
    _H_pr = parasail_memalign_int64_t(32, s2Len+PAD2);
    _F_pr = parasail_memalign_int64_t(32, s2Len+PAD2);
    s2 = s2B+PAD; /* will allow later for negative indices */
    H_pr = _H_pr+PAD;
    F_pr = _F_pr+PAD;

    /* validate heap variables */
    if (!s2B) return NULL;
    if (!_H_pr) return NULL;
    if (!_F_pr) return NULL;

    /* convert _s1 from char to int in range 0-23 */
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        s1 = parasail_memalign_int64_t(32, s1Len+PAD);
        if (!s1) return NULL;
        for (i=0; i<s1Len; ++i) {
            s1[i] = matrix->mapper[(unsigned char)_s1[i]];
        }
        /* pad back of s1 with dummy values */
        for (i=s1Len; i<s1Len_PAD; ++i) {
            s1[i] = 0; /* point to first matrix row because we don't care */
        }
    }

    /* convert _s2 from char to int in range 0-23 */
    for (j=0; j<s2Len; ++j) {
        s2[j] = matrix->mapper[(unsigned char)_s2[j]];
    }
    /* pad front of s2 with dummy values */
    for (j=-PAD; j<0; ++j) {
        s2[j] = 0; /* point to first matrix row because we don't care */
    }
    /* pad back of s2 with dummy values */
    for (j=s2Len; j<s2Len_PAD; ++j) {
        s2[j] = 0; /* point to first matrix row because we don't care */
    }

    /* set initial values for stored row */
    for (j=0; j<s2Len; ++j) {
        H_pr[j] = -open - j*gap;
        F_pr[j] = NEG_LIMIT;
    }
    /* pad front of stored row values */
    for (j=-PAD; j<0; ++j) {
        H_pr[j] = NEG_LIMIT;
        F_pr[j] = NEG_LIMIT;
    }
    /* pad back of stored row values */
    for (j=s2Len; j<s2Len+PAD; ++j) {
        H_pr[j] = NEG_LIMIT;
        F_pr[j] = NEG_LIMIT;
    }
    H_pr[-1] = 0; /* upper left corner */

    /* iterate over query sequence */
    for (i=0; i<s1Len; i+=N) {
        __m256i vNH = vNegInf;
        __m256i vWH = vNegInf;
        __m256i vE = vNegInf;
        __m256i vF = vNegInf;
        __m256i vJ = vJreset;
        const int * const restrict matrow0 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+0] : ((i+0 >= s1Len) ? s1Len-1 : i+0))];
        const int * const restrict matrow1 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+1] : ((i+1 >= s1Len) ? s1Len-1 : i+1))];
        const int * const restrict matrow2 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+2] : ((i+2 >= s1Len) ? s1Len-1 : i+2))];
        const int * const restrict matrow3 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+3] : ((i+3 >= s1Len) ? s1Len-1 : i+3))];
        vNH = _mm256_srli_si256_rpl(vNH, 8);
        vNH = _mm256_insert_epi64_rpl(vNH, H_pr[-1], 3);
        vWH = _mm256_srli_si256_rpl(vWH, 8);
        vWH = _mm256_insert_epi64_rpl(vWH, -open - i*gap, 3);
        H_pr[-1] = -open - (i+N)*gap;
        /* iterate over database sequence */
        for (j=0; j<s2Len+PAD; ++j) {
            __m256i vMat;
            __m256i vNWH = vNH;
            vNH = _mm256_srli_si256_rpl(vWH, 8);
            vNH = _mm256_insert_epi64_rpl(vNH, H_pr[j], 3);
            vF = _mm256_srli_si256_rpl(vF, 8);
            vF = _mm256_insert_epi64_rpl(vF, F_pr[j], 3);
            vF = _mm256_max_epi64_rpl(
                    _mm256_sub_epi64(vNH, vOpen),
                    _mm256_sub_epi64(vF, vGap));
            vE = _mm256_max_epi64_rpl(
                    _mm256_sub_epi64(vWH, vOpen),
                    _mm256_sub_epi64(vE, vGap));
            vMat = _mm256_set_epi64x_rpl(
                    matrow0[s2[j-0]],
                    matrow1[s2[j-1]],
                    matrow2[s2[j-2]],
                    matrow3[s2[j-3]]
                    );
            vNWH = _mm256_add_epi64(vNWH, vMat);
            vWH = _mm256_max_epi64_rpl(vNWH, vE);
            vWH = _mm256_max_epi64_rpl(vWH, vF);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m256i cond = _mm256_cmpeq_epi64(vJ,vNegOne);
                vWH = _mm256_blendv_epi8(vWH, vIBoundary, cond);
                vF = _mm256_blendv_epi8(vF, vNegInf, cond);
                vE = _mm256_blendv_epi8(vE, vNegInf, cond);
            }
            /* cannot start checking sat until after J clears boundary */
            if (j > PAD) {
                vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vWH);
                vSaturationCheckMax = _mm256_max_epi64_rpl(vSaturationCheckMax, vWH);
            }
#ifdef PARASAIL_TABLE
            arr_store_si256(result->tables->score_table, vWH, i, s1Len, j, s2Len);
#endif
#ifdef PARASAIL_ROWCOL
            arr_store_rowcol(result->rowcols->score_row, result->rowcols->score_col, vWH, i, s1Len, j, s2Len);
#endif
            H_pr[j-3] = (int64_t)_mm256_extract_epi64_rpl(vWH,0);
            F_pr[j-3] = (int64_t)_mm256_extract_epi64_rpl(vF,0);
            /* as minor diagonal vector passes across table, extract
               last table value at the i,j bound */
            {
                __m256i cond_valid_I = _mm256_cmpeq_epi64(vI, vILimit1);
                __m256i cond_valid_J = _mm256_cmpeq_epi64(vJ, vJLimit1);
                __m256i cond_all = _mm256_and_si256(cond_valid_I, cond_valid_J);
                vMax = _mm256_blendv_epi8(vMax, vWH, cond_all);
            }
            vJ = _mm256_add_epi64(vJ, vOne);
        }
        vI = _mm256_add_epi64(vI, vN);
        vIBoundary = _mm256_sub_epi64(vIBoundary, vGapN);
    }

    /* max in vMax */
    for (i=0; i<N; ++i) {
        int64_t value;
        value = (int64_t) _mm256_extract_epi64_rpl(vMax, 3);
        if (value > score) {
            score = value;
        }
        vMax = _mm256_slli_si256_rpl(vMax, 8);
    }

    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(_F_pr);
    parasail_free(_H_pr);
    parasail_free(s2B);
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        parasail_free(s1);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %rdi, 0xb0(%rsp)
testq %rdx, %rdx
je 0x4f917d
movl %ecx, %r13d
testl %ecx, %ecx
jle 0x4f91a1
movl %r8d, %ebp
testl %r8d, %r8d
js 0x4f91c5
movl %r9d, %r15d
testl %r9d, %r9d
js 0x4f91ff
movq 0x370(%rsp), %rcx
testq %rcx, %rcx
je 0x4f9220
movq %rdx, %r14
cmpl $0x0, 0x30(%rcx)
je 0x4f87b0
movl 0x34(%rcx), %esi
jmp 0x4f87c7
cmpq $0x0, 0xb0(%rsp)
je 0x4f9241
testl %esi, %esi
jle 0x4f9262
movslq 0x20(%rcx), %rax
movq %rcx, %rdx
movl %ebp, %ecx
movq %rcx, 0x190(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq %r12, %r8
subq %rax, %r8
movslq 0x1c(%rdx), %rdx
movq %rdx, 0x170(%rsp)
movq %rsi, %rdi
movl %ebp, %ebx
negl %ebx
cmpl %ebx, %eax
cmovgq %rcx, %r8
movq %r8, 0x28(%rsp)
movq %rsi, 0x10(%rsp)
movl %r13d, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x4f9288
movq %r15, 0x150(%rsp)
movl %ebp, 0x250(%rsp)
movq %r14, 0xd0(%rsp)
movq %rax, 0x18(%rsp)
orl $0x4841001, 0xc(%rax)   # imm = 0x4841001
movq %r13, 0xf0(%rsp)
leal 0x6(%r13), %r14d
pushq $0x20
popq %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1ab78c
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
callq 0x1ab78c
movq %rax, %r15
movq %r13, %rdi
movq %r14, %rsi
callq 0x1ab78c
movq %rax, %r10
movq %rbp, 0x20(%rsp)
testq %rbp, %rbp
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
testq %r10, %r10
sete %al
orb %cl, %al
jne 0x4f9288
movq %r15, %r9
movq 0x10(%rsp), %r14
movslq %r14d, %rbp
movq 0x370(%rsp), %rax
cmpl $0x0, 0x30(%rax)
movq %r15, 0x38(%rsp)
je 0x4f90f9
movq $0x0, 0x30(%rsp)
movq 0xd0(%rsp), %r8
movq 0x150(%rsp), %r14
movq 0xf0(%rsp), %r11
leal 0x3(%r11), %eax
movq 0x10(%rsp), %rcx
decl %ecx
movq %rcx, 0x10(%rsp)
leal -0x1(%r11), %ecx
movl %ecx, 0xc(%rsp)
subq 0x170(%rsp), %r12
addq $-0x2, %r12
vmovq %r12, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x270(%rsp)
vmovsd 0x190(%rsp), %xmm0
vbroadcastsd %xmm0, %ymm0
vmovups %ymm0, 0xf0(%rsp)
movl %r14d, %ecx
movq %rcx, 0x40(%rsp)
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0xd0(%rsp)
leal (,%r14,4), %ecx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x2d0(%rsp)
leaq -0x1(%rbp), %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x2b0(%rsp)
movl %r11d, %r11d
leaq -0x1(%r11), %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x2f0(%rsp)
leal (%r14,%r14), %ecx
imull $-0x3, %r14d, %edx
movq 0x28(%rsp), %rsi
incq %rsi
movq %rsi, 0x28(%rsp)
vmovq %rsi, %xmm0
movl %ebx, %esi
subl %r14d, %esi
movl %ebx, %edi
subl %ecx, %edi
subl 0x250(%rsp), %edx
vmovd %edx, %xmm1
vpinsrd $0x1, %edi, %xmm1, %xmm1
vpinsrd $0x2, %esi, %xmm1, %xmm1
vpinsrd $0x3, %ebx, %xmm1, %xmm1
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x110(%rsp)
vpmovsxdq %xmm1, %ymm0
vmovdqu %ymm0, 0x130(%rsp)
movq 0x370(%rsp), %r15
movq 0x10(%r15), %rcx
xorl %edx, %edx
movq 0x20(%rsp), %rdi
cmpq %rdx, %r11
je 0x4f8a1e
movzbl (%r8,%rdx), %esi
movslq (%rcx,%rsi,4), %rsi
movq %rsi, 0x18(%rdi,%rdx,8)
incq %rdx
jmp 0x4f8a06
xorl %ecx, %ecx
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
cmpq $0x3, %rcx
je 0x4f8a3f
andq $0x0, (%rdx,%rcx,8)
incq %rcx
jmp 0x4f8a2f
movq %r11, %rcx
movq 0x20(%rsp), %rdx
cmpl %ecx, %eax
jle 0x4f8a56
andq $0x0, 0x18(%rdx,%rcx,8)
incq %rcx
jmp 0x4f8a47
vmovdqu 0x130(%rsp), %ymm0
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %rdx
xorl %ecx, %ecx
movq %rdx, 0x50(%rsp)
cmpq %rcx, %r11
je 0x4f8a8b
movq %rdx, 0x18(%r9,%rcx,8)
movq %rdi, 0x18(%r10,%rcx,8)
incq %rcx
subq 0x40(%rsp), %rdx
jmp 0x4f8a72
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x4f8aa0
movq %rdi, (%r9,%rcx,8)
movq %rdi, (%r10,%rcx,8)
incq %rcx
jmp 0x4f8a8d
movq %r11, %rcx
cmpl %ecx, %eax
jle 0x4f8ab6
movq %rdi, 0x18(%r9,%rcx,8)
movq %rdi, 0x18(%r10,%rcx,8)
incq %rcx
jmp 0x4f8aa3
andq $0x0, 0x10(%r9)
vpxor %xmm0, %xmm0, %xmm0
vmovdqu 0x110(%rsp), %ymm1
vpblendd $0x3, %ymm0, %ymm1, %ymm0 # ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7]
vpermq $0x39, %ymm0, %ymm0     # ymm0 = ymm0[1,2,3,0]
vmovdqu %ymm0, 0x290(%rsp)
movl 0xc(%rsp), %ecx
movq %rcx, 0x70(%rsp)
movl %eax, %ecx
sarl $0x1f, %ecx
andnl %eax, %ecx, %eax
movq %rax, 0xa8(%rsp)
movl %esi, %eax
movq %rax, 0x48(%rsp)
leaq 0x2(%r11), %rax
movq %rax, 0x68(%rsp)
leaq 0x1(%r11), %rax
movq %rax, 0x60(%rsp)
vmovaps 0xd2ca7(%rip), %ymm0    # 0x5cb7c0
vmovups %ymm0, 0x1b0(%rsp)
xorl %r12d, %r12d
vmovdqu %ymm1, 0x1d0(%rsp)
vmovups 0x270(%rsp), %ymm0
vmovups %ymm0, 0x1f0(%rsp)
cmpq %rbp, %r12
jge 0x4f903a
movq %r12, %r14
orq $0x2, %r14
cmpl $0x0, 0x30(%r15)
je 0x4f8b91
movq %r12, %rbx
orq $0x1, %rbx
cmpq %rbp, %rbx
movq 0x10(%rsp), %rsi
movl %esi, %eax
cmovll %ebx, %eax
cltq
cmpq %rbp, %r14
movl %r14d, %ecx
cmovgel %esi, %ecx
movslq %ecx, %rcx
movq %r12, %r13
orq $0x3, %r13
cmpq %rbp, %r13
movl %r13d, %edx
cmovgel %esi, %edx
movslq %edx, %rdx
movq %r12, %rsi
jmp 0x4f8bb6
movq 0x30(%rsp), %rdx
movq (%rdx,%r12,8), %rsi
movq 0x8(%rdx,%r12,8), %rax
movq %r12, %rbx
orq $0x1, %rbx
movq (%rdx,%r14,8), %rcx
movq %r12, %r13
orq $0x3, %r13
movq 0x18(%rdx,%r12,8), %rdx
movq 0x8(%r15), %rdi
movslq 0x18(%r15), %r8
imulq %r8, %rax
leaq (%rdi,%rax,4), %rax
movq %rax, 0x90(%rsp)
imulq %r8, %rsi
leaq (%rdi,%rsi,4), %rax
movq %rax, 0x88(%rsp)
imulq %r8, %rcx
leaq (%rdi,%rcx,4), %rax
movq %rax, 0x80(%rsp)
imulq %r8, %rdx
leaq (%rdi,%rdx,4), %rax
movq %rax, 0x78(%rsp)
vpbroadcastq 0x10(%r9), %ymm0
vmovdqu 0x290(%rsp), %ymm2
vpblendd $0xc0, %ymm0, %ymm2, %ymm5 # ymm5 = ymm2[0,1,2,3,4,5],ymm0[6,7]
movq %r12, %rax
movq 0x40(%rsp), %rdx
imulq %rdx, %rax
movq 0x50(%rsp), %rsi
movq %rsi, %rcx
subq %rax, %rcx
vmovq %rcx, %xmm0
vpbroadcastq %xmm0, %ymm0
vpblendd $0xc0, %ymm0, %ymm2, %ymm4 # ymm4 = ymm2[0,1,2,3,4,5],ymm0[6,7]
leaq 0x4(%r12), %rax
movq %rax, 0x58(%rsp)
imulq %rdx, %rax
movq %rsi, %rcx
subq %rax, %rcx
movq %rcx, 0x10(%r9)
vmovdqu 0x1b0(%rsp), %ymm0
vpcmpeqq 0x2b0(%rsp), %ymm0, %ymm0
vmovdqu %ymm0, 0x310(%rsp)
xorl %r15d, %r15d
vmovdqu 0x110(%rsp), %ymm0
vmovdqa %ymm0, %ymm6
vpmovsxbq 0xd104a(%rip), %ymm3 # 0x5c9cce
movq %rbx, 0xa0(%rsp)
movq %r13, 0x98(%rsp)
cmpq %r15, 0xa8(%rsp)
je 0x4f8fee
movq %r14, %rbx
movq %r12, %r14
vmovdqu %ymm1, 0x250(%rsp)
movq %r11, %r12
movq %rbp, %r13
vpermq $0xf9, %ymm4, %ymm1     # ymm1 = ymm4[1,2,3,3]
vpbroadcastq 0x18(%r9,%r15,8), %ymm2
vpblendd $0xc0, %ymm2, %ymm1, %ymm2 # ymm2 = ymm1[0,1,2,3,4,5],ymm2[6,7]
vpermq $0xf9, %ymm0, %ymm0     # ymm0 = ymm0[1,2,3,3]
movq %r10, %rbp
vpbroadcastq 0x18(%r10,%r15,8), %ymm1
vpblendd $0xc0, %ymm1, %ymm0, %ymm1 # ymm1 = ymm0[0,1,2,3,4,5],ymm1[6,7]
vmovdqu %ymm2, 0x150(%rsp)
vpsubq 0xf0(%rsp), %ymm2, %ymm0
vpsubq 0xd0(%rsp), %ymm1, %ymm1
vmovdqu %ymm3, 0x170(%rsp)
vmovdqu %ymm4, 0xb0(%rsp)
vmovdqu %ymm5, 0x230(%rsp)
vmovdqu %ymm6, 0x210(%rsp)
callq 0x4f929c
vmovdqu %ymm0, 0x190(%rsp)
vmovdqu 0xb0(%rsp), %ymm0
vpsubq 0xf0(%rsp), %ymm0, %ymm0
vmovdqu 0x210(%rsp), %ymm1
vpsubq 0xd0(%rsp), %ymm1, %ymm1
callq 0x4f929c
vmovdqa %ymm0, %ymm3
movq 0x20(%rsp), %rsi
movq 0x18(%rsi,%r15,8), %rax
movq 0x88(%rsp), %rcx
movslq (%rcx,%rax,4), %rax
movq 0x10(%rsi,%r15,8), %rcx
movq 0x90(%rsp), %rdx
movslq (%rdx,%rcx,4), %rcx
movq (%rsi,%r15,8), %rdx
movq 0x8(%rsi,%r15,8), %rsi
movq 0x80(%rsp), %rdi
movslq (%rdi,%rsi,4), %rsi
movq 0x78(%rsp), %rdi
movslq (%rdi,%rdx,4), %rdx
vmovq %rax, %xmm0
vmovq %rcx, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rsi, %xmm1
vmovq %rdx, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm0
vpaddq 0x230(%rsp), %ymm0, %ymm0
vmovdqu %ymm3, 0x230(%rsp)
vmovdqa %ymm3, %ymm1
callq 0x4f929c
vmovupd 0x190(%rsp), %ymm1
callq 0x4f929c
vmovdqu 0x170(%rsp), %ymm3
vpcmpeqq 0xd2c84(%rip), %ymm3, %ymm5 # 0x5cba80
vblendvpd %ymm5, 0x130(%rsp), %ymm0, %ymm4
cmpq $0x4, %r15
jb 0x4f8e72
vmovdqu 0x1f0(%rsp), %ymm1
vpcmpgtq %ymm1, %ymm4, %ymm0
vblendvpd %ymm0, %ymm1, %ymm4, %ymm1
vmovupd %ymm1, 0x1f0(%rsp)
vmovupd 0x1d0(%rsp), %ymm0
vmovapd %ymm4, %ymm1
vmovups %ymm4, 0xb0(%rsp)
vmovups %ymm5, 0x210(%rsp)
callq 0x4f929c
vmovupd 0x210(%rsp), %ymm5
vmovupd 0xb0(%rsp), %ymm4
vmovdqu 0x170(%rsp), %ymm3
vmovupd %ymm0, 0x1d0(%rsp)
movq 0x18(%rsp), %rax
movq %r12, %r11
movq 0x48(%rsp), %rdi
movq %r14, %r12
cmpq %rdi, %r14
setne %dl
movq 0x10(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %r11, %r15
setae %sil
orb %dl, %sil
vextractf128 $0x1, %ymm4, %xmm0
movq 0x38(%rsp), %r9
movq %rbp, %r10
jne 0x4f8eb4
vextractps $0x2, %xmm0, (%rcx,%r15,4)
cmpq %r15, 0x70(%rsp)
movq %r13, %rbp
movq %rbx, %r14
jne 0x4f8ec8
vextractps $0x2, %xmm0, (%rax,%r12,4)
movq 0xa0(%rsp), %rbx
cmpq %rdi, %rbx
setne %dl
leaq -0x1(%r15), %rsi
cmpq %r11, %rsi
setae %sil
orb %dl, %sil
movq 0x98(%rsp), %r13
jne 0x4f8ef5
vmovss %xmm0, -0x4(%rcx,%r15,4)
cmpq %rbp, %rbx
setge %dl
cmpq %r15, %r11
setne %sil
orb %dl, %sil
jne 0x4f8f0c
vmovss %xmm0, (%rax,%rbx,4)
cmpq %rdi, %r14
jne 0x4f8f33
leaq -0x2(%r15), %rdx
cmpq $0x2, %r15
setae %sil
cmpq %r11, %rdx
setl %dl
andb %sil, %dl
cmpb $0x1, %dl
jne 0x4f8f33
vextractps $0x2, %xmm4, -0x8(%rcx,%r15,4)
cmpq %rbp, %r14
setge %dl
cmpq %r15, 0x60(%rsp)
setne %sil
orb %dl, %sil
jne 0x4f8f4e
vextractps $0x2, %xmm4, (%rax,%r14,4)
cmpq %rdi, %r13
setne %dl
cmpq $0x3, %r15
setb %sil
orb %dl, %sil
jne 0x4f8f68
vmovss %xmm4, -0xc(%rcx,%r15,4)
cmpq %rbp, %r13
setge %cl
cmpq %r15, 0x68(%rsp)
setne %dl
orb %cl, %dl
jne 0x4f8f80
vmovss %xmm4, (%rax,%r13,4)
vmovupd 0x110(%rsp), %ymm1
vmovupd 0x190(%rsp), %ymm0
vblendvpd %ymm5, %ymm1, %ymm0, %ymm0
vmovupd 0x230(%rsp), %ymm2
vblendvpd %ymm5, %ymm1, %ymm2, %ymm6
vmovlpd %xmm4, (%r9,%r15,8)
vmovlpd %xmm0, (%r10,%r15,8)
vpcmpeqq 0x2f0(%rsp), %ymm3, %ymm1
vpand 0x310(%rsp), %ymm1, %ymm1
vmovupd 0x250(%rsp), %ymm2
vblendvpd %ymm1, %ymm4, %ymm2, %ymm1
vpsubq 0xd2aa3(%rip), %ymm3, %ymm3 # 0x5cba80
incq %r15
vmovdqu 0x150(%rsp), %ymm5
jmp 0x4f8c94
vpbroadcastq 0xd2aa9(%rip), %ymm0 # 0x5cbaa0
vmovdqu 0x1b0(%rsp), %ymm2
vpaddq %ymm0, %ymm2, %ymm2
vmovdqu %ymm2, 0x1b0(%rsp)
vmovdqu 0x130(%rsp), %ymm0
vpsubq 0x2d0(%rsp), %ymm0, %ymm0
vmovdqu %ymm0, 0x130(%rsp)
movq 0x58(%rsp), %r12
movq 0x370(%rsp), %r15
jmp 0x4f8b40
pushq $0x4
popq %rax
movq 0x10(%rsp), %rdx
movq 0x28(%rsp), %rsi
subl $0x1, %eax
jb 0x4f906d
vextracti128 $0x1, %ymm1, %xmm0
vpextrq $0x1, %xmm0, %rcx
cmpq %rsi, %rcx
cmovgq %rcx, %rsi
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]
jmp 0x4f9047
vmovdqu 0x110(%rsp), %ymm0
vpcmpgtq 0x1f0(%rsp), %ymm0, %ymm0
vmovdqu 0x1d0(%rsp), %ymm1
vpcmpgtq 0x270(%rsp), %ymm1, %ymm1
vpor %ymm1, %ymm0, %ymm0
vtestpd %ymm0, %ymm0
movq 0x18(%rsp), %rax
je 0x4f90b3
orb $0x40, 0xc(%rax)
xorl %esi, %esi
movl $0x0, 0xc(%rsp)
xorl %edx, %edx
movl %esi, (%rax)
movl %edx, 0x4(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq %r10, %rdi
vzeroupper
callq 0x1ab763
movq 0x38(%rsp), %rdi
callq 0x1ab763
movq 0x20(%rsp), %rdi
callq 0x1ab763
cmpl $0x0, 0x30(%r15)
jne 0x4f90ef
movq 0x30(%rsp), %rdi
callq 0x1ab763
movq 0x18(%rsp), %rax
jmp 0x4f928a
movq %r10, %r15
leal 0x3(%r14), %eax
movslq %eax, %r13
pushq $0x20
popq %rdi
movq %r13, %rsi
callq 0x1ab78c
movq %rax, 0x30(%rsp)
testq %rax, %rax
movq 0xf0(%rsp), %r11
je 0x4f9288
movl %r14d, %eax
sarl $0x1f, %eax
andnl %r14d, %eax, %eax
xorl %ecx, %ecx
movq 0x38(%rsp), %r9
movq %r15, %r10
movq 0x30(%rsp), %rdi
movq 0xd0(%rsp), %r8
movq 0x150(%rsp), %r14
movq 0xb0(%rsp), %r15
cmpq %rcx, %rax
je 0x4f91e9
movq 0x370(%rsp), %rdx
movq 0x10(%rdx), %rdx
movzbl (%r15,%rcx), %esi
movslq (%rdx,%rsi,4), %rdx
movq %rdx, (%rdi,%rcx,8)
incq %rcx
jmp 0x4f9156
movq 0x241e54(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xcde5d(%rip), %rsi     # 0x5c6feb
leaq 0x8d349(%rip), %rdx     # 0x5864de
leaq 0xce561(%rip), %rcx     # 0x5c76fd
jmp 0x4f9281
movq 0x241e30(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xce54f(%rip), %rsi     # 0x5c7701
leaq 0x8d325(%rip), %rdx     # 0x5864de
leaq 0xce555(%rip), %rcx     # 0x5c7715
jmp 0x4f9281
movq 0x241e0c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xce545(%rip), %rsi     # 0x5c771b
leaq 0x8d301(%rip), %rdx     # 0x5864de
leaq 0xce54c(%rip), %rcx     # 0x5c7730
jmp 0x4f9281
movq %rbp, %rax
cmpq %r13, %rax
jge 0x4f88e2
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x4f91ec
movq 0x241dd2(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xce50b(%rip), %rsi     # 0x5c771b
leaq 0x8d2c7(%rip), %rdx     # 0x5864de
leaq 0xce517(%rip), %rcx     # 0x5c7735
jmp 0x4f9281
movq 0x241db1(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xcddba(%rip), %rsi     # 0x5c6feb
leaq 0x8d2a6(%rip), %rdx     # 0x5864de
leaq 0xce703(%rip), %rcx     # 0x5c7942
jmp 0x4f9281
movq 0x241d90(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xcdd99(%rip), %rsi     # 0x5c6feb
leaq 0x8d285(%rip), %rdx     # 0x5864de
leaq 0xce4d9(%rip), %rcx     # 0x5c7739
jmp 0x4f9281
movq 0x241d6f(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0xce48e(%rip), %rsi     # 0x5c7701
leaq 0x8d264(%rip), %rdx     # 0x5864de
leaq 0xce4bc(%rip), %rcx     # 0x5c773d
xorl %eax, %eax
callq 0x19e180
xorl %eax, %eax
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq