// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/sg_scan_sse2_128_16.c
// Function: parasail_sg_flags_rowcol_scan_profile_sse2_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,
        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 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;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict pvP = NULL;
    __m128i* restrict pvE = NULL;
    int16_t* restrict boundary = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = 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 vPosMask;
    __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;
    k = 0;
    s1Len = profile->s1Len;
    end_query = s1Len-1;
    end_ref = s2Len-1;
    matrix = profile->matrix;
    segWidth = 8; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    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;
    vPosMask = _mm_cmpeq_epi16(_mm_set1_epi16(position),
            _mm_set_epi16(0,1,2,3,4,5,6,7));
    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_SG | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_BITS_16 | PARASAIL_FLAG_LANES_8;
    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 */
    pvE = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int16_t(16, s2Len+1);
    pvHt= parasail_memalign___m128i(16, segLen);
    pvH = parasail_memalign___m128i(16, segLen);
    pvGapper = parasail_memalign___m128i(16, segLen);

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

    /* initialize H and E */
    {
        int32_t index = 0;
        for (i=0; i<segLen; ++i) {
            int32_t segNum = 0;
            __m128i_16_t h;
            __m128i_16_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = s1_beg ? 0 : (-open-gap*(segNum*segLen+i));
                h.v[segNum] = tmp < INT16_MIN ? INT16_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT16_MIN ? INT16_MIN : tmp;
            }
            _mm_store_si128(&pvH[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 < INT16_MIN ? INT16_MIN : tmp;
        }
    }

    {
        __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);
            /* long queries and/or large penalties will break the pseudo prefix scan */
            vSaturationCheckMin = _mm_min_epi16(vSaturationCheckMin, vGapper);
        }
    }

    /* 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);
        vHp = _mm_insert_epi16(vHp, boundary[j], 0);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = _mm_subs_epi16(vNegLimit, pvGapper[0]);
        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);
        vHt = _mm_insert_epi16(vHt, boundary[j+1], 0);
        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);
        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);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi16(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi16(vSaturationCheckMin, vF);
            vSaturationCheckMax = _mm_max_epi16(vSaturationCheckMax, vH);
#ifdef PARASAIL_TABLE
            arr_store_si128(result->tables->score_table, vH, i, segLen, j, s2Len);
#endif
        } 

        /* extract vector containing last value from column */
        {
            __m128i vCompare;
            vH = _mm_load_si128(pvH + offset);
            vCompare = _mm_and_si128(vPosMask, _mm_cmpgt_epi16(vH, vMaxH));
            vMaxH = _mm_max_epi16(vH, vMaxH);
            if (_mm_movemask_epi8(vCompare)) {
                end_ref = j;
            }
#ifdef PARASAIL_ROWCOL
            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
        }
    }

#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

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

    /* max of last column */
    if (s1_end)
    {
        /* Trace the alignment ending position on read. */
        int16_t *t = (int16_t*)pvH;
        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(pvH + offset);
            for (k=0; k<position; ++k) {
                vH = _mm_slli_si128(vH, 2);
            }
            score = (int16_t) _mm_extract_epi16 (vH, 7);
            end_ref = s2Len - 1;
            end_query = s1Len - 1;
        }
    }

    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(pvH);
    parasail_free(pvHt);
    parasail_free(boundary);
    parasail_free(pvE);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8f0, %rsp            # imm = 0x8F0
movl 0x20(%rbp), %eax
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x650(%rbp)
movq %rsi, -0x658(%rbp)
movl %edx, -0x65c(%rbp)
movl %ecx, -0x660(%rbp)
movl %r8d, -0x664(%rbp)
movl %r9d, -0x668(%rbp)
movl $0x0, -0x66c(%rbp)
movl $0x0, -0x670(%rbp)
movl $0x0, -0x674(%rbp)
movl $0x0, -0x678(%rbp)
movl $0x0, -0x67c(%rbp)
movl $0x0, -0x680(%rbp)
movq $0x0, -0x688(%rbp)
movl $0x0, -0x68c(%rbp)
movl $0x0, -0x690(%rbp)
movl $0x0, -0x694(%rbp)
movl $0x0, -0x698(%rbp)
movq $0x0, -0x6a0(%rbp)
movq $0x0, -0x6a8(%rbp)
movq $0x0, -0x6b0(%rbp)
movq $0x0, -0x6b8(%rbp)
movq $0x0, -0x6c0(%rbp)
movq $0x0, -0x6c8(%rbp)
movw $0x0, -0x6f2(%rbp)
movw $0x0, -0x6f4(%rbp)
movw $0x0, -0x712(%rbp)
movq $0x0, -0x7a8(%rbp)
cmpq $0x0, -0x650(%rbp)
jne 0x463ca3
movq 0x9c3364(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x88836d(%rip), %rsi    # 0xcebfeb
leaq 0x889e07(%rip), %rdx    # 0xceda8c
leaq 0x85e851(%rip), %rcx    # 0xcc24dd
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463ca5
jmp 0x463ca7
movq -0x650(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x463ceb
movq 0x9c331c(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x888325(%rip), %rsi    # 0xcebfeb
leaq 0x889dbf(%rip), %rdx    # 0xceda8c
leaq 0x888d1c(%rip), %rcx    # 0xcec9f0
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463ced
jmp 0x463cef
movq -0x650(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x463d33
movq 0x9c32d4(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8882dd(%rip), %rsi    # 0xcebfeb
leaq 0x889d77(%rip), %rdx    # 0xceda8c
leaq 0x888c00(%rip), %rcx    # 0xcec91c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463d35
jmp 0x463d37
movq -0x650(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x463d7a
movq 0x9c328d(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8889ac(%rip), %rsi    # 0xcec701
leaq 0x889d30(%rip), %rdx    # 0xceda8c
leaq 0x888bc9(%rip), %rcx    # 0xcec92c
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463d7c
jmp 0x463d7e
cmpq $0x0, -0x658(%rbp)
jne 0x463dbe
movq 0x9c3249(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x888252(%rip), %rsi    # 0xcebfeb
leaq 0x889cec(%rip), %rdx    # 0xceda8c
leaq 0x888957(%rip), %rcx    # 0xcec6fe
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463dc0
jmp 0x463dc2
cmpl $0x0, -0x65c(%rbp)
jg 0x463e01
movq 0x9c3206(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x888925(%rip), %rsi    # 0xcec701
leaq 0x889ca9(%rip), %rdx    # 0xceda8c
leaq 0x88892b(%rip), %rcx    # 0xcec715
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463e03
jmp 0x463e05
cmpl $0x0, -0x660(%rbp)
jge 0x463e44
movq 0x9c31c3(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8888fc(%rip), %rsi    # 0xcec71b
leaq 0x889c66(%rip), %rdx    # 0xceda8c
leaq 0x888903(%rip), %rcx    # 0xcec730
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463e46
jmp 0x463e48
cmpl $0x0, -0x664(%rbp)
jge 0x463e87
movq 0x9c3180(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x8888b9(%rip), %rsi    # 0xcec71b
leaq 0x889c23(%rip), %rdx    # 0xceda8c
leaq 0x8888c5(%rip), %rcx    # 0xcec735
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x648(%rbp)
jmp 0x465990
jmp 0x463e89
movl $0x0, -0x66c(%rbp)
movl $0x0, -0x670(%rbp)
movl $0x0, -0x674(%rbp)
movq -0x650(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x680(%rbp)
movl -0x680(%rbp), %eax
decl %eax
movl %eax, -0x678(%rbp)
movl -0x65c(%rbp), %eax
decl %eax
movl %eax, -0x67c(%rbp)
movq -0x650(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x688(%rbp)
movl $0x8, -0x68c(%rbp)
movl -0x680(%rbp), %esi
movl -0x68c(%rbp), %ecx
movl %ecx, %edx
movl %esi, %eax
leal -0x1(%rax,%rdx), %eax
cltd
idivl %ecx
movl %eax, -0x690(%rbp)
movl -0x680(%rbp), %eax
decl %eax
movl -0x690(%rbp), %ecx
cltd
idivl %ecx
movl %edx, -0x694(%rbp)
movl -0x68c(%rbp), %ecx
movl -0x680(%rbp), %eax
decl %eax
movl -0x690(%rbp), %esi
cltd
idivl %esi
notl %eax
addl %ecx, %eax
movl %eax, -0x698(%rbp)
movq -0x650(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x6a0(%rbp)
movw -0x660(%rbp), %ax
movw %ax, -0x632(%rbp)
movw -0x632(%rbp), %ax
movw %ax, -0x8b4(%rbp)
movw %ax, -0x5e2(%rbp)
movw %ax, -0x5e4(%rbp)
movw %ax, -0x5e6(%rbp)
movw %ax, -0x5e8(%rbp)
movw %ax, -0x5ea(%rbp)
movw %ax, -0x5ec(%rbp)
movw %ax, -0x5ee(%rbp)
movw %ax, -0x5f0(%rbp)
movzwl -0x5e2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x5e4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x5e6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x5e8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x5ea(%rbp), %eax
movd %eax, %xmm0
movzwl -0x5ec(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x5ee(%rbp), %eax
movd %eax, %xmm3
movzwl -0x5f0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x600(%rbp)
movaps -0x600(%rbp), %xmm0
movaps %xmm0, -0x6e0(%rbp)
movw -0x664(%rbp), %ax
movw %ax, -0x634(%rbp)
movw -0x634(%rbp), %ax
movw %ax, -0x8b2(%rbp)
movw %ax, -0x5c2(%rbp)
movw %ax, -0x5c4(%rbp)
movw %ax, -0x5c6(%rbp)
movw %ax, -0x5c8(%rbp)
movw %ax, -0x5ca(%rbp)
movw %ax, -0x5cc(%rbp)
movw %ax, -0x5ce(%rbp)
movw %ax, -0x5d0(%rbp)
movzwl -0x5c2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x5c4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x5c6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x5c8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x5ca(%rbp), %eax
movd %eax, %xmm0
movzwl -0x5cc(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x5ce(%rbp), %eax
movd %eax, %xmm3
movzwl -0x5d0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movdqa %xmm0, -0x5e0(%rbp)
movdqa -0x5e0(%rbp), %xmm0
movdqa %xmm0, -0x6f0(%rbp)
xorl %eax, %eax
subl -0x660(%rbp), %eax
movq -0x688(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x46413a
movl -0x660(%rbp), %eax
addl $0xffff8000, %eax       # imm = 0xFFFF8000
movl %eax, -0x8b8(%rbp)
jmp 0x46414f
movq -0x688(%rbp), %rcx
movl $0xffff8000, %eax       # imm = 0xFFFF8000
subl 0x20(%rcx), %eax
movl %eax, -0x8b8(%rbp)
movl -0x8b8(%rbp), %eax
incl %eax
movw %ax, -0x6f2(%rbp)
movq -0x688(%rbp), %rax
movl 0x1c(%rax), %eax
xorl $0x7fff, %eax           # imm = 0x7FFF
decl %eax
movw %ax, -0x6f4(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x630(%rbp)
movaps -0x630(%rbp), %xmm0
movaps %xmm0, -0x710(%rbp)
movw -0x6f2(%rbp), %ax
movw %ax, -0x712(%rbp)
movw -0x6f2(%rbp), %ax
movw %ax, -0x636(%rbp)
movw -0x636(%rbp), %ax
movw %ax, -0x8c0(%rbp)
movw %ax, -0x5a2(%rbp)
movw %ax, -0x5a4(%rbp)
movw %ax, -0x5a6(%rbp)
movw %ax, -0x5a8(%rbp)
movw %ax, -0x5aa(%rbp)
movw %ax, -0x5ac(%rbp)
movw %ax, -0x5ae(%rbp)
movw %ax, -0x5b0(%rbp)
movzwl -0x5a2(%rbp), %eax
movd %eax, %xmm1
movzwl -0x5a4(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x5a6(%rbp), %eax
movd %eax, %xmm2
movzwl -0x5a8(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x5aa(%rbp), %eax
movd %eax, %xmm0
movzwl -0x5ac(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x5ae(%rbp), %eax
movd %eax, %xmm3
movzwl -0x5b0(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x5c0(%rbp)
movaps -0x5c0(%rbp), %xmm0
movaps %xmm0, -0x730(%rbp)
movw -0x6f4(%rbp), %ax
movw %ax, -0x638(%rbp)
movw -0x638(%rbp), %ax
movw %ax, -0x8be(%rbp)
movw %ax, -0x582(%rbp)
movw %ax, -0x584(%rbp)
movw %ax, -0x586(%rbp)
movw %ax, -0x588(%rbp)
movw %ax, -0x58a(%rbp)
movw %ax, -0x58c(%rbp)
movw %ax, -0x58e(%rbp)
movw %ax, -0x590(%rbp)
movzwl -0x582(%rbp), %eax
movd %eax, %xmm1
movzwl -0x584(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x586(%rbp), %eax
movd %eax, %xmm2
movzwl -0x588(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x58a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x58c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x58e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x590(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x5a0(%rbp)
movaps -0x5a0(%rbp), %xmm0
movaps %xmm0, -0x740(%rbp)
movaps -0x740(%rbp), %xmm0
movaps %xmm0, -0x750(%rbp)
movaps -0x730(%rbp), %xmm0
movaps %xmm0, -0x760(%rbp)
movaps -0x730(%rbp), %xmm0
movaps %xmm0, -0x770(%rbp)
movw -0x698(%rbp), %ax
movw %ax, -0x63a(%rbp)
movw -0x63a(%rbp), %ax
movw %ax, -0x8bc(%rbp)
movw %ax, -0x562(%rbp)
movw %ax, -0x564(%rbp)
movw %ax, -0x566(%rbp)
movw %ax, -0x568(%rbp)
movw %ax, -0x56a(%rbp)
movw %ax, -0x56c(%rbp)
movw %ax, -0x56e(%rbp)
movw %ax, -0x570(%rbp)
movzwl -0x562(%rbp), %eax
movd %eax, %xmm1
movzwl -0x564(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movzwl -0x566(%rbp), %eax
movd %eax, %xmm2
movzwl -0x568(%rbp), %eax
movd %eax, %xmm1
punpcklwd %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1],xmm1[2],xmm2[2],xmm1[3],xmm2[3]
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movzwl -0x56a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x56c(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3]
movzwl -0x56e(%rbp), %eax
movd %eax, %xmm3
movzwl -0x570(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1],xmm0[2],xmm3[2],xmm0[3],xmm3[3]
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
movaps %xmm0, -0x580(%rbp)
movaps -0x580(%rbp), %xmm1
movw $0x0, -0x522(%rbp)
movw $0x1, -0x524(%rbp)
movw $0x2, -0x526(%rbp)
movw $0x3, -0x528(%rbp)
movw $0x4, -0x52a(%rbp)
movw $0x5, -0x52c(%rbp)
movw $0x6, -0x52e(%rbp)
movw $0x7, -0x530(%rbp)
movzwl -0x522(%rbp), %eax
movd %eax, %xmm2
movzwl -0x524(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
movzwl -0x526(%rbp), %eax
movd %eax, %xmm3
movzwl -0x528(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3]
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movzwl -0x52a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x52c(%rbp), %eax
movd %eax, %xmm3
punpcklwd %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3]
movzwl -0x52e(%rbp), %eax
movd %eax, %xmm4
movzwl -0x530(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3]
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movaps %xmm0, -0x540(%rbp)
movaps -0x540(%rbp), %xmm0
movaps %xmm1, -0x610(%rbp)
movaps %xmm0, -0x620(%rbp)
movaps -0x610(%rbp), %xmm0
movaps -0x620(%rbp), %xmm1
pcmpeqw %xmm1, %xmm0
movaps %xmm0, -0x780(%rbp)
movaps -0x710(%rbp), %xmm0
movaps %xmm0, -0x790(%rbp)
movw -0x6f2(%rbp), %ax
movw %ax, -0x790(%rbp)
movaps -0x790(%rbp), %xmm1
movl -0x690(%rbp), %eax
negl %eax
movl -0x664(%rbp), %ecx
imull %ecx, %eax
movw %ax, -0x63c(%rbp)
movw -0x63c(%rbp), %ax
movw %ax, -0x8ba(%rbp)
movw %ax, -0x542(%rbp)
movw %ax, -0x544(%rbp)
movw %ax, -0x546(%rbp)
movw %ax, -0x548(%rbp)
movw %ax, -0x54a(%rbp)
movw %ax, -0x54c(%rbp)
movw %ax, -0x54e(%rbp)
movw %ax, -0x550(%rbp)
movzwl -0x542(%rbp), %eax
movd %eax, %xmm2
movzwl -0x544(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1],xmm0[2],xmm2[2],xmm0[3],xmm2[3]
movzwl -0x546(%rbp), %eax
movd %eax, %xmm3
movzwl -0x548(%rbp), %eax
movd %eax, %xmm2
punpcklwd %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1],xmm2[2],xmm3[2],xmm2[3],xmm3[3]
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movzwl -0x54a(%rbp), %eax
movd %eax, %xmm0
movzwl -0x54c(%rbp), %eax
movd %eax, %xmm3
punpcklwd %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1],xmm3[2],xmm0[2],xmm3[3],xmm0[3]
movzwl -0x54e(%rbp), %eax
movd %eax, %xmm4
movzwl -0x550(%rbp), %eax
movd %eax, %xmm0
punpcklwd %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1],xmm0[2],xmm4[2],xmm0[3],xmm4[3]
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
punpcklqdq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0]
movaps %xmm0, -0x560(%rbp)
movaps -0x560(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm1, -0x470(%rbp)
movdqa %xmm0, -0x480(%rbp)
movdqa -0x470(%rbp), %xmm0
movdqa -0x480(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x7a0(%rbp)
movl -0x690(%rbp), %edi
imull -0x68c(%rbp), %edi
movl -0x65c(%rbp), %esi
callq 0x1c3af0
movq %rax, -0x7a8(%rbp)
cmpq $0x0, -0x7a8(%rbp)
jne 0x4646b4
movq $0x0, -0x648(%rbp)
jmp 0x465990
movq -0x7a8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x8200402, %ecx        # imm = 0x8200402
movl %ecx, 0xc(%rax)
movl -0x668(%rbp), %edx
xorl %ecx, %ecx
movl $0x8, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x7a8(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl 0x10(%rbp), %edx
xorl %ecx, %ecx
movl $0x10, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x7a8(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl 0x18(%rbp), %edx
xorl %ecx, %ecx
movl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x7a8(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movl 0x20(%rbp), %edx
xorl %ecx, %ecx
movl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x7a8(%rbp), %rax
orl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
movq -0x7a8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
movl %ecx, 0xc(%rax)
movslq -0x690(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x6a8(%rbp)
movl -0x65c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x1c3630
movq %rax, -0x6b0(%rbp)
movslq -0x690(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x6b8(%rbp)
movslq -0x690(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x6c0(%rbp)
movslq -0x690(%rbp), %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0x6c8(%rbp)
cmpq $0x0, -0x6a8(%rbp)
jne 0x4647e8
movq $0x0, -0x648(%rbp)
jmp 0x465990
cmpq $0x0, -0x6b0(%rbp)
jne 0x464802
movq $0x0, -0x648(%rbp)
jmp 0x465990
cmpq $0x0, -0x6b8(%rbp)
jne 0x46481c
movq $0x0, -0x648(%rbp)
jmp 0x465990
cmpq $0x0, -0x6c0(%rbp)
jne 0x464836
movq $0x0, -0x648(%rbp)
jmp 0x465990
cmpq $0x0, -0x6c8(%rbp)
jne 0x464850
movq $0x0, -0x648(%rbp)
jmp 0x465990
movl $0x0, -0x7ac(%rbp)
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x690(%rbp), %eax
jge 0x464a3f
movl $0x0, -0x7b0(%rbp)
movl $0x0, -0x7b0(%rbp)
movl -0x7b0(%rbp), %eax
cmpl -0x68c(%rbp), %eax
jge 0x46499e
cmpl $0x0, -0x668(%rbp)
je 0x4648af
xorl %eax, %eax
movl %eax, -0x8c4(%rbp)
jmp 0x4648db
xorl %eax, %eax
subl -0x660(%rbp), %eax
movl -0x664(%rbp), %ecx
movl -0x7b0(%rbp), %edx
imull -0x690(%rbp), %edx
addl -0x66c(%rbp), %edx
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x8c4(%rbp)
movl -0x8c4(%rbp), %eax
cltq
movq %rax, -0x7d8(%rbp)
cmpq $-0x8000, -0x7d8(%rbp) # imm = 0x8000
jge 0x464907
movq $-0x8000, %rax          # imm = 0x8000
movq %rax, -0x8d0(%rbp)
jmp 0x464915
movq -0x7d8(%rbp), %rax
movq %rax, -0x8d0(%rbp)
movq -0x8d0(%rbp), %rax
movw %ax, %cx
movslq -0x7b0(%rbp), %rax
movw %cx, -0x7c0(%rbp,%rax,2)
movq -0x7d8(%rbp), %rax
movslq -0x660(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x7d8(%rbp)
cmpq $-0x8000, -0x7d8(%rbp) # imm = 0x8000
jge 0x464963
movq $-0x8000, %rax          # imm = 0x8000
movq %rax, -0x8d8(%rbp)
jmp 0x464971
movq -0x7d8(%rbp), %rax
movq %rax, -0x8d8(%rbp)
movq -0x8d8(%rbp), %rax
movw %ax, %cx
movslq -0x7b0(%rbp), %rax
movw %cx, -0x7d0(%rbp,%rax,2)
movl -0x7b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7b0(%rbp)
jmp 0x46488a
movq -0x6c0(%rbp), %rax
movslq -0x7ac(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x7c0(%rbp), %xmm0
movq %rax, -0x3a8(%rbp)
movdqa %xmm0, -0x3c0(%rbp)
movdqa -0x3c0(%rbp), %xmm0
movq -0x3a8(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x6a8(%rbp), %rax
movslq -0x7ac(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x7d0(%rbp), %xmm0
movq %rax, -0x3c8(%rbp)
movdqa %xmm0, -0x3e0(%rbp)
movdqa -0x3e0(%rbp), %xmm0
movq -0x3c8(%rbp), %rax
movdqa %xmm0, (%rax)
movl -0x7ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7ac(%rbp)
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x464864
movq -0x6b0(%rbp), %rax
movw $0x0, (%rax)
movl $0x1, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x65c(%rbp), %eax
jg 0x464b03
cmpl $0x0, 0x18(%rbp)
je 0x464a77
xorl %eax, %eax
movl %eax, -0x8dc(%rbp)
jmp 0x464a99
xorl %eax, %eax
subl -0x660(%rbp), %eax
movl -0x664(%rbp), %ecx
movl -0x66c(%rbp), %edx
subl $0x1, %edx
imull %edx, %ecx
subl %ecx, %eax
movl %eax, -0x8dc(%rbp)
movl -0x8dc(%rbp), %eax
cltq
movq %rax, -0x7e0(%rbp)
cmpq $-0x8000, -0x7e0(%rbp) # imm = 0x8000
jge 0x464ac5
movq $-0x8000, %rax          # imm = 0x8000
movq %rax, -0x8e8(%rbp)
jmp 0x464ad3
movq -0x7e0(%rbp), %rax
movq %rax, -0x8e8(%rbp)
movq -0x8e8(%rbp), %rax
movw %ax, %dx
movq -0x6b0(%rbp), %rax
movslq -0x66c(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x464a55
movdqa -0x710(%rbp), %xmm1
movdqa -0x6e0(%rbp), %xmm0
movdqa %xmm1, -0x2d0(%rbp)
movdqa %xmm0, -0x2e0(%rbp)
movdqa -0x2d0(%rbp), %xmm0
movdqa -0x2e0(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x7f0(%rbp)
movl -0x690(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x66c(%rbp)
cmpl $0x0, -0x66c(%rbp)
jl 0x464c26
movq -0x6c8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x7f0(%rbp), %xmm0
movq %rax, -0x3e8(%rbp)
movdqa %xmm0, -0x400(%rbp)
movdqa -0x400(%rbp), %xmm0
movq -0x3e8(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x7f0(%rbp), %xmm1
movdqa -0x6f0(%rbp), %xmm0
movdqa %xmm1, -0x2f0(%rbp)
movdqa %xmm0, -0x300(%rbp)
movdqa -0x2f0(%rbp), %xmm0
movdqa -0x300(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x7f0(%rbp)
movdqa -0x750(%rbp), %xmm1
movdqa -0x7f0(%rbp), %xmm0
movdqa %xmm1, -0x270(%rbp)
movdqa %xmm0, -0x280(%rbp)
movdqa -0x270(%rbp), %xmm0
movdqa -0x280(%rbp), %xmm1
pminsw %xmm1, %xmm0
movdqa %xmm0, -0x750(%rbp)
movl -0x66c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x464b4e
movl $0x0, -0x670(%rbp)
movl -0x670(%rbp), %eax
cmpl -0x65c(%rbp), %eax
jge 0x465586
movq -0x6c0(%rbp), %rax
movl -0x690(%rbp), %ecx
decl %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x840(%rbp)
movaps -0x840(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movaps %xmm0, -0x840(%rbp)
movaps -0x840(%rbp), %xmm0
movq -0x6b0(%rbp), %rax
movslq -0x670(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
pinsrw $0x0, %eax, %xmm0
movdqa %xmm0, -0x840(%rbp)
movq -0x6a0(%rbp), %rax
movq -0x688(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x658(%rbp), %rdx
movslq -0x670(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
movl (%rcx,%rdx,4), %ecx
imull -0x690(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x848(%rbp)
movdqa -0x730(%rbp), %xmm1
movq -0x6c8(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm1, -0x310(%rbp)
movdqa %xmm0, -0x320(%rbp)
movdqa -0x310(%rbp), %xmm0
movdqa -0x320(%rbp), %xmm1
psubsw %xmm1, %xmm0
movdqa %xmm0, -0x810(%rbp)
movdqa -0x730(%rbp), %xmm0
movdqa %xmm0, -0x820(%rbp)
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x690(%rbp), %eax
jge 0x46500a
movq -0x6c0(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x830(%rbp)
movq -0x6a8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x800(%rbp)
movq -0x848(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x240(%rbp)
movq -0x240(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x860(%rbp)
movdqa -0x800(%rbp), %xmm1
movdqa -0x6f0(%rbp), %xmm0
movdqa %xmm1, -0x330(%rbp)
movdqa %xmm0, -0x340(%rbp)
movdqa -0x330(%rbp), %xmm1
movdqa -0x340(%rbp), %xmm0
psubsw %xmm0, %xmm1
movdqa -0x830(%rbp), %xmm2
movdqa -0x6e0(%rbp), %xmm0
movdqa %xmm2, -0x350(%rbp)
movdqa %xmm0, -0x360(%rbp)
movdqa -0x350(%rbp), %xmm0
movdqa -0x360(%rbp), %xmm2
psubsw %xmm2, %xmm0
movdqa %xmm1, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm0
movdqa -0x100(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x800(%rbp)
movdqa -0x840(%rbp), %xmm1
movdqa -0x860(%rbp), %xmm0
movdqa %xmm1, -0x490(%rbp)
movdqa %xmm0, -0x4a0(%rbp)
movdqa -0x490(%rbp), %xmm0
movdqa -0x4a0(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x840(%rbp)
movdqa -0x820(%rbp), %xmm1
movdqa -0x810(%rbp), %xmm2
movq -0x6c8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa (%rax), %xmm0
movdqa %xmm2, -0x4b0(%rbp)
movdqa %xmm0, -0x4c0(%rbp)
movdqa -0x4b0(%rbp), %xmm0
movdqa -0x4c0(%rbp), %xmm2
paddsw %xmm2, %xmm0
movdqa %xmm1, -0x110(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x110(%rbp), %xmm0
movdqa -0x120(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x820(%rbp)
movdqa -0x800(%rbp), %xmm1
movdqa -0x840(%rbp), %xmm0
movdqa %xmm1, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm0
movdqa -0x140(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x810(%rbp)
movq -0x6a8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x800(%rbp), %xmm0
movq %rax, -0x408(%rbp)
movdqa %xmm0, -0x420(%rbp)
movdqa -0x420(%rbp), %xmm0
movq -0x408(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0x6b8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x810(%rbp), %xmm0
movq %rax, -0x428(%rbp)
movdqa %xmm0, -0x440(%rbp)
movdqa -0x440(%rbp), %xmm0
movq -0x428(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x830(%rbp), %xmm0
movdqa %xmm0, -0x840(%rbp)
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x464d44
movaps -0x810(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movaps %xmm0, -0x810(%rbp)
movaps -0x810(%rbp), %xmm0
movq -0x6b0(%rbp), %rax
movslq -0x670(%rbp), %rcx
movzwl 0x2(%rax,%rcx,2), %eax
pinsrw $0x0, %eax, %xmm0
movdqa %xmm0, -0x810(%rbp)
movdqa -0x820(%rbp), %xmm1
movdqa -0x810(%rbp), %xmm2
movq -0x6c8(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm2, -0x4d0(%rbp)
movdqa %xmm0, -0x4e0(%rbp)
movdqa -0x4d0(%rbp), %xmm0
movdqa -0x4e0(%rbp), %xmm2
paddsw %xmm2, %xmm0
movdqa %xmm1, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x820(%rbp)
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
movl -0x68c(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jge 0x465170
movaps -0x820(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x870(%rbp)
movdqa -0x870(%rbp), %xmm1
movdqa -0x7a0(%rbp), %xmm0
movdqa %xmm1, -0x4f0(%rbp)
movdqa %xmm0, -0x500(%rbp)
movdqa -0x4f0(%rbp), %xmm0
movdqa -0x500(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x870(%rbp)
movdqa -0x820(%rbp), %xmm1
movdqa -0x870(%rbp), %xmm0
movdqa %xmm1, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm0
movdqa -0x180(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x820(%rbp)
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x4650b9
movaps -0x820(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x820(%rbp)
movdqa -0x820(%rbp), %xmm1
movdqa -0x790(%rbp), %xmm0
movdqa %xmm1, -0x510(%rbp)
movdqa %xmm0, -0x520(%rbp)
movdqa -0x510(%rbp), %xmm0
movdqa -0x520(%rbp), %xmm1
paddsw %xmm1, %xmm0
movdqa %xmm0, -0x820(%rbp)
movdqa -0x810(%rbp), %xmm1
movdqa -0x820(%rbp), %xmm0
movdqa %xmm1, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x830(%rbp)
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x690(%rbp), %eax
jge 0x46541e
movq -0x6b8(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x810(%rbp)
movdqa -0x820(%rbp), %xmm1
movdqa -0x6f0(%rbp), %xmm0
movdqa %xmm1, -0x370(%rbp)
movdqa %xmm0, -0x380(%rbp)
movdqa -0x370(%rbp), %xmm1
movdqa -0x380(%rbp), %xmm0
psubsw %xmm0, %xmm1
movdqa -0x830(%rbp), %xmm2
movdqa -0x6e0(%rbp), %xmm0
movdqa %xmm2, -0x390(%rbp)
movdqa %xmm0, -0x3a0(%rbp)
movdqa -0x390(%rbp), %xmm0
movdqa -0x3a0(%rbp), %xmm2
psubsw %xmm2, %xmm0
movdqa %xmm1, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm0
movdqa -0x1c0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x820(%rbp)
movdqa -0x810(%rbp), %xmm1
movdqa -0x820(%rbp), %xmm0
movdqa %xmm1, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
movdqa -0x1e0(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x830(%rbp)
movq -0x6c0(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x830(%rbp), %xmm0
movq %rax, -0x448(%rbp)
movdqa %xmm0, -0x460(%rbp)
movdqa -0x460(%rbp), %xmm0
movq -0x448(%rbp), %rax
movdqa %xmm0, (%rax)
movdqa -0x750(%rbp), %xmm1
movdqa -0x830(%rbp), %xmm0
movdqa %xmm1, -0x290(%rbp)
movdqa %xmm0, -0x2a0(%rbp)
movdqa -0x290(%rbp), %xmm0
movdqa -0x2a0(%rbp), %xmm1
pminsw %xmm1, %xmm0
movdqa %xmm0, -0x750(%rbp)
movdqa -0x750(%rbp), %xmm1
movdqa -0x820(%rbp), %xmm0
movdqa %xmm1, -0x2b0(%rbp)
movdqa %xmm0, -0x2c0(%rbp)
movdqa -0x2b0(%rbp), %xmm0
movdqa -0x2c0(%rbp), %xmm1
pminsw %xmm1, %xmm0
movdqa %xmm0, -0x750(%rbp)
movdqa -0x760(%rbp), %xmm1
movdqa -0x830(%rbp), %xmm0
movdqa %xmm1, -0x1f0(%rbp)
movdqa %xmm0, -0x200(%rbp)
movdqa -0x1f0(%rbp), %xmm0
movdqa -0x200(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x760(%rbp)
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x465206
movq -0x6c0(%rbp), %rax
movslq -0x694(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movaps (%rax), %xmm0
movaps %xmm0, -0x830(%rbp)
movaps -0x780(%rbp), %xmm1
movaps -0x830(%rbp), %xmm2
movaps -0x770(%rbp), %xmm0
movaps %xmm2, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm2
pcmpgtw %xmm2, %xmm0
movdqa %xmm1, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
pand -0xe0(%rbp), %xmm0
movdqa %xmm0, -0x880(%rbp)
movdqa -0x830(%rbp), %xmm1
movdqa -0x770(%rbp), %xmm0
movdqa %xmm1, -0x210(%rbp)
movdqa %xmm0, -0x220(%rbp)
movdqa -0x210(%rbp), %xmm0
movdqa -0x220(%rbp), %xmm1
pmaxsw %xmm1, %xmm0
movdqa %xmm0, -0x770(%rbp)
movdqa -0x880(%rbp), %xmm0
movdqa %xmm0, -0x70(%rbp)
movdqa -0x70(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x46550b
movl -0x670(%rbp), %eax
movl %eax, -0x67c(%rbp)
movl $0x0, -0x674(%rbp)
movl -0x674(%rbp), %eax
cmpl -0x698(%rbp), %eax
jge 0x465548
movaps -0x830(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x830(%rbp)
movl -0x674(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x674(%rbp)
jmp 0x465515
movaps -0x830(%rbp), %xmm0
pextrw $0x7, %xmm0, %eax
movzwl %ax, %eax
movswl %ax, %edx
movq -0x7a8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movslq -0x670(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x670(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x670(%rbp)
jmp 0x464c30
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x690(%rbp), %eax
jge 0x465606
movq -0x6c0(%rbp), %rax
movslq -0x66c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x890(%rbp)
movq -0x7a8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
movdqa -0x890(%rbp), %xmm0
movl -0x66c(%rbp), %esi
movl -0x690(%rbp), %edx
callq 0x4659a0
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
jmp 0x465590
cmpl $0x0, 0x20(%rbp)
je 0x46566e
movl $0x0, -0x674(%rbp)
movl -0x674(%rbp), %eax
cmpl -0x698(%rbp), %eax
jge 0x465649
movaps -0x770(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x770(%rbp)
movl -0x674(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x674(%rbp)
jmp 0x465616
movaps -0x770(%rbp), %xmm0
pextrw $0x7, %xmm0, %eax
movzwl %ax, %eax
movw %ax, -0x712(%rbp)
movl -0x680(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x678(%rbp)
cmpl $0x0, 0x10(%rbp)
je 0x4657ae
movq -0x6c0(%rbp), %rax
movq %rax, -0x898(%rbp)
movl -0x690(%rbp), %eax
imull -0x68c(%rbp), %eax
movl %eax, -0x89c(%rbp)
movl $0x0, -0x66c(%rbp)
movl -0x66c(%rbp), %eax
cmpl -0x89c(%rbp), %eax
jge 0x4657ac
movl -0x66c(%rbp), %eax
cltd
idivl -0x68c(%rbp)
movl %eax, -0x8ec(%rbp)
movl -0x66c(%rbp), %eax
cltd
idivl -0x68c(%rbp)
movl -0x8ec(%rbp), %eax
imull -0x690(%rbp), %edx
addl %edx, %eax
movl %eax, -0x8a0(%rbp)
movl -0x8a0(%rbp), %eax
cmpl -0x680(%rbp), %eax
jl 0x4656fd
jmp 0x465786
movq -0x898(%rbp), %rax
movswl (%rax), %eax
movswl -0x712(%rbp), %ecx
cmpl %ecx, %eax
jle 0x465740
movq -0x898(%rbp), %rax
movw (%rax), %ax
movw %ax, -0x712(%rbp)
movl -0x8a0(%rbp), %eax
movl %eax, -0x678(%rbp)
movl -0x65c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x67c(%rbp)
jmp 0x465784
movq -0x898(%rbp), %rax
movswl (%rax), %eax
movswl -0x712(%rbp), %ecx
cmpl %ecx, %eax
jne 0x465782
movl -0x67c(%rbp), %eax
movl -0x65c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x465782
movl -0x8a0(%rbp), %eax
cmpl -0x678(%rbp), %eax
jge 0x465782
movl -0x8a0(%rbp), %eax
movl %eax, -0x678(%rbp)
jmp 0x465784
jmp 0x465786
movl -0x66c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x66c(%rbp)
movq -0x898(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x898(%rbp)
jmp 0x4656a3
jmp 0x4657ae
cmpl $0x0, 0x10(%rbp)
jne 0x465862
cmpl $0x0, 0x20(%rbp)
jne 0x465862
movq -0x6c0(%rbp), %rax
movslq -0x694(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x260(%rbp)
movq -0x260(%rbp), %rax
movdqa (%rax), %xmm0
movdqa %xmm0, -0x8b0(%rbp)
movl $0x0, -0x674(%rbp)
movl -0x674(%rbp), %eax
cmpl -0x698(%rbp), %eax
jge 0x46582e
movaps -0x8b0(%rbp), %xmm0
pslldq $0x2, %xmm0             # xmm0 = zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11,12,13]
movdqa %xmm0, -0x8b0(%rbp)
movl -0x674(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x674(%rbp)
jmp 0x4657fb
movaps -0x8b0(%rbp), %xmm0
pextrw $0x7, %xmm0, %eax
movzwl %ax, %eax
movw %ax, -0x712(%rbp)
movl -0x65c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x67c(%rbp)
movl -0x680(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x678(%rbp)
movaps -0x750(%rbp), %xmm1
movaps -0x730(%rbp), %xmm0
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x40(%rbp), %xmm1
movaps -0x30(%rbp), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm1
movaps -0x20(%rbp), %xmm0
pcmpgtw %xmm0, %xmm1
movaps -0x760(%rbp), %xmm2
movaps -0x740(%rbp), %xmm0
movaps %xmm2, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm2
pcmpgtw %xmm2, %xmm0
movdqa %xmm1, -0x50(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x50(%rbp), %xmm0
por -0x60(%rbp), %xmm0
movdqa %xmm0, -0x80(%rbp)
movdqa -0x80(%rbp), %xmm0
pmovmskb %xmm0, %eax
cmpl $0x0, %eax
je 0x465916
movq -0x7a8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
movw $0x0, -0x712(%rbp)
movl $0x0, -0x678(%rbp)
movl $0x0, -0x67c(%rbp)
movswl -0x712(%rbp), %ecx
movq -0x7a8(%rbp), %rax
movl %ecx, (%rax)
movl -0x678(%rbp), %ecx
movq -0x7a8(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x67c(%rbp), %ecx
movq -0x7a8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x6c8(%rbp), %rdi
callq 0x1c3590
movq -0x6c0(%rbp), %rdi
callq 0x1c3590
movq -0x6b8(%rbp), %rdi
callq 0x1c3590
movq -0x6b0(%rbp), %rdi
callq 0x1c3590
movq -0x6a8(%rbp), %rdi
callq 0x1c3590
movq -0x7a8(%rbp), %rax
movq %rax, -0x648(%rbp)
movq -0x648(%rbp), %rax
addq $0x8f0, %rsp            # imm = 0x8F0
popq %rbp
retq