// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/sw_striped_sse2_128_8.c
// Function: parasail_sw_table_striped_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 k = 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 vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvHMax = NULL;
    __m128i* restrict pvE = NULL;
    __m128i vGapO;
    __m128i vGapE;
    __m128i vZero;
    int8_t bias = 0;
    int8_t score = 0;
    __m128i vBias;
    __m128i vMaxH;
    __m128i vMaxHUnit;
    int8_t maxp = 0;
    __m128i insert_mask;
    /*int8_t stop = 0;*/
    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;
    k = 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
    vProfile = (__m128i*)profile->profile8.score;
    vGapO = _mm_set1_epi8(open);
    vGapE = _mm_set1_epi8(gap);
    vZero = _mm_set1_epi8(0);
    bias = INT8_MIN;
    score = bias;
    vBias = _mm_set1_epi8(bias);
    vMaxH = vBias;
    vMaxHUnit = vBias;
    maxp = INT8_MAX - (int8_t)(matrix->max+1);
    insert_mask = _mm_cmpgt_epi8(
            _mm_set_epi8(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
            vZero);
    /*stop = profile->stop == INT32_MAX ?  INT8_MAX : (int8_t)profile->stop-bias;*/

    /* 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_STRIPED
        | 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 */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad = parasail_memalign___m128i(16, segLen);
    pvHMax = parasail_memalign___m128i(16, segLen);
    pvE = parasail_memalign___m128i(16, segLen);

    /* validate heap variables */
    if (!pvHStore) return NULL;
    if (!pvHLoad) return NULL;
    if (!pvHMax) return NULL;
    if (!pvE) return NULL;

    /* initialize H and E */
    parasail_memset___m128i(pvHStore, vBias, segLen);
    parasail_memset___m128i(pvE, vBias, segLen);

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        __m128i vF;
        __m128i vH;
        const __m128i* vP = NULL;
        __m128i* pv = NULL;

        /* Initialize F value to 0.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        vF = vBias;

        /* load final segment of pvHStore and shift left by 1 bytes */
        vH = _mm_slli_si128(pvHStore[segLen - 1], 1);
        vH = _mm_blendv_epi8_rpl(vH, vBias, insert_mask);

        /* Correct part of the vProfile */
        vP = vProfile + matrix->mapper[(unsigned char)s2[j]] * segLen;

        if (end_ref == j-2) {
            /* Swap in the max buffer. */
            pv = pvHMax;
            pvHMax = pvHLoad;
            pvHLoad = pvHStore;
            pvHStore = pv;
        }
        else {
            /* Swap the 2 H buffers. */
            pv = pvHLoad;
            pvHLoad = pvHStore;
            pvHStore = pv;
        }

        /* inner loop to process the query sequence */
        for (i=0; i<segLen; ++i) {
            vH = _mm_adds_epi8(vH, _mm_load_si128(vP + i));
            vE = _mm_load_si128(pvE + i);

            /* Get max from vH, vE and vF. */
            vH = _mm_max_epi8_rpl(vH, vE);
            vH = _mm_max_epi8_rpl(vH, vF);
            /* Save vH values. */
            _mm_store_si128(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len, bias);
#endif
            vMaxH = _mm_max_epi8_rpl(vH, vMaxH);

            /* Update vE value. */
            vH = _mm_subs_epi8(vH, vGapO);
            vE = _mm_subs_epi8(vE, vGapE);
            vE = _mm_max_epi8_rpl(vE, vH);
            _mm_store_si128(pvE + i, vE);

            /* Update vF value. */
            vF = _mm_subs_epi8(vF, vGapE);
            vF = _mm_max_epi8_rpl(vF, vH);

            /* Load the next vH. */
            vH = _mm_load_si128(pvHLoad + i);
        }

        /* Lazy_F loop: has been revised to disallow adjecent insertion and
         * then deletion, so don't update E(i, i), learn from SWPS3 */
        for (k=0; k<segWidth; ++k) {
            vF = _mm_slli_si128(vF, 1);
            vF = _mm_blendv_epi8_rpl(vF, vBias, insert_mask);
            for (i=0; i<segLen; ++i) {
                vH = _mm_load_si128(pvHStore + i);
                vH = _mm_max_epi8_rpl(vH,vF);
                _mm_store_si128(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
                arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len, bias);
#endif
                vMaxH = _mm_max_epi8_rpl(vH, vMaxH);
                vH = _mm_subs_epi8(vH, vGapO);
                vF = _mm_subs_epi8(vF, vGapE);
                if (! _mm_movemask_epi8(_mm_cmpgt_epi8(vF, vH))) goto end;
                /*vF = _mm_max_epi8_rpl(vF, vH);*/
            }
        }
end:
        {
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            vH = _mm_load_si128(pvHStore + 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) - bias;
        }
#endif

        {
            __m128i vCompare = _mm_cmpgt_epi8(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi8_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm_set1_epi8(score);
                end_ref = j;
            }
        }

        /*if (score == stop) break;*/
    }

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

    if (score == INT8_MAX) {
        result->flag |= PARASAIL_FLAG_SATURATED;
    }

    if (parasail_result_is_saturated(result)) {
        score = INT8_MAX;
        end_query = 0;
        end_ref = 0;
    }
    else {
        if (end_ref == j-1) {
            /* end_ref was the last store column */
            __m128i *pv = pvHMax;
            pvHMax = pvHStore;
            pvHStore = pv;
        }
        else if (end_ref == j-2) {
            /* end_ref was the last load column */
            __m128i *pv = pvHMax;
            pvHMax = pvHLoad;
            pvHLoad = pv;
        }
        /* Trace the alignment ending position on read. */
        {
            int8_t *t = (int8_t*)pvHMax;
            int32_t column_len = segLen * segWidth;
            end_query = s1Len - 1;
            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;
                    }
                }
            }
        }
    }

    result->score = score - bias;
    result->end_query = end_query;
    result->end_ref = end_ref;

    parasail_free(pvE);
    parasail_free(pvHMax);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, 0x78(%rsp)
testq %rdi, %rdi
je 0x314f56
movq 0x18(%rdi), %rax
movq %rax, 0x138(%rsp)
testq %rax, %rax
je 0x314fa7
movq 0x10(%rdi), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x315119
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x315123
cmpq $0x0, 0x78(%rsp)
je 0x31512d
movl %edx, %r15d
testl %edx, %edx
jle 0x315137
movl %ecx, %r13d
testl %ecx, %ecx
js 0x315141
movl %r8d, %ebx
testl %r8d, %r8d
js 0x31514b
movq %rax, 0x118(%rsp)
leaq 0xf(%rax), %r12
movq 0x70(%rsp), %rax
movl 0x1c(%rax), %ebp
movl %r12d, %edi
andl $0x7ffffff0, %edi       # imm = 0x7FFFFFF0
movq %rdi, 0x120(%rsp)
movl %r15d, %esi
callq 0x20abc2
testq %rax, %rax
je 0x314739
movq %rax, %r14
movl %ebp, 0x4(%rsp)
movl %ebx, 0x10(%rsp)
movq %r15, 0x50(%rsp)
shrq $0x4, %r12
orl $0x10120804, 0xc(%rax)  # imm = 0x10120804
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %rbp
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %rbx
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rax, %r15
movl $0x10, %edi
movq %r12, %rsi
callq 0x2f600c
movq %rbp, %xmm0
movq %rbx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movq %r15, %xmm1
movq %rax, %xmm2
punpcklqdq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0]
pxor %xmm2, %xmm2
pcmpeqd %xmm2, %xmm0
pcmpeqd %xmm2, %xmm1
movdqa %xmm0, %xmm2
shufps $0xdd, %xmm1, %xmm2     # xmm2 = xmm2[1,3],xmm1[1,3]
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
andps %xmm2, %xmm0
movmskps %xmm0, %ecx
testl %ecx, %ecx
je 0x314751
xorl %r14d, %r14d
movq %r14, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x38(%rsp)
movq %r15, 0x30(%rsp)
movd %r13d, %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, 0x150(%rsp)
movd 0x10(%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, 0x140(%rsp)
movaps 0x315951(%rip), %xmm0   # 0x62a0f0
movq %rbp, %rdi
movq %r12, %rsi
movq %r12, 0x58(%rsp)
movq %rax, %r12
movq %rbx, %r13
callq 0x2f6015
movq %r12, 0x48(%rsp)
movq %r12, %rdi
movq 0x58(%rsp), %r12
movaps 0x315927(%rip), %xmm0   # 0x62a0f0
movq %r12, %rsi
callq 0x2f6015
movdqa 0x315916(%rip), %xmm10  # 0x62a0f0
movdqa 0x140(%rsp), %xmm9
movdqa 0x150(%rsp), %xmm8
movq %rbp, %rdx
leal -0x1(%r12), %r15d
movl 0x50(%rsp), %ecx
movb $0x7e, %al
subb 0x4(%rsp), %al
movsbl %al, %eax
movl %eax, 0x6c(%rsp)
movq %r12, %rax
imulq %rcx, %rax
leaq (,%rax,4), %rdi
movq %rcx, 0x128(%rsp)
leaq (,%rcx,4), %r8
leaq (,%rax,8), %r9
leaq (%rdi,%rdi,2), %r10
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movq %rax, %rbx
imulq $0x2c, %rax, %rsi
movq %rsi, 0xd8(%rsp)
imulq $0x34, %rax, %r11
imulq $0x38, %rax, %rsi
movq %rsi, 0xc8(%rsp)
imulq $0x3c, %rax, %rsi
movq %rsi, 0xc0(%rsp)
shlq $0x4, %rax
shlq $0x5, %rbx
movq %rbx, %rsi
shlq $0x4, %r12
movq %r12, 0xb0(%rsp)
shlq $0x4, %r15
movq %r15, 0x130(%rsp)
movd 0x31587d(%rip), %xmm0   # 0x62a110
movdqa %xmm10, %xmm2
movdqa %xmm10, %xmm1
leaq (%rdi,%rdi,4), %r12
leaq (%r9,%r9,2), %rbp
movq %rbp, 0xa0(%rsp)
leaq (%rdi,%rdi,8), %rbp
leaq (%r9,%r9,4), %r15
movq %r15, 0x90(%rsp)
movq %rax, 0xb8(%rsp)
leaq (%rax,%rax,2), %rax
movq %rax, 0x88(%rsp)
movb $-0x80, %al
movl %eax, (%rsp)
xorl %ebx, %ebx
xorl %r15d, %r15d
movq %r14, 0x110(%rsp)
movq %rdi, 0x108(%rsp)
movq %r8, 0x100(%rsp)
movq %r9, 0xf8(%rsp)
movq %r10, 0xf0(%rsp)
movq %rcx, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %r11, 0xd0(%rsp)
movq %r12, 0xa8(%rsp)
movq %rbp, 0x98(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x78(%rsp), %rcx
movzbl (%rcx,%r15), %ecx
movslq (%rax,%rcx,4), %rax
movl 0x58(%rsp), %ecx
imulq %rax, %rcx
shlq $0x4, %rcx
addq 0x138(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movq %r15, 0x80(%rsp)
leal -0x2(%r15), %eax
cmpl %eax, 0x38(%rsp)
movq %r13, %rcx
movq 0x30(%rsp), %rax
cmoveq %rax, %r13
cmoveq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x130(%rsp), %rax
movq %rdx, 0x28(%rsp)
movdqa (%rdx,%rax), %xmm4
pslldq $0x1, %xmm4             # xmm4 = zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm0, %xmm4
movq %rbx, 0x60(%rsp)
movq %rbx, 0x10(%rsp)
xorl %r11d, %r11d
movdqa %xmm10, %xmm3
movl $0x80, %edx
movq 0x40(%rsp), %rax
paddsb (%rax,%r11), %xmm4
movq 0x48(%rsp), %rax
movdqa (%rax,%r11), %xmm5
movdqa %xmm4, %xmm6
pcmpgtb %xmm5, %xmm6
pand %xmm6, %xmm4
pandn %xmm5, %xmm6
por %xmm4, %xmm6
movdqa %xmm6, %xmm4
pcmpgtb %xmm3, %xmm4
pand %xmm4, %xmm6
pandn %xmm3, %xmm4
por %xmm6, %xmm4
movdqa %xmm4, (%r13,%r11)
movq 0x10(%r14), %rax
movq (%rax), %rax
movsbl (%r13,%r11), %r10d
addl %edx, %r10d
movsbl 0x1(%r13,%r11), %r9d
movsbl 0x2(%r13,%r11), %edx
movsbl 0x3(%r13,%r11), %esi
movsbl 0x4(%r13,%r11), %r12d
movsbl 0x5(%r13,%r11), %r14d
movl $0x80, %r15d
movsbl 0x6(%r13,%r11), %edi
movsbl 0x7(%r13,%r11), %r8d
movsbl 0x8(%r13,%r11), %ebx
movsbl 0x9(%r13,%r11), %ebp
movsbl 0xa(%r13,%r11), %ecx
movl %ecx, 0x8(%rsp)
movsbl 0xb(%r13,%r11), %ecx
movl %ecx, 0x18(%rsp)
movsbl 0xc(%r13,%r11), %ecx
movl %ecx, 0x1c(%rsp)
movsbl 0xd(%r13,%r11), %ecx
movl %ecx, 0x20(%rsp)
movsbl 0xe(%r13,%r11), %ecx
movl %ecx, 0x24(%rsp)
movsbl 0xf(%r13,%r11), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rsp), %rcx
movl %r10d, (%rax,%rcx)
addq %rcx, %rax
addl %r15d, %r9d
movq 0x108(%rsp), %r10
movl %r9d, (%r10,%rax)
addl %r15d, %edx
movq 0xf8(%rsp), %r9
movl %edx, (%r9,%rax)
addl %r15d, %esi
movq 0xf0(%rsp), %rdx
movl %esi, (%rdx,%rax)
addl %r15d, %r12d
movq 0xb8(%rsp), %rcx
movl %r12d, (%rcx,%rax)
addl %r15d, %r14d
movq 0xa8(%rsp), %rcx
movl %r14d, (%rcx,%rax)
movq 0x110(%rsp), %r14
addl %r15d, %edi
movq 0xa0(%rsp), %rcx
movl %edi, (%rcx,%rax)
movl $0x80, %edx
addl %edx, %r8d
movq 0xe8(%rsp), %rcx
movl %r8d, (%rcx,%rax)
movq 0x100(%rsp), %r8
addl %edx, %ebx
movq 0xe0(%rsp), %rcx
movl %ebx, (%rcx,%rax)
addl %edx, %ebp
movq 0x98(%rsp), %rcx
movl %ebp, (%rcx,%rax)
movl 0x8(%rsp), %esi
addl %edx, %esi
movq 0x90(%rsp), %rcx
movl %esi, (%rcx,%rax)
movl 0x18(%rsp), %esi
addl %edx, %esi
movq 0xd8(%rsp), %rcx
movl %esi, (%rcx,%rax)
movl 0x1c(%rsp), %esi
addl %edx, %esi
movq 0x88(%rsp), %rcx
movl %esi, (%rcx,%rax)
movl 0x20(%rsp), %esi
addl %edx, %esi
movq 0xd0(%rsp), %rcx
movl %esi, (%rcx,%rax)
movl 0x24(%rsp), %esi
addl %edx, %esi
movq 0xc8(%rsp), %rcx
movl %esi, (%rcx,%rax)
movl 0x4(%rsp), %esi
addl %edx, %esi
movq 0xc0(%rsp), %rcx
movl %esi, (%rcx,%rax)
movdqa %xmm4, %xmm6
pcmpgtb %xmm1, %xmm6
movdqa %xmm4, %xmm7
pand %xmm6, %xmm7
pandn %xmm1, %xmm6
movdqa %xmm6, %xmm1
por %xmm7, %xmm1
psubsb %xmm8, %xmm4
psubsb %xmm9, %xmm5
movdqa %xmm5, %xmm6
pcmpgtb %xmm4, %xmm6
pand %xmm6, %xmm5
pandn %xmm4, %xmm6
por %xmm5, %xmm6
movq 0x48(%rsp), %rax
movdqa %xmm6, (%rax,%r11)
psubsb %xmm9, %xmm3
movdqa %xmm3, %xmm5
pcmpgtb %xmm4, %xmm3
pand %xmm3, %xmm5
pandn %xmm4, %xmm3
por %xmm5, %xmm3
movq 0x28(%rsp), %rax
movdqa (%rax,%r11), %xmm4
addq $0x10, %r11
addq %r8, 0x10(%rsp)
cmpq %r11, 0xb0(%rsp)
jne 0x3149b2
movq %r13, 0x8(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x60(%rsp), %rsi
pslldq $0x1, %xmm3             # xmm3 = zero,xmm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
por %xmm0, %xmm3
movq %rsi, 0x10(%rsp)
xorl %r11d, %r11d
movq 0x8(%rsp), %rcx
movdqa (%rcx,%r11), %xmm5
movdqa %xmm5, %xmm4
pcmpgtb %xmm3, %xmm4
pand %xmm4, %xmm5
pandn %xmm3, %xmm4
por %xmm5, %xmm4
movdqa %xmm4, (%rcx,%r11)
movq 0x10(%r14), %rax
movq (%rax), %rax
movsbl (%rcx,%r11), %r14d
addl %edx, %r14d
movsbl 0x1(%rcx,%r11), %r12d
movsbl 0x2(%rcx,%r11), %edx
movsbl 0x3(%rcx,%r11), %esi
movsbl 0x4(%rcx,%r11), %r10d
movsbl 0x5(%rcx,%r11), %edi
movsbl 0x6(%rcx,%r11), %r8d
movsbl 0x7(%rcx,%r11), %r9d
movsbl 0x8(%rcx,%r11), %ebx
movsbl 0x9(%rcx,%r11), %ebp
movsbl 0xa(%rcx,%r11), %r15d
movsbl 0xb(%rcx,%r11), %r13d
movl %r13d, 0x18(%rsp)
movsbl 0xc(%rcx,%r11), %r13d
movl %r13d, 0x1c(%rsp)
movsbl 0xd(%rcx,%r11), %r13d
movl %r13d, 0x20(%rsp)
movsbl 0xe(%rcx,%r11), %r13d
movl %r13d, 0x24(%rsp)
movsbl 0xf(%rcx,%r11), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rsp), %rcx
movl %r14d, (%rax,%rcx)
movq 0x110(%rsp), %r14
addq %rcx, %rax
movl $0x80, %ecx
addl %ecx, %r12d
movq 0x108(%rsp), %rcx
movl %r12d, (%rcx,%rax)
movl $0x80, %ecx
addl %ecx, %edx
movq 0xf8(%rsp), %rcx
movl %edx, (%rcx,%rax)
movl $0x80, %ecx
addl %ecx, %esi
movq 0xf0(%rsp), %rcx
movl %esi, (%rcx,%rax)
movq 0x60(%rsp), %rsi
movl $0x80, %edx
addl %edx, %r10d
movq 0xb8(%rsp), %rcx
movl %r10d, (%rcx,%rax)
addl %edx, %edi
movq 0xa8(%rsp), %rcx
movl %edi, (%rcx,%rax)
addl %edx, %r8d
movq 0xa0(%rsp), %rcx
movl %r8d, (%rcx,%rax)
movq 0x100(%rsp), %r8
addl %edx, %r9d
movq 0xe8(%rsp), %rcx
movl %r9d, (%rcx,%rax)
addl %edx, %ebx
movq 0xe0(%rsp), %rcx
movl %ebx, (%rcx,%rax)
addl %edx, %ebp
movq 0x98(%rsp), %rcx
movl %ebp, (%rcx,%rax)
addl %edx, %r15d
movq 0x90(%rsp), %rcx
movl %r15d, (%rcx,%rax)
movl 0x18(%rsp), %edi
addl %edx, %edi
movq 0xd8(%rsp), %rcx
movl %edi, (%rcx,%rax)
movl 0x1c(%rsp), %edi
addl %edx, %edi
movq 0x88(%rsp), %rcx
movl %edi, (%rcx,%rax)
movl 0x20(%rsp), %edi
addl %edx, %edi
movq 0xd0(%rsp), %rcx
movl %edi, (%rcx,%rax)
movl 0x24(%rsp), %edi
addl %edx, %edi
movq 0xc8(%rsp), %rcx
movl %edi, (%rcx,%rax)
movl 0x4(%rsp), %edi
addl %edx, %edi
movq 0xc0(%rsp), %rcx
movl %edi, (%rcx,%rax)
movq 0xb0(%rsp), %rcx
movdqa %xmm4, %xmm5
pcmpgtb %xmm1, %xmm5
movdqa %xmm4, %xmm6
pand %xmm5, %xmm6
pandn %xmm1, %xmm5
movdqa %xmm5, %xmm1
por %xmm6, %xmm1
psubsb %xmm8, %xmm4
psubsb %xmm9, %xmm3
movdqa %xmm3, %xmm5
pcmpgtb %xmm4, %xmm5
pmovmskb %xmm5, %eax
testl %eax, %eax
je 0x314e49
addq $0x10, %r11
addq %r8, 0x10(%rsp)
cmpq %r11, %rcx
jne 0x314c2a
movl 0x40(%rsp), %eax
incl %eax
movl %eax, 0x40(%rsp)
cmpl $0x10, %eax
jne 0x314c19
movdqa %xmm1, %xmm3
pcmpgtb %xmm2, %xmm3
pmovmskb %xmm3, %eax
testl %eax, %eax
je 0x314f1e
movdqa %xmm1, %xmm2
psrldq $0x8, %xmm2             # xmm2 = xmm2[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
movdqa %xmm1, %xmm3
pcmpgtb %xmm2, %xmm3
movdqa %xmm1, %xmm4
pand %xmm3, %xmm4
pandn %xmm2, %xmm3
por %xmm4, %xmm3
movdqa %xmm3, %xmm2
psrldq $0x4, %xmm2             # xmm2 = xmm2[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
movdqa %xmm3, %xmm4
pcmpgtb %xmm2, %xmm4
pand %xmm4, %xmm3
pandn %xmm2, %xmm4
por %xmm3, %xmm4
movdqa %xmm4, %xmm2
psrldq $0x2, %xmm2             # xmm2 = xmm2[2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero,zero
movdqa %xmm4, %xmm3
pcmpgtb %xmm2, %xmm3
pand %xmm3, %xmm4
pandn %xmm2, %xmm3
por %xmm4, %xmm3
movdqa %xmm3, %xmm4
psrldq $0x1, %xmm4             # xmm4 = xmm4[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],zero
movdqa %xmm3, %xmm2
pcmpgtb %xmm4, %xmm2
pand %xmm2, %xmm3
pandn %xmm4, %xmm2
por %xmm3, %xmm2
movdqa %xmm2, 0x160(%rsp)
movsbl 0x160(%rsp), %eax
movl %eax, (%rsp)
cmpl %eax, 0x6c(%rsp)
movq 0x38(%rsp), %r12
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %r13
movq 0x80(%rsp), %r15
jl 0x314f60
punpcklbw %xmm2, %xmm2    # xmm2 = xmm2[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
movl %r15d, %ecx
movq %rcx, 0x38(%rsp)
jmp 0x314f30
movq 0x8(%rsp), %rdx
movq 0x28(%rsp), %r13
movq 0x80(%rsp), %r15
incq %r15
movq 0x60(%rsp), %rbx
addq $0x4, %rbx
cmpq 0x128(%rsp), %r15
jne 0x31492b
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r12
jmp 0x314f72
callq 0x1af0b7
jmp 0x314739
orb $0x40, 0xc(%r14)
movl %r15d, %eax
movq %rax, 0x50(%rsp)
movq 0x30(%rsp), %rbx
cmpb $0x7f, (%rsp)
jne 0x314f7d
orb $0x40, 0xc(%r14)
movq %r14, %rdi
callq 0x20be2e
testl %eax, %eax
je 0x314fb1
xorl %r12d, %r12d
movl $0xff, %eax
movq 0x8(%rsp), %r15
movq 0x28(%rsp), %r13
xorl %esi, %esi
movq 0x48(%rsp), %rdi
jmp 0x31517a
callq 0x1af091
jmp 0x314739
movq 0x50(%rsp), %rcx
leal -0x1(%rcx), %eax
addl $-0x2, %ecx
cmpl %ecx, %r12d
movq 0x28(%rsp), %rdx
movq %rdx, %r13
cmoveq %rbx, %r13
movq %rbx, %rcx
cmoveq %rdx, %rcx
movq %rbx, %r15
cmpl %eax, %r12d
movq 0x8(%rsp), %rax
cmovneq %rax, %r15
cmoveq %rdx, %r13
movq %rcx, %rbx
cmoveq %rax, %rbx
movq 0x118(%rsp), %rsi
decl %esi
movq 0x120(%rsp), %rdx
testl %edx, %edx
movq 0x48(%rsp), %rdi
je 0x315113
je 0x315155
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movzbl (%rsp), %eax
movd %eax, %xmm1
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
movd 0x58(%rsp), %xmm2
pshufd $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
movdqa 0x314a92(%rip), %xmm3   # 0x629ad0
xorl %eax, %eax
movdqa 0x314c68(%rip), %xmm4   # 0x629cb0
pshufd $0xf5, %xmm2, %xmm5     # xmm5 = xmm2[1,1,3,3]
movdqa 0x314a9b(%rip), %xmm6   # 0x629af0
movd (%rbx,%rax), %xmm7
pcmpeqb %xmm1, %xmm7
punpcklbw %xmm7, %xmm7    # xmm7 = xmm7[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm7, %xmm7    # xmm7 = xmm7[0,0,1,1,2,2,3,3]
movdqa %xmm3, %xmm8
psrld $0x4, %xmm8
movdqa %xmm3, %xmm9
pand %xmm4, %xmm9
pshufd $0xf5, %xmm9, %xmm10    # xmm10 = xmm9[1,1,3,3]
pmuludq %xmm2, %xmm9
pshufd $0xe8, %xmm9, %xmm9     # xmm9 = xmm9[0,2,2,3]
pmuludq %xmm5, %xmm10
pshufd $0xe8, %xmm10, %xmm10   # xmm10 = xmm10[0,2,2,3]
punpckldq %xmm10, %xmm9   # xmm9 = xmm9[0],xmm10[0],xmm9[1],xmm10[1]
paddd %xmm8, %xmm9
movdqa %xmm0, %xmm8
pcmpgtd %xmm9, %xmm8
pand %xmm8, %xmm9
pandn %xmm0, %xmm8
por %xmm9, %xmm8
pand %xmm7, %xmm8
pandn %xmm0, %xmm7
movdqa %xmm7, %xmm0
por %xmm8, %xmm0
addq $0x4, %rax
paddd %xmm6, %xmm3
cmpq %rax, %rdx
jne 0x315055
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pand %xmm2, %xmm0
pandn %xmm1, %xmm2
por %xmm0, %xmm2
pshufd $0x55, %xmm2, %xmm0     # xmm0 = xmm2[1,1,1,1]
movdqa %xmm0, %xmm1
pcmpgtd %xmm2, %xmm1
pand %xmm1, %xmm2
pandn %xmm0, %xmm1
por %xmm2, %xmm1
movd %xmm1, %esi
movl (%rsp), %r8d
jmp 0x315173
callq 0x1af06b
jmp 0x314739
callq 0x1af045
jmp 0x314739
callq 0x1af01f
jmp 0x314739
callq 0x1aeff9
jmp 0x314739
callq 0x1aefd3
jmp 0x314739
callq 0x1aefad
jmp 0x314739
xorl %eax, %eax
movl (%rsp), %r8d
movl %eax, %ecx
shrl $0x4, %ecx
cmpl %esi, %ecx
cmovgel %esi, %ecx
cmpb %r8b, (%rbx,%rax)
cmovel %ecx, %esi
incq %rax
cmpl %eax, %edx
jne 0x31515b
movsbl %r8b, %eax
subl $-0x80, %eax
movl %eax, (%r14)
movl %esi, 0x4(%r14)
movl %r12d, 0x8(%r14)
callq 0x20a60d
movq %rbx, %rdi
callq 0x20a60d
movq %r13, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
jmp 0x31473c
nop