// File: /workspace/github_c_makefile_star2_O1/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 $0x188, %rsp            # imm = 0x188
testq %rdx, %rdx
je 0x38d7f7
movl %ecx, %r12d
testl %ecx, %ecx
jle 0x38d7fe
testl %r8d, %r8d
js 0x38d805
testl %r9d, %r9d
js 0x38d80c
movq %rdx, %rbp
movq 0x1c0(%rsp), %rdx
testq %rdx, %rdx
je 0x38d813
movl 0x30(%rdx), %eax
testl %eax, %eax
jne 0x38cde7
testq %rdi, %rdi
je 0x38d81a
testl %esi, %esi
jle 0x38d821
testl %eax, %eax
je 0x38cdea
movl 0x34(%rdx), %esi
movq %rdi, 0x48(%rsp)
movq %r9, 0x28(%rsp)
movslq 0x20(%rdx), %rax
movl %r8d, %ebx
negl %r8d
movq %rbx, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
subq %rax, %r13
movl %r8d, 0x50(%rsp)
cmpl %r8d, %eax
cmovgq %rcx, %r13
movslq 0x1c(%rdx), %r14
movl $0x10, %edx
movl $0x1, %ecx
movq %rsi, 0x10(%rsp)
movl %esi, %edi
movl %r12d, %esi
callq 0x2097d1
testq %rax, %rax
je 0x38d826
movq %rax, %r15
movq %r13, 0x60(%rsp)
orl $0x2881001, 0xc(%rax)   # imm = 0x2881001
movq %r12, 0x20(%rsp)
addl $0x2, %r12d
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movq %rax, %r13
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094de
movl $0x10, %edi
movq %r12, %rsi
movq %rax, %r12
callq 0x2094de
movq %r13, %r8
movq %rax, %r13
testq %r8, %r8
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
testq %r13, %r13
sete %al
orb %cl, %al
jne 0x38d826
movq 0x10(%rsp), %r9
movslq %r9d, %rax
movq %rax, 0x30(%rsp)
movq 0x1c0(%rsp), %rax
cmpl $0x0, 0x30(%rax)
movq %r8, 0x38(%rsp)
je 0x38cedc
movq $0x0, 0x18(%rsp)
movq 0x28(%rsp), %r11
jmp 0x38cf4a
leal 0x1(%r9), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x2094de
testq %rax, %rax
je 0x38d826
movq %rax, %rdi
movq 0x10(%rsp), %r9
testl %r9d, %r9d
movq 0x28(%rsp), %r11
movq 0x48(%rsp), %r8
jle 0x38cf33
movq 0x1c0(%rsp), %rax
movq 0x10(%rax), %rax
movl %r9d, %ecx
xorl %edx, %edx
movzbl (%r8,%rdx), %esi
movslq (%rax,%rsi,4), %rsi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x38cf1e
movq %rdi, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq $0x0, (%rdi,%rax,8)
movq 0x38(%rsp), %r8
leal -0x1(%r9), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rsi
leal -0x1(%rsi), %eax
movl %eax, 0x5c(%rsp)
movq 0x60(%rsp), %rax
leaq 0x1(%rax), %r9
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq %r14, %rax
addq $-0x2, %rax
movq %r9, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x80(%rsp)
movq %rax, 0xa8(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movq %rbx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, 0x160(%rsp)
movd %r11d, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, 0x150(%rsp)
leal (%r11,%r11), %eax
movd %eax, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, 0x130(%rsp)
decq 0x30(%rsp)
movl %esi, %r10d
leaq -0x1(%r10), %rax
movq %rax, 0x78(%rsp)
movl 0x50(%rsp), %r14d
movslq %r14d, %rax
movl %r14d, %ecx
subl %r11d, %ecx
movslq %ecx, %rcx
movq %rcx, %xmm2
movq %rax, %xmm1
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
movdqa %xmm2, 0x90(%rsp)
movq 0x1c0(%rsp), %rbx
movq 0x10(%rbx), %rdx
cmpl $0x2, %esi
movl $0x1, %ecx
cmovgel %esi, %ecx
xorl %esi, %esi
movzbl (%rbp,%rsi), %edi
movslq (%rdx,%rdi,4), %rdi
movq %rdi, 0x8(%r8,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x38d02b
xorl %edx, %edx
movq %rdx, (%r8)
movq %rdx, 0x8(%r8,%r10,8)
movl %r11d, %r11d
movq %rax, 0x8(%r12,%rdx,8)
movq %r9, 0x8(%r13,%rdx,8)
incq %rdx
subq %r11, %rax
cmpq %rdx, %rcx
jne 0x38d04e
movq %r9, (%r12)
movq %r9, (%r13)
movq %r9, 0x8(%r12,%r10,8)
movq %r9, 0x8(%r13,%r10,8)
movq $0x0, (%r12)
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
jle 0x38d6f8
movdqa 0x80(%rsp), %xmm8
movdqa %xmm8, %xmm1
psrldq $0x8, %xmm1             # xmm1 = xmm1[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm1, 0x120(%rsp)
movq 0x20(%rsp), %rax
incl %eax
movq %rax, 0x20(%rsp)
movl %ecx, %eax
movq %rax, 0x40(%rsp)
movslq %r14d, %rax
movq %rax, 0xb8(%rsp)
leaq (%r10,%r10), %rax
movq %rax, 0xb0(%rsp)
movd 0x268a67(%rip), %xmm3   # 0x5f5b40
movq $0x0, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
xorl %eax, %eax
movdqa %xmm8, %xmm6
movq %r9, 0xc8(%rsp)
movq %r12, 0xe8(%rsp)
movq %r13, 0xe0(%rsp)
movq %r10, 0xd8(%rsp)
movq %r11, 0xc0(%rsp)
movl 0x30(%rbx), %edx
movq %rax, %rcx
testl %edx, %edx
jne 0x38d12e
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %rcx
movq %rax, %r9
orq $0x1, %r9
testl %edx, %edx
je 0x38d14b
cmpq 0x40(%rsp), %r9
movl 0xc(%rsp), %edx
cmovbl %r9d, %edx
movslq %edx, %rdx
jmp 0x38d154
movq 0x18(%rsp), %rdx
movq (%rdx,%r9,8), %rdx
movq 0x8(%rbx), %rsi
movslq 0x18(%rbx), %rdi
imulq %rdi, %rcx
leaq (%rsi,%rcx,4), %rcx
movq %rcx, 0xf8(%rsp)
imulq %rdi, %rdx
leaq (%rsi,%rdx,4), %rcx
movq %rcx, 0xf0(%rsp)
leaq 0x2(%rax), %rcx
movq %rcx, 0xd0(%rsp)
imulq %r11, %rcx
movq 0xb8(%rsp), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
movq (%r12), %xmm1
movq %rdx, (%r12)
imulq %r11, %rax
movq %rsi, %rcx
subq %rax, %rcx
movq %rcx, %xmm7
movdqa 0x120(%rsp), %xmm2
movdqa %xmm2, %xmm13
punpcklqdq %xmm7, %xmm13   # xmm13 = xmm13[0],xmm7[0]
movdqa %xmm2, %xmm7
punpcklqdq %xmm1, %xmm7    # xmm7 = xmm7[0],xmm1[0]
movq %xmm3, %rax
xorl %ecx, %ecx
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
sete %cl
negq %rcx
movdqa %xmm3, 0x140(%rsp)
pshufd $0xee, %xmm3, %xmm1     # xmm1 = xmm3[2,3,2,3]
movq %xmm1, %rax
xorl %edx, %edx
cmpq %rsi, %rax
sete %dl
negq %rdx
movq %rcx, %xmm2
movq %rdx, %xmm1
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
movdqa %xmm2, 0x170(%rsp)
xorl %r11d, %r11d
movq 0x268924(%rip), %xmm11  # 0x5f5b48
movdqa 0x80(%rsp), %xmm12
movdqa %xmm12, %xmm1
movq %r9, 0x100(%rsp)
movdqa %xmm7, %xmm10
pshufd $0xee, %xmm13, %xmm7    # xmm7 = xmm13[2,3,2,3]
movq 0x8(%r12,%r11,8), %xmm15
punpcklqdq %xmm15, %xmm7   # xmm7 = xmm7[0],xmm15[0]
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq 0x8(%r13,%r11,8), %xmm15
punpcklqdq %xmm15, %xmm1   # xmm1 = xmm1[0],xmm15[0]
movdqa %xmm7, %xmm15
movdqa 0x160(%rsp), %xmm2
psubq %xmm2, %xmm15
movdqa 0x150(%rsp), %xmm3
psubq %xmm3, %xmm1
movq %xmm15, %rax
movq %xmm1, %r10
cmpq %r10, %rax
movq %r10, 0x110(%rsp)
movq %rax, 0x48(%rsp)
cmovgq %rax, %r10
pshufd $0xee, %xmm15, %xmm15   # xmm15 = xmm15[2,3,2,3]
movq %xmm15, %rax
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %r9
cmpq %r9, %rax
movq %r9, 0x118(%rsp)
movq %rax, 0x50(%rsp)
cmovgq %rax, %r9
psubq %xmm2, %xmm13
psubq %xmm3, %xmm12
movq %xmm13, %rdx
movq %xmm12, %r12
cmpq %r12, %rdx
movq %r12, %rax
cmovgq %rdx, %rax
pshufd $0xee, %xmm13, %xmm1    # xmm1 = xmm13[2,3,2,3]
movq %xmm1, %rcx
pshufd $0xee, %xmm12, %xmm1    # xmm1 = xmm12[2,3,2,3]
movq %xmm1, %rsi
cmpq %rsi, %rcx
movq %rsi, %r14
movq %rcx, 0x108(%rsp)
cmovgq %rcx, %r14
movq (%r8,%r11,8), %rcx
movq 0x8(%r8,%r11,8), %r13
movq 0xf8(%rsp), %rdi
movslq (%rdi,%r13,4), %r13
movq 0xf0(%rsp), %rdi
movslq (%rdi,%rcx,4), %rcx
movq %r13, %xmm1
movq %rcx, %xmm12
punpcklqdq %xmm1, %xmm12   # xmm12 = xmm12[0],xmm1[0]
paddq %xmm10, %xmm12
movq %xmm12, %r13
cmpq %rax, %r13
movq %rax, %rcx
cmovgq %r13, %rcx
pshufd $0xee, %xmm12, %xmm1    # xmm1 = xmm12[2,3,2,3]
movq %xmm1, %rbp
cmpq %r14, %rbp
movq %r14, %rbx
cmovgq %rbp, %rbx
cmpq %r10, %rcx
cmovleq %r10, %rcx
movq %rcx, %xmm1
cmpq %r9, %rbx
cmovleq %r9, %rbx
movq %rbx, %xmm10
movq %xmm11, %rdi
xorl %ecx, %ecx
movq %rdi, 0x10(%rsp)
cmpq $-0x1, %rdi
sete %cl
negq %rcx
movq %rcx, %xmm12
pshufd $0xee, %xmm11, %xmm13   # xmm13 = xmm11[2,3,2,3]
movq %xmm13, %rdi
xorl %ecx, %ecx
movq %rdi, 0x28(%rsp)
cmpq $-0x1, %rdi
sete %cl
negq %rcx
movq %rcx, %xmm13
punpcklqdq %xmm10, %xmm1   # xmm1 = xmm1[0],xmm10[0]
punpcklqdq %xmm13, %xmm12  # xmm12 = xmm12[0],xmm13[0]
movdqa %xmm12, %xmm10
pandn %xmm1, %xmm10
movdqa %xmm12, %xmm13
pand 0x90(%rsp), %xmm13
por %xmm10, %xmm13
pshufd $0xee, %xmm13, %xmm10   # xmm10 = xmm13[2,3,2,3]
movq %xmm13, %rcx
cmpq $0x2, %r11
jb 0x38d45c
movq %xmm0, %rbx
cmpq %rcx, %rbx
cmovgeq %rcx, %rbx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rdi
movq %r15, %r8
movq %xmm10, %r15
cmpq %r15, %rdi
cmovgeq %r15, %rdi
movq %rbx, %xmm0
movq %rdi, %xmm1
movq %xmm6, %rdi
cmpq %rcx, %rdi
cmovleq %rcx, %rdi
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
movq %xmm6, %rbx
cmpq %r15, %rbx
cmovgq %rbx, %r15
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %rdi, %xmm6
movq %r15, %xmm1
movq %r8, %r15
movq 0x38(%rsp), %r8
punpcklqdq %xmm1, %xmm6    # xmm6 = xmm6[0],xmm1[0]
movq %r10, %xmm15
movq %r9, %xmm1
punpcklqdq %xmm1, %xmm15   # xmm15 = xmm15[0],xmm1[0]
movdqa %xmm12, %xmm1
pandn %xmm15, %xmm1
movdqa %xmm12, %xmm15
pand 0x80(%rsp), %xmm15
por %xmm15, %xmm1
xorl %r9d, %r9d
cmpq %r13, %rcx
sete %r9b
negq %r9
movq %xmm10, %rdi
xorl %r10d, %r10d
cmpq %rbp, %rdi
sete %r10b
negq %r10
movq %xmm1, %rbx
xorl %r13d, %r13d
cmpq %rbx, %rcx
sete %r13b
negq %r13
pshufd $0xee, %xmm1, %xmm10    # xmm10 = xmm1[2,3,2,3]
movq %xmm10, %rbx
xorl %ecx, %ecx
cmpq %rbx, %rdi
sete %cl
negq %rcx
xorl %ebp, %ebp
cmpq %r12, %rdx
setg %bpl
negq %rbp
xorl %edi, %edi
cmpq %rsi, 0x108(%rsp)
setg %dil
negq %rdi
xorl %edx, %edx
movq 0x110(%rsp), %rsi
cmpq %rsi, 0x48(%rsp)
setg %dl
negq %rdx
xorl %esi, %esi
movq 0x118(%rsp), %rbx
cmpq %rbx, 0x50(%rsp)
movq %r9, %xmm4
movq %r10, %xmm10
movq %r13, %xmm14
movq %rcx, %xmm5
movq %rdi, %xmm9
movq %rbp, %xmm2
setg %sil
negq %rsi
movq %rsi, %xmm3
punpcklqdq %xmm10, %xmm4   # xmm4 = xmm4[0],xmm10[0]
punpcklqdq %xmm5, %xmm14   # xmm14 = xmm14[0],xmm5[0]
pand 0x269f42(%rip), %xmm14  # 0x5f7490
pxor 0x268979(%rip), %xmm14  # 0x5f5ed0
movdqa %xmm4, %xmm5
pandn %xmm14, %xmm5
pand 0x269f38(%rip), %xmm4   # 0x5f74a0
punpcklqdq %xmm9, %xmm2    # xmm2 = xmm2[0],xmm9[0]
pand 0x269edb(%rip), %xmm2   # 0x5f7450
movq %rdx, %xmm10
punpcklqdq %xmm3, %xmm10   # xmm10 = xmm10[0],xmm3[0]
pand 0x269ee8(%rip), %xmm10  # 0x5f7470
por %xmm2, %xmm10
por %xmm4, %xmm10
por %xmm5, %xmm10
pxor 0x26a150(%rip), %xmm10  # 0x5f76f0
movq 0x10(%r15), %rcx
movq (%rcx), %rcx
movq 0xd8(%rsp), %r10
cmpq %r10, %r11
jae 0x38d5c6
pextrw $0x4, %xmm10, %edx
movq 0x70(%rsp), %rsi
addq %rcx, %rsi
movb %dl, (%r11,%rsi)
movq 0x100(%rsp), %r9
cmpq 0x40(%rsp), %r9
setae %dl
testq %r11, %r11
sete %sil
orb %dl, %sil
movq 0xe8(%rsp), %r12
movq 0xe0(%rsp), %r13
jne 0x38d600
movd %xmm10, %edx
addq 0x68(%rsp), %rcx
movb %dl, (%r11,%rcx)
movq %rax, %xmm2
movq %r14, %xmm3
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
pandn %xmm2, %xmm12
por %xmm15, %xmm12
movq %xmm13, (%r12,%r11,8)
movq %xmm1, (%r13,%r11,8)
xorl %eax, %eax
movq 0x78(%rsp), %rdx
cmpq %rdx, 0x10(%rsp)
sete %al
negq %rax
xorl %ecx, %ecx
cmpq %rdx, 0x28(%rsp)
sete %cl
negq %rcx
movq %rcx, %xmm2
movq %rax, %xmm3
punpcklqdq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0]
pand 0x170(%rsp), %xmm3
movdqa %xmm13, %xmm2
pand %xmm3, %xmm2
pandn %xmm8, %xmm3
movdqa %xmm3, %xmm8
por %xmm2, %xmm8
psubq 0x268584(%rip), %xmm11  # 0x5f5c00
incq %r11
cmpq %r11, 0x20(%rsp)
jne 0x38d23b
movdqa 0x140(%rsp), %xmm3
paddq 0x268495(%rip), %xmm3   # 0x5f5b30
movdqa 0x90(%rsp), %xmm1
psubq 0x130(%rsp), %xmm1
movdqa %xmm1, 0x90(%rsp)
movq 0xb0(%rsp), %rax
addq %rax, 0x70(%rsp)
addq %rax, 0x68(%rsp)
movq 0xd0(%rsp), %rcx
movq %rcx, %rax
cmpq 0x40(%rsp), %rcx
movq 0x1c0(%rsp), %rbx
movq 0xc8(%rsp), %r9
movq 0xc0(%rsp), %r11
jb 0x38d11b
jmp 0x38d706
movdqa 0x80(%rsp), %xmm6
movdqa %xmm6, %xmm8
movl $0x1, %eax
pshufd $0xee, %xmm8, %xmm1     # xmm1 = xmm8[2,3,2,3]
movq %xmm1, %rcx
cmpq %r9, %rcx
cmovgq %rcx, %r9
pslldq $0x8, %xmm8             # xmm8 = zero,zero,zero,zero,zero,zero,zero,zero,xmm8[0,1,2,3,4,5,6,7]
decl %eax
je 0x38d70b
movq %xmm0, %rax
xorl %ecx, %ecx
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
setle %cl
negq %rcx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rax
xorl %edx, %edx
cmpq %rsi, %rax
setle %dl
negq %rdx
movq %rcx, %xmm0
movq %rdx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %xmm6, %rax
xorl %ecx, %ecx
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
setg %cl
negq %rcx
pshufd $0xee, %xmm6, %xmm1     # xmm1 = xmm6[2,3,2,3]
movq %xmm1, %rax
xorl %edx, %edx
cmpq %rsi, %rax
setg %dl
negq %rdx
movq %rcx, %xmm1
movq %rdx, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
por %xmm0, %xmm1
pmovmskb %xmm1, %eax
testl %eax, %eax
movl 0x5c(%rsp), %eax
je 0x38d7bc
orb $0x40, 0xc(%r15)
xorl %r9d, %r9d
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
movl %r9d, (%r15)
movl 0xc(%rsp), %ecx
movl %ecx, 0x4(%r15)
movl %eax, 0x8(%r15)
movq %r13, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq 0x38(%rsp), %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%rbx)
jne 0x38d829
movq 0x18(%rsp), %rdi
callq 0x2094b5
jmp 0x38d829
callq 0x1bdaf5
jmp 0x38d826
callq 0x1bdacf
jmp 0x38d826
callq 0x1bdaa9
jmp 0x38d826
callq 0x1bda83
jmp 0x38d826
callq 0x1bda5d
jmp 0x38d826
callq 0x1bda37
jmp 0x38d826
callq 0x1bda11
xorl %r15d, %r15d
movq %r15, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop