// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_diag_sse2_128_32.c
// Function: parasail_sw_rowcol_diag_sse2_128_32
parasail_result_t* FNAME(
        const char * const restrict _s1, const int _s1Len,
        const char * const restrict _s2, const int s2Len,
        const int open, const int gap, const parasail_matrix_t *matrix)
{
    /* declare local variables */
    int32_t N = 0;
    int32_t PAD = 0;
    int32_t PAD2 = 0;
    int32_t s1Len = 0;
    int32_t s1Len_PAD = 0;
    int32_t s2Len_PAD = 0;
    int32_t * restrict s1 = NULL;
    int32_t * restrict s2B = NULL;
    int32_t * restrict _H_pr = NULL;
    int32_t * restrict _F_pr = NULL;
    int32_t * restrict s2 = NULL;
    int32_t * restrict H_pr = NULL;
    int32_t * restrict F_pr = NULL;
    parasail_result_t *result = NULL;
    int32_t i = 0;
    int32_t j = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    int32_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vNegInf;
    __m128i vNegInf0;
    __m128i vOpen;
    __m128i vGap;
    __m128i vZero;
    __m128i vOne;
    __m128i vN;
    __m128i vNegOne;
    __m128i vI;
    __m128i vJreset;
    __m128i vMaxH;
    __m128i vEndI;
    __m128i vEndJ;
    __m128i vILimit;
    __m128i vJLimit;

    /* validate inputs */
    PARASAIL_CHECK_NULL(_s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);
    PARASAIL_CHECK_NULL(matrix);
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        PARASAIL_CHECK_NULL(_s1);
        PARASAIL_CHECK_GT0(_s1Len);
    }

    /* initialize stack variables */
    N = 4; /* number of values in vector */
    PAD = N-1;
    PAD2 = PAD*2;
    s1Len = matrix->type == PARASAIL_MATRIX_TYPE_SQUARE ? _s1Len : matrix->length;
    s1Len_PAD = s1Len+PAD;
    s2Len_PAD = s2Len+PAD;
    i = 0;
    j = 0;
    end_query = 0;
    end_ref = 0;
    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;
    vNegInf = _mm_set1_epi32(NEG_LIMIT);
    vNegInf0 = _mm_srli_si128(vNegInf, 4); /* shift in a 0 */
    vOpen = _mm_set1_epi32(open);
    vGap  = _mm_set1_epi32(gap);
    vZero = _mm_set1_epi32(0);
    vOne = _mm_set1_epi32(1);
    vN = _mm_set1_epi32(N);
    vNegOne = _mm_set1_epi32(-1);
    vI = _mm_set_epi32(0,1,2,3);
    vJreset = _mm_set_epi32(0,-1,-2,-3);
    vMaxH = vNegInf;
    vEndI = vNegInf;
    vEndJ = vNegInf;
    vILimit = _mm_set1_epi32(s1Len);
    vJLimit = _mm_set1_epi32(s2Len);

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

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_DIAG
        | 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 */
    s2B= parasail_memalign_int32_t(16, s2Len+PAD2);
    _H_pr = parasail_memalign_int32_t(16, s2Len+PAD2);
    _F_pr = parasail_memalign_int32_t(16, s2Len+PAD2);
    s2 = s2B+PAD; /* will allow later for negative indices */
    H_pr = _H_pr+PAD;
    F_pr = _F_pr+PAD;

    /* validate heap variables */
    if (!s2B) return NULL;
    if (!_H_pr) return NULL;
    if (!_F_pr) return NULL;

    /* convert _s1 from char to int in range 0-23 */
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        s1 = parasail_memalign_int32_t(16, s1Len+PAD);
        if (!s1) return NULL;
        for (i=0; i<s1Len; ++i) {
            s1[i] = matrix->mapper[(unsigned char)_s1[i]];
        }
        /* pad back of s1 with dummy values */
        for (i=s1Len; i<s1Len_PAD; ++i) {
            s1[i] = 0; /* point to first matrix row because we don't care */
        }
    }

    /* convert _s2 from char to int in range 0-23 */
    for (j=0; j<s2Len; ++j) {
        s2[j] = matrix->mapper[(unsigned char)_s2[j]];
    }
    /* pad front of s2 with dummy values */
    for (j=-PAD; j<0; ++j) {
        s2[j] = 0; /* point to first matrix row because we don't care */
    }
    /* pad back of s2 with dummy values */
    for (j=s2Len; j<s2Len_PAD; ++j) {
        s2[j] = 0; /* point to first matrix row because we don't care */
    }

    /* set initial values for stored row */
    for (j=0; j<s2Len; ++j) {
        H_pr[j] = 0;
        F_pr[j] = NEG_LIMIT;
    }
    /* pad front of stored row values */
    for (j=-PAD; j<0; ++j) {
        H_pr[j] = NEG_LIMIT;
        F_pr[j] = NEG_LIMIT;
    }
    /* pad back of stored row values */
    for (j=s2Len; j<s2Len+PAD; ++j) {
        H_pr[j] = NEG_LIMIT;
        F_pr[j] = NEG_LIMIT;
    }

    /* iterate over query sequence */
    for (i=0; i<s1Len; i+=N) {
        __m128i vNH = vNegInf0;
        __m128i vWH = vNegInf0;
        __m128i vE = vNegInf;
        __m128i vF = vNegInf;
        __m128i vJ = vJreset;
        const int * const restrict matrow0 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+0] : ((i+0 >= s1Len) ? s1Len-1 : i+0))];
        const int * const restrict matrow1 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+1] : ((i+1 >= s1Len) ? s1Len-1 : i+1))];
        const int * const restrict matrow2 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+2] : ((i+2 >= s1Len) ? s1Len-1 : i+2))];
        const int * const restrict matrow3 = &matrix->matrix[matrix->size * ((matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) ? s1[i+3] : ((i+3 >= s1Len) ? s1Len-1 : i+3))];
        __m128i vIltLimit = _mm_cmplt_epi32(vI, vILimit);
        /* iterate over database sequence */
        for (j=0; j<s2Len+PAD; ++j) {
            __m128i vMat;
            __m128i vNWH = vNH;
            vNH = _mm_srli_si128(vWH, 4);
            vNH = _mm_insert_epi32_rpl(vNH, H_pr[j], 3);
            vF = _mm_srli_si128(vF, 4);
            vF = _mm_insert_epi32_rpl(vF, F_pr[j], 3);
            vF = _mm_max_epi32_rpl(
                    _mm_sub_epi32(vNH, vOpen),
                    _mm_sub_epi32(vF, vGap));
            vE = _mm_max_epi32_rpl(
                    _mm_sub_epi32(vWH, vOpen),
                    _mm_sub_epi32(vE, vGap));
            vMat = _mm_set_epi32(
                    matrow0[s2[j-0]],
                    matrow1[s2[j-1]],
                    matrow2[s2[j-2]],
                    matrow3[s2[j-3]]
                    );
            vNWH = _mm_add_epi32(vNWH, vMat);
            vWH = _mm_max_epi32_rpl(vNWH, vE);
            vWH = _mm_max_epi32_rpl(vWH, vF);
            vWH = _mm_max_epi32_rpl(vWH, vZero);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m128i cond = _mm_cmpeq_epi32(vJ,vNegOne);
                vWH = _mm_andnot_si128(cond, vWH);
                vF = _mm_blendv_epi8_rpl(vF, vNegInf, cond);
                vE = _mm_blendv_epi8_rpl(vE, vNegInf, cond);
            }
            /* cannot start checking sat until after J clears boundary */
            if (j > PAD) {
                vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vWH);
                vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vWH);
            }
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vWH, i, s1Len, j, s2Len);
#endif
#ifdef PARASAIL_ROWCOL
            arr_store_rowcol(result->rowcols->score_row, result->rowcols->score_col, vWH, i, s1Len, j, s2Len);
#endif
            H_pr[j-3] = (int32_t)_mm_extract_epi32_rpl(vWH,0);
            F_pr[j-3] = (int32_t)_mm_extract_epi32_rpl(vF,0);
            /* as minor diagonal vector passes across table, extract
             * max values within the i,j bounds */
            {
                __m128i cond_valid_J = _mm_and_si128(
                        _mm_cmpgt_epi32(vJ, vNegOne),
                        _mm_cmplt_epi32(vJ, vJLimit));
                __m128i cond_valid_IJ = _mm_and_si128(cond_valid_J, vIltLimit);
                __m128i cond_eq = _mm_cmpeq_epi32(vWH, vMaxH);
                __m128i cond_max = _mm_cmpgt_epi32(vWH, vMaxH);
                __m128i cond_all = _mm_and_si128(cond_max, cond_valid_IJ);
                __m128i cond_Jlt = _mm_cmplt_epi32(vJ, vEndJ);
                vMaxH = _mm_blendv_epi8_rpl(vMaxH, vWH, cond_all);
                vEndI = _mm_blendv_epi8_rpl(vEndI, vI, cond_all);
                vEndJ = _mm_blendv_epi8_rpl(vEndJ, vJ, cond_all);
                cond_all = _mm_and_si128(cond_Jlt, cond_eq);
                cond_all = _mm_and_si128(cond_all, cond_valid_IJ);
                vEndI = _mm_blendv_epi8_rpl(vEndI, vI, cond_all);
                vEndJ = _mm_blendv_epi8_rpl(vEndJ, vJ, cond_all);
            }
            vJ = _mm_add_epi32(vJ, vOne);
        }
        vI = _mm_add_epi32(vI, vN);
    }

    /* alignment ending position */
    {
        int32_t *t = (int32_t*)&vMaxH;
        int32_t *i = (int32_t*)&vEndI;
        int32_t *j = (int32_t*)&vEndJ;
        int32_t k;
        for (k=0; k<N; ++k, ++t, ++i, ++j) {
            if (*t > score) {
                score = *t;
                end_query = *i;
                end_ref = *j;
            }
            else if (*t == score) {
                if (*j < end_ref) {
                    end_query = *i;
                    end_ref = *j;
                }
                else if (*j == end_ref && *i < end_query) {
                    end_query = *i;
                    end_ref = *j;
                }
            }
        }
    }

    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(_F_pr);
    parasail_free(_H_pr);
    parasail_free(s2B);
    if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
        parasail_free(s1);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
testq %rdx, %rdx
je 0x344744
movl %ecx, %ebx
testl %ecx, %ecx
jle 0x34474b
movl %r8d, %r12d
testl %r8d, %r8d
js 0x344752
movl %r9d, %r15d
testl %r9d, %r9d
js 0x344759
movl %esi, %r14d
movq 0x180(%rsp), %rsi
testq %rsi, %rsi
je 0x344760
movl 0x30(%rsi), %eax
testl %eax, %eax
jne 0x343e9d
testq %rdi, %rdi
je 0x344767
testl %r14d, %r14d
jle 0x34476e
testl %eax, %eax
je 0x343ea1
movl 0x34(%rsi), %r14d
movq %rdi, 0x48(%rsp)
movq %rdx, 0x60(%rsp)
movl %r12d, %eax
negl %eax
movl 0x20(%rsi), %ecx
movl $0x80000000, %edi       # imm = 0x80000000
movl %r12d, %edx
orl %edi, %edx
subl %ecx, %edi
cmpl %eax, %ecx
cmovgl %edx, %edi
incl %edi
movl $0x7ffffffe, %ebp       # imm = 0x7FFFFFFE
subl 0x1c(%rsi), %ebp
movl %edi, 0x14(%rsp)
movd %edi, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x70(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x80(%rsp)
movl %r14d, %edi
movl %ebx, %esi
callq 0x209630
testq %rax, %rax
je 0x344773
movl %r12d, 0x40(%rsp)
movq %rax, 0x20(%rsp)
orl $0x4441004, 0xc(%rax)   # imm = 0x4441004
movq %rbx, 0x8(%rsp)
leal 0x6(%rbx), %r12d
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094d5
movq %rax, %rbx
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094d5
movq %rax, %r13
movl $0x10, %edi
movq %r12, %rsi
callq 0x2094d5
testq %rbx, %rbx
sete %dl
testq %r13, %r13
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x344773
movq %rbx, %rsi
movl %r15d, 0x38(%rsp)
movq 0x180(%rsp), %r15
cmpl $0x0, 0x30(%r15)
movq %rax, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
je 0x343fa0
movq $0x0, 0x18(%rsp)
movq 0x8(%rsp), %r12
jmp 0x34401a
leal 0x3(%r14), %ebx
movslq %ebx, %rsi
movl $0x10, %edi
callq 0x2094d5
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x344773
testl %r14d, %r14d
movq 0x8(%rsp), %r12
movq 0x18(%rsp), %rdi
movq 0x48(%rsp), %r8
jle 0x343fef
movq 0x10(%r15), %rax
movl %r14d, %ecx
xorl %edx, %edx
movzbl (%r8,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, (%rdi,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x343fdc
movslq %r14d, %rax
leaq (%rdi,%rax,4), %rdi
leal 0x1(%r14), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %r14d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x30(%rsp), %rsi
leal 0x3(%r12), %ebx
movd %ebp, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x90(%rsp)
movdqa 0x50(%rsp), %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm0, 0xf0(%rsp)
movd 0x40(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x120(%rsp)
movd 0x38(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x110(%rsp)
movd %r14d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xe0(%rsp)
movd %r12d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x100(%rsp)
movq 0x10(%r15), %rax
cmpl $0x2, %r12d
movl $0x1, %r15d
cmovgel %r12d, %r15d
xorl %ecx, %ecx
movq 0x60(%rsp), %rdi
movzbl (%rdi,%rcx), %edx
movl (%rax,%rdx,4), %edx
movl %edx, 0xc(%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %r15
jne 0x3440ac
movl $0x0, 0x8(%rsi)
movq $0x0, (%rsi)
movl %r12d, %ebp
leaq (%rsi,%rbp,4), %rdi
addq $0xc, %rdi
leal 0x1(%r12), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %r12d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x19e090
movl 0x14(%rsp), %edx
movq 0x28(%rsp), %rsi
movl $0x0, 0xc(%r13,%r12,4)
movl %edx, 0xc(%rsi,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x344104
xorl %eax, %eax
movl %edx, (%r13,%rax,4)
movl %edx, (%rsi,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x34411c
leaq 0x3(%rbp), %rax
movq 0x8(%rsp), %rcx
movq 0x180(%rsp), %r12
movl %edx, (%r13,%rax,4)
movl %edx, (%rsi,%rax,4)
incq %rax
incl %ecx
cmpl %ecx, %ebx
jg 0x34413e
movdqa 0x70(%rsp), %xmm2
testl %r14d, %r14d
jle 0x34466e
movq 0x8(%r12), %rax
movq %rax, 0xb8(%rsp)
movq 0x8(%rsp), %rax
decl %eax
movq %rax, 0x8(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0xd0(%rsp)
leal -0x1(%r14), %edx
movl %r14d, %esi
leaq 0x1(%rbp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x2(%rbp), %rax
movq %rax, 0xc0(%rsp)
movaps 0x2b17f0(%rip), %xmm0   # 0x5f59a0
movaps %xmm0, 0x60(%rsp)
xorl %r14d, %r14d
pcmpeqd %xmm11, %xmm11
movdqa 0x90(%rsp), %xmm1
movdqa 0x50(%rsp), %xmm0
movl 0x30(%r12), %r8d
movl %r14d, %ecx
testl %r8d, %r8d
movq 0x18(%rsp), %rbx
jne 0x3441e2
movl (%rbx,%r14,4), %ecx
movq %r14, %r10
orq $0x1, %r10
testl %r8d, %r8d
je 0x3441f9
cmpq %rsi, %r10
movl %edx, %edi
cmovbl %r10d, %edi
jmp 0x3441fd
movl (%rbx,%r10,4), %edi
movq %r14, %r11
orq $0x2, %r11
testl %r8d, %r8d
je 0x344215
cmpq %rsi, %r11
movl %edx, %r15d
cmovbl %r11d, %r15d
jmp 0x344219
movl (%rbx,%r11,4), %r15d
movq %r14, %r9
orq $0x3, %r9
testl %r8d, %r8d
je 0x344231
cmpq %rsi, %r9
movl %edx, %r8d
cmovbl %r9d, %r8d
jmp 0x344235
movl (%rbx,%r9,4), %r8d
movl 0x18(%r12), %r12d
imull %r12d, %ecx
movslq %ecx, %rcx
movq 0xb8(%rsp), %rbx
leaq (%rbx,%rcx,4), %rcx
movq %rcx, 0x48(%rsp)
imull %r12d, %edi
movslq %edi, %rcx
leaq (%rbx,%rcx,4), %rcx
movq %rcx, 0x40(%rsp)
imull %r12d, %r15d
movslq %r15d, %rcx
leaq (%rbx,%rcx,4), %rcx
movq %rcx, 0x38(%rsp)
imull %r12d, %r8d
movslq %r8d, %rdi
leaq (%rbx,%rdi,4), %rcx
movq %rcx, 0xd8(%rsp)
movdqa 0xe0(%rsp), %xmm3
pcmpgtd 0x60(%rsp), %xmm3
movdqa %xmm3, 0x130(%rsp)
xorl %r8d, %r8d
movdqa 0x2b18d7(%rip), %xmm8   # 0x5f5b80
movaps 0x50(%rsp), %xmm10
movaps %xmm10, %xmm14
movaps 0xf0(%rsp), %xmm3
movaps %xmm3, %xmm6
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rax
movslq 0xc(%rax,%r8,4), %r15
movslq 0x8(%rax,%r8,4), %r12
movslq 0x4(%rax,%r8,4), %rbx
movq %r13, %rcx
movslq (%rax,%r8,4), %r13
movq 0x48(%rsp), %rax
movd (%rax,%r15,4), %xmm4
movq 0x40(%rsp), %rax
movd (%rax,%r12,4), %xmm5
punpckldq %xmm4, %xmm5    # xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1]
movq 0x38(%rsp), %rax
movd (%rax,%rbx,4), %xmm7
movq 0xd8(%rsp), %rax
movd (%rax,%r13,4), %xmm4
punpckldq %xmm7, %xmm4    # xmm4 = xmm4[0],xmm7[0],xmm4[1],xmm7[1]
movss 0xc(%rcx,%r8,4), %xmm7
shufps $0xf4, %xmm6, %xmm7     # xmm7 = xmm7[0,1],xmm6[3,3]
punpcklqdq %xmm5, %xmm4    # xmm4 = xmm4[0],xmm5[0]
paddd %xmm3, %xmm4
movaps %xmm6, %xmm3
shufps $0x29, %xmm7, %xmm3     # xmm3 = xmm3[1,2],xmm7[2,0]
movss 0xc(%rdi,%r8,4), %xmm5
shufps $0xf4, %xmm14, %xmm5    # xmm5 = xmm5[0,1],xmm14[3,3]
shufps $0x29, %xmm5, %xmm14    # xmm14 = xmm14[1,2],xmm5[2,0]
movaps %xmm3, %xmm5
movdqa 0x120(%rsp), %xmm7
psubd %xmm7, %xmm5
movdqa 0x110(%rsp), %xmm9
psubd %xmm9, %xmm14
movdqa %xmm5, %xmm15
pcmpgtd %xmm14, %xmm15
pand %xmm15, %xmm5
pandn %xmm14, %xmm15
por %xmm5, %xmm15
psubd %xmm7, %xmm6
psubd %xmm9, %xmm10
movdqa %xmm6, %xmm7
pcmpgtd %xmm10, %xmm7
pand %xmm7, %xmm6
pandn %xmm10, %xmm7
por %xmm6, %xmm7
movdqa %xmm4, %xmm5
pcmpgtd %xmm7, %xmm5
pand %xmm5, %xmm4
pandn %xmm7, %xmm5
por %xmm4, %xmm5
movdqa %xmm5, %xmm4
pcmpgtd %xmm15, %xmm4
pand %xmm4, %xmm5
pandn %xmm15, %xmm4
por %xmm5, %xmm4
movdqa %xmm4, %xmm13
pcmpgtd 0x251ec2(%rip), %xmm13  # 0x596290
pand %xmm4, %xmm13
movdqa %xmm8, %xmm10
pcmpeqd %xmm11, %xmm10
movdqa %xmm10, %xmm6
pandn %xmm13, %xmm6
cmpq $0x4, %r8
jb 0x34441d
movdqa %xmm1, %xmm4
pcmpgtd %xmm6, %xmm4
movdqa %xmm6, %xmm5
pand %xmm4, %xmm5
pandn %xmm1, %xmm4
por %xmm5, %xmm4
movdqa %xmm0, %xmm1
pcmpgtd %xmm6, %xmm1
pand %xmm1, %xmm0
pandn %xmm6, %xmm1
por %xmm1, %xmm0
movdqa %xmm4, %xmm1
cmpq %rdx, %r14
setne %bl
movq 0x20(%rsp), %r15
movq 0x10(%r15), %r15
movq (%r15), %r12
movq 0x8(%r15), %r15
cmpq %rbp, %r8
setae %r13b
orb %bl, %r13b
pshufd $0xff, %xmm6, %xmm4     # xmm4 = xmm6[3,3,3,3]
jne 0x34444a
movd %xmm4, (%r12,%r8,4)
cmpq %r8, 0x8(%rsp)
jne 0x344457
movd %xmm4, (%r15,%r14,4)
cmpq %rdx, %r10
setne %bl
leaq -0x1(%r8), %r13
cmpq %rbp, %r13
setae %r13b
orb %bl, %r13b
pshufd $0xee, %xmm6, %xmm4     # xmm4 = xmm6[2,3,2,3]
jne 0x344479
movd %xmm4, -0x4(%r12,%r8,4)
cmpq %rsi, %r10
setae %bl
cmpq %r8, %rbp
setne %r13b
orb %bl, %r13b
jne 0x344491
movd %xmm4, (%r15,%r10,4)
cmpq %rdx, %r11
jne 0x3444bc
leaq -0x2(%r8), %rbx
cmpq $0x2, %r8
setae %r13b
cmpq %rbp, %rbx
setl %bl
andb %r13b, %bl
cmpb $0x1, %bl
jne 0x3444bc
pshufd $0x55, %xmm6, %xmm4     # xmm4 = xmm6[1,1,1,1]
movd %xmm4, -0x8(%r12,%r8,4)
cmpq %rsi, %r11
setae %bl
cmpq %r8, 0xc8(%rsp)
setne %r13b
orb %bl, %r13b
jne 0x3444de
pshufd $0x55, %xmm6, %xmm4     # xmm4 = xmm6[1,1,1,1]
movd %xmm4, (%r15,%r11,4)
cmpq %rdx, %r9
jne 0x344501
leaq -0x3(%r8), %rbx
cmpq $0x3, %r8
setb %r13b
cmpq %rbp, %rbx
setge %bl
orb %r13b, %bl
jne 0x344501
movd %xmm6, -0xc(%r12,%r8,4)
cmpq %rsi, %r9
setae %bl
cmpq %r8, 0xc0(%rsp)
setne %r12b
orb %bl, %r12b
movq %rcx, %r13
jne 0x344521
movd %xmm6, (%r15,%r9,4)
movdqa %xmm10, %xmm14
pandn %xmm15, %xmm14
movdqa 0x50(%rsp), %xmm4
pand %xmm10, %xmm4
por %xmm4, %xmm14
pandn %xmm7, %xmm10
por %xmm4, %xmm10
movd %xmm6, (%r13,%r8,4)
movq 0x28(%rsp), %rdi
movd %xmm14, (%rdi,%r8,4)
movdqa 0x100(%rsp), %xmm4
pcmpgtd %xmm8, %xmm4
pand 0x130(%rsp), %xmm4
movdqa %xmm8, %xmm9
psrad $0x1f, %xmm9
pandn %xmm4, %xmm9
movdqa 0xa0(%rsp), %xmm5
movdqa %xmm6, %xmm11
pcmpeqd %xmm5, %xmm11
movdqa %xmm6, %xmm12
pcmpgtd %xmm5, %xmm12
movdqa 0x80(%rsp), %xmm4
movdqa %xmm4, %xmm15
pcmpgtd %xmm8, %xmm15
pand %xmm11, %xmm15
movdqa %xmm15, %xmm11
movdqa %xmm9, %xmm7
pand %xmm15, %xmm7
por %xmm12, %xmm15
pand %xmm9, %xmm12
pand %xmm12, %xmm13
pandn %xmm12, %xmm11
pandn %xmm5, %xmm12
por %xmm12, %xmm13
movdqa %xmm13, 0xa0(%rsp)
por %xmm11, %xmm7
movdqa 0x60(%rsp), %xmm5
pand %xmm7, %xmm5
pandn %xmm2, %xmm7
movdqa %xmm7, %xmm2
por %xmm5, %xmm2
pand %xmm9, %xmm15
movdqa %xmm8, %xmm5
pand %xmm15, %xmm5
pandn %xmm4, %xmm15
por %xmm5, %xmm15
movdqa %xmm15, 0x80(%rsp)
pcmpeqd %xmm11, %xmm11
psubd %xmm11, %xmm8
incq %r8
cmpq %r8, 0xd0(%rsp)
jne 0x3442c3
movdqa 0x60(%rsp), %xmm3
paddd 0x2b153f(%rip), %xmm3   # 0x5f5b90
movdqa %xmm3, 0x60(%rsp)
addq $0x4, %r14
cmpq %rsi, %r14
movq 0x180(%rsp), %r12
jb 0x3441cc
jmp 0x34467d
movdqa 0x50(%rsp), %xmm0
movdqa 0x90(%rsp), %xmm1
movdqa %xmm2, 0x70(%rsp)
xorl %edx, %edx
xorl %eax, %eax
xorl %ecx, %ecx
movl 0x14(%rsp), %r8d
movq 0x18(%rsp), %rbx
movl 0xa0(%rsp,%rdx,4), %esi
cmpl %r8d, %esi
jle 0x3446af
movl 0x70(%rsp,%rdx,4), %eax
movl 0x80(%rsp,%rdx,4), %ecx
movl %esi, %r8d
jmp 0x3446d2
jne 0x3446d2
movl 0x80(%rsp,%rdx,4), %esi
cmpl %ecx, %esi
jge 0x3446c4
movl 0x70(%rsp,%rdx,4), %eax
movl %esi, %ecx
jmp 0x3446d2
jne 0x3446d2
movl 0x70(%rsp,%rdx,4), %edi
cmpl %eax, %edi
cmovll %esi, %ecx
cmovll %edi, %eax
incq %rdx
cmpl $0x4, %edx
jne 0x344693
movdqa 0x50(%rsp), %xmm2
pcmpgtd %xmm1, %xmm2
pcmpgtd 0x90(%rsp), %xmm0
por %xmm2, %xmm0
movmskps %xmm0, %edx
testl %edx, %edx
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rdi
je 0x34470d
orb $0x40, 0xc(%rdx)
xorl %r8d, %r8d
xorl %ecx, %ecx
xorl %eax, %eax
movl %r8d, (%rdx)
movl %eax, 0x4(%rdx)
movl %ecx, 0x8(%rdx)
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq 0x30(%rsp), %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%r12)
jne 0x34473d
movq %rbx, %rdi
callq 0x2094b5
movq 0x20(%rsp), %rax
jmp 0x344775
callq 0x1b57fb
jmp 0x344773
callq 0x1b57d5
jmp 0x344773
callq 0x1b57af
jmp 0x344773
callq 0x1b5789
jmp 0x344773
callq 0x1b5763
jmp 0x344773
callq 0x1b573d
jmp 0x344773
callq 0x1b5717
xorl %eax, %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop