// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_scan_sse2_128_8.c
// Function: parasail_sw_rowcol_scan_profile_sse2_128_8
parasail_result_t* PNAME(
        const parasail_profile_t * const restrict profile,
        const char * const restrict s2, const int s2Len,
        const int open, const int gap)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    int32_t s1Len = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
#ifdef PARASAIL_ROWCOL
    int32_t offset = 0;
    int32_t position = 0;
#endif
    __m128i* restrict pvP = NULL;
    __m128i* restrict pvE = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvHMax = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int8_t NEG_LIMIT = 0;
    int8_t POS_LIMIT = 0;
    __m128i vZero;
    int8_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    parasail_result_t *result = NULL;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile8.score);
    PARASAIL_CHECK_NULL(profile->matrix);
    PARASAIL_CHECK_GT0(profile->s1Len);
    PARASAIL_CHECK_NULL(s2);
    PARASAIL_CHECK_GT0(s2Len);
    PARASAIL_CHECK_GE0(open);
    PARASAIL_CHECK_GE0(gap);

    /* initialize stack variables */
    i = 0;
    j = 0;
    end_query = 0;
    end_ref = 0;
    s1Len = profile->s1Len;
    matrix = profile->matrix;
    segWidth = 16; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
#ifdef PARASAIL_ROWCOL
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
#endif
    pvP = (__m128i*)profile->profile8.score;
    vGapO = _mm_set1_epi8(open);
    vGapE = _mm_set1_epi8(gap);
    NEG_LIMIT = (-open < matrix->min ? INT8_MIN + open : INT8_MIN - matrix->min) + 1;
    POS_LIMIT = INT8_MAX - matrix->max - 1;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi8(NEG_LIMIT);
    vPosLimit = _mm_set1_epi8(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vMaxHUnit = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi8_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_adds_epi8(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi8(-segLen*gap), 1));

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

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_BITS_8 | PARASAIL_FLAG_LANES_16;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    pvE = parasail_memalign___m128i(16, segLen);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvE) return NULL;
    if (!pvHt) return NULL;
    if (!pvH) return NULL;
    if (!pvHMax) return NULL;
    if (!pvGapper) return NULL;

    parasail_memset___m128i(pvH, vZero, segLen);
    parasail_memset___m128i(pvE, vNegLimit, segLen);
    {
        __m128i vGapper = _mm_subs_epi8(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_subs_epi8(vGapper, vGapE);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vHt;
        __m128i vF;
        __m128i vH;
        __m128i vHp;
        __m128i *pvW;
        __m128i vW;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm_load_si128(pvH+(segLen-1));
        vHp = _mm_slli_si128(vHp, 1);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = vZero;
        vF = vNegLimit;
        for (i=0; i<segLen; ++i) {
            vH = _mm_load_si128(pvH+i);
            vE = _mm_load_si128(pvE+i);
            vW = _mm_load_si128(pvW+i);
            vE = _mm_max_epi8_rpl(
                    _mm_subs_epi8(vE, vGapE),
                    _mm_subs_epi8(vH, vGapO));
            vHp = _mm_adds_epi8(vHp, vW);
            vF = _mm_max_epi8_rpl(vF, _mm_adds_epi8(vHt, pvGapper[i]));
            vHt = _mm_max_epi8_rpl(vE, vHp);
            _mm_store_si128(pvE+i, vE);
            _mm_store_si128(pvHt+i, vHt);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 1);
        vF = _mm_max_epi8_rpl(vF, _mm_adds_epi8(vHt, pvGapper[0]));
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 1);
            vFt = _mm_adds_epi8(vFt, vSegLenXgap);
            vF = _mm_max_epi8_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 1);
        vF = _mm_adds_epi8(vF, vNegInfFront);
        vH = _mm_max_epi8_rpl(vHt, vF);
        vH = _mm_max_epi8_rpl(vH, vZero);
        for (i=0; i<segLen; ++i) {
            vHt = _mm_load_si128(pvHt+i);
            vF = _mm_max_epi8_rpl(
                    _mm_subs_epi8(vF, vGapE),
                    _mm_subs_epi8(vH, vGapO));
            vH = _mm_max_epi8_rpl(vHt, vF);
            vH = _mm_max_epi8_rpl(vH, vZero);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMax = _mm_max_epi8_rpl(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
            vMaxH = _mm_max_epi8_rpl(vH, vMaxH);
        } 

        {
            __m128i vCompare = _mm_cmpgt_epi8(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi8_rpl(vMaxH);
                vMaxHUnit = _mm_set1_epi8(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m128i)*segLen);
            }
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            int32_t k = 0;
            __m128i vH = _mm_load_si128(pvH + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 1);
            }
            result->rowcols->score_row[j] = (int8_t) _mm_extract_epi8_rpl (vH, 15);
        }
#endif
    }

    /* Trace the alignment ending position on read. */
    {
        int8_t *t = (int8_t*)pvHMax;
        int32_t column_len = segLen * segWidth;
        end_query = s1Len;
        for (i = 0; i<column_len; ++i, ++t) {
            if (*t == score) {
                int32_t temp = i / segWidth + i % segWidth * segLen;
                if (temp < end_query) {
                    end_query = temp;
                }
            }
        }
    }

#ifdef PARASAIL_ROWCOL
    for (i=0; i<segLen; ++i) {
        __m128i vH = _mm_load_si128(pvH+i);
        arr_store_col(result->rowcols->score_col, vH, i, segLen);
    }
#endif

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi8(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi8(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(pvGapper);
    parasail_free(pvHMax);
    parasail_free(pvH);
    parasail_free(pvHt);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x34050b
movq 0x18(%rdi), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x340512
movq 0x10(%rdi), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x340519
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x340520
cmpq $0x0, 0x50(%rsp)
je 0x340527
movl %edx, %r15d
testl %edx, %edx
jle 0x34052e
testl %ecx, %ecx
js 0x340535
movl %r8d, %r13d
testl %r8d, %r8d
js 0x34053c
leaq 0xf(%rax), %r14
movq %r14, %rbx
shrq $0x4, %rbx
movq %rax, 0x58(%rsp)
decl %eax
cltd
idivl %ebx
movl %eax, 0x40(%rsp)
movl %edx, %r12d
movl %ecx, %eax
negl %eax
movq 0x48(%rsp), %rsi
movl 0x20(%rsi), %edi
movl %edi, %edx
negb %dl
cmpl %eax, %edi
movzbl %dl, %ebp
movl %ecx, 0xa0(%rsp)
cmovgl %ecx, %ebp
movb $0x7e, %al
subb 0x1c(%rsi), %al
movb %al, 0x90(%rsp)
andl $0x7ffffff0, %r14d      # imm = 0x7FFFFFF0
movl %r14d, %edi
movl %r15d, %esi
callq 0x209630
testq %rax, %rax
je 0x340541
movl %r13d, 0x38(%rsp)
movl %r12d, 0x70(%rsp)
movl %r15d, 0x80(%rsp)
movq %r14, 0xe0(%rsp)
movl %ebp, 0xc(%rsp)
movq %rax, 0x28(%rsp)
orl $0x10140404, 0xc(%rax)  # imm = 0x10140404
movl $0x10, %edi
movq %rbx, %rsi
callq 0x2ea474
movq %rax, %r14
movl $0x10, %edi
movq %rbx, %rsi
callq 0x2ea474
movq %rax, %r12
movl $0x10, %edi
movq %rbx, %rsi
callq 0x2ea474
movq %rax, %r13
movl $0x10, %edi
movq %rbx, %rsi
callq 0x2ea474
movq %rax, %r15
movl $0x10, %edi
movq %rbx, %rsi
callq 0x2ea474
movq %rax, %rbp
testq %r14, %r14
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
testq %r13, %r13
sete %al
movq %r15, 0x68(%rsp)
testq %r15, %r15
sete %dl
orb %al, %dl
orb %cl, %dl
testq %rbp, %rbp
sete %al
orb %dl, %al
jne 0x340541
movl $0xf, %eax
subl 0x40(%rsp), %eax
movl %eax, 0x24(%rsp)
movd 0xa0(%rsp), %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x130(%rsp)
movl 0x38(%rsp), %ecx
movd %ecx, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x120(%rsp)
movl 0xc(%rsp), %eax
addb $-0x7f, %al
movl %eax, 0xc(%rsp)
movzbl %al, %eax
movd %eax, %xmm1
movdqa %xmm1, %xmm0
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0xc0(%rsp)
movzbl 0x90(%rsp), %eax
movd %eax, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x100(%rsp)
imull %ebx, %ecx
negb %cl
movzbl %cl, %eax
movd %eax, %xmm0
punpcklbw %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm1, 0xd0(%rsp)
paddsb %xmm1, %xmm0
movdqa %xmm0, 0x110(%rsp)
pxor %xmm0, %xmm0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2ea47d
movq %r14, %rdi
movdqa 0xc0(%rsp), %xmm0
movq %rbx, %rsi
callq 0x2ea47d
pxor %xmm0, %xmm0
movdqa 0x120(%rsp), %xmm10
movdqa 0x130(%rsp), %xmm9
leal -0x1(%rbx), %eax
psubsb %xmm9, %xmm0
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbp, %rcx
movl %ebx, %edx
movdqa %xmm0, (%rcx)
psubsb %xmm10, %xmm0
addq $-0x10, %rcx
decl %edx
jg 0x33fe4f
movl %eax, %eax
shlq $0x4, %rax
addq %r13, %rax
movq %rax, 0x30(%rsp)
movq %rbx, %rax
shlq $0x4, %rax
movq %rax, 0xe8(%rsp)
movl 0x70(%rsp), %eax
shlq $0x4, %rax
addq %r13, %rax
movq %rax, 0xf8(%rsp)
movl $0x1, %edx
cmpl %edx, %ebx
movq %rbx, %rax
movl %eax, %r15d
adcl $0x0, %r15d
movl 0x24(%rsp), %ecx
cmpl $0x2, %ecx
cmovll %edx, %ecx
movl %ecx, 0x24(%rsp)
movl 0x80(%rsp), %ecx
cmpl $0x2, %ecx
cmovgel %ecx, %edx
movq %rdx, 0xf0(%rsp)
shlq $0x4, %r15
xorl %ebx, %ebx
movq %rax, 0xb8(%rsp)
movl %eax, %eax
movq %rax, 0x38(%rsp)
pxor %xmm12, %xmm12
xorl %esi, %esi
movdqa 0xc0(%rsp), %xmm0
movdqa %xmm0, %xmm14
movdqa %xmm0, %xmm13
movdqa %xmm0, %xmm7
movdqa 0x100(%rsp), %xmm8
movq 0x28(%rsp), %rdx
movdqa 0x110(%rsp), %xmm11
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
movzbl (%rcx,%rbx), %ecx
movslq (%rax,%rcx,4), %rcx
imulq 0x38(%rsp), %rcx
shlq $0x4, %rcx
addq 0x60(%rsp), %rcx
movq 0x30(%rsp), %rax
movdqa (%rax), %xmm0
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
xorl %eax, %eax
movdqa 0xc0(%rsp), %xmm2
pxor %xmm1, %xmm1
movdqa (%r13,%rax), %xmm3
movdqa (%r14,%rax), %xmm4
psubsb %xmm10, %xmm4
movdqa %xmm3, %xmm5
psubsb %xmm9, %xmm5
movdqa %xmm4, %xmm6
pcmpgtb %xmm5, %xmm6
pand %xmm6, %xmm4
pandn %xmm5, %xmm6
por %xmm4, %xmm6
paddsb (%rcx,%rax), %xmm0
paddsb (%rbp,%rax), %xmm1
movdqa %xmm2, %xmm4
pcmpgtb %xmm1, %xmm2
pand %xmm2, %xmm4
pandn %xmm1, %xmm2
por %xmm4, %xmm2
movdqa %xmm6, %xmm1
pcmpgtb %xmm0, %xmm1
movdqa %xmm6, (%r14,%rax)
pand %xmm1, %xmm6
pandn %xmm0, %xmm1
por %xmm6, %xmm1
movdqa %xmm1, (%r12,%rax)
addq $0x10, %rax
movdqa %xmm3, %xmm0
cmpq %rax, %r15
jne 0x33ff52
pslldq $0x1, %xmm1             # xmm1 = zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa (%rbp), %xmm3
paddsb %xmm1, %xmm3
movdqa %xmm2, %xmm0
pcmpgtb %xmm3, %xmm0
pand %xmm0, %xmm2
pandn %xmm3, %xmm0
por %xmm2, %xmm0
movl $0xe, %eax
movdqa %xmm0, %xmm2
movdqa %xmm0, %xmm3
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
paddsb %xmm11, %xmm0
pcmpgtb %xmm0, %xmm2
pand %xmm2, %xmm3
pandn %xmm0, %xmm2
movdqa %xmm2, %xmm0
por %xmm3, %xmm0
decl %eax
jne 0x33fff4
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
paddsb 0xd0(%rsp), %xmm0
movdqa %xmm1, %xmm2
pcmpgtb %xmm0, %xmm2
pand %xmm2, %xmm1
pandn %xmm0, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, %xmm1
pcmpgtb %xmm12, %xmm1
pand %xmm2, %xmm1
xorl %ecx, %ecx
movdqa (%r12,%rcx), %xmm2
psubsb %xmm10, %xmm0
psubsb %xmm9, %xmm1
movdqa %xmm0, %xmm3
pcmpgtb %xmm1, %xmm3
pand %xmm3, %xmm0
pandn %xmm1, %xmm3
por %xmm3, %xmm0
movdqa %xmm2, %xmm3
pcmpgtb %xmm0, %xmm3
pand %xmm3, %xmm2
pandn %xmm0, %xmm3
por %xmm2, %xmm3
movdqa %xmm3, %xmm1
pcmpgtb %xmm12, %xmm1
pand %xmm3, %xmm1
movdqa %xmm1, (%r13,%rcx)
movdqa %xmm8, %xmm2
pcmpgtb %xmm1, %xmm2
movdqa %xmm1, %xmm3
pand %xmm2, %xmm3
pandn %xmm8, %xmm2
movdqa %xmm2, %xmm8
por %xmm3, %xmm8
movdqa %xmm7, %xmm2
movdqa %xmm7, %xmm3
pcmpgtb %xmm1, %xmm3
pand %xmm3, %xmm2
pandn %xmm1, %xmm3
movdqa %xmm3, %xmm7
por %xmm2, %xmm7
movdqa %xmm1, %xmm2
pcmpgtb %xmm13, %xmm2
movdqa %xmm1, %xmm3
pand %xmm2, %xmm3
pandn %xmm13, %xmm2
movdqa %xmm2, %xmm13
por %xmm3, %xmm13
addq $0x10, %rcx
cmpq %rcx, %r15
jne 0x34004f
movdqa %xmm13, %xmm0
pcmpgtb %xmm14, %xmm0
pmovmskb %xmm0, %eax
testl %eax, %eax
je 0x34023d
movdqa %xmm13, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm13, %xmm1
pcmpgtb %xmm0, %xmm1
movdqa %xmm13, %xmm2
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movdqa %xmm1, %xmm0
psrldq $0x4, %xmm0             # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm1, %xmm2
pcmpgtb %xmm0, %xmm2
pand %xmm2, %xmm1
pandn %xmm0, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, %xmm0
psrldq $0x2, %xmm0             # xmm0 = xmm0[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movdqa %xmm2, %xmm1
pcmpgtb %xmm0, %xmm1
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movdqa %xmm1, %xmm0
psrldq $0x1, %xmm0             # xmm0 = xmm0[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movdqa %xmm1, %xmm2
pcmpgtb %xmm0, %xmm2
pand %xmm2, %xmm1
pandn %xmm0, %xmm2
por %xmm1, %xmm2
movdqa %xmm2, 0x140(%rsp)
movb 0x140(%rsp), %al
movl %eax, 0xc(%rsp)
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm2, %xmm0      # xmm0 = xmm2[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x70(%rsp)
movq 0x68(%rsp), %rdi
movq %r13, %rsi
movq 0xe8(%rsp), %rdx
movdqa %xmm7, 0xa0(%rsp)
movdqa %xmm8, 0x90(%rsp)
movdqa %xmm13, 0x80(%rsp)
callq 0x19e0c0
movdqa 0x70(%rsp), %xmm14
movdqa 0x80(%rsp), %xmm13
pxor %xmm12, %xmm12
movdqa 0x110(%rsp), %xmm11
movdqa 0x120(%rsp), %xmm10
movdqa 0x130(%rsp), %xmm9
movdqa 0x90(%rsp), %xmm8
movdqa 0xa0(%rsp), %xmm7
movq 0x28(%rsp), %rdx
movl %ebx, %esi
movq 0xf8(%rsp), %rax
movdqa (%rax), %xmm0
cmpl $0xe, 0x40(%rsp)
jg 0x34025d
movl 0x24(%rsp), %eax
pslldq $0x1, %xmm0             # xmm0 = zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %eax
jne 0x340254
pextrw $0x7, %xmm0, %eax
shrl $0x8, %eax
movsbl %al, %eax
movq 0x10(%rdx), %rcx
movq (%rcx), %rcx
movl %eax, (%rcx,%rbx,4)
incq %rbx
cmpq 0xf0(%rsp), %rbx
jne 0x33ff10
cmpl $0x0, 0xe0(%rsp)
movq 0x58(%rsp), %rdi
je 0x3402d7
movl %esi, 0x30(%rsp)
movq 0xb8(%rsp), %rbx
movl %ebx, %eax
andl $0x7ffffff, %eax        # imm = 0x7FFFFFF
shll $0x4, %eax
xorl %ecx, %ecx
movl 0xc(%rsp), %r9d
movq 0x68(%rsp), %rdx
cmpb %r9b, (%rdx,%rcx)
jne 0x3402ce
movl %ecx, %edx
shrl $0x4, %edx
movl %ecx, %esi
andl $0xf, %esi
imull %ebx, %esi
addl %edx, %esi
cmpl %edi, %esi
cmovll %esi, %edi
incq %rcx
cmpl %ecx, %eax
jne 0x3402af
jmp 0x3402e3
movl %esi, 0x30(%rsp)
movq 0xb8(%rsp), %rbx
movq %rdi, 0x58(%rsp)
leal (,%rbx,4), %r9d
leal (,%rbx,8), %r11d
leaq (%r9,%r9,2), %rax
movq %rax, 0x50(%rsp)
cmpl $0x1, %ebx
adcl $0x0, %ebx
movq 0x38(%rsp), %rdi
imulq $0x3c, %rdi, %rax
movq %rax, 0xa0(%rsp)
imulq $0x38, %rdi, %rax
movq %rax, 0x90(%rsp)
imulq $0x34, %rdi, %rax
movq %rax, 0x80(%rsp)
movq %rdi, %rax
shlq $0x4, %rax
movq %rax, 0x70(%rsp)
leaq (%rax,%rax,2), %rax
movq %rax, 0x48(%rsp)
imulq $0x2c, %rdi, %rax
movq %rax, 0x60(%rsp)
leaq (%r11,%r11,4), %rax
movq %rax, 0x40(%rsp)
leaq (%r9,%r9,8), %rax
movq %rax, 0xd0(%rsp)
movq %rdi, %rsi
shlq $0x5, %rsi
leaq (%rdi,%rdi,8), %rcx
leaq (%rcx,%rcx,2), %rdx
addq %rdi, %rdx
movq %r11, %rax
leaq (%r11,%r11,2), %rcx
movq %r9, %r15
leaq (%r9,%r9,4), %rdi
shll $0x2, %ebx
xorl %r8d, %r8d
movdqa (%r13,%r8,4), %xmm0
movq 0x28(%rsp), %r9
movq 0x10(%r9), %r9
movq 0x8(%r9), %r9
movdqa %xmm0, 0x10(%rsp)
movsbl 0x10(%rsp), %r11d
movl %r11d, (%r9,%r8)
addq %r8, %r9
movsbl 0x11(%rsp), %r11d
movl %r11d, (%r15,%r9)
movsbl 0x12(%rsp), %r11d
movl %r11d, (%rax,%r9)
movsbl 0x13(%rsp), %r11d
movq 0x50(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x14(%rsp), %r11d
movq 0x70(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x15(%rsp), %r11d
movl %r11d, (%rdi,%r9)
movsbl 0x16(%rsp), %r11d
movl %r11d, (%rcx,%r9)
movsbl 0x17(%rsp), %r11d
movl %r11d, (%rdx,%r9)
movsbl 0x18(%rsp), %r11d
movl %r11d, (%rsi,%r9)
movsbl 0x19(%rsp), %r11d
movq 0xd0(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1a(%rsp), %r11d
movq 0x40(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1b(%rsp), %r11d
movq 0x60(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1c(%rsp), %r11d
movq 0x48(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1d(%rsp), %r11d
movq 0x80(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1e(%rsp), %r11d
movq 0x90(%rsp), %r10
movl %r11d, (%r10,%r9)
movsbl 0x1f(%rsp), %r11d
movq 0xa0(%rsp), %r10
movl %r11d, (%r10,%r9)
movq 0x28(%rsp), %r9
addq $0x4, %r8
cmpq %r8, %rbx
jne 0x340389
movdqa 0xc0(%rsp), %xmm0
pcmpgtb %xmm8, %xmm0
pcmpgtb 0x100(%rsp), %xmm7
por %xmm0, %xmm7
pmovmskb %xmm7, %eax
testl %eax, %eax
movq 0x58(%rsp), %rcx
movl 0xc(%rsp), %eax
movl 0x30(%rsp), %edx
je 0x3404cc
orb $0x40, 0xc(%r9)
xorl %eax, %eax
xorl %edx, %edx
xorl %ecx, %ecx
movsbl %al, %eax
movl %eax, (%r9)
movl %ecx, 0x4(%r9)
movl %edx, 0x8(%r9)
movq %rbp, %rdi
callq 0x2094b5
movq 0x68(%rsp), %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq 0x28(%rsp), %rax
jmp 0x340543
callq 0x1b51bf
jmp 0x340541
callq 0x1b5199
jmp 0x340541
callq 0x1b5173
jmp 0x340541
callq 0x1b514d
jmp 0x340541
callq 0x1b5127
jmp 0x340541
callq 0x1b5101
jmp 0x340541
callq 0x1b50db
jmp 0x340541
callq 0x1b50b5
xorl %eax, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)