// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sw_trace_diag_sse2_128_64.c
// Function: parasail_sw_trace_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_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 s1Len = 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;
    __m128i vTDiag;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTZero;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;

    /* 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);
    vTDiag = _mm_set1_epi64x_rpl(PARASAIL_DIAG);
    vTIns = _mm_set1_epi64x_rpl(PARASAIL_INS);
    vTDel = _mm_set1_epi64x_rpl(PARASAIL_DEL);
    vTZero = _mm_set1_epi64x_rpl(PARASAIL_ZERO);
    vTDiagE = _mm_set1_epi64x_rpl(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi64x_rpl(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi64x_rpl(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi64x_rpl(PARASAIL_DEL_F);

    /* initialize result */
    result = parasail_result_new_trace(s1Len, s2Len, 16, sizeof(int8_t));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_2;

    /* 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 vE_opn = vNegInf;
        __m128i vE_ext = vNegInf;
        __m128i vF = vNegInf;
        __m128i vF_opn = vNegInf;
        __m128i vF_ext = 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_opn = _mm_sub_epi64(vNH, vOpen);
            vF_ext = _mm_sub_epi64(vF, vGap);
            vF = _mm_max_epi64_rpl(vF_opn, vF_ext);
            vE_opn = _mm_sub_epi64(vWH, vOpen);
            vE_ext = _mm_sub_epi64(vE, vGap);
            vE = _mm_max_epi64_rpl(vE_opn, vE_ext);
            vMat = _mm_set_epi64x_rpl(
                    matrow0[s2[j-0]],
                    matrow1[s2[j-1]]
                    );
            vNWH = _mm_add_epi64(vNWH, vMat);
            vNWH = _mm_max_epi64_rpl(vNWH, vZero);
            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_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);
            }
            /* trace table */
            {
                __m128i cond_zero = _mm_cmpeq_epi64_rpl(vWH, vZero);
                __m128i case1 = _mm_cmpeq_epi64_rpl(vWH, vNWH);
                __m128i case2 = _mm_cmpeq_epi64_rpl(vWH, vF);
                __m128i vT = _mm_blendv_epi8_rpl(
                        _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                        _mm_blendv_epi8_rpl(vTDiag, vTZero, cond_zero),
                        case1);
                __m128i condE = _mm_cmpgt_epi64_rpl(vE_opn, vE_ext);
                __m128i condF = _mm_cmpgt_epi64_rpl(vF_opn, vF_ext);
                __m128i vET = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, condE);
                __m128i vFT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, condF);
                vT = _mm_or_si128(vT, vET);
                vT = _mm_or_si128(vT, vFT);
                arr_store_si128(result->trace->trace_table, vT, i, s1Len, j, s2Len);
            }
            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 $0x268, %rsp            # imm = 0x268
testq %rdx, %rdx
je 0x34c09c
movl %r9d, %ebp
movl %ecx, %r9d
testl %ecx, %ecx
jle 0x34c0c0
testl %r8d, %r8d
js 0x34c0e4
testl %ebp, %ebp
js 0x34c127
movq 0x2a0(%rsp), %r10
testq %r10, %r10
je 0x34c148
cmpl $0x0, 0x30(%r10)
je 0x34b57f
movl 0x34(%r10), %r14d
jmp 0x34b593
testq %rdi, %rdi
je 0x34c169
movl %esi, %r14d
testl %esi, %esi
jle 0x34c18a
movq %rdi, 0x80(%rsp)
movq %rdx, (%rsp)
movslq 0x20(%r10), %rax
movl %r8d, %ebx
negl %r8d
movq %rbx, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq %r13, %rsi
subq %rax, %rsi
cmpl %r8d, %eax
cmovgq %rcx, %rsi
movq %rsi, 0x60(%rsp)
movslq 0x1c(%r10), %r12
pushq $0x10
popq %rdx
pushq $0x1
popq %rcx
movl %r14d, %edi
movl %r9d, %esi
movq %r9, %r15
callq 0x1abb59
testq %rax, %rax
je 0x34b656
movq %rbx, 0x40(%rsp)
movq %r12, 0xc0(%rsp)
movq %r14, 0x58(%rsp)
movq %rax, 0x68(%rsp)
orl $0x2881004, 0xc(%rax)   # imm = 0x2881004
movq %r15, 0x70(%rsp)
leal 0x2(%r15), %r12d
pushq $0x10
popq %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ab78c
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ab78c
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ab78c
movq %rax, %r12
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
testq %r12, %r12
sete %al
orb %cl, %al
je 0x34b65d
xorl %ebx, %ebx
jmp 0x34c1b2
movl %ebp, 0x20(%rsp)
movq 0x58(%rsp), %rbp
movslq %ebp, %rax
movq %rax, 0x18(%rsp)
movq 0x2a0(%rsp), %rdi
cmpl $0x0, 0x30(%rdi)
je 0x34c031
movq $0x0, 0x38(%rsp)
movq 0x70(%rsp), %r9
movq (%rsp), %r10
movq 0x40(%rsp), %rbx
movq 0x60(%rsp), %rbp
incq %rbp
subq 0xc0(%rsp), %r13
addq $-0x2, %r13
movq %rbp, 0x60(%rsp)
movq %rbp, %xmm0
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
movq %r13, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x170(%rsp)
movdqa %xmm1, 0xd0(%rsp)
psrldq $0x8, %xmm1             # xmm1 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm1, 0x1a0(%rsp)
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x1d0(%rsp)
movd 0x20(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x1c0(%rsp)
movq 0x18(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x190(%rsp)
movl %r9d, %ebp
movq %rbp, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x1b0(%rsp)
movq 0x10(%rdi), %rax
xorl %ecx, %ecx
cmpq %rcx, %rbp
je 0x34b753
movzbl (%r10,%rcx), %edx
movslq (%rax,%rdx,4), %rdx
movq %rdx, 0x8(%r14,%rcx,8)
incq %rcx
jmp 0x34b73b
andq $0x0, (%r14)
movq %rbp, %rax
movq 0x60(%rsp), %r13
cmpl %r9d, %eax
jg 0x34b76f
andq $0x0, 0x8(%r14,%rax,8)
incq %rax
jmp 0x34b75f
xorl %eax, %eax
cmpq %rax, %rbp
je 0x34b786
andq $0x0, 0x8(%r15,%rax,8)
movq %r13, 0x8(%r12,%rax,8)
incq %rax
jmp 0x34b771
movq %r13, (%r15)
movq %r13, (%r12)
movq %rbp, %rax
cmpl %r9d, %eax
jg 0x34b7a4
movq %r13, 0x8(%r15,%rax,8)
movq %r13, 0x8(%r12,%rax,8)
incq %rax
jmp 0x34b790
movq 0x58(%rsp), %rax
decl %eax
movq %rax, 0x58(%rsp)
leaq (,%rbp,2), %rax
movq %rax, 0x148(%rsp)
movss 0x27c3a8(%rip), %xmm0   # 0x5c7b70
movaps %xmm0, 0xe0(%rsp)
movq $0x0, 0x98(%rsp)
xorl %edx, %edx
movaps 0xd0(%rsp), %xmm0
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0xf0(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x110(%rsp)
movdqa 0x170(%rsp), %xmm0
movdqa %xmm0, 0x100(%rsp)
cmpq 0x18(%rsp), %rdx
jge 0x34bf05
cmpl $0x0, 0x30(%rdi)
movq %rdx, 0x150(%rsp)
je 0x34b849
movq %rdx, %rbx
orq $0x1, %rbx
cmpq 0x18(%rsp), %rbx
movq 0x58(%rsp), %rax
cmovll %ebx, %eax
cltq
movq %rdx, %rcx
jmp 0x34b85e
movq 0x38(%rsp), %rax
movq (%rax,%rdx,8), %rcx
movq 0x8(%rax,%rdx,8), %rax
movq %rdx, %rbx
orq $0x1, %rbx
movq 0x8(%rdi), %rdx
movslq 0x18(%rdi), %rsi
imulq %rsi, %rcx
leaq (%rdx,%rcx,4), %rcx
movq %rcx, 0x168(%rsp)
imulq %rsi, %rax
leaq (%rdx,%rax,4), %rax
movq %rax, 0x160(%rsp)
movaps 0xe0(%rsp), %xmm0
movaps 0x190(%rsp), %xmm1
callq 0x34c1c7
movaps %xmm0, 0x1e0(%rsp)
movq %rbx, %rax
imulq %rbp, %rax
decq %rax
movq %rax, 0x158(%rsp)
xorl %r13d, %r13d
movdqa 0x1a0(%rsp), %xmm0
movdqa %xmm0, %xmm1
movdqa %xmm0, %xmm6
movdqa 0xd0(%rsp), %xmm0
movdqa %xmm0, %xmm7
movdqa %xmm0, 0x40(%rsp)
movsd 0x27c294(%rip), %xmm0   # 0x5c7b78
movaps %xmm0, 0x80(%rsp)
cmpq %rbp, %r13
movdqa 0x27c019(%rip), %xmm5   # 0x5c7910
ja 0x34beb5
pshufd $0xee, %xmm6, %xmm2     # xmm2 = xmm6[2,3,2,3]
movq 0x8(%r15,%r13,8), %xmm0
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pshufd $0xee, 0x40(%rsp), %xmm8 # xmm8 = mem[2,3,2,3]
movq 0x8(%r12,%r13,8), %xmm0
punpcklqdq %xmm0, %xmm8    # xmm8 = xmm8[0],xmm0[0]
movdqa %xmm2, 0x240(%rsp)
movdqa %xmm2, %xmm9
movdqa 0x1d0(%rsp), %xmm0
psubq %xmm0, %xmm9
movdqa 0x1c0(%rsp), %xmm2
psubq %xmm2, %xmm8
psubq %xmm0, %xmm6
psubq %xmm2, %xmm7
movq (%r14,%r13,8), %rax
movq 0x8(%r14,%r13,8), %rcx
movq 0x168(%rsp), %rdx
movslq (%rdx,%rcx,4), %rcx
movq 0x160(%rsp), %rdx
movslq (%rdx,%rax,4), %rax
movq %rcx, %xmm2
movq %rax, %xmm0
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
paddq %xmm1, %xmm0
movdqa %xmm8, %xmm1
pxor %xmm5, %xmm1
movdqa %xmm9, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
pand %xmm4, %xmm1
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
por %xmm1, %xmm2
movdqa %xmm9, 0x210(%rsp)
movdqa %xmm9, %xmm1
pand %xmm2, %xmm1
movdqa %xmm8, 0x220(%rsp)
pandn %xmm8, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, %xmm8
movdqa %xmm7, %xmm1
pxor %xmm5, %xmm1
movdqa %xmm6, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
pand %xmm4, %xmm1
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
por %xmm1, %xmm4
movdqa %xmm6, 0xa0(%rsp)
movdqa %xmm6, %xmm1
pand %xmm4, %xmm1
movdqa %xmm7, 0x230(%rsp)
pandn %xmm7, %xmm4
por %xmm1, %xmm4
movdqa %xmm0, %xmm1
pxor %xmm5, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm5, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm5, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm3, %xmm1
pshufd $0xf5, %xmm2, %xmm6     # xmm6 = xmm2[1,1,3,3]
por %xmm1, %xmm6
pand %xmm0, %xmm6
movdqa %xmm4, %xmm0
pxor %xmm5, %xmm0
movdqa %xmm6, %xmm1
pxor %xmm5, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm0, %xmm1
pshufd $0xf5, %xmm1, %xmm0     # xmm0 = xmm1[1,1,3,3]
pand %xmm3, %xmm0
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
por %xmm0, %xmm1
movdqa %xmm6, 0x20(%rsp)
movdqa %xmm6, %xmm0
pand %xmm1, %xmm0
movdqa %xmm4, 0x200(%rsp)
pandn %xmm4, %xmm1
por %xmm0, %xmm1
movdqa %xmm1, %xmm0
pxor %xmm5, %xmm0
movdqa %xmm8, (%rsp)
movdqa %xmm8, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm0, %xmm3
pcmpgtd %xmm2, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm0     # xmm0 = xmm2[1,1,3,3]
pand %xmm4, %xmm0
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
por %xmm0, %xmm2
pand %xmm2, %xmm1
pandn %xmm8, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, 0x40(%rsp)
pcmpeqd %xmm1, %xmm1
movdqa 0x80(%rsp), %xmm0
callq 0x34c1fb
movdqa %xmm0, %xmm5
pandn 0x40(%rsp), %xmm5
movdqa %xmm0, %xmm1
pandn (%rsp), %xmm1
movdqa %xmm0, 0xc0(%rsp)
pand 0xd0(%rsp), %xmm0
movdqa %xmm0, 0x1f0(%rsp)
por %xmm0, %xmm1
movdqa %xmm1, 0x40(%rsp)
cmpq $0x2, %r13
jb 0x34bbff
movdqa 0x100(%rsp), %xmm4
movdqa %xmm4, %xmm0
movdqa 0x27bd9e(%rip), %xmm6   # 0x5c7910
pxor %xmm6, %xmm0
movdqa %xmm5, %xmm1
pxor %xmm6, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm3, %xmm0
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
por %xmm0, %xmm2
pand %xmm2, %xmm4
pandn %xmm5, %xmm2
por %xmm2, %xmm4
movdqa %xmm4, 0x100(%rsp)
movdqa 0x110(%rsp), %xmm4
movdqa %xmm4, %xmm0
pxor %xmm6, %xmm0
movdqa %xmm0, %xmm2
pcmpgtd %xmm1, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm3, %xmm0
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
por %xmm0, %xmm1
pand %xmm1, %xmm4
pandn %xmm5, %xmm1
por %xmm1, %xmm4
movdqa %xmm4, 0x110(%rsp)
pxor %xmm1, %xmm1
movdqa %xmm5, %xmm0
movdqa %xmm5, (%rsp)
callq 0x34c1fb
movdqa %xmm0, 0xb0(%rsp)
movaps (%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x34c1fb
movaps %xmm0, 0x20(%rsp)
movaps (%rsp), %xmm0
movaps 0x40(%rsp), %xmm1
callq 0x34c1fb
andps 0x27d96e(%rip), %xmm0   # 0x5c95b0
xorps 0x27c387(%rip), %xmm0   # 0x5c7fd0
movaps 0x20(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
andnps %xmm1, %xmm2
andps 0x27d960(%rip), %xmm2   # 0x5c95c0
movaps %xmm2, 0xb0(%rsp)
andnps %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
movaps 0xa0(%rsp), %xmm0
movaps 0x230(%rsp), %xmm1
callq 0x34c209
movaps %xmm0, 0xa0(%rsp)
movdqa 0x210(%rsp), %xmm0
movaps 0x220(%rsp), %xmm1
callq 0x34c209
movdqa 0xa0(%rsp), %xmm1
pand 0x27d8bc(%rip), %xmm1   # 0x5c9570
por 0xb0(%rsp), %xmm1
pand 0x27d8cb(%rip), %xmm0   # 0x5c9590
por %xmm1, %xmm0
por 0x20(%rsp), %xmm0
pxor 0x27db39(%rip), %xmm0   # 0x5c9810
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
cmpq %rbp, %r13
jae 0x34bcfd
pextrw $0x4, %xmm0, %ecx
movq 0x98(%rsp), %rdx
addq %rax, %rdx
movb %cl, (%r13,%rdx)
cmpq 0x18(%rsp), %rbx
setge %cl
testq %r13, %r13
sete %dl
orb %cl, %dl
jne 0x34bd20
movd %xmm0, %ecx
addq 0x158(%rsp), %rax
movb %cl, (%r13,%rax)
movaps 0xc0(%rsp), %xmm0
andnps 0x200(%rsp), %xmm0
orps 0x1f0(%rsp), %xmm0
movaps %xmm0, 0xc0(%rsp)
movaps (%rsp), %xmm0
movlps %xmm0, (%r15,%r13,8)
movaps 0x40(%rsp), %xmm0
movlps %xmm0, (%r12,%r13,8)
pcmpeqd %xmm1, %xmm1
movaps 0x80(%rsp), %xmm0
callq 0x34c209
movaps %xmm0, 0x20(%rsp)
movaps 0x80(%rsp), %xmm0
movaps 0x1b0(%rsp), %xmm1
callq 0x34c1c7
andps 0x1e0(%rsp), %xmm0
andps 0x20(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movaps (%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
callq 0x34c1fb
movaps %xmm0, 0xb0(%rsp)
movaps (%rsp), %xmm0
movaps 0x70(%rsp), %xmm1
callq 0x34c209
andps 0x20(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movdqa 0x80(%rsp), %xmm0
movaps 0xf0(%rsp), %xmm1
callq 0x34c1c7
movdqa 0xa0(%rsp), %xmm7
movdqa %xmm7, %xmm1
pandn 0xf0(%rsp), %xmm1
movdqa %xmm7, %xmm2
pandn 0x70(%rsp), %xmm2
movdqa %xmm7, %xmm3
movdqa (%rsp), %xmm6
pand %xmm6, %xmm3
por %xmm2, %xmm3
movdqa %xmm3, 0x70(%rsp)
movdqa %xmm7, %xmm2
pandn 0x120(%rsp), %xmm2
movdqa %xmm7, %xmm3
movdqa 0xe0(%rsp), %xmm4
pand %xmm4, %xmm3
por %xmm2, %xmm3
movdqa 0x80(%rsp), %xmm5
pand %xmm5, %xmm7
por %xmm1, %xmm7
pand 0x20(%rsp), %xmm0
pand 0xb0(%rsp), %xmm0
movdqa %xmm0, %xmm1
pandn %xmm3, %xmm1
movdqa %xmm0, %xmm2
pand %xmm4, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, 0x120(%rsp)
movdqa %xmm0, %xmm1
pandn %xmm7, %xmm1
movdqa %xmm5, %xmm2
pand %xmm5, %xmm0
por %xmm1, %xmm0
psubq 0x27bcd7(%rip), %xmm2   # 0x5c7b60
movdqa %xmm2, 0x80(%rsp)
incq %r13
movdqa %xmm0, 0xf0(%rsp)
movdqa 0x240(%rsp), %xmm1
movdqa 0xc0(%rsp), %xmm7
jmp 0x34b8ec
movdqa 0xe0(%rsp), %xmm0
paddq 0x27bc8a(%rip), %xmm0   # 0x5c7b50
movdqa %xmm0, 0xe0(%rsp)
movq 0x150(%rsp), %rdx
addq $0x2, %rdx
movq 0x98(%rsp), %rax
addq 0x148(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x2a0(%rsp), %rdi
movq 0x60(%rsp), %r13
jmp 0x34b815
movaps 0x70(%rsp), %xmm0
movaps %xmm0, 0x250(%rsp)
movaps 0xf0(%rsp), %xmm0
movaps %xmm0, 0x180(%rsp)
movdqa 0x120(%rsp), %xmm0
movdqa %xmm0, 0x130(%rsp)
xorl %eax, %eax
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpl $0x2, %eax
je 0x34bfa2
movq 0x250(%rsp,%rax,8), %rcx
cmpq %r13, %rcx
jle 0x34bf5c
movl 0x130(%rsp,%rax,8), %ebp
movl 0x180(%rsp,%rax,8), %ebx
jmp 0x34bf9a
jne 0x34bf97
movq 0x180(%rsp,%rax,8), %rdx
movslq %ebx, %rcx
cmpq %rcx, %rdx
jge 0x34bf7c
movl 0x130(%rsp,%rax,8), %ebp
movq %r13, %rcx
movl %edx, %ebx
jmp 0x34bf9a
jne 0x34bf97
movq 0x130(%rsp,%rax,8), %rsi
movslq %ebp, %rcx
cmpq %rcx, %rsi
jge 0x34bf97
movq %r13, %rcx
movl %edx, %ebx
movl %esi, %ebp
jmp 0x34bf9a
movq %r13, %rcx
incq %rax
movq %rcx, %r13
jmp 0x34bf3a
movaps 0x100(%rsp), %xmm0
movaps 0xd0(%rsp), %xmm1
callq 0x34c1c7
movaps %xmm0, (%rsp)
movdqa 0x110(%rsp), %xmm0
movaps 0x170(%rsp), %xmm1
callq 0x34c209
por (%rsp), %xmm0
pmovmskb %xmm0, %eax
testl %eax, %eax
movq 0x68(%rsp), %rax
je 0x34bfee
orb $0x40, 0xc(%rax)
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
movl %r13d, (%rax)
movl %ebp, 0x4(%rax)
movl %ebx, 0x8(%rax)
movq %r12, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
movq 0x2a0(%rsp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x34c027
movq 0x38(%rsp), %rdi
callq 0x1ab763
movq 0x68(%rsp), %rbx
jmp 0x34c1b2
leal 0x1(%rbp), %eax
movslq %eax, %rsi
pushq $0x10
popq %rdi
callq 0x1ab78c
xorl %r8d, %r8d
movq %rax, 0x38(%rsp)
testq %rax, %rax
movq 0x40(%rsp), %rbx
je 0x34b656
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
movq 0x2a0(%rsp), %rdi
movq 0x70(%rsp), %r9
movq (%rsp), %r10
movq 0x80(%rsp), %r11
movq 0x38(%rsp), %rax
cmpq %r8, %rcx
je 0x34c108
movq 0x10(%rdi), %rdx
movzbl (%r11,%r8), %esi
movslq (%rdx,%rsi,4), %rdx
movq %rdx, (%rax,%r8,8)
incq %r8
jmp 0x34c07d
movq 0x3eef35(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27af3e(%rip), %rsi    # 0x5c6feb
leaq 0x24b12d(%rip), %rdx    # 0x5971e1
leaq 0x27b642(%rip), %rcx    # 0x5c76fd
jmp 0x34c1a9
movq 0x3eef11(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27b630(%rip), %rsi    # 0x5c7701
leaq 0x24b109(%rip), %rdx    # 0x5971e1
leaq 0x27b636(%rip), %rcx    # 0x5c7715
jmp 0x34c1a9
movq 0x3eeeed(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27b626(%rip), %rsi    # 0x5c771b
leaq 0x24b0e5(%rip), %rdx    # 0x5971e1
leaq 0x27b62d(%rip), %rcx    # 0x5c7730
jmp 0x34c1a9
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x18(%rsp), %rax
jg 0x34b697
andq $0x0, (%rcx,%rax,8)
incq %rax
jmp 0x34c112
movq 0x3eeeaa(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27b5e3(%rip), %rsi    # 0x5c771b
leaq 0x24b0a2(%rip), %rdx    # 0x5971e1
leaq 0x27b5ef(%rip), %rcx    # 0x5c7735
jmp 0x34c1a9
movq 0x3eee89(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27ae92(%rip), %rsi    # 0x5c6feb
leaq 0x24b081(%rip), %rdx    # 0x5971e1
leaq 0x27b7db(%rip), %rcx    # 0x5c7942
jmp 0x34c1a9
movq 0x3eee68(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27ae71(%rip), %rsi    # 0x5c6feb
leaq 0x24b060(%rip), %rdx    # 0x5971e1
leaq 0x27b5b1(%rip), %rcx    # 0x5c7739
jmp 0x34c1a9
movq 0x3eee47(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x27b566(%rip), %rsi    # 0x5c7701
leaq 0x24b03f(%rip), %rdx    # 0x5971e1
leaq 0x27b594(%rip), %rcx    # 0x5c773d
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq