// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_diag_avx2_256_32.c
// Function: parasail_nw_rowcol_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 = 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 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;

    /* 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);

    /* 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_32 | PARASAIL_FLAG_LANES_8;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* 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 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))];
        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 = _mm256_max_epi32(
                    _mm256_sub_epi32(vNH, vOpen),
                    _mm256_sub_epi32(vF, vGap));
            vE = _mm256_max_epi32(
                    _mm256_sub_epi32(vWH, vOpen),
                    _mm256_sub_epi32(vE, vGap));
            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);
            }
#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-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 $0x258, %rsp            # imm = 0x258
testq %rdx, %rdx
je 0x55aad2
movl %ecx, %ebp
testl %ecx, %ecx
jle 0x55aad9
movl %r8d, %r13d
testl %r8d, %r8d
js 0x55aae0
movl %r9d, %r15d
testl %r9d, %r9d
js 0x55aae7
movq 0x290(%rsp), %r8
testq %r8, %r8
je 0x55aaee
movq %rdx, %r12
cmpl $0x0, 0x30(%r8)
je 0x559fb5
movl 0x34(%r8), %esi
jmp 0x559fc6
testq %rdi, %rdi
je 0x55aaf5
testl %esi, %esi
jle 0x55aafc
movq %rdi, 0x18(%rsp)
vmovd %r15d, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x230(%rsp)
vpinsrd $0x1, %r13d, %xmm0, %xmm0
vpshufd $0x40, %xmm0, %xmm0     # xmm0 = xmm0[0,0,0,1]
vpmulld 0xd40fe(%rip), %xmm0, %xmm0 # 0x62e0f0
movl 0x20(%r8), %eax
vmovdqa %xmm0, 0x50(%rsp)
vpextrd $0x3, %xmm0, %edi
movl $0x80000000, %edx       # imm = 0x80000000
movl %r13d, %ecx
orl %edx, %ecx
subl %eax, %edx
movl %edi, 0x14(%rsp)
cmpl %edi, %eax
cmovgl %ecx, %edx
movl %edx, 0x10(%rsp)
movl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
subl 0x1c(%r8), %r14d
movq %rsi, 0x8(%rsp)
movl %esi, %edi
movl %ebp, %esi
vzeroupper
callq 0x20ac53
testq %rax, %rax
je 0x55ab01
movq %rax, %rbx
movl %r13d, 0x110(%rsp)
movq %r12, 0x40(%rsp)
movq %r15, 0x30(%rsp)
orl $0x8441001, 0xc(%rax)   # imm = 0x8441001
leal 0xe(%rbp), %r13d
movl $0x20, %edi
movq %r13, %rsi
callq 0x20a62d
movq %rax, %r15
movl $0x20, %edi
movq %r13, %rsi
callq 0x20a62d
movq %rax, %r12
movl $0x20, %edi
movq %r13, %rsi
callq 0x20a62d
testq %r15, %r15
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x55ab01
movq %rax, 0x20(%rsp)
movq %r12, 0x28(%rsp)
movq %rbx, 0x38(%rsp)
movq 0x290(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0x55a0cf
xorl %r12d, %r12d
movq 0x30(%rsp), %r13
jmp 0x55a14b
movq 0x8(%rsp), %rbx
leal 0x7(%rbx), %r13d
movslq %r13d, %rsi
movl $0x20, %edi
callq 0x20a62d
testq %rax, %rax
je 0x55ab01
movq %rax, %r12
movl %r13d, %r9d
testl %ebx, %ebx
movq 0x30(%rsp), %r13
movq 0x18(%rsp), %rdi
jle 0x55a125
movq 0x290(%rsp), %rax
movq 0x10(%rax), %rax
movl %ebx, %ecx
xorl %edx, %edx
movzbl (%rdi,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, (%r12,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x55a112
movslq %ebx, %rax
leal 0x1(%rbx), %ecx
cmpl %ecx, %r9d
cmovgl %r9d, %ecx
leaq (%r12,%rax,4), %rdi
movl %ebx, %eax
notl %eax
addl %ecx, %eax
leaq 0x4(,%rax,4), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x8(%rsp), %rax
movq %r12, 0x48(%rsp)
leal 0x7(%rbp), %ebx
vmovd %eax, %xmm0
vpinsrd $0x1, %ebp, %xmm0, %xmm0
vpcmpeqd %xmm1, %xmm1, %xmm1
vpaddd %xmm1, %xmm0, %xmm1
movl 0x10(%rsp), %eax
incl %eax
movl %eax, 0x10(%rsp)
vmovd %eax, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0xf0(%rsp)
vmovd %r14d, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x130(%rsp)
movl 0x110(%rsp), %esi
vmovd %esi, %xmm0
vpbroadcastd %xmm0, %ymm2
leal (,%r13,8), %eax
vmovd %eax, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x1d0(%rsp)
vpbroadcastd %xmm1, %ymm0
vmovdqu %ymm0, 0x1b0(%rsp)
vpbroadcastd 0xcfb06(%rip), %ymm0 # 0x629ce0
vmovdqu %ymm1, 0x150(%rsp)
vpermd %ymm1, %ymm0, %ymm0
vmovdqu %ymm0, 0x1f0(%rsp)
movl 0x14(%rsp), %edx
movl %edx, %eax
subl %r13d, %eax
subl %r13d, %edx
subl %r13d, %edx
leal (%r13,%r13,2), %ecx
addl %esi, %ecx
negl %ecx
leal (,%r13,4), %esi
vmovdqu %ymm2, 0x210(%rsp)
vpinsrd $0x1, %esi, %xmm2, %xmm0
vpshufd $0x40, %xmm0, %xmm0     # xmm0 = xmm0[0,0,0,1]
vmovdqa 0x50(%rsp), %xmm3
vpsubd %xmm0, %xmm3, %xmm0
vmovd %ecx, %xmm1
vpbroadcastd %xmm1, %ymm1
vpblendd $0x10, %ymm1, %ymm0, %ymm1 # ymm1 = ymm0[0,1,2,3],ymm1[4],ymm0[5,6,7]
vmovd %edx, %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, %xmm3, %ymm0, %ymm0
vpblendd $0x88, %ymm0, %ymm1, %ymm0 # ymm0 = ymm1[0,1,2],ymm0[3],ymm1[4,5,6],ymm0[7]
vmovdqu %ymm0, 0x110(%rsp)
movq 0x290(%rsp), %rax
movq 0x10(%rax), %rax
movl %ebp, %r14d
xorl %ecx, %ecx
movq 0x40(%rsp), %rsi
movzbl (%rsi,%rcx), %edx
movl (%rax,%rdx,4), %edx
movl %edx, 0x1c(%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r14
jne 0x55a287
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, 0xc(%r15)
vmovdqu %xmm0, (%r15)
leal 0x1(%rbp), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
leaq (%r15,%r14,4), %rdi
addq $0x1c, %rdi
movl %ebp, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %r12d, %r12d
xorl %esi, %esi
vzeroupper
callq 0x19e090
movl 0x14(%rsp), %eax
movl 0x10(%rsp), %edx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rdi
movl %eax, 0x1c(%rcx,%r12,4)
movl %edx, 0x1c(%rdi,%r12,4)
incq %r12
subl %r13d, %eax
cmpq %r12, %r14
jne 0x55a2e7
xorl %eax, %eax
movl %edx, (%rcx,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
cmpq $0x7, %rax
jne 0x55a2fe
leaq 0x7(%r14), %rax
movq 0x290(%rsp), %r12
movq 0x8(%rsp), %rsi
movl %edx, (%rcx,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
incl %ebp
cmpl %ebp, %ebx
jg 0x55a31e
movl $0x0, 0x18(%rcx)
testl %esi, %esi
jle 0x55aa1f
movq 0x8(%r12), %rax
movq %rax, 0x68(%rsp)
vmovdqu 0xf0(%rsp), %ymm5
vextracti128 $0x1, %ymm5, %xmm0
vpalignr $0x4, %ymm5, %ymm0, %ymm0 # ymm0 = ymm5[4,5,6,7,8,9,10,11,12,13,14,15],ymm0[0,1,2,3],ymm5[20,21,22,23,24,25,26,27,28,29,30,31],ymm0[16,17,18,19]
vmovdqu %ymm0, 0x190(%rsp)
vmovdqu 0x150(%rsp), %ymm0
vpextrd $0x1, %xmm0, %eax
movq %rax, 0xb0(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0xa8(%rsp)
movl %esi, %esi
vmovd %xmm0, %edi
leaq 0x1(%r14), %rax
movq %rax, 0xa0(%rsp)
leaq 0x2(%r14), %rax
movq %rax, 0x98(%rsp)
leaq 0x3(%r14), %rax
movq %rax, 0x90(%rsp)
leaq 0x4(%r14), %rax
movq %rax, 0x88(%rsp)
leaq 0x5(%r14), %rax
movq %rax, 0x80(%rsp)
leaq 0x6(%r14), %rax
movq %rax, 0x78(%rsp)
vpmovsxbd 0xd1b34(%rip), %ymm4 # 0x62bf16
xorl %r13d, %r13d
vpmovsxbd 0xd3d52(%rip), %ymm6 # 0x62e140
vpcmpeqd %ymm7, %ymm7, %ymm7
vbroadcastss 0xd38e5(%rip), %ymm0 # 0x62dce0
vmovups %ymm0, 0x170(%rsp)
vmovdqa %ymm5, %ymm2
vmovdqu 0x130(%rsp), %ymm1
vmovdqa %ymm5, %ymm0
movq 0x38(%rsp), %rbx
movq %r13, %rdx
orq $0x3, %rdx
cmpl $0x0, 0x30(%r12)
movq %rdx, 0x18(%rsp)
je 0x55a490
movq %r13, %rcx
orq $0x1, %rcx
cmpq %rsi, %rcx
cmovael %edi, %ecx
movq %r13, %rax
orq $0x2, %rax
cmpq %rsi, %rax
cmovael %edi, %eax
cmpq %rsi, %rdx
movl %edx, %r10d
cmovael %edi, %r10d
movq %r13, %rdx
orq $0x4, %rdx
cmpq %rsi, %rdx
cmovael %edi, %edx
movq %r13, %r11
orq $0x5, %r11
cmpq %rsi, %r11
cmovael %edi, %r11d
movq %r13, %r8
orq $0x6, %r8
cmpq %rsi, %r8
cmovael %edi, %r8d
movq %r13, %r9
orq $0x7, %r9
cmpq %rsi, %r9
cmovael %edi, %r9d
movl %r13d, 0x8(%rsp)
jmp 0x55a4bf
movq 0x48(%rsp), %r9
movl (%r9,%r13,4), %eax
movl %eax, 0x8(%rsp)
movl 0x4(%r9,%r13,4), %ecx
movl 0x8(%r9,%r13,4), %eax
movl (%r9,%rdx,4), %r10d
movl 0x10(%r9,%r13,4), %edx
movl 0x14(%r9,%r13,4), %r11d
movl 0x18(%r9,%r13,4), %r8d
movl 0x1c(%r9,%r13,4), %r9d
movq %r13, %rbp
movl 0x18(%r12), %r12d
imull %r12d, %r11d
movslq %r11d, %r11
movq 0x68(%rsp), %r13
leaq (,%r11,4), %r11
addq %r13, %r11
movq %r11, 0x40(%rsp)
imull %r12d, %r10d
movslq %r10d, %r10
leaq (,%r10,4), %r10
addq %r13, %r10
movq %r10, 0xe8(%rsp)
imull %r12d, %ecx
movslq %ecx, %rcx
leaq (,%rcx,4), %rcx
addq %r13, %rcx
movq %rcx, 0xe0(%rsp)
movl 0x8(%rsp), %ecx
imull %r12d, %ecx
movslq %ecx, %rcx
leaq (,%rcx,4), %rcx
addq %r13, %rcx
movq %rcx, 0xd8(%rsp)
imull %r12d, %eax
cltq
leaq (,%rax,4), %rax
addq %r13, %rax
movq %rax, 0xd0(%rsp)
imull %r12d, %edx
movslq %edx, %rax
leaq (,%rax,4), %rax
addq %r13, %rax
movq %rax, 0xc8(%rsp)
imull %r12d, %r8d
movslq %r8d, %rax
leaq (,%rax,4), %rax
addq %r13, %rax
movq %rax, 0xc0(%rsp)
imull %r12d, %r9d
movslq %r9d, %rax
leaq (,%rax,4), %rax
addq %r13, %rax
movq %rax, 0xb8(%rsp)
leaq 0x8(%rbp), %rax
movq %rax, 0x70(%rsp)
movq 0x30(%rsp), %r9
imull %r9d, %eax
movl 0x14(%rsp), %r8d
movl %r8d, %ecx
subl %eax, %ecx
movq 0x28(%rsp), %rdx
vpbroadcastd 0x18(%rdx), %ymm5
movl %ecx, 0x18(%rdx)
movl %ebp, %eax
imull %r9d, %eax
movl %r8d, %ecx
subl %eax, %ecx
vmovd %ecx, %xmm9
vpbroadcastd %xmm9, %ymm9
vmovdqu 0x190(%rsp), %ymm3
vpblendd $0x80, %ymm9, %ymm3, %ymm9 # ymm9 = ymm3[0,1,2,3,4,5,6],ymm9[7]
vpblendd $0x80, %ymm5, %ymm3, %ymm10 # ymm10 = ymm3[0,1,2,3,4,5,6],ymm5[7]
movq %rbp, %rax
orq $0x1, %rax
movq %rax, 0x8(%rsp)
movq %rbp, %r8
orq $0x2, %r8
movq %rbp, %r9
orq $0x4, %r9
movq %rbp, %r13
orq $0x5, %r13
movq %rbp, %r10
orq $0x6, %r10
movq %rbp, 0x50(%rsp)
movq %rbp, %r11
orq $0x7, %r11
vpcmpeqd 0x1b0(%rsp), %ymm4, %ymm11
vpmovsxbd 0xd18f1(%rip), %ymm12 # 0x62bf26
vmovdqu 0xf0(%rsp), %ymm14
vmovdqa %ymm14, %ymm5
xorl %ebp, %ebp
movq 0x20(%rsp), %rcx
movslq 0x10(%r15,%rbp,4), %rax
movq 0xe8(%rsp), %r12
vmovd (%r12,%rax,4), %xmm13
movslq 0x14(%r15,%rbp,4), %rax
movq 0xd0(%rsp), %r12
vpinsrd $0x1, (%r12,%rax,4), %xmm13, %xmm13
movslq 0x18(%r15,%rbp,4), %rax
movq 0xe0(%rsp), %r12
vpinsrd $0x2, (%r12,%rax,4), %xmm13, %xmm13
movslq 0x1c(%r15,%rbp,4), %rax
movq 0xd8(%rsp), %r12
vpinsrd $0x3, (%r12,%rax,4), %xmm13, %xmm13
movslq (%r15,%rbp,4), %rax
movq 0xb8(%rsp), %r12
vmovd (%r12,%rax,4), %xmm15
movslq 0x4(%r15,%rbp,4), %rax
movq 0xc0(%rsp), %r12
vpinsrd $0x1, (%r12,%rax,4), %xmm15, %xmm15
movslq 0x8(%r15,%rbp,4), %rax
movq 0x40(%rsp), %r12
vpinsrd $0x2, (%r12,%rax,4), %xmm15, %xmm15
movslq 0xc(%r15,%rbp,4), %rax
movq 0xc8(%rsp), %r12
vpinsrd $0x3, (%r12,%rax,4), %xmm15, %xmm15
cmpq %rdi, 0x50(%rsp)
setne %r12b
vinserti128 $0x1, %xmm13, %ymm15, %ymm13
vpermd %ymm9, %ymm6, %ymm15
vpaddd %ymm10, %ymm13, %ymm8
vpbroadcastd 0x1c(%rdx,%rbp,4), %ymm10
vpblendd $0x80, %ymm10, %ymm15, %ymm10 # ymm10 = ymm15[0,1,2,3,4,5,6],ymm10[7]
vpermd %ymm5, %ymm6, %ymm5
vpbroadcastd 0x1c(%rcx,%rbp,4), %ymm13
vpblendd $0x80, %ymm13, %ymm5, %ymm5 # ymm5 = ymm5[0,1,2,3,4,5,6],ymm13[7]
vmovdqu 0x210(%rsp), %ymm3
vpsubd %ymm3, %ymm10, %ymm13
vmovdqu 0x230(%rsp), %ymm15
vpsubd %ymm15, %ymm5, %ymm5
vpmaxsd %ymm5, %ymm13, %ymm13
vpsubd %ymm3, %ymm9, %ymm5
vpsubd %ymm15, %ymm14, %ymm9
vpmaxsd %ymm9, %ymm5, %ymm14
vpmaxsd %ymm13, %ymm14, %ymm5
vpmaxsd %ymm5, %ymm8, %ymm5
vpcmpeqd %ymm7, %ymm12, %ymm15
vblendvps %ymm15, 0x110(%rsp), %ymm5, %ymm9
cmpq $0x8, %rbp
jb 0x55a772
vpminsd %ymm9, %ymm1, %ymm1
vpmaxsd %ymm9, %ymm0, %ymm0
movq 0x18(%rsp), %rcx
movq 0x10(%rbx), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rax
cmpq %r14, %rbp
setae %bl
orb %bl, %r12b
vextractf128 $0x1, %ymm9, %xmm5
jne 0x55a79a
vextractps $0x3, %xmm5, (%rdx,%rbp,4)
cmpq %rbp, 0xb0(%rsp)
jne 0x55a7b5
movq 0x50(%rsp), %rcx
vextractps $0x3, %xmm5, (%rax,%rcx,4)
movq 0x18(%rsp), %rcx
cmpq %rdi, 0x8(%rsp)
setne %bl
leaq -0x1(%rbp), %r12
cmpq %r14, %r12
setae %r12b
orb %bl, %r12b
jne 0x55a7d5
vextractps $0x2, %xmm5, -0x4(%rdx,%rbp,4)
cmpq %rsi, 0x8(%rsp)
setae %bl
cmpq %rbp, %r14
setne %r12b
orb %bl, %r12b
jne 0x55a7f5
movq 0x8(%rsp), %rbx
vextractps $0x2, %xmm5, (%rax,%rbx,4)
cmpq %rdi, %r8
jne 0x55a81c
leaq -0x2(%rbp), %rbx
cmpq $0x2, %rbp
setae %r12b
cmpq %r14, %rbx
setl %bl
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x55a81c
vextractps $0x1, %xmm5, -0x8(%rdx,%rbp,4)
cmpq %rsi, %r8
setae %bl
cmpq %rbp, 0xa0(%rsp)
setne %r12b
orb %bl, %r12b
jne 0x55a83a
vextractps $0x1, %xmm5, (%rax,%r8,4)
cmpq %rdi, %rcx
jne 0x55a85f
leaq -0x3(%rbp), %rbx
cmpq $0x3, %rbp
setae %r12b
cmpq %r14, %rbx
setl %bl
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x55a85f
vmovss %xmm5, -0xc(%rdx,%rbp,4)
cmpq %rsi, %rcx
setae %bl
cmpq %rbp, 0x98(%rsp)
setne %r12b
orb %bl, %r12b
jne 0x55a87b
vmovss %xmm5, (%rax,%rcx,4)
cmpq %rdi, %r9
jne 0x55a8a2
leaq -0x4(%rbp), %rbx
cmpq $0x4, %rbp
setae %r12b
cmpq %r14, %rbx
setl %bl
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x55a8a2
vpextrd $0x3, %xmm9, -0x10(%rdx,%rbp,4)
cmpq %rsi, %r9
setae %bl
cmpq %rbp, 0x90(%rsp)
setne %r12b
orb %bl, %r12b
jne 0x55a8c0
vpextrd $0x3, %xmm9, (%rax,%r9,4)
cmpq %rdi, %r13
jne 0x55a8e7
leaq -0x5(%rbp), %rbx
cmpq $0x5, %rbp
setae %r12b
cmpq %r14, %rbx
setl %bl
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x55a8e7
vpextrd $0x2, %xmm9, -0x14(%rdx,%rbp,4)
cmpq %rsi, %r13
setae %bl
cmpq %rbp, 0x88(%rsp)
setne %r12b
orb %bl, %r12b
jne 0x55a905
vpextrd $0x2, %xmm9, (%rax,%r13,4)
cmpq %rdi, %r10
jne 0x55a92c
leaq -0x6(%rbp), %rbx
cmpq $0x6, %rbp
setae %r12b
cmpq %r14, %rbx
setl %bl
andb %r12b, %bl
cmpb $0x1, %bl
jne 0x55a92c
vpextrd $0x1, %xmm9, -0x18(%rdx,%rbp,4)
cmpq %rsi, %r10
setae %bl
cmpq %rbp, 0x80(%rsp)
setne %r12b
orb %bl, %r12b
jne 0x55a94a
vpextrd $0x1, %xmm9, (%rax,%r10,4)
cmpq %rdi, %r11
setne %bl
cmpq $0x7, %rbp
setb %r12b
orb %bl, %r12b
jne 0x55a963
vmovd %xmm9, -0x1c(%rdx,%rbp,4)
cmpq %rsi, %r11
setae %bl
cmpq %rbp, 0x78(%rsp)
setne %r12b
vmovd %xmm9, %edx
orb %bl, %r12b
jne 0x55a97f
movl %edx, (%rax,%r11,4)
vmovups 0xf0(%rsp), %ymm8
vblendvps %ymm15, %ymm8, %ymm13, %ymm5
vblendvps %ymm15, %ymm8, %ymm14, %ymm14
movq 0x28(%rsp), %rax
movl %edx, (%rax,%rbp,4)
movq %rax, %rdx
movq 0x20(%rsp), %rcx
vmovss %xmm5, (%rcx,%rbp,4)
vpcmpeqd 0x1f0(%rsp), %ymm12, %ymm8
vpand %ymm11, %ymm8, %ymm8
vblendvps %ymm8, %ymm9, %ymm2, %ymm2
vpsubd %ymm7, %ymm12, %ymm12
incq %rbp
cmpq %rbp, 0xa8(%rsp)
movq 0x38(%rsp), %rbx
jne 0x55a649
vpaddd 0x170(%rsp), %ymm4, %ymm4
vmovdqu 0x110(%rsp), %ymm3
vpsubd 0x1d0(%rsp), %ymm3, %ymm3
vmovdqu %ymm3, 0x110(%rsp)
movq 0x70(%rsp), %rax
movq %rax, %r13
cmpq %rsi, %rax
movq 0x290(%rsp), %r12
jb 0x55a41a
movl 0x10(%rsp), %edx
movq 0x20(%rsp), %rdi
jmp 0x55aa3a
vmovdqu 0xf0(%rsp), %ymm2
vmovdqa %ymm2, %ymm0
vmovdqu 0x130(%rsp), %ymm1
movq 0x38(%rsp), %rbx
movl $0x8, %eax
vextractf128 $0x1, %ymm2, %xmm3
vextractps $0x3, %xmm3, %ecx
cmpl %edx, %ecx
cmovgl %ecx, %edx
vperm2i128 $0x28, %ymm2, %ymm2, %ymm3 # ymm3 = zero,zero,ymm2[0,1]
vpalignr $0xc, %ymm3, %ymm2, %ymm2 # ymm2 = ymm3[12,13,14,15],ymm2[0,1,2,3,4,5,6,7,8,9,10,11],ymm3[28,29,30,31],ymm2[16,17,18,19,20,21,22,23,24,25,26,27]
decl %eax
jne 0x55aa3f
vmovdqu 0xf0(%rsp), %ymm2
vpcmpgtd %ymm1, %ymm2, %ymm1
vpcmpgtd 0x130(%rsp), %ymm0, %ymm0
vpor %ymm0, %ymm1, %ymm0
vtestps %ymm0, %ymm0
je 0x55aa94
orb $0x40, 0xc(%rbx)
vxorps %xmm0, %xmm0, %xmm0
vmovups %ymm0, 0x150(%rsp)
xorl %edx, %edx
movl %edx, (%rbx)
vmovdqu 0x150(%rsp), %ymm0
vmovq %xmm0, 0x4(%rbx)
vzeroupper
callq 0x20a60d
movq 0x28(%rsp), %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
cmpl $0x0, 0x30(%r12)
jne 0x55ab03
movq 0x48(%rsp), %rdi
callq 0x20a60d
jmp 0x55ab03
callq 0x1f0d13
jmp 0x55ab01
callq 0x1f0ced
jmp 0x55ab01
callq 0x1f0cc7
jmp 0x55ab01
callq 0x1f0ca1
jmp 0x55ab01
callq 0x1f0c7b
jmp 0x55ab01
callq 0x1f0c55
jmp 0x55ab01
callq 0x1f0c2f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq