// File: /workspace/github_c_makefile_star2_O2/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 $0x138, %rsp            # imm = 0x138
testq %rdx, %rdx
je 0x2faafd
movl %ecx, %r12d
testl %ecx, %ecx
jle 0x2fab21
testl %r8d, %r8d
js 0x2fab45
testl %r9d, %r9d
js 0x2fab83
movq 0x170(%rsp), %r15
testq %r15, %r15
je 0x2faba4
movq %rdx, %r13
cmpl $0x0, 0x30(%r15)
je 0x2fa2a0
movl 0x34(%r15), %ebp
jmp 0x2fa2b3
testq %rdi, %rdi
je 0x2fabc5
movl %esi, %ebp
testl %esi, %esi
jle 0x2fabe6
movq %rdi, 0x30(%rsp)
movl %r9d, 0x40(%rsp)
movl %r8d, %eax
negl %eax
movl 0x20(%r15), %ecx
movl $0x80000000, %r14d      # imm = 0x80000000
movl %r8d, 0x20(%rsp)
movl %r8d, %edx
orl %r14d, %edx
subl %ecx, %r14d
cmpl %eax, %ecx
cmovgl %edx, %r14d
incl %r14d
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%r15), %eax
movl %eax, 0x38(%rsp)
movd %r14d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x50(%rsp)
movdqa %xmm0, 0x70(%rsp)
movl %ebp, %edi
movl %r12d, %esi
callq 0x1ab93b
testq %rax, %rax
je 0x2fa381
movq %rax, %rbx
movq %r13, 0x18(%rsp)
movl %r14d, 0x4(%rsp)
orl $0x4441004, 0xc(%rax)   # imm = 0x4441004
movq %r12, 0x10(%rsp)
addl $0x6, %r12d
pushq $0x10
popq %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x1ab783
movq %rax, %r14
movq %r13, %rdi
movq %r12, %rsi
callq 0x1ab783
movq %rax, %r13
pushq $0x10
popq %rdi
movq %r12, %rsi
callq 0x1ab783
movq %rax, %r12
testq %r14, %r14
sete %al
testq %r13, %r13
sete %cl
orb %al, %cl
testq %r12, %r12
sete %al
orb %cl, %al
je 0x2fa388
xorl %ebx, %ebx
jmp 0x2fac0e
movq %r13, %r11
movq %rbx, 0x68(%rsp)
cmpl $0x0, 0x30(%r15)
movslq %ebp, %rbx
movq %r13, 0x28(%rsp)
je 0x2faa9c
movq $0x0, 0x8(%rsp)
movl 0x4(%rsp), %r8d
movq 0x18(%rsp), %r9
movq 0x10(%rsp), %rax
leal 0x3(%rax), %edi
movd 0x38(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xd0(%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 0x20(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x110(%rsp)
movd 0x40(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
movd %ebp, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xe0(%rsp)
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x100(%rsp)
movl %eax, %ecx
movq 0x10(%r15), %rax
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x2fa448
movzbl (%r9,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, 0xc(%r14,%rdx,4)
incq %rdx
jmp 0x2fa431
xorl %eax, %eax
cmpq $0x3, %rax
je 0x2fa45a
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x2fa44a
movq %rcx, %rax
cmpl %eax, %edi
jle 0x2fa46c
andl $0x0, 0xc(%r14,%rax,4)
incq %rax
jmp 0x2fa45d
xorl %eax, %eax
cmpq %rax, %rcx
je 0x2fa483
andl $0x0, 0xc(%r11,%rax,4)
movl %r8d, 0xc(%r12,%rax,4)
incq %rax
jmp 0x2fa46e
xorl %eax, %eax
cmpq $0x3, %rax
je 0x2fa498
movl %r8d, (%r11,%rax,4)
movl %r8d, (%r12,%rax,4)
incq %rax
jmp 0x2fa485
movq %rcx, %rax
cmpl %eax, %edi
jle 0x2fa4ae
movl %r8d, 0xc(%r11,%rax,4)
movl %r8d, 0xc(%r12,%rax,4)
incq %rax
jmp 0x2fa49b
decl %ebp
movq 0x10(%rsp), %rax
decl %eax
movq %rax, 0x10(%rsp)
xorl %edx, %edx
testl %edi, %edi
cmovlel %edx, %edi
movq %rdi, 0x38(%rsp)
movdqa 0xa0(%rsp), %xmm15
movdqa 0x70(%rsp), %xmm13
leaq 0x2(%rcx), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%rsp)
movaps 0x2cd4c8(%rip), %xmm0   # 0x5c79c0
movaps %xmm0, 0x40(%rsp)
movdqa 0x50(%rsp), %xmm6
movdqa %xmm6, %xmm5
movdqa %xmm6, %xmm0
movdqa %xmm6, %xmm14
movdqa 0xd0(%rsp), %xmm1
movdqa %xmm1, 0x80(%rsp)
movq %r12, 0x20(%rsp)
cmpq %rbx, %rdx
jge 0x2fa9ba
movq %rdx, %r8
orq $0x3, %r8
cmpl $0x0, 0x30(%r15)
je 0x2fa56c
movq %rdx, %r9
orq $0x1, %r9
cmpq %rbx, %r9
movl %r9d, %eax
cmovgel %ebp, %eax
movq %rdx, %r10
orq $0x2, %r10
cmpq %rbx, %r10
movl %r10d, %esi
cmovgel %ebp, %esi
cmpq %rbx, %r8
movl %r8d, %edi
cmovgel %ebp, %edi
movl %edx, %r13d
jmp 0x2fa58f
movq 0x8(%rsp), %rdi
movl (%rdi,%rdx,4), %r13d
movl 0x4(%rdi,%rdx,4), %eax
movq %rdx, %r9
orq $0x1, %r9
movq %rdx, %r10
orq $0x2, %r10
movl 0x8(%rdi,%rdx,4), %esi
movl (%rdi,%r8,4), %edi
movq 0x8(%r15), %r12
movl 0x18(%r15), %r15d
imull %r15d, %eax
cltq
leaq (%r12,%rax,4), %rax
movq %rax, 0x30(%rsp)
imull %r15d, %r13d
movslq %r13d, %rax
leaq (%r12,%rax,4), %rax
movq %rax, 0x18(%rsp)
imull %r15d, %esi
movslq %esi, %rax
leaq (%r12,%rax,4), %rax
movq %rax, 0xc8(%rsp)
imull %r15d, %edi
movslq %edi, %rsi
leaq (%r12,%rsi,4), %rsi
movdqa 0xe0(%rsp), %xmm1
pcmpgtd 0x40(%rsp), %xmm1
movdqa %xmm1, 0x120(%rsp)
xorl %edi, %edi
movaps 0xf0(%rsp), %xmm7
movaps %xmm7, %xmm1
movaps 0x50(%rsp), %xmm9
movaps %xmm9, %xmm11
movdqa 0x2cd5a4(%rip), %xmm8   # 0x5c7bb0
movq 0x20(%rsp), %r12
cmpq %rdi, 0x38(%rsp)
je 0x2fa990
movss 0xc(%r11,%rdi,4), %xmm12
shufps $0xf4, %xmm7, %xmm12    # xmm12 = xmm12[0,1],xmm7[3,3]
movaps %xmm7, %xmm4
shufps $0x29, %xmm12, %xmm4    # xmm4 = xmm4[1,2],xmm12[2,0]
movss 0xc(%r12,%rdi,4), %xmm12
shufps $0xf4, %xmm9, %xmm12    # xmm12 = xmm12[0,1],xmm9[3,3]
shufps $0x29, %xmm12, %xmm9    # xmm9 = xmm9[1,2],xmm12[2,0]
movaps %xmm4, %xmm12
movdqa 0x110(%rsp), %xmm2
psubd %xmm2, %xmm12
psubd %xmm3, %xmm9
movdqa %xmm12, %xmm13
pcmpgtd %xmm9, %xmm13
pand %xmm13, %xmm12
pandn %xmm9, %xmm13
por %xmm12, %xmm13
psubd %xmm2, %xmm7
psubd %xmm3, %xmm11
movdqa %xmm7, %xmm12
pcmpgtd %xmm11, %xmm12
pand %xmm12, %xmm7
pandn %xmm11, %xmm12
por %xmm7, %xmm12
movslq 0xc(%r14,%rdi,4), %r15
movslq 0x8(%r14,%rdi,4), %r12
movslq 0x4(%r14,%rdi,4), %r11
movslq (%r14,%rdi,4), %r13
movq 0x18(%rsp), %rax
movd (%rax,%r15,4), %xmm9
movq 0x30(%rsp), %r15
movd (%r15,%r12,4), %xmm10
punpckldq %xmm9, %xmm10   # xmm10 = xmm10[0],xmm9[0],xmm10[1],xmm9[1]
movq 0xc8(%rsp), %rax
movd (%rax,%r11,4), %xmm9
movd (%rsi,%r13,4), %xmm11
punpckldq %xmm9, %xmm11   # xmm11 = xmm11[0],xmm9[0],xmm11[1],xmm9[1]
punpcklqdq %xmm10, %xmm11  # xmm11 = xmm11[0],xmm10[0]
paddd %xmm1, %xmm11
movdqa %xmm11, %xmm1
pcmpgtd %xmm12, %xmm1
pand %xmm1, %xmm11
pandn %xmm12, %xmm1
por %xmm11, %xmm1
movdqa %xmm1, %xmm9
pcmpgtd %xmm13, %xmm9
pand %xmm9, %xmm1
pandn %xmm13, %xmm9
por %xmm1, %xmm9
movdqa %xmm9, %xmm15
pcmpgtd 0x2cd4dc(%rip), %xmm15  # 0x5c7c00
pand %xmm9, %xmm15
movdqa %xmm8, %xmm11
pcmpeqd 0x2cd429(%rip), %xmm11  # 0x5c7b60
movdqa %xmm11, %xmm7
pandn %xmm15, %xmm7
cmpq $0x4, %rdi
jb 0x2fa78d
movdqa 0x80(%rsp), %xmm2
movdqa %xmm2, %xmm1
pcmpgtd %xmm7, %xmm1
movdqa %xmm7, %xmm9
pand %xmm1, %xmm9
pandn %xmm2, %xmm1
por %xmm9, %xmm1
movdqa %xmm6, %xmm9
pcmpgtd %xmm7, %xmm9
pand %xmm9, %xmm6
pandn %xmm7, %xmm9
por %xmm9, %xmm6
movdqa %xmm1, 0x80(%rsp)
cmpq %rbp, %rdx
setne %r11b
movq 0x68(%rsp), %r15
movq 0x10(%r15), %r15
movq (%r15), %r12
movq 0x8(%r15), %r15
cmpq %rcx, %rdi
setae %r13b
orb %r11b, %r13b
pshufd $0xff, %xmm7, %xmm1     # xmm1 = xmm7[3,3,3,3]
jne 0x2fa7bb
movd %xmm1, (%r12,%rdi,4)
cmpq %rdi, 0x10(%rsp)
jne 0x2fa7c8
movd %xmm1, (%r15,%rdx,4)
cmpq %rbp, %r9
setne %r11b
leaq -0x1(%rdi), %r13
cmpq %rcx, %r13
setae %r13b
orb %r11b, %r13b
pshufd $0xee, %xmm7, %xmm1     # xmm1 = xmm7[2,3,2,3]
jne 0x2fa7eb
movd %xmm1, -0x4(%r12,%rdi,4)
cmpq %rbx, %r9
setge %r11b
cmpq %rdi, %rcx
setne %r13b
orb %r11b, %r13b
jne 0x2fa804
movd %xmm1, (%r15,%r9,4)
pshufd $0x55, %xmm7, %xmm1     # xmm1 = xmm7[1,1,1,1]
cmpq %rbp, %r10
jne 0x2fa831
leaq -0x2(%rdi), %r11
cmpq $0x2, %rdi
setae %r13b
cmpq %rcx, %r11
setl %r11b
andb %r13b, %r11b
cmpb $0x1, %r11b
jne 0x2fa831
movd %xmm1, -0x8(%r12,%rdi,4)
cmpq %rbx, %r10
setge %r11b
cmpq %rdi, 0xb8(%rsp)
setne %r13b
orb %r11b, %r13b
jne 0x2fa84f
movd %xmm1, (%r15,%r10,4)
cmpq %rbp, %r8
setne %r11b
cmpq $0x3, %rdi
setb %r13b
orb %r11b, %r13b
jne 0x2fa86a
movd %xmm7, -0xc(%r12,%rdi,4)
cmpq %rbx, %r8
setge %r11b
cmpq %rdi, 0xc0(%rsp)
setne %r13b
movd %xmm7, %r12d
orb %r11b, %r13b
jne 0x2fa88b
movl %r12d, (%r15,%r8,4)
movdqa %xmm11, %xmm9
pandn %xmm13, %xmm9
movdqa 0x50(%rsp), %xmm1
pand %xmm11, %xmm1
por %xmm1, %xmm9
pandn %xmm12, %xmm11
por %xmm1, %xmm11
movdqa 0x100(%rsp), %xmm12
pcmpgtd %xmm8, %xmm12
pand 0x120(%rsp), %xmm12
movdqa %xmm8, %xmm1
psrad $0x1f, %xmm1
pandn %xmm12, %xmm1
movdqa %xmm7, %xmm12
pcmpeqd %xmm0, %xmm12
movdqa %xmm7, %xmm10
pcmpgtd %xmm0, %xmm10
movdqa %xmm5, %xmm13
pcmpgtd %xmm8, %xmm13
pand %xmm12, %xmm13
movdqa %xmm1, %xmm2
pand %xmm13, %xmm2
movdqa %xmm13, %xmm12
por %xmm10, %xmm13
pand %xmm1, %xmm10
pand %xmm10, %xmm15
pandn %xmm10, %xmm12
pandn %xmm0, %xmm10
por %xmm10, %xmm15
por %xmm2, %xmm12
movdqa 0x40(%rsp), %xmm0
pand %xmm12, %xmm0
pandn %xmm14, %xmm12
por %xmm0, %xmm12
movq 0x28(%rsp), %r11
movl %r12d, (%r11,%rdi,4)
movq 0x20(%rsp), %r12
movd %xmm9, (%r12,%rdi,4)
pand %xmm1, %xmm13
movdqa %xmm8, %xmm0
pand %xmm13, %xmm0
pandn %xmm5, %xmm13
por %xmm0, %xmm13
psubd 0x2cd1ea(%rip), %xmm8   # 0x5c7b60
incq %rdi
movdqa %xmm13, %xmm5
movdqa %xmm15, %xmm0
movdqa %xmm12, %xmm14
movaps %xmm4, %xmm1
jmp 0x2fa611
movdqa 0x40(%rsp), %xmm1
paddd 0x2cd222(%rip), %xmm1   # 0x5c7bc0
movdqa %xmm1, 0x40(%rsp)
addq $0x4, %rdx
movq 0x170(%rsp), %r15
movl 0x4(%rsp), %r8d
jmp 0x2fa527
movdqa %xmm15, 0xa0(%rsp)
movdqa %xmm13, 0x70(%rsp)
movdqa %xmm14, 0x90(%rsp)
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
movq 0x68(%rsp), %rbx
cmpl $0x4, %ecx
je 0x2faa31
movl 0xa0(%rsp,%rcx,4), %esi
cmpl %r8d, %esi
jle 0x2fa9fe
movl 0x90(%rsp,%rcx,4), %eax
movl 0x70(%rsp,%rcx,4), %edi
jmp 0x2faa27
jne 0x2faa22
movl 0x70(%rsp,%rcx,4), %edi
cmpl %edx, %edi
jge 0x2faa14
movl 0x90(%rsp,%rcx,4), %eax
movl %r8d, %esi
jmp 0x2faa27
jne 0x2faa22
movl 0x90(%rsp,%rcx,4), %esi
cmpl %eax, %esi
cmovll %esi, %eax
movl %r8d, %esi
movl %edx, %edi
incq %rcx
movl %esi, %r8d
movl %edi, %edx
jmp 0x2fa9e0
movdqa 0x50(%rsp), %xmm0
pcmpgtd 0x80(%rsp), %xmm0
pcmpgtd 0xd0(%rsp), %xmm6
por %xmm0, %xmm6
movmskps %xmm6, %ecx
testl %ecx, %ecx
je 0x2faa5f
orb $0x40, 0xc(%rbx)
xorl %r8d, %r8d
xorl %edx, %edx
xorl %eax, %eax
movl %r8d, (%rbx)
movl %eax, 0x4(%rbx)
movl %edx, 0x8(%rbx)
movq %r12, %rdi
callq 0x1ab763
movq 0x28(%rsp), %rdi
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
cmpl $0x0, 0x30(%r15)
jne 0x2fac0e
movq 0x8(%rsp), %rdi
callq 0x1ab763
jmp 0x2fac0e
leal 0x3(%rbp), %eax
movslq %eax, %r13
pushq $0x10
popq %rdi
movq %r13, %rsi
callq 0x1ab783
xorl %edi, %edi
movq %rax, 0x8(%rsp)
testq %rax, %rax
movl 0x4(%rsp), %r8d
movq 0x18(%rsp), %r9
je 0x2fa381
testl %ebp, %ebp
movl $0x0, %ecx
cmovgl %ebp, %ecx
movq 0x28(%rsp), %r11
movq 0x30(%rsp), %r10
movq 0x8(%rsp), %rax
cmpq %rdi, %rcx
je 0x2fab69
movq 0x10(%r15), %rdx
movzbl (%r10,%rdi), %esi
movl (%rdx,%rsi,4), %edx
movl %edx, (%rax,%rdi,4)
incq %rdi
jmp 0x2faae0
movq 0x4404d4(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc4dd(%rip), %rsi    # 0x5c6feb
leaq 0x28c646(%rip), %rdx    # 0x58715b
leaq 0x2ccbe1(%rip), %rcx    # 0x5c76fd
jmp 0x2fac05
movq 0x4404b0(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2ccbcf(%rip), %rsi    # 0x5c7701
leaq 0x28c622(%rip), %rdx    # 0x58715b
leaq 0x2ccbd5(%rip), %rcx    # 0x5c7715
jmp 0x2fac05
movq 0x44048c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2ccbc5(%rip), %rsi    # 0x5c771b
leaq 0x28c5fe(%rip), %rdx    # 0x58715b
leaq 0x2ccbcc(%rip), %rcx    # 0x5c7730
jmp 0x2fac05
movq %rbx, %rax
movq 0x8(%rsp), %rcx
cmpq %r13, %rax
jge 0x2fa3b6
andl $0x0, (%rcx,%rax,4)
incq %rax
jmp 0x2fab71
movq 0x44044e(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2ccb87(%rip), %rsi    # 0x5c771b
leaq 0x28c5c0(%rip), %rdx    # 0x58715b
leaq 0x2ccb93(%rip), %rcx    # 0x5c7735
jmp 0x2fac05
movq 0x44042d(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc436(%rip), %rsi    # 0x5c6feb
leaq 0x28c59f(%rip), %rdx    # 0x58715b
leaq 0x2ccd7f(%rip), %rcx    # 0x5c7942
jmp 0x2fac05
movq 0x44040c(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2cc415(%rip), %rsi    # 0x5c6feb
leaq 0x28c57e(%rip), %rdx    # 0x58715b
leaq 0x2ccb55(%rip), %rcx    # 0x5c7739
jmp 0x2fac05
movq 0x4403eb(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2ccb0a(%rip), %rsi    # 0x5c7701
leaq 0x28c55d(%rip), %rdx    # 0x58715b
leaq 0x2ccb38(%rip), %rcx    # 0x5c773d
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop