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

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile16.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 = 8; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
#ifdef PARASAIL_ROWCOL
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
#endif
    pvP = (__m128i*)profile->profile16.score;
    vGapO = _mm_set1_epi16(open);
    vGapE = _mm_set1_epi16(gap);
    NEG_LIMIT = (-open < matrix->min ? INT16_MIN + open : INT16_MIN - matrix->min) + 1;
    POS_LIMIT = INT16_MAX - matrix->max - 1;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi16(NEG_LIMIT);
    vPosLimit = _mm_set1_epi16(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vMaxH = vNegLimit;
    vMaxHUnit = vNegLimit;
    vNegInfFront = vZero;
    vNegInfFront = _mm_insert_epi16(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_adds_epi16(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi16(-segLen*gap), 2));

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

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

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

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

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

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

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

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

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

        {
            __m128i vCompare = _mm_cmpgt_epi16(vMaxH, vMaxHUnit);
            if (_mm_movemask_epi8(vCompare)) {
                score = _mm_hmax_epi16_rpl(vMaxH);
                vMaxHUnit = _mm_set1_epi16(score);
                end_ref = j;
                (void)memcpy(pvHMax, pvH, sizeof(__m128i)*segLen);
            }
        }

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

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

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

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi16(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi16(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 $0x128, %rsp            # imm = 0x128
movq %rsi, 0x18(%rsp)
testq %rdi, %rdi
je 0x44dbea
movq 0x30(%rdi), %rax
movq %rax, 0xc8(%rsp)
testq %rax, %rax
je 0x44dbf4
movq 0x10(%rdi), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x44dbfe
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x44dc08
cmpq $0x0, 0x18(%rsp)
je 0x44dc12
movl %edx, %ebp
testl %edx, %edx
jle 0x44dd79
movl %ecx, %r12d
testl %ecx, %ecx
js 0x44dd80
movl %r8d, %r15d
testl %r8d, %r8d
js 0x44dd87
leaq 0x7(%rax), %rdi
movq %rdi, %r13
shrq $0x3, %r13
movq %rax, 0x68(%rsp)
decl %eax
xorl %edx, %edx
divl %r13d
movl %eax, 0x14(%rsp)
movl %edx, %r14d
movl %r12d, %eax
negl %eax
movq 0x78(%rsp), %rdx
movl 0x20(%rdx), %ecx
movl %ecx, %ebx
negl %ebx
cmpl %eax, %ecx
cmovgl %r12d, %ebx
movw $0x7ffe, %ax            # imm = 0x7FFE
subw 0x1c(%rdx), %ax
movl %eax, 0x50(%rsp)
andl $0x7ffffff8, %edi       # imm = 0x7FFFFFF8
movq %rdi, 0xb0(%rsp)
movl %ebp, %esi
callq 0x20ac53
testq %rax, %rax
je 0x44dd8c
movl %r12d, 0x90(%rsp)
movl %r15d, 0xa0(%rsp)
movl %r14d, 0x40(%rsp)
movl %ebp, 0x20(%rsp)
movq %rax, 0x8(%rsp)
orl $0x8240404, 0xc(%rax)   # imm = 0x8240404
movl $0x10, %edi
movq %r13, %rsi
callq 0x2f600c
movq %rax, %r14
movl $0x10, %edi
movq %r13, %rsi
callq 0x2f600c
movq %rax, %r15
movl $0x10, %edi
movq %r13, %rsi
callq 0x2f600c
movq %rax, %r12
movl $0x10, %edi
movq %r13, %rsi
callq 0x2f600c
movq %r13, %rsi
movq %rax, %r13
movl $0x10, %edi
movq %rsi, 0x30(%rsp)
callq 0x2f600c
movq %rax, %rbp
testq %r14, %r14
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
testq %r12, %r12
sete %al
movq %r13, 0x38(%rsp)
testq %r13, %r13
sete %dl
orb %al, %dl
orb %cl, %dl
testq %rbp, %rbp
sete %al
orb %dl, %al
jne 0x44dd8c
movl %ebx, %eax
movl $0x7, %ebx
subl 0x14(%rsp), %ebx
movd 0x90(%rsp), %xmm0
pshuflw $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa %xmm0, 0x100(%rsp)
movl 0xa0(%rsp), %ecx
movd %ecx, %xmm0
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, 0xf0(%rsp)
addl $0xffff8001, %eax       # imm = 0xFFFF8001
movd %eax, %xmm0
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, 0x80(%rsp)
movd 0x50(%rsp), %xmm0
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, 0xd0(%rsp)
movl %eax, 0x4(%rsp)
movzwl %ax, %eax
movd %eax, %xmm0
movq 0x30(%rsp), %r13
imull %r13d, %ecx
negl %ecx
movd %ecx, %xmm1
pshufb 0x1de5b5(%rip), %xmm1   # 0x62bda0
movdqa %xmm0, 0x110(%rsp)
paddsw %xmm0, %xmm1
movdqa %xmm1, 0xe0(%rsp)
pxor %xmm0, %xmm0
movq %r12, %rdi
movq %r13, %rsi
callq 0x2f6015
movq %r14, %rdi
movdqa 0x80(%rsp), %xmm0
movq %r13, %rsi
callq 0x2f6015
pxor %xmm0, %xmm0
movdqa 0xf0(%rsp), %xmm6
movdqa 0x100(%rsp), %xmm5
psubsw %xmm5, %xmm0
leal -0x1(%r13), %ecx
shlq $0x4, %rcx
movq %rbp, %rax
movq %rcx, 0x70(%rsp)
addq %rcx, %rax
movl %r13d, %ecx
movdqa %xmm0, (%rax)
psubsw %xmm6, %xmm0
addq $-0x10, %rax
decl %ecx
jg 0x44d854
addq %r12, 0x70(%rsp)
movq %r13, %rax
shlq $0x4, %r13
movl 0x40(%rsp), %ecx
shlq $0x4, %rcx
addq %r12, %rcx
movq %rcx, 0xc0(%rsp)
movl 0x20(%rsp), %ecx
movq %rcx, 0xb8(%rsp)
xorl %edi, %edi
movl %eax, %r10d
pxor %xmm8, %xmm8
xorl %esi, %esi
movdqa 0x80(%rsp), %xmm0
movdqa %xmm0, %xmm12
movdqa %xmm0, %xmm11
movdqa %xmm0, %xmm9
movdqa 0xd0(%rsp), %xmm10
movq 0x8(%rsp), %rax
movdqa 0xe0(%rsp), %xmm7
movl %ebx, 0x4c(%rsp)
movq 0x70(%rsp), %rcx
movdqa (%rcx), %xmm2
pslldq $0x2, %xmm2             # xmm2 = zero,zero,xmm2[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movq 0x78(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x18(%rsp), %rdx
movzbl (%rdx,%rdi), %edx
movslq (%rcx,%rdx,4), %rcx
imulq %r10, %rcx
shlq $0x4, %rcx
addq 0xc8(%rsp), %rcx
xorl %edx, %edx
movdqa 0x80(%rsp), %xmm0
pxor %xmm1, %xmm1
movdqa (%r12,%rdx), %xmm3
movdqa (%r14,%rdx), %xmm4
paddsw (%rcx,%rdx), %xmm2
paddsw (%rbp,%rdx), %xmm1
psubsw %xmm6, %xmm4
pmaxsw %xmm1, %xmm0
movdqa %xmm2, %xmm1
movdqa %xmm3, %xmm2
psubsw %xmm5, %xmm3
pmaxsw %xmm4, %xmm3
pmaxsw %xmm3, %xmm1
movdqa %xmm3, (%r14,%rdx)
movdqa %xmm1, (%r15,%rdx)
addq $0x10, %rdx
cmpq %rdx, %r13
jne 0x44d912
pslldq $0x2, %xmm1             # xmm1 = zero,zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa (%rbp), %xmm2
paddsw %xmm1, %xmm2
pmaxsw %xmm2, %xmm0
movl $0x6, %ecx
movdqa %xmm0, %xmm2
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
paddsw %xmm7, %xmm0
pmaxsw %xmm2, %xmm0
decl %ecx
jne 0x44d971
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
paddsw 0x110(%rsp), %xmm0
pmaxsw %xmm8, %xmm1
pmaxsw %xmm0, %xmm1
xorl %ecx, %ecx
psubsw %xmm6, %xmm0
psubsw %xmm5, %xmm1
pmaxsw %xmm1, %xmm0
movdqa (%r15,%rcx), %xmm1
pmaxsw %xmm0, %xmm1
pmaxsw %xmm8, %xmm1
movdqa %xmm1, (%r12,%rcx)
pminsw %xmm1, %xmm10
pmaxsw %xmm1, %xmm9
pmaxsw %xmm1, %xmm11
addq $0x10, %rcx
cmpq %rcx, %r13
jne 0x44d99f
movdqa %xmm11, %xmm0
pcmpgtw %xmm12, %xmm0
pmovmskb %xmm0, %ecx
testl %ecx, %ecx
je 0x44dacf
movdqa %xmm11, %xmm0
psrldq $0x8, %xmm0             # xmm0 = xmm0[8,9,10,11,12,13,14,15],zero,zero,zero,zero,zero,zero,zero,zero
pmaxsw %xmm11, %xmm0
movdqa %xmm0, %xmm1
psrldq $0x4, %xmm1             # xmm1 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],zero,zero,zero,zero
pmaxsw %xmm0, %xmm1
movdqa %xmm11, %xmm0
pxor 0x1dcb29(%rip), %xmm0   # 0x62a540
phminposuw %xmm0, %xmm0
movd %xmm0, %eax
xorl $0x7fff, %eax           # imm = 0x7FFF
movl %eax, 0x4(%rsp)
pshuflw $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0,4,5,6,7]
psrlq $0x10, %xmm1
pshuflw $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0,4,5,6,7]
pmaxsw %xmm0, %xmm1
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x90(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r10, %rbx
movdqa %xmm9, 0x50(%rsp)
movdqa %xmm10, 0x20(%rsp)
movdqa %xmm11, 0xa0(%rsp)
callq 0x19e0c0
movdqa 0x90(%rsp), %xmm12
movdqa 0xa0(%rsp), %xmm11
pxor %xmm8, %xmm8
movq 0x40(%rsp), %rdi
movdqa 0xe0(%rsp), %xmm7
movdqa 0xf0(%rsp), %xmm6
movdqa 0x100(%rsp), %xmm5
movdqa 0x20(%rsp), %xmm10
movdqa 0x50(%rsp), %xmm9
movq %rbx, %r10
movl 0x4c(%rsp), %ebx
movq 0x8(%rsp), %rax
movl %edi, %esi
movq 0xc0(%rsp), %rcx
movdqa (%rcx), %xmm0
cmpl $0x6, 0x14(%rsp)
jg 0x44daef
xorl %ecx, %ecx
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
incl %ecx
cmpl %ebx, %ecx
jl 0x44dae4
pextrw $0x7, %xmm0, %ecx
movswl %cx, %ecx
movq 0x10(%rax), %rdx
movq (%rdx), %rdx
movl %ecx, (%rdx,%rdi,4)
incq %rdi
cmpq 0xb8(%rsp), %rdi
jne 0x44d8cf
movq 0xb0(%rsp), %rdx
testl %edx, %edx
je 0x44dbd8
movl 0x4(%rsp), %eax
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %r8
movq 0x68(%rsp), %r9
je 0x44dc1c
movl %esi, 0x20(%rsp)
movd %r9d, %xmm0
pshufd $0x0, %xmm0, %xmm1      # xmm1 = xmm0[0,0,0,0]
movd %eax, %xmm0
pshuflw $0x0, %xmm0, %xmm2      # xmm2 = xmm0[0,0,0,0,4,5,6,7]
movd %r8d, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
pmovsxbd 0x1de223(%rip), %xmm4   # 0x62bd88
xorl %ecx, %ecx
pmovsxbd 0x1de298(%rip), %xmm5   # 0x62be08
pmovsxbd 0x1de217(%rip), %xmm6   # 0x62bd90
movq (%rdi,%rcx,2), %xmm0
pcmpeqw %xmm2, %xmm0
pmovsxwd %xmm0, %xmm0
movdqa %xmm4, %xmm7
psrld $0x3, %xmm7
movdqa %xmm4, %xmm8
pand %xmm5, %xmm8
pmulld %xmm3, %xmm8
paddd %xmm7, %xmm8
pminsd %xmm1, %xmm8
blendvps %xmm0, %xmm8, %xmm1
addq $0x4, %rcx
paddd %xmm6, %xmm4
cmpq %rcx, %rdx
jne 0x44db79
pshufd $0xee, %xmm1, %xmm0     # xmm0 = xmm1[2,3,2,3]
pminsd %xmm1, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
pminsd %xmm0, %xmm1
movd %xmm1, %ecx
jmp 0x44dc4c
movl %esi, 0x20(%rsp)
movq 0x68(%rsp), %rax
movl %eax, %ecx
movq 0x30(%rsp), %r8
jmp 0x44dc4c
callq 0x1d2571
jmp 0x44dd8c
callq 0x1d254b
jmp 0x44dd8c
callq 0x1d2525
jmp 0x44dd8c
callq 0x1d24ff
jmp 0x44dd8c
callq 0x1d24d9
jmp 0x44dd8c
movl %esi, 0x20(%rsp)
movl %r8d, %edx
andl $0xfffffff, %edx        # imm = 0xFFFFFFF
shll $0x3, %edx
xorl %esi, %esi
movl %esi, %ecx
shrl $0x3, %ecx
cmpl %r9d, %ecx
cmovgel %r9d, %ecx
cmpw %ax, (%rdi,%rsi,2)
cmovnel %r9d, %ecx
incq %rsi
movl %ecx, %r9d
cmpl %esi, %edx
jne 0x44dc2e
leal (,%r8,4), %eax
leaq (%r10,%r10,8), %rsi
leaq (%rsi,%rsi,2), %rdx
addq %r10, %rdx
movq %rdx, 0x50(%rsp)
leaq (,%r10,8), %rdi
leaq (%rdi,%rdi,2), %rdx
movq %rdx, 0x18(%rsp)
leaq (%rax,%rax,4), %r9
movq %r10, %r8
shlq $0x4, %r8
movq %rax, %rdx
leaq (%rax,%rax,2), %r11
xorl %ebx, %ebx
movdqa (%r12,%rbx,4), %xmm0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %r13
movq 0x8(%r13), %r13
movd %xmm0, %eax
cwtl
movl %eax, (%r13,%rbx)
addq %rbx, %r13
pextrw $0x1, %xmm0, %eax
cwtl
movl %eax, (%rdx,%r13)
pextrw $0x2, %xmm0, %eax
cwtl
movl %eax, (%rdi,%r13)
pextrw $0x3, %xmm0, %eax
cwtl
movl %eax, (%r11,%r13)
pextrw $0x4, %xmm0, %eax
cwtl
movl %eax, (%r8,%r13)
pextrw $0x5, %xmm0, %eax
cwtl
movl %eax, (%r9,%r13)
pextrw $0x6, %xmm0, %eax
cwtl
movq 0x18(%rsp), %rsi
movl %eax, (%rsi,%r13)
pextrw $0x7, %xmm0, %eax
cwtl
movq 0x50(%rsp), %rsi
movl %eax, (%rsi,%r13)
addq $0x4, %rbx
decq %r10
jne 0x44dc89
movdqa 0x80(%rsp), %xmm0
pcmpgtw %xmm10, %xmm0
pcmpgtw 0xd0(%rsp), %xmm9
por %xmm0, %xmm9
pmovmskb %xmm9, %eax
testl %eax, %eax
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %eax
movl 0x20(%rsp), %esi
je 0x44dd3f
orb $0x40, 0xc(%rdx)
xorl %eax, %eax
xorl %esi, %esi
xorl %ecx, %ecx
cwtl
movl %eax, (%rdx)
movl %ecx, 0x4(%rdx)
movl %esi, 0x8(%rdx)
movq %rbp, %rdi
callq 0x20a60d
movq 0x38(%rsp), %rdi
callq 0x20a60d
movq %r12, %rdi
callq 0x20a60d
movq %r15, %rdi
callq 0x20a60d
movq %r14, %rdi
callq 0x20a60d
movq 0x8(%rsp), %rax
jmp 0x44dd8e
callq 0x1d24b3
jmp 0x44dd8c
callq 0x1d248d
jmp 0x44dd8c
callq 0x1d2467
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq