// File: /workspace/github_c_makefile_star2_O1/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 $0x238, %rsp            # imm = 0x238
testq %rdx, %rdx
je 0x52a549
movl %ecx, %ebp
testl %ecx, %ecx
jle 0x52a550
movl %r8d, %r13d
testl %r8d, %r8d
js 0x52a557
testl %r9d, %r9d
js 0x52a55e
movq %rdx, %r15
movq 0x270(%rsp), %rdx
testq %rdx, %rdx
je 0x52a565
movl 0x30(%rdx), %eax
testl %eax, %eax
jne 0x5299f1
testq %rdi, %rdi
je 0x52a56c
testl %esi, %esi
jle 0x52a573
testl %eax, %eax
je 0x5299f4
movl 0x34(%rdx), %esi
movq %rdi, %r12
movq %r9, 0x70(%rsp)
movl %r13d, %edi
negl %edi
movl 0x20(%rdx), %eax
movl $0x80000000, %r8d       # imm = 0x80000000
movl %r13d, %ecx
orl %r8d, %ecx
subl %eax, %r8d
movl %edi, 0xc(%rsp)
cmpl %edi, %eax
cmovgl %ecx, %r8d
movl %r8d, 0x8(%rsp)
movl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %r14d
movq %rsi, 0x48(%rsp)
movl %esi, %edi
movl %ebp, %esi
callq 0x209630
testq %rax, %rax
je 0x52a578
movq %rax, %rbx
movl %r13d, 0x110(%rsp)
movq %r15, 0x58(%rsp)
orl $0x8441001, 0xc(%rax)   # imm = 0x8441001
leal 0xe(%rbp), %r13d
movl $0x20, %edi
movq %r13, %rsi
callq 0x2094d5
movq %rax, %r15
movl $0x20, %edi
movq %r13, %rsi
callq 0x2094d5
movl $0x20, %edi
movq %r13, %rsi
movq %rax, %r13
callq 0x2094d5
testq %r15, %r15
sete %dl
testq %r13, %r13
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x52a578
movq %rax, 0x68(%rsp)
movq %rbx, 0x78(%rsp)
movq 0x270(%rsp), %r8
cmpl $0x0, 0x30(%r8)
je 0x529ace
movq $0x0, 0x60(%rsp)
jmp 0x529b57
movq 0x48(%rsp), %rbx
leal 0x7(%rbx), %eax
movl %eax, 0x90(%rsp)
movslq %eax, %rsi
movl $0x20, %edi
callq 0x2094d5
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x52a578
testl %ebx, %ebx
movq 0x60(%rsp), %rdi
jle 0x529b24
movq 0x270(%rsp), %rax
movq 0x10(%rax), %rax
movl %ebx, %ecx
xorl %edx, %edx
movzbl (%r12,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, (%rdi,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x529b11
movslq %ebx, %rax
leal 0x1(%rbx), %ecx
movl 0x90(%rsp), %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
leaq (%rdi,%rax,4), %rdi
movl %ebx, %eax
notl %eax
addl %ecx, %eax
leaq 0x4(,%rax,4), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x270(%rsp), %r8
movq %r13, 0x88(%rsp)
leal 0x7(%rbp), %ebx
vmovd %r14d, %xmm0
movl 0x110(%rsp), %r12d
vmovd %r12d, %xmm1
movq 0x70(%rsp), %r9
leal (,%r9,8), %edx
leal (%r9,%r9), %ecx
leal (,%r9,4), %esi
movl 0xc(%rsp), %r10d
movl %r10d, %eax
subl %esi, %eax
movl %r9d, %esi
subl %edx, %esi
leal (%r9,%r9,2), %edx
addl %r12d, %edx
negl %edx
vmovd %edx, %xmm2
movl %r10d, %edx
subl %ecx, %edx
vpinsrd $0x1, %edx, %xmm2, %xmm2
leal (%r9,%r9,4), %edx
addl %r12d, %edx
leal (%rcx,%rcx,2), %ecx
addl %r12d, %ecx
subl %r12d, %esi
movl %r10d, %edi
subl %r9d, %edi
vpinsrd $0x2, %edi, %xmm2, %xmm2
movq 0x48(%rsp), %rdi
decl %edi
vmovd %esi, %xmm3
leal -0x1(%rbp), %esi
movl 0x8(%rsp), %r12d
incl %r12d
movl %r12d, 0x8(%rsp)
vmovd %r12d, %xmm4
vpbroadcastd %xmm4, %ymm4
vmovdqu %ymm4, 0x90(%rsp)
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x130(%rsp)
vpbroadcastd %xmm1, %ymm0
vmovdqu %ymm0, 0x210(%rsp)
vmovd %r9d, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x1f0(%rsp)
vpslld $0x3, %ymm0, %ymm0
vmovdqu %ymm0, 0x1b0(%rsp)
movl %edi, 0x14(%rsp)
vmovd %edi, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x190(%rsp)
movl %esi, 0x10(%rsp)
vmovd %esi, %xmm0
negl %edx
negl %ecx
vpinsrd $0x3, %r10d, %xmm2, %xmm1
vpinsrd $0x1, %ecx, %xmm3, %xmm2
vpinsrd $0x2, %edx, %xmm2, %xmm2
vpinsrd $0x3, %eax, %xmm2, %xmm2
vpbroadcastd %xmm0, %ymm0
vmovdqu %ymm0, 0x1d0(%rsp)
vinserti128 $0x1, %xmm1, %ymm2, %ymm0
vmovdqu %ymm0, 0x110(%rsp)
movq 0x10(%r8), %rax
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
xorl %ecx, %ecx
movq 0x58(%rsp), %rsi
movzbl (%rsi,%rcx), %edx
movl (%rax,%rdx,4), %edx
movl %edx, 0x1c(%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x529caa
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, 0xc(%r15)
vmovdqu %xmm0, (%r15)
movl %ebp, %r14d
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 %r13d, %r13d
xorl %esi, %esi
vzeroupper
callq 0x19e090
movl 0xc(%rsp), %eax
movl 0x8(%rsp), %edx
movq 0x70(%rsp), %rcx
movq 0x88(%rsp), %rsi
movq 0x68(%rsp), %rdi
movl %eax, 0x1c(%rsi,%r13,4)
movl %edx, 0x1c(%rdi,%r13,4)
incq %r13
subl %ecx, %eax
cmpq %r13, %r12
jne 0x529d15
xorl %eax, %eax
movq %rsi, %r13
movq 0x48(%rsp), %rcx
movl %edx, (%r13,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
cmpq $0x7, %rax
jne 0x529d33
leaq 0x7(%r14), %rax
movq 0x270(%rsp), %r11
movl %edx, (%r13,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
incl %ebp
cmpl %ebp, %ebx
jg 0x529d50
movl $0x0, 0x18(%r13)
testl %ecx, %ecx
jle 0x52a495
movq 0x8(%r11), %rax
movq %rax, 0xb8(%rsp)
vmovdqu 0x90(%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, 0x170(%rsp)
movl 0x10(%rsp), %eax
movq %rax, 0x100(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0xf8(%rsp)
movl %ecx, %esi
movl 0x14(%rsp), %ebp
movl %ebp, %edi
leaq 0x1(%r14), %rax
movq %rax, 0xf0(%rsp)
leaq 0x2(%r14), %rax
movq %rax, 0xe8(%rsp)
leaq 0x3(%r14), %rax
movq %rax, 0xe0(%rsp)
leaq 0x4(%r14), %rax
movq %rax, 0xd8(%rsp)
leaq 0x5(%r14), %rax
movq %rax, 0xd0(%rsp)
leaq 0x6(%r14), %rax
movq %rax, 0xc8(%rsp)
vpmovsxbd 0xcddc7(%rip), %ymm4 # 0x5f7bda
xorl %eax, %eax
vpmovsxbd 0xcfbe6(%rip), %ymm6 # 0x5f9a04
vpcmpeqd %ymm7, %ymm7, %ymm7
vbroadcastss 0xcfbd5(%rip), %ymm0 # 0x5f9a00
vmovups %ymm0, 0x150(%rsp)
vmovdqa %ymm5, %ymm2
vmovdqu 0x130(%rsp), %ymm1
vmovdqa %ymm5, %ymm0
movq 0x78(%rsp), %rbx
movl 0x30(%r11), %r12d
movl %eax, %edx
testl %r12d, %r12d
movq 0x60(%rsp), %rcx
movq %rax, %r13
jne 0x529e61
movl (%rcx,%r13,4), %edx
movq %r13, %rax
orq $0x1, %rax
testl %r12d, %r12d
movq %rax, 0x58(%rsp)
je 0x529e83
cmpq %rsi, %rax
movl %ebp, %r8d
cmovbl %eax, %r8d
movl %r8d, 0x40(%rsp)
jmp 0x529e8a
movl (%rcx,%rax,4), %eax
movl %eax, 0x40(%rsp)
movq %r13, %rax
orq $0x2, %rax
testl %r12d, %r12d
movq %rax, 0x108(%rsp)
movl %edx, 0x50(%rsp)
je 0x529eb0
cmpq %rsi, %rax
movl %ebp, %edx
cmovbl %eax, %edx
movl %edx, 0x38(%rsp)
jmp 0x529eb7
movl (%rcx,%rax,4), %eax
movl %eax, 0x38(%rsp)
movq %r13, %rdx
orq $0x3, %rdx
testl %r12d, %r12d
je 0x529ecd
cmpq %rsi, %rdx
movl %ebp, %eax
cmovbl %edx, %eax
jmp 0x529ed0
movl (%rcx,%rdx,4), %eax
movl %eax, 0x30(%rsp)
movq %r13, %r8
orq $0x4, %r8
testl %r12d, %r12d
je 0x529eeb
cmpq %rsi, %r8
movl %ebp, %eax
cmovbl %r8d, %eax
jmp 0x529eef
movl (%rcx,%r8,4), %eax
movl %eax, 0x28(%rsp)
movq %r13, %r9
orq $0x5, %r9
testl %r12d, %r12d
je 0x529f0a
cmpq %rsi, %r9
movl %ebp, %eax
cmovbl %r9d, %eax
jmp 0x529f0e
movl (%rcx,%r9,4), %eax
movl %eax, 0x20(%rsp)
movq %r13, %r10
orq $0x6, %r10
testl %r12d, %r12d
je 0x529f29
cmpq %rsi, %r10
movl %ebp, %eax
cmovbl %r10d, %eax
jmp 0x529f2d
movl (%rcx,%r10,4), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%r11), %eax
movq %r13, %r11
orq $0x7, %r11
testl %r12d, %r12d
je 0x529f4c
cmpq %rsi, %r11
movl %ebp, %ecx
cmovbl %r11d, %ecx
jmp 0x529f50
movl (%rcx,%r11,4), %ecx
movl 0x50(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x50(%rsp)
movl 0x40(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x40(%rsp)
movl 0x38(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x38(%rsp)
movl 0x30(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x30(%rsp)
movl 0x28(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x28(%rsp)
movl 0x20(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x20(%rsp)
movl 0x18(%rsp), %ebp
imull %eax, %ebp
movl %ebp, 0x18(%rsp)
imull %eax, %ecx
movl %ecx, 0x80(%rsp)
leaq 0x8(%r13), %rax
movq %rax, 0xc0(%rsp)
movq 0x70(%rsp), %r12
imull %r12d, %eax
movl 0xc(%rsp), %ebp
subl %eax, %ebp
movq %r13, %rcx
movq 0x88(%rsp), %r13
vpbroadcastd 0x18(%r13), %ymm5
movl %ebp, 0x18(%r13)
movq %rcx, %rax
movq %rcx, 0x48(%rsp)
imull %r12d, %eax
movl 0xc(%rsp), %ebp
subl %eax, %ebp
movslq 0x50(%rsp), %rax
movq 0xb8(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
movq %rax, 0x50(%rsp)
movslq 0x40(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x40(%rsp)
movslq 0x38(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x38(%rsp)
movslq 0x30(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x30(%rsp)
movslq 0x28(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x28(%rsp)
movslq 0x20(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x20(%rsp)
movslq 0x18(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x18(%rsp)
movslq 0x80(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x80(%rsp)
vmovd %ebp, %xmm9
vpbroadcastd %xmm9, %ymm9
vmovdqu 0x170(%rsp), %ymm3
vpblendd $0x80, %ymm9, %ymm3, %ymm11 # ymm11 = ymm3[0,1,2,3,4,5,6],ymm9[7]
vpblendd $0x80, %ymm5, %ymm3, %ymm12 # ymm12 = ymm3[0,1,2,3,4,5,6],ymm5[7]
vpcmpeqd 0x190(%rsp), %ymm4, %ymm9
xorl %r12d, %r12d
vpmovsxbd 0xcdb50(%rip), %ymm10 # 0x5f7bea
vmovdqu 0x90(%rsp), %ymm14
vmovdqa %ymm14, %ymm5
movq 0x68(%rsp), %rcx
movslq 0x10(%r15,%r12,4), %rax
movq 0x30(%rsp), %rbp
vmovd (%rbp,%rax,4), %xmm13
movslq 0x14(%r15,%r12,4), %rax
movq 0x38(%rsp), %rbp
vpinsrd $0x1, (%rbp,%rax,4), %xmm13, %xmm13
movslq 0x18(%r15,%r12,4), %rax
movq 0x40(%rsp), %rbp
vpinsrd $0x2, (%rbp,%rax,4), %xmm13, %xmm13
movslq 0x1c(%r15,%r12,4), %rax
movq 0x50(%rsp), %rbp
vpinsrd $0x3, (%rbp,%rax,4), %xmm13, %xmm13
movslq (%r15,%r12,4), %rax
movq 0x80(%rsp), %rbp
vmovd (%rbp,%rax,4), %xmm15
movslq 0x4(%r15,%r12,4), %rax
movq 0x18(%rsp), %rbp
vpinsrd $0x1, (%rbp,%rax,4), %xmm15, %xmm15
movslq 0x8(%r15,%r12,4), %rax
movq 0x20(%rsp), %rbp
vpinsrd $0x2, (%rbp,%rax,4), %xmm15, %xmm15
movslq 0xc(%r15,%r12,4), %rax
movq 0x28(%rsp), %rbp
vpinsrd $0x3, (%rbp,%rax,4), %xmm15, %xmm15
cmpq %rdi, 0x48(%rsp)
setne %bpl
vinserti128 $0x1, %xmm13, %ymm15, %ymm13
vpermd %ymm11, %ymm6, %ymm15
vpaddd %ymm12, %ymm13, %ymm8
vpbroadcastd 0x1c(%r13,%r12,4), %ymm12
vpblendd $0x80, %ymm12, %ymm15, %ymm12 # ymm12 = ymm15[0,1,2,3,4,5,6],ymm12[7]
vpermd %ymm5, %ymm6, %ymm5
vpbroadcastd 0x1c(%rcx,%r12,4), %ymm13
vpblendd $0x80, %ymm13, %ymm5, %ymm5 # ymm5 = ymm5[0,1,2,3,4,5,6],ymm13[7]
vmovdqu 0x210(%rsp), %ymm15
vpsubd %ymm15, %ymm12, %ymm13
vmovdqu 0x1f0(%rsp), %ymm3
vpsubd %ymm3, %ymm5, %ymm5
vpmaxsd %ymm5, %ymm13, %ymm13
vpsubd %ymm15, %ymm11, %ymm5
vpsubd %ymm3, %ymm14, %ymm11
vpmaxsd %ymm11, %ymm5, %ymm14
vpmaxsd %ymm13, %ymm14, %ymm5
vpmaxsd %ymm5, %ymm8, %ymm5
vpcmpeqd %ymm7, %ymm10, %ymm15
vblendvps %ymm15, 0x110(%rsp), %ymm5, %ymm11
cmpq $0x8, %r12
jb 0x52a1c9
vpminsd %ymm11, %ymm1, %ymm1
vpmaxsd %ymm11, %ymm0, %ymm0
movq 0x58(%rsp), %rcx
movq 0x10(%rbx), %rax
movq (%rax), %r13
movq 0x8(%rax), %rax
cmpq %r14, %r12
setae %bl
orb %bl, %bpl
vextractf128 $0x1, %ymm11, %xmm5
jne 0x52a1f2
vextractps $0x3, %xmm5, (%r13,%r12,4)
cmpq %r12, 0x100(%rsp)
jne 0x52a20d
movq 0x48(%rsp), %rcx
vextractps $0x3, %xmm5, (%rax,%rcx,4)
movq 0x58(%rsp), %rcx
cmpq %rdi, %rcx
setne %bl
leaq -0x1(%r12), %rbp
cmpq %r14, %rbp
setae %bpl
orb %bl, %bpl
jne 0x52a22c
vextractps $0x2, %xmm5, -0x4(%r13,%r12,4)
cmpq %rsi, %rcx
setae %bl
cmpq %r12, %r14
setne %bpl
orb %bl, %bpl
jne 0x52a245
vextractps $0x2, %xmm5, (%rax,%rcx,4)
movq 0x108(%rsp), %rcx
cmpq %rdi, %rcx
jne 0x52a275
leaq -0x2(%r12), %rbx
cmpq $0x2, %r12
setae %bpl
cmpq %r14, %rbx
setl %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x52a275
vextractps $0x1, %xmm5, -0x8(%r13,%r12,4)
cmpq %rsi, %rcx
setae %bl
cmpq %r12, 0xf0(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a293
vextractps $0x1, %xmm5, (%rax,%rcx,4)
cmpq %rdi, %rdx
jne 0x52a2ba
leaq -0x3(%r12), %rbx
cmpq $0x3, %r12
setae %bpl
cmpq %r14, %rbx
setl %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x52a2ba
vmovss %xmm5, -0xc(%r13,%r12,4)
cmpq %rsi, %rdx
setae %bl
cmpq %r12, 0xe8(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a2d6
vmovss %xmm5, (%rax,%rdx,4)
cmpq %rdi, %r8
jne 0x52a2fe
leaq -0x4(%r12), %rbx
cmpq $0x4, %r12
setae %bpl
cmpq %r14, %rbx
setl %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x52a2fe
vpextrd $0x3, %xmm11, -0x10(%r13,%r12,4)
cmpq %rsi, %r8
setae %bl
cmpq %r12, 0xe0(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a31c
vpextrd $0x3, %xmm11, (%rax,%r8,4)
cmpq %rdi, %r9
jne 0x52a344
leaq -0x5(%r12), %rbx
cmpq $0x5, %r12
setae %bpl
cmpq %r14, %rbx
setl %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x52a344
vpextrd $0x2, %xmm11, -0x14(%r13,%r12,4)
cmpq %rsi, %r9
setae %bl
cmpq %r12, 0xd8(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a362
vpextrd $0x2, %xmm11, (%rax,%r9,4)
cmpq %rdi, %r10
jne 0x52a38a
leaq -0x6(%r12), %rbx
cmpq $0x6, %r12
setae %bpl
cmpq %r14, %rbx
setl %bl
andb %bpl, %bl
cmpb $0x1, %bl
jne 0x52a38a
vpextrd $0x1, %xmm11, -0x18(%r13,%r12,4)
cmpq %rsi, %r10
setae %bl
cmpq %r12, 0xd0(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a3a8
vpextrd $0x1, %xmm11, (%rax,%r10,4)
cmpq %rdi, %r11
jne 0x52a3cc
leaq -0x7(%r12), %rbx
cmpq $0x7, %r12
setb %bpl
cmpq %r14, %rbx
setge %bl
orb %bpl, %bl
jne 0x52a3cc
vmovd %xmm11, -0x1c(%r13,%r12,4)
cmpq %rsi, %r11
setae %bl
cmpq %r12, 0xc8(%rsp)
setne %bpl
orb %bl, %bpl
jne 0x52a3e9
vmovd %xmm11, (%rax,%r11,4)
vmovups 0x90(%rsp), %ymm8
vblendvps %ymm15, %ymm8, %ymm13, %ymm5
vblendvps %ymm15, %ymm8, %ymm14, %ymm14
movq 0x88(%rsp), %r13
vmovd %xmm11, (%r13,%r12,4)
movq 0x68(%rsp), %rcx
vmovss %xmm5, (%rcx,%r12,4)
vpcmpeqd 0x1d0(%rsp), %ymm10, %ymm8
vpand %ymm9, %ymm8, %ymm8
vblendvps %ymm8, %ymm11, %ymm2, %ymm2
vpsubd %ymm7, %ymm10, %ymm10
incq %r12
cmpq %r12, 0xf8(%rsp)
movq 0x78(%rsp), %rbx
jne 0x52a0ac
vpaddd 0x150(%rsp), %ymm4, %ymm4
vmovdqu 0x110(%rsp), %ymm3
vpsubd 0x1b0(%rsp), %ymm3, %ymm3
vmovdqu %ymm3, 0x110(%rsp)
movq 0xc0(%rsp), %rcx
movq %rcx, %rax
cmpq %rsi, %rcx
movq 0x270(%rsp), %r11
movl 0x14(%rsp), %ebp
jb 0x529e4a
movl 0x8(%rsp), %edx
movq 0x68(%rsp), %rdi
jmp 0x52a4b4
vmovdqu 0x90(%rsp), %ymm2
vmovdqa %ymm2, %ymm0
vmovdqu 0x130(%rsp), %ymm1
movq 0x78(%rsp), %rbx
movl 0x14(%rsp), %ebp
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 0x52a4b9
vmovdqu 0x90(%rsp), %ymm2
vpcmpgtd %ymm1, %ymm2, %ymm1
vpcmpgtd 0x130(%rsp), %ymm0, %ymm0
vpor %ymm0, %ymm1, %ymm0
vtestps %ymm0, %ymm0
je 0x52a50b
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
movl $0x0, 0x10(%rsp)
xorl %ebp, %ebp
movl %edx, (%rbx)
movl %ebp, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rbx)
vzeroupper
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq 0x270(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x52a57a
movq 0x60(%rsp), %rdi
callq 0x2094b5
jmp 0x52a57a
callq 0x1f0d1f
jmp 0x52a578
callq 0x1f0cf9
jmp 0x52a578
callq 0x1f0cd3
jmp 0x52a578
callq 0x1f0cad
jmp 0x52a578
callq 0x1f0c87
jmp 0x52a578
callq 0x1f0c61
jmp 0x52a578
callq 0x1f0c3b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop