// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_trace_diag_sse2_128_64.c
// Function: parasail_nw_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 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;
    __m128i vTDiag;
    __m128i vTIns;
    __m128i vTDel;
    __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 = 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);
    vTDiag = _mm_set1_epi64x_rpl(PARASAIL_DIAG);
    vTIns = _mm_set1_epi64x_rpl(PARASAIL_INS);
    vTDel = _mm_set1_epi64x_rpl(PARASAIL_DEL);
    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_NW | 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] = -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 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))];
        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_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);
            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);
            }
            /* trace table */
            {
                __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),
                        vTDiag,
                        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
               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 $0x178, %rsp            # imm = 0x178
testq %rdx, %rdx
je 0x3ab761
movl %ecx, %ebp
testl %ecx, %ecx
jle 0x3ab768
movl %r8d, %r15d
testl %r8d, %r8d
js 0x3ab76f
testl %r9d, %r9d
js 0x3ab776
movq 0x1b0(%rsp), %rbx
testq %rbx, %rbx
je 0x3ab77d
cmpl $0x0, 0x30(%rbx)
je 0x3aadd5
movl 0x34(%rbx), %esi
jmp 0x3aade6
testq %rdi, %rdi
je 0x3ab784
testl %esi, %esi
jle 0x3ab78b
movq %rdi, 0xc0(%rsp)
movq %rdx, 0x70(%rsp)
movq %r9, 0x80(%rsp)
movslq 0x20(%rbx), %rax
movl %r15d, %r12d
negl %r15d
movq %r12, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
subq %rax, %r14
cmpl %r15d, %eax
cmovgq %rcx, %r14
movslq 0x1c(%rbx), %rax
movq %rax, 0xd0(%rsp)
movl $0x10, %edx
movl $0x1, %ecx
movq %rsi, 0x90(%rsp)
movl %esi, %edi
movl %ebp, %esi
callq 0x20adf4
testq %rax, %rax
je 0x3ab790
movq %rax, %r13
movq %r12, 0xb0(%rsp)
movl %r15d, 0x20(%rsp)
movq %r14, 0x38(%rsp)
orl $0x2881001, 0xc(%rax)   # imm = 0x2881001
leal 0x2(%rbp), %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 0x3ab790
movq %rbp, 0x8(%rsp)
movq 0x90(%rsp), %r9
movslq %r9d, %rbp
cmpl $0x0, 0x30(%rbx)
je 0x3aaef5
movq $0x0, 0x10(%rsp)
movq 0x80(%rsp), %r10
movq 0x70(%rsp), %r11
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
jmp 0x3aaf62
leal 0x1(%r9), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x20a636
testq %rax, %rax
je 0x3ab790
movq 0x90(%rsp), %r9
testl %r9d, %r9d
movq 0x80(%rsp), %r10
movq 0x70(%rsp), %r11
movq 0xc0(%rsp), %rdi
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
jle 0x3aaf55
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, %rbp
jne 0x3aaf41
movq %rax, 0x10(%rsp)
movq $0x0, (%rax,%rbp,8)
leal -0x1(%r9), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rdx
leal -0x1(%rdx), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rax
incq %rax
subq 0xd0(%rsp), %r8
addq $-0x2, %r8
movq %rax, 0x30(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x60(%rsp)
movq %r8, %xmm0
movdqa %xmm0, 0x100(%rsp)
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xa0(%rsp)
movq 0xb0(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x160(%rsp)
movd %r10d, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x150(%rsp)
leal (%r10,%r10), %eax
movd %eax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x130(%rsp)
leaq -0x1(%rbp), %rcx
movl %edx, %esi
leaq -0x1(%rsi), %rdi
movl 0x20(%rsp), %eax
movslq %eax, %rdx
subl %r10d, %eax
cltq
movq %rax, %xmm1
movq %rdx, 0x40(%rsp)
movq %rdx, %xmm0
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movdqa %xmm1, 0x20(%rsp)
movq 0x10(%rbx), %rax
xorl %edx, %edx
movzbl (%r11,%rdx), %r8d
movslq (%rax,%r8,4), %r8
movq %r8, 0x8(%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rsi
jne 0x3ab030
xorl %eax, %eax
movq %rax, (%r14)
movq %rax, 0x8(%r14,%rsi,8)
movl %r10d, %r11d
movq 0x40(%rsp), %rdx
movq 0x30(%rsp), %r8
movq %rdx, 0x8(%r15,%rax,8)
movq %r8, 0x8(%r12,%rax,8)
incq %rax
subq %r11, %rdx
cmpq %rax, %rsi
jne 0x3ab05d
movq %r8, (%r12)
movq %r8, 0x8(%r15,%rsi,8)
movq %r8, 0x8(%r12,%rsi,8)
movq $0x0, (%r15)
testl %r9d, %r9d
jle 0x3ab646
movdqa 0x60(%rsp), %xmm1
movdqa %xmm1, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm0, 0x120(%rsp)
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x110(%rsp)
leaq (%rsi,%rsi), %rax
movq %rax, 0xe8(%rsp)
leaq -0x1(%rsi), %rax
movq %rax, 0x48(%rsp)
movd 0x27ebfc(%rip), %xmm4   # 0x629ce0
xorl %ecx, %ecx
movdqa 0x27e8a2(%rip), %xmm7   # 0x629990
xorl %edx, %edx
movdqa %xmm1, 0x50(%rsp)
movdqa %xmm1, %xmm3
movq %r11, 0xf0(%rsp)
cmpl $0x0, 0x30(%rbx)
je 0x3ab11e
movq %rdx, %rax
orq $0x1, %rax
cmpq %rbp, %rax
cmovgel 0x4(%rsp), %eax
cltq
movq %rdx, %r8
jmp 0x3ab12c
movq 0x10(%rsp), %rax
movq (%rax,%rdx,8), %r8
movq 0x8(%rax,%rdx,8), %rax
movq 0x8(%rbx), %r9
movslq 0x18(%rbx), %rbx
imulq %rbx, %r8
leaq (%r9,%r8,4), %r10
imulq %rbx, %rax
leaq (%r9,%rax,4), %r9
leaq 0x2(%rdx), %rax
movq %rax, 0xf8(%rsp)
imulq %r11, %rax
movq %r11, %rbx
movq 0x40(%rsp), %r11
movq %r11, %r8
subq %rax, %r8
movq (%r15), %xmm1
movq %r8, (%r15)
movq %rdx, %rax
imulq %rbx, %rax
movq %r11, %r8
subq %rax, %r8
movq %r8, %xmm0
movdqa 0x120(%rsp), %xmm2
movdqa %xmm2, %xmm8
punpcklqdq %xmm0, %xmm8    # xmm8 = xmm8[0],xmm0[0]
movdqa %xmm2, %xmm0
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
orq $0x1, %rdx
movdqa %xmm4, 0x140(%rsp)
pcmpeqd 0x110(%rsp), %xmm4
movdqa %xmm4, 0xb0(%rsp)
xorl %r8d, %r8d
movq 0x27eb27(%rip), %xmm6   # 0x629ce8
movdqa 0x60(%rsp), %xmm2
movdqa %xmm2, %xmm11
pcmpeqd %xmm9, %xmm9
movdqa %xmm3, 0x90(%rsp)
movq (%r14,%r8,8), %rax
movq 0x8(%r14,%r8,8), %rbx
movslq (%r10,%rbx,4), %rbx
movslq (%r9,%rax,4), %rax
movq %rbx, %xmm1
movq %rax, %xmm14
punpcklqdq %xmm1, %xmm14   # xmm14 = xmm14[0],xmm1[0]
paddq %xmm0, %xmm14
pshufd $0xee, %xmm8, %xmm4     # xmm4 = xmm8[2,3,2,3]
movq 0x8(%r15,%r8,8), %xmm1
punpcklqdq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0]
pshufd $0xee, %xmm11, %xmm1    # xmm1 = xmm11[2,3,2,3]
movq 0x8(%r12,%r8,8), %xmm3
punpcklqdq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0]
movdqa %xmm4, 0x70(%rsp)
movdqa 0x160(%rsp), %xmm0
psubq %xmm0, %xmm4
movdqa 0x150(%rsp), %xmm3
psubq %xmm3, %xmm1
psubq %xmm0, %xmm8
psubq %xmm3, %xmm2
movdqa %xmm1, %xmm3
pxor %xmm7, %xmm3
movdqa %xmm4, %xmm5
pxor %xmm7, %xmm5
movdqa %xmm5, %xmm12
pcmpgtd %xmm3, %xmm12
pshufd $0xa0, %xmm12, %xmm13   # xmm13 = xmm12[0,0,2,2]
pcmpeqd %xmm3, %xmm5
pshufd $0xf5, %xmm5, %xmm15    # xmm15 = xmm5[1,1,3,3]
pand %xmm15, %xmm13
pshufd $0xf5, %xmm12, %xmm0    # xmm0 = xmm12[1,1,3,3]
movdqa %xmm0, 0xd0(%rsp)
por %xmm0, %xmm13
pand %xmm13, %xmm4
pandn %xmm1, %xmm13
por %xmm4, %xmm13
movdqa %xmm2, %xmm4
pxor %xmm7, %xmm4
movdqa %xmm8, %xmm5
pxor %xmm7, %xmm5
movdqa %xmm5, %xmm1
pcmpgtd %xmm4, %xmm1
pshufd $0xa0, %xmm1, %xmm10    # xmm10 = xmm1[0,0,2,2]
pcmpeqd %xmm4, %xmm5
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
pand %xmm4, %xmm10
pshufd $0xf5, %xmm1, %xmm0     # xmm0 = xmm1[1,1,3,3]
movdqa %xmm0, 0xc0(%rsp)
por %xmm0, %xmm10
pand %xmm10, %xmm8
pandn %xmm2, %xmm10
por %xmm8, %xmm10
movdqa %xmm10, %xmm2
pxor %xmm7, %xmm2
movdqa %xmm14, %xmm5
pxor %xmm7, %xmm5
movdqa %xmm6, %xmm0
movdqa %xmm5, %xmm6
pcmpgtd %xmm2, %xmm6
pshufd $0xa0, %xmm6, %xmm11    # xmm11 = xmm6[0,0,2,2]
pcmpeqd %xmm2, %xmm5
pshufd $0xf5, %xmm5, %xmm2     # xmm2 = xmm5[1,1,3,3]
pand %xmm11, %xmm2
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm2, %xmm5
movdqa %xmm14, %xmm2
pand %xmm5, %xmm2
pandn %xmm10, %xmm5
por %xmm2, %xmm5
movdqa %xmm5, %xmm2
pxor %xmm7, %xmm2
movdqa %xmm13, %xmm6
pxor %xmm7, %xmm6
movdqa %xmm2, %xmm11
pcmpgtd %xmm6, %xmm11
pcmpeqd %xmm2, %xmm6
pshufd $0xa0, %xmm11, %xmm2    # xmm2 = xmm11[0,0,2,2]
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pand %xmm2, %xmm6
pshufd $0xf5, %xmm11, %xmm2    # xmm2 = xmm11[1,1,3,3]
por %xmm6, %xmm2
pand %xmm2, %xmm5
pandn %xmm13, %xmm2
por %xmm5, %xmm2
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, %xmm6
pcmpeqd %xmm9, %xmm6
pshufd $0xb1, %xmm6, %xmm5     # xmm5 = xmm6[1,0,3,2]
pand %xmm6, %xmm5
movdqa %xmm5, %xmm11
pandn %xmm2, %xmm11
movdqa 0x20(%rsp), %xmm8
pand %xmm5, %xmm8
por %xmm11, %xmm8
movdqa %xmm5, %xmm11
pandn %xmm13, %xmm11
movdqa 0x60(%rsp), %xmm2
pand %xmm5, %xmm2
por %xmm2, %xmm11
cmpq $0x2, %r8
jb 0x3ab482
movdqa 0xa0(%rsp), %xmm0
movdqa %xmm0, %xmm13
pxor %xmm7, %xmm13
movdqa %xmm7, %xmm9
movdqa %xmm8, %xmm7
pxor %xmm9, %xmm7
movdqa %xmm7, %xmm6
pcmpgtd %xmm13, %xmm6
pshufd $0xa0, %xmm6, %xmm3     # xmm3 = xmm6[0,0,2,2]
pcmpeqd %xmm7, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pand %xmm3, %xmm13
pshufd $0xf5, %xmm6, %xmm3     # xmm3 = xmm6[1,1,3,3]
por %xmm13, %xmm3
pand %xmm3, %xmm0
pandn %xmm8, %xmm3
por %xmm3, %xmm0
movdqa %xmm0, 0xa0(%rsp)
movdqa 0x50(%rsp), %xmm0
movdqa %xmm0, %xmm3
pxor %xmm9, %xmm3
pcmpeqd %xmm9, %xmm9
movdqa %xmm3, %xmm6
pcmpgtd %xmm7, %xmm6
pshufd $0xa0, %xmm6, %xmm13    # xmm13 = xmm6[0,0,2,2]
pcmpeqd %xmm7, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
pand %xmm13, %xmm3
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm3, %xmm6
pand %xmm6, %xmm0
pandn %xmm8, %xmm6
por %xmm6, %xmm0
movdqa %xmm0, 0x50(%rsp)
pcmpeqd %xmm8, %xmm14
pshufd $0xb1, %xmm14, %xmm3    # xmm3 = xmm14[1,0,3,2]
pand %xmm14, %xmm3
movdqa %xmm8, %xmm6
pcmpeqd %xmm11, %xmm6
pshufd $0xb1, %xmm6, %xmm7     # xmm7 = xmm6[1,0,3,2]
pand %xmm6, %xmm7
movdqa 0x27ec73(%rip), %xmm6   # 0x62a120
psubq %xmm7, %xmm6
movdqa %xmm3, %xmm7
pandn %xmm6, %xmm7
pand 0x27d9ef(%rip), %xmm3   # 0x628eb0
pand %xmm1, %xmm4
por 0xc0(%rsp), %xmm4
pand 0x28045a(%rip), %xmm4   # 0x62b930
pand %xmm12, %xmm15
por 0xd0(%rsp), %xmm15
pand 0x280452(%rip), %xmm15  # 0x62b940
por %xmm4, %xmm15
por %xmm7, %xmm15
por %xmm3, %xmm15
pxor 0x28044a(%rip), %xmm15  # 0x62b950
movq %r13, %r11
movq 0x10(%r13), %rax
movq (%rax), %rax
cmpq %rsi, %r8
jae 0x3ab523
pextrw $0x4, %xmm15, %ebx
leaq (%rax,%rcx), %r13
movb %bl, (%r8,%r13)
cmpq %rbp, %rdx
setge %bl
testq %r8, %r8
sete %r13b
orb %bl, %r13b
movdqa 0x27e455(%rip), %xmm7   # 0x629990
movdqa 0x80(%rsp), %xmm6
jne 0x3ab554
movd %xmm15, %ebx
addq 0x48(%rsp), %rax
movb %bl, (%r8,%rax)
pandn %xmm10, %xmm5
por %xmm5, %xmm2
movdqa 0xb0(%rsp), %xmm1
pshufd $0xb1, %xmm1, %xmm0     # xmm0 = xmm1[1,0,3,2]
pand %xmm1, %xmm0
movq %xmm8, (%r15,%r8,8)
movq %xmm11, (%r12,%r8,8)
movq %xmm6, %rax
xorl %ebx, %ebx
cmpq %rdi, %rax
sete %bl
negq %rbx
pshufd $0xee, %xmm6, %xmm1     # xmm1 = xmm6[2,3,2,3]
movq %xmm1, %rax
xorl %r13d, %r13d
cmpq %rdi, %rax
sete %r13b
negq %r13
movq %rbx, %xmm1
movq %r13, %xmm3
punpcklqdq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0]
pand %xmm0, %xmm1
movdqa %xmm8, %xmm0
pand %xmm1, %xmm0
pandn 0x90(%rsp), %xmm1
movdqa %xmm1, %xmm3
por %xmm0, %xmm3
psubq %xmm9, %xmm6
incq %r8
cmpq %r8, 0x8(%rsp)
movq %r11, %r13
movdqa 0x70(%rsp), %xmm0
jne 0x3ab1d1
movdqa 0x140(%rsp), %xmm4
paddq 0x27d8f5(%rip), %xmm4   # 0x628ef0
movdqa 0x20(%rsp), %xmm0
psubq 0x130(%rsp), %xmm0
movdqa %xmm0, 0x20(%rsp)
movq 0xe8(%rsp), %rax
addq %rax, %rcx
addq %rax, 0x48(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, %rdx
cmpq %rbp, %rax
movq 0x1b0(%rsp), %rbx
movq 0xf0(%rsp), %r11
jl 0x3ab102
jmp 0x3ab656
movdqa 0x60(%rsp), %xmm0
movdqa %xmm0, %xmm3
movdqa %xmm0, 0x50(%rsp)
movb $0x1, %al
movq 0x30(%rsp), %rdx
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
movq %xmm0, %rcx
cmpq %rdx, %rcx
cmovgq %rcx, %rdx
pslldq $0x8, %xmm3             # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7]
testb $0x1, %al
movl $0x0, %eax
jne 0x3ab65d
movq 0x38(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x27e301(%rip), %xmm1   # 0x629990
movdqa 0xa0(%rsp), %xmm4
pxor %xmm1, %xmm4
pxor %xmm1, %xmm0
movdqa %xmm4, %xmm2
pcmpgtd %xmm0, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm4, %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
pcmpeqd %xmm0, %xmm0
pxor %xmm2, %xmm0
pshufd $0x44, 0x100(%rsp), %xmm2 # xmm2 = mem[0,1,0,1]
movdqa 0x50(%rsp), %xmm4
pxor %xmm1, %xmm4
pxor %xmm1, %xmm2
movdqa %xmm4, %xmm1
pcmpgtd %xmm2, %xmm1
pshufd $0xa0, %xmm1, %xmm3     # xmm3 = xmm1[0,0,2,2]
pcmpeqd %xmm4, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm3, %xmm2
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
por %xmm2, %xmm1
por %xmm0, %xmm1
pmovmskb %xmm1, %eax
testl %eax, %eax
movl 0x1c(%rsp), %eax
je 0x3ab727
orb $0x40, 0xc(%r13)
xorl %edx, %edx
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
movl %edx, (%r13)
movl 0x4(%rsp), %ecx
movl %ecx, 0x4(%r13)
movl %eax, 0x8(%r13)
movq %r12, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
cmpl $0x0, 0x30(%rbx)
jne 0x3ab793
movq 0x10(%rsp), %rdi
callq 0x20a60d
jmp 0x3ab793
callq 0x1bdae9
jmp 0x3ab790
callq 0x1bdac3
jmp 0x3ab790
callq 0x1bda9d
jmp 0x3ab790
callq 0x1bda77
jmp 0x3ab790
callq 0x1bda51
jmp 0x3ab790
callq 0x1bda2b
jmp 0x3ab790
callq 0x1bda05
xorl %r13d, %r13d
movq %r13, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq