// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/nw_scan_sse2_128_32.c
// Function: parasail_nw_rowcol_scan_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;
    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 pvP = NULL;
    __m128i* restrict pvE = NULL;
    int32_t* restrict boundary = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    __m128i vZero;
    int32_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    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;
    pvP = (__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;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi32_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_add_epi32(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi32(-segLen*gap), 4));

    /* 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_SCAN
        | 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 */
    pvE = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int32_t(16, s2Len+1);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!boundary) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvGapper) 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(&pvH[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;
        }
    }

    {
        __m128i vGapper = _mm_sub_epi32(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_sub_epi32(vGapper, vGapE);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vHt;
        __m128i vF;
        __m128i vH;
        __m128i vHp;
        __m128i *pvW;
        __m128i vW;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm_load_si128(pvH+(segLen-1));
        vHp = _mm_slli_si128(vHp, 4);
        vHp = _mm_insert_epi32_rpl(vHp, boundary[j], 0);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = _mm_sub_epi32(vNegLimit, pvGapper[0]);
        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);
            vE = _mm_max_epi32_rpl(
                    _mm_sub_epi32(vE, vGapE),
                    _mm_sub_epi32(vH, vGapO));
            vHp = _mm_add_epi32(vHp, vW);
            vF = _mm_max_epi32_rpl(vF, _mm_add_epi32(vHt, pvGapper[i]));
            vHt = _mm_max_epi32_rpl(vE, vHp);
            _mm_store_si128(pvE+i, vE);
            _mm_store_si128(pvHt+i, vHt);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 4);
        vHt = _mm_insert_epi32_rpl(vHt, boundary[j+1], 0);
        vF = _mm_max_epi32_rpl(vF, _mm_add_epi32(vHt, pvGapper[0]));
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 4);
            vFt = _mm_add_epi32(vFt, vSegLenXgap);
            vF = _mm_max_epi32_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 4);
        vF = _mm_add_epi32(vF, vNegInfFront);
        vH = _mm_max_epi32_rpl(vHt, vF);
        for (i=0; i<segLen; ++i) {
            vHt = _mm_load_si128(pvHt+i);
            vF = _mm_max_epi32_rpl(
                    _mm_sub_epi32(vF, vGapE),
                    _mm_sub_epi32(vH, vGapO));
            vH = _mm_max_epi32_rpl(vHt, vF);
            _mm_store_si128(pvH+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
        } 


#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            vH = _mm_load_si128(pvH + 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(pvH+i);
        arr_store_col(result->rowcols->score_col, vH, i, segLen);
    }
#endif

    /* extract last value from the last column */
    {
        __m128i vH = _mm_load_si128(pvH + 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(pvGapper);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(boundary);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, 0x28(%rsp)
testq %rdi, %rdi
je 0x34ff17
movq 0x48(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x34ff1e
movq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x34ff25
movl 0x8(%rdi), %edi
testl %edi, %edi
jle 0x34ff2c
cmpq $0x0, 0x28(%rsp)
je 0x34ff33
movl %edx, %ebp
testl %edx, %edx
jle 0x34ff3a
testl %ecx, %ecx
js 0x34ff41
testl %r8d, %r8d
js 0x34ff48
movl %r8d, 0x14(%rsp)
leal -0x1(%rdi), %ebx
addq $0x3, %rdi
movq %rdi, %r12
shrq $0x2, %r12
movl %ebx, %eax
xorl %edx, %edx
divl %r12d
movl %eax, 0x4(%rsp)
movl %edx, %r15d
movl %ecx, %r13d
negl %r13d
movq 0x20(%rsp), %rdx
movl 0x20(%rdx), %eax
movl $0x80000000, %r14d      # imm = 0x80000000
movl %ecx, 0x40(%rsp)
orl %r14d, %ecx
subl %eax, %r14d
cmpl %r13d, %eax
cmovgl %ecx, %r14d
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %eax
movl %eax, 0x30(%rsp)
andl $0x7ffffffc, %edi       # imm = 0x7FFFFFFC
movl %ebp, %esi
callq 0x20ac53
testq %rax, %rax
je 0x34ff4d
movl %r15d, 0x10(%rsp)
movl %ebx, 0xc(%rsp)
movq %rax, 0x18(%rsp)
orl $0x4440401, 0xc(%rax)   # imm = 0x4440401
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %r15
movq %rbp, 0x60(%rsp)
leal 0x1(%rbp), %esi
movl $0x10, %edi
movq %rsi, 0x58(%rsp)
callq 0x20a62d
movq %rax, 0x70(%rsp)
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %rbp
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %rbx
movl $0x10, %edi
movq %r12, 0x68(%rsp)
movq %r12, %rsi
movq 0x70(%rsp), %r12
callq 0x2f600c
movq %r15, %xmm0
movq %r12, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %rbp, %xmm1
movq %rbx, %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 %edx, %edx
testl %ecx, %ecx
jne 0x34ff4f
testq %rax, %rax
je 0x34ff4f
movq 0x60(%rsp), %r11
leal -0x1(%r11), %ecx
movl %ecx, 0x8(%rsp)
movl $0x3, %edx
subl 0x4(%rsp), %edx
movd 0x40(%rsp), %xmm4
pshufd $0x0, %xmm4, %xmm2      # xmm2 = xmm4[0,0,0,0]
movl 0x14(%rsp), %r9d
movd %r9d, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
incl %r14d
movd %r14d, %xmm6
pshufd $0x0, %xmm6, %xmm0      # xmm0 = xmm6[0,0,0,0]
movdqa %xmm0, 0x90(%rsp)
movd 0x30(%rsp), %xmm1
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x30(%rsp)
movq 0x68(%rsp), %r10
movl %r10d, %ecx
imull %r9d, %ecx
negl %ecx
movd %ecx, %xmm1
pshufd $0x0, %xmm1, %xmm5      # xmm5 = xmm1[0,0,0,0]
pslldq $0x4, %xmm5             # xmm5 = zero,zero,zero,zero,xmm5[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm6, 0x80(%rsp)
paddd %xmm6, %xmm5
movd %r13d, %xmm1
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x40(%rsp)
pshufd $0x44, %xmm4, %xmm7     # xmm7 = xmm4[0,1,0,1]
movd %r10d, %xmm4
pshufd $0x44, %xmm4, %xmm8     # xmm8 = xmm4[0,1,0,1]
movdqa 0x2d94ef(%rip), %xmm9   # 0x628e80
pmuludq %xmm8, %xmm9
pmuludq 0x2d94f1(%rip), %xmm8   # 0x628e90
xorl %esi, %esi
pshufd $0xf5, %xmm3, %xmm10    # xmm10 = xmm3[1,1,3,3]
movdqa 0x2d9fe0(%rip), %xmm11  # 0x629990
movdqa 0x2da077(%rip), %xmm12  # 0x629a30
pshufd $0xf5, %xmm12, %xmm13   # xmm13 = xmm12[1,1,3,3]
movdqa 0x2da078(%rip), %xmm14  # 0x629a40
movq %rbx, %rdi
movq %r15, %r8
movq %rsi, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
movdqa %xmm9, %xmm6
paddq %xmm4, %xmm6
paddq %xmm8, %xmm4
movdqa %xmm4, %xmm15
punpcklqdq %xmm6, %xmm15   # xmm15 = xmm15[0],xmm6[0]
punpckhqdq %xmm6, %xmm4    # xmm4 = xmm4[1],xmm6[1]
pmuludq %xmm10, %xmm4
pshufd $0xe8, %xmm4, %xmm4     # xmm4 = xmm4[0,2,2,3]
pmuludq %xmm3, %xmm15
pshufd $0xe8, %xmm15, %xmm15   # xmm15 = xmm15[0,2,2,3]
punpckldq %xmm4, %xmm15   # xmm15 = xmm15[0],xmm4[0],xmm15[1],xmm4[1]
movdqa 0x40(%rsp), %xmm6
psubd %xmm15, %xmm6
pxor %xmm4, %xmm4
pcmpgtd %xmm6, %xmm4
pshufd $0xee, %xmm6, %xmm15    # xmm15 = xmm6[2,3,2,3]
movdqa %xmm6, (%rdi)
punpckldq %xmm4, %xmm6    # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1]
pxor %xmm4, %xmm4
pcmpgtd %xmm15, %xmm4
punpckldq %xmm4, %xmm15   # xmm15 = xmm15[0],xmm4[0],xmm15[1],xmm4[1]
psubq %xmm7, %xmm15
psubq %xmm7, %xmm6
movdqa %xmm6, %xmm4
pxor %xmm11, %xmm4
pshufd $0xf5, %xmm4, %xmm0     # xmm0 = xmm4[1,1,3,3]
pcmpeqd %xmm13, %xmm0
pcmpgtd %xmm12, %xmm4
pshufd $0xa0, %xmm4, %xmm1     # xmm1 = xmm4[0,0,2,2]
pand %xmm0, %xmm1
pshufd $0xf5, %xmm4, %xmm0     # xmm0 = xmm4[1,1,3,3]
por %xmm1, %xmm0
pand %xmm0, %xmm6
pandn %xmm14, %xmm0
por %xmm6, %xmm0
movdqa %xmm15, %xmm1
pxor %xmm11, %xmm1
pshufd $0xf5, %xmm1, %xmm4     # xmm4 = xmm1[1,1,3,3]
pcmpeqd %xmm13, %xmm4
pcmpgtd %xmm12, %xmm1
pshufd $0xa0, %xmm1, %xmm6     # xmm6 = xmm1[0,0,2,2]
pand %xmm4, %xmm6
pshufd $0xf5, %xmm1, %xmm1     # xmm1 = xmm1[1,1,3,3]
por %xmm6, %xmm1
pand %xmm1, %xmm15
pandn %xmm14, %xmm1
por %xmm15, %xmm1
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
movaps %xmm0, (%r8)
incq %rsi
addq $0x10, %r8
addq $0x10, %rdi
cmpq %rsi, %r10
jne 0x34f9ce
movl $0x0, (%r12)
movl %r11d, %esi
movq 0x58(%rsp), %r11
andl $-0x2, %r11d
leaq -0x1(%rsi), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm6     # xmm6 = xmm0[0,1,0,1]
movl %r9d, %edi
negl %edi
addl %r9d, %r9d
xorl %ecx, %ecx
movdqa 0x2d9389(%rip), %xmm7   # 0x628e90
movdqa 0x2d9390(%rip), %xmm8   # 0x628ea0
pcmpeqd %xmm1, %xmm1
movdqa 0x90(%rsp), %xmm12
movdqa 0x30(%rsp), %xmm13
movdqa 0x80(%rsp), %xmm14
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
por %xmm7, %xmm0
movdqa %xmm6, %xmm4
pxor %xmm8, %xmm4
pxor %xmm8, %xmm0
movdqa %xmm0, %xmm9
pcmpgtd %xmm4, %xmm9
pcmpeqd %xmm4, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
pand %xmm9, %xmm0
pshufd $0xf5, %xmm9, %xmm4     # xmm4 = xmm9[1,1,3,3]
por %xmm0, %xmm4
movd %xmm4, %r8d
notl %r8d
testb $0x1, %r8b
je 0x34fb80
movl %r13d, 0x4(%r12,%rcx,4)
pxor %xmm1, %xmm4
pextrw $0x4, %xmm4, %r8d
testb $0x1, %r8b
je 0x34fb99
leal (%rdi,%r13), %r8d
movl %r8d, 0x8(%r12,%rcx,4)
addq $0x2, %rcx
subl %r9d, %r13d
cmpq %rcx, %r11
jne 0x34fb2f
pxor %xmm1, %xmm1
psubd %xmm2, %xmm1
leal -0x1(%r10), %r8d
shlq $0x4, %r8
movq %rax, %rcx
addq %r8, %rcx
movl %r10d, %edi
movdqa %xmm1, (%rcx)
psubd %xmm3, %xmm1
addq $-0x10, %rcx
decl %edi
jg 0x34fbbe
addq %rbx, %r8
movl 0x10(%rsp), %edi
movq %rdi, %r9
shlq $0x4, %r9
addq %rbx, %r9
movl %r10d, %r10d
movq %r10, %r11
shlq $0x4, %r11
xorl %r13d, %r13d
movdqa %xmm12, %xmm6
movdqa %xmm13, %xmm7
movq %r13, %r14
pshufd $0x90, (%r8), %xmm8     # xmm8 = mem[0,0,1,2]
movss (%r12,%r13,4), %xmm0
movss %xmm0, %xmm8            # xmm8 = xmm0[0],xmm8[1,2,3]
movq 0x20(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x28(%rsp), %r13
movzbl (%r13,%r14), %r13d
movslq (%rcx,%r13,4), %rcx
movq %r10, %r13
imulq %rcx, %r13
shlq $0x4, %r13
addq 0x78(%rsp), %r13
movdqa %xmm12, %xmm10
psubd (%rax), %xmm10
xorl %ecx, %ecx
movdqa %xmm12, %xmm9
movdqa (%rbx,%rcx), %xmm1
movdqa (%r15,%rcx), %xmm0
psubd %xmm3, %xmm0
movdqa %xmm1, %xmm4
psubd %xmm2, %xmm4
movdqa %xmm0, %xmm11
pcmpgtd %xmm4, %xmm11
pand %xmm11, %xmm0
pandn %xmm4, %xmm11
por %xmm0, %xmm11
paddd (%r13,%rcx), %xmm8
paddd (%rax,%rcx), %xmm10
movdqa %xmm9, %xmm0
pcmpgtd %xmm10, %xmm9
pand %xmm9, %xmm0
pandn %xmm10, %xmm9
por %xmm0, %xmm9
movdqa %xmm11, %xmm10
pcmpgtd %xmm8, %xmm10
movdqa %xmm11, (%r15,%rcx)
pand %xmm10, %xmm11
pandn %xmm8, %xmm10
por %xmm11, %xmm10
movdqa %xmm10, (%rbp,%rcx)
addq $0x10, %rcx
movdqa %xmm1, %xmm8
cmpq %rcx, %r11
jne 0x34fc43
leaq 0x1(%r14), %r13
pshufd $0x90, %xmm10, %xmm1    # xmm1 = xmm10[0,0,1,2]
movss 0x4(%r12,%r14,4), %xmm0
movss %xmm0, %xmm1            # xmm1 = xmm0[0],xmm1[1,2,3]
movdqa (%rax), %xmm0
paddd %xmm1, %xmm0
movdqa %xmm9, %xmm8
pcmpgtd %xmm0, %xmm8
pand %xmm8, %xmm9
pandn %xmm0, %xmm8
por %xmm9, %xmm8
movb $0x1, %cl
movdqa %xmm8, %xmm0
movdqa %xmm8, %xmm4
pslldq $0x4, %xmm8             # xmm8 = zero,zero,zero,zero,xmm8[0,1,2,3,4,5,6,7,8,9,10,11]
paddd %xmm5, %xmm8
pcmpgtd %xmm8, %xmm0
pand %xmm0, %xmm4
pandn %xmm8, %xmm0
movdqa %xmm0, %xmm8
por %xmm4, %xmm8
testb $0x1, %cl
movl $0x0, %ecx
jne 0x34fd09
pslldq $0x4, %xmm8             # xmm8 = zero,zero,zero,zero,xmm8[0,1,2,3,4,5,6,7,8,9,10,11]
paddd %xmm14, %xmm8
movdqa %xmm1, %xmm9
pcmpgtd %xmm8, %xmm9
pand %xmm9, %xmm1
pandn %xmm8, %xmm9
por %xmm1, %xmm9
xorl %ecx, %ecx
movdqa (%rbp,%rcx), %xmm0
psubd %xmm3, %xmm8
psubd %xmm2, %xmm9
movdqa %xmm8, %xmm1
pcmpgtd %xmm9, %xmm1
pand %xmm1, %xmm8
pandn %xmm9, %xmm1
por %xmm1, %xmm8
movdqa %xmm0, %xmm9
pcmpgtd %xmm8, %xmm9
pand %xmm9, %xmm0
pandn %xmm8, %xmm9
por %xmm0, %xmm9
movdqa %xmm9, (%rbx,%rcx)
movdqa %xmm7, %xmm0
pcmpgtd %xmm9, %xmm0
movdqa %xmm9, %xmm1
pand %xmm0, %xmm1
pandn %xmm7, %xmm0
movdqa %xmm0, %xmm7
por %xmm1, %xmm7
movdqa %xmm6, %xmm0
pcmpgtd %xmm9, %xmm6
pand %xmm6, %xmm0
pandn %xmm9, %xmm6
por %xmm0, %xmm6
addq $0x10, %rcx
cmpq %rcx, %r11
jne 0x34fd66
movdqa (%r9), %xmm1
cmpl $0x2, 0x4(%rsp)
jg 0x34fe08
xorl %ecx, %ecx
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
incl %ecx
cmpl %edx, %ecx
jl 0x34fdfd
pshufd $0xff, %xmm1, %xmm0     # xmm0 = xmm1[3,3,3,3]
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx), %rcx
movd %xmm0, (%rcx,%r14,4)
cmpq %rsi, %r13
jne 0x34fbf6
leaq (,%r10,4), %rcx
leaq (%rcx,%rcx,2), %rsi
leaq (,%r10,8), %r8
xorl %r9d, %r9d
movq 0x18(%rsp), %r11
movdqa (%rbx,%r9,4), %xmm0
movq 0x10(%r11), %r10
movq 0x8(%r10), %r10
movd %xmm0, (%r10,%r9)
addq %r9, %r10
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
movd %xmm1, (%rcx,%r10)
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movd %xmm1, (%r8,%r10)
pshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
movd %xmm0, (%rsi,%r10)
addq $0x4, %r9
cmpq %r9, %rcx
jne 0x34fe44
shlq $0x4, %rdi
movdqa (%rbx,%rdi), %xmm1
cmpl $0x2, 0x4(%rsp)
jg 0x34fea8
xorl %ecx, %ecx
movl 0x8(%rsp), %esi
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
incl %ecx
cmpl %edx, %ecx
jl 0x34fe9b
jmp 0x34feac
movl 0x8(%rsp), %esi
pcmpgtd %xmm7, %xmm12
pcmpgtd %xmm13, %xmm6
por %xmm12, %xmm6
movmskps %xmm6, %ecx
testl %ecx, %ecx
je 0x34fecf
orb $0x40, 0xc(%r11)
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edx, %edx
jmp 0x34fedc
pshufd $0xff, %xmm1, %xmm0     # xmm0 = xmm1[3,3,3,3]
movd %xmm0, %ecx
movl 0xc(%rsp), %edx
movl %ecx, (%r11)
movl %edx, 0x4(%r11)
movl %esi, 0x8(%r11)
movq %rax, %rdi
movq %r11, %r14
callq 0x20a60d
movq %rbx, %rdi
callq 0x20a60d
movq %rbp, %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %r14, %rdx
jmp 0x34ff4f
callq 0x1b3fe3
jmp 0x34ff4d
callq 0x1b3fbd
jmp 0x34ff4d
callq 0x1b3f97
jmp 0x34ff4d
callq 0x1b3f71
jmp 0x34ff4d
callq 0x1b3f4b
jmp 0x34ff4d
callq 0x1b3f25
jmp 0x34ff4d
callq 0x1b3eff
jmp 0x34ff4d
callq 0x1b3ed9
xorl %edx, %edx
movq %rdx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq