// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_diag_sse2_128_64.c
// Function: parasail_sw_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 vNegInf0;
    __m128i vOpen;
    __m128i vGap;
    __m128i vZero;
    __m128i vOne;
    __m128i vN;
    __m128i vNegOne;
    __m128i vI;
    __m128i vJreset;
    __m128i vMaxH;
    __m128i vEndI;
    __m128i vEndJ;
    __m128i vILimit;
    __m128i vJLimit;

    /* 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 = 0;
    end_ref = 0;
    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);
    vNegInf0 = _mm_srli_si128(vNegInf, 8); /* shift in a 0 */
    vOpen = _mm_set1_epi64x_rpl(open);
    vGap  = _mm_set1_epi64x_rpl(gap);
    vZero = _mm_set1_epi64x_rpl(0);
    vOne = _mm_set1_epi64x_rpl(1);
    vN = _mm_set1_epi64x_rpl(N);
    vNegOne = _mm_set1_epi64x_rpl(-1);
    vI = _mm_set_epi64x_rpl(0,1);
    vJreset = _mm_set_epi64x_rpl(0,-1);
    vMaxH = vNegInf;
    vEndI = vNegInf;
    vEndJ = vNegInf;
    vILimit = _mm_set1_epi64x_rpl(s1Len);
    vJLimit = _mm_set1_epi64x_rpl(s2Len);

    /* 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_SW | 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] = 0;
        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;
    }

    /* iterate over query sequence */
    for (i=0; i<s1Len; i+=N) {
        __m128i vNH = vNegInf0;
        __m128i vWH = vNegInf0;
        __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))];
        __m128i vIltLimit = _mm_cmplt_epi64_rpl(vI, vILimit);
        /* 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);
            vWH = _mm_max_epi64_rpl(vWH, vZero);
            /* 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_andnot_si128(cond, vWH);
                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
             * max values within the i,j bounds */
            {
                __m128i cond_valid_J = _mm_and_si128(
                        _mm_cmpgt_epi64_rpl(vJ, vNegOne),
                        _mm_cmplt_epi64_rpl(vJ, vJLimit));
                __m128i cond_valid_IJ = _mm_and_si128(cond_valid_J, vIltLimit);
                __m128i cond_eq = _mm_cmpeq_epi64_rpl(vWH, vMaxH);
                __m128i cond_max = _mm_cmpgt_epi64_rpl(vWH, vMaxH);
                __m128i cond_all = _mm_and_si128(cond_max, cond_valid_IJ);
                __m128i cond_Jlt = _mm_cmplt_epi64_rpl(vJ, vEndJ);
                vMaxH = _mm_blendv_epi8_rpl(vMaxH, vWH, cond_all);
                vEndI = _mm_blendv_epi8_rpl(vEndI, vI, cond_all);
                vEndJ = _mm_blendv_epi8_rpl(vEndJ, vJ, cond_all);
                cond_all = _mm_and_si128(cond_Jlt, cond_eq);
                cond_all = _mm_and_si128(cond_all, cond_valid_IJ);
                vEndI = _mm_blendv_epi8_rpl(vEndI, vI, cond_all);
                vEndJ = _mm_blendv_epi8_rpl(vEndJ, vJ, cond_all);
            }
            vJ = _mm_add_epi64(vJ, vOne);
        }
        vI = _mm_add_epi64(vI, vN);
    }

    /* alignment ending position */
    {
        int64_t *t = (int64_t*)&vMaxH;
        int64_t *i = (int64_t*)&vEndI;
        int64_t *j = (int64_t*)&vEndJ;
        int32_t k;
        for (k=0; k<N; ++k, ++t, ++i, ++j) {
            if (*t > score) {
                score = *t;
                end_query = *i;
                end_ref = *j;
            }
            else if (*t == score) {
                if (*j < end_ref) {
                    end_query = *i;
                    end_ref = *j;
                }
                else if (*j == end_ref && *i < end_query) {
                    end_query = *i;
                    end_ref = *j;
                }
            }
        }
    }

    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 $0x118, %rsp            # imm = 0x118
testq %rdx, %rdx
je 0x342651
movl %ecx, %r12d
testl %ecx, %ecx
jle 0x342658
testl %r8d, %r8d
js 0x34265f
testl %r9d, %r9d
js 0x342666
movq 0x150(%rsp), %r14
testq %r14, %r14
je 0x34266d
movq %rdx, %rbp
movl 0x30(%r14), %eax
testl %eax, %eax
jne 0x341d14
testq %rdi, %rdi
je 0x342674
testl %esi, %esi
jle 0x34267b
testl %eax, %eax
je 0x341d18
movl 0x34(%r14), %esi
movq %rdi, 0x40(%rsp)
movl %r9d, 0x8(%rsp)
movslq 0x20(%r14), %rax
movl %r8d, %ebx
negl %r8d
movq %rbx, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
subq %rax, %r15
cmpl %r8d, %eax
cmovgq %rcx, %r15
leaq 0x1(%r15), %rax
movslq 0x1c(%r14), %rcx
movq %rcx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x80(%rsp)
movq %rsi, 0x10(%rsp)
movl %esi, %edi
movl %r12d, %esi
callq 0x209630
testq %rax, %rax
je 0x342680
movq %rax, %r13
movq %r15, 0xb8(%rsp)
orl $0x2841004, 0xc(%rax)   # imm = 0x2841004
movq %r12, 0x20(%rsp)
addl $0x2, %r12d
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movq %rax, %r15
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movl $0x10, %edi
movq %r12, %rsi
movq %rax, %r12
callq 0x2094de
testq %r15, %r15
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x342680
movq %rbp, 0x70(%rsp)
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %rbp
movslq %ebp, %r9
cmpl $0x0, 0x30(%r14)
movq %r9, 0x48(%rsp)
je 0x341e3a
movq $0x0, 0x18(%rsp)
movq 0x30(%rsp), %r8
movq 0x70(%rsp), %r10
movl 0x8(%rsp), %edi
movq 0x28(%rsp), %r11
jmp 0x341e9c
leal 0x1(%rbp), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x2094de
testq %rax, %rax
je 0x342680
testl %ebp, %ebp
movq 0x30(%rsp), %r8
movq 0x48(%rsp), %r9
movl 0x8(%rsp), %edi
movq 0x40(%rsp), %r10
movq 0x28(%rsp), %r11
jle 0x341e8a
movq 0x10(%r14), %rsi
xorl %ecx, %ecx
movzbl (%r10,%rcx), %edx
movslq (%rsi,%rdx,4), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r9
jne 0x341e75
movq %rax, 0x18(%rsp)
movq $0x0, (%rax,%r9,8)
movq 0x70(%rsp), %r10
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq %r11, %rax
addq $-0x2, %rax
movq %rax, 0xb0(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x90(%rsp)
movdqa 0x50(%rsp), %xmm1
psrldq $0x8, %xmm1             # xmm1 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm1, 0xe0(%rsp)
movq %rbx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, 0x100(%rsp)
movd %edi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, 0xf0(%rsp)
movq 0x20(%rsp), %rsi
movl %esi, %eax
movq 0x10(%r14), %rdx
cmpl $0x2, %esi
movl $0x1, %ecx
cmovgel %esi, %ecx
xorl %esi, %esi
movzbl (%r10,%rsi), %edi
movslq (%rdx,%rdi,4), %rdi
movq %rdi, 0x8(%r15,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x341f19
xorl %edx, %edx
movq %rdx, (%r15)
movq %rdx, 0x8(%r15,%rax,8)
movq 0x38(%rsp), %rdi
movq $0x0, 0x8(%r12,%rdx,8)
movq %r8, 0x8(%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x341f3e
movq %r8, (%r12)
movq %r8, (%rdi)
movq %r8, 0x8(%r12,%rax,8)
movq %r8, 0x8(%rdi,%rax,8)
movdqa 0xa0(%rsp), %xmm12
movdqa 0x80(%rsp), %xmm8
movdqa 0x60(%rsp), %xmm6
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
jle 0x3424fa
movq 0x8(%r14), %rdx
movq %rdx, 0xc0(%rsp)
decl %ecx
movq %rcx, 0x10(%rsp)
movq 0x20(%rsp), %rcx
leal -0x1(%rcx), %edx
movq %rdx, 0xc8(%rsp)
incl %ecx
movq %rcx, 0x20(%rsp)
movd 0x2b3b82(%rip), %xmm7   # 0x5f5b40
xorl %r8d, %r8d
movdqa 0x50(%rsp), %xmm1
movq %r15, 0xd8(%rsp)
movq %r12, 0xd0(%rsp)
movl 0x30(%r14), %edx
movq %r8, %rcx
testl %edx, %edx
jne 0x341feb
movq 0x18(%rsp), %rcx
movq (%rcx,%r8,8), %rcx
movq %r8, 0x8(%rsp)
orq $0x1, %r8
testl %edx, %edx
je 0x342009
cmpq %r9, %r8
movq 0x10(%rsp), %rdx
cmovbl %r8d, %edx
movslq %edx, %rdx
jmp 0x342012
movq 0x18(%rsp), %rdx
movq (%rdx,%r8,8), %rdx
movslq 0x18(%r14), %rsi
imulq %rsi, %rcx
movq 0xc0(%rsp), %r10
leaq (%r10,%rcx,4), %rcx
movq %rcx, 0x28(%rsp)
imulq %rsi, %rdx
leaq (%r10,%rdx,4), %rcx
movq %rcx, 0x40(%rsp)
movq %xmm7, %rcx
xorl %edx, %edx
cmpq %r9, %rcx
setl %dl
negq %rdx
pshufd $0xee, %xmm7, %xmm2     # xmm2 = xmm7[2,3,2,3]
movq %xmm2, %rcx
xorl %esi, %esi
cmpq %r9, %rcx
setl %sil
negq %rsi
movq %rdx, %xmm0
movq %rsi, %xmm2
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movdqa %xmm0, 0x70(%rsp)
xorl %r11d, %r11d
movq 0x2b3aca(%rip), %xmm13  # 0x5f5b48
movdqa 0x50(%rsp), %xmm2
movdqa %xmm2, %xmm15
movdqa 0xe0(%rsp), %xmm14
movdqa %xmm14, %xmm11
movdqa %xmm14, %xmm5
pshufd $0xee, %xmm11, %xmm14   # xmm14 = xmm11[2,3,2,3]
movq 0x8(%r12,%r11,8), %xmm9
punpcklqdq %xmm9, %xmm14   # xmm14 = xmm14[0],xmm9[0]
pshufd $0xee, %xmm15, %xmm9    # xmm9 = xmm15[2,3,2,3]
movq 0x8(%rdi,%r11,8), %xmm10
punpcklqdq %xmm10, %xmm9   # xmm9 = xmm9[0],xmm10[0]
movdqa %xmm14, %xmm10
movdqa 0x100(%rsp), %xmm3
psubq %xmm3, %xmm10
movdqa 0xf0(%rsp), %xmm4
psubq %xmm4, %xmm9
movq %xmm10, %rcx
movq %xmm9, %rbx
cmpq %rbx, %rcx
cmovgq %rcx, %rbx
pshufd $0xee, %xmm10, %xmm10   # xmm10 = xmm10[2,3,2,3]
movq %xmm10, %rcx
pshufd $0xee, %xmm9, %xmm9     # xmm9 = xmm9[2,3,2,3]
movq %xmm9, %rdx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
movq (%r15,%r11,8), %rcx
movq 0x8(%r15,%r11,8), %rsi
movq 0x28(%rsp), %rdi
movslq (%rdi,%rsi,4), %rsi
movq 0x40(%rsp), %rdi
movslq (%rdi,%rcx,4), %rcx
movq %rsi, %xmm9
movq %rcx, %xmm10
punpcklqdq %xmm9, %xmm10   # xmm10 = xmm10[0],xmm9[0]
paddq %xmm5, %xmm10
psubq %xmm3, %xmm11
psubq %xmm4, %xmm2
movq %xmm11, %rcx
movq %xmm2, %rsi
cmpq %rsi, %rcx
cmovgq %rcx, %rsi
pshufd $0xee, %xmm11, %xmm5    # xmm5 = xmm11[2,3,2,3]
movq %xmm5, %rcx
pshufd $0xee, %xmm2, %xmm2     # xmm2 = xmm2[2,3,2,3]
movq %xmm2, %r10
cmpq %r10, %rcx
cmovgq %rcx, %r10
movq %xmm10, %rcx
cmpq %rsi, %rcx
cmovleq %rsi, %rcx
pshufd $0xee, %xmm10, %xmm2    # xmm2 = xmm10[2,3,2,3]
movq %xmm2, %r9
cmpq %r10, %r9
cmovleq %r10, %r9
cmpq %rbx, %rcx
cmovleq %rbx, %rcx
cmpq %rdx, %r9
cmovleq %rdx, %r9
testq %rcx, %rcx
movl $0x0, %edi
cmovleq %rdi, %rcx
testq %r9, %r9
cmovleq %rdi, %r9
movq %rcx, %xmm5
movq %r9, %xmm2
punpcklqdq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0]
movq %xmm13, %rcx
xorl %r9d, %r9d
cmpq $-0x1, %rcx
sete %r9b
negq %r9
pshufd $0xee, %xmm13, %xmm2    # xmm2 = xmm13[2,3,2,3]
movq %xmm2, %rbp
xorl %r14d, %r14d
cmpq $-0x1, %rbp
sete %r14b
negq %r14
movq %r9, %xmm2
movq %r14, %xmm9
punpcklqdq %xmm9, %xmm2    # xmm2 = xmm2[0],xmm9[0]
movdqa %xmm2, %xmm11
pandn %xmm5, %xmm11
movq %xmm11, %r9
pshufd $0xee, %xmm11, %xmm9    # xmm9 = xmm11[2,3,2,3]
cmpq $0x2, %r11
jb 0x342285
movdqa 0x90(%rsp), %xmm0
movq %xmm0, %r14
cmpq %r9, %r14
cmovgeq %r9, %r14
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %r15
movq %xmm9, %r12
cmpq %r12, %r15
cmovgeq %r12, %r15
movq %r14, %xmm0
movq %r15, %xmm5
movq %xmm1, %r14
cmpq %r9, %r14
cmovleq %r9, %r14
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %r15
cmpq %r12, %r15
cmovgq %r15, %r12
punpcklqdq %xmm5, %xmm0    # xmm0 = xmm0[0],xmm5[0]
movdqa %xmm0, 0x90(%rsp)
movq %r14, %xmm1
movq %r12, %xmm5
punpcklqdq %xmm5, %xmm1    # xmm1 = xmm1[0],xmm5[0]
movq 0x8(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
setne %r12b
movq %r13, %rdi
movq 0x10(%r13), %r14
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %rax, %r11
setae %r13b
orb %r12b, %r13b
jne 0x3422b3
movd %xmm9, (%r15,%r11,4)
cmpq %r11, 0xc8(%rsp)
jne 0x3422c8
movq 0x8(%rsp), %r12
movd %xmm9, (%r14,%r12,4)
cmpq 0x10(%rsp), %r8
setne %r12b
testq %r11, %r11
sete %r13b
orb %r12b, %r13b
jne 0x3422e4
movd %xmm11, -0x4(%r15,%r11,4)
cmpq 0x48(%rsp), %r8
setae %r15b
cmpq %r11, %rax
setne %r12b
orb %r15b, %r12b
movq %rdi, %r13
jne 0x342302
movd %xmm11, (%r14,%r8,4)
movq %rbx, %xmm5
movq %rdx, %xmm10
punpcklqdq %xmm10, %xmm5   # xmm5 = xmm5[0],xmm10[0]
movq %rsi, %xmm10
movq %r10, %xmm15
punpcklqdq %xmm15, %xmm10  # xmm10 = xmm10[0],xmm15[0]
movdqa %xmm2, %xmm15
pandn %xmm5, %xmm15
movdqa %xmm2, %xmm5
pand 0x50(%rsp), %xmm5
por %xmm5, %xmm15
pandn %xmm10, %xmm2
por %xmm5, %xmm2
movq 0xd0(%rsp), %r12
movq %xmm11, (%r12,%r11,8)
movq 0x38(%rsp), %rdi
movq %xmm15, (%rdi,%r11,8)
movq %rbp, %xmm5
movq %rcx, %xmm10
punpcklqdq %xmm5, %xmm10   # xmm10 = xmm10[0],xmm5[0]
pshufd $0xf5, %xmm10, %xmm5    # xmm5 = xmm10[1,1,3,3]
pcmpeqd %xmm0, %xmm0
pxor %xmm0, %xmm5
psrad $0x1f, %xmm5
pand 0x70(%rsp), %xmm5
xorl %edx, %edx
cmpq %rax, %rcx
setl %dl
negq %rdx
xorl %esi, %esi
cmpq %rax, %rbp
setl %sil
negq %rsi
movq %rsi, %xmm3
movq %rdx, %xmm10
punpcklqdq %xmm3, %xmm10   # xmm10 = xmm10[0],xmm3[0]
pand %xmm5, %xmm10
movq %xmm12, %rsi
movq %xmm9, %r10
pshufd $0xee, %xmm12, %xmm3    # xmm3 = xmm12[2,3,2,3]
movq %xmm3, %rbx
xorl %r14d, %r14d
xorl %edx, %edx
cmpq %rbx, %r10
sete %r14b
setg %dl
xorl %r10d, %r10d
xorl %ebx, %ebx
cmpq %rsi, %r9
sete %r10b
setg %bl
negq %r10
negq %r14
movq %r10, %xmm9
movq %r14, %xmm3
punpcklqdq %xmm3, %xmm9    # xmm9 = xmm9[0],xmm3[0]
negq %rbx
negq %rdx
movq %rbx, %xmm5
movq %rdx, %xmm3
punpcklqdq %xmm3, %xmm5    # xmm5 = xmm5[0],xmm3[0]
pand %xmm10, %xmm5
movq %xmm8, %rsi
xorl %edx, %edx
cmpq %rsi, %rcx
setl %dl
negq %rdx
pshufd $0xee, %xmm8, %xmm3     # xmm3 = xmm8[2,3,2,3]
movq %xmm3, %rcx
xorl %esi, %esi
cmpq %rcx, %rbp
setl %sil
negq %rsi
movdqa %xmm5, %xmm3
pandn %xmm8, %xmm3
movq %rdx, %xmm8
movq %rsi, %xmm4
punpcklqdq %xmm4, %xmm8    # xmm8 = xmm8[0],xmm4[0]
movdqa %xmm5, %xmm4
pandn %xmm12, %xmm4
movdqa %xmm5, %xmm12
pand %xmm11, %xmm12
por %xmm4, %xmm12
movdqa %xmm5, %xmm4
pandn %xmm6, %xmm4
movdqa %xmm5, %xmm6
pand %xmm7, %xmm6
por %xmm4, %xmm6
pand %xmm13, %xmm5
por %xmm3, %xmm5
pand %xmm10, %xmm8
pand %xmm9, %xmm8
movdqa %xmm8, %xmm3
pandn %xmm6, %xmm3
movdqa %xmm8, %xmm6
pand %xmm7, %xmm6
por %xmm3, %xmm6
movdqa %xmm8, %xmm3
pandn %xmm5, %xmm3
pand %xmm13, %xmm8
por %xmm3, %xmm8
psubq %xmm0, %xmm13
incq %r11
cmpq %r11, 0x20(%rsp)
movq 0xd8(%rsp), %r15
jne 0x342098
paddq 0x2b3657(%rip), %xmm7   # 0x5f5b30
movq 0x8(%rsp), %r8
addq $0x2, %r8
movq 0x48(%rsp), %r9
cmpq %r9, %r8
movq 0x150(%rsp), %r14
jb 0x341fd7
jmp 0x342500
movdqa 0x50(%rsp), %xmm1
movdqa %xmm12, 0xa0(%rsp)
movdqa %xmm8, 0x80(%rsp)
movdqa %xmm6, 0x60(%rsp)
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x30(%rsp), %r8
movq 0xa0(%rsp,%rdx,8), %rsi
cmpq %r8, %rsi
jle 0x342542
movl 0x60(%rsp,%rdx,8), %eax
movl 0x80(%rsp,%rdx,8), %ecx
movq %rsi, %r8
jmp 0x342575
jne 0x342575
movq 0x80(%rsp,%rdx,8), %rsi
movslq %ecx, %rdi
cmpq %rdi, %rsi
jge 0x34255c
movl 0x60(%rsp,%rdx,8), %eax
movl %esi, %ecx
jmp 0x342575
jne 0x342575
movq %r8, %r9
movq 0x60(%rsp,%rdx,8), %rdi
movslq %eax, %r8
cmpq %r8, %rdi
jge 0x342572
movl %esi, %ecx
movl %edi, %eax
movq %r9, %r8
incq %rdx
cmpl $0x1, %edx
je 0x342525
movdqa 0x90(%rsp), %xmm0
movq %xmm0, %rdx
xorl %esi, %esi
movq 0xb8(%rsp), %r9
cmpq %r9, %rdx
setle %sil
negq %rsi
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rdx
xorl %edi, %edi
cmpq %r9, %rdx
setle %dil
negq %rdi
movq %rsi, %xmm0
movq %rdi, %xmm2
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movq %xmm1, %rdx
xorl %esi, %esi
movq 0xb0(%rsp), %r9
cmpq %r9, %rdx
setg %sil
negq %rsi
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %rdx
xorl %edi, %edi
cmpq %r9, %rdx
setg %dil
negq %rdi
movq %rsi, %xmm1
movq %rdi, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
por %xmm0, %xmm1
pmovmskb %xmm1, %edx
testl %edx, %edx
je 0x342618
orb $0x40, 0xc(%r13)
xorl %r8d, %r8d
xorl %ecx, %ecx
xorl %eax, %eax
movl %r8d, (%r13)
movl %eax, 0x4(%r13)
movl %ecx, 0x8(%r13)
movq 0x38(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%r14)
jne 0x342683
movq 0x18(%rsp), %rdi
callq 0x2094b5
jmp 0x342683
callq 0x1b54dd
jmp 0x342680
callq 0x1b54b7
jmp 0x342680
callq 0x1b5491
jmp 0x342680
callq 0x1b546b
jmp 0x342680
callq 0x1b5445
jmp 0x342680
callq 0x1b541f
jmp 0x342680
callq 0x1b53f9
xorl %r13d, %r13d
movq %r13, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq