// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_diag_sse2_128_64.c
// Function: parasail_nw_rowcol_diag_sse2_128_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;
    __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 = 2; /* 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 = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInf = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vOpen = _mm_set1_epi64x_rpl(open);
    vGap  = _mm_set1_epi64x_rpl(gap);
    vOne = _mm_set1_epi64x_rpl(1);
    vN = _mm_set1_epi64x_rpl(N);
    vGapN = _mm_set1_epi64x_rpl(gap*N);
    vNegOne = _mm_set1_epi64x_rpl(-1);
    vI = _mm_set_epi64x_rpl(0,1);
    vJreset = _mm_set_epi64x_rpl(0,-1);
    vMax = vNegInf;
    vILimit = _mm_set1_epi64x_rpl(s1Len);
    vILimit1 = _mm_sub_epi64(vILimit, vOne);
    vJLimit = _mm_set1_epi64x_rpl(s2Len);
    vJLimit1 = _mm_sub_epi64(vJLimit, vOne);
    vIBoundary = _mm_set_epi64x_rpl(
            -open-0*gap,
            -open-1*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_2;
#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(16, s2Len+PAD2);
    _H_pr = parasail_memalign_int64_t(16, s2Len+PAD2);
    _F_pr = parasail_memalign_int64_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_int64_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))];
        vNH = _mm_srli_si128(vNH, 8);
        vNH = _mm_insert_epi64_rpl(vNH, H_pr[-1], 1);
        vWH = _mm_srli_si128(vWH, 8);
        vWH = _mm_insert_epi64_rpl(vWH, -open - i*gap, 1);
        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, 8);
            vNH = _mm_insert_epi64_rpl(vNH, H_pr[j], 1);
            vF = _mm_srli_si128(vF, 8);
            vF = _mm_insert_epi64_rpl(vF, F_pr[j], 1);
            vF = _mm_max_epi64_rpl(
                    _mm_sub_epi64(vNH, vOpen),
                    _mm_sub_epi64(vF, vGap));
            vE = _mm_max_epi64_rpl(
                    _mm_sub_epi64(vWH, vOpen),
                    _mm_sub_epi64(vE, vGap));
            vMat = _mm_set_epi64x_rpl(
                    matrow0[s2[j-0]],
                    matrow1[s2[j-1]]
                    );
            vNWH = _mm_add_epi64(vNWH, vMat);
            vWH = _mm_max_epi64_rpl(vNWH, vE);
            vWH = _mm_max_epi64_rpl(vWH, vF);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m128i cond = _mm_cmpeq_epi64_rpl(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_epi64_rpl(vSaturationCheckMin, vWH);
                vSaturationCheckMax = _mm_max_epi64_rpl(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-1] = (int64_t)_mm_extract_epi64_rpl(vWH,0);
            F_pr[j-1] = (int64_t)_mm_extract_epi64_rpl(vF,0);
            /* as minor diagonal vector passes across table, extract
               last table value at the i,j bound */
            {
                __m128i cond_valid_I = _mm_cmpeq_epi64_rpl(vI, vILimit1);
                __m128i cond_valid_J = _mm_cmpeq_epi64_rpl(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_add_epi64(vJ, vOne);
        }
        vI = _mm_add_epi64(vI, vN);
        vIBoundary = _mm_sub_epi64(vIBoundary, vGapN);
    }

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

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi64_rpl(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi64_rpl(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 $0xe8, %rsp
testq %rdx, %rdx
je 0x340e0b
movl %ecx, %r12d
testl %ecx, %ecx
jle 0x340e12
testl %r8d, %r8d
js 0x340e19
testl %r9d, %r9d
js 0x340e20
movq 0x120(%rsp), %r15
testq %r15, %r15
je 0x340e27
movq %rdx, %rbp
movl 0x30(%r15), %eax
testl %eax, %eax
jne 0x3405c0
testq %rdi, %rdi
je 0x340e2e
testl %esi, %esi
jle 0x340e35
testl %eax, %eax
je 0x3405c4
movl 0x34(%r15), %esi
movq %rdi, 0x28(%rsp)
movq %r9, 0x10(%rsp)
movslq 0x20(%r15), %rax
movl %r8d, %ebx
negl %r8d
movq %rbx, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
subq %rax, %r13
movl %r8d, %r14d
cmpl %r8d, %eax
cmovgq %rcx, %r13
movslq 0x1c(%r15), %rax
movq %rax, 0x48(%rsp)
movq %rsi, 0x20(%rsp)
movl %esi, %edi
movl %r12d, %esi
callq 0x209630
testq %rax, %rax
je 0x340e3a
movq %r13, 0x60(%rsp)
movq %rax, 0x38(%rsp)
orl $0x2841001, 0xc(%rax)   # imm = 0x2841001
movq %r12, 0x40(%rsp)
addl $0x2, %r12d
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movq %rax, %r13
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movl $0x10, %edi
movq %r12, %rsi
movq %r13, %r12
movq %rax, %r13
callq 0x2094de
movq %rax, %r10
testq %r12, %r12
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
testq %r10, %r10
sete %al
orb %cl, %al
jne 0x340e3a
movq 0x20(%rsp), %r8
movslq %r8d, %rax
movq %rax, 0x50(%rsp)
cmpl $0x0, 0x30(%r15)
je 0x3406a3
movq $0x0, 0x30(%rsp)
movl %r14d, %r11d
jmp 0x340709
movq %r10, 0x58(%rsp)
leal 0x1(%r8), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x2094de
testq %rax, %rax
je 0x340e3a
movq 0x20(%rsp), %r8
testl %r8d, %r8d
movl %r14d, %r11d
movq 0x28(%rsp), %r9
jle 0x3406f2
movq 0x10(%r15), %rdi
movl %r8d, %ecx
xorl %edx, %edx
movzbl (%r9,%rdx), %esi
movslq (%rdi,%rsi,4), %rsi
movq %rsi, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x3406dd
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0x58(%rsp), %r10
movq 0x10(%rsp), %r14
leal -0x1(%r8), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rsi
leal -0x1(%rsi), %eax
movl %eax, 0x1c(%rsp)
movq 0x60(%rsp), %rax
leaq 0x1(%rax), %rdi
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x48(%rsp), %rax
addq $-0x2, %rax
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
movq %rax, 0x68(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movq %rbx, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movd %r14d, %xmm3
pshufd $0x44, %xmm3, %xmm3     # xmm3 = xmm3[0,1,0,1]
leal (%r14,%r14), %eax
movd %eax, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
movdqa %xmm4, 0xc0(%rsp)
decq 0x50(%rsp)
movl %esi, %ecx
movq %rcx, 0x10(%rsp)
leaq -0x1(%rcx), %rax
movq %rax, 0xa0(%rsp)
movslq %r11d, %rax
movl %r11d, %ecx
subl %r14d, %ecx
movslq %ecx, %rcx
movq %rcx, %xmm5
movq %rax, %xmm4
punpcklqdq %xmm4, %xmm5    # xmm5 = xmm5[0],xmm4[0]
movq 0x10(%r15), %rdx
cmpl $0x2, %esi
movl $0x1, %ecx
cmovgel %esi, %ecx
xorl %r8d, %r8d
movzbl (%rbp,%r8), %r9d
movslq (%rdx,%r9,4), %r9
movq %r9, 0x8(%r12,%r8,8)
incq %r8
cmpq %r8, %rcx
jne 0x3407c5
xorl %edx, %edx
movq %rdx, (%r12)
movq 0x10(%rsp), %rsi
movq %rdx, 0x8(%r12,%rsi,8)
movl %r14d, %esi
movq %rax, 0x8(%r13,%rdx,8)
movq %rdi, 0x8(%r10,%rdx,8)
incq %rdx
subq %rsi, %rax
cmpq %rdx, %rcx
jne 0x3407ef
movq %rdi, (%r13)
movq %rdi, (%r10)
movq 0x10(%rsp), %rax
movq %rdi, 0x8(%r13,%rax,8)
movq %rdi, 0x8(%r10,%rax,8)
movq $0x0, (%r13)
movq 0x20(%rsp), %rcx
testl %ecx, %ecx
jle 0x340d0d
movq 0x8(%r15), %rax
movq %rax, 0x78(%rsp)
movdqa %xmm1, %xmm4
psrldq $0x8, %xmm4             # xmm4 = xmm4[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm4, 0xb0(%rsp)
movl 0x1c(%rsp), %eax
movq %rax, 0x98(%rsp)
movq 0x40(%rsp), %rax
incl %eax
movq %rax, 0x40(%rsp)
movl %ecx, %eax
movq %rax, 0x28(%rsp)
movl 0xc(%rsp), %eax
movq %rax, 0x20(%rsp)
movslq %r11d, %rax
movq %rax, 0x70(%rsp)
movd 0x2b52bd(%rip), %xmm12  # 0x5f5b40
xorl %r9d, %r9d
pcmpeqd %xmm11, %xmm11
movdqa %xmm1, %xmm7
movdqa %xmm1, %xmm6
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movl 0x30(%r15), %ecx
movq %r9, %rax
testl %ecx, %ecx
jne 0x3408b7
movq 0x30(%rsp), %rax
movq (%rax,%r9,8), %rax
movq %r9, %rdx
orq $0x1, %rdx
testl %ecx, %ecx
je 0x3408d3
cmpq 0x28(%rsp), %rdx
movl 0xc(%rsp), %ecx
cmovbl %edx, %ecx
movslq %ecx, %rcx
jmp 0x3408dc
movq 0x30(%rsp), %rcx
movq (%rcx,%rdx,8), %rcx
movslq 0x18(%r15), %r8
imulq %r8, %rax
movq 0x78(%rsp), %rdi
leaq (%rdi,%rax,4), %rax
movq %rax, 0x58(%rsp)
imulq %r8, %rcx
leaq (%rdi,%rcx,4), %rax
movq %rax, 0xa8(%rsp)
leaq 0x2(%r9), %rax
movq %rax, 0x90(%rsp)
imulq %rsi, %rax
movq 0x70(%rsp), %rdi
movq %rdi, %rcx
subq %rax, %rcx
movq (%r13), %xmm8
movq %rcx, (%r13)
movq %r9, 0x48(%rsp)
movq %r9, %rax
imulq %rsi, %rax
movq %rdi, %rcx
subq %rax, %rcx
movq %rcx, %xmm4
movdqa 0xb0(%rsp), %xmm9
movdqa %xmm9, %xmm10
punpcklqdq %xmm4, %xmm10   # xmm10 = xmm10[0],xmm4[0]
movdqa %xmm9, %xmm4
punpcklqdq %xmm8, %xmm4    # xmm4 = xmm4[0],xmm8[0]
movq %xmm12, %rax
xorl %ecx, %ecx
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
sete %cl
negq %rcx
movdqa %xmm12, 0xd0(%rsp)
pshufd $0xee, %xmm12, %xmm8    # xmm8 = xmm12[2,3,2,3]
movq %xmm8, %rax
xorl %r8d, %r8d
cmpq %rsi, %rax
sete %r8b
negq %r8
movq %rcx, %xmm14
movq %r8, %xmm8
punpcklqdq %xmm8, %xmm14   # xmm14 = xmm14[0],xmm8[0]
xorl %eax, %eax
movq 0x2b519b(%rip), %xmm15  # 0x5f5b48
movdqa %xmm1, %xmm8
movdqa %xmm1, %xmm12
movdqa %xmm4, %xmm13
pshufd $0xee, %xmm10, %xmm4    # xmm4 = xmm10[2,3,2,3]
movq %r13, %r9
movq 0x8(%r13,%rax,8), %xmm9
punpcklqdq %xmm9, %xmm4    # xmm4 = xmm4[0],xmm9[0]
pshufd $0xee, %xmm8, %xmm8     # xmm8 = xmm8[2,3,2,3]
movq %r10, %rbp
movq 0x8(%r10,%rax,8), %xmm9
punpcklqdq %xmm9, %xmm8    # xmm8 = xmm8[0],xmm9[0]
movdqa %xmm4, %xmm9
psubq %xmm2, %xmm9
psubq %xmm3, %xmm8
movq %xmm9, %rcx
movq %xmm8, %rbx
cmpq %rbx, %rcx
cmovgq %rcx, %rbx
pshufd $0xee, %xmm9, %xmm9     # xmm9 = xmm9[2,3,2,3]
movq %xmm9, %rcx
pshufd $0xee, %xmm8, %xmm8     # xmm8 = xmm8[2,3,2,3]
movq %xmm8, %r13
cmpq %r13, %rcx
cmovgq %rcx, %r13
movq (%r12,%rax,8), %rcx
movq %r12, %rdi
movq 0x8(%r12,%rax,8), %r8
movq 0x58(%rsp), %rsi
movslq (%rsi,%r8,4), %r8
movq 0xa8(%rsp), %rsi
movslq (%rsi,%rcx,4), %rcx
movq %r8, %xmm8
movq %rcx, %xmm9
punpcklqdq %xmm8, %xmm9    # xmm9 = xmm9[0],xmm8[0]
paddq %xmm13, %xmm9
psubq %xmm2, %xmm10
psubq %xmm3, %xmm12
movq %xmm10, %rcx
movq %xmm12, %r10
cmpq %r10, %rcx
cmovgq %rcx, %r10
pshufd $0xee, %xmm10, %xmm8    # xmm8 = xmm10[2,3,2,3]
movq %xmm8, %rcx
pshufd $0xee, %xmm12, %xmm8    # xmm8 = xmm12[2,3,2,3]
movq %xmm8, %r11
cmpq %r11, %rcx
cmovgq %rcx, %r11
movq %xmm9, %rcx
cmpq %r10, %rcx
cmovleq %r10, %rcx
pshufd $0xee, %xmm9, %xmm8     # xmm8 = xmm9[2,3,2,3]
movq %xmm8, %r8
cmpq %r11, %r8
cmovleq %r11, %r8
cmpq %rbx, %rcx
cmovleq %rbx, %rcx
cmpq %r13, %r8
cmovleq %r13, %r8
movq %rcx, %xmm8
movq %r8, %xmm9
punpcklqdq %xmm9, %xmm8    # xmm8 = xmm8[0],xmm9[0]
movq %xmm15, %r14
xorl %ecx, %ecx
cmpq $-0x1, %r14
sete %cl
negq %rcx
pshufd $0xee, %xmm15, %xmm9    # xmm9 = xmm15[2,3,2,3]
movq %xmm9, %r8
xorl %r12d, %r12d
cmpq $-0x1, %r8
sete %r12b
negq %r12
movq %rcx, %xmm12
movq %r12, %xmm9
punpcklqdq %xmm9, %xmm12   # xmm12 = xmm12[0],xmm9[0]
movdqa %xmm12, %xmm9
pandn %xmm8, %xmm9
movdqa %xmm12, %xmm10
pand %xmm5, %xmm10
por %xmm9, %xmm10
pshufd $0xee, %xmm10, %xmm8    # xmm8 = xmm10[2,3,2,3]
cmpq $0x2, %rax
jb 0x340b8b
movq %xmm0, %rcx
movq %xmm10, %r12
cmpq %r12, %rcx
cmovgeq %r12, %rcx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %r15
movq %xmm8, %rsi
cmpq %rsi, %r15
cmovgeq %rsi, %r15
movq %rcx, %xmm0
movq %r15, %xmm9
movq %xmm6, %rcx
cmpq %r12, %rcx
cmovgq %rcx, %r12
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
movq %xmm6, %rcx
cmpq %rsi, %rcx
cmovgq %rcx, %rsi
punpcklqdq %xmm9, %xmm0    # xmm0 = xmm0[0],xmm9[0]
movq %r12, %xmm6
movq %rsi, %xmm9
punpcklqdq %xmm9, %xmm6    # xmm6 = xmm6[0],xmm9[0]
movq 0x48(%rsp), %rcx
cmpq 0x20(%rsp), %rcx
setne %sil
movq 0x38(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
cmpq 0x10(%rsp), %rax
setae %r15b
orb %sil, %r15b
jne 0x340bbd
movd %xmm8, (%r12,%rax,4)
cmpq %rax, 0x98(%rsp)
jne 0x340bd2
movq 0x48(%rsp), %rsi
movd %xmm8, (%rcx,%rsi,4)
cmpq 0x20(%rsp), %rdx
setne %sil
testq %rax, %rax
sete %r15b
orb %sil, %r15b
jne 0x340bee
movd %xmm10, -0x4(%r12,%rax,4)
cmpq 0x28(%rsp), %rdx
setae %sil
cmpq %rax, 0x10(%rsp)
setne %r15b
orb %sil, %r15b
jne 0x340c0b
movd %xmm10, (%rcx,%rdx,4)
movq %rbx, %xmm9
movq %r13, %xmm8
punpcklqdq %xmm8, %xmm9    # xmm9 = xmm9[0],xmm8[0]
movq %r10, %xmm13
movq %r11, %xmm8
punpcklqdq %xmm8, %xmm13   # xmm13 = xmm13[0],xmm8[0]
movdqa %xmm12, %xmm8
pandn %xmm9, %xmm8
movdqa %xmm12, %xmm9
pand %xmm1, %xmm9
por %xmm9, %xmm8
pandn %xmm13, %xmm12
por %xmm9, %xmm12
movq %r9, %r13
movq %xmm10, (%r9,%rax,8)
movq %rbp, %r10
movq %xmm8, (%rbp,%rax,8)
xorl %ecx, %ecx
movq 0xa0(%rsp), %r9
cmpq %r9, %r14
sete %cl
negq %rcx
xorl %esi, %esi
cmpq %r9, %r8
sete %sil
negq %rsi
movq %rsi, %xmm9
movq %rcx, %xmm13
punpcklqdq %xmm9, %xmm13   # xmm13 = xmm13[0],xmm9[0]
pand %xmm14, %xmm13
movdqa %xmm10, %xmm9
pand %xmm13, %xmm9
pandn %xmm7, %xmm13
movdqa %xmm13, %xmm7
por %xmm9, %xmm7
psubq %xmm11, %xmm15
incq %rax
cmpq %rax, 0x40(%rsp)
movq %rdi, %r12
jne 0x3409b7
movdqa 0xd0(%rsp), %xmm12
paddq 0x2b4e5c(%rip), %xmm12  # 0x5f5b30
psubq 0xc0(%rsp), %xmm5
movq 0x90(%rsp), %rax
movq %rax, %r9
cmpq 0x28(%rsp), %rax
movq 0x120(%rsp), %r15
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
jb 0x3408a3
jmp 0x340d15
movdqa %xmm1, %xmm6
movdqa %xmm1, %xmm7
movl $0x1, %eax
pshufd $0xee, %xmm7, %xmm1     # xmm1 = xmm7[2,3,2,3]
movq %xmm1, %rcx
cmpq %rdi, %rcx
cmovgq %rcx, %rdi
pslldq $0x8, %xmm7             # xmm7 = zero,zero,zero,zero,zero,zero,zero,zero,xmm7[0,1,2,3,4,5,6,7]
decl %eax
je 0x340d1a
movq %xmm0, %rax
xorl %ecx, %ecx
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
setle %cl
negq %rcx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rax
xorl %edx, %edx
cmpq %rsi, %rax
setle %dl
negq %rdx
movq %rcx, %xmm0
movq %rdx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %xmm6, %rax
xorl %ecx, %ecx
movq 0x68(%rsp), %rsi
cmpq %rsi, %rax
setg %cl
negq %rcx
pshufd $0xee, %xmm6, %xmm1     # xmm1 = xmm6[2,3,2,3]
movq %xmm1, %rax
xorl %edx, %edx
cmpq %rsi, %rax
setg %dl
negq %rdx
movq %rcx, %xmm1
movq %rdx, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
por %xmm0, %xmm1
pmovmskb %xmm1, %eax
testl %eax, %eax
movq 0x38(%rsp), %rax
je 0x340dcb
orb $0x40, 0xc(%rax)
xorl %edi, %edi
movl $0x0, 0x1c(%rsp)
movl $0x0, 0xc(%rsp)
movl %edi, (%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x4(%rax)
movl 0x1c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movq %r10, %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%r15)
jne 0x340e04
movq 0x30(%rsp), %rdi
callq 0x2094b5
movq 0x38(%rsp), %rax
jmp 0x340e3c
callq 0x1b52c9
jmp 0x340e3a
callq 0x1b52a3
jmp 0x340e3a
callq 0x1b527d
jmp 0x340e3a
callq 0x1b5257
jmp 0x340e3a
callq 0x1b5231
jmp 0x340e3a
callq 0x1b520b
jmp 0x340e3a
callq 0x1b51e5
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop