// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/src/sw_trace_diag_sse2_128_32.c
// Function: parasail_sw_trace_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_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 s1Len = 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;
    __m128i vTDiag;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTZero;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;

    /* 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);
    vTDiag = _mm_set1_epi32(PARASAIL_DIAG);
    vTIns = _mm_set1_epi32(PARASAIL_INS);
    vTDel = _mm_set1_epi32(PARASAIL_DEL);
    vTZero = _mm_set1_epi32(PARASAIL_ZERO);
    vTDiagE = _mm_set1_epi32(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi32(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi32(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi32(PARASAIL_DEL_F);

    /* initialize result */
    result = parasail_result_new_trace(s1Len, s2Len, 16, sizeof(int8_t));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_DIAG
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_32 | PARASAIL_FLAG_LANES_4;

    /* 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 vE_opn = vNegInf;
        __m128i vE_ext = vNegInf;
        __m128i vF = vNegInf;
        __m128i vF_opn = vNegInf;
        __m128i vF_ext = 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_opn = _mm_sub_epi32(vNH, vOpen);
            vF_ext = _mm_sub_epi32(vF, vGap);
            vF = _mm_max_epi32_rpl(vF_opn, vF_ext);
            vE_opn = _mm_sub_epi32(vWH, vOpen);
            vE_ext = _mm_sub_epi32(vE, vGap);
            vE = _mm_max_epi32_rpl(vE_opn, vE_ext);
            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);
            vNWH = _mm_max_epi32_rpl(vNWH, vZero);
            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_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);
            }
            /* trace table */
            {
                __m128i cond_zero = _mm_cmpeq_epi32(vWH, vZero);
                __m128i case1 = _mm_cmpeq_epi32(vWH, vNWH);
                __m128i case2 = _mm_cmpeq_epi32(vWH, vF);
                __m128i vT = _mm_blendv_epi8_rpl(
                        _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                        _mm_blendv_epi8_rpl(vTDiag, vTZero, cond_zero),
                        case1);
                __m128i condE = _mm_cmpgt_epi32(vE_opn, vE_ext);
                __m128i condF = _mm_cmpgt_epi32(vF_opn, vF_ext);
                __m128i vET = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, condE);
                __m128i vFT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, condF);
                vT = _mm_or_si128(vT, vET);
                vT = _mm_or_si128(vT, vFT);
                arr_store_si128(result->trace->trace_table, vT, i, s1Len, j, s2Len);
            }
            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 $0x178, %rsp            # imm = 0x178
testq %rdx, %rdx
je 0x34e41e
movl %ecx, %r14d
testl %ecx, %ecx
jle 0x34e442
testl %r8d, %r8d
js 0x34e466
movl %r9d, %r12d
testl %r9d, %r9d
js 0x34e4a9
movq 0x1b0(%rsp), %r13
testq %r13, %r13
je 0x34e4ca
cmpl $0x0, 0x30(%r13)
je 0x34dafc
movl 0x34(%r13), %ebp
jmp 0x34db0f
testq %rdi, %rdi
je 0x34e4eb
movl %esi, %ebp
testl %esi, %esi
jle 0x34e50c
movq %rdi, 0x38(%rsp)
movq %rdx, 0x90(%rsp)
movl %r8d, %eax
negl %eax
movl 0x20(%r13), %ecx
movl $0x80000000, %esi       # imm = 0x80000000
movl %r8d, 0x40(%rsp)
movl %r8d, %edx
orl %esi, %edx
subl %ecx, %esi
cmpl %eax, %ecx
cmovgl %edx, %esi
incl %esi
movl $0x7ffffffe, %ebx       # imm = 0x7FFFFFFE
subl 0x1c(%r13), %ebx
movl %esi, 0xc(%rsp)
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0xa0(%rsp)
pushq $0x10
popq %rdx
pushq $0x1
popq %rcx
movl %ebp, %edi
movl %r14d, %esi
callq 0x1abb59
testq %rax, %rax
je 0x34dbe6
movq %rax, %r15
movl %ebx, 0x20(%rsp)
movl %r12d, 0xc0(%rsp)
orl $0x4481004, 0xc(%rax)   # imm = 0x4481004
movq %r14, 0x30(%rsp)
leal 0x6(%r14), %r12d
pushq $0x10
popq %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ab783
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1ab783
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %r12
callq 0x1ab783
testq %r14, %r14
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
movq %rax, 0x28(%rsp)
testq %rax, %rax
sete %al
orb %cl, %al
je 0x34dbed
xorl %ebx, %ebx
jmp 0x34e534
movq %r15, 0x88(%rsp)
cmpl $0x0, 0x30(%r13)
movq %rbp, %r15
movslq %r15d, %rbp
je 0x34e3aa
movq %r15, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl 0xc(%rsp), %r8d
movq 0x28(%rsp), %rdi
movq 0x90(%rsp), %r10
movl 0x20(%rsp), %ebx
movq 0x30(%rsp), %rax
leal 0x3(%rax), %r9d
movd %ebx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x110(%rsp)
movdqa 0x60(%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, 0x130(%rsp)
movd 0x40(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x160(%rsp)
movd 0xc0(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x150(%rsp)
movd 0x10(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x120(%rsp)
movd %eax, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x140(%rsp)
movl %eax, %ecx
movq 0x10(%r13), %rax
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x34dcc9
movzbl (%r10,%rdx), %esi
movl (%rax,%rsi,4), %esi
movl %esi, 0xc(%r14,%rdx,4)
incq %rdx
jmp 0x34dcb2
xorl %eax, %eax
cmpq $0x3, %rax
je 0x34dcdb
andl $0x0, (%r14,%rax,4)
incq %rax
jmp 0x34dccb
movq %rcx, %rax
cmpl %eax, %r9d
jle 0x34dcee
andl $0x0, 0xc(%r14,%rax,4)
incq %rax
jmp 0x34dcde
xorl %eax, %eax
cmpq %rax, %rcx
je 0x34dd05
andl $0x0, 0xc(%r12,%rax,4)
movl %r8d, 0xc(%rdi,%rax,4)
incq %rax
jmp 0x34dcf0
xorl %eax, %eax
cmpq $0x3, %rax
je 0x34dd1a
movl %r8d, (%r12,%rax,4)
movl %r8d, (%rdi,%rax,4)
incq %rax
jmp 0x34dd07
movq %rcx, %rax
cmpl %eax, %r9d
jle 0x34dd31
movl %r8d, 0xc(%r12,%rax,4)
movl %r8d, 0xc(%rdi,%rax,4)
incq %rax
jmp 0x34dd1d
movq 0x10(%rsp), %rax
decl %eax
movq %rax, 0x10(%rsp)
xorl %edx, %edx
testl %r9d, %r9d
movl $0x0, %eax
movq %rax, 0x80(%rsp)
cmovlel %edx, %r9d
movq %r9, 0x38(%rsp)
movdqa 0xe0(%rsp), %xmm1
movdqa 0xa0(%rsp), %xmm9
leaq (%rcx,%rcx,2), %rax
addq $-0x3, %rax
movq %rax, 0x78(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0xf0(%rsp)
movaps 0x279c31(%rip), %xmm0   # 0x5c79c0
movaps %xmm0, 0x40(%rsp)
pcmpeqd %xmm13, %xmm13
movdqa 0x60(%rsp), %xmm0
movdqa %xmm0, %xmm12
movdqa %xmm0, %xmm14
xorl %ebx, %ebx
movdqa %xmm0, %xmm8
movdqa %xmm0, 0x50(%rsp)
movdqa 0x110(%rsp), %xmm0
movdqa %xmm0, 0xb0(%rsp)
cmpq %rbp, %rbx
jge 0x34e2b7
movq %rbx, %rsi
orq $0x3, %rsi
cmpl $0x0, 0x30(%r13)
movq %rbx, 0xf8(%rsp)
movq %rsi, 0x20(%rsp)
je 0x34de1d
movq %rbx, %r10
orq $0x1, %r10
cmpq %rbp, %r10
movq 0x10(%rsp), %rax
movl %eax, %r9d
cmovll %r10d, %r9d
movq %rbx, %r11
orq $0x2, %r11
cmpq %rbp, %r11
movl %r11d, %edx
cmovgel %eax, %edx
cmpq %rbp, %rsi
cmovgel %eax, %esi
movl %ebx, %r8d
jmp 0x34de40
movq 0x18(%rsp), %rax
movl (%rax,%rbx,4), %r8d
movl 0x4(%rax,%rbx,4), %r9d
movq %rbx, %r10
orq $0x1, %r10
movq %rbx, %r11
orq $0x2, %r11
movl 0x8(%rax,%rbx,4), %edx
movl (%rax,%rsi,4), %esi
movq 0x8(%r13), %rbx
movl 0x18(%r13), %eax
imull %eax, %r9d
movslq %r9d, %r9
leaq (%rbx,%r9,4), %r9
movq %r9, 0x30(%rsp)
imull %eax, %r8d
movslq %r8d, %r8
leaq (%rbx,%r8,4), %r13
imull %eax, %edx
movslq %edx, %rdx
leaq (%rbx,%rdx,4), %r8
imull %eax, %esi
movslq %esi, %rax
leaq (%rbx,%rax,4), %rbx
movq %r10, %rax
imulq %rcx, %rax
movq %r11, %rdx
imulq %rcx, %rdx
addq $-0x2, %rdx
movq %rdx, 0x100(%rsp)
decq %rax
movq %rax, 0x108(%rsp)
movdqa 0x120(%rsp), %xmm0
pcmpgtd 0x40(%rsp), %xmm0
movdqa %xmm0, 0xc0(%rsp)
xorl %esi, %esi
movaps 0x130(%rsp), %xmm3
movaps %xmm3, %xmm11
movaps 0x60(%rsp), %xmm7
movaps %xmm7, %xmm5
movdqa 0x279cde(%rip), %xmm0   # 0x5c7bb0
cmpq %rsi, 0x38(%rsp)
je 0x34e270
movdqa %xmm8, 0x90(%rsp)
movq %r12, %r9
movss 0xc(%r12,%rsi,4), %xmm1
shufps $0xf4, %xmm3, %xmm1     # xmm1 = xmm1[0,1],xmm3[3,3]
movaps %xmm3, %xmm4
shufps $0x29, %xmm1, %xmm4     # xmm4 = xmm4[1,2],xmm1[2,0]
movss 0xc(%rdi,%rsi,4), %xmm1
shufps $0xf4, %xmm7, %xmm1     # xmm1 = xmm1[0,1],xmm7[3,3]
shufps $0x29, %xmm1, %xmm7     # xmm7 = xmm7[1,2],xmm1[2,0]
movaps %xmm4, %xmm10
movdqa 0x160(%rsp), %xmm2
psubd %xmm2, %xmm10
movdqa 0x150(%rsp), %xmm6
psubd %xmm6, %xmm7
movdqa %xmm10, %xmm9
pcmpgtd %xmm7, %xmm9
movdqa %xmm9, %xmm1
pandn %xmm7, %xmm1
pand %xmm9, %xmm10
por %xmm1, %xmm10
psubd %xmm2, %xmm3
psubd %xmm6, %xmm5
movdqa %xmm3, %xmm15
pcmpgtd %xmm5, %xmm15
movdqa %xmm15, %xmm1
pandn %xmm5, %xmm1
pand %xmm15, %xmm3
movdqa %xmm3, %xmm8
por %xmm1, %xmm8
movslq 0xc(%r14,%rsi,4), %rax
movslq 0x8(%r14,%rsi,4), %rdx
movslq 0x4(%r14,%rsi,4), %r15
movslq (%r14,%rsi,4), %r12
movd (%r13,%rax,4), %xmm1
movq 0x30(%rsp), %rax
movd (%rax,%rdx,4), %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movd (%r8,%r15,4), %xmm1
movd (%rbx,%r12,4), %xmm5
punpckldq %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
punpcklqdq %xmm2, %xmm5    # xmm5 = xmm5[0],xmm2[0]
paddd %xmm11, %xmm5
movdqa %xmm5, %xmm2
pcmpgtd 0x279c43(%rip), %xmm2   # 0x5c7c00
pand %xmm5, %xmm2
movdqa %xmm2, %xmm5
pcmpgtd %xmm8, %xmm5
movdqa %xmm2, %xmm1
pand %xmm5, %xmm1
pandn %xmm8, %xmm5
por %xmm1, %xmm5
movdqa %xmm5, %xmm1
pcmpgtd %xmm10, %xmm1
pand %xmm1, %xmm5
pandn %xmm10, %xmm1
por %xmm5, %xmm1
movdqa %xmm0, %xmm11
pcmpeqd %xmm13, %xmm11
movdqa %xmm11, %xmm3
pandn %xmm1, %xmm3
movdqa %xmm11, %xmm7
pandn %xmm10, %xmm7
movdqa 0x60(%rsp), %xmm5
pand %xmm11, %xmm5
por %xmm5, %xmm7
cmpq $0x4, %rsi
jb 0x34e079
movdqa 0xb0(%rsp), %xmm6
movdqa %xmm6, %xmm10
pcmpgtd %xmm3, %xmm10
movdqa %xmm3, %xmm13
pand %xmm10, %xmm13
pandn %xmm6, %xmm10
por %xmm13, %xmm10
movdqa 0x50(%rsp), %xmm6
movdqa %xmm6, %xmm13
pcmpgtd %xmm3, %xmm13
pand %xmm13, %xmm6
pandn %xmm3, %xmm13
por %xmm13, %xmm6
movdqa %xmm6, 0x50(%rsp)
movdqa %xmm10, 0xb0(%rsp)
pcmpeqd %xmm3, %xmm2
movdqa %xmm3, %xmm10
pcmpeqd 0x279b75(%rip), %xmm10  # 0x5c7c00
pandn %xmm2, %xmm10
movdqa %xmm3, %xmm13
pcmpeqd %xmm7, %xmm13
movdqa 0x279f9e(%rip), %xmm6   # 0x5c8040
psubd %xmm13, %xmm6
pandn %xmm6, %xmm2
pand 0x279b0c(%rip), %xmm10  # 0x5c7bc0
por %xmm2, %xmm10
pand 0x27b56e(%rip), %xmm15  # 0x5c9630
pand 0x27b585(%rip), %xmm9   # 0x5c9650
por %xmm15, %xmm9
por %xmm10, %xmm9
pxor 0x27b772(%rip), %xmm9   # 0x5c9850
movq 0x88(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
cmpq %rcx, %rsi
movq %r9, %r12
jae 0x34e10b
pextrw $0x6, %xmm9, %edx
movq 0x80(%rsp), %rdi
leaq (%rax,%rdi), %r15
movb %dl, (%rsi,%r15)
cmpq %rbp, %r10
setge %dl
leaq -0x1(%rsi), %r15
cmpq %rcx, %r15
setae %r15b
orb %dl, %r15b
pcmpeqd %xmm13, %xmm13
jne 0x34e13c
pextrw $0x4, %xmm9, %edx
movq 0x108(%rsp), %rdi
leaq (%rax,%rdi), %r15
movb %dl, (%rsi,%r15)
cmpq %rbp, %r11
jge 0x34e171
leaq -0x2(%rsi), %rdx
cmpq $0x2, %rsi
setae %r15b
cmpq %rcx, %rdx
setl %dl
andb %r15b, %dl
cmpb $0x1, %dl
jne 0x34e171
pextrw $0x2, %xmm9, %edx
movq 0x100(%rsp), %rdi
leaq (%rax,%rdi), %r15
movb %dl, (%rsi,%r15)
cmpq %rbp, 0x20(%rsp)
setge %dl
cmpq $0x3, %rsi
setb %r15b
orb %dl, %r15b
jne 0x34e193
movd %xmm9, %edx
addq 0x78(%rsp), %rax
movb %dl, (%rsi,%rax)
pandn %xmm8, %xmm11
por %xmm11, %xmm5
movdqa 0x140(%rsp), %xmm6
pcmpgtd %xmm0, %xmm6
pand 0xc0(%rsp), %xmm6
movdqa %xmm0, %xmm2
psrad $0x1f, %xmm2
pandn %xmm6, %xmm2
movdqa %xmm3, %xmm6
pcmpeqd %xmm14, %xmm6
movdqa %xmm3, %xmm10
pcmpgtd %xmm14, %xmm10
movdqa %xmm12, %xmm9
pcmpgtd %xmm0, %xmm9
pand %xmm6, %xmm9
movdqa %xmm2, %xmm6
pand %xmm9, %xmm6
movdqa %xmm9, %xmm8
por %xmm10, %xmm9
pand %xmm2, %xmm10
pand %xmm10, %xmm1
pandn %xmm10, %xmm8
pandn %xmm14, %xmm10
por %xmm10, %xmm1
por %xmm6, %xmm8
movdqa 0x40(%rsp), %xmm6
pand %xmm8, %xmm6
pandn 0x90(%rsp), %xmm8
por %xmm6, %xmm8
movd %xmm3, (%r12,%rsi,4)
movq 0x28(%rsp), %rdi
movd %xmm7, (%rdi,%rsi,4)
pand %xmm2, %xmm9
movdqa %xmm0, %xmm2
pand %xmm9, %xmm2
pandn %xmm12, %xmm9
por %xmm2, %xmm9
psubd %xmm13, %xmm0
incq %rsi
movdqa %xmm9, %xmm12
movdqa %xmm1, %xmm14
movaps %xmm4, %xmm11
jmp 0x34ded2
movdqa 0x40(%rsp), %xmm0
paddd 0x279942(%rip), %xmm0   # 0x5c7bc0
movdqa %xmm0, 0x40(%rsp)
movq 0xf8(%rsp), %rbx
addq $0x4, %rbx
movq 0xf0(%rsp), %rax
addq %rax, 0x78(%rsp)
addq %rax, 0x80(%rsp)
movq 0x1b0(%rsp), %r13
movl 0xc(%rsp), %r8d
jmp 0x34ddc8
movdqa %xmm1, 0xe0(%rsp)
movdqa %xmm9, 0xa0(%rsp)
movdqa %xmm8, 0xd0(%rsp)
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
movq 0x88(%rsp), %rbx
cmpl $0x4, %ecx
je 0x34e33e
movl 0xe0(%rsp,%rcx,4), %esi
cmpl %r8d, %esi
jle 0x34e304
movl 0xd0(%rsp,%rcx,4), %eax
movl 0xa0(%rsp,%rcx,4), %r9d
jmp 0x34e333
jne 0x34e32d
movl 0xa0(%rsp,%rcx,4), %r9d
cmpl %edx, %r9d
jge 0x34e31f
movl 0xd0(%rsp,%rcx,4), %eax
movl %r8d, %esi
jmp 0x34e333
jne 0x34e32d
movl 0xd0(%rsp,%rcx,4), %esi
cmpl %eax, %esi
cmovll %esi, %eax
movl %r8d, %esi
movl %edx, %r9d
incq %rcx
movl %esi, %r8d
movl %r9d, %edx
jmp 0x34e2e2
movdqa 0x60(%rsp), %xmm0
pcmpgtd 0xb0(%rsp), %xmm0
movdqa 0x50(%rsp), %xmm1
pcmpgtd 0x110(%rsp), %xmm1
por %xmm0, %xmm1
movmskps %xmm1, %ecx
testl %ecx, %ecx
je 0x34e372
orb $0x40, 0xc(%rbx)
xorl %r8d, %r8d
xorl %edx, %edx
xorl %eax, %eax
movl %r8d, (%rbx)
movl %eax, 0x4(%rbx)
movl %edx, 0x8(%rbx)
callq 0x1ab763
movq %r12, %rdi
callq 0x1ab763
movq %r14, %rdi
callq 0x1ab763
cmpl $0x0, 0x30(%r13)
jne 0x34e534
movq 0x18(%rsp), %rdi
callq 0x1ab763
jmp 0x34e534
leal 0x3(%r15), %eax
movslq %eax, %rsi
pushq $0x10
popq %rdi
movq %rsi, 0x50(%rsp)
callq 0x1ab783
xorl %r9d, %r9d
movq %rax, 0x18(%rsp)
testq %rax, %rax
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %ebx
je 0x34dbe6
testl %r15d, %r15d
movl $0x0, %ecx
movq %r15, 0x10(%rsp)
cmovgl %r15d, %ecx
movl 0xc(%rsp), %r8d
movq 0x90(%rsp), %r10
movq 0x38(%rsp), %r11
movq 0x18(%rsp), %rax
cmpq %r9, %rcx
je 0x34e48a
movq 0x10(%r13), %rdx
movzbl (%r11,%r9), %esi
movl (%rdx,%rsi,4), %edx
movl %edx, (%rax,%r9,4)
incq %r9
jmp 0x34e400
movq 0x3ecbb3(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x278bbc(%rip), %rsi    # 0x5c6feb
leaq 0x248dce(%rip), %rdx    # 0x597204
leaq 0x2792c0(%rip), %rcx    # 0x5c76fd
jmp 0x34e52b
movq 0x3ecb8f(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2792ae(%rip), %rsi    # 0x5c7701
leaq 0x248daa(%rip), %rdx    # 0x597204
leaq 0x2792b4(%rip), %rcx    # 0x5c7715
jmp 0x34e52b
movq 0x3ecb6b(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2792a4(%rip), %rsi    # 0x5c771b
leaq 0x248d86(%rip), %rdx    # 0x597204
leaq 0x2792ab(%rip), %rcx    # 0x5c7730
jmp 0x34e52b
movq %rbp, %rax
movq 0x50(%rsp), %rdx
movq 0x18(%rsp), %rcx
cmpq %rdx, %rax
jge 0x34dc2a
andl $0x0, (%rcx,%rax,4)
incq %rax
jmp 0x34e497
movq 0x3ecb28(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x279261(%rip), %rsi    # 0x5c771b
leaq 0x248d43(%rip), %rdx    # 0x597204
leaq 0x27926d(%rip), %rcx    # 0x5c7735
jmp 0x34e52b
movq 0x3ecb07(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x278b10(%rip), %rsi    # 0x5c6feb
leaq 0x248d22(%rip), %rdx    # 0x597204
leaq 0x279459(%rip), %rcx    # 0x5c7942
jmp 0x34e52b
movq 0x3ecae6(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x278aef(%rip), %rsi    # 0x5c6feb
leaq 0x248d01(%rip), %rdx    # 0x597204
leaq 0x27922f(%rip), %rcx    # 0x5c7739
jmp 0x34e52b
movq 0x3ecac5(%rip), %rax    # 0x73afd8
movq (%rax), %rdi
leaq 0x2791e4(%rip), %rsi    # 0x5c7701
leaq 0x248ce0(%rip), %rdx    # 0x597204
leaq 0x279212(%rip), %rcx    # 0x5c773d
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x19e180
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)