// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/sw_trace_scan_sse2_128_64.c
// Function: parasail_sw_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 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 pvP = NULL;
    __m128i* restrict pvE = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvHMax = 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 vMaxH;
    __m128i vMaxHUnit;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    parasail_result_t *result = NULL;
    __m128i vTZero;
    __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;
    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;
    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;
    vMaxH = vNegLimit;
    vMaxHUnit = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi64_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_add_epi64(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi64x_rpl(-segLen*gap), 8));
    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);


    /* 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_SCAN
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_2;

    /* initialize heap variables */
    pvE    = parasail_memalign___m128i(16, segLen);
    pvHt   = parasail_memalign___m128i(16, segLen);
    pvH    = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

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

    parasail_memset___m128i(pvH, vZero, segLen);
    parasail_memset___m128i(pvE, vNegLimit, segLen);
    {
        __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 case0;
        __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);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = vZero;
        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);
            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);
        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);
        vH = _mm_max_epi64_rpl(vH, vZero);
        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);
            vH = _mm_max_epi64_rpl(vH, vZero);
            case0 = _mm_cmpeq_epi64_rpl(vH, vZero);
            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_blendv_epi8_rpl(vT, vTZero, case0);
            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);
            vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
            {
                vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
            }
        } 

        {
            __m128i vCompare = _mm_cmpgt_epi64_rpl(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi64_rpl(vMaxH);
                vMaxHUnit = _mm_set1_epi64x_rpl(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m128i)*segLen);
            }
        }
    }

    /* Trace the alignment ending position on read. */
    {
        int64_t *t = (int64_t*)pvHMax;
        int32_t column_len = segLen * segWidth;
        end_query = s1Len;
        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;
                }
            }
        }
    }

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

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rsi, 0x68(%rsp)
testq %rdi, %rdi
je 0x3a3be2
movq 0x60(%rdi), %rax
movq %rax, 0xf0(%rsp)
testq %rax, %rax
je 0x3a3be9
movq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x3a3bf0
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x3a3bf7
cmpq $0x0, 0x68(%rsp)
je 0x3a3bfe
movl %edx, %ebp
testl %edx, %edx
jle 0x3a3c05
testl %ecx, %ecx
js 0x3a3c0c
movl %r8d, %r13d
testl %r8d, %r8d
js 0x3a3c13
movq %rax, 0x48(%rsp)
leaq 0x1(%rax), %r12
movq %r12, %r15
shrq %r15
movl %ecx, %ebx
negl %ecx
movq 0x60(%rsp), %rdi
movslq 0x20(%rdi), %rax
movq %rbx, %rdx
btsq $0x3f, %rdx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
subq %rax, %r14
cmpl %ecx, %eax
cmovgq %rdx, %r14
movslq 0x1c(%rdi), %rax
movq %rax, 0x10(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r15d, %edi
movl %ebp, %esi
callq 0x20adf4
testq %rax, %rax
je 0x3a3c18
movl %r13d, 0x80(%rsp)
movl %ebp, 0x90(%rsp)
movq %r12, 0xd0(%rsp)
movq %r14, 0x40(%rsp)
movq %rax, 0x20(%rsp)
orl $0x2880404, 0xc(%rax)   # imm = 0x2880404
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %r13
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %rbp
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %r12
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %r14
movl $0x10, %edi
movq %r15, 0x38(%rsp)
movq %r15, %rsi
callq 0x2f600c
movq %rax, %rdx
movq %r13, %xmm0
movq %rbp, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %r12, %xmm1
movq %r14, 0x30(%rsp)
movq %r14, %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 0x3a3c1a
testq %rdx, %rdx
je 0x3a3c1a
movq %rbp, 0x18(%rsp)
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x110(%rsp)
movd 0x80(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x100(%rsp)
movq 0x40(%rsp), %rax
leaq 0x1(%rax), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x10(%rsp), %rax
addq $-0x2, %rax
movq %rcx, 0x28(%rsp)
movq %rcx, %xmm0
movdqa %xmm0, 0x130(%rsp)
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xa0(%rsp)
movq %rax, 0xc8(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xb0(%rsp)
pxor %xmm0, %xmm0
movq %r12, %rdi
movq 0x38(%rsp), %rbx
movq %rbx, %rsi
movq %rdx, 0x50(%rsp)
callq 0x2f6015
movq %r13, 0x58(%rsp)
movq %r13, %rdi
movdqa 0xa0(%rsp), %xmm0
movq %rbx, %rsi
callq 0x2f6015
pxor %xmm0, %xmm0
movdqa 0x100(%rsp), %xmm12
movdqa 0x110(%rsp), %xmm11
movq 0x50(%rsp), %rdi
leal -0x1(%rbx), %eax
psubq %xmm11, %xmm0
movq %rax, %rcx
shlq $0x4, %rcx
addq %rdi, %rcx
movl %ebx, %edx
movdqa %xmm0, (%rcx)
psubq %xmm12, %xmm0
addq $-0x10, %rcx
decl %edx
jg 0x3a34c3
movl %eax, %eax
shlq $0x4, %rax
movq %r12, %rcx
addq %rax, %rcx
movq %rcx, 0xe8(%rsp)
movq %rbx, %rax
shlq $0x4, %rax
cmpl $0x1, %ebx
movl %ebx, %r10d
adcl $0x0, %r10d
movl 0x90(%rsp), %ecx
movq %rcx, 0xe0(%rsp)
shlq $0x4, %r10
movslq %ebx, %rcx
movq %rcx, 0xd8(%rsp)
movdqa 0x286470(%rip), %xmm14  # 0x629990
movdqa 0x2859b7(%rip), %xmm10  # 0x628ee0
xorl %ebx, %ebx
xorl %esi, %esi
movl $0x0, 0xc(%rsp)
movdqa 0xa0(%rsp), %xmm0
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x120(%rsp)
movq 0x20(%rsp), %r11
movq 0x18(%rsp), %r9
movdqa 0xb0(%rsp), %xmm13
movq %r12, 0x78(%rsp)
movq %rax, 0x70(%rsp)
movq 0x60(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x68(%rsp), %rdx
movq %rsi, 0x10(%rsp)
movzbl (%rdx,%rsi), %edx
movslq (%rcx,%rdx,4), %rcx
imulq 0xd8(%rsp), %rcx
shlq $0x4, %rcx
addq 0xf0(%rsp), %rcx
movq 0xe8(%rsp), %rdx
movdqa (%rdx), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
pxor %xmm3, %xmm3
xorl %edx, %edx
movdqa 0xa0(%rsp), %xmm1
movq 0x58(%rsp), %r8
movdqa (%r12,%rdx), %xmm2
movdqa (%r8,%rdx), %xmm6
movdqa %xmm2, %xmm5
psubq %xmm11, %xmm5
psubq %xmm12, %xmm6
movdqa %xmm6, %xmm4
pxor %xmm14, %xmm4
movdqa %xmm5, %xmm7
pxor %xmm14, %xmm7
movdqa %xmm7, %xmm8
pcmpgtd %xmm4, %xmm8
pshufd $0xa0, %xmm8, %xmm9     # xmm9 = xmm8[0,0,2,2]
pcmpeqd %xmm4, %xmm7
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pand %xmm9, %xmm7
pshufd $0xf5, %xmm8, %xmm4     # xmm4 = xmm8[1,1,3,3]
por %xmm7, %xmm4
movdqa %xmm4, %xmm7
pandn 0x288094(%rip), %xmm7   # 0x62b6c0
movdqa %xmm4, %xmm8
pand %xmm10, %xmm8
por %xmm7, %xmm8
movq 0x10(%r11), %rsi
movq (%rsi), %rsi
paddq (%rdi,%rdx), %xmm3
paddq (%rcx,%rdx), %xmm0
addq %rbx, %rsi
movdqa %xmm8, (%rdx,%rsi)
movdqa %xmm3, %xmm7
pxor %xmm14, %xmm7
movdqa %xmm1, %xmm8
pxor %xmm14, %xmm1
movdqa %xmm1, %xmm9
pcmpgtd %xmm7, %xmm9
pshufd $0xa0, %xmm9, %xmm10    # xmm10 = xmm9[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm10, %xmm1
movdqa 0x285851(%rip), %xmm10  # 0x628ee0
pshufd $0xf5, %xmm9, %xmm7     # xmm7 = xmm9[1,1,3,3]
por %xmm1, %xmm7
pand %xmm7, %xmm8
pandn %xmm3, %xmm7
movdqa %xmm7, %xmm1
por %xmm8, %xmm1
pand %xmm4, %xmm5
pandn %xmm6, %xmm4
por %xmm5, %xmm4
movdqa %xmm4, %xmm5
movdqa %xmm4, (%r8,%rdx)
pxor %xmm14, %xmm4
movdqa %xmm0, %xmm3
pxor %xmm14, %xmm3
movdqa %xmm4, %xmm6
pcmpgtd %xmm3, %xmm6
pshufd $0xa0, %xmm6, %xmm7     # xmm7 = xmm6[0,0,2,2]
pcmpeqd %xmm4, %xmm3
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
pand %xmm7, %xmm4
pshufd $0xf5, %xmm6, %xmm3     # xmm3 = xmm6[1,1,3,3]
por %xmm4, %xmm3
pand %xmm3, %xmm5
pandn %xmm0, %xmm3
por %xmm5, %xmm3
movdqa %xmm3, (%r9,%rdx)
movdqa %xmm0, (%r12,%rdx)
addq $0x10, %rdx
movdqa %xmm2, %xmm0
cmpq %rdx, %r10
jne 0x3a35cc
movq (%rdi), %rcx
movq %xmm1, %rdx
cmpq %rcx, %rdx
cmovgq %rdx, %rcx
movq %rcx, %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
paddq 0x130(%rsp), %xmm0
movq %xmm0, %rcx
testq %rcx, %rcx
movl $0x0, %eax
cmovleq %rax, %rcx
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movq %xmm1, %rdx
movq %xmm3, %rsi
cmpq %rsi, %rdx
cmovgq %rdx, %rsi
testq %rsi, %rsi
cmovleq %rax, %rsi
movq %rsi, %xmm2
movq %rcx, %xmm1
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
xorl %ecx, %ecx
movq %r12, %r11
movdqa 0x286999(%rip), %xmm9   # 0x62a120
movdqa 0x285720(%rip), %xmm8   # 0x628eb0
movq %rbx, %rax
movdqa 0x90(%rsp), %xmm15
movdqa 0x80(%rsp), %xmm7
movq 0x20(%rsp), %rdx
movq 0x10(%rdx), %rdx
movq (%rdx), %rsi
addq %rax, %rsi
psubq %xmm11, %xmm1
psubq %xmm12, %xmm0
movdqa %xmm0, %xmm2
pxor %xmm14, %xmm2
movdqa %xmm1, %xmm3
pxor %xmm14, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
pand %xmm5, %xmm3
pshufd $0xf5, %xmm4, %xmm2     # xmm2 = xmm4[1,1,3,3]
por %xmm3, %xmm2
movdqa %xmm2, %xmm3
pandn %xmm0, %xmm3
pand %xmm2, %xmm1
movdqa %xmm1, %xmm0
por %xmm3, %xmm0
movdqa %xmm2, %xmm1
pandn 0x287ebc(%rip), %xmm1   # 0x62b6d0
pand 0x287ec4(%rip), %xmm2   # 0x62b6e0
por %xmm1, %xmm2
movq %xmm0, %r8
movq (%r9,%rcx), %rdx
movq 0x8(%r9,%rcx), %rbx
cmpq %r8, %rdx
cmovleq %r8, %rdx
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movq %xmm1, %rdi
cmpq %rdi, %rbx
cmovleq %rdi, %rbx
xorl %r9d, %r9d
testq %rdx, %rdx
movl $0x0, %r14d
cmovleq %r14, %rdx
setle %r9b
negq %r9
movq %r10, %r12
xorl %r10d, %r10d
testq %rbx, %rbx
cmovleq %r14, %rbx
movq %rdx, %xmm1
movq %rbx, %xmm3
punpcklqdq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0]
setle %r10b
negq %r10
movq %r9, %xmm3
movq %r10, %xmm4
xorl %r9d, %r9d
cmpq (%r11,%rcx), %rdx
punpcklqdq %xmm4, %xmm3    # xmm3 = xmm3[0],xmm4[0]
sete %r9b
negq %r9
xorl %r10d, %r10d
cmpq 0x8(%r11,%rcx), %rbx
sete %r10b
negq %r10
movq %r9, %xmm4
movq %r10, %xmm5
movq %r12, %r10
punpcklqdq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0]
xorl %r9d, %r9d
cmpq %r8, %rdx
sete %r9b
negq %r9
xorl %r8d, %r8d
cmpq %rdi, %rbx
sete %r8b
negq %r8
movq %r9, %xmm5
movq 0x18(%rsp), %r9
movq %r8, %xmm6
punpcklqdq %xmm6, %xmm5    # xmm5 = xmm5[0],xmm6[0]
psrlq $0x3e, %xmm5
pxor %xmm9, %xmm5
movdqa %xmm4, %xmm6
pandn %xmm5, %xmm6
pand %xmm8, %xmm4
por %xmm6, %xmm4
pandn %xmm4, %xmm3
por (%rcx,%rsi), %xmm2
por %xmm3, %xmm2
movq %xmm13, %rbp
cmpq %rdx, %rbp
cmovgeq %rdx, %rbp
movdqa %xmm2, (%rcx,%rsi)
pshufd $0xee, %xmm13, %xmm2    # xmm2 = xmm13[2,3,2,3]
movq %xmm2, %r13
cmpq %rbx, %r13
cmovgeq %rbx, %r13
movq %rbp, %xmm13
movq %r13, %xmm2
movq %xmm15, %r15
cmpq %rdx, %r15
cmovleq %rdx, %r15
punpcklqdq %xmm2, %xmm13   # xmm13 = xmm13[0],xmm2[0]
pshufd $0xee, %xmm15, %xmm2    # xmm2 = xmm15[2,3,2,3]
movq %xmm2, %r14
cmpq %rbx, %r14
cmovleq %rbx, %r14
movq %r15, %xmm15
movq %r14, %xmm2
movq %xmm7, %rsi
cmpq %rsi, %rdx
cmovleq %rsi, %rdx
punpcklqdq %xmm2, %xmm15   # xmm15 = xmm15[0],xmm2[0]
pshufd $0xee, %xmm7, %xmm2     # xmm2 = xmm7[2,3,2,3]
movq %xmm2, %rsi
cmpq %rsi, %rbx
cmovleq %rsi, %rbx
movq %rdx, %xmm7
movq %rbx, %xmm2
punpcklqdq %xmm2, %xmm7    # xmm7 = xmm7[0],xmm2[0]
movdqa %xmm1, (%r11,%rcx)
addq $0x10, %rcx
cmpq %rcx, %r12
jne 0x3a37a6
movdqa %xmm7, 0x80(%rsp)
movdqa %xmm15, 0x90(%rsp)
movq %rax, 0xf8(%rsp)
movdqa 0x120(%rsp), %xmm0
movq %xmm0, %rcx
xorl %esi, %esi
cmpq %rcx, %rdx
setg %sil
negq %rsi
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %rcx
xorl %edi, %edi
cmpq %rcx, %rbx
setg %dil
negq %rdi
movq %rsi, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
pmovmskb %xmm0, %ecx
testl %ecx, %ecx
movq 0x70(%rsp), %rax
movq 0x20(%rsp), %r11
movq 0x10(%rsp), %rsi
je 0x3a3aa7
cmpq %rbx, %rdx
cmovgq %rdx, %rbx
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x120(%rsp)
movq 0x30(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq %rax, %rdx
movdqa %xmm13, 0xb0(%rsp)
callq 0x19e0c0
movq 0x10(%rsp), %rsi
movdqa 0x28547b(%rip), %xmm10  # 0x628ee0
movdqa 0x285f22(%rip), %xmm14  # 0x629990
movq %r12, %r10
movdqa 0xb0(%rsp), %xmm13
movdqa 0x100(%rsp), %xmm12
movdqa 0x110(%rsp), %xmm11
movq 0x18(%rsp), %r9
movq 0x20(%rsp), %r11
movq %rbx, 0x28(%rsp)
movl %esi, 0xc(%rsp)
movq 0x70(%rsp), %rax
incq %rsi
movq 0xf8(%rsp), %rbx
addq %rax, %rbx
cmpq 0xe0(%rsp), %rsi
movq 0x50(%rsp), %rdi
movq 0x78(%rsp), %r12
jne 0x3a3577
testl $0x7ffffffe, 0xd0(%rsp) # imm = 0x7FFFFFFE
je 0x3a3b29
movq 0x38(%rsp), %r10
movl %r10d, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
addl %ecx, %ecx
xorl %edx, %edx
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rbx
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rsi
cmpq %rbx, (%rsi,%rdx,8)
jne 0x3a3b20
movl %edx, %esi
shrl %esi
testb $0x1, %dl
movl $0x0, %r9d
cmovnel %r10d, %r9d
addl %esi, %r9d
cmpl %r8d, %r9d
cmovll %r9d, %r8d
incq %rdx
cmpl %edx, %ecx
jne 0x3a3afa
jmp 0x3a3b37
movq 0x48(%rsp), %r8
movq 0x28(%rsp), %rbx
movl 0xc(%rsp), %eax
xorl %ecx, %ecx
movq 0x40(%rsp), %rsi
cmpq %rsi, %rbp
setle %cl
negq %rcx
xorl %edx, %edx
cmpq %rsi, %r13
setle %dl
negq %rdx
movq %rdx, %xmm0
movq %rcx, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
xorl %ecx, %ecx
movq 0xc8(%rsp), %rsi
cmpq %rsi, %r15
setg %cl
negq %rcx
xorl %edx, %edx
cmpq %rsi, %r14
setg %dl
negq %rdx
movq %rdx, %xmm0
movq %rcx, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
por %xmm1, %xmm2
pmovmskb %xmm2, %ecx
testl %ecx, %ecx
je 0x3a3ba4
orb $0x40, 0xc(%r11)
xorl %ebx, %ebx
xorl %eax, %eax
xorl %r8d, %r8d
movl %ebx, (%r11)
movl %r8d, 0x4(%r11)
movl %eax, 0x8(%r11)
movq %r11, %rbx
callq 0x20a60d
movq 0x30(%rsp), %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq 0x18(%rsp), %rdi
callq 0x20a60d
movq 0x58(%rsp), %rdi
callq 0x20a60d
movq %rbx, %rax
jmp 0x3a3c1a
callq 0x1bc5d5
jmp 0x3a3c18
callq 0x1bc5af
jmp 0x3a3c18
callq 0x1bc589
jmp 0x3a3c18
callq 0x1bc563
jmp 0x3a3c18
callq 0x1bc53d
jmp 0x3a3c18
callq 0x1bc517
jmp 0x3a3c18
callq 0x1bc4f1
jmp 0x3a3c18
callq 0x1bc4cb
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq