// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/sg_striped_sse2_128_64.c
// Function: parasail_sg_flags_table_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,
        int s1_beg, int s1_end, int s2_beg, int s2_end)
{
    /* 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 vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvE = NULL;
    int64_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    int64_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vMaxH;
    __m128i vPosMask;
    parasail_result_t *result = NULL;

    /* 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;
    vProfile = (__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;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm_cmpeq_epi64_rpl(_mm_set1_epi64x_rpl(position),
            _mm_set_epi64x_rpl(0,1));

    /* initialize result */
#ifdef PARASAIL_TABLE
    result = parasail_result_new_table1(segLen*segWidth, s2Len);
#else
#ifdef PARASAIL_ROWCOL
    result = parasail_result_new_rowcol1(segLen*segWidth, s2Len);
#else
    result = parasail_result_new();
#endif
#endif
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SG | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_2;
    result->flag |= s1_beg ? PARASAIL_FLAG_SG_S1_BEG : 0;
    result->flag |= s1_end ? PARASAIL_FLAG_SG_S1_END : 0;
    result->flag |= s2_beg ? PARASAIL_FLAG_SG_S2_BEG : 0;
    result->flag |= s2_end ? PARASAIL_FLAG_SG_S2_END : 0;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad =  parasail_memalign___m128i(16, segLen);
    pvE      = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int64_t(16, s2Len+1);

    /* validate heap variables */
    if (!pvHStore) return NULL;
    if (!pvHLoad) return NULL;
    if (!pvE) return NULL;
    if (!boundary) 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 = s1_beg ? 0 : (-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(&pvHStore[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 = s2_beg ? 0 : (-open-gap*(i-1));
            boundary[i] = tmp < INT64_MIN ? INT64_MIN : tmp;
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        /* Initialize F value to -inf.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        __m128i vF = vNegLimit;

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

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

        /* Swap the 2 H buffers. */
        __m128i* pv = pvHLoad;
        pvHLoad = pvHStore;
        pvHStore = pv;

        /* insert upper boundary condition */
        vH = _mm_insert_epi64_rpl(vH, boundary[j], 0);

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

            /* Get max from vH, vE and vF. */
            vH = _mm_max_epi64_rpl(vH, vE);
            vH = _mm_max_epi64_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
            vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vF);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif

            /* Update vE value. */
            vH = _mm_sub_epi64(vH, vGapO);
            vE = _mm_sub_epi64(vE, vGapE);
            vE = _mm_max_epi64_rpl(vE, vH);
            _mm_store_si128(pvE + i, vE);

            /* Update vF value. */
            vF = _mm_sub_epi64(vF, vGapE);
            vF = _mm_max_epi64_rpl(vF, vH);

            /* 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 */
        for (k=0; k<segWidth; ++k) {
            int64_t tmp = s2_beg ? -open : (boundary[j+1]-open);
            int64_t tmp2 = tmp < INT64_MIN ? INT64_MIN : tmp;
            vF = _mm_slli_si128(vF, 8);
            vF = _mm_insert_epi64_rpl(vF, tmp2, 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);
                vSaturationCheckMin = _mm_min_epi64_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm_max_epi64_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
                arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vH = _mm_sub_epi64(vH, vGapO);
                vF = _mm_sub_epi64(vF, vGapE);
                if (! _mm_movemask_epi8(_mm_cmpgt_epi64_rpl(vF, vH))) goto end;
                /*vF = _mm_max_epi64_rpl(vF, vH);*/
            }
        }
end:
        {
            /* extract vector containing last value from the column */
            __m128i vCompare;
            vH = _mm_load_si128(pvHStore + offset);
            vCompare = _mm_and_si128(vPosMask, _mm_cmpgt_epi64_rpl(vH, vMaxH));
            vMaxH = _mm_max_epi64_rpl(vH, vMaxH);
            if (_mm_movemask_epi8(vCompare)) {
                end_ref = j;
            }
#ifdef PARASAIL_ROWCOL
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 8);
            }
            result->rowcols->score_row[j] = (int64_t) _mm_extract_epi64_rpl (vH, 1);
#endif
        }
    }

#ifdef PARASAIL_ROWCOL
    for (i=0; i<segLen; ++i) {
        __m128i vH = _mm_load_si128(pvHStore + i);
        arr_store_col(result->rowcols->score_col, vH, i, segLen);
    }
#endif

    /* max last value from all columns */
    if (s2_end)
    {
        for (k=0; k<position; ++k) {
            vMaxH = _mm_slli_si128(vMaxH, 8);
        }
        score = (int64_t) _mm_extract_epi64_rpl(vMaxH, 1);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int64_t *t = (int64_t*)pvHStore;
        int32_t column_len = segLen * segWidth;
        for (i = 0; i<column_len; ++i, ++t) {
            int32_t temp = i / segWidth + i % segWidth * segLen;
            if (temp >= s1Len) continue;
            if (*t > score) {
                score = *t;
                end_query = temp;
                end_ref = s2Len-1;
            }
            else if (*t == score && end_ref == s2Len-1 && temp < end_query) {
                end_query = temp;
            }
        }
    }

    if (!s1_end && !s2_end) {
        /* extract last value from the last column */
        {
            __m128i vH = _mm_load_si128(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 8);
            }
            score = (int64_t) _mm_extract_epi64_rpl (vH, 1);
            end_ref = s2Len - 1;
            end_query = s1Len - 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(boundary);
    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 $0xe8, %rsp
movq %rsi, 0x78(%rsp)
testq %rdi, %rdi
je 0x30ceed
movq 0x60(%rdi), %rax
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0x30cef7
movq 0x10(%rdi), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x30cf01
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x30cf0b
cmpq $0x0, 0x78(%rsp)
je 0x30cf15
movl %r9d, %r13d
movl %edx, %r9d
testl %edx, %edx
jle 0x30cf1f
testl %ecx, %ecx
js 0x30cf29
testl %r8d, %r8d
js 0x30cf33
movl %r8d, 0x28(%rsp)
leal -0x1(%rax), %r10d
movq %rax, 0x90(%rsp)
leaq 0x1(%rax), %rdi
movq %rdi, %r15
shrq %r15
movl %r10d, %eax
xorl %edx, %edx
divl %r15d
movl %edx, 0x50(%rsp)
xorl %r14d, %r14d
movl %ecx, %ebp
negl %ecx
movq 0x70(%rsp), %rsi
movslq 0x20(%rsi), %rdx
movq %rbp, %r8
btsq $0x3f, %r8
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
subq %rdx, %r12
movq %rcx, 0x20(%rsp)
cmpl %ecx, %edx
cmovgq %r8, %r12
movslq 0x1c(%rsi), %rcx
movq %rcx, 0x18(%rsp)
movl %r10d, 0x10(%rsp)
cmpl %r15d, %r10d
movl $0x0, %ecx
sbbq %rcx, %rcx
movq %rcx, 0x40(%rsp)
movl %eax, 0x64(%rsp)
cmpl $0x1, %eax
sete 0x30(%rsp)
andl $0x7ffffffe, %edi       # imm = 0x7FFFFFFE
movq %rdi, 0x88(%rsp)
movl %r9d, %esi
movq %r9, 0x8(%rsp)
callq 0x20abc2
testq %rax, %rax
je 0x30c581
movq %rax, %rbx
movq %r12, 0x68(%rsp)
xorl %eax, %eax
testl %r13d, %r13d
setne %al
xorl %ecx, %ecx
cmpl $0x0, 0x120(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x128(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x130(%rsp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rax,8), %eax
orl %edx, %eax
orl %esi, %eax
orl 0xc(%rbx), %eax
orl $0x2820802, %eax        # imm = 0x2820802
movl %eax, 0xc(%rbx)
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, 0x58(%rsp)
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %r14
movl $0x10, %edi
movq %r15, %rsi
callq 0x2f600c
movq %rax, %r12
movq 0x8(%rsp), %rax
leal 0x1(%rax), %esi
movl $0x10, %edi
movq %rsi, 0x48(%rsp)
callq 0x20a636
movq 0x58(%rsp), %rcx
movq %rcx, %xmm0
movq %r14, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %r12, %xmm1
movq %rax, %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
testl %ecx, %ecx
je 0x30c596
xorl %r14d, %r14d
movq %r14, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x38(%rsp)
leaq 0xb8(%rsp), %r9
leaq 0xc8(%rsp), %r10
movq 0x8(%rsp), %rax
decl %eax
movl %eax, 0x14(%rsp)
movq %rbp, %xmm0
pshufd $0x44, %xmm0, %xmm2     # xmm2 = xmm0[0,1,0,1]
movl 0x28(%rsp), %ecx
movd %ecx, %xmm0
pshufd $0x44, %xmm0, %xmm3     # xmm3 = xmm0[0,1,0,1]
movq 0x68(%rsp), %rax
incq %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq 0x18(%rsp), %rdx
addq $-0x2, %rdx
movq %rax, 0x80(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xa0(%rsp)
movq %rdx, %xmm0
movdqa %xmm0, 0xd0(%rsp)
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
xorl %eax, %eax
movb 0x30(%rsp), %dl
movb %dl, %al
negq %rax
movq %rax, %xmm4
movq 0x40(%rsp), %xmm6
punpcklqdq %xmm4, %xmm6    # xmm6 = xmm6[0],xmm4[0]
movq %r15, 0x18(%rsp)
movl %r15d, %edx
movl %ecx, %esi
movslq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
xorl %r8d, %r8d
movb $0x1, %r11b
leaq 0xb0(%rsp), %rax
leaq 0xc0(%rsp), %rcx
xorl %r15d, %r15d
testl %r13d, %r13d
je 0x30c666
xorl %edi, %edi
jmp 0x30c679
imulq %rdx, %r15
addq %r8, %r15
imulq %rsi, %r15
movq 0x40(%rsp), %rdi
subq %r15, %rdi
movq %rdi, (%rcx)
subq %rbp, %rdi
movq %rdi, (%rax)
movl $0x1, %r15d
movq %r9, %rax
movq %r10, %rcx
testb $0x1, %r11b
movl $0x0, %r11d
jne 0x30c65d
movq %r8, %rax
shlq $0x4, %rax
movaps 0xc0(%rsp), %xmm4
movq 0x58(%rsp), %rcx
movaps %xmm4, (%rcx,%rax)
movdqa 0xb0(%rsp), %xmm4
movdqa %xmm4, (%r12,%rax)
incq %r8
cmpq 0x18(%rsp), %r8
jne 0x30c647
movq 0x38(%rsp), %rdi
movq $0x0, (%rdi)
movl 0x8(%rsp), %eax
movq 0x48(%rsp), %r11
andl $-0x2, %r11d
movq %rax, 0x30(%rsp)
decq %rax
movq %rax, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
movl 0x28(%rsp), %r9d
movl %r9d, %eax
negl %eax
addl %r9d, %r9d
xorl %ecx, %ecx
movdqa 0x31c77f(%rip), %xmm7   # 0x628e90
movdqa 0x31c786(%rip), %xmm8   # 0x628ea0
pxor %xmm8, %xmm4
pcmpeqd %xmm9, %xmm9
xorl %edx, %edx
movl 0x128(%rsp), %r8d
movq 0x20(%rsp), %r10
movq %rdx, %xmm10
pshufd $0x44, %xmm10, %xmm10   # xmm10 = xmm10[0,1,0,1]
por %xmm7, %xmm10
pxor %xmm8, %xmm10
movdqa %xmm10, %xmm11
pcmpgtd %xmm4, %xmm11
pcmpeqd %xmm4, %xmm10
pshufd $0xf5, %xmm10, %xmm12   # xmm12 = xmm10[1,1,3,3]
pand %xmm11, %xmm12
pshufd $0xf5, %xmm11, %xmm10   # xmm10 = xmm11[1,1,3,3]
por %xmm12, %xmm10
movd %xmm10, %esi
notl %esi
testb $0x1, %sil
je 0x30c78e
testl %r8d, %r8d
movl $0x0, %esi
cmovel %r10d, %esi
movslq %esi, %rsi
movq %rsi, 0x8(%rdi,%rdx,8)
pxor %xmm9, %xmm10
pextrw $0x4, %xmm10, %esi
testb $0x1, %sil
je 0x30c7b1
leal (%rax,%r10), %esi
testl %r8d, %r8d
cmovnel %ecx, %esi
movslq %esi, %rsi
movq %rsi, 0x10(%rdi,%rdx,8)
addq $0x2, %rdx
subl %r9d, %r10d
cmpq %rdx, %r11
jne 0x30c733
movq 0x18(%rsp), %rax
leal -0x1(%rax), %esi
movl 0x50(%rsp), %ecx
movq %rax, %r11
movq 0x30(%rsp), %rdx
imulq %rdx, %r11
shlq $0x2, %r11
leaq (,%rdx,4), %r13
movq %rax, %r8
shlq $0x4, %r8
xorl %r9d, %r9d
shlq $0x4, %rsi
movq %rsi, 0x28(%rsp)
cltq
movq %rax, 0x20(%rsp)
movdqa 0x31d189(%rip), %xmm4   # 0x629990
movq %rcx, 0x48(%rsp)
shlq $0x4, %rcx
movq %rcx, 0x50(%rsp)
xorl %ecx, %ecx
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
movdqa 0xa0(%rsp), %xmm7
movdqa %xmm7, %xmm8
movq 0x58(%rsp), %rax
movq %r14, %r15
movq %rax, %r14
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rdx
movzbl (%rdx,%rcx), %edx
movslq (%rax,%rdx,4), %r10
imulq 0x20(%rsp), %r10
shlq $0x4, %r10
movq (%rdi,%rcx,8), %xmm11
movq 0x28(%rsp), %rax
punpcklqdq (%r14,%rax), %xmm11 # xmm11 = xmm11[0],mem[0]
addq 0x98(%rsp), %r10
movq %r9, %rdx
xorl %eax, %eax
movdqa 0xa0(%rsp), %xmm9
paddq (%r10,%rax), %xmm11
movdqa (%r12,%rax), %xmm10
movdqa %xmm11, %xmm13
pxor %xmm4, %xmm13
movdqa %xmm10, %xmm12
pxor %xmm4, %xmm12
movdqa %xmm13, %xmm14
pcmpgtd %xmm12, %xmm14
pshufd $0xa0, %xmm14, %xmm15   # xmm15 = xmm14[0,0,2,2]
pcmpeqd %xmm12, %xmm13
pshufd $0xf5, %xmm13, %xmm13   # xmm13 = xmm13[1,1,3,3]
pand %xmm15, %xmm13
pshufd $0xf5, %xmm14, %xmm14   # xmm14 = xmm14[1,1,3,3]
por %xmm13, %xmm14
pand %xmm14, %xmm11
pandn %xmm10, %xmm14
por %xmm11, %xmm14
movdqa %xmm14, %xmm11
pxor %xmm4, %xmm11
movdqa %xmm9, %xmm13
pxor %xmm4, %xmm13
movdqa %xmm11, %xmm15
pcmpgtd %xmm13, %xmm15
pshufd $0xa0, %xmm15, %xmm0    # xmm0 = xmm15[0,0,2,2]
pcmpeqd %xmm13, %xmm11
pshufd $0xf5, %xmm11, %xmm5    # xmm5 = xmm11[1,1,3,3]
pand %xmm0, %xmm5
pshufd $0xf5, %xmm15, %xmm11   # xmm11 = xmm15[1,1,3,3]
por %xmm5, %xmm11
pand %xmm11, %xmm14
pandn %xmm9, %xmm11
por %xmm14, %xmm11
movdqa %xmm11, (%r15,%rax)
movdqa %xmm7, %xmm0
pxor %xmm4, %xmm7
movdqa %xmm11, %xmm5
pxor %xmm4, %xmm5
movdqa %xmm7, %xmm14
pcmpgtd %xmm5, %xmm14
pshufd $0xa0, %xmm14, %xmm15   # xmm15 = xmm14[0,0,2,2]
pcmpeqd %xmm5, %xmm7
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pand %xmm15, %xmm7
pshufd $0xf5, %xmm14, %xmm14   # xmm14 = xmm14[1,1,3,3]
por %xmm7, %xmm14
pand %xmm14, %xmm0
pandn %xmm11, %xmm14
movdqa %xmm14, %xmm7
por %xmm0, %xmm7
movdqa %xmm1, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm5, %xmm14
pcmpgtd %xmm0, %xmm14
pshufd $0xa0, %xmm14, %xmm15   # xmm15 = xmm14[0,0,2,2]
pcmpeqd %xmm5, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm15, %xmm0
pshufd $0xf5, %xmm14, %xmm5    # xmm5 = xmm14[1,1,3,3]
por %xmm0, %xmm5
pand %xmm5, %xmm1
pandn %xmm11, %xmm5
por %xmm1, %xmm5
movdqa %xmm5, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm12, %xmm1
pcmpgtd %xmm0, %xmm1
pshufd $0xa0, %xmm1, %xmm14    # xmm14 = xmm1[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm14, %xmm0
pshufd $0xf5, %xmm1, %xmm12    # xmm12 = xmm1[1,1,3,3]
por %xmm0, %xmm12
pand %xmm12, %xmm5
pandn %xmm10, %xmm12
por %xmm5, %xmm12
movdqa %xmm12, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm13, %xmm1
pcmpgtd %xmm0, %xmm1
pshufd $0xa0, %xmm1, %xmm5     # xmm5 = xmm1[0,0,2,2]
pcmpeqd %xmm13, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm5, %xmm0
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
por %xmm0, %xmm1
pand %xmm1, %xmm12
pandn %xmm9, %xmm1
por %xmm12, %xmm1
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
movd %xmm11, (%rdi,%rdx)
addq %rdx, %rdi
pshufd $0xee, %xmm11, %xmm0    # xmm0 = xmm11[2,3,2,3]
movd %xmm0, (%r11,%rdi)
psubq %xmm2, %xmm11
psubq %xmm3, %xmm10
movdqa %xmm10, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm11, %xmm12
pxor %xmm4, %xmm12
movdqa %xmm0, %xmm5
pcmpgtd %xmm12, %xmm5
pshufd $0xa0, %xmm5, %xmm13    # xmm13 = xmm5[0,0,2,2]
pcmpeqd %xmm12, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm13, %xmm0
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
por %xmm0, %xmm5
pand %xmm5, %xmm10
pandn %xmm11, %xmm5
por %xmm10, %xmm5
movdqa %xmm5, (%r12,%rax)
psubq %xmm3, %xmm9
movdqa %xmm9, %xmm0
pxor %xmm4, %xmm9
movdqa %xmm9, %xmm5
pcmpgtd %xmm12, %xmm5
pshufd $0xa0, %xmm5, %xmm10    # xmm10 = xmm5[0,0,2,2]
pcmpeqd %xmm12, %xmm9
pshufd $0xf5, %xmm9, %xmm9     # xmm9 = xmm9[1,1,3,3]
pand %xmm10, %xmm9
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
por %xmm9, %xmm5
pand %xmm5, %xmm0
pandn %xmm11, %xmm5
movdqa %xmm5, %xmm9
por %xmm0, %xmm9
movdqa (%r14,%rax), %xmm11
addq $0x10, %rax
addq %r13, %rdx
cmpq %rax, %r8
jne 0x30c880
movb $0x1, %al
movq 0x40(%rsp), %rdx
cmpl $0x0, 0x128(%rsp)
jne 0x30cb29
movq 0x38(%rsp), %rdx
movq 0x8(%rdx,%rcx,8), %rdx
subq %rbp, %rdx
movq %rdx, %xmm0
punpcklqdq %xmm9, %xmm0    # xmm0 = xmm0[0],xmm9[0]
movq %r9, %rdx
xorl %r10d, %r10d
movdqa %xmm0, %xmm9
movdqa (%r15,%r10), %xmm0
movdqa %xmm9, %xmm5
pxor %xmm4, %xmm5
movdqa %xmm0, %xmm10
pxor %xmm4, %xmm10
movdqa %xmm10, %xmm11
pcmpgtd %xmm5, %xmm11
pshufd $0xa0, %xmm11, %xmm12   # xmm12 = xmm11[0,0,2,2]
pcmpeqd %xmm5, %xmm10
pshufd $0xf5, %xmm10, %xmm5    # xmm5 = xmm10[1,1,3,3]
pand %xmm12, %xmm5
pshufd $0xf5, %xmm11, %xmm10   # xmm10 = xmm11[1,1,3,3]
por %xmm5, %xmm10
pand %xmm10, %xmm0
pandn %xmm9, %xmm10
por %xmm0, %xmm10
movdqa %xmm10, (%r15,%r10)
movdqa %xmm1, %xmm0
pxor %xmm4, %xmm1
movdqa %xmm10, %xmm11
pxor %xmm4, %xmm11
movdqa %xmm11, %xmm5
pcmpgtd %xmm1, %xmm5
pshufd $0xa0, %xmm5, %xmm12    # xmm12 = xmm5[0,0,2,2]
pcmpeqd %xmm11, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm12, %xmm1
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
por %xmm1, %xmm5
pand %xmm5, %xmm0
pandn %xmm10, %xmm5
movdqa %xmm5, %xmm1
por %xmm0, %xmm1
movdqa %xmm7, %xmm0
pxor %xmm4, %xmm7
movdqa %xmm7, %xmm5
pcmpgtd %xmm11, %xmm5
pshufd $0xa0, %xmm5, %xmm12    # xmm12 = xmm5[0,0,2,2]
pcmpeqd %xmm11, %xmm7
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
pand %xmm12, %xmm7
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
por %xmm7, %xmm5
pand %xmm5, %xmm0
pandn %xmm10, %xmm5
movdqa %xmm5, %xmm7
por %xmm0, %xmm7
movq 0x10(%rbx), %rdi
movq (%rdi), %rdi
movd %xmm10, (%rdi,%rdx)
addq %rdx, %rdi
pshufd $0xee, %xmm10, %xmm0    # xmm0 = xmm10[2,3,2,3]
movd %xmm0, (%r11,%rdi)
psubq %xmm2, %xmm10
psubq %xmm3, %xmm9
pxor %xmm4, %xmm10
movdqa %xmm9, %xmm0
pxor %xmm4, %xmm0
movdqa %xmm0, %xmm5
pcmpgtd %xmm10, %xmm5
pshufd $0xa0, %xmm5, %xmm11    # xmm11 = xmm5[0,0,2,2]
pcmpeqd %xmm10, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm11, %xmm0
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
por %xmm0, %xmm5
movmskps %xmm5, %edi
testl %edi, %edi
je 0x30cca0
addq $0x10, %r10
addq %r13, %rdx
cmpq %r10, %r8
jne 0x30cb3e
testb $0x1, %al
movl $0x0, %eax
jne 0x30cb0d
movq %xmm8, %rax
movq 0x50(%rsp), %rsi
movq (%r15,%rsi), %rdx
movq 0x8(%r15,%rsi), %rdi
pshufd $0xee, %xmm8, %xmm0     # xmm0 = xmm8[2,3,2,3]
movq %xmm0, %r10
xorl %esi, %esi
cmpq %r10, %rdi
setg %sil
cmovgq %rdi, %r10
xorl %edi, %edi
cmpq %rax, %rdx
setg %dil
cmovgq %rdx, %rax
negq %rdi
negq %rsi
movq %rsi, %xmm0
movq %rdi, %xmm5
punpcklqdq %xmm0, %xmm5    # xmm5 = xmm5[0],xmm0[0]
pand %xmm6, %xmm5
movq %r10, %xmm0
movq %rax, %xmm8
punpcklqdq %xmm0, %xmm8    # xmm8 = xmm8[0],xmm0[0]
pmovmskb %xmm5, %eax
testl %eax, %eax
movl 0x8(%rsp), %eax
cmovnel %ecx, %eax
movl %eax, 0x8(%rsp)
incq %rcx
addq $0x4, %r9
movq %r15, %rax
cmpq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rdi
jne 0x30c832
movl 0x130(%rsp), %ebp
testl %ebp, %ebp
movl 0x64(%rsp), %r9d
movq 0x90(%rsp), %r10
movq 0x18(%rsp), %r11
movl 0x120(%rsp), %r13d
movq 0x80(%rsp), %r8
je 0x30cd72
testl %r9d, %r9d
jg 0x30cd67
pslldq $0x8, %xmm8             # xmm8 = zero,zero,zero,zero,zero,zero,zero,zero,xmm8[0,1,2,3,4,5,6,7]
testl %r9d, %r9d
js 0x30cd5c
pshufd $0xee, %xmm8, %xmm0     # xmm0 = xmm8[2,3,2,3]
movq %xmm0, %r8
testl %r13d, %r13d
je 0x30cde5
cmpl $0x0, 0x88(%rsp)
je 0x30cde5
movl %r11d, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
addl %ecx, %ecx
xorl %edx, %edx
movl 0x10(%rsp), %eax
movl %edx, %esi
shrl %esi
testb $0x1, %dl
movl $0x0, %edi
cmovnel %r11d, %edi
addl %esi, %edi
cmpl %r10d, %edi
jge 0x30cddc
movq %r8, %rsi
movq (%r15,%rdx,8), %r8
cmpq %rsi, %r8
jle 0x30cdc1
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
movl %edi, %eax
jmp 0x30cddc
cmpl %eax, %edi
cmovgel %eax, %edi
movl 0x8(%rsp), %r13d
cmpl 0x14(%rsp), %r13d
cmovnel %eax, %edi
cmpq %rsi, %r8
cmovel %edi, %eax
movq %rsi, %r8
incq %rdx
cmpl %edx, %ecx
jne 0x30cd92
jmp 0x30cde9
movl 0x10(%rsp), %eax
orl 0x120(%rsp), %ebp
movq 0x38(%rsp), %rdi
jne 0x30ce2b
movq 0x48(%rsp), %rax
shlq $0x4, %rax
movdqa (%r15,%rax), %xmm2
testl %r9d, %r9d
jg 0x30ce15
pslldq $0x8, %xmm2             # xmm2 = zero,zero,zero,zero,zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6,7]
testl %r9d, %r9d
js 0x30ce0b
pshufd $0xee, %xmm2, %xmm0     # xmm0 = xmm2[2,3,2,3]
movq %xmm0, %r8
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x10(%rsp), %eax
movq 0x68(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pxor %xmm4, %xmm1
pxor %xmm4, %xmm0
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm3, %xmm0
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
por %xmm0, %xmm1
pcmpeqd %xmm0, %xmm0
pxor %xmm1, %xmm0
pshufd $0x44, 0xd0(%rsp), %xmm1 # xmm1 = mem[0,1,0,1]
pxor %xmm4, %xmm7
pxor %xmm4, %xmm1
movdqa %xmm7, %xmm2
pcmpgtd %xmm1, %xmm2
pshufd $0xa0, %xmm2, %xmm3     # xmm3 = xmm2[0,0,2,2]
pcmpeqd %xmm7, %xmm1
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
pand %xmm3, %xmm1
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
por %xmm1, %xmm2
por %xmm0, %xmm2
pmovmskb %xmm2, %ecx
testl %ecx, %ecx
je 0x30cebb
orb $0x40, 0xc(%rbx)
xorl %r8d, %r8d
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movl %r8d, (%rbx)
movl %eax, 0x4(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rbx)
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %rbx, %r14
jmp 0x30c581
callq 0x1ada73
jmp 0x30c57e
callq 0x1ada4d
jmp 0x30c57e
callq 0x1ada27
jmp 0x30c57e
callq 0x1ada01
jmp 0x30c57e
callq 0x1ad9db
jmp 0x30c57e
callq 0x1ad9b5
jmp 0x30c57e
callq 0x1ad98f
jmp 0x30c57e
callq 0x1ad969
jmp 0x30c57e