// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_trace_diag_avx2_256_64.c
// Function: parasail_sw_trace_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_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 s1Len = 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 vNegInf0;
    __m256i vOpen;
    __m256i vGap;
    __m256i vZero;
    __m256i vOne;
    __m256i vN;
    __m256i vNegOne;
    __m256i vI;
    __m256i vJreset;
    __m256i vMaxH;
    __m256i vEndI;
    __m256i vEndJ;
    __m256i vILimit;
    __m256i vJLimit;
    __m256i vTDiag;
    __m256i vTIns;
    __m256i vTDel;
    __m256i vTZero;
    __m256i vTDiagE;
    __m256i vTInsE;
    __m256i vTDiagF;
    __m256i vTDelF;

    /* 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 = 0;
    end_ref = 0;
    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);
    vNegInf0 = _mm256_srli_si256_rpl(vNegInf, 8); /* shift in a 0 */
    vOpen = _mm256_set1_epi64x_rpl(open);
    vGap  = _mm256_set1_epi64x_rpl(gap);
    vZero = _mm256_set1_epi64x_rpl(0);
    vOne = _mm256_set1_epi64x_rpl(1);
    vN = _mm256_set1_epi64x_rpl(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);
    vMaxH = vNegInf;
    vEndI = vNegInf;
    vEndJ = vNegInf;
    vILimit = _mm256_set1_epi64x_rpl(s1Len);
    vJLimit = _mm256_set1_epi64x_rpl(s2Len);
    vTDiag = _mm256_set1_epi64x_rpl(PARASAIL_DIAG);
    vTIns = _mm256_set1_epi64x_rpl(PARASAIL_INS);
    vTDel = _mm256_set1_epi64x_rpl(PARASAIL_DEL);
    vTZero = _mm256_set1_epi64x_rpl(PARASAIL_ZERO);
    vTDiagE = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_E);
    vTInsE = _mm256_set1_epi64x_rpl(PARASAIL_INS_E);
    vTDiagF = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_F);
    vTDelF = _mm256_set1_epi64x_rpl(PARASAIL_DEL_F);

    /* initialize result */
    result = parasail_result_new_trace(s1Len, s2Len, 32, sizeof(int8_t));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_4;

    /* 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] = 0;
        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;
    }

    /* iterate over query sequence */
    for (i=0; i<s1Len; i+=N) {
        __m256i vNH = vNegInf0;
        __m256i vWH = vNegInf0;
        __m256i vE = vNegInf;
        __m256i vE_opn = vNegInf;
        __m256i vE_ext = vNegInf;
        __m256i vF = vNegInf;
        __m256i vF_opn = vNegInf;
        __m256i vF_ext = 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))];
        __m256i vIltLimit = _mm256_cmplt_epi64_rpl(vI, vILimit);
        /* 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_opn = _mm256_sub_epi64(vNH, vOpen);
            vF_ext = _mm256_sub_epi64(vF, vGap);
            vF = _mm256_max_epi64_rpl(vF_opn, vF_ext);
            vE_opn = _mm256_sub_epi64(vWH, vOpen);
            vE_ext = _mm256_sub_epi64(vE, vGap);
            vE = _mm256_max_epi64_rpl(vE_opn, vE_ext);
            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);
            vNWH = _mm256_max_epi64_rpl(vNWH, vZero);
            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_andnot_si256(cond, vWH);
                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);
            }
            /* trace table */
            {
                __m256i cond_zero = _mm256_cmpeq_epi64(vWH, vZero);
                __m256i case1 = _mm256_cmpeq_epi64(vWH, vNWH);
                __m256i case2 = _mm256_cmpeq_epi64(vWH, vF);
                __m256i vT = _mm256_blendv_epi8(
                        _mm256_blendv_epi8(vTIns, vTDel, case2),
                        _mm256_blendv_epi8(vTDiag, vTZero, cond_zero),
                        case1);
                __m256i condE = _mm256_cmpgt_epi64(vE_opn, vE_ext);
                __m256i condF = _mm256_cmpgt_epi64(vF_opn, vF_ext);
                __m256i vET = _mm256_blendv_epi8(vTInsE, vTDiagE, condE);
                __m256i vFT = _mm256_blendv_epi8(vTDelF, vTDiagF, condF);
                vT = _mm256_or_si256(vT, vET);
                vT = _mm256_or_si256(vT, vFT);
                arr_store_si256(result->trace->trace_table, vT, i, s1Len, j, s2Len);
            }
            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
             * max values within the i,j bounds */
            {
                __m256i cond_valid_J = _mm256_and_si256(
                        _mm256_cmpgt_epi64(vJ, vNegOne),
                        _mm256_cmplt_epi64_rpl(vJ, vJLimit));
                __m256i cond_valid_IJ = _mm256_and_si256(cond_valid_J, vIltLimit);
                __m256i cond_eq = _mm256_cmpeq_epi64(vWH, vMaxH);
                __m256i cond_max = _mm256_cmpgt_epi64(vWH, vMaxH);
                __m256i cond_all = _mm256_and_si256(cond_max, cond_valid_IJ);
                __m256i cond_Jlt = _mm256_cmplt_epi64_rpl(vJ, vEndJ);
                vMaxH = _mm256_blendv_epi8(vMaxH, vWH, cond_all);
                vEndI = _mm256_blendv_epi8(vEndI, vI, cond_all);
                vEndJ = _mm256_blendv_epi8(vEndJ, vJ, cond_all);
                cond_all = _mm256_and_si256(cond_Jlt, cond_eq);
                cond_all = _mm256_and_si256(cond_all, cond_valid_IJ);
                vEndI = _mm256_blendv_epi8(vEndI, vI, cond_all);
                vEndJ = _mm256_blendv_epi8(vEndJ, vJ, cond_all);
            }
            vJ = _mm256_add_epi64(vJ, vOne);
        }
        vI = _mm256_add_epi64(vI, vN);
    }

    /* alignment ending position */
    {
        int64_t *t = (int64_t*)&vMaxH;
        int64_t *i = (int64_t*)&vEndI;
        int64_t *j = (int64_t*)&vEndJ;
        int32_t k;
        for (k=0; k<N; ++k, ++t, ++i, ++j) {
            if (*t > score) {
                score = *t;
                end_query = *i;
                end_ref = *j;
            }
            else if (*t == score) {
                if (*j < end_ref) {
                    end_query = *i;
                    end_ref = *j;
                }
                else if (*j == end_ref && *i < end_query) {
                    end_query = *i;
                    end_ref = *j;
                }
            }
        }
    }

    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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
andq $-0x20, %rsp
subq $0x3e0, %rsp            # imm = 0x3E0
testq %rdx, %rdx
je 0x57f132
movl %ecx, %r13d
testl %ecx, %ecx
jle 0x57f139
testl %r8d, %r8d
js 0x57f140
movl %r9d, %r15d
testl %r9d, %r9d
js 0x57f147
movq 0x10(%rbp), %r14
testq %r14, %r14
je 0x57f14e
movl 0x30(%r14), %eax
testl %eax, %eax
jne 0x57e4c5
testq %rdi, %rdi
je 0x57f155
movl %esi, %ebx
testl %esi, %esi
jle 0x57f15c
testl %eax, %eax
je 0x57e4c9
movl 0x34(%r14), %ebx
movq %rdi, 0x1e0(%rsp)
movq %rdx, 0x220(%rsp)
movslq 0x20(%r14), %rax
movl %r8d, %r12d
negl %r8d
movq %r12, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq %rax, %rdx
cmpl %r8d, %eax
cmovgq %rcx, %rdx
incq %rdx
movslq 0x1c(%r14), %rax
movq %rax, 0x200(%rsp)
movq %rdx, 0x40(%rsp)
vmovq %rdx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x240(%rsp)
vmovdqa %ymm0, 0xe0(%rsp)
vmovdqa %ymm0, 0x1c0(%rsp)
vmovdqa %ymm0, 0x180(%rsp)
movl $0x20, %edx
movl $0x1, %ecx
movl %ebx, %edi
movl %r13d, %esi
vzeroupper
callq 0x2097d1
testq %rax, %rax
je 0x57f161
movq %r12, 0x140(%rsp)
movl %r15d, 0xc0(%rsp)
movq %rbx, 0x160(%rsp)
movq %rax, 0x30(%rsp)
orl $0x4881004, 0xc(%rax)   # imm = 0x4881004
leal 0x6(%r13), %r12d
movl $0x20, %edi
movq %r12, %rsi
callq 0x2094de
movq %rax, %r15
movl $0x20, %edi
movq %r12, %rsi
callq 0x2094de
movq %rax, %rbx
movl $0x20, %edi
movq %r12, %rsi
callq 0x2094de
testq %r15, %r15
sete %dl
testq %rbx, %rbx
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x57f161
movq %r15, %rsi
movq 0x160(%rsp), %r15
movslq %r15d, %r12
cmpl $0x0, 0x30(%r14)
movq %rsi, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %rax, 0x10(%rsp)
je 0x57e5fb
xorl %r14d, %r14d
jmp 0x57e66e
leal 0x3(%r15), %ebx
movslq %ebx, %rsi
movl $0x20, %edi
callq 0x2094de
testq %rax, %rax
je 0x57f161
movq %rax, %r14
testl %r15d, %r15d
movq 0x1e0(%rsp), %rdi
jle 0x57e646
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl %r15d, %ecx
xorl %edx, %edx
movzbl (%rdi,%rdx), %esi
movslq (%rax,%rsi,4), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x57e632
leal 0x1(%r15), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
leaq (%r14,%r12,8), %rdi
movl %r15d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x8(,%rcx,8), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x20(%rsp), %rsi
leal 0x3(%r13), %r15d
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x200(%rsp), %rax
addq $-0x2, %rax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x1a0(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vpblendd $0x3f, 0x1c0(%rsp), %ymm0, %ymm0 # ymm0 = mem[0,1,2,3,4,5],ymm0[6,7]
vmovdqa %ymm0, 0x280(%rsp)
vmovsd 0x140(%rsp), %xmm0
vbroadcastsd %xmm0, %ymm0
vmovaps %ymm0, 0x380(%rsp)
movl 0xc0(%rsp), %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x360(%rsp)
vmovq %r12, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x260(%rsp)
movl %r13d, %edi
vmovq %rdi, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqa %ymm0, 0x340(%rsp)
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, %r13d
movl $0x1, %r12d
cmovgel %r13d, %r12d
xorl %ecx, %ecx
movq 0x220(%rsp), %r8
movzbl (%r8,%rcx), %edx
movslq (%rax,%rdx,4), %rdx
movq %rdx, 0x18(%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x57e72d
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leal 0x1(%r13), %eax
cmpl %eax, %r15d
cmovgl %r15d, %eax
movq %rdi, 0x18(%rsp)
leaq (%rsi,%rdi,8), %rdi
addq $0x18, %rdi
movl %r13d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x8(,%rcx,8), %rdx
xorl %ebx, %ebx
xorl %esi, %esi
vzeroupper
callq 0x19e090
movq 0x40(%rsp), %r9
movq 0x28(%rsp), %r11
movq 0x10(%rsp), %rcx
movq $0x0, 0x18(%r11,%rbx,8)
movq %r9, 0x18(%rcx,%rbx,8)
incq %rbx
cmpq %rbx, %r12
jne 0x57e795
movq %r14, 0x38(%rsp)
xorl %eax, %eax
movq 0x160(%rsp), %rsi
movq %r9, (%r11,%rax,8)
movq %r9, (%rcx,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x57e7ba
movq 0x18(%rsp), %rdx
leaq 0x3(%rdx), %rax
movq 0x30(%rsp), %r14
vmovdqa 0x1c0(%rsp), %ymm8
movq %r9, (%r11,%rax,8)
movq %r9, (%rcx,%rax,8)
incq %rax
incl %r13d
cmpl %r13d, %r15d
jg 0x57e7e2
vmovapd 0x240(%rsp), %ymm11
vmovapd 0x180(%rsp), %ymm12
vmovapd 0xe0(%rsp), %ymm4
testl %esi, %esi
jle 0x57f025
leal -0x1(%rsi), %eax
movl %eax, 0xc(%rsp)
cmpl $0x2, %r15d
movl $0x1, %eax
cmovgel %r15d, %eax
movq %rax, 0x90(%rsp)
movl %esi, %ebx
leaq (,%rdx,4), %rax
movq %rax, 0x78(%rsp)
leaq -0x1(%rdx), %rax
movq %rax, 0x60(%rsp)
leaq -0x3(%rdx,%rdx,2), %rax
movq %rax, 0x50(%rsp)
leaq -0x2(%rdx,%rdx), %rax
movq %rax, 0x48(%rsp)
vmovaps 0x7ae58(%rip), %ymm0    # 0x5f96c0
vmovaps %ymm0, 0xc0(%rsp)
movq $0x0, 0x58(%rsp)
vbroadcastsd 0x7787d(%rip), %ymm0 # 0x5f6100
vmovaps %ymm0, 0x320(%rsp)
vbroadcastsd 0x7b0eb(%rip), %ymm0 # 0x5f9980
vmovaps %ymm0, 0x140(%rsp)
vbroadcastsd 0x7cae1(%rip), %ymm0 # 0x5fb388
vmovaps %ymm0, 0x300(%rsp)
vbroadcastsd 0x7cad7(%rip), %ymm0 # 0x5fb390
vmovaps %ymm0, 0x2e0(%rsp)
vbroadcastsd 0x7cacd(%rip), %ymm0 # 0x5fb398
vmovaps %ymm0, 0x2c0(%rsp)
vbroadcastsd 0x7cac3(%rip), %ymm0 # 0x5fb3a0
vmovaps %ymm0, 0x2a0(%rsp)
xorl %r10d, %r10d
vmovdqa 0x1a0(%rsp), %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovdqa %ymm8, 0x120(%rsp)
movq %rbx, 0x88(%rsp)
movq 0x10(%rbp), %rdx
movl 0x30(%rdx), %esi
movq %r10, %rcx
testl %esi, %esi
movq 0x38(%rsp), %r8
jne 0x57e923
movq (%r8,%r10,8), %rcx
movq %r10, %r12
orq $0x1, %r12
testl %esi, %esi
je 0x57e93d
cmpq %rbx, %r12
movl 0xc(%rsp), %eax
cmovbl %r12d, %eax
cltq
jmp 0x57e941
movq (%r8,%r12,8), %rax
movq %r10, %r9
orq $0x2, %r9
testl %esi, %esi
je 0x57e95c
cmpq %rbx, %r9
movl 0xc(%rsp), %edi
cmovbl %r9d, %edi
movslq %edi, %rdi
jmp 0x57e960
movq (%r8,%r9,8), %rdi
movq %r10, %r15
orq $0x3, %r15
testl %esi, %esi
movq %r9, 0x68(%rsp)
movq %r10, 0x80(%rsp)
je 0x57e988
cmpq %rbx, %r15
movl 0xc(%rsp), %esi
cmovbl %r15d, %esi
movslq %esi, %rsi
jmp 0x57e98c
movq (%r8,%r15,8), %rsi
movq 0x8(%rdx), %r8
movslq 0x18(%rdx), %r9
imulq %r9, %rcx
leaq (%r8,%rcx,4), %rcx
movq %rcx, 0xb0(%rsp)
imulq %r9, %rax
leaq (%r8,%rax,4), %rax
movq %rax, 0xa8(%rsp)
imulq %r9, %rdi
leaq (%r8,%rdi,4), %rax
movq %rax, 0xa0(%rsp)
imulq %r9, %rsi
leaq (%r8,%rsi,4), %rax
movq %rax, 0x98(%rsp)
vmovdqa 0x260(%rsp), %ymm0
vpcmpgtq 0xc0(%rsp), %ymm0, %ymm0
vmovdqa %ymm0, 0x3a0(%rsp)
xorl %r10d, %r10d
vpmovsxbq 0x791b6(%rip), %ymm6 # 0x5f7bb2
vmovdqa %ymm8, %ymm13
vmovdqa %ymm8, %ymm10
vmovdqa 0x280(%rsp), %ymm0
vmovdqa %ymm0, %ymm9
vmovdqa %ymm0, %ymm5
movq 0x10(%rsp), %rdx
movq %r12, 0x70(%rsp)
movq %r15, 0xb8(%rsp)
vmovapd %ymm4, 0x160(%rsp)
vmovapd %ymm12, 0x200(%rsp)
vmovapd %ymm11, 0x220(%rsp)
vpermq $0xf9, %ymm9, %ymm7     # ymm7 = ymm9[1,2,3,3]
vpbroadcastq 0x18(%r11,%r10,8), %ymm8
vpblendd $0xc0, %ymm8, %ymm7, %ymm1 # ymm1 = ymm7[0,1,2,3,4,5],ymm8[6,7]
vpermq $0xf9, %ymm13, %ymm7    # ymm7 = ymm13[1,2,3,3]
vpbroadcastq 0x18(%rdx,%r10,8), %ymm11
vpblendd $0xc0, %ymm11, %ymm7, %ymm7 # ymm7 = ymm7[0,1,2,3,4,5],ymm11[6,7]
vmovdqa 0x380(%rsp), %ymm0
vmovdqa %ymm1, 0x1e0(%rsp)
vpsubq %ymm0, %ymm1, %ymm11
vmovdqa 0x360(%rsp), %ymm1
vpsubq %ymm1, %ymm7, %ymm12
vmovq %xmm11, %rax
vmovq %xmm12, %r12
cmpq %r12, %rax
cmovgq %rax, %r12
vpextrq $0x1, %xmm11, %rax
vpextrq $0x1, %xmm12, %r8
cmpq %r8, %rax
cmovgq %rax, %r8
vextracti128 $0x1, %ymm11, %xmm7
vmovq %xmm7, %rax
vextracti128 $0x1, %ymm12, %xmm13
vmovq %xmm13, %r9
cmpq %r9, %rax
cmovgq %rax, %r9
vpextrq $0x1, %xmm7, %rax
vpextrq $0x1, %xmm13, %rdi
cmpq %rdi, %rax
cmovgq %rax, %rdi
vpsubq %ymm0, %ymm9, %ymm14
vpsubq %ymm1, %ymm10, %ymm10
vmovq %xmm14, %rax
vmovq %xmm10, %rcx
cmpq %rcx, %rax
cmovgq %rax, %rcx
vpextrq $0x1, %xmm14, %rax
vpextrq $0x1, %xmm10, %r13
cmpq %r13, %rax
cmovgq %rax, %r13
movq 0x20(%rsp), %rdx
movq 0x18(%rdx,%r10,8), %rax
movq 0xb0(%rsp), %rsi
movslq (%rsi,%rax,4), %rax
movq 0x10(%rdx,%r10,8), %rsi
movq 0xa8(%rsp), %r11
movslq (%r11,%rsi,4), %rsi
movq (%rdx,%r10,8), %r11
movq 0x8(%rdx,%r10,8), %rbx
movq 0xa0(%rsp), %rdx
movslq (%rdx,%rbx,4), %rbx
movq 0x98(%rsp), %rdx
movslq (%rdx,%r11,4), %r11
vmovq %rax, %xmm7
vmovq %rsi, %xmm9
vpunpcklqdq %xmm7, %xmm9, %xmm7 # xmm7 = xmm9[0],xmm7[0]
vmovq %rbx, %xmm9
vmovq %r11, %xmm13
vpunpcklqdq %xmm9, %xmm13, %xmm9 # xmm9 = xmm13[0],xmm9[0]
vinserti128 $0x1, %xmm7, %ymm9, %ymm7
vpaddq %ymm5, %ymm7, %ymm5
vextracti128 $0x1, %ymm14, %xmm7
vmovq %xmm7, %rax
vextracti128 $0x1, %ymm10, %xmm9
vmovq %xmm9, %r15
cmpq %r15, %rax
cmovgq %rax, %r15
vpextrq $0x1, %xmm7, %rax
vpextrq $0x1, %xmm9, %rsi
cmpq %rsi, %rax
cmovgq %rax, %rsi
vmovq %xmm5, %rax
movq %rax, %r11
sarq $0x3f, %r11
andnq %rax, %r11, %r11
vpextrq $0x1, %xmm5, %rax
movq %rax, %rbx
sarq $0x3f, %rbx
andnq %rax, %rbx, %rax
vextracti128 $0x1, %ymm5, %xmm5
vmovq %xmm5, %rbx
movq %rbx, %r14
sarq $0x3f, %r14
andnq %rbx, %r14, %rbx
vpextrq $0x1, %xmm5, %rdx
movq %rdx, %r14
sarq $0x3f, %r14
andnq %rdx, %r14, %r14
vmovq %r12, %xmm7
vmovq %r14, %xmm5
vmovq %r11, %xmm9
cmpq %rcx, %r11
cmovleq %rcx, %r11
vmovq %rax, %xmm13
cmpq %r13, %rax
cmovleq %r13, %rax
vmovq %rbx, %xmm15
cmpq %r15, %rbx
cmovleq %r15, %rbx
cmpq %rsi, %r14
cmovleq %rsi, %r14
cmpq %r12, %r11
cmovleq %r12, %r11
vmovq %r8, %xmm0
cmpq %r8, %rax
cmovleq %r8, %rax
vmovq %r9, %xmm4
cmpq %r9, %rbx
cmovleq %r9, %rbx
vmovq %rdi, %xmm8
cmpq %rdi, %r14
cmovleq %rdi, %r14
vmovq %r14, %xmm3
vmovq %rbx, %xmm2
vmovq %rax, %xmm1
vpunpcklqdq %xmm8, %xmm4, %xmm4 # xmm4 = xmm4[0],xmm8[0]
vmovq %r11, %xmm8
vpunpcklqdq %xmm0, %xmm7, %xmm0 # xmm0 = xmm7[0],xmm0[0]
vinserti128 $0x1, %xmm4, %ymm0, %ymm0
vpunpcklqdq %xmm5, %xmm15, %xmm4 # xmm4 = xmm15[0],xmm5[0]
vpunpcklqdq %xmm13, %xmm9, %xmm5 # xmm5 = xmm9[0],xmm13[0]
vinserti128 $0x1, %xmm4, %ymm5, %ymm7
vpunpcklqdq %xmm3, %xmm2, %xmm2 # xmm2 = xmm2[0],xmm3[0]
vpunpcklqdq %xmm1, %xmm8, %xmm1 # xmm1 = xmm8[0],xmm1[0]
vmovapd 0x1c0(%rsp), %ymm8
vinserti128 $0x1, %xmm2, %ymm1, %ymm15
vpcmpeqq 0x7adf6(%rip), %ymm6, %ymm5 # 0x5f9aa0
vpandn %ymm15, %ymm5, %ymm9
vblendvpd %ymm5, %ymm8, %ymm0, %ymm13
cmpq $0x4, %r10
vpcmpeqd %ymm4, %ymm4, %ymm4
jb 0x57edb7
vmovdqa 0x100(%rsp), %ymm0
vmovq %xmm0, %r8
vmovq %xmm9, %rdi
cmpq %rdi, %r8
cmovgeq %rdi, %r8
vpextrq $0x1, %xmm0, %rbx
vpextrq $0x1, %xmm9, %rax
cmpq %rax, %rbx
cmovgeq %rax, %rbx
vextracti128 $0x1, %ymm0, %xmm0
vmovq %xmm0, %rdx
vextracti128 $0x1, %ymm9, %xmm1
vmovq %xmm1, %r9
cmpq %r9, %rdx
cmovgeq %r9, %rdx
vpextrq $0x1, %xmm0, %r14
vpextrq $0x1, %xmm1, %r11
cmpq %r11, %r14
cmovgeq %r11, %r14
vmovq %r14, %xmm0
vmovq %rdx, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovdqa 0x120(%rsp), %ymm3
vmovq %xmm3, %rdx
cmpq %rdi, %rdx
cmovgq %rdx, %rdi
vpextrq $0x1, %xmm3, %rdx
vmovq %rbx, %xmm1
cmpq %rax, %rdx
cmovgq %rdx, %rax
vmovq %r8, %xmm2
vextracti128 $0x1, %ymm3, %xmm3
vmovq %xmm3, %rdx
cmpq %r9, %rdx
cmovgq %rdx, %r9
vpextrq $0x1, %xmm3, %rdx
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
cmpq %r11, %rdx
cmovgq %rdx, %r11
vinserti128 $0x1, %xmm0, %ymm1, %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovq %r11, %xmm0
vmovq %r9, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rax, %xmm1
vmovq %rdi, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm0
vmovdqa %ymm0, 0x120(%rsp)
movq 0x30(%rsp), %r14
movq 0x18(%rsp), %r8
movq 0x70(%rsp), %r12
movq 0x68(%rsp), %r9
vpcmpeqq %ymm7, %ymm9, %ymm0
vpcmpeqq %ymm13, %ymm9, %ymm1
vmovdqa 0x320(%rsp), %ymm2
vpsubq %ymm1, %ymm2, %ymm1
vpcmpeqq 0x7a8f5(%rip), %ymm9, %ymm2 # 0x5f96e0
vpandn 0x140(%rsp), %ymm2, %ymm2
vblendvpd %ymm0, %ymm2, %ymm1, %ymm0
vpcmpgtq %ymm10, %ymm14, %ymm1
vmovapd 0x2e0(%rsp), %ymm2
vblendvpd %ymm1, 0x300(%rsp), %ymm2, %ymm1
vpcmpgtq %ymm12, %ymm11, %ymm2
vmovapd 0x2a0(%rsp), %ymm3
vblendvpd %ymm2, 0x2c0(%rsp), %ymm3, %ymm2
vorpd %ymm1, %ymm2, %ymm1
vorpd %ymm0, %ymm1, %ymm7
movq 0x10(%r14), %rax
movq (%rax), %rdi
vextractf128 $0x1, %ymm7, %xmm10
cmpq %r8, %r10
movq 0x28(%rsp), %r11
movq 0x88(%rsp), %rbx
jae 0x57ee62
movq 0x58(%rsp), %rax
addq %rdi, %rax
vpextrb $0x8, %xmm10, (%r10,%rax)
cmpq %rbx, %r12
setae %al
leaq -0x1(%r10), %rdx
cmpq %r8, %rdx
setae %dl
orb %al, %dl
vmovdqa 0x220(%rsp), %ymm11
vmovdqa 0x200(%rsp), %ymm12
jne 0x57ee97
movq 0x60(%rsp), %rax
addq %rdi, %rax
vpextrb $0x0, %xmm10, (%r10,%rax)
cmpq %rbx, %r9
jae 0x57eec2
leaq -0x2(%r10), %rax
cmpq $0x2, %r10
setae %dl
cmpq %r8, %rax
setl %al
andb %dl, %al
cmpb $0x1, %al
jne 0x57eec2
movq 0x48(%rsp), %rax
addq %rdi, %rax
vpextrb $0x8, %xmm7, (%r10,%rax)
vmovq %r13, %xmm0
vmovq %rcx, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %rsi, %xmm1
vmovq %r15, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm1, %ymm0, %ymm10
movq 0xb8(%rsp), %r15
cmpq %rbx, %r15
movq 0x10(%rsp), %rdx
jae 0x57ef17
leaq -0x3(%r10), %rax
cmpq $0x3, %r10
setb %cl
cmpq %r8, %rax
setge %al
orb %cl, %al
jne 0x57ef17
addq 0x50(%rsp), %rdi
vpextrb $0x0, %xmm7, (%r10,%rdi)
vpcmpgtq %ymm4, %ymm6, %ymm0
vmovdqa 0x340(%rsp), %ymm1
vpcmpgtq %ymm6, %ymm1, %ymm1
vpand 0x3a0(%rsp), %ymm1, %ymm1
vpand %ymm0, %ymm1, %ymm0
vextracti128 $0x1, %ymm0, %xmm1
vpackssdw %xmm1, %xmm0, %xmm1
vpcmpeqq %ymm11, %ymm9, %ymm2
vpcmpgtq %ymm11, %ymm9, %ymm3
vpcmpeqd %ymm14, %ymm14, %ymm14
vpand %ymm0, %ymm3, %ymm4
vblendvpd %ymm4, %ymm15, %ymm11, %ymm11
vextracti128 $0x1, %ymm4, %xmm7
vpackssdw %xmm7, %xmm4, %xmm4
vpcmpgtq %ymm6, %ymm12, %ymm7
vpand %ymm7, %ymm2, %ymm2
vextracti128 $0x1, %ymm2, %xmm7
vpackssdw %xmm7, %xmm2, %xmm7
vblendvps %xmm7, %xmm1, %xmm4, %xmm1
vblendvpd %ymm5, %ymm8, %ymm10, %ymm10
vpmovsxdq %xmm1, %ymm1
vmovapd 0x160(%rsp), %ymm4
vblendvpd %ymm1, 0xc0(%rsp), %ymm4, %ymm4
vpor %ymm3, %ymm2, %ymm1
vpand %ymm1, %ymm0, %ymm0
vblendvpd %ymm0, %ymm6, %ymm12, %ymm12
vmovq %xmm9, (%r11,%r10,8)
vmovq %xmm13, (%rdx,%r10,8)
vpsubq %ymm14, %ymm6, %ymm6
incq %r10
cmpq %r10, 0x90(%rsp)
vmovaps 0x1e0(%rsp), %ymm5
jne 0x57ea29
vmovdqa 0xc0(%rsp), %ymm0
vpaddq 0x140(%rsp), %ymm0, %ymm0
vmovdqa %ymm0, 0xc0(%rsp)
movq 0x80(%rsp), %r10
addq $0x4, %r10
movq 0x78(%rsp), %rax
addq %rax, 0x58(%rsp)
addq %rax, 0x60(%rsp)
addq %rax, 0x50(%rsp)
addq %rax, 0x48(%rsp)
cmpq %rbx, %r10
movq 0x40(%rsp), %r9
jb 0x57e90c
jmp 0x57f040
vmovdqa %ymm8, 0x120(%rsp)
vmovdqa 0x1a0(%rsp), %ymm0
vmovdqa %ymm0, 0x100(%rsp)
vmovapd %ymm11, 0x240(%rsp)
vmovapd %ymm12, 0x180(%rsp)
vmovapd %ymm4, 0xe0(%rsp)
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rbp), %rbx
movq 0x240(%rsp,%rdx,8), %rsi
cmpq %r9, %rsi
jle 0x57f085
movl 0xe0(%rsp,%rdx,8), %eax
movl 0x180(%rsp,%rdx,8), %ecx
movq %rsi, %r9
jmp 0x57f0b8
jne 0x57f0b8
movq 0x180(%rsp,%rdx,8), %rsi
movslq %ecx, %rdi
cmpq %rdi, %rsi
jge 0x57f0a2
movl 0xe0(%rsp,%rdx,8), %eax
movl %esi, %ecx
jmp 0x57f0b8
jne 0x57f0b8
movq 0xe0(%rsp,%rdx,8), %rdi
movslq %eax, %r8
cmpq %r8, %rdi
jge 0x57f0b8
movl %esi, %ecx
movl %edi, %eax
incq %rdx
cmpl $0x4, %edx
jne 0x57f065
vpcmpgtq 0x100(%rsp), %ymm8, %ymm0
vmovdqa 0x120(%rsp), %ymm1
vpcmpgtq 0x1a0(%rsp), %ymm1, %ymm1
vpor %ymm1, %ymm0, %ymm0
vtestpd %ymm0, %ymm0
je 0x57f0f4
orb $0x40, 0xc(%r14)
xorl %r9d, %r9d
xorl %ecx, %ecx
xorl %eax, %eax
movl %r9d, (%r14)
movl %eax, 0x4(%r14)
movl %ecx, 0x8(%r14)
movq 0x10(%rsp), %rdi
vzeroupper
callq 0x2094b5
movq 0x28(%rsp), %rdi
callq 0x2094b5
movq 0x20(%rsp), %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%rbx)
jne 0x57f164
movq 0x38(%rsp), %rdi
callq 0x2094b5
jmp 0x57f164
callq 0x1f9441
jmp 0x57f161
callq 0x1f941b
jmp 0x57f161
callq 0x1f93f5
jmp 0x57f161
callq 0x1f93cf
jmp 0x57f161
callq 0x1f93a9
jmp 0x57f161
callq 0x1f9383
jmp 0x57f161
callq 0x1f935d
xorl %r14d, %r14d
movq %r14, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop