// File: /workspace/github_c_makefile_star2_O3/nh13[P]ksw/src/parasail/src/sw_striped_avx2_256_8.c
// Function: parasail_sw_rowcol_striped_profile_avx2_256_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
    __m256i* restrict vProfile = NULL;
    __m256i* restrict pvHStore = NULL;
    __m256i* restrict pvHLoad = NULL;
    __m256i* restrict pvHMax = NULL;
    __m256i* restrict pvE = NULL;
    __m256i vGapO;
    __m256i vGapE;
    __m256i vZero;
    int8_t bias = 0;
    int8_t score = 0;
    __m256i vBias;
    __m256i vMaxH;
    __m256i vMaxHUnit;
    int8_t maxp = 0;
    __m256i 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 = 32; /* 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 = (__m256i*)profile->profile8.score;
    vGapO = _mm256_set1_epi8(open);
    vGapE = _mm256_set1_epi8(gap);
    vZero = _mm256_set1_epi8(0);
    bias = INT8_MIN;
    score = bias;
    vBias = _mm256_set1_epi8(bias);
    vMaxH = vBias;
    vMaxHUnit = vBias;
    maxp = INT8_MAX - (int8_t)(matrix->max+1);
    insert_mask = _mm256_cmpgt_epi8(
            _mm256_set_epi8(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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_32;
#ifdef PARASAIL_TABLE
    result->flag |= PARASAIL_FLAG_TABLE;
#endif
#ifdef PARASAIL_ROWCOL
    result->flag |= PARASAIL_FLAG_ROWCOL;
#endif

    /* initialize heap variables */
    pvHStore = parasail_memalign___m256i(32, segLen);
    pvHLoad = parasail_memalign___m256i(32, segLen);
    pvHMax = parasail_memalign___m256i(32, segLen);
    pvE = parasail_memalign___m256i(32, 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___m256i(pvHStore, vBias, segLen);
    parasail_memset___m256i(pvE, vBias, segLen);

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m256i vE;
        __m256i vF;
        __m256i vH;
        const __m256i* vP = NULL;
        __m256i* 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 = _mm256_slli_si256_rpl(pvHStore[segLen - 1], 1);
        vH = _mm256_blendv_epi8(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 = _mm256_adds_epi8(vH, _mm256_load_si256(vP + i));
            vE = _mm256_load_si256(pvE + i);

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

            /* Update vE value. */
            vH = _mm256_subs_epi8(vH, vGapO);
            vE = _mm256_subs_epi8(vE, vGapE);
            vE = _mm256_max_epi8(vE, vH);
            _mm256_store_si256(pvE + i, vE);

            /* Update vF value. */
            vF = _mm256_subs_epi8(vF, vGapE);
            vF = _mm256_max_epi8(vF, vH);

            /* Load the next vH. */
            vH = _mm256_load_si256(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 = _mm256_slli_si256_rpl(vF, 1);
            vF = _mm256_blendv_epi8(vF, vBias, insert_mask);
            for (i=0; i<segLen; ++i) {
                vH = _mm256_load_si256(pvHStore + i);
                vH = _mm256_max_epi8(vH,vF);
                _mm256_store_si256(pvHStore + i, vH);
#ifdef PARASAIL_TABLE
                arr_store_si256(result->tables->score_table, vH, i, segLen, j, s2Len, bias);
#endif
                vMaxH = _mm256_max_epi8(vH, vMaxH);
                vH = _mm256_subs_epi8(vH, vGapO);
                vF = _mm256_subs_epi8(vF, vGapE);
                if (! _mm256_movemask_epi8(_mm256_cmpgt_epi8(vF, vH))) goto end;
                /*vF = _mm256_max_epi8(vF, vH);*/
            }
        }
end:
        {
        }

#ifdef PARASAIL_ROWCOL
        /* extract last value from the column */
        {
            vH = _mm256_load_si256(pvHStore + offset);
            for (k=0; k<position; ++k) {
                vH = _mm256_slli_si256_rpl(vH, 1);
            }
            result->rowcols->score_row[j] = (int8_t) _mm256_extract_epi8_rpl (vH, 31) - bias;
        }
#endif

        {
            __m256i vCompare = _mm256_cmpgt_epi8(vMaxH, vMaxHUnit);
            if (_mm256_movemask_epi8(vCompare)) {
                score = _mm256_hmax_epi8_rpl(vMaxH);
                /* if score has potential to overflow, abort early */
                if (score > maxp) {
                    result->flag |= PARASAIL_FLAG_SATURATED;
                    break;
                }
                vMaxHUnit = _mm256_set1_epi8(score);
                end_ref = j;
            }
        }

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

#ifdef PARASAIL_ROWCOL
    for (i=0; i<segLen; ++i) {
        __m256i vH = _mm256_load_si256(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 */
            __m256i *pv = pvHMax;
            pvHMax = pvHStore;
            pvHStore = pv;
        }
        else if (end_ref == j-2) {
            /* end_ref was the last load column */
            __m256i *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 $0x168, %rsp            # imm = 0x168
movq %rsi, 0x28(%rsp)
testq %rdi, %rdi
je 0x56fc35
movq 0x18(%rdi), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x56fc3c
movq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x56fc43
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x56fc4a
cmpq $0x0, 0x28(%rsp)
je 0x56fc51
movl %edx, %r14d
testl %edx, %edx
jle 0x56fc58
testl %ecx, %ecx
js 0x56fc5f
movl %r8d, %r13d
testl %r8d, %r8d
js 0x56fc66
movl %ecx, 0x60(%rsp)
movq %rax, %rbx
addq $0x1f, %rbx
movq %rbx, %r12
shrq $0x5, %r12
leal -0x1(%rax), %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %r12d
movl %eax, 0x18(%rsp)
movl %edx, 0x48(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rax), %eax
movl %eax, 0x8(%rsp)
andl $0x7fffffe0, %ebx       # imm = 0x7FFFFFE0
movl %ebx, %edi
movl %r14d, %esi
callq 0x20ac53
testq %rax, %rax
je 0x56fc6b
movq %rax, %r15
movl %r13d, 0x120(%rsp)
movq %r14, 0x40(%rsp)
movl %ebp, 0x14(%rsp)
orl $0x20140804, 0xc(%rax)  # imm = 0x20140804
movl $0x20, %edi
movq %r12, %rsi
callq 0x4f1904
movq %rax, %r13
movl $0x20, %edi
movq %r12, %rsi
callq 0x4f1904
movq %rax, %rbp
movl $0x20, %edi
movq %r12, %rsi
callq 0x4f1904
movq %rax, %r14
movl $0x20, %edi
movq %r12, %rsi
callq 0x4f1904
movq %r12, %rsi
movq %rax, %r12
testq %r13, %r13
sete %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
movq %r14, 0x38(%rsp)
testq %r14, %r14
sete %al
testq %r12, %r12
sete %dl
orb %al, %dl
orb %cl, %dl
jne 0x56fc6b
movq $0x0, 0x30(%rsp)
movq %rbx, 0x88(%rsp)
movl $0x1f, %ebx
subl 0x18(%rsp), %ebx
vmovd 0x60(%rsp), %xmm0
vpbroadcastb %xmm0, %ymm0
vmovdqu %ymm0, 0x140(%rsp)
vmovd 0x120(%rsp), %xmm0
vpbroadcastb %xmm0, %ymm0
vmovdqu %ymm0, 0x120(%rsp)
vbroadcastsd 0xbf1cb(%rip), %ymm0 # 0x62e618
vmovups %ymm0, 0x60(%rsp)
movq %r13, %rdi
movq %rsi, %r14
callq 0x4f190d
movq %r12, %rdi
vmovups 0x60(%rsp), %ymm0
movq %r14, %rsi
callq 0x4f190d
vmovdqu 0x120(%rsp), %ymm8
vmovdqu 0x140(%rsp), %ymm7
leal -0x1(%r14), %ecx
movl 0x48(%rsp), %edi
movb $0x7e, %al
subb 0x8(%rsp), %al
movsbl %al, %eax
movl %eax, 0x8(%rsp)
movl 0x40(%rsp), %eax
movq %rax, 0x60(%rsp)
movq %r14, %r8
shlq $0x5, %r8
movb $-0x80, %al
movl %eax, 0x4(%rsp)
vpbroadcastb 0xc03a3(%rip), %ymm0 # 0x62f858
shlq $0x5, %rcx
movl $0x80, %r9d
movq %r14, 0x58(%rsp)
movl %r14d, %eax
shlq $0x5, %rdi
xorl %r10d, %r10d
vmovdqa %ymm0, %ymm2
vmovdqa %ymm0, %ymm1
movq %r15, %rdx
movq %r13, %r14
vmovdqa (%r13,%rcx), %ymm3
vinserti128 $0x1, %xmm3, %ymm0, %ymm4
vpalignr $0xf, %ymm4, %ymm3, %ymm3 # ymm3 = ymm4[15],ymm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm4[31],ymm3[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
vpinsrb $0x0, %r9d, %xmm3, %xmm4
vpblendd $0xf, %ymm4, %ymm3, %ymm4 # ymm4 = ymm4[0,1,2,3],ymm3[4,5,6,7]
movq 0x20(%rsp), %rsi
movq 0x10(%rsi), %rsi
movq 0x28(%rsp), %r11
movzbl (%r11,%r10), %r11d
movslq (%rsi,%r11,4), %r11
imulq %rax, %r11
shlq $0x5, %r11
addq 0x50(%rsp), %r11
leal -0x2(%r10), %r15d
cmpl %r15d, 0x30(%rsp)
movq %rbp, %r13
cmoveq 0x38(%rsp), %r13
xorl %esi, %esi
vmovdqa %ymm0, %ymm3
vpaddsb (%r11,%rsi), %ymm4, %ymm4
vmovdqa (%r12,%rsi), %ymm5
vpmaxsb %ymm3, %ymm5, %ymm6
vpmaxsb %ymm6, %ymm4, %ymm4
vmovdqa %ymm4, (%r13,%rsi)
vpmaxsb %ymm1, %ymm4, %ymm1
vpsubsb %ymm7, %ymm4, %ymm4
vpsubsb %ymm8, %ymm5, %ymm5
vpmaxsb %ymm4, %ymm5, %ymm5
vmovdqa %ymm5, (%r12,%rsi)
vpsubsb %ymm8, %ymm3, %ymm3
vpmaxsb %ymm4, %ymm3, %ymm3
vmovdqa (%r14,%rsi), %ymm4
addq $0x20, %rsi
cmpq %rsi, %r8
jne 0x56f537
cmpl %r15d, 0x30(%rsp)
movq 0x38(%rsp), %rsi
cmoveq %rbp, %rsi
movq %rsi, 0x38(%rsp)
xorl %r11d, %r11d
movq %rdx, %r15
vinserti128 $0x1, %xmm3, %ymm0, %ymm4
vpalignr $0xf, %ymm4, %ymm3, %ymm3 # ymm3 = ymm4[15],ymm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm4[31],ymm3[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
vpinsrb $0x0, %r9d, %xmm3, %xmm4
vpblendd $0xf, %ymm4, %ymm3, %ymm3 # ymm3 = ymm4[0,1,2,3],ymm3[4,5,6,7]
xorl %esi, %esi
vpmaxsb (%r13,%rsi), %ymm3, %ymm4
vmovdqa %ymm4, (%r13,%rsi)
vpmaxsb %ymm1, %ymm4, %ymm1
vpsubsb %ymm7, %ymm4, %ymm4
vpsubsb %ymm8, %ymm3, %ymm3
vpcmpgtb %ymm4, %ymm3, %ymm4
vpmovmskb %ymm4, %ebp
testl %ebp, %ebp
je 0x56f5f3
addq $0x20, %rsi
cmpq %rsi, %r8
jne 0x56f5b9
incl %r11d
cmpl $0x20, %r11d
jne 0x56f59f
vmovdqa (%r13,%rdi), %ymm3
cmpl $0x1e, 0x18(%rsp)
ja 0x56f615
xorl %esi, %esi
vperm2i128 $0x28, %ymm3, %ymm3, %ymm4 # ymm4 = zero,zero,ymm3[0,1]
vpalignr $0xf, %ymm4, %ymm3, %ymm3 # ymm3 = ymm4[15],ymm3[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],ymm4[31],ymm3[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
incl %esi
cmpl %ebx, %esi
jl 0x56f603
vextracti128 $0x1, %ymm3, %xmm3
vpextrb $0xf, %xmm3, %esi
movsbl %sil, %esi
subl $-0x80, %esi
movq 0x10(%r15), %r11
movq (%r11), %r11
movl %esi, (%r11,%r10,4)
vpcmpgtb %ymm2, %ymm1, %ymm3
vpmovmskb %ymm3, %esi
testl %esi, %esi
je 0x56f6a8
vpermq $0x44, %ymm1, %ymm2     # ymm2 = ymm1[0,1,0,1]
vpmaxsb %ymm2, %ymm1, %ymm2
vpslldq $0x8, %ymm2, %ymm3      # ymm3 = zero,zero,zero,zero,zero,zero,zero,zero,ymm2[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm2[16,17,18,19,20,21,22,23]
vpmaxsb %ymm3, %ymm2, %ymm2
vpslldq $0x4, %ymm2, %ymm3      # ymm3 = zero,zero,zero,zero,ymm2[0,1,2,3,4,5,6,7,8,9,10,11],zero,zero,zero,zero,ymm2[16,17,18,19,20,21,22,23,24,25,26,27]
vpmaxsb %ymm3, %ymm2, %ymm2
vpslldq $0x2, %ymm2, %ymm3      # ymm3 = zero,zero,ymm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13],zero,zero,ymm2[16,17,18,19,20,21,22,23,24,25,26,27,28,29]
vpmaxsb %ymm3, %ymm2, %ymm2
vpslldq $0x1, %ymm2, %ymm3      # ymm3 = zero,ymm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],zero,ymm2[16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]
vpmaxsb %ymm3, %ymm2, %ymm2
vextracti128 $0x1, %ymm2, %xmm3
vpextrb $0xf, %xmm3, %esi
movl %esi, 0x4(%rsp)
movsbl %sil, %esi
cmpl %esi, 0x8(%rsp)
jl 0x56f6bb
vpbroadcastb 0xc01c4(%rip), %ymm3 # 0x62f859
vpshufb %ymm3, %ymm2, %ymm2
vpermq $0xaa, %ymm2, %ymm2     # ymm2 = ymm2[2,2,2,2]
movl %r10d, %esi
movq %rsi, 0x30(%rsp)
incq %r10
movq %r14, %rbp
cmpq 0x60(%rsp), %r10
jne 0x56f4d6
jmp 0x56f6c5
orb $0x40, 0xc(%r15)
movq %r10, 0x40(%rsp)
movq 0x58(%rsp), %rcx
leal (,%rcx,4), %esi
leal (,%rcx,8), %r8d
leaq (%rsi,%rsi,2), %rdi
movq %rdi, 0x28(%rsp)
movl %ecx, %edi
shll $0x4, %edi
leaq (%rsi,%rsi,4), %rcx
movq %rcx, 0x50(%rsp)
leaq (%r8,%r8,2), %rcx
movq %rcx, 0x18(%rsp)
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rax, %rcx
movq %rcx, 0x60(%rsp)
imulq $0x7c, %rax, %rcx
movq %rcx, 0x8(%rsp)
imulq $0x78, %rax, %rcx
movq %rcx, 0x48(%rsp)
imulq $0x74, %rax, %rcx
movq %rcx, 0x120(%rsp)
imulq $0x70, %rax, %rcx
movq %rcx, 0x140(%rsp)
imulq $0x6c, %rax, %rcx
movq %rcx, 0x118(%rsp)
imulq $0x68, %rax, %rcx
movq %rcx, 0x110(%rsp)
movq %rax, %rcx
shlq $0x5, %rcx
movq %rax, %r11
shlq $0x6, %r11
imulq $0x64, %rax, %r9
movq %r9, 0x100(%rsp)
movq %rcx, 0x108(%rsp)
leaq (%rcx,%rcx,2), %rcx
movq %rcx, 0xf8(%rsp)
imulq $0x5c, %rax, %rcx
movq %rcx, 0xf0(%rsp)
imulq $0x58, %rax, %rcx
movq %rcx, 0xe8(%rsp)
imulq $0x54, %rax, %rcx
movq %rcx, 0xe0(%rsp)
leaq (%rdi,%rdi,4), %rcx
movq %rcx, 0xd8(%rsp)
imulq $0x4c, %rax, %rcx
movq %rcx, 0xd0(%rsp)
leaq (%r8,%r8,8), %rcx
movq %rcx, 0xc8(%rsp)
leaq (%r11,%rsi), %rcx
movq %rcx, 0xc0(%rsp)
imulq $0x3c, %rax, %rcx
movq %rcx, 0xb8(%rsp)
imulq $0x38, %rax, %rcx
movq %rcx, 0xb0(%rsp)
imulq $0x34, %rax, %rcx
movq %rcx, 0xa8(%rsp)
movq %rdi, 0x20(%rsp)
leaq (%rdi,%rdi,2), %rcx
movq %rcx, 0xa0(%rsp)
imulq $0x2c, %rax, %rcx
movq %rcx, 0x98(%rsp)
movq %r8, %rdi
leaq (%r8,%r8,4), %rcx
movq %rcx, 0x90(%rsp)
movq %rsi, %r8
leaq (%rsi,%rsi,8), %r10
xorl %ecx, %ecx
movl $0x80, %ebx
movq 0x10(%r15), %rbp
movq 0x8(%rbp), %rbp
vmovdqa (%r13,%rcx,8), %xmm1
vmovdqa 0x10(%r13,%rcx,8), %xmm0
vmovd %xmm1, %r15d
movsbl %r15b, %r15d
addl %ebx, %r15d
movl %r15d, (%rbp,%rcx)
addq %rcx, %rbp
vpextrb $0x1, %xmm1, %r15d
movsbl %r15b, %r15d
addl %ebx, %r15d
movl %r15d, (%r8,%rbp)
vpextrb $0x2, %xmm1, %r15d
movsbl %r15b, %r15d
addl %ebx, %r15d
movl %r15d, (%rdi,%rbp)
vpextrb $0x3, %xmm1, %r15d
movsbl %r15b, %r15d
addl %ebx, %r15d
vpextrb $0x4, %xmm1, %esi
movq 0x28(%rsp), %r9
movl %r15d, (%r9,%rbp)
movsbl %sil, %esi
addl %ebx, %esi
movq 0x20(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x5, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x50(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x6, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x18(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x7, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0x8, %xmm1, %r15d
movq 0x60(%rsp), %r9
movl %esi, (%r9,%rbp)
movsbl %r15b, %esi
addl %ebx, %esi
movq 0x108(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x9, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movl %esi, (%r10,%rbp)
vpextrb $0xa, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x90(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xb, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0xc, %xmm1, %r15d
movq 0x98(%rsp), %r9
movl %esi, (%r9,%rbp)
movsbl %r15b, %esi
addl %ebx, %esi
movq 0xa0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xd, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xa8(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xe, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xb0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xf, %xmm1, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xb8(%rsp), %r9
movl %esi, (%r9,%rbp)
vmovd %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0x1, %xmm0, %r15d
movl %esi, (%r11,%rbp)
movsbl %r15b, %esi
addl %ebx, %esi
movq 0xc0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x2, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xc8(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x3, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xd0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x4, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0x5, %xmm0, %r15d
movq 0xd8(%rsp), %r9
movl %esi, (%r9,%rbp)
movsbl %r15b, %esi
addl %ebx, %esi
movq 0xe0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x6, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xe8(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x7, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0xf0(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0x8, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0x9, %xmm0, %r15d
movq 0xf8(%rsp), %r9
movl %esi, (%r9,%rbp)
movsbl %r15b, %esi
addl %ebx, %esi
movq 0x100(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xa, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x110(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xb, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x118(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xc, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
vpextrb $0xd, %xmm0, %r15d
movq 0x140(%rsp), %r9
movl %esi, (%r9,%rbp)
movsbl %r15b, %esi
movq %rdx, %r15
addl %ebx, %esi
movq 0x120(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xe, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x48(%rsp), %r9
movl %esi, (%r9,%rbp)
vpextrb $0xf, %xmm0, %esi
movsbl %sil, %esi
addl %ebx, %esi
movq 0x8(%rsp), %r9
movl %esi, (%r9,%rbp)
addq $0x4, %rcx
decq %rax
jne 0x56f82b
cmpb $0x7f, 0x4(%rsp)
jne 0x56fb25
orb $0x40, 0xc(%r15)
movq %r15, %rdi
vzeroupper
callq 0x20be2e
testl %eax, %eax
movq 0x88(%rsp), %rdx
movq 0x38(%rsp), %rbx
je 0x56fb52
xorl %edi, %edi
movl $0xff, %eax
movq %r14, %rbp
xorl %esi, %esi
jmp 0x56fcb2
movq 0x40(%rsp), %rcx
leal -0x1(%rcx), %eax
addl $-0x2, %ecx
movq 0x30(%rsp), %rdi
cmpl %ecx, %edi
movq %r14, %rbp
cmoveq %rbx, %rbp
movq %rbx, %rsi
cmoveq %r14, %rbx
cmpl %eax, %edi
cmovneq %r13, %rsi
movq %rsi, %rax
cmoveq %r14, %rbp
cmoveq %r13, %rbx
testl %edx, %edx
je 0x56fc83
movl 0x14(%rsp), %esi
movl 0x4(%rsp), %r8d
movq %rax, %r13
je 0x56fc91
vmovd %esi, %xmm0
vpbroadcastd %xmm0, %ymm0
vmovd %r8d, %xmm1
vpbroadcastb %xmm1, %xmm1
vmovd 0x58(%rsp), %xmm2
vpbroadcastd %xmm2, %ymm2
vpmovsxbd 0xbe9b4(%rip), %ymm3 # 0x62e578
xorl %eax, %eax
vpbroadcastd 0xbe4b1(%rip), %ymm4 # 0x62e080
vpbroadcastd 0xbe108(%rip), %ymm5 # 0x62dce0
vmovq (%rbx,%rax), %xmm6
vpcmpeqb %xmm1, %xmm6, %xmm6
vpmovsxbd %xmm6, %ymm6
vpsrld $0x5, %ymm3, %ymm7
vpand %ymm4, %ymm3, %ymm8
vpmulld %ymm2, %ymm8, %ymm8
vpaddd %ymm7, %ymm8, %ymm7
vpminsd %ymm0, %ymm7, %ymm7
vblendvps %ymm6, %ymm7, %ymm0, %ymm0
addq $0x8, %rax
vpaddd %ymm5, %ymm3, %ymm3
cmpq %rax, %rdx
jne 0x56fbd8
vextracti128 $0x1, %ymm0, %xmm1
vpminsd %xmm1, %xmm0, %xmm0
vpshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
vpminsd %xmm1, %xmm0, %xmm0
vpshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
vpminsd %xmm1, %xmm0, %xmm0
vmovd %xmm0, %esi
jmp 0x56fcab
callq 0x1f301b
jmp 0x56fc6b
callq 0x1f2ff5
jmp 0x56fc6b
callq 0x1f2fcf
jmp 0x56fc6b
callq 0x1f2fa9
jmp 0x56fc6b
callq 0x1f2f83
jmp 0x56fc6b
callq 0x1f2f5d
jmp 0x56fc6b
callq 0x1f2f37
jmp 0x56fc6b
callq 0x1f2f11
xorl %r15d, %r15d
movq %r15, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x14(%rsp), %esi
movl 0x4(%rsp), %r8d
movq %rax, %r13
jmp 0x56fcab
xorl %eax, %eax
movl %eax, %ecx
shrl $0x5, %ecx
cmpl %esi, %ecx
cmovgel %esi, %ecx
cmpb %r8b, (%rbx,%rax)
cmovel %ecx, %esi
incq %rax
cmpl %eax, %edx
jne 0x56fc93
movsbl %r8b, %eax
subl $-0x80, %eax
movl %eax, (%r15)
movl %esi, 0x4(%r15)
movl %edi, 0x8(%r15)
movq %r12, %rdi
vzeroupper
callq 0x20a60d
movq %rbx, %rdi
callq 0x20a60d
movq %rbp, %rdi
callq 0x20a60d
movq %r13, %rdi
callq 0x20a60d
jmp 0x56fc6e
nop