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

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

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

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

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_4;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    s2B= parasail_memalign_int64_t(32, s2Len+PAD2);
    _H_pr = parasail_memalign_int64_t(32, s2Len+PAD2);
    _F_pr = parasail_memalign_int64_t(32, s2Len+PAD2);
    s2 = s2B+PAD; /* will allow later for negative indices */
    H_pr = _H_pr+PAD;
    F_pr = _F_pr+PAD;

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

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

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

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

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

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

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi64_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi64(vSaturationCheckMax, vPosLimit)))) {
        result->flag |= PARASAIL_FLAG_SATURATED;
        score = 0;
        end_query = 0;
        end_ref = 0;
    }

    result->score = score;
    result->end_query = end_query;
    result->end_ref = end_ref;

    parasail_free(_F_pr);
    parasail_free(_H_pr);
    parasail_free(s2B);
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        parasail_free(s1);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
testq %rdx, %rdx
je 0x5588b0
testl %ecx, %ecx
jle 0x5588b7
testl %r8d, %r8d
js 0x5588be
movl %r9d, %r12d
testl %r9d, %r9d
js 0x5588c5
movq 0x210(%rsp), %r15
testq %r15, %r15
je 0x5588cc
cmpl $0x0, 0x30(%r15)
je 0x558049
movl 0x34(%r15), %r13d
jmp 0x55805d
testq %rdi, %rdi
je 0x5588d3
movl %esi, %r13d
testl %esi, %esi
jle 0x5588da
movq %rdi, 0x130(%rsp)
movq %rdx, 0x40(%rsp)
movslq 0x20(%r15), %rax
movl %r8d, %esi
movq %rsi, 0x38(%rsp)
btsq $0x3f, %rsi
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
movq %rbp, %rdx
subq %rax, %rdx
movslq 0x1c(%r15), %rdi
movq %rdi, 0x30(%rsp)
movl %r8d, 0xb0(%rsp)
negl %r8d
movl %r8d, 0x60(%rsp)
cmpl %r8d, %eax
cmovgq %rsi, %rdx
movq %rdx, 0x18(%rsp)
movl %r13d, %edi
movl %ecx, %esi
movq %rcx, %r14
callq 0x20ac53
testq %rax, %rax
je 0x5588df
movq %rax, %rbx
movq %r12, 0x110(%rsp)
orl $0x4841001, 0xc(%rax)   # imm = 0x4841001
movq %r14, 0x20(%rsp)
leal 0x6(%r14), %r12d
movl $0x20, %edi
movq %r12, %rsi
callq 0x20a636
movq %rax, %r14
movl $0x20, %edi
movq %r12, %rsi
callq 0x20a636
movl $0x20, %edi
movq %r12, %rsi
movq %rax, %r12
callq 0x20a636
testq %r14, %r14
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
movq %rax, 0x28(%rsp)
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x5588df
movq %rbx, 0x58(%rsp)
movq %r13, %rbx
movslq %ebx, %r13
cmpl $0x0, 0x30(%r15)
je 0x55814a
movq %rbx, 0x10(%rsp)
xorl %ebx, %ebx
jmp 0x5581c3
leal 0x3(%rbx), %eax
movl %eax, 0xf0(%rsp)
movslq %eax, %rsi
movl $0x20, %edi
callq 0x20a636
testq %rax, %rax
je 0x5588df
movq %rbx, 0x10(%rsp)
testl %ebx, %ebx
movq 0x130(%rsp), %rdi
jle 0x558195
movq 0x10(%r15), %rsi
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
movslq (%rsi,%rdx,4), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r13
jne 0x558181
movq 0x10(%rsp), %rcx
leal 0x1(%rcx), %edx
movl 0xf0(%rsp), %esi
cmpl %edx, %esi
cmovgl %esi, %edx
movq %rax, %rbx
leaq (%rax,%r13,8), %rdi
notl %ecx
addl %edx, %ecx
leaq 0x8(,%rcx,8), %rdx
xorl %esi, %esi
callq 0x19e090
movq %rbx, 0x48(%rsp)
movq 0x20(%rsp), %rsi
leal 0x3(%rsi), %ebx
subq 0x30(%rsp), %rbp
addq $-0x2, %rbp
vmovq %rbp, %xmm0
vmovsd 0x38(%rsp), %xmm1
movq 0x110(%rsp), %rdi
leal (,%rdi,4), %eax
vmovq %rax, %xmm2
leaq -0x1(%r13), %rax
vmovq %rax, %xmm3
movl %esi, %ebp
leaq -0x1(%rbp), %rax
vmovq %rax, %xmm4
movl 0x60(%rsp), %r8d
movl %r8d, %ecx
subl %edi, %ecx
subl %edi, %ecx
leal (%rdi,%rdi,2), %eax
addl 0xb0(%rsp), %eax
movq 0x10(%rsp), %rdx
decl %edx
movl %edx, 0x8(%rsp)
negl %eax
vmovd %eax, %xmm5
leal -0x1(%rsi), %eax
movl %eax, 0xc(%rsp)
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0xd0(%rsp)
vbroadcastsd %xmm1, %ymm0
vmovups %ymm0, 0x130(%rsp)
vpinsrd $0x1, %ecx, %xmm5, %xmm0
movl %r8d, %eax
subl %edi, %eax
movl %edi, %ecx
movq %rcx, 0x50(%rsp)
vmovq %rcx, %xmm1
vpbroadcastq %xmm1, %ymm1
vmovdqu %ymm1, 0x110(%rsp)
vpbroadcastq %xmm2, %ymm1
vmovdqu %ymm1, 0x1b0(%rsp)
vpbroadcastq %xmm3, %ymm1
vmovdqu %ymm1, 0x190(%rsp)
vpbroadcastq %xmm4, %ymm1
vmovdqu %ymm1, 0xf0(%rsp)
movq 0x18(%rsp), %rcx
incq %rcx
movq %rcx, 0x18(%rsp)
vmovq %rcx, %xmm1
vpinsrd $0x2, %eax, %xmm0, %xmm0
vpinsrd $0x3, %r8d, %xmm0, %xmm0
vpbroadcastq %xmm1, %ymm1
vmovdqu %ymm1, 0x60(%rsp)
vpmovsxdq %xmm0, %ymm0
vmovdqu %ymm0, 0xb0(%rsp)
movq 0x10(%r15), %rax
xorl %ecx, %ecx
movq 0x40(%rsp), %rdi
movzbl (%rdi,%rcx), %edx
movslq (%rax,%rdx,4), %rdx
movq %rdx, 0x18(%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rbp
jne 0x5582e7
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %xmm0, (%r14)
movq $0x0, 0x10(%r14)
leal 0x1(%rsi), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
leaq (%r14,%rbp,8), %rdi
addq $0x18, %rdi
movl %esi, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x8(,%rcx,8), %rdx
xorl %r15d, %r15d
xorl %esi, %esi
vzeroupper
callq 0x19e090
vmovdqu 0xb0(%rsp), %ymm0
vextracti128 $0x1, %ymm0, %xmm0
vpextrq $0x1, %xmm0, %rax
movq %rax, 0x88(%rsp)
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %r10
movq %rax, 0x18(%r12,%r15,8)
movq %rcx, 0x18(%rdx,%r15,8)
incq %r15
subq %r10, %rax
cmpq %r15, %rbp
jne 0x558364
xorl %eax, %eax
movq %rcx, (%r12,%rax,8)
movq %rcx, (%rdx,%rax,8)
incq %rax
cmpq $0x3, %rax
jne 0x55837b
leaq 0x3(%rbp), %rax
movq 0x210(%rsp), %r15
movq 0x20(%rsp), %rsi
movq %rcx, (%r12,%rax,8)
movq %rcx, (%rdx,%rax,8)
incq %rax
incl %esi
cmpl %esi, %ebx
jg 0x55839d
movq $0x0, 0x10(%r12)
vmovdqu 0x60(%rsp), %ymm2
vmovdqa %ymm2, %ymm0
vmovdqu 0xd0(%rsp), %ymm1
cmpl $0x0, 0x10(%rsp)
jle 0x558808
movq 0x8(%r15), %rax
movq %rax, 0x80(%rsp)
vpxor %xmm0, %xmm0, %xmm0
vmovdqu 0x60(%rsp), %ymm3
vpblendd $0x3, %ymm0, %ymm3, %ymm0 # ymm0 = ymm0[0,1],ymm3[2,3,4,5,6,7]
vpermq $0x39, %ymm0, %ymm0     # ymm0 = ymm0[1,2,3,0]
vmovdqu %ymm0, 0x170(%rsp)
movl 0xc(%rsp), %eax
movq %rax, 0x10(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0xa8(%rsp)
movl 0x8(%rsp), %edi
leaq 0x1(%rbp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x2(%rbp), %rax
movq %rax, 0x98(%rsp)
vpmovsxbq 0xd3aa9(%rip), %ymm4 # 0x62beea
xorl %r8d, %r8d
vpcmpeqd %ymm6, %ymm6, %ymm6
vbroadcastsd 0xd5737(%rip), %ymm0 # 0x62db88
vmovups %ymm0, 0x150(%rsp)
vmovdqa %ymm3, %ymm2
vmovdqu 0xd0(%rsp), %ymm1
vmovdqa %ymm3, %ymm0
movq %r8, %r11
orq $0x2, %r11
cmpl $0x0, 0x30(%r15)
je 0x5584ad
movq %r8, %rax
orq $0x1, %rax
cmpq %r13, %rax
movl 0x8(%rsp), %esi
cmovgel %esi, %eax
cltq
cmpq %r13, %r11
movl %r11d, %ecx
cmovgel %esi, %ecx
movslq %ecx, %rdx
movq %r8, %rcx
orq $0x3, %rcx
cmpq %r13, %rcx
cmovgel %esi, %ecx
movslq %ecx, %rsi
movq %r8, %rcx
jmp 0x5584c4
movq 0x48(%rsp), %rsi
movq (%rsi,%r8,8), %rcx
movq 0x8(%rsi,%r8,8), %rax
movq (%rsi,%r11,8), %rdx
movq 0x18(%rsi,%r8,8), %rsi
movslq 0x18(%r15), %r9
imulq %r9, %rax
movq 0x80(%rsp), %rbx
leaq (%rbx,%rax,4), %rax
movq %rax, 0x40(%rsp)
imulq %r9, %rcx
leaq (%rbx,%rcx,4), %rax
movq %rax, 0x38(%rsp)
imulq %r9, %rdx
leaq (%rbx,%rdx,4), %rax
movq %rax, 0x30(%rsp)
imulq %r9, %rsi
leaq (%rbx,%rsi,4), %rax
movq %rax, 0x20(%rsp)
leaq 0x4(%r8), %rsi
movq %rsi, 0x90(%rsp)
imulq %r10, %rsi
movq 0x88(%rsp), %rax
movq %rax, %r9
subq %rsi, %r9
vpbroadcastq 0x10(%r12), %ymm8
movq %r9, 0x10(%r12)
movq %r8, %rsi
imulq %r10, %rsi
movq %rax, %r9
subq %rsi, %r9
vmovq %r9, %xmm9
vpbroadcastq %xmm9, %ymm9
vmovdqu 0x170(%rsp), %ymm3
vpblendd $0xc0, %ymm9, %ymm3, %ymm11 # ymm11 = ymm3[0,1,2,3,4,5],ymm9[6,7]
vpblendd $0xc0, %ymm8, %ymm3, %ymm10 # ymm10 = ymm3[0,1,2,3,4,5],ymm8[6,7]
movq %r8, %r10
orq $0x1, %r10
movq %r8, %rsi
orq $0x3, %rsi
vpcmpeqq 0x190(%rsp), %ymm4, %ymm8
xorl %r9d, %r9d
vpmovsxbq 0xd3970(%rip), %ymm9 # 0x62beee
vmovdqu 0x60(%rsp), %ymm12
vmovdqa %ymm12, %ymm15
movq 0x28(%rsp), %rax
vmovdqa %ymm10, %ymm14
vpermq $0xf9, %ymm11, %ymm10   # ymm10 = ymm11[1,2,3,3]
movq %r12, %rbx
vpbroadcastq 0x18(%r12,%r9,8), %ymm13
vpblendd $0xc0, %ymm13, %ymm10, %ymm10 # ymm10 = ymm10[0,1,2,3,4,5],ymm13[6,7]
vpermq $0xf9, %ymm15, %ymm13   # ymm13 = ymm15[1,2,3,3]
vpbroadcastq 0x18(%rax,%r9,8), %ymm15
vpblendd $0xc0, %ymm15, %ymm13, %ymm13 # ymm13 = ymm13[0,1,2,3,4,5],ymm15[6,7]
vmovdqu 0x130(%rsp), %ymm3
vpsubq %ymm3, %ymm10, %ymm15
vmovdqu 0x110(%rsp), %ymm5
vpsubq %ymm5, %ymm13, %ymm13
vpsubq %ymm3, %ymm11, %ymm11
vpsubq %ymm5, %ymm12, %ymm5
movq 0x18(%r14,%r9,8), %r15
movq 0x38(%rsp), %rax
movslq (%rax,%r15,4), %r15
movq 0x10(%r14,%r9,8), %r12
movq 0x40(%rsp), %rax
movslq (%rax,%r12,4), %r12
movq (%r14,%r9,8), %rax
movq 0x8(%r14,%r9,8), %rcx
movq 0x30(%rsp), %rdx
movslq (%rdx,%rcx,4), %rcx
movq 0x20(%rsp), %rdx
movslq (%rdx,%rax,4), %rax
vmovq %r15, %xmm12
vmovq %r12, %xmm7
vpunpcklqdq %xmm12, %xmm7, %xmm7 # xmm7 = xmm7[0],xmm12[0]
vmovq %rcx, %xmm12
vmovq %rax, %xmm3
vpunpcklqdq %xmm12, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm12[0]
vpcmpgtq %ymm13, %ymm15, %ymm12
vblendvpd %ymm12, %ymm15, %ymm13, %ymm12
vinserti128 $0x1, %xmm7, %ymm3, %ymm3
vpcmpgtq %ymm5, %ymm11, %ymm7
vblendvpd %ymm7, %ymm11, %ymm5, %ymm13
vpaddq %ymm3, %ymm14, %ymm3
vpcmpgtq %ymm13, %ymm3, %ymm5
vblendvpd %ymm5, %ymm3, %ymm13, %ymm3
vpcmpgtq %ymm12, %ymm3, %ymm5
vblendvpd %ymm5, %ymm3, %ymm12, %ymm3
vpcmpeqq %ymm6, %ymm9, %ymm14
vblendvpd %ymm14, 0xb0(%rsp), %ymm3, %ymm11
cmpq $0x4, %r9
jb 0x558695
vpcmpgtq %ymm1, %ymm11, %ymm3
vblendvpd %ymm3, %ymm1, %ymm11, %ymm1
vpcmpgtq %ymm11, %ymm0, %ymm3
vblendvpd %ymm3, %ymm0, %ymm11, %ymm0
cmpq %rdi, %r8
setne %al
movq 0x58(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %r15
movq 0x8(%rcx), %r12
cmpq %rbp, %r9
setae %cl
orb %al, %cl
vextractf128 $0x1, %ymm11, %xmm15
jne 0x5586c2
vextractps $0x2, %xmm15, (%r15,%r9,4)
cmpq %r9, 0x10(%rsp)
jne 0x5586d0
vextractps $0x2, %xmm15, (%r12,%r8,4)
cmpq %rdi, %r10
setne %al
leaq -0x1(%r9), %rcx
cmpq %rbp, %rcx
setae %cl
orb %al, %cl
jne 0x5586eb
vmovss %xmm15, -0x4(%r15,%r9,4)
cmpq %r13, %r10
setge %al
cmpq %r9, %rbp
setne %cl
orb %al, %cl
jne 0x558701
vmovss %xmm15, (%r12,%r10,4)
cmpq %rdi, %r11
jne 0x558725
leaq -0x2(%r9), %rax
cmpq $0x2, %r9
setae %cl
cmpq %rbp, %rax
setl %al
andb %cl, %al
cmpb $0x1, %al
jne 0x558725
vpextrd $0x2, %xmm11, -0x8(%r15,%r9,4)
cmpq %r13, %r11
setge %al
cmpq %r9, 0xa0(%rsp)
setne %cl
orb %al, %cl
jne 0x558741
vpextrd $0x2, %xmm11, (%r12,%r11,4)
cmpq %rdi, %rsi
setne %al
cmpq $0x3, %r9
setb %cl
orb %al, %cl
jne 0x558759
vmovd %xmm11, -0xc(%r15,%r9,4)
cmpq %r13, %rsi
setge %al
cmpq %r9, 0x98(%rsp)
setne %cl
orb %al, %cl
jne 0x558774
vmovd %xmm11, (%r12,%rsi,4)
vmovupd 0x60(%rsp), %ymm3
vblendvpd %ymm14, %ymm3, %ymm12, %ymm15
vblendvpd %ymm14, %ymm3, %ymm13, %ymm12
movq %rbx, %r12
vmovq %xmm11, (%rbx,%r9,8)
movq 0x28(%rsp), %rax
vmovlpd %xmm15, (%rax,%r9,8)
vpcmpeqq 0xf0(%rsp), %ymm9, %ymm3
vpand %ymm3, %ymm8, %ymm3
vblendvpd %ymm3, %ymm11, %ymm2, %ymm2
vpsubq %ymm6, %ymm9, %ymm9
incq %r9
cmpq %r9, 0xa8(%rsp)
jne 0x55858e
vpaddq 0x150(%rsp), %ymm4, %ymm4
vmovdqu 0xb0(%rsp), %ymm3
vpsubq 0x1b0(%rsp), %ymm3, %ymm3
vmovdqu %ymm3, 0xb0(%rsp)
movq 0x90(%rsp), %rax
movq %rax, %r8
cmpq %r13, %rax
movq 0x210(%rsp), %r15
movq 0x50(%rsp), %r10
jl 0x55846b
movl $0x4, %eax
movq 0x18(%rsp), %rdx
vextracti128 $0x1, %ymm2, %xmm3
vpextrq $0x1, %xmm3, %rcx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
vperm2i128 $0x8, %ymm2, %ymm2, %ymm3 # ymm3 = zero,zero,ymm2[0,1]
vpalignr $0x8, %ymm3, %ymm2, %ymm2 # ymm2 = ymm3[8,9,10,11,12,13,14,15],ymm2[0,1,2,3,4,5,6,7],ymm3[24,25,26,27,28,29,30,31],ymm2[16,17,18,19,20,21,22,23]
decl %eax
jne 0x558812
vmovdqu 0x60(%rsp), %ymm2
vpcmpgtq %ymm1, %ymm2, %ymm1
vpcmpgtq 0xd0(%rsp), %ymm0, %ymm0
vpor %ymm0, %ymm1, %ymm0
vtestpd %ymm0, %ymm0
movq 0x58(%rsp), %rbx
je 0x558870
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl %edx, (%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x28(%rsp), %rdi
vzeroupper
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
cmpl $0x0, 0x30(%r15)
jne 0x5588e1
movq 0x48(%rsp), %rdi
callq 0x20a60d
jmp 0x5588e1
callq 0x1f09f5
jmp 0x5588df
callq 0x1f09cf
jmp 0x5588df
callq 0x1f09a9
jmp 0x5588df
callq 0x1f0983
jmp 0x5588df
callq 0x1f095d
jmp 0x5588df
callq 0x1f0937
jmp 0x5588df
callq 0x1f0911
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop