// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sg_diag_sse2_128_32.c
// Function: parasail_sg_flags_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,
        int s1_beg, int s1_end, int s2_beg, int s2_end)
{
    /* 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 vOpen;
    __m128i vGap;
    __m128i vOne;
    __m128i vN;
    __m128i vGapN;
    __m128i vNegOne;
    __m128i vI;
    __m128i vJreset;
    __m128i vMaxHRow;
    __m128i vMaxHCol;
    __m128i vLastVal;
    __m128i vEndI;
    __m128i vEndJ;
    __m128i vILimit;
    __m128i vILimit1;
    __m128i vJLimit;
    __m128i vJLimit1;
    __m128i vIBoundary;

    /* 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);
    vOpen = _mm_set1_epi32(open);
    vGap  = _mm_set1_epi32(gap);
    vOne = _mm_set1_epi32(1);
    vN = _mm_set1_epi32(N);
    vGapN = s1_beg ? _mm_set1_epi32(0) : _mm_set1_epi32(gap*N);
    vNegOne = _mm_set1_epi32(-1);
    vI = _mm_set_epi32(0,1,2,3);
    vJreset = _mm_set_epi32(0,-1,-2,-3);
    vMaxHRow = vNegInf;
    vMaxHCol = vNegInf;
    vLastVal = vNegInf;
    vEndI = vNegInf;
    vEndJ = vNegInf;
    vILimit = _mm_set1_epi32(s1Len);
    vILimit1 = _mm_sub_epi32(vILimit, vOne);
    vJLimit = _mm_set1_epi32(s2Len);
    vJLimit1 = _mm_sub_epi32(vJLimit, vOne);
    vIBoundary = s1_beg ? _mm_set1_epi32(0) : _mm_set_epi32(
            -open-0*gap,
            -open-1*gap,
            -open-2*gap,
            -open-3*gap);

    /* 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_SG | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_BITS_32 | PARASAIL_FLAG_LANES_4;
    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 */
    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 */
    if (s2_beg) {
        for (j=0; j<s2Len; ++j) {
            H_pr[j] = 0;
            F_pr[j] = NEG_LIMIT;
        }
    }
    else {
        for (j=0; j<s2Len; ++j) {
            H_pr[j] = -open - j*gap;
            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;
    }
    H_pr[-1] = 0; /* upper left corner */

    /* iterate over query sequence */
    for (i=0; i<s1Len; i+=N) {
        __m128i vNH = vNegInf;
        __m128i vWH = vNegInf;
        __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);
        __m128i vIeqLimit1 = _mm_cmpeq_epi32(vI, vILimit1);
        vNH = _mm_srli_si128(vNH, 4);
        vNH = _mm_insert_epi32_rpl(vNH, H_pr[-1], 3);
        vWH = _mm_srli_si128(vWH, 4);
        vWH = _mm_insert_epi32_rpl(vWH, s1_beg ? 0 : (-open - i*gap), 3);
        H_pr[-1] = -open - (i+N)*gap;
        /* 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);
            /* as minor diagonal vector passes across the j=-1 boundary,
             * assign the appropriate boundary conditions */
            {
                __m128i cond = _mm_cmpeq_epi32(vJ,vNegOne);
                vWH = _mm_blendv_epi8_rpl(vWH, vIBoundary, cond);
                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 the i or j limit
             * boundary, extract the last value of the column or row */
            {
                __m128i vJeqLimit1 = _mm_cmpeq_epi32(vJ, vJLimit1);
                __m128i vJgtNegOne = _mm_cmpgt_epi32(vJ, vNegOne);
                __m128i vJltLimit = _mm_cmplt_epi32(vJ, vJLimit);
                __m128i cond_j = _mm_and_si128(vIltLimit, vJeqLimit1);
                __m128i cond_i = _mm_and_si128(vIeqLimit1,
                        _mm_and_si128(vJgtNegOne, vJltLimit));
                __m128i cond_max_row = _mm_cmpgt_epi32(vWH, vMaxHRow);
                __m128i cond_max_col = _mm_cmpgt_epi32(vWH, vMaxHCol);
                __m128i cond_last_val = _mm_and_si128(vIeqLimit1, vJeqLimit1);
                __m128i cond_all_row = _mm_and_si128(cond_max_row, cond_i);
                __m128i cond_all_col = _mm_and_si128(cond_max_col, cond_j);
                vMaxHRow = _mm_blendv_epi8_rpl(vMaxHRow, vWH, cond_all_row);
                vMaxHCol = _mm_blendv_epi8_rpl(vMaxHCol, vWH, cond_all_col);
                vLastVal = _mm_blendv_epi8_rpl(vLastVal, vWH, cond_last_val);
                vEndI = _mm_blendv_epi8_rpl(vEndI, vI, cond_all_col);
                vEndJ = _mm_blendv_epi8_rpl(vEndJ, vJ, cond_all_row);
            }
            vJ = _mm_add_epi32(vJ, vOne);
        }
        vI = _mm_add_epi32(vI, vN);
        vIBoundary = _mm_sub_epi32(vIBoundary, vGapN);
    }

    /* alignment ending position */
    {
        int32_t max_row = NEG_LIMIT;
        int32_t max_col = NEG_LIMIT;
        int32_t last_val = NEG_LIMIT;
        int32_t *s = (int32_t*)&vMaxHRow;
        int32_t *t = (int32_t*)&vMaxHCol;
        int32_t *u = (int32_t*)&vLastVal;
        int32_t *i = (int32_t*)&vEndI;
        int32_t *j = (int32_t*)&vEndJ;
        int32_t k;
        for (k=0; k<N; ++k, ++s, ++t, ++u, ++i, ++j) {
            if (*t > max_col || (*t == max_col && *i < end_query)) {
                max_col = *t;
                end_query = *i;
            }
            if (*s > max_row) {
                max_row = *s;
                end_ref = *j;
            }
            if (*u > last_val) {
                last_val = *u;
            }
        }
        if (s1_end && s2_end) {
            if (max_col > max_row || (max_col == max_row && end_ref == s2Len-1)) {
                score = max_col;
                end_ref = s2Len-1;
            }
            else {
                score = max_row;
                end_query = s1Len-1;
            }
        }
        else if (s1_end) {
            score = max_col;
            end_ref = s2Len-1;
        }
        else if (s2_end) {
            score = max_row;
            end_query = s1Len-1;
        }
        else {
            score = last_val;
            end_query = s1Len-1;
            end_ref = s2Len-1;
        }
    }

    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 $0x1f8, %rsp            # imm = 0x1F8
testq %rdx, %rdx
je 0x343bf0
movl %ecx, %r14d
testl %ecx, %ecx
jle 0x343bfa
movl %r8d, %r15d
testl %r8d, %r8d
js 0x343c04
testl %r9d, %r9d
js 0x343c0e
movq 0x230(%rsp), %rcx
testq %rcx, %rcx
je 0x343c18
movq %rdx, %rbx
movl 0x30(%rcx), %eax
testl %eax, %eax
jne 0x343062
testq %rdi, %rdi
je 0x343cb9
testl %esi, %esi
jle 0x343cc0
testl %eax, %eax
je 0x343065
movl 0x34(%rcx), %esi
movq %rdi, 0x60(%rsp)
leal 0x3(%rsi), %eax
movl %eax, 0x30(%rsp)
leal 0x3(%r14), %r13d
movl %r15d, %edi
negl %edi
movl 0x20(%rcx), %eax
movq %rcx, %r8
movl $0x80000000, %edx       # imm = 0x80000000
movl %r15d, %ecx
orl %edx, %ecx
subl %eax, %edx
movl %edi, 0x14(%rsp)
cmpl %edi, %eax
cmovgl %ecx, %edx
incl %edx
movl $0x7ffffffe, %r12d      # imm = 0x7FFFFFFE
subl 0x1c(%r8), %r12d
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x50(%rsp)
movd %r9d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pxor %xmm1, %xmm1
movdqa %xmm1, 0xa0(%rsp)
cmpl $0x0, 0x238(%rsp)
jne 0x3430da
movdqa %xmm0, %xmm1
pslld $0x2, %xmm1
movdqa %xmm1, 0x160(%rsp)
movdqa %xmm0, 0x1d0(%rsp)
movl %edx, 0x10(%rsp)
movdqa 0x50(%rsp), %xmm0
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xb0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
jne 0x343164
movl 0x14(%rsp), %edi
movl %edi, %eax
subl %r9d, %eax
movl %edi, %edx
subl %r9d, %edx
subl %r9d, %edx
leal (%r9,%r9,2), %ecx
addl %r15d, %ecx
negl %ecx
movd %edx, %xmm0
movd %ecx, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movd %eax, %xmm0
movd %edi, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
movdqa %xmm2, 0xa0(%rsp)
movq %r9, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl %esi, %edi
movl %r14d, %esi
callq 0x209630
testq %rax, %rax
je 0x343cc5
movl %r12d, 0x8(%rsp)
movl %r15d, 0x20(%rsp)
xorl %edi, %edi
cmpl $0x0, 0x238(%rsp)
setne %dil
xorl %ecx, %ecx
cmpl $0x0, 0x240(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x248(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x250(%rsp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rdi,8), %ecx
orl %edx, %ecx
orl %esi, %ecx
orl 0xc(%rax), %ecx
orl $0x4441002, %ecx        # imm = 0x4441002
movq %rax, 0x18(%rsp)
movl %ecx, 0xc(%rax)
movq %r14, (%rsp)
addl $0x6, %r14d
movl $0x10, %edi
movq %r14, %rsi
callq 0x2094d5
movq %rax, %r12
movl $0x10, %edi
movq %r14, %rsi
callq 0x2094d5
movq %rax, %r15
movl $0x10, %edi
movq %r14, %rsi
callq 0x2094d5
testq %r12, %r12
sete %dl
movq %r15, 0x28(%rsp)
testq %r15, %r15
movq %rax, %r15
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x343cc5
movq 0x230(%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0x34324e
xorl %r14d, %r14d
jmp 0x3432c6
movslq 0x30(%rsp), %rsi
movl $0x10, %edi
callq 0x2094d5
testq %rax, %rax
je 0x343cc5
movq %rax, %r14
movq 0x40(%rsp), %r8
testl %r8d, %r8d
movq 0x60(%rsp), %rdi
jle 0x34329c
movq 0x230(%rsp), %rax
movq 0x10(%rax), %rax
movl %r8d, %ecx
xorl %edx, %edx
movzbl (%rdi,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, (%r14,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x343289
movslq %r8d, %rax
leaq (%r14,%rax,4), %rdi
leal 0x1(%r8), %eax
movl 0x30(%rsp), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %r8d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %esi, %esi
callq 0x19e090
movq %r14, 0x78(%rsp)
movd 0x40(%rsp), %xmm0
movq (%rsp), %rdx
movd %edx, %xmm1
movd 0x8(%rsp), %xmm2
movd 0x20(%rsp), %xmm3
pshufd $0x0, %xmm0, %xmm4      # xmm4 = xmm0[0,0,0,0]
pcmpeqd %xmm5, %xmm5
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
pshufd $0x0, %xmm2, %xmm0      # xmm0 = xmm2[0,0,0,0]
movdqa %xmm0, 0xc0(%rsp)
pshufd $0x0, %xmm3, %xmm0      # xmm0 = xmm3[0,0,0,0]
movdqa %xmm0, 0x190(%rsp)
movdqa %xmm4, 0x1c0(%rsp)
paddd %xmm5, %xmm4
movdqa %xmm4, 0x180(%rsp)
movdqa %xmm1, 0x1a0(%rsp)
paddd %xmm1, %xmm5
movdqa %xmm5, 0x1b0(%rsp)
movq 0x230(%rsp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
xorl %edx, %edx
movzbl (%rbx,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, 0xc(%r12,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x343354
movl $0x0, 0x8(%r12)
movq $0x0, (%r12)
movq (%rsp), %r14
movl %r14d, %ebx
leaq (%r12,%rbx,4), %rdi
addq $0xc, %rdi
leal 0x1(%r14), %eax
cmpl %eax, %r13d
cmovgl %r13d, %eax
movl %r14d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %esi, %esi
callq 0x19e090
cmpl $0x2, %r14d
movl $0x1, %eax
cmovgel %r14d, %eax
cmpl $0x0, 0x248(%rsp)
movq 0x28(%rsp), %r8
je 0x3433e3
xorl %ecx, %ecx
movl 0x10(%rsp), %esi
movl $0x0, 0xc(%r8,%rcx,4)
movl %esi, 0xc(%r15,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x3433cb
jmp 0x343406
xorl %ecx, %ecx
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %esi
movq 0x48(%rsp), %rdi
movl %edx, 0xc(%r8,%rcx,4)
movl %esi, 0xc(%r15,%rcx,4)
incq %rcx
subl %edi, %edx
cmpq %rcx, %rax
jne 0x3433f2
xorl %eax, %eax
movq 0x40(%rsp), %rdx
movq 0x78(%rsp), %rbp
movl %esi, (%r8,%rax,4)
movl %esi, (%r15,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x343412
leaq 0x3(%rbx), %rax
movq (%rsp), %rcx
movl %esi, (%r8,%rax,4)
movl %esi, (%r15,%rax,4)
incq %rax
incl %ecx
cmpl %ecx, %r13d
jg 0x34342b
movq %r15, 0x20(%rsp)
movl $0x0, 0x8(%r8)
movdqa 0xe0(%rsp), %xmm11
movdqa 0xb0(%rsp), %xmm3
movdqa 0xd0(%rsp), %xmm4
testl %edx, %edx
jle 0x343adb
movq 0x230(%rsp), %rsi
movq 0x8(%rsi), %rax
movq %rax, 0x110(%rsp)
leal -0x1(%rdx), %ecx
movdqa 0x50(%rsp), %xmm0
movdqa %xmm0, %xmm1
psrldq $0x4, %xmm1             # xmm1 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm1, 0x170(%rsp)
cmpl $0x2, %r13d
movl $0x1, %eax
cmovgel %r13d, %eax
movq %rax, 0x138(%rsp)
movq (%rsp), %rax
leal -0x1(%rax), %eax
movq %rax, 0x130(%rsp)
movl %edx, %edi
movq %rsi, %rdx
leaq 0x1(%rbx), %rax
movq %rax, 0x128(%rsp)
leaq 0x2(%rbx), %rax
movq %rax, 0x120(%rsp)
movaps 0x2b24bb(%rip), %xmm1   # 0x5f59a0
movaps %xmm1, 0x60(%rsp)
pcmpeqd %xmm10, %xmm10
xorl %r13d, %r13d
movdqa 0xc0(%rsp), %xmm1
movdqa %xmm1, 0x80(%rsp)
movdqa %xmm0, 0x90(%rsp)
movl 0x30(%rdx), %r9d
movl %r13d, %r14d
testl %r9d, %r9d
jne 0x34351e
movl (%rbp,%r13,4), %r14d
movq %r13, %r11
orq $0x1, %r11
testl %r9d, %r9d
je 0x343535
cmpq %rdi, %r11
movl %ecx, %esi
cmovbl %r11d, %esi
jmp 0x34353a
movl (%rbp,%r11,4), %esi
movl %esi, 0x30(%rsp)
movq %r13, %r10
orq $0x2, %r10
testl %r9d, %r9d
je 0x343555
cmpq %rdi, %r10
movl %ecx, %eax
cmovbl %r10d, %eax
jmp 0x34355a
movl (%rbp,%r10,4), %eax
movl %eax, 0x8(%rsp)
movq %r13, %rax
orq $0x3, %rax
testl %r9d, %r9d
je 0x343576
cmpq %rdi, %rax
movl %ecx, %r9d
cmovbl %eax, %r9d
jmp 0x34357b
movl (%rbp,%rax,4), %r9d
movq 0x48(%rsp), %r15
movl 0x18(%rdx), %ebp
movl %r14d, %edx
imull %ebp, %edx
movl 0x30(%rsp), %esi
imull %ebp, %esi
movl 0x8(%rsp), %r8d
imull %ebp, %r8d
imull %ebp, %r9d
movl %r9d, 0x30(%rsp)
leaq 0x4(%r13), %r9
movq %r9, 0x118(%rsp)
movl %r9d, %ebp
imull %r15d, %ebp
movl 0x14(%rsp), %r9d
movl %r9d, %r14d
subl %ebp, %r14d
movq %r13, 0x8(%rsp)
movl %r13d, %ebp
imull %r15d, %ebp
subl %ebp, %r9d
movq 0x28(%rsp), %r13
movss 0x8(%r13), %xmm5
movl %r14d, 0x8(%r13)
movslq %edx, %r14
movq 0x110(%rsp), %r15
leaq (%r15,%r14,4), %r14
movq %r14, 0x158(%rsp)
movslq %esi, %rdx
leaq (%r15,%rdx,4), %rdx
movq %rdx, 0x150(%rsp)
movslq %r8d, %rsi
leaq (%r15,%rsi,4), %rdx
movq %rdx, 0x148(%rsp)
cmpl $0x0, 0x238(%rsp)
movslq 0x30(%rsp), %r8
leaq (%r15,%r8,4), %rdx
movq %rdx, 0x140(%rsp)
movl $0x0, %edx
cmovnel %edx, %r9d
movd %r9d, %xmm7
movaps 0x170(%rsp), %xmm6
shufps $0xe4, %xmm6, %xmm7     # xmm7 = xmm7[0,1],xmm6[2,3]
movaps %xmm6, %xmm13
shufps $0x24, %xmm7, %xmm13    # xmm13 = xmm13[0,1],xmm7[2,0]
shufps $0xe4, %xmm6, %xmm5     # xmm5 = xmm5[0,1],xmm6[2,3]
shufps $0x24, %xmm5, %xmm6     # xmm6 = xmm6[0,1],xmm5[2,0]
movdqa 0x180(%rsp), %xmm0
pcmpeqd 0x60(%rsp), %xmm0
movdqa %xmm0, 0x1e0(%rsp)
xorl %r9d, %r9d
movdqa 0x2b2505(%rip), %xmm8   # 0x5f5b80
movaps 0x50(%rsp), %xmm15
movaps %xmm15, %xmm9
movq 0x20(%rsp), %rsi
movdqa %xmm11, 0x30(%rsp)
movslq 0xc(%r12,%r9,4), %r14
movslq 0x8(%r12,%r9,4), %rbp
movslq 0x4(%r12,%r9,4), %r15
movslq (%r12,%r9,4), %rdx
movq 0x158(%rsp), %r8
movd (%r8,%r14,4), %xmm5
movq 0x150(%rsp), %r8
movd (%r8,%rbp,4), %xmm7
punpckldq %xmm5, %xmm7    # xmm7 = xmm7[0],xmm5[0],xmm7[1],xmm5[1]
movq 0x148(%rsp), %r8
movd (%r8,%r15,4), %xmm5
movq 0x140(%rsp), %r8
movd (%r8,%rdx,4), %xmm11
punpckldq %xmm5, %xmm11   # xmm11 = xmm11[0],xmm5[0],xmm11[1],xmm5[1]
movss 0xc(%r13,%r9,4), %xmm5
shufps $0xf4, %xmm13, %xmm5    # xmm5 = xmm5[0,1],xmm13[3,3]
punpcklqdq %xmm7, %xmm11   # xmm11 = xmm11[0],xmm7[0]
paddd %xmm6, %xmm11
movaps %xmm13, %xmm6
shufps $0x29, %xmm5, %xmm6     # xmm6 = xmm6[1,2],xmm5[2,0]
movss 0xc(%rsi,%r9,4), %xmm5
shufps $0xf4, %xmm9, %xmm5     # xmm5 = xmm5[0,1],xmm9[3,3]
shufps $0x29, %xmm5, %xmm9     # xmm9 = xmm9[1,2],xmm5[2,0]
movaps %xmm6, %xmm5
movdqa 0x190(%rsp), %xmm1
psubd %xmm1, %xmm5
movdqa 0x1d0(%rsp), %xmm0
psubd %xmm0, %xmm9
movdqa %xmm5, %xmm7
pcmpgtd %xmm9, %xmm7
pand %xmm7, %xmm5
pandn %xmm9, %xmm7
por %xmm5, %xmm7
psubd %xmm1, %xmm13
psubd %xmm0, %xmm15
movdqa %xmm13, %xmm5
pcmpgtd %xmm15, %xmm5
pand %xmm5, %xmm13
pandn %xmm15, %xmm5
por %xmm13, %xmm5
movdqa %xmm11, %xmm9
pcmpgtd %xmm5, %xmm9
pand %xmm9, %xmm11
pandn %xmm5, %xmm9
por %xmm11, %xmm9
movdqa %xmm9, %xmm14
pcmpgtd %xmm7, %xmm14
pand %xmm14, %xmm9
pandn %xmm7, %xmm14
por %xmm9, %xmm14
movdqa %xmm8, %xmm11
pcmpeqd %xmm10, %xmm11
movdqa %xmm11, %xmm9
pandn %xmm14, %xmm9
movdqa 0xa0(%rsp), %xmm13
pand %xmm11, %xmm13
por %xmm9, %xmm13
cmpq $0x4, %r9
jb 0x343824
movdqa 0x80(%rsp), %xmm0
movdqa %xmm0, %xmm9
pcmpgtd %xmm13, %xmm9
movdqa %xmm13, %xmm15
pand %xmm9, %xmm15
pandn %xmm0, %xmm9
por %xmm15, %xmm9
movdqa 0x90(%rsp), %xmm0
movdqa %xmm0, %xmm1
pcmpgtd %xmm13, %xmm1
pand %xmm1, %xmm0
pandn %xmm13, %xmm1
por %xmm1, %xmm0
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm9, 0x80(%rsp)
movq 0x8(%rsp), %rsi
cmpq %rcx, %rsi
setne %dl
movq 0x18(%rsp), %r14
movq 0x10(%r14), %r14
movq (%r14), %rbp
movq 0x8(%r14), %r14
cmpq %rbx, %r9
setae %r15b
orb %dl, %r15b
pshufd $0xff, %xmm13, %xmm9    # xmm9 = xmm13[3,3,3,3]
jne 0x343858
movd %xmm9, (%rbp,%r9,4)
cmpq %r9, 0x130(%rsp)
jne 0x343868
movd %xmm9, (%r14,%rsi,4)
cmpq %rcx, %r11
setne %dl
leaq -0x1(%r9), %r15
cmpq %rbx, %r15
setae %r15b
orb %dl, %r15b
pshufd $0xee, %xmm13, %xmm9    # xmm9 = xmm13[2,3,2,3]
jne 0x34388b
movd %xmm9, -0x4(%rbp,%r9,4)
cmpq %rdi, %r11
setae %dl
cmpq %r9, %rbx
setne %r15b
orb %dl, %r15b
jne 0x3438a3
movd %xmm9, (%r14,%r11,4)
cmpq %rcx, %r10
jne 0x3438cf
leaq -0x2(%r9), %rdx
cmpq $0x2, %r9
setae %r15b
cmpq %rbx, %rdx
setl %dl
andb %r15b, %dl
cmpb $0x1, %dl
jne 0x3438cf
pshufd $0x55, %xmm13, %xmm9    # xmm9 = xmm13[1,1,1,1]
movd %xmm9, -0x8(%rbp,%r9,4)
cmpq %rdi, %r10
setae %dl
cmpq %r9, 0x128(%rsp)
setne %r15b
orb %dl, %r15b
jne 0x3438f2
pshufd $0x55, %xmm13, %xmm9    # xmm9 = xmm13[1,1,1,1]
movd %xmm9, (%r14,%r10,4)
cmpq %rcx, %rax
jne 0x343915
leaq -0x3(%r9), %rdx
cmpq $0x3, %r9
setb %r15b
cmpq %rbx, %rdx
setge %dl
orb %r15b, %dl
jne 0x343915
movd %xmm13, -0xc(%rbp,%r9,4)
movdqa %xmm11, %xmm9
pandn %xmm7, %xmm9
movdqa 0x50(%rsp), %xmm15
pand %xmm11, %xmm15
por %xmm15, %xmm9
pandn %xmm5, %xmm11
cmpq %rdi, %rax
setae %dl
cmpq %r9, 0x120(%rsp)
setne %bpl
orb %dl, %bpl
movq 0x28(%rsp), %r13
movq 0x20(%rsp), %rsi
jne 0x34395c
movd %xmm13, (%r14,%rax,4)
por %xmm11, %xmm15
movdqa 0x1c0(%rsp), %xmm5
movdqa 0x60(%rsp), %xmm10
pcmpgtd %xmm10, %xmm5
movd %xmm13, (%r13,%r9,4)
movd %xmm9, (%rsi,%r9,4)
movdqa 0x1b0(%rsp), %xmm11
pcmpeqd %xmm8, %xmm11
movdqa 0x1a0(%rsp), %xmm1
pcmpgtd %xmm8, %xmm1
movdqa 0x100(%rsp), %xmm0
movdqa %xmm13, %xmm12
pcmpgtd %xmm0, %xmm12
movdqa %xmm8, %xmm7
psrad $0x1f, %xmm7
pandn %xmm1, %xmm7
movdqa 0xf0(%rsp), %xmm1
movdqa 0x1e0(%rsp), %xmm2
pand %xmm2, %xmm7
pand %xmm12, %xmm7
movdqa %xmm13, %xmm12
pcmpgtd %xmm1, %xmm12
pand %xmm11, %xmm5
pand %xmm12, %xmm5
movdqa %xmm7, %xmm12
pandn %xmm0, %xmm12
pand %xmm7, %xmm14
por %xmm12, %xmm14
movdqa %xmm14, 0x100(%rsp)
movdqa %xmm5, %xmm0
pandn %xmm1, %xmm0
movdqa %xmm13, %xmm1
pand %xmm5, %xmm1
por %xmm0, %xmm1
pand %xmm2, %xmm11
movdqa %xmm1, 0xf0(%rsp)
movdqa %xmm13, %xmm0
pand %xmm11, %xmm0
pandn 0x30(%rsp), %xmm11
por %xmm0, %xmm11
pand %xmm5, %xmm10
pandn %xmm3, %xmm5
movdqa %xmm5, %xmm3
por %xmm10, %xmm3
movdqa %xmm8, %xmm0
pand %xmm7, %xmm0
pandn %xmm4, %xmm7
movdqa %xmm7, %xmm4
por %xmm0, %xmm4
pcmpeqd %xmm10, %xmm10
psubd %xmm10, %xmm8
incq %r9
cmpq %r9, 0x138(%rsp)
jne 0x34368a
movdqa 0x60(%rsp), %xmm0
paddd 0x2b20f9(%rip), %xmm0   # 0x5f5b90
movdqa %xmm0, 0x60(%rsp)
movdqa 0xa0(%rsp), %xmm0
psubd 0x160(%rsp), %xmm0
movdqa %xmm0, 0xa0(%rsp)
movq 0x118(%rsp), %rax
movq %rax, %r13
cmpq %rdi, %rax
movq 0x230(%rsp), %rdx
movq 0x78(%rsp), %rbp
jb 0x34350d
jmp 0x343b02
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movdqa 0xc0(%rsp), %xmm0
movdqa %xmm0, 0x80(%rsp)
movq 0x230(%rsp), %rdx
movq %rdx, %r14
movdqa %xmm11, 0xe0(%rsp)
movdqa %xmm3, 0xb0(%rsp)
movdqa %xmm4, 0xd0(%rsp)
xorl %r11d, %r11d
movl 0x10(%rsp), %r10d
movl %r10d, %ecx
movl %r10d, %esi
xorl %edx, %edx
xorl %eax, %eax
movq 0x40(%rsp), %r9
movq 0x20(%rsp), %rdi
movl 0x250(%rsp), %r15d
movl 0x240(%rsp), %ebx
movl 0xf0(%rsp,%r11,4), %r8d
cmpl %ecx, %r8d
jle 0x343b66
movl 0xb0(%rsp,%r11,4), %edx
movl %r8d, %ecx
jmp 0x343b72
jne 0x343b72
cmpl %edx, 0xb0(%rsp,%r11,4)
jl 0x343b59
movl 0x100(%rsp,%r11,4), %r8d
cmpl %esi, %r8d
jle 0x343b8a
movl 0xd0(%rsp,%r11,4), %eax
movl %r8d, %esi
movl 0xe0(%rsp,%r11,4), %r8d
cmpl %r10d, %r8d
cmovgl %r8d, %r10d
incq %r11
cmpl $0x4, %r11d
jne 0x343b4c
testl %r15d, %r15d
sete %r11b
testl %ebx, %ebx
sete %r8b
orb %r11b, %r8b
jne 0x343bda
cmpl %esi, %ecx
movq 0x28(%rsp), %rbx
jg 0x343bd2
movl %ecx, %r10d
xorl %esi, %r10d
movq (%rsp), %r8
decl %r8d
xorl %eax, %r8d
orl %r10d, %r8d
jne 0x343c3f
movq (%rsp), %rax
decl %eax
jmp 0x343c47
testl %ebx, %ebx
movq 0x18(%rsp), %r8
movq 0x28(%rsp), %rbx
je 0x343c22
movq (%rsp), %rax
decl %eax
jmp 0x343c4c
callq 0x1b56f1
jmp 0x343cc5
callq 0x1b56cb
jmp 0x343cc5
callq 0x1b56a5
jmp 0x343cc5
callq 0x1b567f
jmp 0x343cc5
callq 0x1b5659
jmp 0x343cc5
decl %r9d
movq (%rsp), %rdx
decl %edx
testl %r15d, %r15d
cmovnel %esi, %r10d
cmovnel %eax, %edx
movl %r10d, %ecx
movl %edx, %eax
movl %r9d, %edx
jmp 0x343c4c
decl %r9d
movl %esi, %ecx
movl %r9d, %edx
movq 0x18(%rsp), %r8
movdqa 0x50(%rsp), %xmm0
pcmpgtd 0x80(%rsp), %xmm0
movdqa 0x90(%rsp), %xmm1
pcmpgtd 0xc0(%rsp), %xmm1
por %xmm0, %xmm1
movmskps %xmm1, %esi
testl %esi, %esi
je 0x343c83
orb $0x40, 0xc(%r8)
xorl %ecx, %ecx
xorl %eax, %eax
xorl %edx, %edx
movl %ecx, (%r8)
movl %edx, 0x4(%r8)
movl %eax, 0x8(%r8)
callq 0x2094b5
movq %rbx, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%r14)
jne 0x343cb2
movq %rbp, %rdi
callq 0x2094b5
movq 0x18(%rsp), %rax
jmp 0x343cc7
callq 0x1b5633
jmp 0x343cc5
callq 0x1b560d
xorl %eax, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq