// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_diag_sse2_128_32.c
// Function: parasail_nw_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 vOpen;
    __m128i vGap;
    __m128i vOne;
    __m128i vN;
    __m128i vGapN;
    __m128i vNegOne;
    __m128i vI;
    __m128i vJreset;
    __m128i vMax;
    __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 = s1Len-1;
    end_ref = s2Len-1;
    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 = _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);
    vMax = vNegInf;
    vILimit = _mm_set1_epi32(s1Len);
    vILimit1 = _mm_sub_epi32(vILimit, vOne);
    vJLimit = _mm_set1_epi32(s2Len);
    vJLimit1 = _mm_sub_epi32(vJLimit, vOne);
    vIBoundary = _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_NW | 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] = -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))];
        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, -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 table, extract
               last table value at the i,j bound */
            {
                __m128i cond_valid_I = _mm_cmpeq_epi32(vI, vILimit1);
                __m128i cond_valid_J = _mm_cmpeq_epi32(vJ, vJLimit1);
                __m128i cond_all = _mm_and_si128(cond_valid_I, cond_valid_J);
                vMax = _mm_blendv_epi8_rpl(vMax, vWH, cond_all);
            }
            vJ = _mm_add_epi32(vJ, vOne);
        }
        vI = _mm_add_epi32(vI, vN);
        vIBoundary = _mm_sub_epi32(vIBoundary, vGapN);
    }

    /* max in vMax */
    for (i=0; i<N; ++i) {
        int32_t value;
        value = (int32_t) _mm_extract_epi32_rpl(vMax, 3);
        if (value > score) {
            score = value;
        }
        vMax = _mm_slli_si128(vMax, 4);
    }

    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 0x342fb1
movl %ecx, %ebp
testl %ecx, %ecx
jle 0x342fb8
movl %r8d, %r13d
testl %r8d, %r8d
js 0x342fbf
testl %r9d, %r9d
js 0x342fc6
movq 0x170(%rsp), %r8
testq %r8, %r8
je 0x342fcd
movq %rdx, %r12
movl 0x30(%r8), %eax
testl %eax, %eax
jne 0x342705
testq %rdi, %rdi
je 0x342fd4
movl %esi, %r15d
testl %esi, %esi
jle 0x342fdb
testl %eax, %eax
je 0x342709
movl 0x34(%r8), %r15d
movq %rdi, 0x60(%rsp)
movq %r9, 0x28(%rsp)
movl %r13d, %esi
negl %esi
movl 0x20(%r8), %eax
movl $0x80000000, %edx       # imm = 0x80000000
movl %r13d, %ecx
orl %edx, %ecx
subl %eax, %edx
movl %esi, 0xc(%rsp)
cmpl %esi, %eax
cmovgl %ecx, %edx
movl %edx, 0x4(%rsp)
movl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
subl 0x1c(%r8), %r14d
movl %r15d, %edi
movl %ebp, %esi
callq 0x209630
testq %rax, %rax
je 0x342fe0
movq %rax, %rbx
movl %r13d, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movq %r15, 0x10(%rsp)
orl $0x4441001, 0xc(%rax)   # imm = 0x4441001
leal 0x6(%rbp), %r13d
movl $0x10, %edi
movq %r13, %rsi
callq 0x2094d5
movq %rax, %r15
movl $0x10, %edi
movq %r13, %rsi
callq 0x2094d5
movq %rax, %r12
movl $0x10, %edi
movq %r13, %rsi
callq 0x2094d5
testq %r15, %r15
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x342fe0
movq %r12, 0x20(%rsp)
movq %rbx, 0x30(%rsp)
movq 0x170(%rsp), %r9
cmpl $0x0, 0x30(%r9)
movq %rax, 0x18(%rsp)
movq %r15, 0x38(%rsp)
je 0x3427e8
xorl %r12d, %r12d
movq 0x10(%rsp), %r13
jmp 0x34286b
movq 0x10(%rsp), %r13
leal 0x3(%r13), %ebx
movslq %ebx, %rsi
movl $0x10, %edi
callq 0x2094d5
testq %rax, %rax
je 0x342fe0
movq %rax, %r12
testl %r13d, %r13d
movq 0x60(%rsp), %rdi
jle 0x342838
movq 0x170(%rsp), %rax
movq 0x10(%rax), %rax
movl %r13d, %ecx
xorl %edx, %edx
movzbl (%rdi,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, (%r12,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x342825
movslq %r13d, %rax
leaq (%r12,%rax,4), %rdi
leal 0x1(%r13), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %r13d, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %esi, %esi
callq 0x19e090
movq 0x38(%rsp), %r15
movq 0x170(%rsp), %r9
movq %r12, 0x78(%rsp)
leal 0x3(%rbp), %ebx
leal -0x1(%r13), %edx
leal -0x1(%rbp), %ecx
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x50(%rsp)
movd %r14d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x80(%rsp)
movl 0x40(%rsp), %r8d
movd %r8d, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x120(%rsp)
movq 0x28(%rsp), %rsi
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x110(%rsp)
pslld $0x2, %xmm0
movdqa %xmm0, 0xf0(%rsp)
movl %edx, (%rsp)
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xe0(%rsp)
movl %ecx, 0x8(%rsp)
movd %ecx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x100(%rsp)
movl 0xc(%rsp), %edi
movl %edi, %eax
subl %esi, %eax
movl %edi, %edx
subl %esi, %edx
subl %esi, %edx
leal (%rsi,%rsi,2), %ecx
addl %r8d, %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, 0x60(%rsp)
movq 0x10(%r9), %rax
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
xorl %ecx, %ecx
movq 0x48(%rsp), %rsi
movzbl (%rsi,%rcx), %edx
movl (%rax,%rdx,4), %edx
movl %edx, 0xc(%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x34295e
movl $0x0, 0x8(%r15)
movq $0x0, (%r15)
movl %ebp, %r14d
leaq (%r15,%r14,4), %rdi
addq $0xc, %rdi
leal 0x1(%rbp), %eax
cmpl %eax, %ebx
cmovgl %ebx, %eax
movl %ebp, %ecx
notl %ecx
addl %eax, %ecx
leaq 0x4(,%rcx,4), %rdx
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x19e090
movl 0xc(%rsp), %eax
movq 0x28(%rsp), %rcx
movl 0x4(%rsp), %edx
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdi
movl %eax, 0xc(%rsi,%r13,4)
movl %edx, 0xc(%rdi,%r13,4)
incq %r13
subl %ecx, %eax
cmpq %r13, %r12
jne 0x3429c3
xorl %eax, %eax
movl %edx, (%rsi,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x3429d9
leaq 0x3(%r14), %rax
movq 0x170(%rsp), %r12
movq 0x78(%rsp), %r13
movl %edx, (%rsi,%rax,4)
movl %edx, (%rdi,%rax,4)
incq %rax
incl %ebp
cmpl %ebp, %ebx
jg 0x3429f9
movl $0x0, 0x8(%rsi)
movdqa 0x50(%rsp), %xmm1
movdqa %xmm1, %xmm0
movdqa 0x80(%rsp), %xmm3
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
jle 0x342f1a
movq 0x8(%r12), %rax
movq %rax, 0x98(%rsp)
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, 0xd0(%rsp)
movl 0x8(%rsp), %eax
movq %rax, 0xc0(%rsp)
cmpl $0x2, %ebx
movl $0x1, %eax
cmovgel %ebx, %eax
movq %rax, 0xb8(%rsp)
movl %ecx, %esi
movl (%rsp), %edi
leaq 0x1(%r14), %rax
movq %rax, 0xb0(%rsp)
leaq 0x2(%r14), %rax
movq %rax, 0xa8(%rsp)
movdqa 0x2b2f08(%rip), %xmm4   # 0x5f59a0
xorl %r15d, %r15d
pcmpeqd %xmm6, %xmm6
movdqa %xmm0, %xmm1
movdqa 0x80(%rsp), %xmm3
movdqa 0x120(%rsp), %xmm5
movl 0x30(%r12), %r8d
movl %r15d, %ecx
testl %r8d, %r8d
jne 0x342ac7
movl (%r13,%r15,4), %ecx
movq %r15, %r11
orq $0x1, %r11
testl %r8d, %r8d
je 0x342adf
cmpq %rsi, %r11
movl (%rsp), %edx
cmovbl %r11d, %edx
jmp 0x342ae4
movl (%r13,%r11,4), %edx
movq %r15, %rbp
orq $0x2, %rbp
testl %r8d, %r8d
je 0x342afd
cmpq %rsi, %rbp
movl (%rsp), %r9d
cmovbl %ebp, %r9d
jmp 0x342b02
movl (%r13,%rbp,4), %r9d
movq %r15, %r10
orq $0x3, %r10
testl %r8d, %r8d
je 0x342b1b
cmpq %rsi, %r10
movl (%rsp), %r8d
cmovbl %r10d, %r8d
jmp 0x342b20
movl (%r13,%r10,4), %r8d
movl 0x18(%r12), %r12d
imull %r12d, %ecx
movslq %ecx, %rcx
movq 0x98(%rsp), %rbx
leaq (%rbx,%rcx,4), %rcx
movq %rcx, 0x10(%rsp)
imull %r12d, %edx
movslq %edx, %rcx
leaq (%rbx,%rcx,4), %rcx
movq %rcx, 0x48(%rsp)
imull %r12d, %r9d
movslq %r9d, %rdx
leaq (%rbx,%rdx,4), %rcx
movq %rcx, 0x40(%rsp)
imull %r12d, %r8d
movslq %r8d, %r8
leaq (%rbx,%r8,4), %rcx
movq %rcx, 0xc8(%rsp)
leaq 0x4(%r15), %rcx
movq %rcx, 0xa0(%rsp)
movl %ecx, %r9d
movq 0x28(%rsp), %rcx
imull %ecx, %r9d
movl 0xc(%rsp), %r8d
movl %r8d, %r12d
subl %r9d, %r12d
movq 0x20(%rsp), %rdx
movss 0x8(%rdx), %xmm7
movl %r12d, 0x8(%rdx)
movl %r15d, %r9d
imull %ecx, %r9d
movl %r8d, %r12d
subl %r9d, %r12d
movd %r12d, %xmm8
movaps 0xd0(%rsp), %xmm12
shufps $0xe4, %xmm12, %xmm8    # xmm8 = xmm8[0,1],xmm12[2,3]
movaps %xmm12, %xmm10
shufps $0x24, %xmm8, %xmm10    # xmm10 = xmm10[0,1],xmm8[2,0]
shufps $0xe4, %xmm12, %xmm7    # xmm7 = xmm7[0,1],xmm12[2,3]
shufps $0x24, %xmm7, %xmm12    # xmm12 = xmm12[0,1],xmm7[2,0]
movdqa %xmm4, %xmm8
pcmpeqd 0xe0(%rsp), %xmm8
xorl %r9d, %r9d
movdqa 0x2b2f91(%rip), %xmm9   # 0x5f5b80
movaps 0x50(%rsp), %xmm11
movaps %xmm11, %xmm15
movq 0x18(%rsp), %r8
movq 0x38(%rsp), %rax
movslq 0xc(%rax,%r9,4), %r12
movslq 0x8(%rax,%r9,4), %r13
movslq 0x4(%rax,%r9,4), %rbx
movslq (%rax,%r9,4), %rcx
movq 0x10(%rsp), %rax
movd (%rax,%r12,4), %xmm7
movq 0x48(%rsp), %rax
movd (%rax,%r13,4), %xmm13
punpckldq %xmm7, %xmm13   # xmm13 = xmm13[0],xmm7[0],xmm13[1],xmm7[1]
movq 0x40(%rsp), %rax
movd (%rax,%rbx,4), %xmm14
movq 0xc8(%rsp), %rax
movd (%rax,%rcx,4), %xmm7
punpckldq %xmm14, %xmm7   # xmm7 = xmm7[0],xmm14[0],xmm7[1],xmm14[1]
movss 0xc(%rdx,%r9,4), %xmm14
shufps $0xf4, %xmm10, %xmm14   # xmm14 = xmm14[0,1],xmm10[3,3]
punpcklqdq %xmm13, %xmm7   # xmm7 = xmm7[0],xmm13[0]
paddd %xmm12, %xmm7
movaps %xmm10, %xmm12
shufps $0x29, %xmm14, %xmm12   # xmm12 = xmm12[1,2],xmm14[2,0]
movss 0xc(%r8,%r9,4), %xmm13
shufps $0xf4, %xmm15, %xmm13   # xmm13 = xmm13[0,1],xmm15[3,3]
shufps $0x29, %xmm13, %xmm15   # xmm15 = xmm15[1,2],xmm13[2,0]
movaps %xmm12, %xmm14
psubd %xmm5, %xmm14
movdqa 0x110(%rsp), %xmm2
psubd %xmm2, %xmm15
movdqa %xmm14, %xmm13
pcmpgtd %xmm15, %xmm13
pand %xmm13, %xmm14
pandn %xmm15, %xmm13
por %xmm14, %xmm13
psubd %xmm5, %xmm10
psubd %xmm2, %xmm11
movdqa %xmm10, %xmm14
pcmpgtd %xmm11, %xmm14
pand %xmm14, %xmm10
pandn %xmm11, %xmm14
por %xmm10, %xmm14
movdqa %xmm7, %xmm10
pcmpgtd %xmm14, %xmm10
pand %xmm10, %xmm7
pandn %xmm14, %xmm10
por %xmm7, %xmm10
movdqa %xmm10, %xmm7
pcmpgtd %xmm13, %xmm7
pand %xmm7, %xmm10
pandn %xmm13, %xmm7
por %xmm10, %xmm7
movdqa %xmm9, %xmm11
pcmpeqd %xmm6, %xmm11
movdqa %xmm11, %xmm15
pandn %xmm7, %xmm15
movdqa 0x60(%rsp), %xmm10
pand %xmm11, %xmm10
por %xmm15, %xmm10
cmpq $0x4, %r9
jb 0x342d64
movdqa %xmm3, %xmm7
pcmpgtd %xmm10, %xmm7
movdqa %xmm10, %xmm15
pand %xmm7, %xmm15
pandn %xmm3, %xmm7
por %xmm15, %xmm7
movdqa %xmm0, %xmm3
pcmpgtd %xmm10, %xmm3
pand %xmm3, %xmm0
pandn %xmm10, %xmm3
por %xmm3, %xmm0
movdqa %xmm7, %xmm3
movq 0x30(%rsp), %rbx
cmpq %rdi, %r15
setne %cl
movq 0x10(%rbx), %rbx
movq (%rbx), %r12
movq 0x8(%rbx), %r13
cmpq %r14, %r9
setae %bl
orb %cl, %bl
pshufd $0xff, %xmm10, %xmm7    # xmm7 = xmm10[3,3,3,3]
jne 0x342d90
movd %xmm7, (%r12,%r9,4)
cmpq %r9, 0xc0(%rsp)
jne 0x342da1
movd %xmm7, (%r13,%r15,4)
cmpq %rdi, %r11
setne %cl
leaq -0x1(%r9), %rbx
cmpq %r14, %rbx
setae %bl
orb %cl, %bl
pshufd $0xee, %xmm10, %xmm7    # xmm7 = xmm10[2,3,2,3]
jne 0x342dc2
movd %xmm7, -0x4(%r12,%r9,4)
cmpq %rsi, %r11
setae %cl
cmpq %r9, %r14
setne %bl
orb %cl, %bl
jne 0x342dd9
movd %xmm7, (%r13,%r11,4)
cmpq %rdi, %rbp
jne 0x342e03
leaq -0x2(%r9), %rcx
cmpq $0x2, %r9
setae %bl
cmpq %r14, %rcx
setl %cl
andb %bl, %cl
cmpb $0x1, %cl
jne 0x342e03
pshufd $0x55, %xmm10, %xmm7    # xmm7 = xmm10[1,1,1,1]
movd %xmm7, -0x8(%r12,%r9,4)
cmpq %rsi, %rbp
setae %cl
cmpq %r9, 0xb0(%rsp)
setne %bl
orb %cl, %bl
jne 0x342e25
pshufd $0x55, %xmm10, %xmm7    # xmm7 = xmm10[1,1,1,1]
movd %xmm7, (%r13,%rbp,4)
cmpq %rdi, %r10
jne 0x342e46
leaq -0x3(%r9), %rcx
cmpq $0x3, %r9
setb %bl
cmpq %r14, %rcx
setge %cl
orb %bl, %cl
jne 0x342e46
movd %xmm10, -0xc(%r12,%r9,4)
cmpq %rsi, %r10
setae %cl
cmpq %r9, 0xa8(%rsp)
setne %bl
orb %cl, %bl
jne 0x342e62
movd %xmm10, (%r13,%r10,4)
movdqa %xmm11, %xmm15
pandn %xmm13, %xmm15
movdqa 0x50(%rsp), %xmm7
pand %xmm11, %xmm7
por %xmm7, %xmm15
pandn %xmm14, %xmm11
por %xmm7, %xmm11
movq 0x20(%rsp), %rdx
movd %xmm10, (%rdx,%r9,4)
movq 0x18(%rsp), %r8
movd %xmm15, (%r8,%r9,4)
movdqa %xmm9, %xmm7
pcmpeqd 0x100(%rsp), %xmm7
pand %xmm8, %xmm7
movdqa %xmm10, %xmm13
pand %xmm7, %xmm13
pandn %xmm1, %xmm7
movdqa %xmm7, %xmm1
por %xmm13, %xmm1
psubd %xmm6, %xmm9
incq %r9
cmpq %r9, 0xb8(%rsp)
jne 0x342bfe
paddd 0x2b2cac(%rip), %xmm4   # 0x5f5b90
movdqa 0x60(%rsp), %xmm2
psubd 0xf0(%rsp), %xmm2
movdqa %xmm2, 0x60(%rsp)
movq 0xa0(%rsp), %rcx
movq %rcx, %r15
cmpq %rsi, %rcx
movq 0x170(%rsp), %r12
movq 0x78(%rsp), %r13
jb 0x342ab5
movl $0x4, %eax
movl 0x4(%rsp), %edx
pshufd $0xff, %xmm1, %xmm2     # xmm2 = xmm1[3,3,3,3]
movd %xmm2, %ecx
cmpl %edx, %ecx
cmovgl %ecx, %edx
pslldq $0x4, %xmm1             # xmm1 = zero,zero,zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
decl %eax
jne 0x342f23
movdqa 0x50(%rsp), %xmm1
pcmpgtd %xmm3, %xmm1
pcmpgtd 0x80(%rsp), %xmm0
por %xmm1, %xmm0
movmskps %xmm0, %eax
testl %eax, %eax
movq 0x30(%rsp), %rbx
movq 0x18(%rsp), %rdi
je 0x342f77
orb $0x40, 0xc(%rbx)
xorl %edx, %edx
movl $0x0, 0x8(%rsp)
movl $0x0, (%rsp)
movl %edx, (%rbx)
movl (%rsp), %eax
movl %eax, 0x4(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rbx)
callq 0x2094b5
movq 0x20(%rsp), %rdi
callq 0x2094b5
movq 0x38(%rsp), %rdi
callq 0x2094b5
cmpl $0x0, 0x30(%r12)
jne 0x342fe2
movq %r13, %rdi
callq 0x2094b5
jmp 0x342fe2
callq 0x1b55e7
jmp 0x342fe0
callq 0x1b55c1
jmp 0x342fe0
callq 0x1b559b
jmp 0x342fe0
callq 0x1b5575
jmp 0x342fe0
callq 0x1b554f
jmp 0x342fe0
callq 0x1b5529
jmp 0x342fe0
callq 0x1b5503
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop