// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/nw_trace_diag_avx2_256_32.c
// Function: parasail_nw_trace_diag_avx2_256_32
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;
    int32_t * restrict s1 = NULL;
    int32_t * restrict s2B = NULL;
    int32_t * restrict _H_pr = NULL;
    int32_t * restrict _F_pr = NULL;
    int32_t * restrict s2 = NULL;
    int32_t * restrict H_pr = NULL;
    int32_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;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    int32_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;
    __m256i vTDiag;
    __m256i vTIns;
    __m256i vTDel;
    __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 = 8; /* 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 ? INT32_MIN + open : INT32_MIN - matrix->min) + 1;
    POS_LIMIT = INT32_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm256_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInf = _mm256_set1_epi32(NEG_LIMIT);
    vOpen = _mm256_set1_epi32(open);
    vGap  = _mm256_set1_epi32(gap);
    vOne = _mm256_set1_epi32(1);
    vN = _mm256_set1_epi32(N);
    vGapN = _mm256_set1_epi32(gap*N);
    vNegOne = _mm256_set1_epi32(-1);
    vI = _mm256_set_epi32(0,1,2,3,4,5,6,7);
    vJreset = _mm256_set_epi32(0,-1,-2,-3,-4,-5,-6,-7);
    vMax = vNegInf;
    vILimit = _mm256_set1_epi32(s1Len);
    vILimit1 = _mm256_sub_epi32(vILimit, vOne);
    vJLimit = _mm256_set1_epi32(s2Len);
    vJLimit1 = _mm256_sub_epi32(vJLimit, vOne);
    vIBoundary = _mm256_set_epi32(
            -open-0*gap,
            -open-1*gap,
            -open-2*gap,
            -open-3*gap,
            -open-4*gap,
            -open-5*gap,
            -open-6*gap,
            -open-7*gap);
    vTDiag = _mm256_set1_epi32(PARASAIL_DIAG);
    vTIns = _mm256_set1_epi32(PARASAIL_INS);
    vTDel = _mm256_set1_epi32(PARASAIL_DEL);
    vTDiagE = _mm256_set1_epi32(PARASAIL_DIAG_E);
    vTInsE = _mm256_set1_epi32(PARASAIL_INS_E);
    vTDiagF = _mm256_set1_epi32(PARASAIL_DIAG_F);
    vTDelF = _mm256_set1_epi32(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_NW | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_32 | PARASAIL_FLAG_LANES_8;

    /* initialize heap variables */
    s2B= parasail_memalign_int32_t(32, s2Len+PAD2);
    _H_pr = parasail_memalign_int32_t(32, s2Len+PAD2);
    _F_pr = parasail_memalign_int32_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_int32_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 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))];
        const int * const restrict matrow4 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+4] : ((i+4 >= s1Len) ? s1Len-1 : i+4))];
        const int * const restrict matrow5 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+5] : ((i+5 >= s1Len) ? s1Len-1 : i+5))];
        const int * const restrict matrow6 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+6] : ((i+6 >= s1Len) ? s1Len-1 : i+6))];
        const int * const restrict matrow7 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+7] : ((i+7 >= s1Len) ? s1Len-1 : i+7))];
        vNH = _mm256_srli_si256_rpl(vNH, 4);
        vNH = _mm256_insert_epi32_rpl(vNH, H_pr[-1], 7);
        vWH = _mm256_srli_si256_rpl(vWH, 4);
        vWH = _mm256_insert_epi32_rpl(vWH, -open - i*gap, 7);
        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, 4);
            vNH = _mm256_insert_epi32_rpl(vNH, H_pr[j], 7);
            vF = _mm256_srli_si256_rpl(vF, 4);
            vF = _mm256_insert_epi32_rpl(vF, F_pr[j], 7);
            vF_opn = _mm256_sub_epi32(vNH, vOpen);
            vF_ext = _mm256_sub_epi32(vF, vGap);
            vF = _mm256_max_epi32(vF_opn, vF_ext);
            vE_opn = _mm256_sub_epi32(vWH, vOpen);
            vE_ext = _mm256_sub_epi32(vE, vGap);
            vE = _mm256_max_epi32(vE_opn, vE_ext);
            vMat = _mm256_set_epi32(
                    matrow0[s2[j-0]],
                    matrow1[s2[j-1]],
                    matrow2[s2[j-2]],
                    matrow3[s2[j-3]],
                    matrow4[s2[j-4]],
                    matrow5[s2[j-5]],
                    matrow6[s2[j-6]],
                    matrow7[s2[j-7]]
                    );
            vNWH = _mm256_add_epi32(vNWH, vMat);
            vWH = _mm256_max_epi32(vNWH, vE);
            vWH = _mm256_max_epi32(vWH, vF);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m256i cond = _mm256_cmpeq_epi32(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_epi32(vSaturationCheckMin, vWH);
                vSaturationCheckMax = _mm256_max_epi32(vSaturationCheckMax, vWH);
            }
            /* trace table */
            {
                __m256i case1 = _mm256_cmpeq_epi32(vWH, vNWH);
                __m256i case2 = _mm256_cmpeq_epi32(vWH, vF);
                __m256i vT = _mm256_blendv_epi8(
                        _mm256_blendv_epi8(vTIns, vTDel, case2),
                        vTDiag,
                        case1);
                __m256i condE = _mm256_cmpgt_epi32(vE_opn, vE_ext);
                __m256i condF = _mm256_cmpgt_epi32(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-7] = (int32_t)_mm256_extract_epi32_rpl(vWH,0);
            F_pr[j-7] = (int32_t)_mm256_extract_epi32_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_epi32(vI, vILimit1);
                __m256i cond_valid_J = _mm256_cmpeq_epi32(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_epi32(vJ, vOne);
        }
        vI = _mm256_add_epi32(vI, vN);
        vIBoundary = _mm256_sub_epi32(vIBoundary, vGapN);
    }

    /* max in vMax */
    for (i=0; i<N; ++i) {
        int32_t value;
        value = (int32_t) _mm256_extract_epi32_rpl(vMax, 7);
        if (value > score) {
            score = value;
        }
        vMax = _mm256_slli_si256_rpl(vMax, 4);
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi32_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi32(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 $0x2b8, %rsp            # imm = 0x2B8
movq %r9, 0x28(%rsp)
testq %rdx, %rdx
je 0x550cd0
movl %ecx, %r13d
testl %ecx, %ecx
jle 0x550cf4
testl %r8d, %r8d
js 0x550d18
cmpl $0x0, 0x28(%rsp)
js 0x550d5b
movq 0x2f0(%rsp), %r12
testq %r12, %r12
je 0x550d7c
movq %rdx, %r15
cmpl $0x0, 0x30(%r12)
je 0x550155
movl 0x34(%r12), %esi
jmp 0x550166
testq %rdi, %rdi
je 0x550d9d
testl %esi, %esi
jle 0x550dbe
movq %rdi, 0x60(%rsp)
vmovd 0x28(%rsp), %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x290(%rsp)
vpinsrd $0x1, %r8d, %xmm0, %xmm0
vpshufd $0x40, %xmm0, %xmm0     # xmm0 = xmm0[0,0,0,1]
vpmulld 0x7b93d(%rip), %xmm0, %xmm0 # 0x5cbad0
movl 0x20(%r12), %eax
vmovdqa %xmm0, 0xa0(%rsp)
vpextrd $0x3, %xmm0, %edx
movl $0x80000000, %r14d      # imm = 0x80000000
movl %r8d, 0x130(%rsp)
movl %r8d, %ecx
orl %r14d, %ecx
subl %eax, %r14d
movl %edx, 0x14(%rsp)
cmpl %edx, %eax
cmovgl %ecx, %r14d
movl $0x7ffffffe, %ebx       # imm = 0x7FFFFFFE
subl 0x1c(%r12), %ebx
pushq $0x20
popq %rdx
pushq $0x1
popq %rcx
movq %rsi, 0xb0(%rsp)
movl %esi, %edi
movl %r13d, %esi
vzeroupper
callq 0x1abb59
testq %rax, %rax
je 0x55025c
movq %rax, %rbp
movq %r15, 0x40(%rsp)
movl %r14d, 0x4(%rsp)
orl $0x8481001, 0xc(%rax)   # imm = 0x8481001
movq %r13, 0x38(%rsp)
addl $0xe, %r13d
pushq $0x20
popq %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x1ab783
movq %rax, %r15
movq %r14, %rdi
movq %r13, %rsi
callq 0x1ab783
movq %rax, %r14
pushq $0x20
popq %rdi
movq %r13, %rsi
callq 0x1ab783
testq %r15, %r15
sete %dl
movq %r14, 0x8(%rsp)
testq %r14, %r14
sete %cl
orb %dl, %cl
movq %rax, 0x18(%rsp)
testq %rax, %rax
sete %al
orb %cl, %al
je 0x550263
xorl %ebp, %ebp
jmp 0x550de6
cmpl $0x0, 0x30(%r12)
movq 0xb0(%rsp), %r11
movslq %r11d, %r14
je 0x550c65
movq $0x0, 0x20(%rsp)
movl 0x4(%rsp), %r8d
movq 0x40(%rsp), %r9
movq 0x38(%rsp), %r10
vmovd %r11d, %xmm0
vpinsrd $0x1, %r10d, %xmm0, %xmm0
leal 0x7(%r10), %ecx
vpcmpeqd %xmm1, %xmm1, %xmm1
vpaddd %xmm1, %xmm0, %xmm4
incl %r8d
vmovd %r8d, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0xb0(%rsp)
vmovd %ebx, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x190(%rsp)
movl 0x130(%rsp), %r11d
vmovd %r11d, %xmm0
vpbroadcastd %xmm0, %ymm3
movq 0x28(%rsp), %rdi
leal (,%rdi,8), %eax
vmovd %eax, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x210(%rsp)
vpbroadcastd %xmm4, %ymm0
vmovdqu %ymm0, 0x1f0(%rsp)
vpbroadcastd 0x77858(%rip), %ymm0 # 0x5c7b70
vmovdqu %ymm0, 0x270(%rsp)
vpermd %ymm4, %ymm0, %ymm0
vmovdqu %ymm0, 0x250(%rsp)
movl 0x14(%rsp), %esi
movl %esi, %eax
subl %edi, %eax
subl %edi, %esi
subl %edi, %esi
imull $-0x3, %edi, %edx
subl %r11d, %edx
leal (,%rdi,4), %edi
vpinsrd $0x1, %edi, %xmm3, %xmm0
vpshufd $0x40, %xmm0, %xmm0     # xmm0 = xmm0[0,0,0,1]
vmovdqa 0xa0(%rsp), %xmm5
vpsubd %xmm0, %xmm5, %xmm0
vmovd %edx, %xmm1
vpbroadcastd %xmm1, %ymm1
vpblendd $0x10, %ymm1, %ymm0, %ymm1 # ymm1 = ymm0[0,1,2,3],ymm1[4],ymm0[5,6,7]
vmovd %esi, %xmm2
vpbroadcastd %xmm2, %ymm2
vpblendd $0x20, %ymm2, %ymm1, %ymm1 # ymm1 = ymm1[0,1,2,3,4],ymm2[5],ymm1[6,7]
vmovd %eax, %xmm2
vpbroadcastd %xmm2, %ymm2
vpblendd $0x40, %ymm2, %ymm1, %ymm1 # ymm1 = ymm1[0,1,2,3,4,5],ymm2[6],ymm1[7]
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
vpblendd $0x88, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2],ymm0[3],ymm1[4,5,6],ymm0[7]
vmovdqu %ymm0, 0x130(%rsp)
movl %r10d, %eax
movq 0x10(%r12), %rdx
xorl %esi, %esi
cmpq %rsi, %rax
je 0x5503c3
movzbl (%r9,%rsi), %edi
movl (%rdx,%rdi,4), %edi
movl %edi, 0x1c(%r15,%rsi,4)
incq %rsi
jmp 0x5503ac
xorl %edx, %edx
cmpq $0x7, %rdx
je 0x5503d5
andl $0x0, (%r15,%rdx,4)
incq %rdx
jmp 0x5503c5
movq %rax, %rdx
cmpl %edx, %ecx
jle 0x5503e7
andl $0x0, 0x1c(%r15,%rdx,4)
incq %rdx
jmp 0x5503d8
xorl %edx, %edx
movl 0x14(%rsp), %esi
cmpq %rdx, %rax
je 0x55040e
movq 0x8(%rsp), %rdi
movl %esi, 0x1c(%rdi,%rdx,4)
movq 0x18(%rsp), %rdi
movl %r8d, 0x1c(%rdi,%rdx,4)
incq %rdx
subl 0x28(%rsp), %esi
jmp 0x5503ed
xorl %edx, %edx
cmpq $0x7, %rdx
je 0x55042d
movq 0x8(%rsp), %rsi
movl %r8d, (%rsi,%rdx,4)
movq 0x18(%rsp), %rsi
movl %r8d, (%rsi,%rdx,4)
incq %rdx
jmp 0x550410
movq %rax, %rdx
cmpl %edx, %ecx
jle 0x55044d
movq 0x8(%rsp), %rsi
movl %r8d, 0x1c(%rsi,%rdx,4)
movq 0x18(%rsp), %rsi
movl %r8d, 0x1c(%rsi,%rdx,4)
incq %rdx
jmp 0x550430
movq 0x8(%rsp), %rdx
andl $0x0, 0x18(%rdx)
vmovdqu 0xb0(%rsp), %ymm1
vextracti128 $0x1, %ymm1, %xmm0
vpalignr $0x4, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[4,5,6,7,8,9,10,11,12,13,14,15],ymm0[0,1,2,3],ymm1[20,21,22,23,24,25,26,27,28,29,30,31],ymm0[16,17,18,19]
vmovdqu %ymm0, 0x1d0(%rsp)
movl %ecx, %edx
sarl $0x1f, %edx
andnl %ecx, %edx, %ecx
movq %rcx, 0xa0(%rsp)
vmovdqu %ymm4, 0x1b0(%rsp)
vmovd %xmm4, 0x6c(%rsp)
leaq (%rax,%rax,2), %rcx
addq $-0x3, %rcx
movq %rcx, 0x90(%rsp)
leaq (,%rax,8), %rcx
movq %rcx, 0xd8(%rsp)
vpmovsxbd 0x79838(%rip), %ymm2 # 0x5c9cf6
movq $0x0, 0x98(%rsp)
xorl %ebx, %ebx
vmovdqa %ymm1, %ymm10
vmovdqu %ymm1, 0x170(%rsp)
vmovups 0x190(%rsp), %ymm0
vmovups %ymm0, 0x150(%rsp)
movl %r8d, 0x4(%rsp)
cmpq %r14, %rbx
jge 0x550bb6
movq %rbx, %rdi
orq $0x3, %rdi
cmpl $0x0, 0x30(%r12)
movq %rdi, 0x60(%rsp)
je 0x5505a8
movq %rbx, %rdx
orq $0x1, %rdx
cmpq %r14, %rdx
movl 0x6c(%rsp), %esi
movl %esi, %ecx
movq %rdx, 0x50(%rsp)
cmovll %edx, %ecx
movq %rbx, %rdx
orq $0x2, %rdx
cmpq %r14, %rdx
movq %rdx, 0x48(%rsp)
cmovgel %esi, %edx
movl %edx, 0x30(%rsp)
cmpq %r14, %rdi
movl %edi, %r8d
cmovgel %esi, %r8d
movq %rbx, %rdx
orq $0x4, %rdx
cmpq %r14, %rdx
movq %rdx, 0x88(%rsp)
movl %edx, %r9d
cmovgel %esi, %r9d
movq %rbx, %rdx
orq $0x5, %rdx
cmpq %r14, %rdx
movq %rdx, 0x80(%rsp)
movl %edx, %r11d
cmovgel %esi, %r11d
movq %rbx, %rdx
orq $0x6, %rdx
cmpq %r14, %rdx
movq %rdx, 0x78(%rsp)
movl %edx, %r13d
cmovgel %esi, %r13d
movq %rbx, %rdx
orq $0x7, %rdx
cmpq %r14, %rdx
movq %rdx, 0x70(%rsp)
cmovgel %esi, %edx
movl %ebx, %r10d
jmp 0x550622
movq 0x20(%rsp), %rdx
movl (%rdx,%rbx,4), %r10d
movl 0x4(%rdx,%rbx,4), %ecx
movq %rbx, %rsi
orq $0x1, %rsi
movq %rsi, 0x50(%rsp)
movq %rbx, %rsi
orq $0x2, %rsi
movq %rsi, 0x48(%rsp)
movl 0x8(%rdx,%rbx,4), %esi
movl %esi, 0x30(%rsp)
movl (%rdx,%rdi,4), %r8d
movq %rbx, %rsi
orq $0x4, %rsi
movq %rsi, 0x88(%rsp)
movl 0x10(%rdx,%rbx,4), %r9d
movq %rbx, %rsi
orq $0x5, %rsi
movq %rsi, 0x80(%rsp)
movl 0x14(%rdx,%rbx,4), %r11d
movq %rbx, %rsi
orq $0x6, %rsi
movq %rsi, 0x78(%rsp)
movl 0x18(%rdx,%rbx,4), %r13d
movq %rbx, %rsi
orq $0x7, %rsi
movq %rsi, 0x70(%rsp)
movl 0x1c(%rdx,%rbx,4), %edx
movq 0x8(%r12), %rdi
movl 0x18(%r12), %r12d
imull %r12d, %r11d
movslq %r11d, %r11
leaq (%rdi,%r11,4), %rsi
movq %rsi, 0x40(%rsp)
imull %r12d, %r8d
movslq %r8d, %r8
leaq (%rdi,%r8,4), %rsi
movq %rsi, 0x38(%rsp)
imull %r12d, %ecx
movslq %ecx, %rcx
leaq (%rdi,%rcx,4), %rcx
movq %rcx, 0x58(%rsp)
imull %r12d, %r10d
movslq %r10d, %r10
leaq (%rdi,%r10,4), %rcx
movq %rcx, 0x128(%rsp)
movl 0x30(%rsp), %ecx
imull %r12d, %ecx
movslq %ecx, %r11
leaq (%rdi,%r11,4), %rcx
movq %rcx, 0x30(%rsp)
imull %r12d, %r9d
movslq %r9d, %r9
leaq (%rdi,%r9,4), %rcx
movq %rcx, 0x120(%rsp)
imull %r12d, %r13d
movslq %r13d, %r13
leaq (%rdi,%r13,4), %rcx
movq %rcx, 0x118(%rsp)
imull %r12d, %edx
movslq %edx, %rdx
leaq (%rdi,%rdx,4), %r12
movq 0x8(%rsp), %rcx
vpbroadcastd 0x18(%rcx), %ymm0
vmovdqu 0x1d0(%rsp), %ymm1
vpblendd $0x80, %ymm0, %ymm1, %ymm6 # ymm6 = ymm1[0,1,2,3,4,5,6],ymm0[7]
movl %ebx, %edx
movq 0x28(%rsp), %rsi
imull %esi, %edx
movl 0x14(%rsp), %r8d
movl %r8d, %edi
subl %edx, %edi
vmovd %edi, %xmm0
vpbroadcastd %xmm0, %ymm0
vpblendd $0x80, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2,3,4,5,6],ymm0[7]
addq $0x8, %rbx
movq %rbx, 0xe0(%rsp)
movl %ebx, %edx
imull %esi, %edx
subl %edx, %r8d
movl %r8d, 0x18(%rcx)
movq 0x50(%rsp), %rcx
imulq %rax, %rcx
movq 0x48(%rsp), %rdx
imulq %rax, %rdx
movq 0x88(%rsp), %r10
movq %r10, %rsi
imulq %rax, %rsi
movq 0x80(%rsp), %r11
movq %r11, %rdi
imulq %rax, %rdi
movq 0x78(%rsp), %rbx
movq %rbx, %r8
imulq %rax, %r8
movq 0x70(%rsp), %r13
movq %r13, %r9
imulq %rax, %r9
addq $-0x7, %r9
movq %r9, 0x108(%rsp)
addq $-0x2, %rdx
movq %rdx, 0x100(%rsp)
addq $-0x4, %rsi
movq %rsi, 0xf8(%rsp)
addq $-0x5, %rdi
movq %rdi, 0xf0(%rsp)
addq $-0x6, %r8
movq %r8, 0xe8(%rsp)
decq %rcx
movq %rcx, 0x110(%rsp)
vmovdqu %ymm2, 0x230(%rsp)
vpcmpeqd 0x1f0(%rsp), %ymm2, %ymm14
xorl %edi, %edi
vmovdqu 0xb0(%rsp), %ymm1
vmovdqa %ymm1, %ymm7
vpmovsxbd 0x7953c(%rip), %ymm4 # 0x5c9cfe
movq 0x50(%rsp), %rsi
movq %rsi, %r8
movq 0x48(%rsp), %rcx
movq %rbx, %r9
cmpq %rdi, 0xa0(%rsp)
je 0x550b53
movslq 0x10(%r15,%rdi,4), %rdx
movq 0x38(%rsp), %rbx
vmovd (%rbx,%rdx,4), %xmm5
movslq 0x14(%r15,%rdi,4), %rdx
movq 0x30(%rsp), %rbx
vpinsrd $0x1, (%rbx,%rdx,4), %xmm5, %xmm5
movslq 0x18(%r15,%rdi,4), %rdx
movq 0x58(%rsp), %rbx
vpinsrd $0x2, (%rbx,%rdx,4), %xmm5, %xmm5
movslq 0x1c(%r15,%rdi,4), %rdx
movq 0x128(%rsp), %rbx
vpinsrd $0x3, (%rbx,%rdx,4), %xmm5, %xmm15
movslq (%r15,%rdi,4), %rdx
vmovd (%r12,%rdx,4), %xmm5
movslq 0x4(%r15,%rdi,4), %rdx
movq 0x118(%rsp), %rbx
vpinsrd $0x1, (%rbx,%rdx,4), %xmm5, %xmm5
movslq 0x8(%r15,%rdi,4), %rdx
movq 0x40(%rsp), %rbx
vpinsrd $0x2, (%rbx,%rdx,4), %xmm5, %xmm5
movslq 0xc(%r15,%rdi,4), %rdx
movq 0x120(%rsp), %rbx
vpinsrd $0x3, (%rbx,%rdx,4), %xmm5, %xmm2
vpmovsxbd 0x7b2cf(%rip), %ymm9 # 0x5cbb40
vpermd %ymm0, %ymm9, %ymm5
movq 0x8(%rsp), %rdx
vpbroadcastd 0x1c(%rdx,%rdi,4), %ymm8
vpblendd $0x80, %ymm8, %ymm5, %ymm12 # ymm12 = ymm5[0,1,2,3,4,5,6],ymm8[7]
vpermd %ymm1, %ymm9, %ymm1
movq 0x18(%rsp), %rdx
vpbroadcastd 0x1c(%rdx,%rdi,4), %ymm5
vpblendd $0x80, %ymm5, %ymm1, %ymm1 # ymm1 = ymm1[0,1,2,3,4,5,6],ymm5[7]
vpsubd %ymm3, %ymm12, %ymm8
vmovdqu 0x290(%rsp), %ymm9
vpsubd %ymm9, %ymm1, %ymm5
vpmaxsd %ymm5, %ymm8, %ymm1
vpsubd %ymm3, %ymm0, %ymm11
vpsubd %ymm9, %ymm7, %ymm7
vpmaxsd %ymm7, %ymm11, %ymm13
vinserti128 $0x1, %xmm15, %ymm2, %ymm0
vpaddd %ymm6, %ymm0, %ymm15
vpmaxsd %ymm1, %ymm13, %ymm0
vpmaxsd %ymm0, %ymm15, %ymm0
vpcmpeqd 0x7b1a0(%rip), %ymm4, %ymm6 # 0x5cba80
vblendvps %ymm6, 0x130(%rsp), %ymm0, %ymm0
cmpq $0x8, %rdi
jb 0x55091f
vmovdqu 0x150(%rsp), %ymm2
vpminsd %ymm0, %ymm2, %ymm2
vmovdqu %ymm2, 0x150(%rsp)
vmovdqu 0x170(%rsp), %ymm2
vpmaxsd %ymm0, %ymm2, %ymm2
vmovdqu %ymm2, 0x170(%rsp)
vblendvps %ymm6, 0xb0(%rsp), %ymm1, %ymm1
vpcmpeqd %ymm0, %ymm15, %ymm2
vpcmpeqd %ymm1, %ymm0, %ymm15
vmovdqu 0x270(%rsp), %ymm9
vpsubd %ymm15, %ymm9, %ymm15
vbroadcastss 0x7ce13(%rip), %ymm9 # 0x5cd75c
vblendvps %ymm2, %ymm9, %ymm15, %ymm2
vpcmpgtd %ymm7, %ymm11, %ymm7
vpcmpgtd %ymm5, %ymm8, %ymm5
vbroadcastss 0x7b180(%rip), %ymm8 # 0x5cbae0
vbroadcastss 0x7cde3(%rip), %ymm9 # 0x5cd74c
vblendvps %ymm7, %ymm8, %ymm9, %ymm7
vbroadcastss 0x7cdd8(%rip), %ymm8 # 0x5cd750
vbroadcastss 0x7cdd3(%rip), %ymm9 # 0x5cd754
vblendvps %ymm5, %ymm8, %ymm9, %ymm5
vorps %ymm7, %ymm5, %ymm5
vorps %ymm2, %ymm5, %ymm7
movq %rbp, %rbx
movq 0x10(%rbp), %rdx
movq (%rdx), %rdx
vextractf128 $0x1, %ymm7, %xmm8
cmpq %rax, %rdi
jae 0x5509ba
movq 0x98(%rsp), %rsi
leaq (%rdx,%rsi), %rbp
movq %r8, %rsi
vpextrb $0xc, %xmm8, (%rdi,%rbp)
cmpq %r14, %rsi
setge %bpl
leaq -0x1(%rdi), %rsi
cmpq %rax, %rsi
setae %sil
orb %bpl, %sil
jne 0x5509e3
movq 0x110(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0x8, %xmm8, (%rdi,%rsi)
cmpq %r14, %rcx
jge 0x550a16
leaq -0x2(%rdi), %rsi
cmpq $0x2, %rdi
setae %bpl
cmpq %rax, %rsi
setl %sil
andb %bpl, %sil
cmpb $0x1, %sil
jne 0x550a16
movq 0x100(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0x4, %xmm8, (%rdi,%rsi)
cmpq %r14, 0x60(%rsp)
jge 0x550a4b
leaq -0x3(%rdi), %rsi
cmpq $0x3, %rdi
setae %bpl
cmpq %rax, %rsi
setl %sil
andb %bpl, %sil
cmpb $0x1, %sil
jne 0x550a4b
movq 0x90(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0x0, %xmm8, (%rdi,%rsi)
cmpq %r14, %r10
jge 0x550a7e
leaq -0x4(%rdi), %rsi
cmpq $0x4, %rdi
setae %bpl
cmpq %rax, %rsi
setl %sil
andb %bpl, %sil
cmpb $0x1, %sil
jne 0x550a7e
movq 0xf8(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0xc, %xmm7, (%rdi,%rsi)
cmpq %r14, %r11
jge 0x550ab1
leaq -0x5(%rdi), %rsi
cmpq $0x5, %rdi
setae %bpl
cmpq %rax, %rsi
setl %sil
andb %bpl, %sil
cmpb $0x1, %sil
jne 0x550ab1
movq 0xf0(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0x8, %xmm7, (%rdi,%rsi)
cmpq %r14, %r9
jge 0x550ae4
leaq -0x6(%rdi), %rsi
cmpq $0x6, %rdi
setae %bpl
cmpq %rax, %rsi
setl %sil
andb %bpl, %sil
cmpb $0x1, %sil
jne 0x550ae4
movq 0xe8(%rsp), %rsi
addq %rdx, %rsi
vpextrb $0x4, %xmm7, (%rdi,%rsi)
cmpq %r14, %r13
setge %sil
cmpq $0x7, %rdi
setb %bpl
orb %sil, %bpl
jne 0x550b07
addq 0x108(%rsp), %rdx
vpextrb $0x0, %xmm7, (%rdi,%rdx)
vblendvps %ymm6, 0xb0(%rsp), %ymm13, %ymm7
movq 0x8(%rsp), %rdx
vmovd %xmm0, (%rdx,%rdi,4)
movq 0x18(%rsp), %rdx
vmovd %xmm1, (%rdx,%rdi,4)
vpcmpeqd 0x250(%rsp), %ymm4, %ymm2
vpand %ymm2, %ymm14, %ymm2
vblendvps %ymm2, %ymm0, %ymm10, %ymm10
vpsubd 0x7af3f(%rip), %ymm4, %ymm4 # 0x5cba80
incq %rdi
vmovdqa %ymm12, %ymm6
movq %rbx, %rbp
movq %r8, %rsi
jmp 0x5507d2
vpbroadcastd 0x7af84(%rip), %ymm0 # 0x5cbae0
vmovdqu 0x230(%rsp), %ymm2
vpaddd %ymm0, %ymm2, %ymm2
vmovdqu 0x130(%rsp), %ymm0
vpsubd 0x210(%rsp), %ymm0, %ymm0
vmovdqu %ymm0, 0x130(%rsp)
movq 0xd8(%rsp), %rcx
addq %rcx, 0x90(%rsp)
addq %rcx, 0x98(%rsp)
movq 0x2f0(%rsp), %r12
movl 0x4(%rsp), %r8d
movq 0xe0(%rsp), %rbx
jmp 0x5504f0
pushq $0x8
popq %rax
subl $0x1, %eax
jb 0x550bdf
vextracti128 $0x1, %ymm10, %xmm0
vpextrd $0x3, %xmm0, %ecx
cmpl %r8d, %ecx
cmovgl %ecx, %r8d
vperm2i128 $0x28, %ymm10, %ymm10, %ymm0 # ymm0 = zero,zero,ymm10[0,1]
vpalignr $0xc, %ymm0, %ymm10, %ymm10 # ymm10 = ymm0[12,13,14,15],ymm10[0,1,2,3,4,5,6,7,8,9,10,11],ymm0[28,29,30,31],ymm10[16,17,18,19,20,21,22,23,24,25,26,27]
jmp 0x550bb9
vmovdqu 0xb0(%rsp), %ymm0
vpcmpgtd 0x150(%rsp), %ymm0, %ymm0
vmovdqu 0x170(%rsp), %ymm1
vpcmpgtd 0x190(%rsp), %ymm1, %ymm1
vpor %ymm1, %ymm0, %ymm0
vtestps %ymm0, %ymm0
vmovups 0x1b0(%rsp), %ymm0
je 0x550c22
orb $0x40, 0xc(%rbp)
vxorps %xmm0, %xmm0, %xmm0
xorl %r8d, %r8d
movl %r8d, (%rbp)
vmovlps %xmm0, 0x4(%rbp)
movq 0x18(%rsp), %rdi
vzeroupper
callq 0x1ab763
movq 0x8(%rsp), %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
cmpl $0x0, 0x30(%r12)
jne 0x550de6
movq 0x20(%rsp), %rdi
callq 0x1ab763
jmp 0x550de6
leal 0x7(%r11), %eax
movslq %eax, %rsi
pushq $0x20
popq %rdi
movq %rsi, 0x58(%rsp)
movq %r11, %r13
callq 0x1ab783
movq %rax, 0x20(%rsp)
testq %rax, %rax
movl 0x4(%rsp), %r8d
movq 0x40(%rsp), %r9
movq 0x38(%rsp), %r10
je 0x55025c
movl %r13d, %eax
sarl $0x1f, %eax
andnl %r13d, %eax, %eax
xorl %ecx, %ecx
movq %r13, %r11
movq 0x60(%rsp), %rdi
cmpq %rcx, %rax
je 0x550d3c
movq 0x10(%r12), %rdx
movzbl (%rdi,%rcx), %esi
movl (%rdx,%rsi,4), %edx
movq 0x20(%rsp), %rsi
movl %edx, (%rsi,%rcx,4)
incq %rcx
jmp 0x550cae
movq 0x1ea301(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x7630a(%rip), %rsi     # 0x5c6feb
leaq 0x45921(%rip), %rdx     # 0x596609
leaq 0x76a0e(%rip), %rcx     # 0x5c76fd
jmp 0x550ddd
movq 0x1ea2dd(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x769fc(%rip), %rsi     # 0x5c7701
leaq 0x458fd(%rip), %rdx     # 0x596609
leaq 0x76a02(%rip), %rcx     # 0x5c7715
jmp 0x550ddd
movq 0x1ea2b9(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x769f2(%rip), %rsi     # 0x5c771b
leaq 0x458d9(%rip), %rdx     # 0x596609
leaq 0x769f9(%rip), %rcx     # 0x5c7730
jmp 0x550ddd
movq %r14, %rax
movq 0x58(%rsp), %rdx
movq 0x20(%rsp), %rcx
cmpq %rdx, %rax
jge 0x550292
andl $0x0, (%rcx,%rax,4)
incq %rax
jmp 0x550d49
movq 0x1ea276(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x769af(%rip), %rsi     # 0x5c771b
leaq 0x45896(%rip), %rdx     # 0x596609
leaq 0x769bb(%rip), %rcx     # 0x5c7735
jmp 0x550ddd
movq 0x1ea255(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x7625e(%rip), %rsi     # 0x5c6feb
leaq 0x45875(%rip), %rdx     # 0x596609
leaq 0x76ba7(%rip), %rcx     # 0x5c7942
jmp 0x550ddd
movq 0x1ea234(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x7623d(%rip), %rsi     # 0x5c6feb
leaq 0x45854(%rip), %rdx     # 0x596609
leaq 0x7697d(%rip), %rcx     # 0x5c7739
jmp 0x550ddd
movq 0x1ea213(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x76932(%rip), %rsi     # 0x5c7701
leaq 0x45833(%rip), %rdx     # 0x596609
leaq 0x76960(%rip), %rcx     # 0x5c773d
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x19e180
movq %rbp, %rax
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop