// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/nw_diag_sse2_128_16.c
// Function: parasail_nw_rowcol_diag_sse2_128_16
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;
    int16_t * restrict s1 = NULL;
    int16_t * restrict s2B = NULL;
    int16_t * restrict _H_pr = NULL;
    int16_t * restrict _F_pr = NULL;
    int16_t * restrict s2 = NULL;
    int16_t * restrict H_pr = NULL;
    int16_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;
    int16_t NEG_LIMIT = 0;
    int16_t POS_LIMIT = 0;
    int16_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vNegInf;
    __m128i vOpen;
    __m128i vGap;
    __m128i vOne;
    __m128i vN;
    __m128i vGapN;
    __m128i vNegOne;
    __m128i vI;
    __m128i vJreset;
    __m128i vMax;
    __m128i vILimit;
    __m128i vILimit1;
    __m128i vJLimit;
    __m128i vJLimit1;
    __m128i 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 ? INT16_MIN + open : INT16_MIN - matrix->min) + 1;
    POS_LIMIT = INT16_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi16(NEG_LIMIT);
    vPosLimit = _mm_set1_epi16(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInf = _mm_set1_epi16(NEG_LIMIT);
    vOpen = _mm_set1_epi16(open);
    vGap  = _mm_set1_epi16(gap);
    vOne = _mm_set1_epi16(1);
    vN = _mm_set1_epi16(N);
    vGapN = _mm_set1_epi16(gap*N);
    vNegOne = _mm_set1_epi16(-1);
    vI = _mm_set_epi16(0,1,2,3,4,5,6,7);
    vJreset = _mm_set_epi16(0,-1,-2,-3,-4,-5,-6,-7);
    vMax = vNegInf;
    vILimit = _mm_set1_epi16(s1Len);
    vILimit1 = _mm_subs_epi16(vILimit, vOne);
    vJLimit = _mm_set1_epi16(s2Len);
    vJLimit1 = _mm_subs_epi16(vJLimit, vOne);
    vIBoundary = _mm_set_epi16(
            -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_16 | 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_int16_t(16, s2Len+PAD2);
    _H_pr = parasail_memalign_int16_t(16, s2Len+PAD2);
    _F_pr = parasail_memalign_int16_t(16, 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_int16_t(16, 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) {
        __m128i vNH = vNegInf;
        __m128i vWH = vNegInf;
        __m128i vE = vNegInf;
        __m128i vF = vNegInf;
        __m128i 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 = _mm_srli_si128(vNH, 2);
        vNH = _mm_insert_epi16(vNH, H_pr[-1], 7);
        vWH = _mm_srli_si128(vWH, 2);
        vWH = _mm_insert_epi16(vWH, -open - i*gap, 7);
        H_pr[-1] = -open - (i+N)*gap;
        /* iterate over database sequence */
        for (j=0; j<s2Len+PAD; ++j) {
            __m128i vMat;
            __m128i vNWH = vNH;
            vNH = _mm_srli_si128(vWH, 2);
            vNH = _mm_insert_epi16(vNH, H_pr[j], 7);
            vF = _mm_srli_si128(vF, 2);
            vF = _mm_insert_epi16(vF, F_pr[j], 7);
            vF = _mm_max_epi16(
                    _mm_subs_epi16(vNH, vOpen),
                    _mm_subs_epi16(vF, vGap));
            vE = _mm_max_epi16(
                    _mm_subs_epi16(vWH, vOpen),
                    _mm_subs_epi16(vE, vGap));
            vMat = _mm_set_epi16(
                    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 = _mm_adds_epi16(vNWH, vMat);
            vWH = _mm_max_epi16(vNWH, vE);
            vWH = _mm_max_epi16(vWH, vF);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m128i cond = _mm_cmpeq_epi16(vJ,vNegOne);
                vWH = _mm_blendv_epi8_rpl(vWH, vIBoundary, cond);
                vF = _mm_blendv_epi8_rpl(vF, vNegInf, cond);
                vE = _mm_blendv_epi8_rpl(vE, vNegInf, cond);
            }
            /* cannot start checking sat until after J clears boundary */
            if (j > PAD) {
                vSaturationCheckMin = _mm_min_epi16(vSaturationCheckMin, vWH);
                vSaturationCheckMax = _mm_max_epi16(vSaturationCheckMax, vWH);
            }
#ifdef PARASAIL_TABLE
            arr_store_si128(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] = (int16_t)_mm_extract_epi16(vWH,0);
            F_pr[j-7] = (int16_t)_mm_extract_epi16(vF,0);
            /* as minor diagonal vector passes across table, extract
               last table value at the i,j bound */
            {
                __m128i cond_valid_I = _mm_cmpeq_epi16(vI, vILimit1);
                __m128i cond_valid_J = _mm_cmpeq_epi16(vJ, vJLimit1);
                __m128i cond_all = _mm_and_si128(cond_valid_I, cond_valid_J);
                vMax = _mm_blendv_epi8_rpl(vMax, vWH, cond_all);
            }
            vJ = _mm_adds_epi16(vJ, vOne);
        }
        vI = _mm_adds_epi16(vI, vN);
        vIBoundary = _mm_subs_epi16(vIBoundary, vGapN);
    }

    /* max in vMax */
    for (i=0; i<N; ++i) {
        int16_t value;
        value = (int16_t) _mm_extract_epi16(vMax, 7);
        if (value > score) {
            score = value;
        }
        vMax = _mm_slli_si128(vMax, 2);
    }

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi16(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi16(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 $0x1e8, %rsp            # imm = 0x1E8
movq %r9, 0x28(%rsp)
testq %rdx, %rdx
je 0x2fadc4
movl %ecx, %r15d
testl %ecx, %ecx
jle 0x2fade8
movl %r8d, %r14d
testl %r8d, %r8d
js 0x2fae0c
cmpl $0x0, 0x28(%rsp)
js 0x2fb904
movq 0x220(%rsp), %rcx
testq %rcx, %rcx
je 0x2fb925
cmpl $0x0, 0x30(%rcx)
je 0x2fac82
movl 0x34(%rcx), %r12d
jmp 0x2fac96
testq %rdi, %rdi
je 0x2fb946
movl %esi, %r12d
testl %esi, %esi
jle 0x2fb967
movq %rdi, 0x70(%rsp)
movq %rdx, 0x20(%rsp)
movl %r14d, %esi
negl %esi
movl 0x20(%rcx), %eax
movl %eax, %edx
negl %edx
movl %esi, 0x14(%rsp)
cmpl %esi, %eax
cmovgl %r14d, %edx
movl %edx, 0x10(%rsp)
movw $0x7ffe, %bx            # imm = 0x7FFE
subw 0x1c(%rcx), %bx
movl %r12d, %edi
movl %r15d, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x2fad34
movq %r12, 0x8(%rsp)
movq %rax, 0x98(%rsp)
orl $0x8241001, 0xc(%rax)   # imm = 0x8241001
movq %r15, 0x60(%rsp)
leal 0xe(%r15), %r13d
pushq $0x10
popq %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1ab77b
movq %rax, %r15
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1ab77b
movq %rax, %r12
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1ab77b
movq %rax, %r13
testq %r15, %r15
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
testq %r13, %r13
sete %al
orb %cl, %al
je 0x2fad3b
xorl %ebx, %ebx
jmp 0x2fb98f
movl %r14d, 0x18(%rsp)
movq 0x220(%rsp), %rax
cmpl $0x0, 0x30(%rax)
movq 0x8(%rsp), %r14
movslq %r14d, %rbp
je 0x2fad69
movq $0x0, 0x50(%rsp)
movl 0x18(%rsp), %r11d
jmp 0x2fae4f
leal 0x7(%r14), %eax
movslq %eax, %rsi
pushq $0x10
popq %rdi
movq %rsi, 0x80(%rsp)
callq 0x1ab77b
xorl %edi, %edi
testq %rax, %rax
je 0x2fad34
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
movl 0x18(%rsp), %r11d
movq 0x70(%rsp), %r8
cmpq %rdi, %rcx
je 0x2fae30
movq 0x220(%rsp), %rdx
movq 0x10(%rdx), %rdx
movzbl (%r8,%rdi), %esi
movzwl (%rdx,%rsi,4), %edx
movw %dx, (%rax,%rdi,2)
incq %rdi
jmp 0x2fad9d
movq 0x44020d(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc216(%rip), %rsi    # 0x5c6feb
leaq 0x28b2e5(%rip), %rdx    # 0x5860c1
leaq 0x2cc91a(%rip), %rcx    # 0x5c76fd
jmp 0x2fb986
movq 0x4401e9(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc908(%rip), %rsi    # 0x5c7701
leaq 0x28b2c1(%rip), %rdx    # 0x5860c1
leaq 0x2cc90e(%rip), %rcx    # 0x5c7715
jmp 0x2fb986
movq 0x4401c5(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc8fe(%rip), %rsi    # 0x5c771b
leaq 0x28b29d(%rip), %rdx    # 0x5860c1
leaq 0x2cc905(%rip), %rcx    # 0x5c7730
jmp 0x2fb986
movq %rbp, %rcx
movq 0x80(%rsp), %rdx
cmpq %rdx, %rcx
jge 0x2fae4a
andw $0x0, (%rax,%rcx,2)
incq %rcx
jmp 0x2fae3b
movq %rax, 0x50(%rsp)
movd %ebx, %xmm0
movd %r11d, %xmm1
movq 0x28(%rsp), %r9
movl 0x14(%rsp), %r10d
movl %r10d, %ecx
subl %r9d, %ecx
subl %r9d, %ecx
imull $0xfffd, %r9d, %eax     # imm = 0xFFFD
subl %r11d, %eax
leal (,%r9,4), %edx
movl %r10d, %esi
subl %edx, %esi
imull $0xfffb, %r9d, %edx     # imm = 0xFFFB
subl %r11d, %edx
imull $0xfffa, %r9d, %edi     # imm = 0xFFFA
subl %r11d, %edi
imull $0xfff9, %r9d, %r8d     # imm = 0xFFF9
subl %r11d, %r8d
movd %esi, %xmm8
movd %edx, %xmm2
movd %edi, %xmm7
movq 0x60(%rsp), %rsi
leal 0x7(%rsi), %r11d
movq 0x8(%rsp), %rdx
movd %edx, %xmm9
decl %edx
movl %edx, 0x4(%rsp)
movd %r8d, %xmm4
leal -0x1(%rsi), %edi
movl 0x10(%rsp), %r14d
addl $0xffff8001, %r14d      # imm = 0xFFFF8001
movd %r14d, %xmm3
pshuflw $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
movdqa %xmm3, 0xb0(%rsp)
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x150(%rsp)
pshuflw $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x1c0(%rsp)
movd %r9d, %xmm0
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
pshuflw $0x0, %xmm9, %xmm0      # xmm0 = xmm9[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm1      # xmm1 = xmm0[0,0,0,0]
pcmpeqd %xmm0, %xmm0
paddsw %xmm0, %xmm1
movdqa %xmm1, 0x180(%rsp)
movd %esi, %xmm1
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
paddsw %xmm0, %xmm1
movdqa %xmm1, 0x1a0(%rsp)
movdqa %xmm3, 0x1b0(%rsp)
psllw $0x3, %xmm3
movdqa %xmm3, 0x170(%rsp)
punpcklwd %xmm8, %xmm2    # xmm2 = xmm2[0],xmm8[0],xmm2[1],xmm8[1],xmm2[2],xmm8[2],xmm2[3],xmm8[3]
movd %ecx, %xmm0
movl %r10d, %ecx
subl %r9d, %ecx
punpcklwd %xmm7, %xmm4    # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1],xmm4[2],xmm7[2],xmm4[3],xmm7[3]
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movd %eax, %xmm1
punpcklwd %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
movd %ecx, %xmm0
movd %r10d, %xmm2
punpcklwd %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
punpcklqdq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0]
movdqa %xmm4, 0x80(%rsp)
movl %esi, %esi
movq 0x220(%rsp), %r9
movq 0x10(%r9), %rax
xorl %ecx, %ecx
movq 0x20(%rsp), %r8
cmpq %rcx, %rsi
je 0x2fafe0
movzbl (%r8,%rcx), %edx
movzwl (%rax,%rdx,4), %edx
movw %dx, 0xe(%r15,%rcx,2)
incq %rcx
jmp 0x2fafc7
xorl %eax, %eax
cmpq $0x7, %rax
je 0x2faff3
andw $0x0, (%r15,%rax,2)
incq %rax
jmp 0x2fafe2
movq %rsi, %rax
cmpl %eax, %r11d
jle 0x2fb007
andw $0x0, 0xe(%r15,%rax,2)
incq %rax
jmp 0x2faff6
xorl %eax, %eax
movl 0x14(%rsp), %ecx
cmpq %rax, %rsi
je 0x2fb027
movw %cx, 0xe(%r12,%rax,2)
subl 0x28(%rsp), %ecx
movw %r14w, 0xe(%r13,%rax,2)
incq %rax
jmp 0x2fb00d
xorl %eax, %eax
cmpq $0x7, %rax
je 0x2fb03f
movw %r14w, (%r12,%rax,2)
movw %r14w, (%r13,%rax,2)
incq %rax
jmp 0x2fb029
movq %rsi, %rax
cmpl %eax, %r11d
jle 0x2fb058
movw %r14w, 0xe(%r12,%rax,2)
movw %r14w, 0xe(%r13,%rax,2)
incq %rax
jmp 0x2fb042
movl %r14d, 0x10(%rsp)
andw $0x0, 0xc(%r12)
movdqa 0xb0(%rsp), %xmm11
movdqa %xmm11, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movdqa %xmm0, 0x160(%rsp)
xorl %ebx, %ebx
testl %r11d, %r11d
cmovlel %ebx, %r11d
movq %r11, 0x148(%rsp)
movl %edi, 0x5c(%rsp)
movl %edi, %eax
movq %rax, 0x120(%rsp)
movl 0x4(%rsp), %r8d
leaq 0x6(%rsi), %rax
movq %rax, 0x118(%rsp)
leaq 0x5(%rsi), %rax
movq %rax, 0x110(%rsp)
leaq 0x4(%rsi), %rax
movq %rax, 0x108(%rsp)
leaq 0x3(%rsi), %rax
movq %rax, 0x100(%rsp)
leaq 0x2(%rsi), %rax
movq %rax, 0xf8(%rsp)
leaq 0x1(%rsi), %rax
movq %rax, 0xf0(%rsp)
movdqa 0x2cc94b(%rip), %xmm3   # 0x5c7a40
movdqa %xmm11, 0xd0(%rsp)
movdqa 0x150(%rsp), %xmm0
movdqa %xmm0, 0xc0(%rsp)
movdqa %xmm11, %xmm1
movq %r12, 0xa8(%rsp)
movq %r13, 0xa0(%rsp)
movdqa 0x1c0(%rsp), %xmm11
movdqa 0x1b0(%rsp), %xmm13
cmpq %rbp, %rbx
jge 0x2fb850
cmpl $0x0, 0x30(%r9)
movq %rbx, 0x18(%rsp)
je 0x2fb1ea
movq %rbx, %rax
orq $0x1, %rax
cmpq %rbp, %rax
movl 0x4(%rsp), %edx
movl %edx, %edi
movq %rax, 0x20(%rsp)
cmovll %eax, %edi
movl %edi, 0x70(%rsp)
movq %rbx, %rax
orq $0x2, %rax
cmpq %rbp, %rax
movq %rax, 0x8(%rsp)
cmovgel %edx, %eax
movl %eax, 0x60(%rsp)
movq %rbx, %rdi
orq $0x3, %rdi
cmpq %rbp, %rdi
movl %edi, %eax
cmovgel %edx, %eax
movl %eax, 0x48(%rsp)
movq %rbx, %r10
orq $0x4, %r10
cmpq %rbp, %r10
movl %r10d, %eax
cmovgel %edx, %eax
movl %eax, 0x38(%rsp)
movq %rbx, %r11
orq $0x5, %r11
cmpq %rbp, %r11
movl %r11d, %r12d
cmovgel %edx, %r12d
movq %rbx, %rax
orq $0x6, %rax
cmpq %rbp, %rax
movl %eax, %ecx
cmovgel %edx, %ecx
movl %ecx, 0x30(%rsp)
movq %rbx, %rcx
orq $0x7, %rcx
cmpq %rbp, %rcx
movl %ecx, %r13d
cmovgel %edx, %r13d
movl %ebx, 0x40(%rsp)
jmp 0x2fb26b
movq 0x50(%rsp), %rdx
movswl (%rdx,%rbx,2), %eax
movl %eax, 0x40(%rsp)
movq %rbx, %rax
orq $0x1, %rax
movq %rax, 0x20(%rsp)
movswl 0x2(%rdx,%rbx,2), %eax
movl %eax, 0x70(%rsp)
movq %rbx, %rax
orq $0x2, %rax
movq %rax, 0x8(%rsp)
movswl 0x4(%rdx,%rbx,2), %eax
movl %eax, 0x60(%rsp)
movq %rbx, %rdi
orq $0x3, %rdi
movswl 0x6(%rdx,%rbx,2), %eax
movl %eax, 0x48(%rsp)
movq %rbx, %r10
orq $0x4, %r10
movswl 0x8(%rdx,%rbx,2), %eax
movl %eax, 0x38(%rsp)
movq %rbx, %r11
orq $0x5, %r11
movswl 0xa(%rdx,%rbx,2), %r12d
movq %rbx, %rax
orq $0x6, %rax
movswl 0xc(%rdx,%rbx,2), %ecx
movl %ecx, 0x30(%rsp)
movq %rbx, %rcx
orq $0x7, %rcx
movswl 0xe(%rdx,%rbx,2), %r13d
movq 0x8(%r9), %r14
movl 0x18(%r9), %ebx
imull %ebx, %r12d
movslq %r12d, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x140(%rsp)
movl 0x48(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x48(%rsp)
movl 0x70(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x138(%rsp)
movl 0x40(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x40(%rsp)
movl 0x60(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x130(%rsp)
movl 0x38(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x38(%rsp)
movl 0x30(%rsp), %edx
imull %ebx, %edx
movslq %edx, %r12
leaq (%r14,%r12,4), %rdx
movq %rdx, 0x30(%rsp)
imull %ebx, %r13d
movslq %r13d, %rbx
movdqa 0x160(%rsp), %xmm2
movdqa %xmm2, %xmm7
movq 0xa8(%rsp), %r12
pinsrw $0x7, 0xc(%r12), %xmm7
leaq (%r14,%rbx,4), %rdx
movq %rdx, 0x128(%rsp)
movq 0x18(%rsp), %r13
movl %r13d, %ebx
movq 0x28(%rsp), %rdx
imull %edx, %ebx
movl 0x14(%rsp), %r9d
movl %r9d, %r14d
subl %ebx, %r14d
pinsrw $0x7, %r14d, %xmm2
leaq 0x8(%r13), %rbx
movq %rbx, 0xe8(%rsp)
imull %edx, %ebx
movl %r9d, %r14d
subl %ebx, %r14d
movw %r14w, 0xc(%r12)
movdqa %xmm3, 0x190(%rsp)
pcmpeqw 0x180(%rsp), %xmm3
movdqa %xmm3, 0x1d0(%rsp)
xorl %ebx, %ebx
movdqa 0xb0(%rsp), %xmm10
movdqa %xmm10, %xmm15
movdqa 0x2cc871(%rip), %xmm12  # 0x5c7c10
movq 0xa0(%rsp), %r13
cmpq %rbx, 0x148(%rsp)
je 0x2fb80f
movdqa %xmm1, 0x70(%rsp)
movdqa %xmm2, %xmm1
psrldq $0x2, %xmm1             # xmm1 = xmm1[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
pinsrw $0x7, 0xe(%r12,%rbx,2), %xmm1
movswq 0xe(%r15,%rbx,2), %r14
movq 0x40(%rsp), %rdx
movd (%rdx,%r14,4), %xmm14
movswq 0xc(%r15,%rbx,2), %r14
movq 0x138(%rsp), %rdx
movd (%rdx,%r14,4), %xmm6
movswq 0xa(%r15,%rbx,2), %r14
movq 0x130(%rsp), %rdx
movd (%rdx,%r14,4), %xmm5
movswq 0x8(%r15,%rbx,2), %r14
movq 0x48(%rsp), %rdx
movd (%rdx,%r14,4), %xmm0
movswq 0x6(%r15,%rbx,2), %r14
movq 0x38(%rsp), %rdx
movd (%rdx,%r14,4), %xmm8
movswq 0x4(%r15,%rbx,2), %r14
movq 0x140(%rsp), %rdx
movd (%rdx,%r14,4), %xmm9
movswq 0x2(%r15,%rbx,2), %r14
movq 0x30(%rsp), %rdx
movd (%rdx,%r14,4), %xmm3
movswq (%r15,%rbx,2), %r14
movq 0x128(%rsp), %rdx
movd (%rdx,%r14,4), %xmm4
psrldq $0x2, %xmm10            # xmm10 = xmm10[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
pinsrw $0x7, 0xe(%r13,%rbx,2), %xmm10
movdqa %xmm1, 0x60(%rsp)
psubsw %xmm11, %xmm1
psubsw %xmm13, %xmm10
pmaxsw %xmm1, %xmm10
psubsw %xmm11, %xmm2
psubsw %xmm13, %xmm15
pmaxsw %xmm2, %xmm15
punpcklwd %xmm14, %xmm6   # xmm6 = xmm6[0],xmm14[0],xmm6[1],xmm14[1],xmm6[2],xmm14[2],xmm6[3],xmm14[3]
punpcklwd %xmm5, %xmm0    # xmm0 = xmm0[0],xmm5[0],xmm0[1],xmm5[1],xmm0[2],xmm5[2],xmm0[3],xmm5[3]
punpckldq %xmm6, %xmm0    # xmm0 = xmm0[0],xmm6[0],xmm0[1],xmm6[1]
punpcklwd %xmm8, %xmm9    # xmm9 = xmm9[0],xmm8[0],xmm9[1],xmm8[1],xmm9[2],xmm8[2],xmm9[3],xmm8[3]
cmpq %r8, 0x18(%rsp)
setne %r14b
punpcklwd %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1],xmm4[2],xmm3[2],xmm4[3],xmm3[3]
punpckldq %xmm9, %xmm4    # xmm4 = xmm4[0],xmm9[0],xmm4[1],xmm9[1]
punpcklqdq %xmm0, %xmm4    # xmm4 = xmm4[0],xmm0[0]
paddsw %xmm4, %xmm7
movdqa %xmm15, %xmm0
pmaxsw %xmm10, %xmm0
pmaxsw %xmm7, %xmm0
movdqa %xmm12, %xmm14
pcmpeqw 0x2cc687(%rip), %xmm14  # 0x5c7b60
movdqa %xmm14, %xmm1
pandn %xmm0, %xmm1
movdqa 0x80(%rsp), %xmm2
pand %xmm14, %xmm2
por %xmm1, %xmm2
cmpq $0x8, %rbx
jb 0x2fb526
movdqa 0xc0(%rsp), %xmm0
pminsw %xmm2, %xmm0
movdqa %xmm0, 0xc0(%rsp)
movdqa 0xd0(%rsp), %xmm0
pmaxsw %xmm2, %xmm0
movdqa %xmm0, 0xd0(%rsp)
movq 0x98(%rsp), %rdx
movq 0x10(%rdx), %r12
movq (%r12), %r13
movq 0x8(%r12), %r12
cmpq %rsi, %rbx
setae %r9b
orb %r9b, %r14b
pextrw $0x7, %xmm2, %r14d
jne 0x2fb556
movswl %r14w, %r9d
movl %r9d, (%r13,%rbx,4)
cmpq %rbx, 0x120(%rsp)
jne 0x2fb56d
movswl %r14w, %r9d
movq 0x18(%rsp), %rdx
movl %r9d, (%r12,%rdx,4)
cmpq %r8, 0x20(%rsp)
setne %r9b
leaq -0x1(%rbx), %r14
cmpq %rsi, %r14
setae %r14b
orb %r9b, %r14b
pextrw $0x6, %xmm2, %r14d
jne 0x2fb595
movswl %r14w, %r9d
movl %r9d, -0x4(%r13,%rbx,4)
cmpq %rbp, 0x20(%rsp)
setge %r9b
cmpq %rbx, %rsi
setne %dl
orb %r9b, %dl
jne 0x2fb5b6
movswl %r14w, %edx
movq 0x20(%rsp), %r9
movl %edx, (%r12,%r9,4)
pextrw $0x5, %xmm2, %r14d
cmpq %r8, 0x8(%rsp)
jne 0x2fb5e6
leaq -0x2(%rbx), %rdx
cmpq $0x2, %rbx
setae %r9b
cmpq %rsi, %rdx
setl %dl
andb %r9b, %dl
cmpb $0x1, %dl
jne 0x2fb5e6
movswl %r14w, %edx
movl %edx, -0x8(%r13,%rbx,4)
cmpq %rbp, 0x8(%rsp)
setge %dl
cmpq %rbx, 0xf0(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb60c
movswl %r14w, %edx
movq 0x8(%rsp), %r9
movl %edx, (%r12,%r9,4)
pextrw $0x4, %xmm2, %r14d
cmpq %r8, %rdi
jne 0x2fb63a
leaq -0x3(%rbx), %rdx
cmpq $0x3, %rbx
setae %r9b
cmpq %rsi, %rdx
setl %dl
andb %r9b, %dl
cmpb $0x1, %dl
jne 0x2fb63a
movswl %r14w, %edx
movl %edx, -0xc(%r13,%rbx,4)
cmpq %rbp, %rdi
setge %dl
cmpq %rbx, 0xf8(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb659
movswl %r14w, %edx
movl %edx, (%r12,%rdi,4)
pextrw $0x3, %xmm2, %r14d
cmpq %r8, %r10
jne 0x2fb687
leaq -0x4(%rbx), %rdx
cmpq $0x4, %rbx
setae %r9b
cmpq %rsi, %rdx
setl %dl
andb %r9b, %dl
cmpb $0x1, %dl
jne 0x2fb687
movswl %r14w, %edx
movl %edx, -0x10(%r13,%rbx,4)
cmpq %rbp, %r10
setge %dl
cmpq %rbx, 0x100(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb6a6
movswl %r14w, %edx
movl %edx, (%r12,%r10,4)
pextrw $0x2, %xmm2, %r14d
cmpq %r8, %r11
jne 0x2fb6d4
leaq -0x5(%rbx), %rdx
cmpq $0x5, %rbx
setae %r9b
cmpq %rsi, %rdx
setl %dl
andb %r9b, %dl
cmpb $0x1, %dl
jne 0x2fb6d4
movswl %r14w, %edx
movl %edx, -0x14(%r13,%rbx,4)
cmpq %rbp, %r11
setge %dl
cmpq %rbx, 0x108(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb6f3
movswl %r14w, %edx
movl %edx, (%r12,%r11,4)
pextrw $0x1, %xmm2, %r14d
cmpq %r8, %rax
jne 0x2fb721
leaq -0x6(%rbx), %rdx
cmpq $0x6, %rbx
setae %r9b
cmpq %rsi, %rdx
setl %dl
andb %r9b, %dl
cmpb $0x1, %dl
jne 0x2fb721
movswl %r14w, %edx
movl %edx, -0x18(%r13,%rbx,4)
cmpq %rbp, %rax
setge %dl
cmpq %rbx, 0x110(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb740
movswl %r14w, %edx
movl %edx, (%r12,%rax,4)
cmpq %r8, %rcx
setne %dl
cmpq $0x7, %rbx
setb %r9b
orb %dl, %r9b
movd %xmm2, %r14d
jne 0x2fb761
movswl %r14w, %edx
movl %edx, -0x1c(%r13,%rbx,4)
cmpq %rbp, %rcx
setge %dl
cmpq %rbx, 0x118(%rsp)
setne %r9b
orb %dl, %r9b
jne 0x2fb780
movswl %r14w, %edx
movl %edx, (%r12,%rcx,4)
movdqa %xmm14, %xmm0
pandn %xmm10, %xmm0
movdqa 0xb0(%rsp), %xmm1
pand %xmm14, %xmm1
por %xmm1, %xmm0
pandn %xmm15, %xmm14
por %xmm1, %xmm14
movq 0xa8(%rsp), %r12
movw %r14w, (%r12,%rbx,2)
movd %xmm0, %edx
movq 0xa0(%rsp), %r13
movw %dx, (%r13,%rbx,2)
movdqa %xmm12, %xmm1
pcmpeqw 0x1a0(%rsp), %xmm1
pand 0x1d0(%rsp), %xmm1
movdqa %xmm2, %xmm3
pand %xmm1, %xmm3
pandn 0x70(%rsp), %xmm1
por %xmm3, %xmm1
paddsw 0x2cc429(%rip), %xmm12  # 0x5c7c20
incq %rbx
movdqa 0x60(%rsp), %xmm7
movdqa %xmm14, %xmm15
movdqa %xmm0, %xmm10
jmp 0x2fb3a7
movdqa 0x190(%rsp), %xmm3
paddsw 0x2cc410(%rip), %xmm3   # 0x5c7c30
movdqa 0x80(%rsp), %xmm0
psubsw 0x170(%rsp), %xmm0
movdqa %xmm0, 0x80(%rsp)
movq 0xe8(%rsp), %rbx
movq 0x220(%rsp), %r9
jmp 0x2fb13a
pushq $0x8
popq %rax
movq 0x98(%rsp), %rbx
movl 0x10(%rsp), %edx
movl 0x5c(%rsp), %esi
subl $0x1, %eax
jb 0x2fb87c
pextrw $0x7, %xmm1, %ecx
cmpw %dx, %cx
cmovlel %edx, %ecx
pslldq $0x2, %xmm1             # xmm1 = zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movl %ecx, %edx
jmp 0x2fb863
movdqa 0xb0(%rsp), %xmm0
pcmpgtw 0xc0(%rsp), %xmm0
movdqa 0xd0(%rsp), %xmm1
pcmpgtw 0x150(%rsp), %xmm1
por %xmm0, %xmm1
pmovmskb %xmm1, %eax
testl %eax, %eax
je 0x2fb8bc
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
xorl %esi, %esi
movl $0x0, 0x4(%rsp)
movswl %dx, %eax
movl %eax, (%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x4(%rbx)
movl %esi, 0x8(%rbx)
movq %r13, %rdi
callq 0x1ab763
movq %r12, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
movq 0x220(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x2fb98f
movq 0x50(%rsp), %rdi
callq 0x1ab763
jmp 0x2fb98f
movq 0x43f6cd(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cbe06(%rip), %rsi    # 0x5c771b
leaq 0x28a7a5(%rip), %rdx    # 0x5860c1
leaq 0x2cbe12(%rip), %rcx    # 0x5c7735
jmp 0x2fb986
movq 0x43f6ac(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cb6b5(%rip), %rsi    # 0x5c6feb
leaq 0x28a784(%rip), %rdx    # 0x5860c1
leaq 0x2cbffe(%rip), %rcx    # 0x5c7942
jmp 0x2fb986
movq 0x43f68b(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cb694(%rip), %rsi    # 0x5c6feb
leaq 0x28a763(%rip), %rdx    # 0x5860c1
leaq 0x2cbdd4(%rip), %rcx    # 0x5c7739
jmp 0x2fb986
movq 0x43f66a(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cbd89(%rip), %rsi    # 0x5c7701
leaq 0x28a742(%rip), %rdx    # 0x5860c1
leaq 0x2cbdb7(%rip), %rcx    # 0x5c773d
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq