// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_trace_scan_sse2_128_64.c
// Function: parasail_nw_trace_scan_profile_sse2_128_64
parasail_result_t* PNAME(
        const parasail_profile_t * const restrict profile,
        const char * const restrict s2, const int s2Len,
        const int open, const int gap)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 0;
    int32_t k = 0;
    int32_t s1Len = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict pvP = NULL;
    __m128i* restrict pvE = NULL;
    int64_t* restrict boundary = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    __m128i vZero;
    int64_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    parasail_result_t *result = NULL;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTDiag;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile64.score);
    PARASAIL_CHECK_NULL(profile->matrix);
    PARASAIL_CHECK_GT0(profile->s1Len);
    PARASAIL_CHECK_NULL(s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);

    /* initialize stack variables */
    i = 0;
    j = 0;
    k = 0;
    s1Len = profile->s1Len;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    matrix = profile->matrix;
    segWidth = 2; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    pvP = (__m128i*)profile->profile64.score;
    vGapO = _mm_set1_epi64x_rpl(open);
    vGapE = _mm_set1_epi64x_rpl(gap);
    NEG_LIMIT = (-open < matrix->min ? INT64_MIN + open : INT64_MIN - matrix->min) + 1;
    POS_LIMIT = INT64_MAX - matrix->max - 1;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInfFront = vZero;
    vTIns  = _mm_set1_epi64x_rpl(PARASAIL_INS);
    vTDel  = _mm_set1_epi64x_rpl(PARASAIL_DEL);
    vTDiag = _mm_set1_epi64x_rpl(PARASAIL_DIAG);
    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);
    vNegInfFront = _mm_insert_epi64_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_add_epi64(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi64x_rpl(-segLen*gap), 8));

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

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_2;

    /* initialize heap variables */
    pvE = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int64_t(16, s2Len+1);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!boundary) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvGapper) return NULL;

    /* initialize H and E */
    {
        int32_t index = 0;
        for (i=0; i<segLen; ++i) {
            int32_t segNum = 0;
            __m128i_64_t h;
            __m128i_64_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT64_MIN ? INT64_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT64_MIN ? INT64_MIN : tmp;
            }
            _mm_store_si128(&pvH[index], h.m);
            _mm_store_si128(&pvE[index], e.m);
            ++index;
        }
    }

    /* initialize uppder boundary */
    {
        boundary[0] = 0;
        for (i=1; i<=s2Len; ++i) {
            int64_t tmp = -open-gap*(i-1);
            boundary[i] = tmp < INT64_MIN ? INT64_MIN : tmp;
        }
    }

    {
        __m128i vGapper = _mm_sub_epi64(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_sub_epi64(vGapper, vGapE);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vE_ext;
        __m128i vE_opn;
        __m128i vHt;
        __m128i vF;
        __m128i vF_ext;
        __m128i vF_opn;
        __m128i vH;
        __m128i vHp;
        __m128i *pvW;
        __m128i vW;
        __m128i case1;
        __m128i case2;
        __m128i vGapper;
        __m128i vT;
        __m128i vET;
        __m128i vFT;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm_load_si128(pvH+(segLen-1));
        vHp = _mm_slli_si128(vHp, 8);
        vHp = _mm_insert_epi64_rpl(vHp, boundary[j], 0);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = _mm_sub_epi64(vNegLimit, pvGapper[0]);
        vF = vNegLimit;
        for (i=0; i<segLen; ++i) {
            vH = _mm_load_si128(pvH+i);
            vE = _mm_load_si128(pvE+i);
            vW = _mm_load_si128(pvW+i);
            vGapper = _mm_load_si128(pvGapper+i);
            vE_opn = _mm_sub_epi64(vH, vGapO);
            vE_ext = _mm_sub_epi64(vE, vGapE);
            case1 = _mm_cmpgt_epi64_rpl(vE_opn, vE_ext);
            vET = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, case1);
            arr_store(result->trace->trace_table, vET, i, segLen, j);
            vE = _mm_max_epi64_rpl(vE_opn, vE_ext);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vE);
            vGapper = _mm_add_epi64(vHt, vGapper);
            vF = _mm_max_epi64_rpl(vF, vGapper);
            vHp = _mm_add_epi64(vHp, vW);
            vHt = _mm_max_epi64_rpl(vE, vHp);
            _mm_store_si128(pvE+i, vE);
            _mm_store_si128(pvHt+i, vHt);
            _mm_store_si128(pvH+i, vHp);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 8);
        vHt = _mm_insert_epi64_rpl(vHt, boundary[j+1], 0);
        vGapper = _mm_load_si128(pvGapper);
        vGapper = _mm_add_epi64(vHt, vGapper);
        vF = _mm_max_epi64_rpl(vF, vGapper);
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 8);
            vFt = _mm_add_epi64(vFt, vSegLenXgap);
            vF = _mm_max_epi64_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 8);
        vF = _mm_add_epi64(vF, vNegInfFront);
        vH = _mm_max_epi64_rpl(vF, vHt);
        for (i=0; i<segLen; ++i) {
            vET = arr_load(result->trace->trace_table, i, segLen, j);
            vHp = _mm_load_si128(pvH+i);
            vHt = _mm_load_si128(pvHt+i);
            vF_opn = _mm_sub_epi64(vH, vGapO);
            vF_ext = _mm_sub_epi64(vF, vGapE);
            vF = _mm_max_epi64_rpl(vF_opn, vF_ext);
            case1 = _mm_cmpgt_epi64_rpl(vF_opn, vF_ext);
            vFT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, case1);
            vH = _mm_max_epi64_rpl(vHt, vF);
            case1 = _mm_cmpeq_epi64_rpl(vH, vHp);
            case2 = _mm_cmpeq_epi64_rpl(vH, vF);
            vT = _mm_blendv_epi8_rpl(
                    _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                    vTDiag, case1);
            vT = _mm_or_si128(vT, vET);
            vT = _mm_or_si128(vT, vFT);
            arr_store(result->trace->trace_table, vT, i, segLen, j);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vF);
            vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
        }
    }

    /* extract last value from the last column */
    {
        __m128i vH = _mm_load_si128(pvH + offset);
        for (k=0; k<position; ++k) {
            vH = _mm_slli_si128(vH, 8);
        }
        score = (int64_t) _mm_extract_epi64_rpl (vH, 1);
    }

    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(pvGapper);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(boundary);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x58(%rsp)
testq %rdi, %rdi
je 0x3a214e
movq 0x60(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x3a2155
movq 0x10(%rdi), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x3a215c
movl 0x8(%rdi), %r14d
testl %r14d, %r14d
jle 0x3a2163
cmpq $0x0, 0x58(%rsp)
je 0x3a216a
movl %edx, %ebp
testl %edx, %edx
jle 0x3a2171
movl %ecx, %r13d
testl %ecx, %ecx
js 0x3a2178
testl %r8d, %r8d
js 0x3a217f
movl %r8d, 0x20(%rsp)
leal -0x1(%r14), %eax
incq %r14
shrq %r14
movl %eax, 0x38(%rsp)
xorl %edx, %edx
divl %r14d
movl %eax, 0x3c(%rsp)
movl %edx, %ebx
movl %r13d, %ecx
negl %r13d
movq 0x50(%rsp), %rsi
movslq 0x20(%rsi), %rax
movq %rcx, 0x10(%rsp)
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
subq %rax, %r12
cmpl %r13d, %eax
cmovgq %rcx, %r12
movslq 0x1c(%rsi), %rax
movq %rax, 0x60(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r14d, %edi
movl %ebp, %esi
callq 0x20adf4
testq %rax, %rax
je 0x3a2184
movq %rax, %r15
movl %r13d, 0x30(%rsp)
movl %ebx, 0x34(%rsp)
orl $0x2880401, 0xc(%rax)   # imm = 0x2880401
movl $0x10, %edi
movq %r14, %rsi
callq 0x2f600c
movq %rax, %r13
movq %rbp, 0x8(%rsp)
leal 0x1(%rbp), %esi
movl $0x10, %edi
movq %rsi, 0x80(%rsp)
callq 0x20a636
movq %rax, 0x18(%rsp)
movl $0x10, %edi
movq %r14, %rsi
callq 0x2f600c
movq %rax, %rbp
movl $0x10, %edi
movq %r14, %rsi
callq 0x2f600c
movq %rax, %rbx
movl $0x10, %edi
movq %r14, (%rsp)
movq %r14, %rsi
callq 0x2f600c
movq 0x18(%rsp), %rdx
movq %r13, 0x48(%rsp)
movq %r13, %xmm0
movq %rdx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %rbp, %xmm1
movq %rbx, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
movdqa %xmm0, %xmm2
shufps $0xdd, %xmm1, %xmm2     # xmm2 = xmm2[1,3],xmm1[1,3]
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
andps %xmm2, %xmm0
movmskps %xmm0, %ecx
xorl %esi, %esi
testl %ecx, %ecx
jne 0x3a2186
testq %rax, %rax
je 0x3a2186
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
decl %eax
movl %eax, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movl 0x20(%rsp), %esi
movd %esi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movq %r12, 0x70(%rsp)
leaq 0x1(%r12), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x60(%rsp), %rax
addq $-0x2, %rax
movq %rcx, %xmm2
movdqa %xmm2, 0x90(%rsp)
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movdqa %xmm2, 0x60(%rsp)
movq %rax, 0x78(%rsp)
movq %rax, %xmm2
pshufd $0x44, %xmm2, %xmm4     # xmm4 = xmm2[0,1,0,1]
movl %esi, %ecx
movslq 0x30(%rsp), %r12
movq (%rsp), %rax
movq %rax, %rsi
imulq %rcx, %rsi
negq %rsi
movq %rsi, %r8
subq %rdi, %r8
negq %rdi
shlq $0x4, %rax
xorl %r9d, %r9d
movq %r12, %r10
movq 0x48(%rsp), %r14
leaq (%rdi,%r10), %r11
leaq (%rsi,%r10), %r13
movq %r13, %xmm2
movq %r10, %xmm3
punpcklqdq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0]
leaq (%r8,%r10), %r13
movq %r13, %xmm2
movq %r11, %xmm5
punpcklqdq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0]
movdqa %xmm3, (%rbx,%r9)
movdqa %xmm5, (%r14,%r9)
subq %rcx, %r10
addq $0x10, %r9
cmpq %r9, %rax
jne 0x3a1abc
movq $0x0, (%rdx)
movl 0x8(%rsp), %esi
movq 0x80(%rsp), %r11
andl $-0x2, %r11d
movq %rsi, 0x10(%rsp)
decq %rsi
movq %rsi, %xmm2
pshufd $0x44, %xmm2, %xmm2     # xmm2 = xmm2[0,1,0,1]
movq %rcx, %rsi
negq %rsi
addq %rcx, %rcx
xorl %r8d, %r8d
movdqa 0x287357(%rip), %xmm3   # 0x628e90
movdqa 0x28735f(%rip), %xmm5   # 0x628ea0
pxor %xmm5, %xmm2
pcmpeqd %xmm6, %xmm6
movq 0x40(%rsp), %rdi
movq (%rsp), %r10
movq %r8, %xmm7
pshufd $0x44, %xmm7, %xmm7     # xmm7 = xmm7[0,1,0,1]
por %xmm3, %xmm7
pxor %xmm5, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm2, %xmm8
pcmpeqd %xmm2, %xmm7
pshufd $0xf5, %xmm7, %xmm9     # xmm9 = xmm7[1,1,3,3]
pand %xmm8, %xmm9
pshufd $0xf5, %xmm8, %xmm7     # xmm7 = xmm8[1,1,3,3]
por %xmm9, %xmm7
movd %xmm7, %r9d
notl %r9d
testb $0x1, %r9b
je 0x3a1b9b
movq %r12, 0x8(%rdx,%r8,8)
pxor %xmm6, %xmm7
pextrw $0x4, %xmm7, %r9d
testb $0x1, %r9b
je 0x3a1bb4
leaq (%rsi,%r12), %r9
movq %r9, 0x10(%rdx,%r8,8)
addq $0x2, %r8
subq %rcx, %r12
cmpq %r8, %r11
jne 0x3a1b52
pxor %xmm2, %xmm2
psubq %xmm0, %xmm2
leal -0x1(%r10), %ecx
shlq $0x4, %rcx
movq %rdi, %rsi
addq %rcx, %rsi
movl %r10d, %r8d
movdqa %xmm2, (%rsi)
psubq %xmm1, %xmm2
addq $-0x10, %rsi
decl %r8d
jg 0x3a1bd9
movq %rbx, %rsi
addq %rcx, %rsi
movq %rsi, 0x8(%rsp)
xorl %r8d, %r8d
movslq %r10d, %rcx
movq %rcx, (%rsp)
movdqa 0x287d89(%rip), %xmm5   # 0x629990
xorl %r10d, %r10d
movdqa 0x60(%rsp), %xmm12
movq (%rdx,%r10,8), %xmm13
movq 0x8(%rsp), %rcx
punpcklqdq (%rcx), %xmm13  # xmm13 = xmm13[0],mem[0]
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x58(%rsp), %rsi
movzbl (%rsi,%r10), %esi
movslq (%rcx,%rsi,4), %rcx
imulq (%rsp), %rcx
shlq $0x4, %rcx
addq 0x88(%rsp), %rcx
movdqa 0x60(%rsp), %xmm14
movdqa %xmm14, %xmm3
psubq (%rdi), %xmm3
xorl %r11d, %r11d
movdqa 0x28727b(%rip), %xmm11  # 0x628ee0
movdqa (%rbx,%r11), %xmm8
movdqa (%r14,%r11), %xmm7
movdqa %xmm8, %xmm6
psubq %xmm0, %xmm6
psubq %xmm1, %xmm7
movdqa %xmm7, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm6, %xmm15
pxor %xmm5, %xmm15
movdqa %xmm15, %xmm9
pcmpgtd %xmm2, %xmm9
pshufd $0xa0, %xmm9, %xmm10    # xmm10 = xmm9[0,0,2,2]
pcmpeqd %xmm2, %xmm15
pshufd $0xf5, %xmm15, %xmm15   # xmm15 = xmm15[1,1,3,3]
pand %xmm10, %xmm15
pshufd $0xf5, %xmm9, %xmm2     # xmm2 = xmm9[1,1,3,3]
por %xmm15, %xmm2
movdqa %xmm2, %xmm9
pandn 0x2899f7(%rip), %xmm9   # 0x62b6c0
movdqa %xmm2, %xmm10
pand %xmm11, %xmm10
por %xmm9, %xmm10
movq 0x10(%r15), %rsi
movq (%rsi), %rsi
addq %r8, %rsi
paddq (%rdi,%r11), %xmm3
paddq (%rcx,%r11), %xmm13
movdqa %xmm10, (%r11,%rsi)
movdqa %xmm3, %xmm9
pxor %xmm5, %xmm9
movdqa %xmm14, %xmm10
pxor %xmm5, %xmm10
movdqa %xmm10, %xmm15
pcmpgtd %xmm9, %xmm15
pcmpeqd %xmm9, %xmm10
pshufd $0xa0, %xmm15, %xmm9    # xmm9 = xmm15[0,0,2,2]
pshufd $0xf5, %xmm10, %xmm10   # xmm10 = xmm10[1,1,3,3]
pand %xmm9, %xmm10
pshufd $0xf5, %xmm15, %xmm9    # xmm9 = xmm15[1,1,3,3]
por %xmm10, %xmm9
movdqa %xmm14, %xmm10
pand %xmm9, %xmm10
pandn %xmm3, %xmm9
movdqa %xmm9, %xmm14
por %xmm10, %xmm14
pand %xmm2, %xmm6
pandn %xmm7, %xmm2
por %xmm6, %xmm2
movdqa %xmm4, %xmm3
pxor %xmm5, %xmm3
movdqa %xmm2, %xmm6
pxor %xmm5, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm3, %xmm7
pshufd $0xa0, %xmm7, %xmm9     # xmm9 = xmm7[0,0,2,2]
pcmpeqd %xmm6, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
pand %xmm9, %xmm3
movdqa %xmm4, %xmm9
pshufd $0xf5, %xmm7, %xmm4     # xmm4 = xmm7[1,1,3,3]
por %xmm3, %xmm4
pand %xmm4, %xmm9
pandn %xmm2, %xmm4
por %xmm9, %xmm4
movdqa %xmm13, %xmm3
pxor %xmm5, %xmm3
movdqa %xmm6, %xmm7
pcmpgtd %xmm3, %xmm7
pcmpeqd %xmm6, %xmm3
pshufd $0xa0, %xmm7, %xmm6     # xmm6 = xmm7[0,0,2,2]
pshufd $0xf5, %xmm3, %xmm9     # xmm9 = xmm3[1,1,3,3]
pand %xmm6, %xmm9
pshufd $0xf5, %xmm7, %xmm3     # xmm3 = xmm7[1,1,3,3]
por %xmm9, %xmm3
movdqa %xmm2, (%r14,%r11)
pand %xmm3, %xmm2
pandn %xmm13, %xmm3
por %xmm2, %xmm3
movdqa %xmm3, (%rbp,%r11)
movdqa %xmm13, (%rbx,%r11)
addq $0x10, %r11
movdqa %xmm8, %xmm13
cmpq %r11, %rax
jne 0x3a1c65
movq 0x8(%rdx,%r10,8), %rcx
incq %r10
movq %r10, 0x20(%rsp)
movq %rcx, %xmm2
addq (%rdi), %rcx
movq %xmm14, %rsi
cmpq %rcx, %rsi
cmovgq %rsi, %rcx
movq %rcx, %xmm13
pslldq $0x8, %xmm13            # xmm13 = zero,zero,zero,zero,zero,zero,zero,zero,xmm13[0,1,2,3,4,5,6,7]
paddq 0x90(%rsp), %xmm13
punpcklqdq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0]
movdqa %xmm13, %xmm3
pxor %xmm5, %xmm3
movdqa %xmm2, %xmm6
pxor %xmm5, %xmm6
movdqa %xmm3, %xmm7
pcmpgtd %xmm6, %xmm7
pshufd $0xa0, %xmm7, %xmm8     # xmm8 = xmm7[0,0,2,2]
pcmpeqd %xmm3, %xmm6
pshufd $0xf5, %xmm6, %xmm3     # xmm3 = xmm6[1,1,3,3]
pand %xmm8, %xmm3
pshufd $0xf5, %xmm7, %xmm14    # xmm14 = xmm7[1,1,3,3]
por %xmm3, %xmm14
movdqa %xmm13, %xmm3
pand %xmm14, %xmm3
pandn %xmm2, %xmm14
por %xmm3, %xmm14
xorl %ecx, %ecx
movdqa 0x28983e(%rip), %xmm8   # 0x62b6d0
movdqa 0x289845(%rip), %xmm9   # 0x62b6e0
movdqa 0x28827c(%rip), %xmm10  # 0x62a120
movdqa 0x287003(%rip), %xmm11  # 0x628eb0
movq 0x10(%r15), %rsi
movq (%rsi), %r12
addq %r8, %r12
psubq %xmm0, %xmm14
psubq %xmm1, %xmm13
movdqa %xmm13, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm14, %xmm3
pxor %xmm5, %xmm3
movdqa %xmm3, %xmm6
pcmpgtd %xmm2, %xmm6
pshufd $0xa0, %xmm6, %xmm7     # xmm7 = xmm6[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
pand %xmm7, %xmm3
pshufd $0xf5, %xmm6, %xmm2     # xmm2 = xmm6[1,1,3,3]
por %xmm3, %xmm2
movdqa %xmm2, %xmm3
pandn %xmm13, %xmm3
pand %xmm2, %xmm14
movdqa %xmm14, %xmm13
por %xmm3, %xmm13
movdqa %xmm2, %xmm3
pandn %xmm8, %xmm3
pand %xmm9, %xmm2
por %xmm3, %xmm2
movq %xmm13, %rsi
movq (%rbp,%rcx), %r10
movq 0x8(%rbp,%rcx), %r9
cmpq %rsi, %r10
movq %rsi, %r13
cmovgq %r10, %r13
pshufd $0xee, %xmm13, %xmm3    # xmm3 = xmm13[2,3,2,3]
movq %xmm3, %rdi
cmpq %rdi, %r9
movq %rdi, %r11
cmovgq %r9, %r11
movq %r13, %xmm14
movq %r11, %xmm3
xorl %r14d, %r14d
cmpq (%rbx,%rcx), %r13
sete %r14b
negq %r14
movq %r15, %rdx
xorl %r15d, %r15d
cmpq 0x8(%rbx,%rcx), %r11
punpcklqdq %xmm3, %xmm14   # xmm14 = xmm14[0],xmm3[0]
sete %r15b
negq %r15
movq %r14, %xmm3
movq %r15, %xmm6
movq %rdx, %r15
punpcklqdq %xmm6, %xmm3    # xmm3 = xmm3[0],xmm6[0]
xorl %r14d, %r14d
cmpq %r10, %rsi
setge %r14b
negq %r14
xorl %r10d, %r10d
cmpq %r9, %rdi
setge %r10b
negq %r10
movq %r14, %xmm6
movq %r10, %xmm7
punpcklqdq %xmm7, %xmm6    # xmm6 = xmm6[0],xmm7[0]
psrlq $0x3e, %xmm6
pxor %xmm10, %xmm6
movdqa %xmm3, %xmm7
pandn %xmm6, %xmm7
pand %xmm11, %xmm3
por (%rcx,%r12), %xmm2
por %xmm7, %xmm2
por %xmm3, %xmm2
movdqa %xmm2, (%rcx,%r12)
movq %xmm4, %r9
cmpq %r13, %r9
cmovgeq %r13, %r9
pshufd $0xee, %xmm4, %xmm2     # xmm2 = xmm4[2,3,2,3]
movq %xmm2, %r12
cmpq %r11, %r12
cmovgeq %r11, %r12
movdqa %xmm14, (%rbx,%rcx)
cmpq %rsi, %r9
cmovgeq %rsi, %r9
cmpq %rdi, %r12
cmovgeq %rdi, %r12
movq %r9, %xmm4
movq %r12, %xmm2
punpcklqdq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0]
movq %xmm12, %rsi
cmpq %r13, %rsi
cmovgq %rsi, %r13
pshufd $0xee, %xmm12, %xmm2    # xmm2 = xmm12[2,3,2,3]
movq %xmm2, %rsi
cmpq %r11, %rsi
cmovgq %rsi, %r11
movq %r13, %xmm12
movq %r11, %xmm2
punpcklqdq %xmm2, %xmm12   # xmm12 = xmm12[0],xmm2[0]
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x3a1ead
addq %rax, %r8
movq 0x20(%rsp), %r10
cmpq 0x10(%rsp), %r10
movq 0x48(%rsp), %r14
movq 0x18(%rsp), %rdx
movq 0x40(%rsp), %rdi
jne 0x3a1c11
movl 0x34(%rsp), %ecx
shlq $0x4, %rcx
movdqa (%rbx,%rcx), %xmm0
movl 0x3c(%rsp), %eax
testl %eax, %eax
jg 0x3a209a
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
testl %eax, %eax
js 0x3a2091
xorl %ecx, %ecx
movq 0x70(%rsp), %rax
cmpq %rax, %r9
setle %cl
negq %rcx
xorl %edx, %edx
cmpq %rax, %r12
setle %dl
negq %rdx
movq %rdx, %xmm1
movq %rcx, %xmm2
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
xorl %ecx, %ecx
movq 0x78(%rsp), %rax
cmpq %rax, %r13
setg %cl
negq %rcx
xorl %edx, %edx
cmpq %rax, %r11
setg %dl
negq %rdx
movq %rdx, %xmm1
movq %rcx, %xmm3
punpcklqdq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0]
por %xmm2, %xmm3
pmovmskb %xmm3, %ecx
testl %ecx, %ecx
je 0x3a2105
orb $0x40, 0xc(%r15)
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
jmp 0x3a2117
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rcx
movl 0x38(%rsp), %edx
movl 0x2c(%rsp), %eax
movl %ecx, (%r15)
movl %edx, 0x4(%r15)
movl %eax, 0x8(%r15)
callq 0x20a60d
movq %rbx, %rdi
callq 0x20a60d
movq %rbp, %rdi
callq 0x20a60d
movq 0x18(%rsp), %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq %r15, %rsi
jmp 0x3a2186
callq 0x1bc161
jmp 0x3a2184
callq 0x1bc13b
jmp 0x3a2184
callq 0x1bc115
jmp 0x3a2184
callq 0x1bc0ef
jmp 0x3a2184
callq 0x1bc0c9
jmp 0x3a2184
callq 0x1bc0a3
jmp 0x3a2184
callq 0x1bc07d
jmp 0x3a2184
callq 0x1bc057
xorl %esi, %esi
movq %rsi, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop