// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/nw_trace_scan_sse2_128_32.c
// Function: parasail_nw_trace_scan_profile_sse2_128_32
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 s1Len = 0;
    int32_t end_query = 0;
    int32_t end_ref = 0;
    const parasail_matrix_t *matrix = NULL;
    int32_t segWidth = 0;
    int32_t segLen = 0;
    int32_t offset = 0;
    int32_t position = 0;
    __m128i* restrict pvP = NULL;
    __m128i* restrict pvE = NULL;
    int32_t* restrict boundary = NULL;
    __m128i* restrict pvHt = NULL;
    __m128i* restrict pvH = NULL;
    __m128i* restrict pvGapper = NULL;
    __m128i vGapO;
    __m128i vGapE;
    int32_t NEG_LIMIT = 0;
    int32_t POS_LIMIT = 0;
    __m128i vZero;
    int32_t score = 0;
    __m128i vNegLimit;
    __m128i vPosLimit;
    __m128i vSaturationCheckMin;
    __m128i vSaturationCheckMax;
    __m128i vNegInfFront;
    __m128i vSegLenXgap;
    parasail_result_t *result = NULL;
    __m128i vTIns;
    __m128i vTDel;
    __m128i vTDiag;
    __m128i vTDiagE;
    __m128i vTInsE;
    __m128i vTDiagF;
    __m128i vTDelF;

    /* validate inputs */
    PARASAIL_CHECK_NULL(profile);
    PARASAIL_CHECK_NULL(profile->profile32.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 = 4; /* number of values in vector unit */
    segLen = (s1Len + segWidth - 1) / segWidth;
    offset = (s1Len - 1) % segLen;
    position = (segWidth - 1) - (s1Len - 1) / segLen;
    pvP = (__m128i*)profile->profile32.score;
    vGapO = _mm_set1_epi32(open);
    vGapE = _mm_set1_epi32(gap);
    NEG_LIMIT = (-open < matrix->min ? INT32_MIN + open : INT32_MIN - matrix->min) + 1;
    POS_LIMIT = INT32_MAX - matrix->max - 1;
    vZero = _mm_setzero_si128();
    score = NEG_LIMIT;
    vNegLimit = _mm_set1_epi32(NEG_LIMIT);
    vPosLimit = _mm_set1_epi32(POS_LIMIT);
    vSaturationCheckMin = vPosLimit;
    vSaturationCheckMax = vNegLimit;
    vNegInfFront = vZero;
    vTIns  = _mm_set1_epi32(PARASAIL_INS);
    vTDel  = _mm_set1_epi32(PARASAIL_DEL);
    vTDiag = _mm_set1_epi32(PARASAIL_DIAG);
    vTDiagE = _mm_set1_epi32(PARASAIL_DIAG_E);
    vTInsE = _mm_set1_epi32(PARASAIL_INS_E);
    vTDiagF = _mm_set1_epi32(PARASAIL_DIAG_F);
    vTDelF = _mm_set1_epi32(PARASAIL_DEL_F);
    vNegInfFront = _mm_insert_epi32_rpl(vNegInfFront, NEG_LIMIT, 0);
    vSegLenXgap = _mm_add_epi32(vNegInfFront,
            _mm_slli_si128(_mm_set1_epi32(-segLen*gap), 4));

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

    /* set known flags */
    result->flag |= PARASAIL_FLAG_NW | PARASAIL_FLAG_SCAN
        | PARASAIL_FLAG_TRACE
        | PARASAIL_FLAG_BITS_32 | PARASAIL_FLAG_LANES_4;

    /* initialize heap variables */
    pvE = parasail_memalign___m128i(16, segLen);
    boundary = parasail_memalign_int32_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_32_t h;
            __m128i_32_t e;
            for (segNum=0; segNum<segWidth; ++segNum) {
                int64_t tmp = -open-gap*(segNum*segLen+i);
                h.v[segNum] = tmp < INT32_MIN ? INT32_MIN : tmp;
                tmp = tmp - open;
                e.v[segNum] = tmp < INT32_MIN ? INT32_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 = -open-gap*(i-1);
            boundary[i] = tmp < INT32_MIN ? INT32_MIN : tmp;
        }
    }

    {
        __m128i vGapper = _mm_sub_epi32(vZero,vGapO);
        for (i=segLen-1; i>=0; --i) {
            _mm_store_si128(pvGapper+i, vGapper);
            vGapper = _mm_sub_epi32(vGapper, vGapE);
        }
    }

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

        /* calculate E */
        /* calculate Ht */
        /* calculate F and H first pass */
        vHp = _mm_load_si128(pvH+(segLen-1));
        vHp = _mm_slli_si128(vHp, 4);
        vHp = _mm_insert_epi32_rpl(vHp, boundary[j], 0);
        pvW = pvP + matrix->mapper[(unsigned char)s2[j]]*segLen;
        vHt = _mm_sub_epi32(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);
            vGapper = _mm_load_si128(pvGapper+i);
            vE_opn = _mm_sub_epi32(vH, vGapO);
            vE_ext = _mm_sub_epi32(vE, vGapE);
            case1 = _mm_cmpgt_epi32(vE_opn, vE_ext);
            vET = _mm_blendv_epi8_rpl(vTInsE, vTDiagE, case1);
            arr_store(result->trace->trace_table, vET, i, segLen, j);
            vE = _mm_max_epi32_rpl(vE_opn, vE_ext);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vE);
            vGapper = _mm_add_epi32(vHt, vGapper);
            vF = _mm_max_epi32_rpl(vF, vGapper);
            vHp = _mm_add_epi32(vHp, vW);
            vHt = _mm_max_epi32_rpl(vE, vHp);
            _mm_store_si128(pvE+i, vE);
            _mm_store_si128(pvHt+i, vHt);
            _mm_store_si128(pvH+i, vHp);
            vHp = vH;
        }

        /* pseudo prefix scan on F and H */
        vHt = _mm_slli_si128(vHt, 4);
        vHt = _mm_insert_epi32_rpl(vHt, boundary[j+1], 0);
        vGapper = _mm_load_si128(pvGapper);
        vGapper = _mm_add_epi32(vHt, vGapper);
        vF = _mm_max_epi32_rpl(vF, vGapper);
        for (i=0; i<segWidth-2; ++i) {
            __m128i vFt = _mm_slli_si128(vF, 4);
            vFt = _mm_add_epi32(vFt, vSegLenXgap);
            vF = _mm_max_epi32_rpl(vF, vFt);
        }

        /* calculate final H */
        vF = _mm_slli_si128(vF, 4);
        vF = _mm_add_epi32(vF, vNegInfFront);
        vH = _mm_max_epi32_rpl(vF, vHt);
        for (i=0; i<segLen; ++i) {
            vET = arr_load(result->trace->trace_table, i, segLen, j);
            vHp = _mm_load_si128(pvH+i);
            vHt = _mm_load_si128(pvHt+i);
            vF_opn = _mm_sub_epi32(vH, vGapO);
            vF_ext = _mm_sub_epi32(vF, vGapE);
            vF = _mm_max_epi32_rpl(vF_opn, vF_ext);
            case1 = _mm_cmpgt_epi32(vF_opn, vF_ext);
            vFT = _mm_blendv_epi8_rpl(vTDelF, vTDiagF, case1);
            vH = _mm_max_epi32_rpl(vHt, vF);
            case1 = _mm_cmpeq_epi32(vH, vHp);
            case2 = _mm_cmpeq_epi32(vH, vF);
            vT = _mm_blendv_epi8_rpl(
                    _mm_blendv_epi8_rpl(vTIns, vTDel, case2),
                    vTDiag, case1);
            vT = _mm_or_si128(vT, vET);
            vT = _mm_or_si128(vT, vFT);
            arr_store(result->trace->trace_table, vT, i, segLen, j);
            _mm_store_si128(pvH+i, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vH);
            vSaturationCheckMin = _mm_min_epi32_rpl(vSaturationCheckMin, vF);
            vSaturationCheckMax = _mm_max_epi32_rpl(vSaturationCheckMax, vH);
        }
    }

    /* 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, 4);
        }
        score = (int32_t) _mm_extract_epi32_rpl (vH, 3);
    }

    if (_mm_movemask_epi8(_mm_or_si128(
            _mm_cmplt_epi32(vSaturationCheckMin, vNegLimit),
            _mm_cmpgt_epi32(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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
testq %rdi, %rdi
je 0x387eff
movq 0x48(%rdi), %rax
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0x387f06
movq 0x10(%rdi), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x387f0d
movl 0x8(%rdi), %r12d
testl %r12d, %r12d
jle 0x387f14
testq %rsi, %rsi
je 0x387f1b
movl %edx, %r9d
testl %edx, %edx
jle 0x387f22
testl %ecx, %ecx
js 0x387f29
testl %r8d, %r8d
js 0x387f30
movl %r8d, 0x60(%rsp)
movq %rsi, 0x90(%rsp)
leal -0x1(%r12), %ebp
addq $0x3, %r12
shrq $0x2, %r12
movl %ebp, %eax
cltd
idivl %r12d
movl %eax, %r14d
movl %edx, %r15d
movl %ecx, %r13d
negl %r13d
movq 0x58(%rsp), %rdx
movl 0x20(%rdx), %eax
movl $0x80000000, %esi       # imm = 0x80000000
movl %ecx, 0x10(%rsp)
orl %esi, %ecx
subl %eax, %esi
cmpl %r13d, %eax
cmovgl %ecx, %esi
movl %esi, 0x40(%rsp)
movl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
subl 0x1c(%rdx), %eax
movl %eax, 0x70(%rsp)
movl $0x10, %edx
movl $0x10, %ecx
movl %r12d, %edi
movl %r9d, %esi
movq %r9, 0x30(%rsp)
callq 0x2097d1
testq %rax, %rax
je 0x387f35
movq %rax, %rbx
movl %r15d, 0x2c(%rsp)
movl %r14d, 0x20(%rsp)
movl %ebp, 0x28(%rsp)
orl $0x4480401, 0xc(%rax)   # imm = 0x4480401
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
movq %rax, %r15
movq 0x30(%rsp), %rax
leal 0x1(%rax), %esi
movl $0x10, %edi
movq %rsi, 0x88(%rsp)
callq 0x2094d5
movq %rax, 0x8(%rsp)
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
movq %rax, %rbp
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
movq %rax, %r14
movl $0x10, %edi
movq %r12, %rsi
callq 0x2ea474
testq %r15, %r15
sete %cl
cmpq $0x0, 0x8(%rsp)
sete %dl
orb %cl, %dl
testq %rbp, %rbp
sete %cl
testq %r14, %r14
sete %sil
orb %cl, %sil
orb %dl, %sil
testq %rax, %rax
sete %cl
orb %sil, %cl
jne 0x387f35
movq 0x30(%rsp), %rcx
decl %ecx
movl %ecx, 0x1c(%rsp)
movl $0x3, %ecx
subl 0x20(%rsp), %ecx
movl %ecx, 0x24(%rsp)
movl 0x10(%rsp), %esi
movd %esi, %xmm0
pshufd $0x0, %xmm0, %xmm2      # xmm2 = xmm0[0,0,0,0]
movl 0x60(%rsp), %edx
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm3      # xmm3 = xmm0[0,0,0,0]
movl 0x40(%rsp), %ecx
incl %ecx
movd %ecx, %xmm1
pshufd $0x0, %xmm1, %xmm0      # xmm0 = xmm1[0,0,0,0]
movdqa %xmm0, 0x40(%rsp)
movd 0x70(%rsp), %xmm0
pshufd $0x0, %xmm0, %xmm6      # xmm6 = xmm0[0,0,0,0]
movl %r12d, %ecx
imull %edx, %ecx
movl %ecx, %edx
negl %edx
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm4      # xmm4 = xmm0[0,0,0,0]
pslldq $0x4, %xmm4             # xmm4 = zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7,8,9,10,11]
movdqa %xmm1, 0x70(%rsp)
paddd %xmm1, %xmm4
movl %esi, %edi
movl %r12d, %edx
movq %rdx, 0x10(%rsp)
xorl %r8d, %r8d
movq $-0x80000000, %r9       # imm = 0x80000000
movl %r13d, %r10d
movl %r10d, %r11d
xorl %edx, %edx
movslq %r11d, %r11
movl %r11d, 0xb0(%rsp,%rdx,4)
movq %r11, %rsi
subq %rdi, %rsi
cmpq $-0x7fffffff, %rsi      # imm = 0x80000001
cmovlq %r9, %rsi
movl %esi, 0xa0(%rsp,%rdx,4)
incq %rdx
subl %ecx, %r11d
cmpq $0x4, %rdx
jne 0x387a2e
movq %r8, %rdx
shlq $0x4, %rdx
movaps 0xb0(%rsp), %xmm0
movaps %xmm0, (%r14,%rdx)
movdqa 0xa0(%rsp), %xmm0
movdqa %xmm0, (%r15,%rdx)
incq %r8
movl 0x60(%rsp), %esi
subl %esi, %r10d
cmpq 0x10(%rsp), %r8
jne 0x387a29
movq 0x8(%rsp), %rdx
movl $0x0, (%rdx)
movl $0x1, %ecx
movq 0x88(%rsp), %rdi
movl %r13d, (%rdx,%rcx,4)
incq %rcx
subl %esi, %r13d
cmpq %rcx, %rdi
jne 0x387aa9
movdqa %xmm4, 0x60(%rsp)
pxor %xmm0, %xmm0
psubd %xmm2, %xmm0
leal -0x1(%r12), %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movl %r12d, %edi
movq 0x30(%rsp), %rsi
movdqa %xmm0, (%rdx)
psubd %xmm3, %xmm0
addq $-0x10, %rdx
decl %edi
jg 0x387ae0
movl %ecx, %ecx
shlq $0x4, %rcx
movq %r14, %rdi
addq %rcx, %rdi
cmpl $0x1, %r12d
adcl $0x0, %r12d
cmpl $0x2, %esi
movl $0x1, %r8d
cmovgel %esi, %r8d
movq 0x10(%rsp), %r9
shlq $0x4, %r9
shlq $0x4, %r12
xorl %r10d, %r10d
movdqa 0x26f9e6(%rip), %xmm10  # 0x5f7510
movdqa 0x26f9ed(%rip), %xmm12  # 0x5f7520
movdqa 0x26fa04(%rip), %xmm8   # 0x5f7540
movdqa 0x26fa0b(%rip), %xmm9   # 0x5f7550
xorl %r11d, %r11d
movdqa 0x40(%rsp), %xmm7
movdqa %xmm6, 0x30(%rsp)
movq 0x90(%rsp), %rsi
movq 0x8(%rsp), %rdx
movdqa %xmm9, %xmm5
movdqa %xmm8, %xmm13
pshufd $0x90, (%rdi), %xmm14   # xmm14 = mem[0,0,1,2]
movss (%rdx,%r11,4), %xmm0
movss %xmm0, %xmm14           # xmm14 = xmm0[0],xmm14[1,2,3]
movq 0x58(%rsp), %rcx
movq 0x10(%rcx), %rcx
movzbl (%rsi,%r11), %edx
movslq (%rcx,%rdx,4), %r13
imulq 0x10(%rsp), %r13
shlq $0x4, %r13
addq 0x98(%rsp), %r13
movdqa 0x40(%rsp), %xmm0
movdqa %xmm0, %xmm15
psubd (%rax), %xmm15
xorl %ecx, %ecx
movdqa %xmm10, %xmm11
movdqa (%r14,%rcx), %xmm9
movdqa (%r15,%rcx), %xmm8
movdqa %xmm9, %xmm4
psubd %xmm2, %xmm4
psubd %xmm3, %xmm8
movdqa %xmm4, %xmm1
pcmpgtd %xmm8, %xmm1
movdqa %xmm1, %xmm10
pand %xmm11, %xmm10
pxor %xmm12, %xmm10
movq 0x10(%rbx), %rdx
movq (%rdx), %rdx
addq %r10, %rdx
paddd (%rax,%rcx), %xmm15
paddd (%r13,%rcx), %xmm14
movdqa %xmm10, (%rcx,%rdx)
pand %xmm1, %xmm4
pandn %xmm8, %xmm1
por %xmm4, %xmm1
movdqa %xmm6, %xmm4
pcmpgtd %xmm1, %xmm4
movdqa %xmm0, %xmm8
pcmpgtd %xmm15, %xmm0
pand %xmm0, %xmm8
pandn %xmm15, %xmm0
movdqa %xmm1, %xmm15
movdqa %xmm1, %xmm10
movdqa %xmm1, (%r15,%rcx)
pand %xmm4, %xmm1
pandn %xmm6, %xmm4
movdqa %xmm4, %xmm6
por %xmm1, %xmm6
por %xmm8, %xmm0
pcmpgtd %xmm14, %xmm15
pand %xmm15, %xmm10
pandn %xmm14, %xmm15
por %xmm10, %xmm15
movdqa %xmm15, (%rbp,%rcx)
movdqa %xmm14, (%r14,%rcx)
addq $0x10, %rcx
movdqa %xmm9, %xmm14
cmpq %rcx, %r12
jne 0x387bb7
movdqa %xmm11, %xmm10
pshufd $0x90, %xmm15, %xmm4    # xmm4 = xmm15[0,0,1,2]
movq 0x8(%rsp), %rdx
movss 0x4(%rdx,%r11,4), %xmm1
incq %r11
movss %xmm1, %xmm4            # xmm4 = xmm1[0],xmm4[1,2,3]
movdqa (%rax), %xmm1
paddd %xmm4, %xmm1
movdqa %xmm0, %xmm14
pcmpgtd %xmm1, %xmm14
pand %xmm14, %xmm0
pandn %xmm1, %xmm14
por %xmm0, %xmm14
movl $0x1, %ecx
movdqa 0x60(%rsp), %xmm8
movdqa %xmm14, %xmm0
movdqa %xmm14, %xmm1
pslldq $0x4, %xmm14            # xmm14 = zero,zero,zero,zero,xmm14[0,1,2,3,4,5,6,7,8,9,10,11]
paddd %xmm8, %xmm14
pcmpgtd %xmm14, %xmm0
pand %xmm0, %xmm1
pandn %xmm14, %xmm0
movdqa %xmm0, %xmm14
por %xmm1, %xmm14
decl %ecx
je 0x387cd2
pslldq $0x4, %xmm14            # xmm14 = zero,zero,zero,zero,xmm14[0,1,2,3,4,5,6,7,8,9,10,11]
paddd 0x70(%rsp), %xmm14
movdqa %xmm14, %xmm15
pcmpgtd %xmm4, %xmm15
movdqa %xmm14, %xmm0
pand %xmm15, %xmm0
pandn %xmm4, %xmm15
por %xmm0, %xmm15
xorl %r13d, %r13d
movdqa 0x26f7f6(%rip), %xmm12  # 0x5f7530
movdqa %xmm13, %xmm8
movdqa %xmm5, %xmm9
movdqa 0x26de43(%rip), %xmm11  # 0x5f5b90
movq 0x10(%rbx), %rcx
movq (%rcx), %rcx
addq %r10, %rcx
movdqa (%rbp,%r13), %xmm0
psubd %xmm2, %xmm15
psubd %xmm3, %xmm14
movdqa %xmm15, %xmm1
pcmpgtd %xmm14, %xmm1
movdqa %xmm1, %xmm4
pandn %xmm14, %xmm4
pand %xmm1, %xmm15
movdqa %xmm15, %xmm14
por %xmm4, %xmm14
pand %xmm12, %xmm1
pxor %xmm8, %xmm1
movdqa %xmm0, %xmm4
pcmpgtd %xmm14, %xmm4
movdqa %xmm4, %xmm8
pandn %xmm14, %xmm8
pand %xmm4, %xmm0
por %xmm8, %xmm0
movdqa (%r14,%r13), %xmm8
pcmpeqd %xmm0, %xmm8
paddd %xmm9, %xmm4
movdqa %xmm8, %xmm9
pandn %xmm4, %xmm9
pand %xmm11, %xmm8
por %xmm9, %xmm8
movdqa %xmm5, %xmm9
por (%r13,%rcx), %xmm1
por %xmm8, %xmm1
movdqa %xmm13, %xmm8
movdqa %xmm1, (%r13,%rcx)
movdqa %xmm0, (%r14,%r13)
movdqa %xmm6, %xmm1
pcmpgtd %xmm0, %xmm1
movdqa %xmm7, %xmm4
pcmpgtd %xmm0, %xmm7
pand %xmm7, %xmm4
pandn %xmm0, %xmm7
movdqa %xmm0, %xmm15
pand %xmm1, %xmm0
pandn %xmm6, %xmm1
por %xmm0, %xmm1
movdqa %xmm1, %xmm6
pcmpgtd %xmm14, %xmm6
movdqa %xmm14, %xmm0
pand %xmm6, %xmm0
pandn %xmm1, %xmm6
por %xmm0, %xmm6
por %xmm4, %xmm7
addq $0x10, %r13
cmpq %r13, %r12
jne 0x387d4d
addq %r9, %r10
cmpq %r8, %r11
movdqa 0x26f6c6(%rip), %xmm12  # 0x5f7520
jne 0x387b61
movl 0x2c(%rsp), %ecx
shlq $0x4, %rcx
movdqa (%r14,%rcx), %xmm0
cmpl $0x2, 0x20(%rsp)
jg 0x387e93
movl 0x24(%rsp), %edx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
movl 0x1c(%rsp), %esi
pslldq $0x4, %xmm0             # xmm0 = zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
decl %ecx
jne 0x387e88
jmp 0x387e97
movl 0x1c(%rsp), %esi
movdqa 0x40(%rsp), %xmm1
pcmpgtd %xmm6, %xmm1
pcmpgtd 0x30(%rsp), %xmm7
por %xmm1, %xmm7
movmskps %xmm7, %ecx
testl %ecx, %ecx
je 0x387ebe
orb $0x40, 0xc(%rbx)
xorl %ecx, %ecx
xorl %esi, %esi
xorl %edx, %edx
jmp 0x387ecb
pshufd $0xff, %xmm0, %xmm0     # xmm0 = xmm0[3,3,3,3]
movd %xmm0, %ecx
movl 0x28(%rsp), %edx
movl %ecx, (%rbx)
movl %edx, 0x4(%rbx)
movl %esi, 0x8(%rbx)
movq %rax, %rdi
callq 0x2094b5
movq %r14, %rdi
callq 0x2094b5
movq %rbp, %rdi
callq 0x2094b5
movq 0x8(%rsp), %rdi
callq 0x2094b5
movq %r15, %rdi
callq 0x2094b5
jmp 0x387f37
callq 0x1bc81b
jmp 0x387f35
callq 0x1bc7f5
jmp 0x387f35
callq 0x1bc7cf
jmp 0x387f35
callq 0x1bc7a9
jmp 0x387f35
callq 0x1bc783
jmp 0x387f35
callq 0x1bc75d
jmp 0x387f35
callq 0x1bc737
jmp 0x387f35
callq 0x1bc711
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq