// File: /workspace/github_c_makefile_star2_O1/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 $0x1a8, %rsp            # imm = 0x1A8
movq %r9, 0x58(%rsp)
testq %rdx, %rdx
je 0x345411
movl %ecx, %ebp
testl %ecx, %ecx
jle 0x345418
movl %r8d, %r12d
testl %r8d, %r8d
js 0x34541f
cmpl $0x0, 0x58(%rsp)
js 0x345426
movq 0x1e0(%rsp), %rcx
testq %rcx, %rcx
je 0x34542d
movq %rdx, %r15
movq %rdi, %r13
movl 0x30(%rcx), %eax
testl %eax, %eax
jne 0x3447fb
testq %r13, %r13
je 0x345434
testl %esi, %esi
jle 0x34543b
testl %eax, %eax
je 0x3447fe
movl 0x34(%rcx), %esi
movl %r12d, %edi
negl %edi
movl 0x20(%rcx), %eax
movl %eax, %edx
negl %edx
movl %edi, 0x14(%rsp)
cmpl %edi, %eax
cmovgl %r12d, %edx
movl %edx, (%rsp)
movw $0x7ffe, %bx            # imm = 0x7FFE
subw 0x1c(%rcx), %bx
movq %rsi, 0x8(%rsp)
movl %esi, %edi
movl %ebp, %esi
callq 0x209630
testq %rax, %rax
je 0x345440
movq %rax, %r14
movq %r13, 0x90(%rsp)
movl %r12d, 0x48(%rsp)
movq %r15, %r12
orl $0x8241001, 0xc(%rax)   # imm = 0x8241001
leal 0xe(%rbp), %r13d
movl $0x10, %edi
movq %r13, %rsi
callq 0x2094cd
movq %rax, %r15
movl $0x10, %edi
movq %r13, %rsi
callq 0x2094cd
movl $0x10, %edi
movq %r13, %rsi
movq %rax, %r13
callq 0x2094cd
testq %r15, %r15
sete %dl
testq %r13, %r13
sete %cl
orb %dl, %cl
movq %rax, 0x60(%rsp)
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x345440
movq 0x1e0(%rsp), %r9
cmpl $0x0, 0x30(%r9)
movq %r13, 0x78(%rsp)
movq %r14, 0xa8(%rsp)
je 0x3448cc
movq $0x0, 0x50(%rsp)
jmp 0x344956
movq 0x8(%rsp), %r13
leal 0x7(%r13), %r14d
movslq %r14d, %rsi
movl $0x10, %edi
callq 0x2094cd
testq %rax, %rax
je 0x345440
testl %r13d, %r13d
movq %rax, %rdi
movq 0x90(%rsp), %r9
jle 0x344921
movq 0x1e0(%rsp), %rax
movq 0x10(%rax), %rax
movl %r13d, %ecx
xorl %edx, %edx
movzbl (%r9,%rdx), %esi
movzwl (%rax,%rsi,4), %esi
movw %si, (%rdi,%rdx,2)
incq %rdx
cmpq %rdx, %rcx
jne 0x34490c
movslq %r13d, %rax
movq %rdi, 0x50(%rsp)
leaq (%rdi,%rax,2), %rdi
leal 0x1(%r13), %eax
cmpl %eax, %r14d
cmovgl %r14d, %eax
movl %r13d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x2(,%rcx,2), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x1e0(%rsp), %r9
movq %r12, %r13
movd %ebx, %xmm0
movl 0x48(%rsp), %ebx
movd %ebx, %xmm1
movq 0x58(%rsp), %r10
movl 0x14(%rsp), %r11d
movl %r11d, %eax
subl %r10d, %eax
subl %r10d, %eax
imull $0xfffd, %r10d, %ecx    # imm = 0xFFFD
subl %ebx, %ecx
leal (,%r10,4), %edx
movl %r11d, %esi
subl %edx, %esi
imull $0xfffb, %r10d, %edi    # imm = 0xFFFB
subl %ebx, %edi
imull $0xfffa, %r10d, %r8d    # imm = 0xFFFA
subl %ebx, %r8d
imull $0xfff9, %r10d, %edx    # imm = 0xFFF9
subl %ebx, %edx
movd %esi, %xmm3
leal 0x7(%rbp), %ebx
movd %edi, %xmm2
movq 0x8(%rsp), %rdi
leal -0x1(%rdi), %esi
movl %esi, 0x4(%rsp)
movd %r8d, %xmm4
leal -0x1(%rbp), %esi
movl %esi, 0x10(%rsp)
movl (%rsp), %r12d
addl $0xffff8001, %r12d      # imm = 0xFFFF8001
movl %r12d, (%rsp)
movd %r12d, %xmm5
pshuflw $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
movdqa %xmm5, 0x80(%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, 0xc0(%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, 0x190(%rsp)
movd %r10d, %xmm0
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, 0x180(%rsp)
psllw $0x3, %xmm0
movdqa %xmm0, 0x150(%rsp)
movd %edi, %xmm0
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[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, 0x140(%rsp)
movd %ebp, %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, 0x170(%rsp)
movd %edx, %xmm5
movl %r11d, %edx
subl %r10d, %edx
punpcklwd %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3]
punpcklwd %xmm4, %xmm5    # xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1],xmm5[2],xmm4[2],xmm5[3],xmm4[3]
punpckldq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
movd %eax, %xmm0
movd %ecx, %xmm1
punpcklwd %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3]
movd %edx, %xmm0
movd %r11d, %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, %xmm5    # xmm5 = xmm5[0],xmm1[0]
movdqa %xmm5, 0x90(%rsp)
movq 0x10(%r9), %rax
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
xorl %ecx, %ecx
movzbl (%r13,%rcx), %edx
movzwl (%rax,%rdx,4), %edx
movw %dx, 0xe(%r15,%rcx,2)
incq %rcx
cmpq %rcx, %r12
jne 0x344acd
xorl %r13d, %r13d
movq %r13, 0x6(%r15)
movq %r13, (%r15)
movl %ebp, %r14d
leaq (%r15,%r14,2), %rdi
addq $0xe, %rdi
leal 0x1(%rbp), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %ebp, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x2(,%rcx,2), %rdx
xorl %esi, %esi
callq 0x19e090
movl 0x14(%rsp), %eax
movl (%rsp), %edx
movq 0x58(%rsp), %rcx
movq 0x78(%rsp), %rsi
movq 0x60(%rsp), %rdi
movw %ax, 0xe(%rsi,%r13,2)
subl %ecx, %eax
movw %dx, 0xe(%rdi,%r13,2)
incq %r13
cmpq %r13, %r12
jne 0x344b2d
xorl %eax, %eax
movq %rsi, %r13
movq 0x8(%rsp), %r8
movw %dx, (%r13,%rax,2)
movw %dx, (%rdi,%rax,2)
incq %rax
cmpq $0x7, %rax
jne 0x344b4d
leaq 0x7(%r14), %rax
movq %rdi, %rsi
movq 0x1e0(%rsp), %rcx
movw %dx, (%r13,%rax,2)
movw %dx, (%rsi,%rax,2)
incq %rax
incl %ebp
cmpl %ebp, %ebx
jg 0x344b6f
movw $0x0, 0xc(%r13)
testl %r8d, %r8d
jle 0x34534b
movq 0x8(%rcx), %rax
movq %rax, 0xd8(%rsp)
movdqa 0x80(%rsp), %xmm0
movdqa %xmm0, %xmm1
psrldq $0x2, %xmm1             # xmm1 = xmm1[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movdqa %xmm1, 0x130(%rsp)
movl 0x10(%rsp), %eax
movq %rax, 0x120(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0x118(%rsp)
movl %r8d, %esi
movl 0x4(%rsp), %ebx
movl %ebx, %edi
leaq 0x1(%r14), %rax
movq %rax, 0x110(%rsp)
leaq 0x2(%r14), %rax
movq %rax, 0x108(%rsp)
leaq 0x3(%r14), %rax
movq %rax, 0x100(%rsp)
leaq 0x4(%r14), %rax
movq %rax, 0xf8(%rsp)
leaq 0x5(%r14), %rax
movq %rax, 0xf0(%rsp)
leaq 0x6(%r14), %rax
movq %rax, 0xe8(%rsp)
movdqa 0x2b0dee(%rip), %xmm10  # 0x5f5a20
xorl %r11d, %r11d
movdqa %xmm0, %xmm2
movdqa 0xc0(%rsp), %xmm1
movdqa %xmm0, 0xb0(%rsp)
movq 0x50(%rsp), %rax
movl 0x30(%rcx), %r12d
movl %r11d, %edx
testl %r12d, %r12d
jne 0x344c61
movswl (%rax,%r11,2), %edx
movl %edx, 0x40(%rsp)
movq %r11, %rdx
orq $0x1, %rdx
testl %r12d, %r12d
movq %rdx, 0x8(%rsp)
je 0x344c87
cmpq %rsi, %rdx
movl %ebx, %r8d
cmovbl %edx, %r8d
movl %r8d, 0x38(%rsp)
jmp 0x344c8f
movswl (%rax,%rdx,2), %edx
movl %edx, 0x38(%rsp)
movq %r11, %r13
orq $0x2, %r13
testl %r12d, %r12d
je 0x344ca6
cmpq %rsi, %r13
movl %ebx, %edx
cmovbl %r13d, %edx
jmp 0x344cab
movswl (%rax,%r13,2), %edx
movl %edx, 0x30(%rsp)
movq %r11, %rdx
orq $0x3, %rdx
testl %r12d, %r12d
je 0x344cc7
cmpq %rsi, %rdx
movl %ebx, %r8d
cmovbl %edx, %r8d
jmp 0x344ccc
movswl (%rax,%rdx,2), %r8d
movl %r8d, 0x28(%rsp)
movq %r11, %r8
orq $0x4, %r8
testl %r12d, %r12d
je 0x344ce9
cmpq %rsi, %r8
movl %ebx, %r9d
cmovbl %r8d, %r9d
jmp 0x344cee
movswl (%rax,%r8,2), %r9d
movl %r9d, 0x20(%rsp)
movq %r11, %r9
orq $0x5, %r9
testl %r12d, %r12d
je 0x344d0b
cmpq %rsi, %r9
movl %ebx, %r10d
cmovbl %r9d, %r10d
jmp 0x344d10
movswl (%rax,%r9,2), %r10d
movl %r10d, 0x18(%rsp)
movq %r11, %r10
orq $0x6, %r10
testl %r12d, %r12d
movq %r13, 0x128(%rsp)
je 0x344d35
cmpq %rsi, %r10
movl %ebx, %r13d
cmovbl %r10d, %r13d
jmp 0x344d3a
movswl (%rax,%r10,2), %r13d
movl 0x18(%rcx), %ebp
movq %r11, 0x48(%rsp)
orq $0x7, %r11
testl %r12d, %r12d
je 0x344d54
cmpq %rsi, %r11
cmovbl %r11d, %ebx
jmp 0x344d59
movswl (%rax,%r11,2), %ebx
movl 0x40(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x40(%rsp)
movl 0x38(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x38(%rsp)
movl 0x30(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x30(%rsp)
movl 0x28(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x28(%rsp)
movl 0x20(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x20(%rsp)
movl 0x18(%rsp), %eax
imull %ebp, %eax
movl %eax, 0x18(%rsp)
imull %ebp, %r13d
movl %r13d, 0x70(%rsp)
imull %ebp, %ebx
movl %ebx, 0x68(%rsp)
movq 0x48(%rsp), %r12
leaq 0x8(%r12), %rax
movq %rax, 0xe0(%rsp)
movl %eax, %ebp
movq 0x58(%rsp), %rcx
imull %ecx, %ebp
movl 0x14(%rsp), %r13d
movl %r13d, %eax
subl %ebp, %eax
movdqa 0x130(%rsp), %xmm12
movdqa %xmm12, %xmm9
movq 0x78(%rsp), %rbx
pinsrw $0x7, 0xc(%rbx), %xmm9
movw %ax, 0xc(%rbx)
movl %r12d, %eax
imull %ecx, %eax
movl %r13d, %ebp
subl %eax, %ebp
movslq 0x40(%rsp), %rax
movq 0xd8(%rsp), %rcx
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 0x70(%rsp), %rax
movq %rbx, %r13
leaq (%rcx,%rax,4), %rax
movq %rax, 0x70(%rsp)
movslq 0x68(%rsp), %rax
leaq (%rcx,%rax,4), %rax
movq %rax, 0x68(%rsp)
pinsrw $0x7, %ebp, %xmm12
movdqa %xmm10, 0x160(%rsp)
pcmpeqw 0x140(%rsp), %xmm10
xorl %r12d, %r12d
movdqa 0x2b0d34(%rip), %xmm11  # 0x5f5bd0
movdqa 0x80(%rsp), %xmm13
movdqa %xmm13, %xmm14
movq 0x60(%rsp), %rcx
movswq 0xe(%r15,%r12,2), %rax
movq 0x40(%rsp), %rbx
movd (%rbx,%rax,4), %xmm15
movswq 0xc(%r15,%r12,2), %rax
movq 0x38(%rsp), %rbx
movd (%rbx,%rax,4), %xmm8
movswq 0xa(%r15,%r12,2), %rax
movq 0x30(%rsp), %rbx
movd (%rbx,%rax,4), %xmm5
movswq 0x8(%r15,%r12,2), %rax
movq 0x28(%rsp), %rbx
movd (%rbx,%rax,4), %xmm3
movswq 0x6(%r15,%r12,2), %rax
movq 0x20(%rsp), %rbx
movd (%rbx,%rax,4), %xmm4
movswq 0x4(%r15,%r12,2), %rax
movq 0x18(%rsp), %rbx
movd (%rbx,%rax,4), %xmm6
movswq 0x2(%r15,%r12,2), %rax
movq 0x70(%rsp), %rbx
movd (%rbx,%rax,4), %xmm7
movswq (%r15,%r12,2), %rax
movq 0x68(%rsp), %rbx
movd (%rbx,%rax,4), %xmm0
punpcklwd %xmm15, %xmm8   # xmm8 = xmm8[0],xmm15[0],xmm8[1],xmm15[1],xmm8[2],xmm15[2],xmm8[3],xmm15[3]
punpcklwd %xmm5, %xmm3    # xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1],xmm3[2],xmm5[2],xmm3[3],xmm5[3]
punpckldq %xmm8, %xmm3    # xmm3 = xmm3[0],xmm8[0],xmm3[1],xmm8[1]
punpcklwd %xmm4, %xmm6    # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1],xmm6[2],xmm4[2],xmm6[3],xmm4[3]
cmpq %rdi, 0x48(%rsp)
setne %bpl
punpcklwd %xmm7, %xmm0    # xmm0 = xmm0[0],xmm7[0],xmm0[1],xmm7[1],xmm0[2],xmm7[2],xmm0[3],xmm7[3]
punpckldq %xmm6, %xmm0    # xmm0 = xmm0[0],xmm6[0],xmm0[1],xmm6[1]
punpcklqdq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0]
paddsw %xmm9, %xmm0
movdqa %xmm12, %xmm9
psrldq $0x2, %xmm9             # xmm9 = xmm9[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
pinsrw $0x7, 0xe(%r13,%r12,2), %xmm9
psrldq $0x2, %xmm14            # xmm14 = xmm14[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
pinsrw $0x7, 0xe(%rcx,%r12,2), %xmm14
movdqa %xmm9, %xmm3
movdqa 0x190(%rsp), %xmm4
psubsw %xmm4, %xmm3
movdqa 0x180(%rsp), %xmm5
psubsw %xmm5, %xmm14
pmaxsw %xmm3, %xmm14
psubsw %xmm4, %xmm12
psubsw %xmm5, %xmm13
pmaxsw %xmm12, %xmm13
movdqa %xmm13, %xmm3
pmaxsw %xmm14, %xmm3
pmaxsw %xmm0, %xmm3
movdqa %xmm11, %xmm15
pcmpeqw 0x2b0c32(%rip), %xmm15  # 0x5f5c00
movdqa %xmm15, %xmm0
pandn %xmm3, %xmm0
movdqa 0x90(%rsp), %xmm12
pand %xmm15, %xmm12
por %xmm0, %xmm12
cmpq $0x8, %r12
jb 0x34500d
pminsw %xmm12, %xmm1
movdqa 0xb0(%rsp), %xmm0
pmaxsw %xmm12, %xmm0
movdqa %xmm0, 0xb0(%rsp)
movq 0x8(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %r13
movq 0x8(%rax), %rax
cmpq %r14, %r12
setae %bl
orb %bl, %bpl
pextrw $0x7, %xmm12, %ebp
jne 0x34503e
movswl %bp, %ebx
movl %ebx, (%r13,%r12,4)
cmpq %r12, 0x120(%rsp)
jne 0x345058
movswl %bp, %ebx
movq 0x48(%rsp), %rcx
movl %ebx, (%rax,%rcx,4)
movq 0x8(%rsp), %rcx
cmpq %rdi, %rcx
setne %bl
leaq -0x1(%r12), %rbp
cmpq %r14, %rbp
setae %bpl
orb %bl, %bpl
pextrw $0x6, %xmm12, %ebp
jne 0x34507d
movswl %bp, %ebx
movl %ebx, -0x4(%r13,%r12,4)
cmpq %rsi, %rcx
setae %bl
cmpq %r12, %r14
setne %cl
orb %bl, %cl
jne 0x345098
movswl %bp, %ecx
movq 0x8(%rsp), %rbx
movl %ecx, (%rax,%rbx,4)
movq 0x128(%rsp), %rbp
cmpq %rdi, %rbp
jne 0x3450cc
leaq -0x2(%r12), %rcx
cmpq $0x2, %r12
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x3450cc
pextrw $0x5, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, -0x8(%r13,%r12,4)
cmpq %rsi, %rbp
setae %cl
cmpq %r12, 0x110(%rsp)
setne %bl
orb %cl, %bl
jne 0x3450ed
pextrw $0x5, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, (%rax,%rbp,4)
cmpq %rdi, %rdx
jne 0x345119
leaq -0x3(%r12), %rcx
cmpq $0x3, %r12
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x345119
pextrw $0x4, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, -0xc(%r13,%r12,4)
cmpq %rsi, %rdx
setae %cl
cmpq %r12, 0x108(%rsp)
setne %bl
orb %cl, %bl
jne 0x34513a
pextrw $0x4, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, (%rax,%rdx,4)
cmpq %rdi, %r8
jne 0x345166
leaq -0x4(%r12), %rcx
cmpq $0x4, %r12
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x345166
pextrw $0x3, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, -0x10(%r13,%r12,4)
cmpq %rsi, %r8
setae %cl
cmpq %r12, 0x100(%rsp)
setne %bl
orb %cl, %bl
jne 0x345188
pextrw $0x3, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, (%rax,%r8,4)
cmpq %rdi, %r9
jne 0x3451b4
leaq -0x5(%r12), %rcx
cmpq $0x5, %r12
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x3451b4
pextrw $0x2, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, -0x14(%r13,%r12,4)
cmpq %rsi, %r9
setae %cl
cmpq %r12, 0xf8(%rsp)
setne %bl
orb %cl, %bl
jne 0x3451d6
pextrw $0x2, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, (%rax,%r9,4)
cmpq %rdi, %r10
jne 0x345202
leaq -0x6(%r12), %rcx
cmpq $0x6, %r12
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x345202
pextrw $0x1, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, -0x18(%r13,%r12,4)
cmpq %rsi, %r10
setae %cl
cmpq %r12, 0xf0(%rsp)
setne %bl
orb %cl, %bl
jne 0x345224
pextrw $0x1, %xmm12, %ecx
movswl %cx, %ecx
movl %ecx, (%rax,%r10,4)
movd %xmm12, %ebp
cmpq %rdi, %r11
jne 0x34524c
leaq -0x7(%r12), %rcx
cmpq $0x7, %r12
setb %bl
cmpq %r14, %rcx
setge %cl
orb %bl, %cl
jne 0x34524c
movswl %bp, %ecx
movl %ecx, -0x1c(%r13,%r12,4)
cmpq %rsi, %r11
setae %cl
cmpq %r12, 0xe8(%rsp)
setne %bl
orb %cl, %bl
jne 0x345268
movswl %bp, %ecx
movl %ecx, (%rax,%r11,4)
movdqa %xmm15, %xmm0
pandn %xmm14, %xmm0
movdqa 0x80(%rsp), %xmm3
pand %xmm15, %xmm3
por %xmm3, %xmm0
pandn %xmm13, %xmm15
por %xmm3, %xmm15
movq 0x78(%rsp), %r13
movw %bp, (%r13,%r12,2)
movd %xmm0, %eax
movq 0x60(%rsp), %rcx
movw %ax, (%rcx,%r12,2)
movdqa %xmm11, %xmm3
pcmpeqw 0x170(%rsp), %xmm3
pand %xmm10, %xmm3
movdqa %xmm12, %xmm4
pand %xmm3, %xmm4
pandn %xmm2, %xmm3
movdqa %xmm3, %xmm2
por %xmm4, %xmm2
paddsw 0x2b0908(%rip), %xmm11  # 0x5f5be0
incq %r12
movdqa %xmm0, %xmm14
movdqa %xmm15, %xmm13
cmpq %r12, 0x118(%rsp)
jne 0x344eb0
movdqa 0x160(%rsp), %xmm10
paddsw 0x2b08ea(%rip), %xmm10  # 0x5f5bf0
movdqa 0x90(%rsp), %xmm0
psubsw 0x150(%rsp), %xmm0
movdqa %xmm0, 0x90(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, %r11
cmpq %rsi, %rax
movq 0x1e0(%rsp), %rcx
movq 0x50(%rsp), %rax
movl 0x4(%rsp), %ebx
jb 0x344c50
movl (%rsp), %edx
jmp 0x345366
movdqa 0x80(%rsp), %xmm2
movdqa %xmm2, 0xb0(%rsp)
movdqa 0xc0(%rsp), %xmm1
movl $0x8, %eax
movq 0xa8(%rsp), %rbx
pextrw $0x7, %xmm2, %ecx
cmpw %dx, %cx
cmovlel %edx, %ecx
movl %ecx, %edx
pslldq $0x2, %xmm2             # xmm2 = zero,zero,xmm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
decl %eax
jne 0x345373
movdqa 0x80(%rsp), %xmm0
pcmpgtw %xmm1, %xmm0
movdqa 0xb0(%rsp), %xmm1
pcmpgtw 0xc0(%rsp), %xmm1
por %xmm0, %xmm1
pmovmskb %xmm1, %eax
testl %eax, %eax
je 0x3453ca
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
movl $0x0, 0x10(%rsp)
movl $0x0, 0x4(%rsp)
movswl %dx, %eax
movl %eax, (%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rbx)
movq 0x60(%rsp), %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq 0x1e0(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x345442
movq 0x50(%rsp), %rdi
callq 0x2094b5
jmp 0x345442
callq 0x1b5905
jmp 0x345440
callq 0x1b58df
jmp 0x345440
callq 0x1b58b9
jmp 0x345440
callq 0x1b5893
jmp 0x345440
callq 0x1b586d
jmp 0x345440
callq 0x1b5847
jmp 0x345440
callq 0x1b5821
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop