// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/sw_trace_striped_sse2_128_64.c
// Function: parasail_sw_trace_striped_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 end_query = 0;
    int32_t end_ref = 0;
    int32_t s1Len = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
    __m128i* restrict vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvE = NULL;
    __m128i* restrict pvEaStore = NULL;
    __m128i* restrict pvEaLoad = NULL;
    __m128i* restrict pvHT = NULL;
    __m128i* restrict pvHMax = NULL;
    __m128i vGapO;
    __m128i vGapE;
    __m128i vZero;
    int64_t score = 0;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    int64_t maxp = 0;
    parasail_result_t *result = NULL;
    __m128i vTZero;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTDiag;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;
    __m128i vTMask;
    __m128i vFTMask;

    /* 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;
    end_query = 0;
    end_ref = 0;
    s1Len = profile->s1Len;
    matrix = profile->matrix;
    segWidth = 2; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    vProfile = (__m128i*)profile->profile64.score;
    vGapO = _mm_set1_epi64x_rpl(open);
    vGapE = _mm_set1_epi64x_rpl(gap);
    vZero = _mm_setzero_si128();
    score = NEG_INF;
    vMaxH = vZero;
    vMaxHUnit = vZero;
    maxp = INT64_MAX - (int64_t)(matrix->max+1);
    vTZero = _mm_set1_epi64x_rpl(PARASAIL_ZERO);
    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);
    vTMask = _mm_set1_epi64x_rpl(PARASAIL_ZERO_MASK);
    vFTMask= _mm_set1_epi64x_rpl(PARASAIL_F_MASK);

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

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

    /* initialize heap variables */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad =  parasail_memalign___m128i(16, segLen);
    pvE = parasail_memalign___m128i(16, segLen);
    pvEaStore = parasail_memalign___m128i(16, segLen);
    pvEaLoad = parasail_memalign___m128i(16, segLen);
    pvHT = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvHStore) return NULL;
    if (!pvHLoad) return NULL;
    if (!pvE) return NULL;
    if (!pvEaStore) return NULL;
    if (!pvEaLoad) return NULL;
    if (!pvHT) return NULL;
    if (!pvHMax) return NULL;

    /* initialize H and E */
    parasail_memset___m128i(pvHStore, vZero, segLen);
    parasail_memset___m128i(pvE, _mm_set1_epi64x_rpl(-open), segLen);
    parasail_memset___m128i(pvEaStore, _mm_set1_epi64x_rpl(-open), segLen);

    for (i=0; i<segLen; ++i) {
        arr_store(result->trace->trace_table, vTDiagE, i, segLen, 0);
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vEF_opn;
        __m128i vE;
        __m128i vE_ext;
        __m128i vF;
        __m128i vF_ext;
        __m128i vFa;
        __m128i vFa_ext;
        __m128i vH;
        __m128i vH_dag;
        const __m128i* vP = NULL;

        /* Initialize F value to 0.  Any errors to vH values will be
         * corrected in the Lazy_F loop. */
        vF = _mm_sub_epi64(vZero,vGapO);

        /* load final segment of pvHStore and shift left by 8 bytes */
        vH = _mm_load_si128(&pvHStore[segLen - 1]);
        vH = _mm_slli_si128(vH, 8);

        /* Correct part of the vProfile */
        vP = vProfile + matrix->mapper[(unsigned char)s2[j]] * segLen;

        if (end_ref == j-2) {
            /* Swap in the max buffer. */
            SWAP3(pvHMax,  pvHLoad,  pvHStore)
            SWAP(pvEaLoad,  pvEaStore)
        }
        else {
            /* Swap the 2 H buffers. */
            SWAP(pvHLoad,  pvHStore)
            SWAP(pvEaLoad,  pvEaStore)
        }

        /* inner loop to process the query sequence */
        for (i=0; i<segLen; ++i) {
            vE = _mm_load_si128(pvE + i);

            /* Get max from vH, vE and vF. */
            vH_dag = _mm_add_epi64(vH, _mm_load_si128(vP + i));
            vH_dag = _mm_max_epi64_rpl(vH_dag, vZero);
            vH = _mm_max_epi64_rpl(vH_dag, vE);
            vH = _mm_max_epi64_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);

            {
                __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                __m128i cond_zero = _mm_cmpeq_epi64_rpl(vH, vZero);
                __m128i case1 = _mm_cmpeq_epi64_rpl(vH, vH_dag);
                __m128i case2 = _mm_cmpeq_epi64_rpl(vH, vF);
                __m128i vT = _mm_blendv_epi8_rpl(
                        _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                        _mm_blendv_epi8_rpl(vTDiag, vTZero, cond_zero),
                        case1);
                _mm_store_si128(pvHT + i, vT);
                vT = _mm_or_si128(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i, segLen, j);
            }
            vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
            vEF_opn = _mm_sub_epi64(vH, vGapO);

            /* Update vE value. */
            vE_ext = _mm_sub_epi64(vE, vGapE);
            vE = _mm_max_epi64_rpl(vEF_opn, vE_ext);
            _mm_store_si128(pvE + i, vE);
            {
                __m128i vEa = _mm_load_si128(pvEaLoad + i);
                __m128i vEa_ext = _mm_sub_epi64(vEa, vGapE);
                vEa = _mm_max_epi64_rpl(vEF_opn, vEa_ext);
                _mm_store_si128(pvEaStore + i, vEa);
                if (j+1<s2Len) {
                    __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vEa_ext);
                    __m128i vT = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, cond);
                    arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                }
            }

            /* Update vF value. */
            vF_ext = _mm_sub_epi64(vF, vGapE);
            vF = _mm_max_epi64_rpl(vEF_opn, vF_ext);
            if (i+1<segLen) {
                __m128i vTAll = arr_load(result->trace->trace_table, i+1, segLen, j);
                __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vF_ext);
                __m128i vT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, cond);
                vT = _mm_or_si128(vT, vTAll);
                arr_store(result->trace->trace_table, vT, i+1, segLen, j);
            }

            /* Load the next vH. */
            vH = _mm_load_si128(pvHLoad + i);
        }

        /* Lazy_F loop: has been revised to disallow adjecent insertion and
         * then deletion, so don't update E(i, i), learn from SWPS3 */
        vFa_ext = vF_ext;
        vFa = vF;
        for (k=0; k<segWidth; ++k) {
            __m128i vHp = _mm_load_si128(&pvHLoad[segLen - 1]);
            vHp = _mm_slli_si128(vHp, 8);
            vEF_opn = _mm_slli_si128(vEF_opn, 8);
            vEF_opn = _mm_insert_epi64_rpl(vEF_opn, -open, 0);
            vF_ext = _mm_slli_si128(vF_ext, 8);
            vF_ext = _mm_insert_epi64_rpl(vF_ext, NEG_INF, 0);
            vF = _mm_slli_si128(vF, 8);
            vF = _mm_insert_epi64_rpl(vF, -open, 0);
            vFa_ext = _mm_slli_si128(vFa_ext, 8);
            vFa_ext = _mm_insert_epi64_rpl(vFa_ext, NEG_INF, 0);
            vFa = _mm_slli_si128(vFa, 8);
            vFa = _mm_insert_epi64_rpl(vFa, -open, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi64_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
                {
                    __m128i vTAll;
                    __m128i vT;
                    __m128i case1;
                    __m128i case2;
                    __m128i cond;
                    vHp = _mm_add_epi64(vHp, _mm_load_si128(vP + i));
                    vHp = _mm_max_epi64_rpl(vHp, vZero);
                    case1 = _mm_cmpeq_epi64_rpl(vH, vHp);
                    case2 = _mm_cmpeq_epi64_rpl(vH, vF);
                    cond = _mm_andnot_si128(case1,case2);
                    vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    vT = _mm_load_si128(pvHT + i);
                    vT = _mm_blendv_epi8_rpl(vT, vTDel, cond);
                    _mm_store_si128(pvHT + i, vT);
                    vTAll = _mm_and_si128(vTAll, vTMask);
                    vTAll = _mm_or_si128(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
                /* Update vF value. */
                {
                    __m128i vTAll = arr_load(result->trace->trace_table, i, segLen, j);
                    __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vFa_ext);
                    __m128i vT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, cond);
                    vTAll = _mm_and_si128(vTAll, vFTMask);
                    vTAll = _mm_or_si128(vTAll, vT);
                    arr_store(result->trace->trace_table, vTAll, i, segLen, j);
                }
                vEF_opn = _mm_sub_epi64(vH, vGapO);
                vF_ext = _mm_sub_epi64(vF, vGapE);
                {
                    __m128i vEa = _mm_load_si128(pvEaLoad + i);
                    __m128i vEa_ext = _mm_sub_epi64(vEa, vGapE);
                    vEa = _mm_max_epi64_rpl(vEF_opn, vEa_ext);
                    _mm_store_si128(pvEaStore + i, vEa);
                    if (j+1<s2Len) {
                        __m128i cond = _mm_cmpgt_epi64_rpl(vEF_opn, vEa_ext);
                        __m128i vT = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, cond);
                        arr_store(result->trace->trace_table, vT, i, segLen, j+1);
                    }
                }
                if (! _mm_movemask_epi8(
                            _mm_or_si128(
                                _mm_cmpgt_epi64_rpl(vF_ext, vEF_opn),
                                _mm_cmpeq_epi64_rpl(vF_ext, vEF_opn))))
                    goto end;
                /*vF = _mm_max_epi64_rpl(vEF_opn, vF_ext);*/
                vF = vF_ext;
                vFa_ext = _mm_sub_epi64(vFa, vGapE);
                vFa = _mm_max_epi64_rpl(vEF_opn, vFa_ext);
                vHp = _mm_load_si128(pvHLoad + i);
            }
        }
end:
        {
        }

        {
            __m128i vCompare = _mm_cmpgt_epi64_rpl(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi64_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm_set1_epi64x_rpl(score);
                end_ref = j;
            }
        }

        /*if (score == stop) break;*/
    }

    if (score == INT64_MAX) {
        result->flag |= PARASAIL_FLAG_SATURATED;
    }

    if (parasail_result_is_saturated(result)) {
        score = 0;
        end_query = 0;
        end_ref = 0;
    }
    else {
        if (end_ref == j-1) {
            /* end_ref was the last store column */
            SWAP(pvHMax,  pvHStore)
        }
        else if (end_ref == j-2) {
            /* end_ref was the last load column */
            SWAP(pvHMax,  pvHLoad)
        }
        /* Trace the alignment ending position on read. */
        {
            int64_t *t = (int64_t*)pvHMax;
            int32_t column_len = segLen * segWidth;
            end_query = s1Len - 1;
            for (i = 0; i<column_len; ++i, ++t) {
                if (*t == score) {
                    int32_t temp = i / segWidth + i % segWidth * segLen;
                    if (temp < end_query) {
                        end_query = temp;
                    }
                }
            }
        }
    }

    result->score = score;
    result->end_query = end_query;
    result->end_ref = end_ref;

    parasail_free(pvHMax);
    parasail_free(pvHT);
    parasail_free(pvEaLoad);
    parasail_free(pvEaStore);
    parasail_free(pvE);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, 0x80(%rsp)
testq %rdi, %rdi
je 0x3b8ef7
movq 0x60(%rdi), %rax
movq %rax, 0xd8(%rsp)
testq %rax, %rax
je 0x3b8efe
movq 0x10(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x3b8f05
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x3b8f0c
cmpq $0x0, 0x80(%rsp)
je 0x3b8f13
movl %edx, %r14d
testl %edx, %edx
jle 0x3b8f1a
movl %ecx, %r12d
testl %ecx, %ecx
js 0x3b8f21
movl %r8d, %r13d
testl %r8d, %r8d
js 0x3b8f28
movq %rax, 0xc0(%rsp)
leaq 0x1(%rax), %r15
movq %r15, %rbp
shrq %rbp
movq 0x78(%rsp), %rax
movslq 0x1c(%rax), %rax
movq %rax, 0x50(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %ebp, %edi
movl %r14d, %esi
callq 0x20adf4
testq %rax, %rax
je 0x3b8f2d
movq %rax, %rbx
movl %r13d, 0x8(%rsp)
movl %r12d, 0x10(%rsp)
movq %r15, 0xb8(%rsp)
movq %r14, 0x48(%rsp)
orl $0x2880804, 0xc(%rax)   # imm = 0x2880804
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, %r12
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, 0x30(%rsp)
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, %r14
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, %r13
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, %r15
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, 0x38(%rsp)
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2f600c
movq %rax, %rdx
movq %r12, %xmm0
movq 0x30(%rsp), %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %r14, 0x58(%rsp)
movq %r14, %xmm1
movq %r13, 0x40(%rsp)
movq %r13, %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 %eax, %eax
testl %ecx, %ecx
jne 0x3b8f81
testq %r15, %r15
je 0x3b8f81
cmpq $0x0, 0x38(%rsp)
je 0x3b8f81
testq %rdx, %rdx
je 0x3b8f81
movq %rdx, %r13
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movl 0x10(%rsp), %r14d
movd %r14d, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xa0(%rsp)
movd 0x8(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x110(%rsp)
movq 0x50(%rsp), %rax
notq %rax
addq %rcx, %rax
movq %rax, 0x50(%rsp)
pxor %xmm0, %xmm0
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2f6015
negl %r14d
movslq %r14d, %rax
movq %rax, 0xe0(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
movq %rbp, %rsi
callq 0x2f6015
movq 0x40(%rsp), %rdi
movaps 0x10(%rsp), %xmm0
movq %rbp, %rsi
callq 0x2f6015
movq %rbp, %rax
shlq $0x4, %rax
xorl %ecx, %ecx
movdqa 0x2709d4(%rip), %xmm0   # 0x628ee0
movq 0x10(%rbx), %rdx
movq (%rdx), %rdx
movdqa %xmm0, (%rdx,%rcx)
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x3b850c
pxor %xmm14, %xmm14
pxor %xmm1, %xmm1
psubq 0xa0(%rsp), %xmm1
movdqa %xmm1, 0x120(%rsp)
leal -0x1(%rbp), %eax
movl 0x48(%rsp), %ecx
movq %rcx, 0x8(%rsp)
movl %ebp, %ecx
shlq $0x4, %rcx
movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000
shlq $0x4, %rax
movq %rax, 0xd0(%rsp)
movslq %ebp, %rax
movq %rax, 0xc8(%rsp)
movdqa 0x271ba9(%rip), %xmm2   # 0x62a120
movdqa 0x270931(%rip), %xmm3   # 0x628eb0
movdqa 0x271409(%rip), %xmm4   # 0x629990
movdqa 0x273141(%rip), %xmm6   # 0x62b6d0
movq $0x0, 0x10(%rsp)
movq %rcx, 0x70(%rsp)
movq %rcx, 0x60(%rsp)
xorl %esi, %esi
xorl %r8d, %r8d
pxor %xmm5, %xmm5
movq 0x30(%rsp), %r14
movdqa 0x110(%rsp), %xmm12
movq 0x40(%rsp), %rcx
movq %rbp, 0xf8(%rsp)
movdqa %xmm5, 0x130(%rsp)
movq %rdx, 0x28(%rsp)
movq %r13, %rax
movq %r15, 0x68(%rsp)
movq %rcx, 0x98(%rsp)
movq %r14, %rcx
movq %r12, %r14
movq %rsi, %r9
movq 0xd0(%rsp), %rdi
leaq (%r12,%rdi), %rdx
movq %rdx, 0xe8(%rsp)
movq 0x78(%rsp), %rdx
movq 0x10(%rdx), %rdx
movq 0x80(%rsp), %rsi
movzbl (%rsi,%r9), %esi
movslq (%rdx,%rsi,4), %r10
imulq 0xc8(%rsp), %r10
shlq $0x4, %r10
addq 0xd8(%rsp), %r10
leal -0x2(%r9), %edx
movl %r8d, 0x4(%rsp)
cmpl %edx, %r8d
cmoveq %rcx, %r13
movq %r13, 0xf0(%rsp)
movq %rcx, %r12
cmoveq %rax, %r12
movdqa (%r14,%rdi), %xmm1
pslldq $0x8, %xmm1             # xmm1 = zero,zero,zero,zero,zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7]
movq %r9, 0x88(%rsp)
leaq 0x1(%r9), %rax
movq %rax, 0x90(%rsp)
movl $0x1, %ecx
xorl %r11d, %r11d
movdqa 0x120(%rsp), %xmm13
movq %r12, 0x108(%rsp)
movq %r14, 0x30(%rsp)
movq %r10, 0x100(%rsp)
movq %rcx, 0x40(%rsp)
paddq (%r10,%r11), %xmm1
movq %xmm1, %r10
testq %r10, %r10
movl $0x0, %eax
cmovleq %rax, %r10
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %rbp
testq %rbp, %rbp
cmovleq %rax, %rbp
movq 0x58(%rsp), %rdi
movq (%rdi,%r11), %rcx
cmpq %rcx, %r10
cmovgq %r10, %rcx
movq 0x8(%rdi,%r11), %r13
cmpq %r13, %rbp
cmovgq %rbp, %r13
movdqa (%rdi,%r11), %xmm1
movq %xmm13, %rsi
cmpq %rsi, %rcx
movq %rsi, %r15
cmovgq %rcx, %r15
pshufd $0xee, %xmm13, %xmm7    # xmm7 = xmm13[2,3,2,3]
movq %xmm7, %r9
cmpq %r9, %r13
movq %r9, %rdx
cmovgq %r13, %rdx
movq %r15, %xmm9
movq %rdx, %xmm7
punpcklqdq %xmm7, %xmm9    # xmm9 = xmm9[0],xmm7[0]
movdqa %xmm9, (%r12,%r11)
movq 0x10(%rbx), %rax
movq (%rax), %r12
movq 0x10(%rsp), %rax
addq %rax, %r12
cmpq $0x1, %r15
movl $0x0, %eax
sbbq %rax, %rax
cmpq $0x1, %rdx
movl $0x0, %r14d
sbbq %r14, %r14
movq %rbx, %r8
xorl %ebx, %ebx
cmpq %r10, %r15
sete %bl
negq %rbx
xorl %r10d, %r10d
cmpq %rbp, %rdx
sete %r10b
negq %r10
xorl %ebp, %ebp
cmpq %rcx, %rsi
setge %bpl
negq %rbp
xorl %ecx, %ecx
cmpq %r13, %r9
movq %rax, %xmm8
movq %r14, %xmm10
movq %rbx, %xmm7
movq %r8, %rbx
movq %r10, %xmm15
movq %rbp, %xmm11
punpcklqdq %xmm10, %xmm8   # xmm8 = xmm8[0],xmm10[0]
punpcklqdq %xmm15, %xmm7   # xmm7 = xmm7[0],xmm15[0]
setge %cl
negq %rcx
movq %rcx, %xmm10
punpcklqdq %xmm10, %xmm11  # xmm11 = xmm11[0],xmm10[0]
psrlq $0x3e, %xmm11
pxor %xmm2, %xmm11
pandn %xmm7, %xmm8
pand %xmm3, %xmm8
pandn %xmm11, %xmm7
por %xmm8, %xmm7
movdqa (%r11,%r12), %xmm8
movq 0x38(%rsp), %rax
movdqa %xmm7, (%rax,%r11)
movq 0x10(%r8), %rax
movq (%rax), %rax
addq 0x10(%rsp), %rax
movq %xmm14, %rcx
cmpq %rcx, %r15
cmovleq %rcx, %r15
pshufd $0xee, %xmm14, %xmm10   # xmm10 = xmm14[2,3,2,3]
movq %xmm10, %rcx
cmpq %rcx, %rdx
cmovleq %rcx, %rdx
por %xmm7, %xmm8
movdqa %xmm8, (%r11,%rax)
psubq 0xa0(%rsp), %xmm9
psubq %xmm12, %xmm1
movdqa %xmm9, %xmm7
pxor %xmm4, %xmm7
movdqa %xmm1, %xmm8
pxor %xmm4, %xmm8
movdqa %xmm7, %xmm10
pcmpgtd %xmm8, %xmm10
pshufd $0xa0, %xmm10, %xmm11   # xmm11 = xmm10[0,0,2,2]
pcmpeqd %xmm7, %xmm8
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pand %xmm11, %xmm8
pshufd $0xf5, %xmm10, %xmm10   # xmm10 = xmm10[1,1,3,3]
por %xmm8, %xmm10
movdqa %xmm9, %xmm8
pand %xmm10, %xmm8
pandn %xmm1, %xmm10
por %xmm8, %xmm10
movdqa %xmm10, (%rdi,%r11)
movq 0x98(%rsp), %rax
movdqa (%rax,%r11), %xmm8
psubq %xmm12, %xmm8
movdqa %xmm8, %xmm1
pxor %xmm4, %xmm1
movdqa %xmm7, %xmm10
pcmpgtd %xmm1, %xmm10
pshufd $0xa0, %xmm10, %xmm11   # xmm11 = xmm10[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm14    # xmm14 = xmm1[1,1,3,3]
pand %xmm11, %xmm14
pshufd $0xf5, %xmm10, %xmm1    # xmm1 = xmm10[1,1,3,3]
por %xmm14, %xmm1
movdqa %xmm1, %xmm10
pandn %xmm8, %xmm10
movdqa %xmm9, %xmm8
pand %xmm1, %xmm8
por %xmm10, %xmm8
movq 0x68(%rsp), %rax
movdqa %xmm8, (%rax,%r11)
movq 0x90(%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x3b8916
movdqa %xmm1, %xmm8
pandn 0x272dc5(%rip), %xmm8   # 0x62b6c0
pand %xmm0, %xmm1
por %xmm8, %xmm1
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq 0x60(%rsp), %rax
movdqa %xmm1, (%r11,%rax)
movdqa %xmm13, %xmm15
psubq %xmm12, %xmm15
movdqa %xmm15, %xmm1
pxor %xmm4, %xmm1
movdqa %xmm7, %xmm8
pcmpgtd %xmm1, %xmm8
pshufd $0xa0, %xmm8, %xmm10    # xmm10 = xmm8[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm10, %xmm1
pshufd $0xf5, %xmm8, %xmm13    # xmm13 = xmm8[1,1,3,3]
por %xmm1, %xmm13
movq 0xf8(%rsp), %rbp
movq 0x40(%rsp), %rcx
cmpq %rbp, %rcx
movq 0x30(%rsp), %r14
jae 0x3b899d
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq 0x10(%rsp), %rax
movdqa %xmm13, %xmm1
pandn %xmm6, %xmm1
movdqa %xmm13, %xmm7
pand 0x272d55(%rip), %xmm7   # 0x62b6e0
por %xmm1, %xmm7
por 0x10(%r11,%rax), %xmm7
movdqa %xmm7, 0x10(%r11,%rax)
movq %r15, %xmm14
movq %rdx, %xmm1
punpcklqdq %xmm1, %xmm14   # xmm14 = xmm14[0],xmm1[0]
movdqa %xmm9, %xmm1
pand %xmm13, %xmm1
pandn %xmm15, %xmm13
por %xmm1, %xmm13
movdqa (%r14,%r11), %xmm1
addq $0x10, %r11
incq %rcx
cmpq %r11, 0x70(%rsp)
movq 0x108(%rsp), %r12
movq 0x100(%rsp), %r10
jne 0x3b8696
movdqa %xmm0, %xmm2
movb $0x1, %dil
movdqa %xmm13, %xmm1
movq 0x98(%rsp), %r15
movq 0xf0(%rsp), %r13
movq 0x68(%rsp), %rcx
movl 0x4(%rsp), %r8d
movq 0x90(%rsp), %rsi
movq 0xe8(%rsp), %r9
movq 0x2730b9(%rip), %xmm8   # 0x62bae0
punpcklqdq %xmm15, %xmm8   # xmm8 = xmm8[0],xmm15[0]
movq 0xe0(%rsp), %xmm10
movdqa %xmm10, %xmm11
punpcklqdq %xmm1, %xmm11   # xmm11 = xmm11[0],xmm1[0]
movdqa %xmm10, %xmm1
punpcklqdq %xmm13, %xmm1   # xmm1 = xmm1[0],xmm13[0]
punpcklqdq %xmm9, %xmm10   # xmm10 = xmm10[0],xmm9[0]
movdqa (%r9), %xmm7
pslldq $0x8, %xmm7             # xmm7 = zero,zero,zero,zero,zero,zero,zero,zero,xmm7[0,1,2,3,4,5,6,7]
xorl %r11d, %r11d
movdqa %xmm10, %xmm9
movdqa %xmm1, %xmm13
movdqa %xmm11, %xmm1
movdqa %xmm8, %xmm15
movdqa (%r12,%r11), %xmm8
movdqa %xmm13, %xmm10
pxor %xmm4, %xmm10
movdqa %xmm8, %xmm11
pxor %xmm4, %xmm11
movdqa %xmm12, %xmm5
movdqa %xmm11, %xmm12
pcmpgtd %xmm10, %xmm12
pshufd $0xa0, %xmm12, %xmm0    # xmm0 = xmm12[0,0,2,2]
pcmpeqd %xmm10, %xmm11
pshufd $0xf5, %xmm11, %xmm11   # xmm11 = xmm11[1,1,3,3]
pand %xmm0, %xmm11
pshufd $0xf5, %xmm12, %xmm10   # xmm10 = xmm12[1,1,3,3]
por %xmm11, %xmm10
movdqa %xmm10, %xmm0
pandn %xmm13, %xmm0
pand %xmm10, %xmm8
por %xmm0, %xmm8
movdqa %xmm8, (%r12,%r11)
paddq (%r10,%r11), %xmm7
movdqa %xmm7, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm0, %xmm11
pcmpgtd %xmm4, %xmm11
pshufd $0xa0, %xmm11, %xmm12   # xmm12 = xmm11[0,0,2,2]
pcmpeqd %xmm4, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm12, %xmm0
pshufd $0xf5, %xmm11, %xmm11   # xmm11 = xmm11[1,1,3,3]
por %xmm0, %xmm11
pand %xmm7, %xmm11
pcmpeqd %xmm8, %xmm11
pshufd $0xb1, %xmm11, %xmm0    # xmm0 = xmm11[1,0,3,2]
pand %xmm11, %xmm0
por %xmm10, %xmm0
movq 0x10(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rdx
addq %rdx, %rax
movdqa (%r11,%rax), %xmm7
pand 0x272f1e(%rip), %xmm7   # 0x62ba60
movq 0x38(%rsp), %rax
movdqa (%rax,%r11), %xmm10
pand %xmm0, %xmm10
pandn 0x270396(%rip), %xmm0   # 0x628ef0
por %xmm10, %xmm0
movdqa %xmm0, (%rax,%r11)
por %xmm7, %xmm0
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %rdx, %rax
movdqa %xmm0, (%r11,%rax)
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq %rdx, %rax
pxor %xmm4, %xmm15
pxor %xmm4, %xmm9
movdqa %xmm9, %xmm0
pcmpgtd %xmm15, %xmm0
pcmpeqd %xmm15, %xmm9
pshufd $0xf5, %xmm9, %xmm7     # xmm7 = xmm9[1,1,3,3]
pand %xmm0, %xmm7
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
por %xmm7, %xmm0
pand 0x272d89(%rip), %xmm0   # 0x62b940
movdqa (%r11,%rax), %xmm7
pand 0x272eab(%rip), %xmm7   # 0x62ba70
por %xmm0, %xmm7
pxor %xmm6, %xmm7
movdqa %xmm7, (%r11,%rax)
movdqa %xmm8, %xmm9
psubq 0xa0(%rsp), %xmm9
movdqa (%r15,%r11), %xmm0
psubq %xmm5, %xmm0
movdqa %xmm9, %xmm7
pxor %xmm4, %xmm7
movdqa %xmm0, %xmm10
pxor %xmm4, %xmm10
movdqa %xmm7, %xmm11
pcmpgtd %xmm10, %xmm11
pshufd $0xa0, %xmm11, %xmm12   # xmm12 = xmm11[0,0,2,2]
pcmpeqd %xmm7, %xmm10
pshufd $0xf5, %xmm10, %xmm15   # xmm15 = xmm10[1,1,3,3]
pand %xmm12, %xmm15
pshufd $0xf5, %xmm11, %xmm10   # xmm10 = xmm11[1,1,3,3]
por %xmm15, %xmm10
movdqa %xmm10, %xmm11
pandn %xmm0, %xmm11
movdqa %xmm9, %xmm0
pand %xmm10, %xmm0
por %xmm11, %xmm0
movdqa %xmm0, (%rcx,%r11)
cmpq 0x8(%rsp), %rsi
jae 0x3b8c79
movdqa %xmm10, %xmm0
pandn 0x272a63(%rip), %xmm0   # 0x62b6c0
pand %xmm2, %xmm10
por %xmm0, %xmm10
movq 0x10(%rbx), %rax
movq (%rax), %rax
addq 0x60(%rsp), %rax
movdqa %xmm10, (%r11,%rax)
movdqa %xmm8, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm14, %xmm10
pxor %xmm4, %xmm10
movdqa %xmm0, %xmm11
pcmpgtd %xmm10, %xmm11
pshufd $0xa0, %xmm11, %xmm12   # xmm12 = xmm11[0,0,2,2]
pcmpeqd %xmm0, %xmm10
pshufd $0xf5, %xmm10, %xmm0    # xmm0 = xmm10[1,1,3,3]
pand %xmm12, %xmm0
pshufd $0xf5, %xmm11, %xmm10   # xmm10 = xmm11[1,1,3,3]
por %xmm0, %xmm10
pand %xmm10, %xmm8
pandn %xmm14, %xmm10
movdqa %xmm10, %xmm14
por %xmm8, %xmm14
movdqa 0x110(%rsp), %xmm12
psubq %xmm12, %xmm13
movdqa %xmm13, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm7, %xmm8
pcmpgtd %xmm0, %xmm8
pshufd $0xa0, %xmm8, %xmm10    # xmm10 = xmm8[0,0,2,2]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm10, %xmm0
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
por %xmm0, %xmm8
movmskps %xmm8, %eax
cmpl $0xf, %eax
je 0x3b8d83
movdqa %xmm1, %xmm15
psubq %xmm12, %xmm15
movdqa %xmm15, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm7, %xmm1
pcmpgtd %xmm0, %xmm1
pshufd $0xa0, %xmm1, %xmm8     # xmm8 = xmm1[0,0,2,2]
pcmpeqd %xmm7, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm8, %xmm0
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
por %xmm0, %xmm1
movdqa %xmm9, %xmm0
pand %xmm1, %xmm0
pandn %xmm15, %xmm1
por %xmm0, %xmm1
movdqa (%r14,%r11), %xmm7
addq $0x10, %r11
cmpq %r11, 0x70(%rsp)
jne 0x3b8a70
testb $0x1, %dil
movl $0x0, %edi
jne 0x3b8a1e
movdqa 0x130(%rsp), %xmm5
movdqa %xmm5, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm14, %xmm1
pxor %xmm4, %xmm1
movdqa %xmm1, %xmm7
pcmpgtd %xmm0, %xmm7
pshufd $0xa0, %xmm7, %xmm8     # xmm8 = xmm7[0,0,2,2]
pcmpeqd %xmm0, %xmm1
pshufd $0xf5, %xmm1, %xmm0     # xmm0 = xmm1[1,1,3,3]
pand %xmm8, %xmm0
pshufd $0xf5, %xmm7, %xmm1     # xmm1 = xmm7[1,1,3,3]
por %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x3b8dfe
pshufd $0xee, %xmm14, %xmm0    # xmm0 = xmm14[2,3,2,3]
movq %xmm0, %rdx
movq %xmm14, %rax
cmpq %rdx, %rax
cmovgq %rax, %rdx
cmpq 0x50(%rsp), %rdx
jg 0x3b8e2b
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm5     # xmm5 = xmm0[0,1,0,1]
movq 0x88(%rsp), %rax
movl %eax, %r8d
jmp 0x3b8e03
movq 0x28(%rsp), %rdx
movq 0x70(%rsp), %rax
addq %rax, 0x60(%rsp)
addq %rax, 0x10(%rsp)
cmpq 0x8(%rsp), %rsi
movdqa %xmm2, %xmm0
movdqa 0x2712fd(%rip), %xmm2   # 0x62a120
jne 0x3b85c7
jmp 0x3b8e3c
orb $0x40, 0xc(%rbx)
movq 0x88(%rsp), %rax
movq %rax, 0x48(%rsp)
movl %r8d, 0x4(%rsp)
movq %rdx, 0x28(%rsp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, %rdx
jne 0x3b8e59
orb $0x40, 0xc(%rbx)
movq %rbx, %rdi
callq 0x20be2e
xorl %ecx, %ecx
testl %eax, %eax
je 0x3b8e75
movq %r13, %rdi
xorl %r10d, %r10d
xorl %r8d, %r8d
jmp 0x3b8f39
movq 0x48(%rsp), %rcx
leal -0x1(%rcx), %eax
addl $-0x2, %ecx
movl 0x4(%rsp), %r10d
cmpl %ecx, %r10d
movq %r13, %rdi
cmoveq %r14, %rdi
movq %r14, %rcx
cmoveq %r13, %rcx
cmpl %eax, %r10d
cmoveq %r12, %rdi
cmoveq %r14, %rcx
movq %rcx, %r14
cmoveq %r13, %r12
movq 0xc0(%rsp), %r8
decl %r8d
testl $0x7ffffffe, 0xb8(%rsp) # imm = 0x7FFFFFFE
je 0x3b8f31
movl %ebp, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addl %eax, %eax
xorl %ecx, %ecx
movq 0x28(%rsp), %r9
cmpq %r9, (%rdi,%rcx,8)
jne 0x3b8eee
movl %ecx, %edx
shrl %edx
testb $0x1, %cl
movl $0x0, %esi
cmovnel %ebp, %esi
addl %edx, %esi
cmpl %r8d, %esi
cmovll %esi, %r8d
incq %rcx
cmpl %ecx, %eax
jne 0x3b8ed0
jmp 0x3b8f36
callq 0x1bed05
jmp 0x3b8f2d
callq 0x1becdf
jmp 0x3b8f2d
callq 0x1becb9
jmp 0x3b8f2d
callq 0x1bec93
jmp 0x3b8f2d
callq 0x1bec6d
jmp 0x3b8f2d
callq 0x1bec47
jmp 0x3b8f2d
callq 0x1bec21
jmp 0x3b8f2d
callq 0x1bebfb
xorl %eax, %eax
jmp 0x3b8f81
movq 0x28(%rsp), %r9
movl %r9d, %ecx
movl %ecx, (%rbx)
movl %r8d, 0x4(%rbx)
movl %r10d, 0x8(%rbx)
callq 0x20a60d
movq 0x38(%rsp), %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq 0x68(%rsp), %rdi
callq 0x20a60d
movq 0x58(%rsp), %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop