// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sg_striped_sse2_128_8.c
// Function: parasail_sg_flags_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,
        int s1_beg, int s1_end, int s2_beg, int s2_end)
{
    /* declare local variables */
    int32_t i = 0;
    int32_t j = 0;
    int32_t k = 0;
    int32_t s1Len = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict vProfile = NULL;
    __m128i* restrict pvHStore = NULL;
    __m128i* restrict pvHLoad = NULL;
    __m128i* restrict pvE = NULL;
    int8_t* restrict boundary = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int8_t NEG_LIMIT = 0;
    int8_t POS_LIMIT = 0;
    int8_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vMaxH;
    __m128i vPosMask;
    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;
    s1Len = profile->s1Len;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    matrix = profile->matrix;
    segWidth = 16; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    vProfile = (__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;
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi8(NEG_LIMIT);
    vPosLimit = _mm_set1_epi8(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vPosMask = _mm_cmpeq_epi8(_mm_set1_epi8(position),
            _mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15));

    /* 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_SG | PARASAIL_FLAG_STRIPED
        | PARASAIL_FLAG_BITS_8 | PARASAIL_FLAG_LANES_16;
    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 */
    pvHStore = parasail_memalign___m128i(16, segLen);
    pvHLoad =  parasail_memalign___m128i(16, segLen);
    pvE      = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int8_t(16, s2Len+1);

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

    /* initialize H and E */
    {
        int32_t index = 0;
        for (i=0; i<segLen; ++i) {
            int32_t segNum = 0;
            __m128i_8_t h;
            __m128i_8_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = s1_beg ? 0 : (-open-gap*(segNum*segLen+i));
                h.v[segNum] = tmp < INT8_MIN ? INT8_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT8_MIN ? INT8_MIN : tmp;
            }
            _mm_store_si128(&pvHStore[index], h.m);
            _mm_store_si128(&pvE[index], e.m);
            ++index;
        }
    }

    /* initialize uppder boundary */
    {
        boundary[0] = 0;
        for (i=1; i<=s2Len; ++i) {
            int64_t tmp = s2_beg ? 0 : (-open-gap*(i-1));
            boundary[i] = tmp < INT8_MIN ? INT8_MIN : tmp;
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m128i vE;
        /* Initialize F value to -inf.  Any errors to vH values will be
         * corrected in the Lazy_F loop.  */
        __m128i vF = vNegLimit;

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

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

        /* Swap the 2 H buffers. */
        __m128i* pv = pvHLoad;
        pvHLoad = pvHStore;
        pvHStore = pv;

        /* insert upper boundary condition */
        vH = _mm_insert_epi8_rpl(vH, boundary[j], 0);

        /* 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);
            vSaturationCheckMax = _mm_max_epi8_rpl(vSaturationCheckMax, vH);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vE);
            vSaturationCheckMin = _mm_min_epi8_rpl(vSaturationCheckMin, vF);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif

            /* 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) {
            int64_t tmp = s2_beg ? -open : (boundary[j+1]-open);
            int8_t tmp2 = tmp < INT8_MIN ? INT8_MIN : tmp;
            vF = _mm_slli_si128(vF, 1);
            vF = _mm_insert_epi8_rpl(vF, tmp2, 0);
            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);
                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
                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:
        {
            /* extract vector containing last value from the column */
            __m128i vCompare;
            vH = _mm_load_si128(pvHStore + offset);
            vCompare = _mm_and_si128(vPosMask, _mm_cmpgt_epi8(vH, vMaxH));
            vMaxH = _mm_max_epi8_rpl(vH, vMaxH);
            if (_mm_movemask_epi8(vCompare)) {
                end_ref = j;
            }
#ifdef PARASAIL_ROWCOL
            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
        }
    }

#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);
    }
#endif

    /* max last value from all columns */
    if (s2_end)
    {
        for (k=0; k<position; ++k) {
            vMaxH = _mm_slli_si128(vMaxH, 1);
        }
        score = (int8_t) _mm_extract_epi8_rpl(vMaxH, 15);
        end_query = s1Len-1;
    }

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int8_t *t = (int8_t*)pvHStore;
        int32_t column_len = segLen * segWidth;
        for (i = 0; i<column_len; ++i, ++t) {
            int32_t temp = i / segWidth + i % segWidth * segLen;
            if (temp >= s1Len) continue;
            if (*t > score) {
                score = *t;
                end_query = temp;
                end_ref = s2Len-1;
            }
            else if (*t == score && end_ref == s2Len-1 && temp < end_query) {
                end_query = temp;
            }
        }
    }

    if (!s1_end && !s2_end) {
        /* extract last value from the last column */
        {
            __m128i vH = _mm_load_si128(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 1);
            }
            score = (int8_t) _mm_extract_epi8_rpl (vH, 15);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    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(boundary);
    parasail_free(pvE);
    parasail_free(pvHLoad);
    parasail_free(pvHStore);

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %ecx, 0x20(%rsp)
movq %rsi, 0x90(%rsp)
testq %rdi, %rdi
je 0x304521
movq 0x18(%rdi), %rax
movq %rax, 0x178(%rsp)
testq %rax, %rax
je 0x304528
movq 0x10(%rdi), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x30452f
movl 0x8(%rdi), %ecx
testl %ecx, %ecx
jle 0x304536
cmpq $0x0, 0x90(%rsp)
je 0x30453d
movl %edx, %r14d
testl %edx, %edx
jle 0x304544
cmpl $0x0, 0x20(%rsp)
js 0x30454b
testl %r8d, %r8d
js 0x304552
movl %r9d, %r15d
movl %r8d, 0x18(%rsp)
leal -0x1(%rcx), %eax
movq %rcx, 0x158(%rsp)
leaq 0xf(%rcx), %r13
movq %r13, %rbp
shrq $0x4, %rbp
movl %eax, 0x24(%rsp)
cltd
idivl %ebp
movl %eax, 0x4c(%rsp)
movl %edx, 0x14(%rsp)
movl 0x20(%rsp), %edx
movl %edx, %edi
negl %edi
movq 0x88(%rsp), %rsi
movl 0x20(%rsi), %eax
movl %eax, %ecx
negb %cl
movl %edi, 0x28(%rsp)
cmpl %edi, %eax
movzbl %cl, %r12d
cmovgl %edx, %r12d
movb $0x7e, %bl
subb 0x1c(%rsi), %bl
andl $0x7ffffff0, %r13d      # imm = 0x7FFFFFF0
movl %r13d, %edi
movl %r14d, %esi
callq 0x20959f
testq %rax, %rax
je 0x304557
movb %bl, 0x10(%rsp)
movq %r13, 0x150(%rsp)
xorl %edi, %edi
testl %r15d, %r15d
setne %dil
xorl %ecx, %ecx
cmpl $0x0, 0x1e0(%rsp)
setne %cl
shll $0x4, %ecx
xorl %edx, %edx
cmpl $0x0, 0x1e8(%rsp)
setne %dl
shll $0xe, %edx
xorl %esi, %esi
cmpl $0x0, 0x1f0(%rsp)
setne %sil
shll $0xf, %esi
leal (%rcx,%rdi,8), %ecx
orl %edx, %ecx
orl %esi, %ecx
orl 0xc(%rax), %ecx
orl $0x10120802, %ecx       # imm = 0x10120802
movq %rax, 0xb8(%rsp)
movl %ecx, 0xc(%rax)
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
movq %rax, %rbx
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
movq %rax, %r13
movl $0x10, %edi
movq %rbp, %rsi
callq 0x2ea474
movq %rbp, 0x70(%rsp)
movq %rax, %rbp
leal 0x1(%r14), %esi
movl $0x10, %edi
callq 0x2094c8
movq %rbx, 0x30(%rsp)
testq %rbx, %rbx
sete %dl
testq %r13, %r13
sete %cl
orb %dl, %cl
testq %rbp, %rbp
sete %sil
movq %rax, 0x78(%rsp)
testq %rax, %rax
sete %dl
orb %sil, %dl
orb %cl, %dl
jne 0x304557
movq %r14, 0x40(%rsp)
leal -0x1(%r14), %eax
movl %eax, 0x1c(%rsp)
movl $0xf, %edx
subl 0x4c(%rsp), %edx
movl 0x20(%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, %xmm2      # xmm2 = xmm0[0,0,0,0]
movl 0x18(%rsp), %r14d
movd %r14d, %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, %xmm3      # xmm3 = xmm0[0,0,0,0]
addb $-0x7f, %r12b
movl %r12d, 0x84(%rsp)
movzbl %r12b, %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]
movzbl 0x10(%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]
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
movl %edx, 0x48(%rsp)
movd %edx, %xmm4
punpcklbw %xmm4, %xmm4    # xmm4 = xmm4[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
movl %ecx, %eax
movl %r14d, %ecx
movslq 0x28(%rsp), %rdx
movl 0x70(%rsp), %esi
movq %rsi, 0x58(%rsp)
imulq %rcx, %rsi
xorl %edi, %edi
movq $-0x80, %r8
movq %rbp, 0x50(%rsp)
movq 0x50(%rsp), %rbp
movq %rdx, %r9
xorl %r10d, %r10d
testl %r15d, %r15d
je 0x303ba6
xorl %r11d, %r11d
jmp 0x303ba9
movq %r9, %r11
cmpq $-0x7f, %r11
movq $-0x80, %rbx
cmovgeq %r11, %rbx
movb %bl, 0x190(%rsp,%r10)
subq %rax, %r11
cmpq $-0x7f, %r11
cmovlq %r8, %r11
movb %r11b, 0x180(%rsp,%r10)
incq %r10
subq %rsi, %r9
cmpq $0x10, %r10
jne 0x303b9c
movq %rdi, %r9
shlq $0x4, %r9
movaps 0x190(%rsp), %xmm5
movq 0x30(%rsp), %r10
movaps %xmm5, (%r10,%r9)
movaps 0x180(%rsp), %xmm5
movaps %xmm5, (%rbp,%r9)
incq %rdi
subq %rcx, %rdx
cmpq 0x58(%rsp), %rdi
jne 0x303b96
movq 0x40(%rsp), %r10
cmpl $0x2, %r10d
movl $0x1, %eax
cmovgel %r10d, %eax
movq 0x78(%rsp), %rdi
movb $0x0, (%rdi)
xorl %ecx, %ecx
xorl %edx, %edx
movl 0x28(%rsp), %esi
movl 0x1e8(%rsp), %r9d
cmpl $-0x7f, %esi
movl $0xffffff80, %r8d       # imm = 0xFFFFFF80
cmovgel %esi, %r8d
testl %r9d, %r9d
cmovnel %ecx, %r8d
movb %r8b, 0x1(%rdi,%rdx)
subl %r14d, %esi
incq %rdx
cmpq %rdx, %rax
jne 0x303c3d
movq 0x70(%rsp), %rax
leal -0x1(%rax), %edx
movq %r10, %rsi
movl %esi, %r10d
movl 0x14(%rsp), %ecx
cmpl $0x1, %eax
movl %eax, %r11d
adcl $0x0, %r11d
cmpl $0x2, %esi
movl $0x1, %eax
cmovgel %esi, %eax
movq %rax, 0x168(%rsp)
movq 0x58(%rsp), %r12
imulq %r10, %r12
leaq (,%r12,4), %rsi
shlq $0x2, %r10
leaq (,%r12,8), %r8
leaq (%r12,%r12,8), %rax
leaq (%rax,%rax,2), %rbx
addq %r12, %rbx
movq %r12, %r14
imulq $0x2c, %r12, %rbp
imulq $0x34, %r12, %r9
imulq $0x38, %r12, %rax
movq %rax, 0x100(%rsp)
imulq $0x3c, %r12, %rax
movq %rax, 0xf8(%rsp)
shlq $0x4, %r12
shlq $0x5, %r14
shlq $0x4, %r11
shlq $0x4, %rdx
movq %rdx, 0x170(%rsp)
movq %rsi, %rdx
pcmpeqb 0x2f1db2(%rip), %xmm4   # 0x5f5ab0
movdqa 0x2f1d79(%rip), %xmm8   # 0x5f5a80
movq %rcx, 0x148(%rsp)
shlq $0x4, %rcx
movq %rcx, 0x160(%rsp)
movdqa %xmm0, %xmm7
movdqa %xmm0, %xmm5
movdqa %xmm1, %xmm6
leaq (%rsi,%rsi,2), %rax
movq %rax, 0xe8(%rsp)
leaq (%rsi,%rsi,4), %rax
movq %rax, 0xe0(%rsp)
leaq (%r8,%r8,2), %rax
movq %rax, 0xd8(%rsp)
leaq (%rsi,%rsi,8), %rax
movq %rax, 0xd0(%rsp)
movq %r8, 0x128(%rsp)
leaq (%r8,%r8,4), %rax
movq %rax, 0xc8(%rsp)
movq %r12, 0xf0(%rsp)
leaq (%r12,%r12,2), %r12
xorl %r8d, %r8d
xorl %esi, %esi
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0xb8(%rsp), %r15
movq 0x30(%rsp), %rcx
movq %r10, 0x140(%rsp)
movq %r11, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movq %rbx, 0x120(%rsp)
movq %r14, 0x118(%rsp)
movq %rbp, 0x110(%rsp)
movq %r9, 0x108(%rsp)
movq %r12, 0xc0(%rsp)
movq %rcx, %rdx
movq 0x88(%rsp), %rax
movq %rdi, %r9
movq 0x10(%rax), %rdi
movq 0x90(%rsp), %rax
movq %rsi, %rcx
movzbl (%rax,%rsi), %esi
movslq (%rdi,%rsi,4), %rax
movq 0x58(%rsp), %rsi
imulq %rax, %rsi
shlq $0x4, %rsi
addq 0x178(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq 0x170(%rsp), %rax
movq %rdx, 0xa8(%rsp)
movdqa (%rdx,%rax), %xmm9
pslldq $0x1, %xmm9             # xmm9 = zero,xmm9[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movq %rcx, 0x98(%rsp)
movzbl (%r9,%rcx), %ecx
movd %ecx, %xmm11
movdqa %xmm8, %xmm10
pandn %xmm11, %xmm10
por %xmm9, %xmm10
movq %r8, 0xa0(%rsp)
xorl %r9d, %r9d
movdqa %xmm0, %xmm9
movq 0x60(%rsp), %rax
paddsb (%rax,%r9), %xmm10
movq 0x50(%rsp), %rax
movdqa (%rax,%r9), %xmm11
movdqa %xmm10, %xmm12
pcmpgtb %xmm11, %xmm12
pand %xmm12, %xmm10
pandn %xmm11, %xmm12
por %xmm10, %xmm12
movdqa %xmm12, %xmm10
pcmpgtb %xmm9, %xmm10
pand %xmm10, %xmm12
pandn %xmm9, %xmm10
por %xmm12, %xmm10
movdqa %xmm10, (%r13,%r9)
movq 0x10(%r15), %rsi
movq (%rsi), %rsi
movsbl (%r13,%r9), %eax
movsbl 0x1(%r13,%r9), %ebp
movsbl 0x2(%r13,%r9), %ecx
movl %ecx, 0x30(%rsp)
movsbl 0x3(%r13,%r9), %r14d
movsbl 0x4(%r13,%r9), %ebx
movsbl 0x5(%r13,%r9), %r12d
movsbl 0x6(%r13,%r9), %edi
movsbl 0x7(%r13,%r9), %ecx
movl %ecx, 0x14(%rsp)
movsbl 0x8(%r13,%r9), %r10d
movsbl 0x9(%r13,%r9), %r11d
movsbl 0xa(%r13,%r9), %edx
movsbl 0xb(%r13,%r9), %ecx
movl %ecx, 0x18(%rsp)
movsbl 0xc(%r13,%r9), %ecx
movl %ecx, 0x10(%rsp)
movsbl 0xd(%r13,%r9), %ecx
movl %ecx, 0x40(%rsp)
movsbl 0xe(%r13,%r9), %ecx
movl %ecx, 0x2c(%rsp)
movsbl 0xf(%r13,%r9), %ecx
movl %ecx, 0x68(%rsp)
movl %eax, (%rsi,%r8)
leaq (%rsi,%r8), %rsi
movq 0x130(%rsp), %rax
movl %ebp, (%rax,%rsi)
movq 0x110(%rsp), %rbp
movq 0x128(%rsp), %rax
movl 0x30(%rsp), %ecx
movl %ecx, (%rax,%rsi)
movq 0xe8(%rsp), %rax
movl %r14d, (%rax,%rsi)
movq 0x118(%rsp), %r14
movq 0xf0(%rsp), %rax
movl %ebx, (%rax,%rsi)
movq 0x120(%rsp), %rbx
movq 0xe0(%rsp), %rax
movl %r12d, (%rax,%rsi)
movq 0xc0(%rsp), %r12
movq 0xd8(%rsp), %rax
movl %edi, (%rax,%rsi)
movl 0x14(%rsp), %eax
movl %eax, (%rbx,%rsi)
movl %r10d, (%r14,%rsi)
movq 0x140(%rsp), %r10
movq 0xd0(%rsp), %rax
movl %r11d, (%rax,%rsi)
movq 0x138(%rsp), %r11
movq 0xc8(%rsp), %rax
movl %edx, (%rax,%rsi)
movl 0x18(%rsp), %eax
movl %eax, (%rbp,%rsi)
movl 0x10(%rsp), %eax
movl %eax, (%r12,%rsi)
movq 0x108(%rsp), %rax
movl 0x40(%rsp), %ecx
movl %ecx, (%rax,%rsi)
movq 0x100(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, (%rax,%rsi)
movq 0xf8(%rsp), %rax
movl 0x68(%rsp), %ecx
movl %ecx, (%rax,%rsi)
movdqa %xmm5, %xmm12
pcmpgtb %xmm10, %xmm5
pand %xmm5, %xmm12
pandn %xmm10, %xmm5
por %xmm12, %xmm5
movdqa %xmm6, %xmm12
pcmpgtb %xmm10, %xmm12
movdqa %xmm10, %xmm13
pand %xmm12, %xmm13
pandn %xmm6, %xmm12
por %xmm13, %xmm12
movdqa %xmm12, %xmm13
pcmpgtb %xmm11, %xmm13
movdqa %xmm11, %xmm6
pand %xmm13, %xmm6
pandn %xmm12, %xmm13
por %xmm6, %xmm13
movdqa %xmm13, %xmm6
pcmpgtb %xmm9, %xmm6
movdqa %xmm9, %xmm12
pand %xmm6, %xmm12
pandn %xmm13, %xmm6
por %xmm12, %xmm6
psubsb %xmm2, %xmm10
psubsb %xmm3, %xmm11
movdqa %xmm11, %xmm12
pcmpgtb %xmm10, %xmm12
pand %xmm12, %xmm11
pandn %xmm10, %xmm12
por %xmm11, %xmm12
movq 0x50(%rsp), %rax
movdqa %xmm12, (%rax,%r9)
psubsb %xmm3, %xmm9
movdqa %xmm9, %xmm11
pcmpgtb %xmm10, %xmm9
pand %xmm9, %xmm11
pandn %xmm10, %xmm9
por %xmm11, %xmm9
movq 0xa8(%rsp), %rax
movdqa (%rax,%r9), %xmm10
addq $0x10, %r9
addq %r10, %r8
cmpq %r9, %r11
jne 0x303e5d
movq %r13, 0x38(%rsp)
movq $0x0, 0xb0(%rsp)
movl 0x28(%rsp), %ecx
cmpl $0x0, 0x1e8(%rsp)
movq 0xa0(%rsp), %rsi
jne 0x304128
movq 0x78(%rsp), %rax
movq 0x98(%rsp), %rcx
movsbl 0x1(%rax,%rcx), %ecx
subl 0x20(%rsp), %ecx
pslldq $0x1, %xmm9             # xmm9 = zero,xmm9[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
cmpl $-0x7f, %ecx
movl $0xffffff80, %eax       # imm = 0xFFFFFF80
cmovll %eax, %ecx
movd %ecx, %xmm10
movdqa %xmm8, %xmm11
pandn %xmm10, %xmm11
por %xmm11, %xmm9
movb $0x1, 0x60(%rsp)
movl $0x1, %eax
movq %rax, 0x68(%rsp)
xorl %r8d, %r8d
movq 0x38(%rsp), %rcx
movdqa (%rcx,%r8), %xmm11
movdqa %xmm11, %xmm10
pcmpgtb %xmm9, %xmm10
pand %xmm10, %xmm11
pandn %xmm9, %xmm10
por %xmm11, %xmm10
movdqa %xmm10, (%rcx,%r8)
movq 0x10(%r15), %rax
movq (%rax), %rax
movsbl (%rcx,%r8), %edx
movl %edx, 0x14(%rsp)
movsbl 0x1(%rcx,%r8), %edi
movsbl 0x2(%rcx,%r8), %r10d
movsbl 0x3(%rcx,%r8), %r11d
movsbl 0x4(%rcx,%r8), %ebx
movsbl 0x5(%rcx,%r8), %ebp
movsbl 0x6(%rcx,%r8), %r14d
movsbl 0x7(%rcx,%r8), %r12d
movsbl 0x8(%rcx,%r8), %r13d
movsbl 0x9(%rcx,%r8), %r9d
movl %r9d, 0x30(%rsp)
movsbl 0xa(%rcx,%r8), %r15d
movsbl 0xb(%rcx,%r8), %r9d
movsbl 0xc(%rcx,%r8), %edx
movl %edx, 0x18(%rsp)
movsbl 0xd(%rcx,%r8), %edx
movl %edx, 0x10(%rsp)
movsbl 0xe(%rcx,%r8), %edx
movl %edx, 0x40(%rsp)
movsbl 0xf(%rcx,%r8), %ecx
movl %ecx, 0x2c(%rsp)
movl 0x14(%rsp), %ecx
movl %ecx, (%rax,%rsi)
movq 0x130(%rsp), %rdx
leaq (%rax,%rsi), %rax
movl %edi, (%rdx,%rax)
movq 0x128(%rsp), %rcx
movl %r10d, (%rcx,%rax)
movq 0x140(%rsp), %r10
movq 0xe8(%rsp), %rcx
movl %r11d, (%rcx,%rax)
movq 0x138(%rsp), %r11
movq 0xf0(%rsp), %rcx
movl %ebx, (%rcx,%rax)
movq 0x120(%rsp), %rbx
movq 0xe0(%rsp), %rcx
movl %ebp, (%rcx,%rax)
movq 0x110(%rsp), %rbp
movq 0xd8(%rsp), %rcx
movl %r14d, (%rcx,%rax)
movq 0x118(%rsp), %r14
movl %r12d, (%rbx,%rax)
movq 0xc0(%rsp), %r12
movl %r13d, (%r14,%rax)
movq 0xd0(%rsp), %rcx
movl 0x30(%rsp), %edi
movl %edi, (%rcx,%rax)
movq 0xc8(%rsp), %rcx
movl %r15d, (%rcx,%rax)
movq 0xb8(%rsp), %r15
movl %r9d, (%rbp,%rax)
movq 0x108(%rsp), %r9
movl 0x18(%rsp), %ecx
movl %ecx, (%r12,%rax)
movl 0x10(%rsp), %ecx
movl %ecx, (%r9,%rax)
movq 0x100(%rsp), %rcx
movl 0x40(%rsp), %edi
movl %edi, (%rcx,%rax)
movq 0xf8(%rsp), %rcx
movl 0x2c(%rsp), %edi
movl %edi, (%rcx,%rax)
movdqa %xmm6, %xmm11
pcmpgtb %xmm10, %xmm11
movdqa %xmm10, %xmm12
pand %xmm11, %xmm12
pandn %xmm6, %xmm11
movdqa %xmm11, %xmm6
por %xmm12, %xmm6
movdqa %xmm5, %xmm11
pcmpgtb %xmm10, %xmm5
pand %xmm5, %xmm11
pandn %xmm10, %xmm5
por %xmm11, %xmm5
psubsb %xmm2, %xmm10
psubsb %xmm3, %xmm9
movdqa %xmm9, %xmm11
pcmpgtb %xmm10, %xmm11
pmovmskb %xmm11, %eax
testl %eax, %eax
je 0x30436e
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
setb 0x60(%rsp)
addq $0x10, %r8
addq %r10, %rsi
incq %rax
movq %rax, 0x68(%rsp)
cmpq %r8, %r11
jne 0x30415f
testb $0x1, 0x60(%rsp)
jne 0x304391
movq 0xb0(%rsp), %rcx
leal 0x1(%rcx), %eax
cmpl $0xf, %ecx
movq %rax, 0xb0(%rsp)
jb 0x3040fc
movq 0x38(%rsp), %rcx
movq 0x160(%rsp), %rax
movdqa (%rcx,%rax), %xmm9
movdqa %xmm9, %xmm10
pcmpgtb %xmm7, %xmm10
movdqa %xmm10, %xmm11
pand %xmm4, %xmm11
pand %xmm10, %xmm9
pandn %xmm7, %xmm10
movdqa %xmm10, %xmm7
por %xmm9, %xmm7
pmovmskb %xmm11, %eax
testl %eax, %eax
movl 0xc(%rsp), %eax
movq 0x98(%rsp), %rsi
cmovnel %esi, %eax
movl %eax, 0xc(%rsp)
incq %rsi
movq 0xa0(%rsp), %r8
addq $0x4, %r8
cmpq 0x168(%rsp), %rsi
movq 0xa8(%rsp), %r13
movq 0x78(%rsp), %rdi
jne 0x303dd1
movl 0x1f0(%rsp), %r14d
testl %r14d, %r14d
movl 0x24(%rsp), %esi
movq 0x158(%rsp), %r9
movl 0x4c(%rsp), %r10d
movl 0x84(%rsp), %r11d
movq 0x70(%rsp), %rbx
movl 0x1e0(%rsp), %r8d
je 0x30446b
cmpl $0xe, %r10d
jg 0x304461
movl 0x48(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
pslldq $0x1, %xmm7             # xmm7 = zero,xmm7[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %eax
jne 0x304458
pextrw $0x7, %xmm7, %r11d
shrl $0x8, %r11d
testl %r8d, %r8d
je 0x3044dc
cmpl $0x0, 0x150(%rsp)
je 0x3044dc
movl %ebx, %ecx
andl $0x7ffffff, %ecx        # imm = 0x7FFFFFF
shll $0x4, %ecx
xorl %edx, %edx
movl %esi, %eax
movl %edx, %ebp
shrl $0x4, %ebp
movl %edx, %esi
andl $0xf, %esi
imull %ebx, %esi
addl %ebp, %esi
cmpl %r9d, %esi
jge 0x3044d3
movq 0x38(%rsp), %rbp
movb (%rbp,%rdx), %bpl
cmpb %r11b, %bpl
jle 0x3044bb
movl %ebp, %r11d
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl %esi, %eax
jmp 0x3044d3
cmpl %eax, %esi
cmovgel %eax, %esi
movl 0xc(%rsp), %r12d
cmpl 0x1c(%rsp), %r12d
cmovnel %eax, %esi
cmpb %r11b, %bpl
cmovel %esi, %eax
incq %rdx
cmpl %edx, %ecx
jne 0x304489
jmp 0x3044de
movl %esi, %eax
orl %r8d, %r14d
jne 0x304587
movq 0x148(%rsp), %rax
shlq $0x4, %rax
movq 0x38(%rsp), %rcx
movdqa (%rcx,%rax), %xmm2
cmpl $0xe, %r10d
jg 0x30456f
movl 0x48(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
movl 0x24(%rsp), %ecx
pslldq $0x1, %xmm2             # xmm2 = zero,xmm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
decl %eax
jne 0x304516
jmp 0x304573
callq 0x1aee89
jmp 0x304557
callq 0x1aee63
jmp 0x304557
callq 0x1aee3d
jmp 0x304557
callq 0x1aee17
jmp 0x304557
callq 0x1aedf1
jmp 0x304557
callq 0x1aedcb
jmp 0x304557
callq 0x1aeda5
jmp 0x304557
callq 0x1aed7f
xorl %r15d, %r15d
movq %r15, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x24(%rsp), %ecx
pextrw $0x7, %xmm2, %r11d
shrl $0x8, %r11d
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl %ecx, %eax
pcmpgtb %xmm6, %xmm0
pcmpgtb %xmm1, %xmm5
por %xmm0, %xmm5
pmovmskb %xmm5, %ecx
testl %ecx, %ecx
je 0x3045ad
orb $0x40, 0xc(%r15)
xorl %r11d, %r11d
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
movsbl %r11b, %ecx
movl %ecx, (%r15)
movl %eax, 0x4(%r15)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%r15)
callq 0x2094b5
movq 0x50(%rsp), %rdi
callq 0x2094b5
movq %r13, %rdi
callq 0x2094b5
movq 0x38(%rsp), %rdi
callq 0x2094b5
jmp 0x30455a