// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/sw_trace_scan_avx2_256_64.c
// Function: parasail_sw_trace_scan_profile_avx2_256_64
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;
    __m256i* restrict pvP = NULL;
    __m256i* restrict pvE = NULL;
    __m256i* restrict pvHt = NULL;
    __m256i* restrict pvH = NULL;
    __m256i* restrict pvHMax = NULL;
    __m256i* restrict pvGapper = NULL;
    __m256i vGapO;
    __m256i vGapE;
    int64_t NEG_LIMIT = 0;
    int64_t POS_LIMIT = 0;
    __m256i vZero;
    int64_t score = 0;
    __m256i vNegLimit;
    __m256i vPosLimit;
    __m256i vSaturationCheckMin;
    __m256i vSaturationCheckMax;
    __m256i vMaxH;
    __m256i vMaxHUnit;
    __m256i vNegInfFront;
    __m256i vSegLenXgap;
    parasail_result_t *result = NULL;
    __m256i vTZero;
    __m256i vTIns;
    __m256i vTDel;
    __m256i vTDiag;
    __m256i vTDiagE;
    __m256i vTInsE;
    __m256i vTDiagF;
    __m256i vTDelF;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile64.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 = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    pvP = (__m256i*)profile->profile64.score;
    vGapO = _mm256_set1_epi64x_rpl(open);
    vGapE = _mm256_set1_epi64x_rpl(gap);
    NEG_LIMIT = (-open < matrix->min ? INT64_MIN + open : INT64_MIN - matrix->min) + 1;
    POS_LIMIT = INT64_MAX - matrix->max - 1;
    vZero = _mm256_setzero_si256();
    score = NEG_LIMIT;
    vNegLimit = _mm256_set1_epi64x_rpl(NEG_LIMIT);
    vPosLimit = _mm256_set1_epi64x_rpl(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vMaxHUnit = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm256_insert_epi64_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm256_add_epi64(vNegInfFront,
            _mm256_slli_si256_rpl(_mm256_set1_epi64x_rpl(-segLen*gap), 8));
    vTZero = _mm256_set1_epi64x_rpl(PARASAIL_ZERO);
    vTIns  = _mm256_set1_epi64x_rpl(PARASAIL_INS);
    vTDel  = _mm256_set1_epi64x_rpl(PARASAIL_DEL);
    vTDiag = _mm256_set1_epi64x_rpl(PARASAIL_DIAG);
    vTDiagE = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_E);
    vTInsE = _mm256_set1_epi64x_rpl(PARASAIL_INS_E);
    vTDiagF = _mm256_set1_epi64x_rpl(PARASAIL_DIAG_F);
    vTDelF = _mm256_set1_epi64x_rpl(PARASAIL_DEL_F);


    /* initialize result */
    result = parasail_result_new_trace(segLen, s2Len, 32, sizeof(__m256i));
    if (!result) return NULL;

    /* set known flags */
    result->flag |= PARASAIL_FLAG_SW | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_64 | PARASAIL_FLAG_LANES_4;

    /* initialize heap variables */
    pvE    = parasail_memalign___m256i(32, segLen);
    pvHt   = parasail_memalign___m256i(32, segLen);
    pvH    = parasail_memalign___m256i(32, segLen);
    pvHMax = parasail_memalign___m256i(32, segLen);
    pvGapper = parasail_memalign___m256i(32, 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___m256i(pvH, vZero, segLen);
    parasail_memset___m256i(pvE, vNegLimit, segLen);
    {
        __m256i vGapper = _mm256_sub_epi64(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm256_store_si256(pvGapper+i, vGapper);
            vGapper = _mm256_sub_epi64(vGapper, vGapE);
        }
    }

    /* outer loop over database sequence */
    for (j=0; j<s2Len; ++j) {
        __m256i vE;
        __m256i vE_ext;
        __m256i vE_opn;
        __m256i vHt;
        __m256i vF;
        __m256i vF_ext;
        __m256i vF_opn;
        __m256i vH;
        __m256i vHp;
        __m256i *pvW;
        __m256i vW;
        __m256i case1;
        __m256i case2;
        __m256i case0;
        __m256i vGapper;
        __m256i vT;
        __m256i vET;
        __m256i vFT;

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm256_load_si256(pvH+(segLen-1));
        vHp = _mm256_slli_si256_rpl(vHp, 8);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = vZero;
        vF = vNegLimit;
        for (i=0; i<segLen; ++i) {
            vH = _mm256_load_si256(pvH+i);
            vE = _mm256_load_si256(pvE+i);
            vW = _mm256_load_si256(pvW+i);
            vGapper = _mm256_load_si256(pvGapper+i);
            vE_opn = _mm256_sub_epi64(vH, vGapO);
            vE_ext = _mm256_sub_epi64(vE, vGapE);
            case1 = _mm256_cmpgt_epi64(vE_opn, vE_ext);
            vET = _mm256_blendv_epi8(vTInsE, vTDiagE, case1);
            arr_store(result->trace->trace_table, vET, i, segLen, j);
            vE = _mm256_max_epi64_rpl(vE_opn, vE_ext);
            vGapper = _mm256_add_epi64(vHt, vGapper);
            vF = _mm256_max_epi64_rpl(vF, vGapper);
            vHp = _mm256_add_epi64(vHp, vW);
            vHt = _mm256_max_epi64_rpl(vE, vHp);
            _mm256_store_si256(pvE+i, vE);
            _mm256_store_si256(pvHt+i, vHt);
            _mm256_store_si256(pvH+i, vHp);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm256_slli_si256_rpl(vHt, 8);
        vGapper = _mm256_load_si256(pvGapper);
        vGapper = _mm256_add_epi64(vHt, vGapper);
        vF = _mm256_max_epi64_rpl(vF, vGapper);
        for (i=0; i<segWidth-2; ++i) {
            __m256i vFt = _mm256_slli_si256_rpl(vF, 8);
            vFt = _mm256_add_epi64(vFt, vSegLenXgap);
            vF = _mm256_max_epi64_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm256_slli_si256_rpl(vF, 8);
        vF = _mm256_add_epi64(vF, vNegInfFront);
        vH = _mm256_max_epi64_rpl(vF, vHt);
        vH = _mm256_max_epi64_rpl(vH, vZero);
        for (i=0; i<segLen; ++i) {
            vET = arr_load(result->trace->trace_table, i, segLen, j);
            vHp = _mm256_load_si256(pvH+i);
            vHt = _mm256_load_si256(pvHt+i);
            vF_opn = _mm256_sub_epi64(vH, vGapO);
            vF_ext = _mm256_sub_epi64(vF, vGapE);
            vF = _mm256_max_epi64_rpl(vF_opn, vF_ext);
            case1 = _mm256_cmpgt_epi64(vF_opn, vF_ext);
            vFT = _mm256_blendv_epi8(vTDelF, vTDiagF, case1);
            vH = _mm256_max_epi64_rpl(vHt, vF);
            vH = _mm256_max_epi64_rpl(vH, vZero);
            case0 = _mm256_cmpeq_epi64(vH, vZero);
            case1 = _mm256_cmpeq_epi64(vH, vHp);
            case2 = _mm256_cmpeq_epi64(vH, vF);
            vT = _mm256_blendv_epi8(
                    _mm256_blendv_epi8(vTIns, vTDel, case2),
                    vTDiag, case1);
            vT = _mm256_blendv_epi8(vT, vTZero, case0);
            vT = _mm256_or_si256(vT, vET);
            vT = _mm256_or_si256(vT, vFT);
            arr_store(result->trace->trace_table, vT, i, segLen, j);
            _mm256_store_si256(pvH+i, vH);
            vSaturationCheckMin = _mm256_min_epi64_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMax = _mm256_max_epi64_rpl(vSaturationCheckMax, vH);
            {
                vMaxH = _mm256_max_epi64_rpl(vH, vMaxH);
            }
        } 

        {
            __m256i vCompare = _mm256_cmpgt_epi64(vMaxH, vMaxHUnit);
            if (_mm256_movemask_epi8(vCompare)) {
                score = _mm256_hmax_epi64_rpl(vMaxH);
                vMaxHUnit = _mm256_set1_epi64x_rpl(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m256i)*segLen);
            }
        }
    }

    /* Trace the alignment ending position on read. */
    {
        int64_t *t = (int64_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;
                }
            }
        }
    }

    if (_mm256_movemask_epi8(_mm256_or_si256(
            _mm256_cmplt_epi64_rpl(vSaturationCheckMin, vNegLimit),
            _mm256_cmpgt_epi64(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 $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x57769d
movq 0x60(%rdi), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x5776a4
movq 0x10(%rdi), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x5776ab
movl 0x8(%rdi), %r12d
testl %r12d, %r12d
jle 0x5776b2
cmpq $0x0, 0x50(%rsp)
je 0x5776b9
movl %edx, %ebp
testl %edx, %edx
jle 0x5776c0
testl %ecx, %ecx
js 0x5776c7
movl %r8d, %r14d
testl %r8d, %r8d
js 0x5776ce
leaq 0x3(%r12), %rbx
movq %rbx, %r13
shrq $0x2, %r13
movl %ecx, %edx
negl %ecx
movq 0x48(%rsp), %rdi
movslq 0x20(%rdi), %rax
movq %rdx, 0x18(%rsp)
btsq $0x3f, %rdx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
movq %r15, %rsi
subq %rax, %rsi
cmpl %ecx, %eax
cmovgq %rdx, %rsi
movq %rsi, 0x8(%rsp)
movslq 0x1c(%rdi), %rax
movq %rax, 0x28(%rsp)
movl $0x20, %edx
movl $0x20, %ecx
movl %r13d, %edi
movl %ebp, %esi
callq 0x2097d1
testq %rax, %rax
je 0x5776d3
movq %r12, 0x40(%rsp)
movl %r14d, 0x100(%rsp)
movl %ebp, 0x120(%rsp)
movq %rbx, 0x68(%rsp)
movq %rax, 0x58(%rsp)
orl $0x4880404, 0xc(%rax)   # imm = 0x4880404
movl $0x20, %edi
movq %r13, %rsi
callq 0x4c5e3c
movq %rax, %r14
movl $0x20, %edi
movq %r13, %rsi
callq 0x4c5e3c
movq %rax, %r12
movl $0x20, %edi
movq %r13, %rsi
callq 0x4c5e3c
movq %rax, %rbp
movl $0x20, %edi
movq %r13, %rsi
callq 0x4c5e3c
movq %rax, %rbx
movl $0x20, %edi
movq %r13, %rsi
callq 0x4c5e3c
testq %r14, %r14
sete %dl
testq %r12, %r12
sete %cl
orb %dl, %cl
testq %rbp, %rbp
sete %sil
movq %rbx, 0x38(%rsp)
testq %rbx, %rbx
movq %rax, %rbx
sete %dl
orb %sil, %dl
orb %cl, %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0x5776d3
vmovsd 0x18(%rsp), %xmm0
vbroadcastsd %xmm0, %ymm0
vmovups %ymm0, 0x180(%rsp)
movl 0x100(%rsp), %ecx
movl %ecx, %eax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x160(%rsp)
movq 0x8(%rsp), %rax
incq %rax
subq 0x28(%rsp), %r15
addq $-0x2, %r15
movq %rax, 0x8(%rsp)
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm1
vmovdqu %ymm1, 0xa0(%rsp)
vmovq %r15, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x140(%rsp)
vmovq %xmm1, %xmm2            # xmm2 = xmm1[0],zero
imull %r13d, %ecx
negl %ecx
movslq %ecx, %rax
vmovq %rax, %xmm0
vpbroadcastq %xmm0, %ymm0
vpxor %xmm1, %xmm1, %xmm1
vpblendd $0x3, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[0,1],ymm0[2,3,4,5,6,7]
vmovdqu %ymm2, 0x240(%rsp)
vpaddq %ymm0, %ymm2, %ymm0
vmovdqu %ymm0, 0xc0(%rsp)
vpxor %xmm0, %xmm0, %xmm0
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4c5e45
movq %r14, 0x30(%rsp)
movq %r14, %rdi
vmovdqu 0xa0(%rsp), %ymm0
movq %r13, %rsi
callq 0x4c5e45
vmovdqu 0x160(%rsp), %ymm10
vmovdqu 0x180(%rsp), %ymm9
leal -0x1(%r13), %eax
vpxor %xmm0, %xmm0, %xmm0
vpsubq %ymm9, %ymm0, %ymm0
movq %rax, %rcx
shlq $0x5, %rcx
addq %rbx, %rcx
movl %r13d, %edx
vmovdqa %ymm0, (%rcx)
vpsubq %ymm10, %ymm0, %ymm0
addq $-0x20, %rcx
decl %edx
jg 0x576d42
movl %eax, %eax
shlq $0x5, %rax
movq %rbp, 0x10(%rsp)
addq %rax, %rbp
movq %rbp, 0x88(%rsp)
movq %r13, %rbp
shlq $0x5, %rbp
cmpl $0x1, %r13d
movl %r13d, %r9d
adcl $0x0, %r9d
movl 0x120(%rsp), %ecx
cmpl $0x2, %ecx
movl $0x1, %eax
cmovgel %ecx, %eax
movq %rax, 0x78(%rsp)
shlq $0x5, %r9
xorl %eax, %eax
movq %r13, 0x60(%rsp)
movl %r13d, %ecx
movq %rcx, 0x70(%rsp)
vbroadcastsd 0x845da(%rip), %ymm0 # 0x5fb388
vmovups %ymm0, 0x120(%rsp)
vbroadcastsd 0x845d0(%rip), %ymm0 # 0x5fb390
vmovups %ymm0, 0x100(%rsp)
vbroadcastsd 0x845c6(%rip), %ymm7 # 0x5fb398
vbroadcastsd 0x845c5(%rip), %ymm8 # 0x5fb3a0
vbroadcastsd 0x7f31c(%rip), %ymm0 # 0x5f6100
vmovups %ymm0, 0x1e0(%rsp)
vbroadcastsd 0x82b8a(%rip), %ymm0 # 0x5f9980
vmovups %ymm0, 0x1c0(%rsp)
xorl %r15d, %r15d
movl $0x0, 0x24(%rsp)
vmovdqu 0x140(%rsp), %ymm13
vmovdqu 0xa0(%rsp), %ymm0
vmovdqa %ymm0, %ymm12
vmovdqa %ymm0, %ymm15
vmovdqu %ymm0, 0x1a0(%rsp)
movq 0x58(%rsp), %r13
vmovdqu 0xc0(%rsp), %ymm11
movq %rbp, 0x80(%rsp)
movq %r9, 0x28(%rsp)
vmovupd %ymm7, 0x220(%rsp)
vmovupd %ymm8, 0x200(%rsp)
movq %rax, 0x18(%rsp)
vmovdqu %ymm15, 0xe0(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x50(%rsp), %rcx
movq %r15, 0x98(%rsp)
movzbl (%rcx,%r15), %ecx
movslq (%rax,%rcx,4), %rdi
imulq 0x70(%rsp), %rdi
shlq $0x5, %rdi
addq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rax
vmovdqa (%rax), %ymm0
vperm2i128 $0x8, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0x8, %ymm1, %ymm0, %ymm0 # ymm0 = ymm1[8,9,10,11,12,13,14,15],ymm0[0,1,2,3,4,5,6,7],ymm1[24,25,26,27,28,29,30,31],ymm0[16,17,18,19,20,21,22,23]
xorl %r8d, %r8d
vmovdqu 0xa0(%rsp), %ymm2
vpxor %xmm3, %xmm3, %xmm3
movq 0x30(%rsp), %r15
movq 0x10(%rsp), %rbp
vpaddq (%rdi,%r8), %ymm0, %ymm1
vmovdqa (%rbp,%r8), %ymm0
vmovdqa (%r15,%r8), %ymm4
vpsubq %ymm9, %ymm0, %ymm5
vpsubq %ymm10, %ymm4, %ymm4
vpcmpgtq %ymm4, %ymm5, %ymm6
vmovupd 0x100(%rsp), %ymm7
vblendvpd %ymm6, 0x120(%rsp), %ymm7, %ymm6
movq 0x10(%r13), %rax
movq (%rax), %rax
vpaddq (%rbx,%r8), %ymm3, %ymm3
addq 0x18(%rsp), %rax
vmovapd %ymm6, (%r8,%rax)
vmovq %xmm5, %rax
vmovq %xmm4, %rsi
cmpq %rsi, %rax
cmovgq %rax, %rsi
vpextrq $0x1, %xmm5, %rax
vpextrq $0x1, %xmm4, %rcx
cmpq %rcx, %rax
cmovgq %rax, %rcx
vextracti128 $0x1, %ymm5, %xmm5
vmovq %xmm5, %rax
vextracti128 $0x1, %ymm4, %xmm4
vmovq %xmm4, %rdx
cmpq %rdx, %rax
cmovgq %rax, %rdx
vpextrq $0x1, %xmm5, %rax
movq %rbx, %r14
vpextrq $0x1, %xmm4, %rbx
cmpq %rbx, %rax
cmovgq %rax, %rbx
vmovq %xmm2, %rax
vmovq %xmm3, %r9
cmpq %r9, %rax
cmovgq %rax, %r9
vpextrq $0x1, %xmm2, %rax
vpextrq $0x1, %xmm3, %r10
cmpq %r10, %rax
cmovgq %rax, %r10
vextracti128 $0x1, %ymm2, %xmm2
vmovq %xmm2, %rax
vextracti128 $0x1, %ymm3, %xmm3
vmovq %xmm3, %r11
cmpq %r11, %rax
cmovgq %rax, %r11
vpextrq $0x1, %xmm2, %r13
vmovq %rsi, %xmm2
vpextrq $0x1, %xmm3, %rax
cmpq %rax, %r13
cmovgq %r13, %rax
vmovq %xmm1, %r13
cmpq %r13, %rsi
cmovleq %r13, %rsi
vpextrq $0x1, %xmm1, %r13
vmovq %rcx, %xmm3
cmpq %r13, %rcx
cmovleq %r13, %rcx
vmovq %rdx, %xmm4
vextracti128 $0x1, %ymm1, %xmm5
vmovq %xmm5, %r13
cmpq %r13, %rdx
cmovleq %r13, %rdx
vpextrq $0x1, %xmm5, %r13
vmovq %rbx, %xmm5
cmpq %r13, %rbx
cmovleq %r13, %rbx
movq 0x58(%rsp), %r13
vmovq %rbx, %xmm6
movq %r14, %rbx
vpunpcklqdq %xmm3, %xmm2, %xmm7 # xmm7 = xmm2[0],xmm3[0]
vpunpcklqdq %xmm5, %xmm4, %xmm8 # xmm8 = xmm4[0],xmm5[0]
vmovq %rax, %xmm2
vmovq %r11, %xmm3
vpunpcklqdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm2[0]
vmovq %r10, %xmm3
vmovq %r9, %xmm4
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
vinserti128 $0x1, %xmm2, %ymm3, %ymm2
vmovq %rcx, %xmm4
vmovq %rsi, %xmm3
vpunpcklqdq %xmm4, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm4[0]
vmovq %rdx, %xmm5
vinserti128 $0x1, %xmm5, %ymm3, %ymm5
vpbroadcastq %xmm6, %ymm3
vpblendd $0xc0, %ymm3, %ymm5, %ymm3 # ymm3 = ymm5[0,1,2,3,4,5],ymm3[6,7]
vmovdqa %xmm8, 0x10(%r15,%r8)
vmovdqa %xmm7, (%r15,%r8)
vmovdqa %ymm3, (%r12,%r8)
vmovdqa %ymm1, (%rbp,%r8)
addq $0x20, %r8
cmpq %r8, 0x28(%rsp)
jne 0x576ecb
vpbroadcastq %xmm4, %xmm0
vpxor %xmm6, %xmm6, %xmm6
vinserti128 $0x1, %xmm0, %ymm6, %ymm0
vpalignr $0x8, %ymm0, %ymm5, %ymm0 # ymm0 = ymm0[8,9,10,11,12,13,14,15],ymm5[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm5[16,17,18,19,20,21,22,23]
vpaddq (%rbx), %ymm0, %ymm0
vmovq %xmm0, %rdi
cmpq %rdi, %r9
cmovgq %r9, %rdi
vpextrq $0x1, %xmm0, %r8
cmpq %r8, %r10
cmovgq %r10, %r8
vextracti128 $0x1, %ymm0, %xmm0
vmovq %xmm0, %r9
cmpq %r9, %r11
cmovgq %r11, %r9
vpextrq $0x1, %xmm0, %r10
cmpq %r10, %rax
cmovgq %rax, %r10
vmovq %r10, %xmm0
vmovq %r9, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vmovq %r8, %xmm1
vmovq %rdi, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vinserti128 $0x1, %xmm0, %ymm1, %ymm0
movl $0x1, %eax
vperm2i128 $0x8, %ymm0, %ymm0, %ymm1 # ymm1 = zero,zero,ymm0[0,1]
vpalignr $0x8, %ymm1, %ymm0, %ymm1 # ymm1 = ymm1[8,9,10,11,12,13,14,15],ymm0[0,1,2,3,4,5,6,7],ymm1[24,25,26,27,28,29,30,31],ymm0[16,17,18,19,20,21,22,23]
vpaddq %ymm1, %ymm11, %ymm1
vmovq %xmm0, %rdi
vmovq %xmm1, %r8
cmpq %r8, %rdi
cmovgq %rdi, %r8
vpextrq $0x1, %xmm0, %rdi
vpextrq $0x1, %xmm1, %r9
cmpq %r9, %rdi
cmovgq %rdi, %r9
vextracti128 $0x1, %ymm0, %xmm0
vmovq %xmm0, %rdi
vextracti128 $0x1, %ymm1, %xmm2
vmovq %xmm2, %r10
cmpq %r10, %rdi
cmovgq %rdi, %r10
vmovq %r9, %xmm1
vmovq %r8, %xmm3
vpunpcklqdq %xmm1, %xmm3, %xmm3 # xmm3 = xmm3[0],xmm1[0]
vmovq %r10, %xmm4
vpextrq $0x1, %xmm0, %rdi
vpextrq $0x1, %xmm2, %r8
vinserti128 $0x1, %xmm4, %ymm3, %ymm2
cmpq %r8, %rdi
cmovgq %rdi, %r8
vmovq %r8, %xmm0
vpbroadcastq %xmm0, %ymm0
vpblendd $0xc0, %ymm0, %ymm2, %ymm0 # ymm0 = ymm2[0,1,2,3,4,5],ymm0[6,7]
decl %eax
je 0x57710c
vpbroadcastq %xmm1, %xmm0
vinserti128 $0x1, %xmm0, %ymm6, %ymm0
vpalignr $0x8, %ymm0, %ymm2, %ymm0 # ymm0 = ymm0[8,9,10,11,12,13,14,15],ymm2[0,1,2,3,4,5,6,7],ymm0[24,25,26,27,28,29,30,31],ymm2[16,17,18,19,20,21,22,23]
vpaddq 0x240(%rsp), %ymm0, %ymm0
vmovq %xmm0, %rax
movq %rax, %rdi
sarq $0x3f, %rdi
vpextrq $0x1, %xmm0, %r8
andnq %rax, %rdi, %rax
cmpq %rsi, %r8
cmovgq %r8, %rsi
movq %rsi, %rdi
sarq $0x3f, %rdi
andnq %rsi, %rdi, %rsi
vextracti128 $0x1, %ymm0, %xmm1
vmovq %xmm1, %rdi
cmpq %rcx, %rdi
cmovgq %rdi, %rcx
movq %rcx, %rdi
sarq $0x3f, %rdi
andnq %rcx, %rdi, %rcx
vpextrq $0x1, %xmm1, %rdi
cmpq %rdx, %rdi
cmovgq %rdi, %rdx
movq %rdx, %rdi
sarq $0x3f, %rdi
andnq %rdx, %rdi, %rdx
vmovq %rdx, %xmm1
vmovq %rcx, %xmm2
vpunpcklqdq %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm1[0]
vmovq %rsi, %xmm2
vmovq %rax, %xmm3
vpunpcklqdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm2[0]
vinserti128 $0x1, %xmm1, %ymm2, %ymm1
xorl %ecx, %ecx
movq 0x10(%rsp), %r15
vmovupd 0x220(%rsp), %ymm7
vmovupd 0x200(%rsp), %ymm8
vpxor %xmm11, %xmm11, %xmm11
vmovdqu 0x1e0(%rsp), %ymm6
vmovupd 0x1c0(%rsp), %ymm14
vmovdqu 0xe0(%rsp), %ymm15
movq 0x10(%r13), %rax
movq (%rax), %r8
addq 0x18(%rsp), %r8
vpsubq %ymm9, %ymm1, %ymm1
vpsubq %ymm10, %ymm0, %ymm2
vmovq %xmm1, %rdx
vmovq %xmm2, %rax
cmpq %rax, %rdx
cmovgq %rdx, %rax
vpextrq $0x1, %xmm1, %rsi
vpextrq $0x1, %xmm2, %rdx
cmpq %rdx, %rsi
cmovgq %rsi, %rdx
vextracti128 $0x1, %ymm1, %xmm0
vmovq %xmm0, %rdi
vextracti128 $0x1, %ymm2, %xmm3
vmovq %xmm3, %rsi
cmpq %rsi, %rdi
cmovgq %rdi, %rsi
vpextrq $0x1, %xmm0, %rdi
vpextrq $0x1, %xmm3, %r9
cmpq %r9, %rdi
cmovgq %rdi, %r9
vmovq %r9, %xmm0
vmovq %rsi, %xmm3
vpunpcklqdq %xmm0, %xmm3, %xmm0 # xmm0 = xmm3[0],xmm0[0]
vmovq %rdx, %xmm3
vmovq %rax, %xmm4
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
vinserti128 $0x1, %xmm0, %ymm3, %ymm0
vpcmpgtq %ymm2, %ymm1, %ymm1
vblendvpd %ymm1, %ymm7, %ymm8, %ymm2
movq (%r12,%rcx), %rdi
movq 0x8(%r12,%rcx), %r10
cmpq %rax, %rdi
cmovgq %rdi, %rax
cmpq %rdx, %r10
cmovgq %r10, %rdx
movq 0x10(%r12,%rcx), %rdi
cmpq %rsi, %rdi
cmovgq %rdi, %rsi
movq 0x18(%r12,%rcx), %rdi
cmpq %r9, %rdi
cmovgq %rdi, %r9
movq %rax, %rdi
sarq $0x3f, %rdi
andnq %rax, %rdi, %rdi
movq %rdx, %rax
sarq $0x3f, %rax
andnq %rdx, %rax, %rax
movq %rsi, %rdx
sarq $0x3f, %rdx
andnq %rsi, %rdx, %rsi
movq %r9, %rdx
sarq $0x3f, %rdx
andnq %r9, %rdx, %rdx
vmovq %rdx, %xmm1
vmovq %rsi, %xmm3
vpunpcklqdq %xmm1, %xmm3, %xmm1 # xmm1 = xmm3[0],xmm1[0]
vmovq %rax, %xmm3
vmovq %rdi, %xmm4
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
vinserti128 $0x1, %xmm1, %ymm3, %ymm1
vpcmpeqq (%r15,%rcx), %ymm1, %ymm3
vpcmpeqq %ymm0, %ymm1, %ymm4
vpsubq %ymm4, %ymm6, %ymm4
vblendvpd %ymm3, %ymm14, %ymm4, %ymm3
vpcmpgtq %ymm11, %ymm1, %ymm4
vorpd (%rcx,%r8), %ymm2, %ymm2
vpand %ymm3, %ymm4, %ymm3
vorpd %ymm3, %ymm2, %ymm2
vmovapd %ymm2, (%rcx,%r8)
vmovdqa %ymm1, (%r15,%rcx)
vmovq %xmm13, %r8
cmpq %rdi, %r8
cmovgeq %rdi, %r8
vpextrq $0x1, %xmm13, %r9
cmpq %rax, %r9
cmovgeq %rax, %r9
vextracti128 $0x1, %ymm13, %xmm2
vmovq %xmm2, %r10
cmpq %rsi, %r10
cmovgeq %rsi, %r10
vpextrq $0x1, %xmm2, %r11
cmpq %rdx, %r11
cmovgeq %rdx, %r11
vmovq %r11, %xmm2
vmovq %r10, %xmm3
vpunpcklqdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm2[0]
vmovq %xmm12, %r10
cmpq %rdi, %r10
cmovleq %rdi, %r10
vpextrq $0x1, %xmm12, %r11
vmovq %r9, %xmm3
cmpq %rax, %r11
cmovleq %rax, %r11
vmovq %r8, %xmm4
vextracti128 $0x1, %ymm12, %xmm5
vmovq %xmm5, %r8
cmpq %rsi, %r8
cmovleq %rsi, %r8
vpextrq $0x1, %xmm5, %r9
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
cmpq %rdx, %r9
cmovleq %rdx, %r9
vinserti128 $0x1, %xmm2, %ymm3, %ymm13
vmovq %r9, %xmm2
vmovq %r8, %xmm3
vpunpcklqdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm2[0]
vmovq %r11, %xmm3
movq 0x28(%rsp), %r9
vmovq %r10, %xmm4
vmovq %xmm15, %r8
cmpq %r8, %rdi
cmovgq %rdi, %r8
vpextrq $0x1, %xmm15, %rbx
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
cmpq %rbx, %rax
cmovgq %rax, %rbx
vinserti128 $0x1, %xmm2, %ymm3, %ymm12
vextracti128 $0x1, %ymm15, %xmm2
vmovq %xmm2, %rax
cmpq %rax, %rsi
cmovgq %rsi, %rax
vpextrq $0x1, %xmm2, %rsi
cmpq %rsi, %rdx
cmovgq %rdx, %rsi
vmovq %rsi, %xmm2
vmovq %rax, %xmm3
vpunpcklqdq %xmm2, %xmm3, %xmm2 # xmm2 = xmm3[0],xmm2[0]
vmovq %rbx, %xmm3
vmovq %r8, %xmm4
vpunpcklqdq %xmm3, %xmm4, %xmm3 # xmm3 = xmm4[0],xmm3[0]
vinserti128 $0x1, %xmm2, %ymm3, %ymm15
addq $0x20, %rcx
cmpq %rcx, %r9
jne 0x577277
vpcmpgtq 0x1a0(%rsp), %ymm15, %ymm0
vtestpd %ymm0, %ymm0
movq 0x98(%rsp), %r15
vmovdqu 0xc0(%rsp), %ymm11
movq 0x80(%rsp), %rbp
je 0x5775a9
cmpq %r8, %rax
cmovgq %rax, %r8
cmpq %rbx, %rsi
cmovgq %rsi, %rbx
cmpq %r8, %rbx
cmovleq %r8, %rbx
vmovq %rbx, %xmm0
vpbroadcastq %xmm0, %ymm0
vmovdqu %ymm0, 0x1a0(%rsp)
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
vmovdqu %ymm12, 0x280(%rsp)
vmovdqu %ymm13, 0x260(%rsp)
vmovdqu %ymm15, 0xe0(%rsp)
vzeroupper
callq 0x19e0c0
vmovdqu 0xe0(%rsp), %ymm15
vmovdqu 0x260(%rsp), %ymm13
vmovdqu 0x280(%rsp), %ymm12
vmovdqu 0xc0(%rsp), %ymm11
vmovdqu 0x160(%rsp), %ymm10
vmovdqu 0x180(%rsp), %ymm9
movq %rbx, 0x8(%rsp)
movl %r15d, 0x24(%rsp)
incq %r15
movq 0x18(%rsp), %rax
addq %rbp, %rax
cmpq 0x78(%rsp), %r15
movq %r14, %rbx
jne 0x576e5a
testl $0x7ffffffc, 0x68(%rsp) # imm = 0x7FFFFFFC
je 0x57761b
movq 0x60(%rsp), %r8
movl %r8d, %eax
andl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
shll $0x2, %eax
xorl %ecx, %ecx
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r14
movq 0x10(%rsp), %r15
movq 0x38(%rsp), %rdx
cmpq %r9, (%rdx,%rcx,8)
jne 0x577612
movl %ecx, %edx
shrl $0x2, %edx
movl %ecx, %esi
andl $0x3, %esi
imull %r8d, %esi
addl %edx, %esi
cmpl %edi, %esi
cmovll %esi, %edi
incq %rcx
cmpl %ecx, %eax
jne 0x5775f2
jmp 0x57762f
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %r9
movq 0x30(%rsp), %r14
movq 0x10(%rsp), %r15
vmovdqu 0xa0(%rsp), %ymm0
vpcmpgtq %ymm13, %ymm0, %ymm0
vpcmpgtq 0x140(%rsp), %ymm12, %ymm1
vpor %ymm1, %ymm0, %ymm0
vtestpd %ymm0, %ymm0
movl 0x24(%rsp), %eax
je 0x577662
orb $0x40, 0xc(%r13)
xorl %r9d, %r9d
xorl %eax, %eax
xorl %edi, %edi
movl %r9d, (%r13)
movl %edi, 0x4(%r13)
movl %eax, 0x8(%r13)
movq %rbx, %rdi
vzeroupper
callq 0x2094b5
movq 0x38(%rsp), %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
movq %r12, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
jmp 0x5776d6
callq 0x1f7d19
jmp 0x5776d3
callq 0x1f7cf3
jmp 0x5776d3
callq 0x1f7ccd
jmp 0x5776d3
callq 0x1f7ca7
jmp 0x5776d3
callq 0x1f7c81
jmp 0x5776d3
callq 0x1f7c5b
jmp 0x5776d3
callq 0x1f7c35
jmp 0x5776d3
callq 0x1f7c0f
xorl %r13d, %r13d
movq %r13, %rax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop