// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/memory_sse.c
// Function: parasail_profile_create_stats_sse_128_16
parasail_profile_t * parasail_profile_create_stats_sse_128_16(
        const char * const restrict s1, const int _s1Len,
        const parasail_matrix_t *matrix)
{
    int s1Len = 0;
    int32_t i = 0;
    int32_t j = 0;
    int32_t k = 0;
    int32_t segNum = 0;
    int32_t n = 0;
    const int32_t segWidth = 8; /* number of values in vector unit */
    int32_t segLen = 0;
    __m128i* restrict vProfile = NULL;
    __m128i* restrict vProfileM = NULL;
    __m128i* restrict vProfileS = NULL;
    int32_t index = 0;
    parasail_profile_t *profile = NULL;

    PARASAIL_CHECK_NULL(matrix);
    /* s1 is required for both pssm and square */
    PARASAIL_CHECK_NULL(s1);

    s1Len = matrix->type == PARASAIL_MATRIX_TYPE_SQUARE ? _s1Len : matrix->length;
    n = matrix->size; /* number of amino acids in table */
    segLen = (s1Len + segWidth - 1) / segWidth;
    vProfile = parasail_memalign___m128i(16, n * segLen);
    if (!vProfile) return NULL;
    vProfileM = parasail_memalign___m128i(16, n * segLen);
    if (!vProfileM) return NULL;
    vProfileS = parasail_memalign___m128i(16, n * segLen);
    if (!vProfileS) return NULL;
    profile = parasail_profile_new(s1, s1Len, matrix);
    if (!profile) return NULL;

    for (k=0; k<n; ++k) {
        for (i=0; i<segLen; ++i) {
            __m128i_16_t p;
            __m128i_16_t m;
            __m128i_16_t s;
            j = i;
            for (segNum=0; segNum<segWidth; ++segNum) {
                if (matrix->type == PARASAIL_MATRIX_TYPE_SQUARE) {
                    p.v[segNum] = j >= s1Len ? 0 : matrix->matrix[n*k+matrix->mapper[(unsigned char)s1[j]]];
                }
                else {
                    p.v[segNum] = j >= s1Len ? 0 : matrix->matrix[n*j+matrix->mapper[(unsigned char)matrix->alphabet[k]]];
                }
                m.v[segNum] = j >= s1Len ? 0 : (k == matrix->mapper[(unsigned char)s1[j]]);
                s.v[segNum] = p.v[segNum] > 0;
                j += segLen;
            }
            _mm_store_si128(&vProfile[index], p.m);
            _mm_store_si128(&vProfileM[index], m.m);
            _mm_store_si128(&vProfileS[index], s.m);
            ++index;
        }
    }

    profile->profile16.score = vProfile;
    profile->profile16.matches = vProfileM;
    profile->profile16.similar = vProfileS;
    profile->free = &parasail_free___m128i;
    return profile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x70(%rbp)
movl %esi, -0x74(%rbp)
movq %rdx, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movl $0x8, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
movl $0x0, -0xbc(%rbp)
movq $0x0, -0xc8(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x383256
movq 0xaa3dae(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x968db7(%rip), %rsi    # 0xcebfeb
leaq 0x969f6e(%rip), %rdx    # 0xced1a9
leaq 0x9696e3(%rip), %rcx    # 0xcec925
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x68(%rbp)
jmp 0x3836da
jmp 0x383258
jmp 0x38325a
cmpq $0x0, -0x70(%rbp)
jne 0x383294
movq 0xaa3d70(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x968d79(%rip), %rsi    # 0xcebfeb
leaq 0x969f30(%rip), %rdx    # 0xced1a9
leaq 0x9694ba(%rip), %rcx    # 0xcec73a
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x68(%rbp)
jmp 0x3836da
jmp 0x383296
movq -0x80(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x3832ab
movl -0x74(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0x3832b8
movq -0x80(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0x84(%rbp)
movq -0x80(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x98(%rbp)
movl -0x84(%rbp), %eax
addl $0x8, %eax
subl $0x1, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0xa0(%rbp)
movl -0x98(%rbp), %eax
imull -0xa0(%rbp), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x383323
movq $0x0, -0x68(%rbp)
jmp 0x3836da
movl -0x98(%rbp), %eax
imull -0xa0(%rbp), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x38335b
movq $0x0, -0x68(%rbp)
jmp 0x3836da
movl -0x98(%rbp), %eax
imull -0xa0(%rbp), %eax
movslq %eax, %rsi
movl $0x10, %edi
callq 0x381e20
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x383393
movq $0x0, -0x68(%rbp)
jmp 0x3836da
movq -0x70(%rbp), %rdi
movl -0x84(%rbp), %esi
movq -0x80(%rbp), %rdx
callq 0x1c5d00
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0x3833c4
movq $0x0, -0x68(%rbp)
jmp 0x3836da
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0x383687
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0xa0(%rbp), %eax
jge 0x383671
movl -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x94(%rbp)
cmpl $0x8, -0x94(%rbp)
jge 0x3835b5
movq -0x80(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x383496
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x383441
xorl %eax, %eax
movl %eax, -0x108(%rbp)
jmp 0x38347c
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x98(%rbp), %ecx
imull -0x90(%rbp), %ecx
movq -0x80(%rbp), %rdx
movq 0x10(%rdx), %rdx
movq -0x70(%rbp), %rsi
movslq -0x8c(%rbp), %rdi
movzbl (%rsi,%rdi), %esi
addl (%rdx,%rsi,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x108(%rbp)
movl -0x108(%rbp), %eax
movw %ax, %cx
movslq -0x94(%rbp), %rax
movw %cx, -0xe0(%rbp,%rax,2)
jmp 0x383505
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x3834ae
xorl %eax, %eax
movl %eax, -0x10c(%rbp)
jmp 0x3834ed
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x98(%rbp), %ecx
imull -0x8c(%rbp), %ecx
movq -0x80(%rbp), %rdx
movq 0x10(%rdx), %rdx
movq -0x80(%rbp), %rsi
movq 0x38(%rsi), %rsi
movslq -0x90(%rbp), %rdi
movzbl (%rsi,%rdi), %esi
addl (%rdx,%rsi,4), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10c(%rbp)
movl -0x10c(%rbp), %eax
movw %ax, %cx
movslq -0x94(%rbp), %rax
movw %cx, -0xe0(%rbp,%rax,2)
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x38351d
xorl %eax, %eax
movl %eax, -0x110(%rbp)
jmp 0x38354b
movl -0x90(%rbp), %eax
movq -0x80(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x70(%rbp), %rdx
movslq -0x8c(%rbp), %rsi
movzbl (%rdx,%rsi), %edx
cmpl (%rcx,%rdx,4), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x110(%rbp)
movl -0x110(%rbp), %eax
movw %ax, %cx
movslq -0x94(%rbp), %rax
movw %cx, -0xf0(%rbp,%rax,2)
movslq -0x94(%rbp), %rax
movswl -0xe0(%rbp,%rax,2), %eax
cmpl $0x0, %eax
setg %al
andb $0x1, %al
movzbl %al, %eax
movw %ax, %cx
movslq -0x94(%rbp), %rax
movw %cx, -0x100(%rbp,%rax,2)
movl -0xa0(%rbp), %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x383412
movq -0xa8(%rbp), %rax
movslq -0xbc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0xe0(%rbp), %xmm0
movq %rax, -0x8(%rbp)
movdqa %xmm0, -0x20(%rbp)
movdqa -0x20(%rbp), %xmm0
movq -0x8(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0xb0(%rbp), %rax
movslq -0xbc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0xf0(%rbp), %xmm0
movq %rax, -0x28(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x40(%rbp), %xmm0
movq -0x28(%rbp), %rax
movdqa %xmm0, (%rax)
movq -0xb8(%rbp), %rax
movslq -0xbc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movdqa -0x100(%rbp), %xmm0
movq %rax, -0x48(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x60(%rbp), %xmm0
movq -0x48(%rbp), %rax
movdqa %xmm0, (%rax)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x3833ea
jmp 0x383673
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x3833ce
movq -0xa8(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0xb0(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0xb8(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0xc8(%rbp), %rax
leaq -0x14fb(%rip), %rcx     # 0x3821d0
movq %rcx, 0x78(%rax)
movq -0xc8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw (%rax,%rax)