// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sg_striped_sse2_128_64.c
// Function: parasail_sg_flags_rowcol_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 $0x168, %rsp            # imm = 0x168
movq %rsi, 0xb0(%rsp)
testq %rdi, %rdi
je 0x303bd9
movq 0x60(%rdi), %rax
movq %rax, 0xe0(%rsp)
testq %rax, %rax
je 0x303bfd
movq 0x10(%rdi), %rax
movq %rax, 0xa8(%rsp)
testq %rax, %rax
je 0x303d26
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x303d4a
cmpq $0x0, 0xb0(%rsp)
je 0x303d6e
movl %r9d, %r12d
movl %edx, %r9d
testl %edx, %edx
jle 0x303d8f
movl %ecx, %r15d
testl %ecx, %ecx
js 0x303db0
testl %r8d, %r8d
js 0x303dd1
movl %r8d, 0x50(%rsp)
leal -0x1(%rax), %r13d
movq %rax, 0xc8(%rsp)
leaq 0x1(%rax), %rdi
movq %rdi, %r14
shrq %r14
movl %r13d, %eax
xorl %edx, %edx
divl %r14d
movl %edx, 0x70(%rsp)
decl %eax
movl %eax, 0xc(%rsp)
sete 0x40(%rsp)
movl %r15d, %ebp
negl %r15d
movq 0xa8(%rsp), %rsi
movslq 0x20(%rsi), %rax
movq %rbp, %rcx
btsq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq %rax, %rdx
cmpl %r15d, %eax
cmovgq %rcx, %rdx
movq %rdx, 0x88(%rsp)
movslq 0x1c(%rsi), %rax
movq %rax, 0x38(%rsp)
cmpl %r14d, %r13d
movl $0x0, %eax
sbbq %rax, %rax
movq %rax, 0x68(%rsp)
andl $0x7ffffffe, %edi       # imm = 0x7FFFFFFE
movl %r9d, %esi
movq %r9, 0x20(%rsp)
callq 0x1ab93b
movq %rax, %rbx
xorl %eax, %eax
testq %rbx, %rbx
je 0x303df9
movl %r13d, 0x1c(%rsp)
xorl %eax, %eax
testl %r12d, %r12d
setne %al
xorl %ecx, %ecx
cmpl $0x0, 0x1a0(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x1a8(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x1b0(%rsp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rax,8), %eax
orl %edx, %eax
orl %esi, %eax
orl 0xc(%rbx), %eax
orl $0x2840802, %eax        # imm = 0x2840802
movl %eax, 0xc(%rbx)
pushq $0x10
popq %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x297cd8
movq %rax, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x297cd8
movq %rbx, 0xa0(%rsp)
movq %rax, %rbx
movq %r13, %rdi
movq %r14, %rsi
callq 0x297cd8
movq %rax, %r13
movq 0x20(%rsp), %rax
leal 0x1(%rax), %esi
pushq $0x10
popq %rdi
movq %rsi, (%rsp)
callq 0x1ab78c
movq %rbx, %rdx
movq 0x10(%rsp), %r10
movq %r10, %xmm0
movq %rbx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %r13, %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
movq 0xa0(%rsp), %rbx
jne 0x303df7
movq %rdx, 0xb8(%rsp)
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %r11
leal -0x1(%r11), %eax
movl %eax, 0x8(%rsp)
negl 0xc(%rsp)
movq %rbp, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x120(%rsp)
movl 0x50(%rsp), %ecx
movd %ecx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x110(%rsp)
movq 0x88(%rsp), %rax
incq %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
subq 0x38(%rsp), %rdx
addq $-0x2, %rdx
movq %rax, 0xc0(%rsp)
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x100(%rsp)
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0xf0(%rsp)
xorl %eax, %eax
movb 0x40(%rsp), %dl
movb %dl, %al
negq %rax
movq %rax, %xmm0
movq 0x68(%rsp), %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movdqa %xmm1, 0x130(%rsp)
movl %ecx, %eax
movslq %r15d, %rsi
movq %r14, %rcx
imulq %rax, %rcx
xorl %edx, %edx
movq %rsi, 0xe8(%rsp)
cmpq %r14, %rdx
je 0x3034ec
movq %rsi, %rdi
xorl %r8d, %r8d
cmpq $0x2, %r8
je 0x3034c0
testl %r12d, %r12d
je 0x3034a2
xorl %r9d, %r9d
jmp 0x3034a5
movq %rdi, %r9
movq %r9, 0x150(%rsp,%r8,8)
subq %rbp, %r9
movq %r9, 0x140(%rsp,%r8,8)
incq %r8
subq %rcx, %rdi
jmp 0x303492
movq %rdx, %rdi
shlq $0x4, %rdi
movaps 0x150(%rsp), %xmm0
movaps %xmm0, (%r10,%rdi)
movdqa 0x140(%rsp), %xmm0
movdqa %xmm0, (%r13,%rdi)
incq %rdx
subq %rax, %rsi
jmp 0x303487
movq 0x30(%rsp), %rsi
andq $0x0, (%rsi)
pushq $0x1
popq %rax
movq %r10, %rdx
movl 0x1a8(%rsp), %edi
movl 0x50(%rsp), %r8d
movq (%rsp), %r9
cmpq %rax, %r9
je 0x30352a
testl %edi, %edi
movl $0x0, %ecx
cmovel %r15d, %ecx
movslq %ecx, %rcx
movq %rcx, (%rsi,%rax,8)
incq %rax
subl %r8d, %r15d
jmp 0x30350b
leal -0x1(%r14), %esi
movl 0x70(%rsp), %ecx
movl %r11d, %eax
movq %rax, 0xd8(%rsp)
movq %r14, 0x98(%rsp)
movq %r14, %r12
shlq $0x4, %r12
leaq 0x10(%r12), %r14
shlq $0x4, %rsi
movq %rsi, 0xd0(%rsp)
shlq $0x4, %rcx
movq %rcx, 0x90(%rsp)
movdqa 0xf0(%rsp), %xmm10
movdqa 0x100(%rsp), %xmm0
movdqa %xmm0, %xmm9
movdqa %xmm0, 0x40(%rsp)
movl 0x8(%rsp), %eax
movl %eax, (%rsp)
xorl %eax, %eax
movq 0xb8(%rsp), %rcx
movq %rcx, %r15
cmpq 0xd8(%rsp), %rax
movq %rdx, 0x10(%rsp)
je 0x303ad1
movq %rax, %rsi
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xb0(%rsp), %rcx
movzbl (%rcx,%rsi), %ecx
movl (%rax,%rcx,4), %eax
imull 0x98(%rsp), %eax
cltq
shlq $0x4, %rax
addq 0xe0(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rsi, 0x38(%rsp)
movq (%rcx,%rsi,8), %xmm1
movq 0xd0(%rsp), %rcx
punpcklqdq (%rdx,%rcx), %xmm1 # xmm1 = xmm1[0],mem[0]
xorl %ecx, %ecx
movdqa 0x100(%rsp), %xmm11
cmpq %rcx, %r12
je 0x303852
paddq (%rax,%rcx), %xmm1
movdqa (%r13,%rcx), %xmm0
movdqa %xmm1, %xmm3
movdqa 0x2c42e4(%rip), %xmm8   # 0x5c7910
pxor %xmm8, %xmm3
movdqa %xmm0, %xmm2
pxor %xmm8, %xmm2
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, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm3, %xmm4
pand %xmm4, %xmm1
pandn %xmm0, %xmm4
por %xmm1, %xmm4
movdqa %xmm4, %xmm1
pxor %xmm8, %xmm1
movdqa %xmm11, %xmm3
pxor %xmm8, %xmm3
movdqa %xmm1, %xmm5
pcmpgtd %xmm3, %xmm5
pshufd $0xa0, %xmm5, %xmm6     # xmm6 = xmm5[0,0,2,2]
pcmpeqd %xmm3, %xmm1
pshufd $0xf5, %xmm1, %xmm7     # xmm7 = xmm1[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm5, %xmm1     # xmm1 = xmm5[1,1,3,3]
por %xmm7, %xmm1
pand %xmm1, %xmm4
pandn %xmm11, %xmm1
por %xmm4, %xmm1
movdqa %xmm1, (%r15,%rcx)
movdqa %xmm9, %xmm4
pxor %xmm8, %xmm4
movdqa %xmm1, %xmm5
pxor %xmm8, %xmm5
movdqa %xmm4, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xa0, %xmm6, %xmm7     # xmm7 = xmm6[0,0,2,2]
pcmpeqd %xmm5, %xmm4
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pand %xmm7, %xmm4
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
por %xmm4, %xmm6
pand %xmm6, %xmm9
pandn %xmm1, %xmm6
por %xmm6, %xmm9
movdqa %xmm10, %xmm4
pxor %xmm8, %xmm4
movdqa %xmm5, %xmm6
pcmpgtd %xmm4, %xmm6
pshufd $0xa0, %xmm6, %xmm7     # xmm7 = xmm6[0,0,2,2]
pcmpeqd %xmm5, %xmm4
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pand %xmm7, %xmm4
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm4, %xmm5
pand %xmm5, %xmm10
pandn %xmm1, %xmm5
por %xmm10, %xmm5
movdqa %xmm5, %xmm4
pxor %xmm8, %xmm4
movdqa %xmm2, %xmm6
pcmpgtd %xmm4, %xmm6
pshufd $0xa0, %xmm6, %xmm7     # xmm7 = xmm6[0,0,2,2]
pcmpeqd %xmm2, %xmm4
pshufd $0xf5, %xmm4, %xmm2     # xmm2 = xmm4[1,1,3,3]
pand %xmm7, %xmm2
pshufd $0xf5, %xmm6, %xmm4     # xmm4 = xmm6[1,1,3,3]
por %xmm2, %xmm4
pand %xmm4, %xmm5
pandn %xmm0, %xmm4
por %xmm5, %xmm4
movdqa %xmm4, %xmm2
pxor %xmm8, %xmm2
movdqa %xmm3, %xmm5
pcmpgtd %xmm2, %xmm5
pshufd $0xa0, %xmm5, %xmm6     # xmm6 = xmm5[0,0,2,2]
pcmpeqd %xmm3, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm6, %xmm2
pshufd $0xf5, %xmm5, %xmm10    # xmm10 = xmm5[1,1,3,3]
por %xmm2, %xmm10
pand %xmm10, %xmm4
pandn %xmm11, %xmm10
por %xmm4, %xmm10
psubq 0x120(%rsp), %xmm1
movdqa 0x110(%rsp), %xmm6
psubq %xmm6, %xmm0
movdqa %xmm0, %xmm2
pxor %xmm8, %xmm2
movdqa %xmm1, %xmm3
pxor %xmm8, %xmm3
movdqa %xmm2, %xmm4
pcmpgtd %xmm3, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
pcmpeqd %xmm3, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm5, %xmm2
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm2, %xmm4
pand %xmm4, %xmm0
pandn %xmm1, %xmm4
por %xmm0, %xmm4
movdqa %xmm4, (%r13,%rcx)
psubq %xmm6, %xmm11
movdqa %xmm11, %xmm0
pxor %xmm8, %xmm0
movdqa %xmm0, %xmm2
pcmpgtd %xmm3, %xmm2
pshufd $0xa0, %xmm2, %xmm4     # xmm4 = xmm2[0,0,2,2]
pcmpeqd %xmm3, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm4, %xmm0
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
por %xmm0, %xmm2
pand %xmm2, %xmm11
pandn %xmm1, %xmm2
por %xmm2, %xmm11
movdqa (%rdx,%rcx), %xmm1
addq $0x10, %rcx
jmp 0x30360a
xorl %eax, %eax
cmpl $0x2, %eax
je 0x3039d5
movl %eax, 0x68(%rsp)
movq 0xe8(%rsp), %rax
cmpl $0x0, 0x1a8(%rsp)
jne 0x303885
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
subq %rbp, %rax
movq %rax, %xmm0
punpcklqdq %xmm11, %xmm0   # xmm0 = xmm0[0],xmm11[0]
xorl %eax, %eax
movdqa %xmm0, 0x20(%rsp)
leaq 0x10(%rax), %rbx
cmpq %rbx, %r14
je 0x3039c3
movdqa (%r15,%rax), %xmm6
movdqa 0x20(%rsp), %xmm0
movdqa %xmm0, %xmm1
movdqa 0x2c4054(%rip), %xmm5   # 0x5c7910
pxor %xmm5, %xmm1
movdqa %xmm6, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm4, %xmm2
pshufd $0xf5, %xmm3, %xmm1     # xmm1 = xmm3[1,1,3,3]
por %xmm2, %xmm1
pand %xmm1, %xmm6
pandn %xmm0, %xmm1
por %xmm6, %xmm1
movdqa %xmm1, (%r15,%rax)
movdqa %xmm10, %xmm6
pxor %xmm5, %xmm6
movdqa %xmm1, %xmm2
pxor %xmm5, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm6, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm2, %xmm6
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pand %xmm4, %xmm6
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
por %xmm6, %xmm3
pand %xmm3, %xmm10
pandn %xmm1, %xmm3
por %xmm3, %xmm10
movdqa %xmm10, 0x50(%rsp)
movdqa %xmm9, %xmm6
pxor %xmm5, %xmm6
movdqa %xmm6, %xmm3
pcmpgtd %xmm2, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm2, %xmm6
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
por %xmm5, %xmm2
pand %xmm2, %xmm9
pandn %xmm1, %xmm2
por %xmm2, %xmm9
movdqa %xmm9, 0x70(%rsp)
psubq 0x120(%rsp), %xmm1
psubq 0x110(%rsp), %xmm0
movdqa %xmm0, 0x20(%rsp)
callq 0x303e0b
movdqa 0x50(%rsp), %xmm10
movdqa 0x70(%rsp), %xmm9
pmovmskb %xmm0, %ecx
movq %rbx, %rax
testl %ecx, %ecx
jne 0x303897
jmp 0x3039d5
movl 0x68(%rsp), %eax
incl %eax
movdqa 0x20(%rsp), %xmm11
jmp 0x303854
movdqa %xmm10, 0x50(%rsp)
movdqa %xmm9, 0x70(%rsp)
movq 0x90(%rsp), %rax
movdqa (%r15,%rax), %xmm0
movdqa %xmm0, 0x20(%rsp)
movaps 0x40(%rsp), %xmm1
callq 0x303e0b
movdqa 0x50(%rsp), %xmm10
movdqa 0x70(%rsp), %xmm9
pand 0x130(%rsp), %xmm0
movdqa 0x40(%rsp), %xmm5
movdqa %xmm5, %xmm1
movdqa 0x2c3ee6(%rip), %xmm3   # 0x5c7910
pxor %xmm3, %xmm1
movdqa 0x20(%rsp), %xmm6
movdqa %xmm6, %xmm2
pxor %xmm3, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
pand %xmm4, %xmm1
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
movdqa %xmm6, %xmm3
por %xmm1, %xmm2
movdqa %xmm6, %xmm1
pand %xmm2, %xmm1
pandn %xmm5, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, 0x40(%rsp)
pmovmskb %xmm0, %eax
xorl %ecx, %ecx
movq 0xa0(%rsp), %rbx
movq 0x10(%rsp), %rdx
pushq $0x1
popq %rsi
cmpl 0xc(%rsp), %ecx
jge 0x303a9e
pslldq $0x8, %xmm3             # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6,7]
movl %esi, %ecx
jmp 0x303a8f
testw %ax, %ax
movl (%rsp), %eax
movq 0x38(%rsp), %rcx
cmovnel %ecx, %eax
movl %eax, (%rsp)
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
movq 0x10(%rbx), %rax
movq (%rax), %rax
movd %xmm0, (%rax,%rcx,4)
movq %rcx, %rax
incq %rax
movq %rdx, %rcx
movq %r15, %rdx
jmp 0x303598
movq 0x98(%rsp), %r8
movq %r8, %rax
shlq $0x2, %rax
xorl %ecx, %ecx
movq 0xc8(%rsp), %rdi
movq 0x30(%rsp), %r14
movl 0x1b0(%rsp), %r9d
movl 0x1a0(%rsp), %r10d
movq 0xc0(%rsp), %r12
cmpq %rcx, %rax
je 0x303b36
movdqa (%rdx,%rcx,4), %xmm0
movq 0x10(%rbx), %rdx
movq 0x8(%rdx), %rdx
movd %xmm0, (%rdx,%rcx)
addq %rcx, %rdx
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movd %xmm0, (%rax,%rdx)
movq 0x10(%rsp), %rdx
addq $0x4, %rcx
jmp 0x303b07
testl %r9d, %r9d
je 0x303b67
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpl 0xc(%rsp), %ecx
jge 0x303b5b
movdqa 0x40(%rsp), %xmm0
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movdqa %xmm0, 0x40(%rsp)
movl %eax, %ecx
jmp 0x303b40
pshufd $0xee, 0x40(%rsp), %xmm0 # xmm0 = mem[2,3,2,3]
movq %xmm0, %r12
testl %r10d, %r10d
je 0x303c21
movl %r8d, %eax
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
addl %eax, %eax
xorl %ecx, %ecx
movl 0x1c(%rsp), %ebp
cmpl %ecx, %eax
je 0x303bd2
movl %ecx, %esi
shrl %esi
testb $0x1, %cl
movl $0x0, %edx
cmovnel %r8d, %edx
addl %esi, %edx
cmpl %edi, %edx
jge 0x303bcd
movq 0x10(%rsp), %rsi
movq (%rsi,%rcx,8), %rsi
cmpq %r12, %rsi
jle 0x303bb6
movq %rsi, %r12
movl 0x8(%rsp), %esi
movl %esi, (%rsp)
movl %edx, %ebp
jmp 0x303bcd
cmpl %ebp, %edx
cmovgel %ebp, %edx
movl (%rsp), %r11d
cmpl 0x8(%rsp), %r11d
cmovnel %ebp, %edx
cmpq %r12, %rsi
cmovel %edx, %ebp
incq %rcx
jmp 0x303b80
movq 0x10(%rsp), %rdx
jmp 0x303c25
movq 0x4373f8(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c3401(%rip), %rsi    # 0x5c6feb
leaq 0x2c540b(%rip), %rdx    # 0x5c8ffc
leaq 0x2998e5(%rip), %rcx    # 0x59d4dd
jmp 0x303df0
movq 0x4373d4(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c33dd(%rip), %rsi    # 0x5c6feb
leaq 0x2c53e7(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3d04(%rip), %rcx    # 0x5c7920
jmp 0x303df0
movl 0x1c(%rsp), %ebp
movdqa %xmm10, 0x50(%rsp)
orl %r10d, %r9d
jne 0x303c67
movq 0x90(%rsp), %rax
movdqa (%rdx,%rax), %xmm0
xorl %ecx, %ecx
pushq $0x1
popq %rax
cmpl 0xc(%rsp), %ecx
jge 0x303c52
pslldq $0x8, %xmm0             # xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
movl %eax, %ecx
jmp 0x303c43
pshufd $0xee, %xmm0, %xmm0     # xmm0 = xmm0[2,3,2,3]
movq %xmm0, %r12
movl 0x8(%rsp), %eax
movl %eax, (%rsp)
movl 0x1c(%rsp), %ebp
movq 0x88(%rsp), %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x20(%rsp)
movdqa %xmm9, %xmm0
movaps 0xf0(%rsp), %xmm1
callq 0x303e0b
movdqa 0x2c3c7b(%rip), %xmm1   # 0x5c7910
movdqa 0x50(%rsp), %xmm3
pxor %xmm1, %xmm3
movdqa 0x20(%rsp), %xmm4
pxor %xmm1, %xmm4
movdqa %xmm3, %xmm1
pcmpgtd %xmm4, %xmm1
pshufd $0xa0, %xmm1, %xmm2     # xmm2 = xmm1[0,0,2,2]
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
pand %xmm2, %xmm3
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
por %xmm3, %xmm1
pcmpeqd %xmm2, %xmm2
pxor %xmm1, %xmm2
por %xmm0, %xmm2
pmovmskb %xmm2, %eax
testl %eax, %eax
je 0x303cf0
orb $0x40, 0xc(%rbx)
xorl %r12d, %r12d
movl $0x0, (%rsp)
xorl %ebp, %ebp
movl %r12d, (%rbx)
movl %ebp, 0x4(%rbx)
movl (%rsp), %eax
movl %eax, 0x8(%rbx)
movq %r14, %rdi
callq 0x1ab763
movq %r13, %rdi
callq 0x1ab763
movq %r15, %rdi
callq 0x1ab763
movq 0x10(%rsp), %rdi
callq 0x1ab763
movq %rbx, %rax
jmp 0x303df9
movq 0x4372ab(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c32b4(%rip), %rsi    # 0x5c6feb
leaq 0x2c52be(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3bf4(%rip), %rcx    # 0x5c7939
jmp 0x303df0
movq 0x437287(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c39a6(%rip), %rsi    # 0x5c7701
leaq 0x2c529a(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3be0(%rip), %rcx    # 0x5c7949
jmp 0x303df0
movq 0x437263(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c326c(%rip), %rsi    # 0x5c6feb
leaq 0x2c5276(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3971(%rip), %rcx    # 0x5c76fe
jmp 0x303df0
movq 0x437242(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c3961(%rip), %rsi    # 0x5c7701
leaq 0x2c5255(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3967(%rip), %rcx    # 0x5c7715
jmp 0x303df0
movq 0x437221(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c395a(%rip), %rsi    # 0x5c771b
leaq 0x2c5234(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3961(%rip), %rcx    # 0x5c7730
jmp 0x303df0
movq 0x437200(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2c3939(%rip), %rsi    # 0x5c771b
leaq 0x2c5213(%rip), %rdx    # 0x5c8ffc
leaq 0x2c3945(%rip), %rcx    # 0x5c7735
xorl %eax, %eax
callq 0x19e180
xorl %eax, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq