// File: /workspace/github_c_makefile_star2_O3/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 $0x118, %rsp            # imm = 0x118
testq %rdx, %rdx
je 0x3573a0
movl %ecx, %r13d
testl %ecx, %ecx
jle 0x3573a7
movl %r8d, %r12d
testl %r8d, %r8d
js 0x3573ae
testl %r9d, %r9d
js 0x3573b5
movq 0x150(%rsp), %rbx
testq %rbx, %rbx
je 0x3573bc
movq %rdx, %r15
cmpl $0x0, 0x30(%rbx)
je 0x356b29
movl 0x34(%rbx), %ebp
jmp 0x356b3c
testq %rdi, %rdi
je 0x3573c3
movl %esi, %ebp
testl %esi, %esi
jle 0x3573ca
movq %rdi, 0x90(%rsp)
movq %r9, 0x50(%rsp)
movslq 0x20(%rbx), %rax
movl %r12d, %ecx
negl %r12d
movq %rcx, 0x20(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
subq %rax, %r14
cmpl %r12d, %eax
cmovgq %rcx, %r14
movslq 0x1c(%rbx), %rax
movq %rax, 0x18(%rsp)
movl %ebp, %edi
movl %r13d, %esi
callq 0x20ac53
testq %rax, %rax
je 0x3573cf
movl %r12d, 0x80(%rsp)
movq %r15, 0x40(%rsp)
movq %r14, 0x70(%rsp)
movq %rax, 0x10(%rsp)
orl $0x2841001, 0xc(%rax)   # imm = 0x2841001
leal 0x2(%r13), %r12d
movl $0x10, %edi
movq %r12, %rsi
callq 0x20a636
movq %rax, %r14
movl $0x10, %edi
movq %r12, %rsi
callq 0x20a636
movq %rax, %r15
movl $0x10, %edi
movq %r12, %rsi
callq 0x20a636
movq %rax, %r12
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
testq %r12, %r12
sete %al
orb %cl, %al
jne 0x3573cf
movslq %ebp, %r9
cmpl $0x0, 0x30(%rbx)
movq %r9, 0x48(%rsp)
je 0x356c23
movq $0x0, 0x38(%rsp)
movq 0x10(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0x20(%rsp), %r8
jmp 0x356c83
leal 0x1(%rbp), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x20a636
testq %rax, %rax
je 0x3573cf
testl %ebp, %ebp
movq 0x10(%rsp), %r11
movq 0x48(%rsp), %r9
movq 0x50(%rsp), %r10
movq 0x90(%rsp), %rdi
movq 0x20(%rsp), %r8
jle 0x356c76
movq 0x10(%rbx), %rsi
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
movslq (%rsi,%rdx,4), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %r9
jne 0x356c62
movq %rax, 0x38(%rsp)
movq $0x0, (%rax,%r9,8)
leal -0x1(%rbp), %eax
movl %eax, 0x8(%rsp)
leal -0x1(%r13), %eax
movl %eax, 0xc(%rsp)
movq 0x70(%rsp), %rax
incq %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
subq 0x18(%rsp), %rcx
addq $-0x2, %rcx
movq %rax, 0x68(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x20(%rsp)
movq %rcx, %xmm0
movdqa %xmm0, 0xc0(%rsp)
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x90(%rsp)
movd %r10d, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x100(%rsp)
leal (%r10,%r10), %eax
movd %eax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xf0(%rsp)
leaq -0x1(%r9), %rax
movq %rax, 0x18(%rsp)
movl %r13d, %esi
leaq -0x1(%rsi), %rdi
movl 0x80(%rsp), %eax
movslq %eax, %rdx
subl %r10d, %eax
movslq %eax, %rcx
movq %rcx, %xmm2
movq %rdx, 0x78(%rsp)
movq %rdx, %xmm0
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
movdqa %xmm2, 0x50(%rsp)
movq 0x10(%rbx), %rcx
xorl %edx, %edx
movq 0x40(%rsp), %rax
movzbl (%rax,%rdx), %r8d
movslq (%rcx,%r8,4), %r8
movq %r8, 0x8(%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x356d55
xorl %ecx, %ecx
movq %rcx, (%r14)
movq %rcx, 0x8(%r14,%rsi,8)
movl %r10d, %r10d
movq 0x78(%rsp), %rdx
movq 0x68(%rsp), %r8
movq %rdx, 0x8(%r15,%rcx,8)
movq %r8, 0x8(%r12,%rcx,8)
incq %rcx
subq %r10, %rdx
cmpq %rcx, %rsi
jne 0x356d82
movq %r8, (%r12)
movq %r8, 0x8(%r15,%rsi,8)
movq %r8, 0x8(%r12,%rsi,8)
movq $0x0, (%r15)
testl %ebp, %ebp
jle 0x35728c
movq 0x8(%rbx), %rcx
movq %rcx, 0xa8(%rsp)
movdqa 0x20(%rsp), %xmm7
movdqa %xmm7, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm0, 0xe0(%rsp)
movl 0xc(%rsp), %ecx
movq %rcx, 0x40(%rsp)
incl %r13d
movl 0x8(%rsp), %ecx
movq 0x18(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xd0(%rsp)
movd 0x2d2edb(%rip), %xmm11  # 0x629ce0
xorl %r8d, %r8d
movdqa 0x2d2b7f(%rip), %xmm13  # 0x629990
movdqa %xmm7, %xmm8
movq %r10, 0xb0(%rsp)
cmpl $0x0, 0x30(%rbx)
je 0x356e3a
movq %r8, %rax
orq $0x1, %rax
cmpq %r9, %rax
cmovgel 0x8(%rsp), %eax
cltq
movq %r8, %rdx
jmp 0x356e48
movq 0x38(%rsp), %rax
movq (%rax,%r8,8), %rdx
movq 0x8(%rax,%r8,8), %rax
movslq 0x18(%rbx), %r9
imulq %r9, %rdx
movq 0xa8(%rsp), %rbx
leaq (%rbx,%rdx,4), %rdx
movq %rdx, 0x18(%rsp)
imulq %r9, %rax
leaq (%rbx,%rax,4), %r9
leaq 0x2(%r8), %rax
movq %rax, 0xb8(%rsp)
imulq %r10, %rax
movq %r10, %rbx
movq 0x78(%rsp), %r10
movq %r10, %rdx
subq %rax, %rdx
movq (%r15), %xmm0
movq %rdx, (%r15)
movq %r8, %rax
imulq %rbx, %rax
movq %r10, %rdx
subq %rax, %rdx
movq %rdx, %xmm2
movdqa 0xe0(%rsp), %xmm5
movdqa %xmm5, %xmm6
punpcklqdq %xmm2, %xmm6    # xmm6 = xmm6[0],xmm2[0]
punpcklqdq %xmm0, %xmm5    # xmm5 = xmm5[0],xmm0[0]
movq %r8, %rdx
orq $0x1, %rdx
movdqa %xmm11, 0x80(%rsp)
pcmpeqd 0xd0(%rsp), %xmm11
xorl %eax, %eax
movq 0x2d2e0c(%rip), %xmm12  # 0x629ce8
movdqa 0x20(%rsp), %xmm15
movdqa %xmm15, %xmm2
movq %r13, %r10
movq (%r14,%rax,8), %rbx
movq 0x8(%r14,%rax,8), %r13
movq 0x18(%rsp), %rbp
movslq (%rbp,%r13,4), %r13
movslq (%r9,%rbx,4), %rbx
movq %r13, %xmm0
movq %rbx, %xmm14
punpcklqdq %xmm0, %xmm14   # xmm14 = xmm14[0],xmm0[0]
paddq %xmm5, %xmm14
pshufd $0xee, %xmm6, %xmm5     # xmm5 = xmm6[2,3,2,3]
movq 0x8(%r15,%rax,8), %xmm0
punpcklqdq %xmm0, %xmm5    # xmm5 = xmm5[0],xmm0[0]
pshufd $0xee, %xmm2, %xmm0     # xmm0 = xmm2[2,3,2,3]
movq 0x8(%r12,%rax,8), %xmm2
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movdqa %xmm5, %xmm9
movdqa 0x90(%rsp), %xmm2
psubq %xmm2, %xmm9
movdqa 0x100(%rsp), %xmm3
psubq %xmm3, %xmm0
psubq %xmm2, %xmm6
psubq %xmm3, %xmm15
movdqa %xmm0, %xmm10
pxor %xmm13, %xmm10
movdqa %xmm9, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm10, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm10, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm4, %xmm2
pshufd $0xf5, %xmm3, %xmm10    # xmm10 = xmm3[1,1,3,3]
por %xmm2, %xmm10
pand %xmm10, %xmm9
pandn %xmm0, %xmm10
por %xmm9, %xmm10
movdqa %xmm15, %xmm0
pxor %xmm13, %xmm0
movdqa %xmm6, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm0, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm4, %xmm2
pshufd $0xf5, %xmm3, %xmm0     # xmm0 = xmm3[1,1,3,3]
por %xmm2, %xmm0
pand %xmm0, %xmm6
pandn %xmm15, %xmm0
por %xmm6, %xmm0
movdqa %xmm0, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm14, %xmm3
pxor %xmm13, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm6     # xmm6 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pand %xmm6, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm14
pandn %xmm0, %xmm3
por %xmm14, %xmm3
pcmpeqd %xmm14, %xmm14
movdqa %xmm3, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm10, %xmm4
pxor %xmm13, %xmm4
movdqa %xmm2, %xmm6
pcmpgtd %xmm4, %xmm6
pshufd $0xa0, %xmm6, %xmm9     # xmm9 = xmm6[0,0,2,2]
pcmpeqd %xmm2, %xmm4
pshufd $0xf5, %xmm4, %xmm2     # xmm2 = xmm4[1,1,3,3]
pand %xmm9, %xmm2
pshufd $0xf5, %xmm6, %xmm4     # xmm4 = xmm6[1,1,3,3]
por %xmm2, %xmm4
pand %xmm4, %xmm3
pandn %xmm10, %xmm4
por %xmm3, %xmm4
movdqa %xmm12, %xmm2
pcmpeqd %xmm14, %xmm2
pshufd $0xb1, %xmm2, %xmm15    # xmm15 = xmm2[1,0,3,2]
pand %xmm2, %xmm15
movdqa %xmm15, %xmm2
pandn %xmm4, %xmm2
movdqa 0x50(%rsp), %xmm6
pand %xmm15, %xmm6
por %xmm2, %xmm6
cmpq $0x2, %rax
jb 0x35712a
movdqa %xmm1, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm6, %xmm3
pxor %xmm13, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm9     # xmm9 = xmm4[0,0,2,2]
pcmpeqd %xmm3, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm9, %xmm2
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm2, %xmm4
pand %xmm4, %xmm1
pandn %xmm6, %xmm4
por %xmm4, %xmm1
movdqa %xmm7, %xmm2
pxor %xmm13, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm3, %xmm4
pshufd $0xa0, %xmm4, %xmm9     # xmm9 = xmm4[0,0,2,2]
pcmpeqd %xmm3, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm9, %xmm2
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm7
pandn %xmm6, %xmm3
por %xmm3, %xmm7
cmpq %rcx, %r8
setne %bpl
movq 0x10(%r11), %rbx
movq (%rbx), %r13
movq 0x8(%rbx), %rbx
cmpq %rsi, %rax
setae %r11b
orb %bpl, %r11b
pshufd $0xee, %xmm6, %xmm2     # xmm2 = xmm6[2,3,2,3]
jne 0x357154
movd %xmm2, (%r13,%rax,4)
cmpq %rax, 0x40(%rsp)
jne 0x357161
movd %xmm2, (%rbx,%r8,4)
cmpq %rcx, %rdx
setne %r11b
testq %rax, %rax
sete %bpl
orb %r11b, %bpl
jne 0x35717b
movd %xmm6, -0x4(%r13,%rax,4)
cmpq 0x48(%rsp), %rdx
setge %r11b
cmpq %rax, %rsi
setne %bpl
orb %r11b, %bpl
jne 0x357195
movd %xmm6, (%rbx,%rdx,4)
movdqa %xmm15, %xmm2
pandn %xmm10, %xmm2
movdqa 0x20(%rsp), %xmm3
pand %xmm15, %xmm3
por %xmm3, %xmm2
pandn %xmm0, %xmm15
por %xmm3, %xmm15
pshufd $0xb1, %xmm11, %xmm0    # xmm0 = xmm11[1,0,3,2]
pand %xmm11, %xmm0
movq %xmm6, (%r15,%rax,8)
movq %xmm2, (%r12,%rax,8)
movq %xmm12, %r11
xorl %ebx, %ebx
cmpq %rdi, %r11
sete %bl
negq %rbx
pshufd $0xee, %xmm12, %xmm3    # xmm3 = xmm12[2,3,2,3]
movq %xmm3, %r11
xorl %r13d, %r13d
cmpq %rdi, %r11
sete %r13b
negq %r13
movq %rbx, %xmm3
movq %r13, %xmm4
punpcklqdq %xmm4, %xmm3    # xmm3 = xmm3[0],xmm4[0]
pand %xmm0, %xmm3
movdqa %xmm6, %xmm0
pand %xmm3, %xmm0
pandn %xmm8, %xmm3
movdqa %xmm3, %xmm8
por %xmm0, %xmm8
psubq %xmm14, %xmm12
incq %rax
movq %r10, %r13
cmpq %rax, %r10
movq 0x10(%rsp), %r11
jne 0x356ee8
movdqa 0x80(%rsp), %xmm11
paddq 0x2d1ca4(%rip), %xmm11  # 0x628ef0
movdqa 0x50(%rsp), %xmm0
psubq 0xf0(%rsp), %xmm0
movdqa %xmm0, 0x50(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, %r8
movq 0x48(%rsp), %r9
cmpq %r9, %rax
movq 0x150(%rsp), %rbx
movq 0xb0(%rsp), %r10
jl 0x356e1e
jmp 0x357298
movdqa 0x20(%rsp), %xmm8
movdqa %xmm8, %xmm7
movb $0x1, %al
movq 0x68(%rsp), %rdx
pshufd $0xee, %xmm8, %xmm0     # xmm0 = xmm8[2,3,2,3]
movq %xmm0, %rcx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
pslldq $0x8, %xmm8             # xmm8 = zero,zero,zero,zero,zero,zero,zero,zero,xmm8[0,1,2,3,4,5,6,7]
testb $0x1, %al
movl $0x0, %eax
jne 0x35729f
movq 0x70(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x2d26bd(%rip), %xmm2   # 0x629990
pxor %xmm2, %xmm1
pxor %xmm2, %xmm0
movdqa %xmm1, %xmm3
pcmpgtd %xmm0, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm4, %xmm0
pshufd $0xf5, %xmm3, %xmm1     # xmm1 = xmm3[1,1,3,3]
por %xmm0, %xmm1
pcmpeqd %xmm0, %xmm0
pxor %xmm1, %xmm0
pshufd $0x44, 0xc0(%rsp), %xmm1 # xmm1 = mem[0,1,0,1]
pxor %xmm2, %xmm7
pxor %xmm2, %xmm1
movdqa %xmm7, %xmm2
pcmpgtd %xmm1, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm3, %xmm1
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
por %xmm1, %xmm2
por %xmm0, %xmm2
pmovmskb %xmm2, %eax
testl %eax, %eax
je 0x35735e
orb $0x40, 0xc(%r11)
xorl %edx, %edx
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl %edx, (%r11)
movl 0x8(%rsp), %eax
movl %eax, 0x4(%r11)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%r11)
movq %r12, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
cmpl $0x0, 0x30(%rbx)
jne 0x357399
movq 0x38(%rsp), %rdi
callq 0x20a60d
movq 0x10(%rsp), %rax
jmp 0x3573d1
callq 0x1b52bd
jmp 0x3573cf
callq 0x1b5297
jmp 0x3573cf
callq 0x1b5271
jmp 0x3573cf
callq 0x1b524b
jmp 0x3573cf
callq 0x1b5225
jmp 0x3573cf
callq 0x1b51ff
jmp 0x3573cf
callq 0x1b51d9
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop