// File: /workspace/github_c_makefile_star2_O1/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, 0x70(%rsp)
testq %rdi, %rdi
je 0x387713
movq 0x60(%rdi), %rax
movq %rax, 0xd8(%rsp)
testq %rax, %rax
je 0x38771a
movq 0x10(%rdi), %rax
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x387721
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x387728
cmpq $0x0, 0x70(%rsp)
je 0x38772f
movl %edx, %ebp
testl %edx, %edx
jle 0x387736
testl %ecx, %ecx
js 0x38773d
movl %r8d, %r13d
testl %r8d, %r8d
js 0x387744
movq %rax, 0x50(%rsp)
leaq 0x1(%rax), %r12
movq %r12, %r15
shrq %r15
movl %ecx, %ebx
negl %ecx
movq 0x68(%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, 0x20(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r15d, %edi
movl %ebp, %esi
callq 0x2097d1
testq %rax, %rax
je 0x387749
movl %r13d, 0x10(%rsp)
movl %ebp, 0x18(%rsp)
movq %r12, 0xb8(%rsp)
movq %r14, 0x48(%rsp)
movq %rax, 0x28(%rsp)
orl $0x2880404, 0xc(%rax)   # imm = 0x2880404
movl $0x10, %edi
movq %r15, %rsi
callq 0x2ea474
movq %rax, %r13
movl $0x10, %edi
movq %r15, %rsi
callq 0x2ea474
movq %rax, %rbp
movl $0x10, %edi
movq %r15, %rsi
callq 0x2ea474
movq %rax, %r12
movl $0x10, %edi
movq %r15, %rsi
callq 0x2ea474
movq %rax, %r14
movl $0x10, %edi
movq %r15, %rsi
callq 0x2ea474
movq %r13, 0x38(%rsp)
testq %r13, %r13
sete %dl
testq %rbp, %rbp
sete %cl
orb %dl, %cl
testq %r12, %r12
sete %sil
movq %r14, 0x40(%rsp)
testq %r14, %r14
movq %rax, %r14
sete %dl
orb %sil, %dl
orb %cl, %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0x387749
movq %rbp, 0x60(%rsp)
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xf0(%rsp)
movd 0x10(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xe0(%rsp)
movq 0x48(%rsp), %rax
leaq 0x1(%rax), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
subq 0x20(%rsp), %rax
addq $-0x2, %rax
movq %rcx, 0x30(%rsp)
movq %rcx, %xmm0
movdqa %xmm0, 0x110(%rsp)
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x80(%rsp)
movq %rax, 0xb0(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x90(%rsp)
pxor %xmm0, %xmm0
movq %r12, %rdi
movq %r15, %rsi
callq 0x2ea47d
movq 0x38(%rsp), %rdi
movdqa 0x80(%rsp), %xmm0
movq %r15, %rsi
callq 0x2ea47d
pxor %xmm0, %xmm0
movdqa 0xe0(%rsp), %xmm8
movdqa 0xf0(%rsp), %xmm7
leal -0x1(%r15), %eax
psubq %xmm7, %xmm0
movq %rax, %rcx
shlq $0x4, %rcx
movq %r14, 0x58(%rsp)
addq %r14, %rcx
movl %r15d, %edx
movdqa %xmm0, (%rcx)
psubq %xmm8, %xmm0
addq $-0x10, %rcx
decl %edx
jg 0x387036
movl %eax, %eax
shlq $0x4, %rax
movq %r12, %rcx
addq %rax, %rcx
movq %rcx, 0xd0(%rsp)
movq %r15, %rax
shlq $0x4, %rax
cmpl $0x1, %r15d
movl %r15d, %ecx
adcl $0x0, %ecx
movl 0x18(%rsp), %esi
cmpl $0x2, %esi
movl $0x1, %edx
cmovgel %esi, %edx
movq %rdx, 0xc8(%rsp)
shlq $0x4, %rcx
movq %rcx, 0x20(%rsp)
movq %r15, 0xa8(%rsp)
movslq %r15d, %rcx
movq %rcx, 0xc0(%rsp)
movdqa 0x2703d8(%rip), %xmm13  # 0x5f7480
movdqa 0x2703df(%rip), %xmm14  # 0x5f7490
movdqa 0x26ee16(%rip), %xmm15  # 0x5f5ed0
movq $0x0, 0x10(%rsp)
xorl %edx, %edx
movl $0x0, 0xc(%rsp)
movdqa 0x80(%rsp), %xmm0
movdqa %xmm0, %xmm6
movdqa %xmm0, %xmm12
movdqa %xmm0, 0x100(%rsp)
movdqa 0x90(%rsp), %xmm9
movq %rax, 0x78(%rsp)
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x70(%rsp), %rax
movq %rdx, 0x18(%rsp)
movzbl (%rax,%rdx), %edx
movslq (%rcx,%rdx,4), %rcx
imulq 0xc0(%rsp), %rcx
shlq $0x4, %rcx
addq 0xd8(%rsp), %rcx
movq 0xd0(%rsp), %rax
movdqa (%rax), %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 %esi, %esi
movdqa 0x80(%rsp), %xmm1
movq 0x38(%rsp), %rbx
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %r14
movq 0x20(%rsp), %r11
movq 0x28(%rsp), %r15
movq 0x10(%rsp), %r13
movdqa (%r12,%rsi), %xmm2
movdqa (%rbx,%rsi), %xmm4
movdqa %xmm2, %xmm5
psubq %xmm7, %xmm5
psubq %xmm8, %xmm4
movq %xmm5, %r8
movq %xmm4, %rdx
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
movq %xmm5, %r9
pshufd $0xee, %xmm4, %xmm4     # xmm4 = xmm4[2,3,2,3]
movq %xmm4, %rdi
xorl %r10d, %r10d
cmpq %rdi, %r9
setg %r10b
cmovgq %r9, %rdi
xorl %r9d, %r9d
cmpq %rdx, %r8
cmovgq %r8, %rdx
setg %r9b
negq %r9
negq %r10
movq %r9, %xmm4
movq %r10, %xmm5
punpcklqdq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0]
pand 0x27027d(%rip), %xmm4   # 0x5f7450
pxor 0x270285(%rip), %xmm4   # 0x5f7460
movq 0x10(%r15), %r8
movq (%r8), %r8
paddq (%r14,%rsi), %xmm3
addq %r13, %r8
paddq (%rcx,%rsi), %xmm0
movdqa %xmm4, (%rsi,%r8)
movq %rdx, %xmm4
movq %rdi, %xmm5
punpcklqdq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0]
movq %xmm1, %r9
movq %xmm3, %r8
cmpq %r8, %r9
cmovgq %r9, %r8
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %r9
pshufd $0xee, %xmm3, %xmm1     # xmm1 = xmm3[2,3,2,3]
movq %xmm1, %r10
cmpq %r10, %r9
cmovgq %r9, %r10
movq %r8, %xmm1
movq %r10, %xmm3
punpcklqdq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0]
movq %xmm0, %r9
cmpq %r9, %rdx
cmovleq %r9, %rdx
pshufd $0xee, %xmm0, %xmm3     # xmm3 = xmm0[2,3,2,3]
movq %xmm3, %r9
cmpq %r9, %rdi
cmovleq %r9, %rdi
movq %rdx, %xmm3
movq %rdi, %xmm5
punpcklqdq %xmm5, %xmm3    # xmm3 = xmm3[0],xmm5[0]
movdqa %xmm4, (%rbx,%rsi)
movdqa %xmm3, (%rax,%rsi)
movdqa %xmm0, (%r12,%rsi)
addq $0x10, %rsi
movdqa %xmm2, %xmm0
cmpq %rsi, %r11
jne 0x387165
movq (%r14), %rcx
cmpq %rcx, %r8
cmovgq %r8, %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 0x110(%rsp), %xmm0
movq %xmm0, %rcx
testq %rcx, %rcx
movl $0x0, %edi
cmovleq %rdi, %rcx
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movq %xmm1, %rsi
cmpq %rdx, %rsi
cmovgq %rsi, %rdx
testq %rdx, %rdx
cmovleq %rdi, %rdx
movq %rdx, %xmm2
movq %rcx, %xmm1
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
xorl %ecx, %ecx
movdqa 0x2701b7(%rip), %xmm10  # 0x5f74a0
movq %r13, %r11
movq 0x28(%rsp), %rdx
movq 0x10(%rdx), %rdx
movq (%rdx), %rsi
addq %r11, %rsi
psubq %xmm7, %xmm1
psubq %xmm8, %xmm0
movq %xmm1, %rdx
movq %xmm0, %rdi
xorl %r9d, %r9d
cmpq %rdi, %rdx
cmovgq %rdx, %rdi
pshufd $0xee, %xmm1, %xmm1     # xmm1 = xmm1[2,3,2,3]
movq %xmm1, %rdx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %r8
setg %r9b
negq %r9
xorl %r10d, %r10d
cmpq %r8, %rdx
cmovgq %rdx, %r8
movq %rdi, %xmm0
movq %r8, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
setg %r10b
negq %r10
movq %r9, %xmm2
movq %r10, %xmm1
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
movq (%rax,%rcx), %rdx
movq 0x8(%rax,%rcx), %rbx
cmpq %rdi, %rdx
cmovleq %rdi, %rdx
cmpq %r8, %rbx
cmovleq %r8, %rbx
xorl %r9d, %r9d
testq %rdx, %rdx
movl $0x0, %r14d
cmovleq %r14, %rdx
setle %r9b
negq %r9
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
punpcklqdq %xmm4, %xmm3    # xmm3 = xmm3[0],xmm4[0]
xorl %r9d, %r9d
cmpq (%r12,%rcx), %rdx
sete %r9b
negq %r9
xorl %r10d, %r10d
cmpq 0x8(%r12,%rcx), %rbx
sete %r10b
negq %r10
movq %r9, %xmm4
movq %r10, %xmm5
punpcklqdq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0]
xorl %r9d, %r9d
cmpq %rdi, %rdx
sete %r9b
negq %r9
xorl %edi, %edi
cmpq %r8, %rbx
sete %dil
negq %rdi
movq %r9, %xmm5
movdqa %xmm6, %xmm11
movq %rdi, %xmm6
punpcklqdq %xmm6, %xmm5    # xmm5 = xmm5[0],xmm6[0]
pand %xmm14, %xmm5
pxor %xmm15, %xmm5
movdqa %xmm4, %xmm6
pandn %xmm5, %xmm6
pand %xmm10, %xmm4
por %xmm6, %xmm4
pandn %xmm4, %xmm3
pand 0x270037(%rip), %xmm2   # 0x5f7470
pxor %xmm13, %xmm2
por (%rcx,%rsi), %xmm2
por %xmm3, %xmm2
movq %xmm9, %rbp
cmpq %rdx, %rbp
cmovgeq %rdx, %rbp
movdqa %xmm2, (%rcx,%rsi)
pshufd $0xee, %xmm9, %xmm2     # xmm2 = xmm9[2,3,2,3]
movq %xmm2, %r15
cmpq %rbx, %r15
cmovgeq %rbx, %r15
movq %rbp, %xmm9
movq %r15, %xmm2
movq %xmm11, %r13
cmpq %rdx, %r13
cmovleq %rdx, %r13
punpcklqdq %xmm2, %xmm9    # xmm9 = xmm9[0],xmm2[0]
pshufd $0xee, %xmm11, %xmm2    # xmm2 = xmm11[2,3,2,3]
movq %xmm2, %r14
cmpq %rbx, %r14
cmovleq %rbx, %r14
movq %r13, %xmm6
movq %r14, %xmm2
movq %xmm12, %rsi
cmpq %rsi, %rdx
cmovleq %rsi, %rdx
punpcklqdq %xmm2, %xmm6    # xmm6 = xmm6[0],xmm2[0]
pshufd $0xee, %xmm12, %xmm2    # xmm2 = xmm12[2,3,2,3]
movq %xmm2, %rsi
cmpq %rsi, %rbx
cmovleq %rsi, %rbx
movq %rdx, %xmm12
movq %rbx, %xmm2
punpcklqdq %xmm2, %xmm12   # xmm12 = xmm12[0],xmm2[0]
movdqa %xmm1, (%r12,%rcx)
addq $0x10, %rcx
cmpq %rcx, 0x20(%rsp)
jne 0x3872ec
movdqa 0x100(%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 0x78(%rsp), %rax
movq 0x18(%rsp), %rcx
je 0x3875e0
cmpq %rbx, %rdx
cmovgq %rdx, %rbx
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x100(%rsp)
movq 0x40(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
movdqa %xmm9, 0x90(%rsp)
movdqa %xmm6, 0x130(%rsp)
movdqa %xmm12, 0x120(%rsp)
callq 0x19e0c0
movq 0x18(%rsp), %rcx
movdqa 0x120(%rsp), %xmm12
movdqa 0x130(%rsp), %xmm6
movdqa 0x26e92d(%rip), %xmm15  # 0x5f5ed0
movdqa 0x26fee4(%rip), %xmm14  # 0x5f7490
movdqa 0x26fecb(%rip), %xmm13  # 0x5f7480
movdqa 0x90(%rsp), %xmm9
movdqa 0xe0(%rsp), %xmm8
movdqa 0xf0(%rsp), %xmm7
movq %rbx, 0x30(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x78(%rsp), %rax
incq %rcx
addq %rax, 0x10(%rsp)
cmpq 0xc8(%rsp), %rcx
movq %rcx, %rdx
jne 0x3870f7
testl $0x7ffffffe, 0xb8(%rsp) # imm = 0x7FFFFFFE
je 0x387652
movq 0xa8(%rsp), %r9
movl %r9d, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
addl %ecx, %ecx
xorl %edx, %edx
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %r10
movq 0x40(%rsp), %rax
cmpq %r10, (%rax,%rdx,8)
jne 0x387649
movl %edx, %esi
shrl %esi
testb $0x1, %dl
movl $0x0, %edi
cmovnel %r9d, %edi
addl %esi, %edi
cmpl %r8d, %edi
cmovll %edi, %r8d
incq %rdx
cmpl %edx, %ecx
jne 0x38762a
jmp 0x38765c
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %r10
xorl %ecx, %ecx
movq 0x48(%rsp), %rax
cmpq %rax, %rbp
setle %cl
negq %rcx
xorl %edx, %edx
cmpq %rax, %r15
setle %dl
negq %rdx
movq %rdx, %xmm0
movq %rcx, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
xorl %ecx, %ecx
movq 0xb0(%rsp), %rax
cmpq %rax, %r13
setg %cl
negq %rcx
xorl %edx, %edx
cmpq %rax, %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
movl 0xc(%rsp), %eax
movq 0x28(%rsp), %rcx
je 0x3876d2
orb $0x40, 0xc(%rcx)
xorl %r10d, %r10d
xorl %eax, %eax
xorl %r8d, %r8d
movl %r10d, (%rcx)
movl %r8d, 0x4(%rcx)
movl %eax, 0x8(%rcx)
movq 0x58(%rsp), %rdi
callq 0x2094b5
movq 0x40(%rsp), %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq 0x60(%rsp), %rdi
callq 0x2094b5
movq 0x38(%rsp), %rdi
callq 0x2094b5
movq 0x28(%rsp), %rax
jmp 0x38774b
callq 0x1bc5e1
jmp 0x387749
callq 0x1bc5bb
jmp 0x387749
callq 0x1bc595
jmp 0x387749
callq 0x1bc56f
jmp 0x387749
callq 0x1bc549
jmp 0x387749
callq 0x1bc523
jmp 0x387749
callq 0x1bc4fd
jmp 0x387749
callq 0x1bc4d7
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)