// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_striped_sse2_128_32.c
// Function: parasail_nw_rowcol_striped_profile_sse2_128_32
parasail_result_t* PNAME(
        const parasail_profile_t * const restrict profile,
        const char * const restrict s2, const int s2Len,
        const int open, const int gap)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 0;
    int32_t k = 0;
    int 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;
    int32_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    int32_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    parasail_result_t *result = NULL;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile32.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 = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__m128i*)profile->profile32.score;
    vGapO = _mm_set1_epi32(open);
    vGapE = _mm_set1_epi32(gap);
    NEG_LIMIT = (-open < matrix->min ? INT32_MIN + open : INT32_MIN - matrix->min) + 1;
    POS_LIMIT = INT32_MAX - matrix->max - 1;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;

    /* 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_NW | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_BITS_32 | PARASAIL_FLAG_LANES_4;
#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_int32_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_32_t h;
            __m128i_32_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT32_MIN ? INT32_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT32_MIN ? INT32_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 = -open-gap*(i-1);
            boundary[i] = tmp < INT32_MIN ? INT32_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], 4);

        /* 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_epi32_rpl(vH, boundary[j], 0);

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

            /* Get max from vH, vE and vF. */
            vH = _mm_max_epi32_rpl(vH, vE);
            vH = _mm_max_epi32_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
            vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm_min_epi32_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_epi32(vH, vGapO);
            vE = _mm_sub_epi32(vE, vGapE);
            vE = _mm_max_epi32_rpl(vE, vH);
            _mm_store_si128(pvE + i, vE);

            /* Update vF value. */
            vF = _mm_sub_epi32(vF, vGapE);
            vF = _mm_max_epi32_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 = boundary[j+1]-open;
            int32_t tmp2 = tmp < INT32_MIN ? INT32_MIN : tmp;
            vF = _mm_slli_si128(vF, 4);
            vF = _mm_insert_epi32_rpl(vF, tmp2, 0);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi32_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
                vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vH);
                vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
                arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
                vH = _mm_sub_epi32(vH, vGapO);
                vF = _mm_sub_epi32(vF, vGapE);
                if (! _mm_movemask_epi8(_mm_cmpgt_epi32(vF, vH))) goto end;
                /*vF = _mm_max_epi32_rpl(vF, vH);*/
            }
        }
end:
        {
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            vH = _mm_load_si128(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 4);
            }
            result->rowcols->score_row[j] = (int32_t) _mm_extract_epi32_rpl (vH, 3);
        }
#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

    /* 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, 4);
        }
        score = (int32_t) _mm_extract_epi32_rpl (vH, 3);
    }

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi32(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi32(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 $0x78, %rsp
movl %ecx, 0x8(%rsp)
movq %rsi, 0x38(%rsp)
testq %rdi, %rdi
je 0x3645c8
movq 0x48(%rdi), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x3645d2
movq 0x10(%rdi), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x364616
movl 0x8(%rdi), %edi
testl %edi, %edi
jle 0x364620
cmpq $0x0, 0x38(%rsp)
je 0x36462a
movl %edx, %r9d
testl %edx, %edx
jle 0x364634
cmpl $0x0, 0x8(%rsp)
js 0x36463e
testl %r8d, %r8d
js 0x364648
movl %r8d, 0x1c(%rsp)
leal -0x1(%rdi), %r14d
addq $0x3, %rdi
movq %rdi, %r12
shrq $0x2, %r12
movl %r14d, %eax
xorl %edx, %edx
divl %r12d
movl %eax, 0xc(%rsp)
movl %edx, %r13d
movl 0x8(%rsp), %ecx
movl %ecx, %ebx
negl %ebx
movq 0x30(%rsp), %rdx
movl 0x20(%rdx), %eax
movl $0x80000000, %ebp       # imm = 0x80000000
orl %ebp, %ecx
subl %eax, %ebp
cmpl %ebx, %eax
cmovgl %ecx, %ebp
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %eax
movl %eax, 0x40(%rsp)
andl $0x7ffffffc, %edi       # imm = 0x7FFFFFFC
movl %r9d, %esi
movq %r9, 0x20(%rsp)
callq 0x20ac53
testq %rax, %rax
je 0x364053
movq %rax, %r15
movl %r13d, 0x18(%rsp)
movl %r14d, 0x14(%rsp)
orl $0x4440801, 0xc(%rax)   # imm = 0x4440801
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %r14
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %r15, 0x28(%rsp)
movq %rax, %r15
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %r13
movq 0x20(%rsp), %rax
leal 0x1(%rax), %esi
movl $0x10, %edi
movq %rsi, 0x50(%rsp)
callq 0x20a62d
movq %r14, %xmm0
movq %r15, %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
je 0x364067
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x50(%rsp), %r10
movq 0x20(%rsp), %r9
leal -0x1(%r9), %ecx
movl %ecx, 0x10(%rsp)
movl $0x3, %edx
subl 0xc(%rsp), %edx
movd 0x8(%rsp), %xmm5
pshufd $0x0, %xmm5, %xmm2      # xmm2 = xmm5[0,0,0,0]
movl 0x1c(%rsp), %ecx
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
incl %ebp
movd %ebp, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x60(%rsp)
movd 0x40(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x40(%rsp)
movd %ebx, %xmm4
pshufd $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movd %r12d, %xmm6
pshufd $0x44, %xmm6, %xmm6     # xmm6 = xmm6[0,1,0,1]
movdqa 0x2c4da4(%rip), %xmm7   # 0x628e80
pmuludq %xmm6, %xmm7
pmuludq 0x2c4da8(%rip), %xmm6   # 0x628e90
xorl %esi, %esi
pshufd $0xf5, %xmm3, %xmm8     # xmm8 = xmm3[1,1,3,3]
movdqa 0x2c5897(%rip), %xmm9   # 0x629990
movdqa 0x2c592e(%rip), %xmm10  # 0x629a30
pshufd $0xf5, %xmm10, %xmm11   # xmm11 = xmm10[1,1,3,3]
movdqa 0x2c592f(%rip), %xmm12  # 0x629a40
movq %r14, %rdi
movq %r13, %r8
movq %rsi, %xmm13
pshufd $0x44, %xmm13, %xmm13   # xmm13 = xmm13[0,1,0,1]
movdqa %xmm7, %xmm14
paddq %xmm13, %xmm14
paddq %xmm6, %xmm13
movdqa %xmm13, %xmm15
punpcklqdq %xmm14, %xmm15  # xmm15 = xmm15[0],xmm14[0]
punpckhqdq %xmm14, %xmm13  # xmm13 = xmm13[1],xmm14[1]
pmuludq %xmm8, %xmm13
pshufd $0xe8, %xmm13, %xmm13   # xmm13 = xmm13[0,2,2,3]
pmuludq %xmm3, %xmm15
pshufd $0xe8, %xmm15, %xmm15   # xmm15 = xmm15[0,2,2,3]
punpckldq %xmm13, %xmm15  # xmm15 = xmm15[0],xmm13[0],xmm15[1],xmm13[1]
movdqa %xmm4, %xmm14
psubd %xmm15, %xmm14
pxor %xmm15, %xmm15
pcmpgtd %xmm14, %xmm15
pshufd $0xee, %xmm14, %xmm13   # xmm13 = xmm14[2,3,2,3]
movdqa %xmm14, (%rdi)
punpckldq %xmm15, %xmm14  # xmm14 = xmm14[0],xmm15[0],xmm14[1],xmm15[1]
pxor %xmm15, %xmm15
pcmpgtd %xmm13, %xmm15
punpckldq %xmm15, %xmm13  # xmm13 = xmm13[0],xmm15[0],xmm13[1],xmm15[1]
psubq %xmm5, %xmm13
psubq %xmm5, %xmm14
movdqa %xmm14, %xmm15
pxor %xmm9, %xmm15
pshufd $0xf5, %xmm15, %xmm1    # xmm1 = xmm15[1,1,3,3]
pcmpeqd %xmm11, %xmm1
pcmpgtd %xmm10, %xmm15
pshufd $0xa0, %xmm15, %xmm0    # xmm0 = xmm15[0,0,2,2]
pand %xmm1, %xmm0
pshufd $0xf5, %xmm15, %xmm1    # xmm1 = xmm15[1,1,3,3]
por %xmm0, %xmm1
pand %xmm1, %xmm14
pandn %xmm12, %xmm1
por %xmm14, %xmm1
movdqa %xmm13, %xmm0
pxor %xmm9, %xmm0
pshufd $0xf5, %xmm0, %xmm14    # xmm14 = xmm0[1,1,3,3]
pcmpeqd %xmm11, %xmm14
pcmpgtd %xmm10, %xmm0
pshufd $0xa0, %xmm0, %xmm15    # xmm15 = xmm0[0,0,2,2]
pand %xmm14, %xmm15
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
por %xmm15, %xmm0
pand %xmm0, %xmm13
pandn %xmm12, %xmm0
por %xmm13, %xmm0
shufps $0x88, %xmm0, %xmm1     # xmm1 = xmm1[0,2],xmm0[0,2]
movaps %xmm1, (%r8)
incq %rsi
addq $0x10, %r8
addq $0x10, %rdi
cmpq %rsi, %r12
jne 0x364117
movl $0x0, (%rax)
movl %r9d, %esi
andl $-0x2, %r10d
leaq -0x1(%rsi), %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm4     # xmm4 = xmm0[0,1,0,1]
movl %ecx, %edi
negl %edi
addl %ecx, %ecx
xorl %r8d, %r8d
movdqa 0x2c4c35(%rip), %xmm5   # 0x628e90
movdqa 0x2c4c3d(%rip), %xmm6   # 0x628ea0
pcmpeqd %xmm7, %xmm7
movdqa 0x60(%rsp), %xmm9
movdqa 0x40(%rsp), %xmm10
movq %r8, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
por %xmm5, %xmm0
movdqa %xmm4, %xmm1
pxor %xmm6, %xmm1
pxor %xmm6, %xmm0
movdqa %xmm0, %xmm8
pcmpgtd %xmm1, %xmm8
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm8, %xmm0
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
por %xmm0, %xmm8
movd %xmm8, %r9d
notl %r9d
testb $0x1, %r9b
je 0x3642c5
movl %ebx, 0x4(%rax,%r8,4)
pxor %xmm7, %xmm8
pextrw $0x4, %xmm8, %r9d
testb $0x1, %r9b
je 0x3642df
leal (%rdi,%rbx), %r9d
movl %r9d, 0x8(%rax,%r8,4)
addq $0x2, %r8
subl %ecx, %ebx
cmpq %r8, %r10
jne 0x364275
leal -0x1(%r12), %r8d
movl 0x18(%rsp), %edi
movl %r12d, %r9d
movq %r9, %r10
shlq $0x4, %r10
xorl %r11d, %r11d
shlq $0x4, %r8
movq %rdi, %rbx
shlq $0x4, %rbx
movdqa %xmm9, %xmm4
movdqa %xmm10, %xmm5
movq %r14, %rbp
movq %r15, %r14
movq 0x30(%rsp), %rcx
movq 0x10(%rcx), %r15
movq 0x38(%rsp), %rcx
movzbl (%rcx,%r11), %r12d
movslq (%r15,%r12,4), %r12
movq %r9, %r15
imulq %r12, %r15
shlq $0x4, %r15
addq 0x58(%rsp), %r15
pshufd $0x90, (%rbp,%r8), %xmm7 # xmm7 = mem[0,0,1,2]
movss (%rax,%r11,4), %xmm0
movss %xmm0, %xmm7            # xmm7 = xmm0[0],xmm7[1,2,3]
xorl %r12d, %r12d
movdqa %xmm9, %xmm6
paddd (%r15,%r12), %xmm7
movdqa (%r13,%r12), %xmm8
movdqa %xmm7, %xmm0
pcmpgtd %xmm8, %xmm0
pand %xmm0, %xmm7
pandn %xmm8, %xmm0
por %xmm7, %xmm0
movdqa %xmm0, %xmm7
pcmpgtd %xmm6, %xmm7
pand %xmm7, %xmm0
pandn %xmm6, %xmm7
por %xmm0, %xmm7
movdqa %xmm7, (%r14,%r12)
movdqa %xmm4, %xmm0
pcmpgtd %xmm7, %xmm4
pand %xmm4, %xmm0
pandn %xmm7, %xmm4
por %xmm0, %xmm4
movdqa %xmm5, %xmm0
pcmpgtd %xmm7, %xmm0
movdqa %xmm7, %xmm1
pand %xmm0, %xmm1
pandn %xmm5, %xmm0
por %xmm1, %xmm0
movdqa %xmm0, %xmm1
pcmpgtd %xmm8, %xmm1
movdqa %xmm8, %xmm5
pand %xmm1, %xmm5
pandn %xmm0, %xmm1
por %xmm5, %xmm1
movdqa %xmm1, %xmm5
pcmpgtd %xmm6, %xmm5
movdqa %xmm6, %xmm0
pand %xmm5, %xmm0
pandn %xmm1, %xmm5
por %xmm0, %xmm5
psubd %xmm2, %xmm7
psubd %xmm3, %xmm8
movdqa %xmm8, %xmm0
pcmpgtd %xmm7, %xmm0
pand %xmm0, %xmm8
pandn %xmm7, %xmm0
por %xmm8, %xmm0
movdqa %xmm0, (%r13,%r12)
psubd %xmm3, %xmm6
movdqa %xmm6, %xmm0
pcmpgtd %xmm7, %xmm6
pand %xmm6, %xmm0
pandn %xmm7, %xmm6
por %xmm0, %xmm6
movdqa (%rbp,%r12), %xmm7
addq $0x10, %r12
cmpq %r12, %r10
jne 0x36435c
xorl %r15d, %r15d
movl 0x4(%rax,%r11,4), %r12d
subl 0x8(%rsp), %r12d
movd %r12d, %xmm0
pshufd $0x90, %xmm6, %xmm6     # xmm6 = xmm6[0,0,1,2]
movss %xmm0, %xmm6            # xmm6 = xmm0[0],xmm6[1,2,3]
xorl %r12d, %r12d
movdqa (%r14,%r12), %xmm0
movdqa %xmm0, %xmm1
pcmpgtd %xmm6, %xmm1
pand %xmm1, %xmm0
pandn %xmm6, %xmm1
por %xmm0, %xmm1
movdqa %xmm1, (%r14,%r12)
movdqa %xmm5, %xmm0
pcmpgtd %xmm1, %xmm0
movdqa %xmm1, %xmm7
pand %xmm0, %xmm7
pandn %xmm5, %xmm0
movdqa %xmm0, %xmm5
por %xmm7, %xmm5
movdqa %xmm4, %xmm0
pcmpgtd %xmm1, %xmm4
pand %xmm4, %xmm0
pandn %xmm1, %xmm4
por %xmm0, %xmm4
psubd %xmm2, %xmm1
psubd %xmm3, %xmm6
movdqa %xmm6, %xmm0
pcmpgtd %xmm1, %xmm0
movmskps %xmm0, %ecx
testl %ecx, %ecx
je 0x3644e5
addq $0x10, %r12
cmpq %r12, %r10
jne 0x364468
incl %r15d
cmpl $0x4, %r15d
jne 0x36444d
movdqa (%r14,%rbx), %xmm6
cmpl $0x2, 0xc(%rsp)
jg 0x364502
xorl %r15d, %r15d
pslldq $0x4, %xmm6             # xmm6 = zero,zero,zero,zero,xmm6[0,1,2,3,4,5,6,7,8,9,10,11]
incl %r15d
cmpl %edx, %r15d
jl 0x3644f5
pshufd $0xff, %xmm6, %xmm0     # xmm0 = xmm6[3,3,3,3]
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %rcx
movd %xmm0, (%rcx,%r11,4)
incq %r11
movq %rbp, %r15
cmpq %rsi, %r11
jne 0x364315
leaq (,%r9,4), %rsi
leaq (%rsi,%rsi,2), %r8
leaq (,%r9,8), %r9
xorl %r10d, %r10d
movq 0x28(%rsp), %rbx
movdqa (%r14,%r10,4), %xmm0
movq 0x10(%rbx), %rcx
movq 0x8(%rcx), %rcx
movd %xmm0, (%rcx,%r10)
addq %r10, %rcx
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
movd %xmm1, (%rsi,%rcx)
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movd %xmm1, (%r9,%rcx)
pshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
movd %xmm0, (%r8,%rcx)
addq $0x4, %r10
cmpq %r10, %rsi
jne 0x364544
shlq $0x4, %rdi
movdqa (%r14,%rdi), %xmm2
cmpl $0x2, 0xc(%rsp)
jg 0x3645a2
xorl %esi, %esi
pslldq $0x4, %xmm2             # xmm2 = zero,zero,zero,zero,xmm2[0,1,2,3,4,5,6,7,8,9,10,11]
incl %esi
cmpl %edx, %esi
jl 0x364597
pcmpgtd %xmm5, %xmm9
pcmpgtd %xmm10, %xmm4
por %xmm9, %xmm4
movmskps %xmm4, %ecx
testl %ecx, %ecx
movl 0x10(%rsp), %esi
je 0x3645dc
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
xorl %esi, %esi
xorl %ecx, %ecx
jmp 0x3645e9
callq 0x1b6713
jmp 0x364053
callq 0x1b66ed
jmp 0x364053
pshufd $0xff, %xmm2, %xmm0     # xmm0 = xmm2[3,3,3,3]
movd %xmm0, %edx
movl 0x14(%rsp), %ecx
movl %edx, (%rbx)
movl %ecx, 0x4(%rbx)
movl %esi, 0x8(%rbx)
movq %rax, %rdi
callq 0x20a60d
movq %r13, %rdi
callq 0x20a60d
movq %rbp, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
jmp 0x364055
callq 0x1b66c7
jmp 0x364053
callq 0x1b66a1
jmp 0x364053
callq 0x1b667b
jmp 0x364053
callq 0x1b6655
jmp 0x364053
callq 0x1b662f
jmp 0x364053
callq 0x1b6609
jmp 0x364053
nop