// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/src/memory_sse.c
// Function: parasail_profile_create_stats_sse_128_64
parasail_profile_t * parasail_profile_create_stats_sse_128_64(
        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 = 2; /* 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_64_t p;
            __m128i_64_t m;
            __m128i_64_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->profile64.score = vProfile;
    profile->profile64.matches = vProfileM;
    profile->profile64.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 $0x2, -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 0x383d26
movq 0xaa32de(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x9682e7(%rip), %rsi    # 0xcebfeb
leaq 0x9694f0(%rip), %rdx    # 0xced1fb
leaq 0x968c13(%rip), %rcx    # 0xcec925
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
jmp 0x383d28
jmp 0x383d2a
cmpq $0x0, -0x70(%rbp)
jne 0x383d64
movq 0xaa32a0(%rip), %rax    # 0xe26fd8
movq (%rax), %rdi
leaq 0x9682a9(%rip), %rsi    # 0xcebfeb
leaq 0x9694b2(%rip), %rdx    # 0xced1fb
leaq 0x9689ea(%rip), %rcx    # 0xcec73a
movb $0x0, %al
callq 0x19e180
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
jmp 0x383d66
movq -0x80(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x383d7b
movl -0x74(%rbp), %eax
movl %eax, -0x104(%rbp)
jmp 0x383d88
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 $0x2, %eax
subl $0x1, %eax
movl $0x2, %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 0x383df3
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
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 0x383e2b
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
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 0x383e63
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
movq -0x70(%rbp), %rdi
movl -0x84(%rbp), %esi
movq -0x80(%rbp), %rdx
callq 0x1c5d00
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0x383e94
movq $0x0, -0x68(%rbp)
jmp 0x3841a8
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0x384155
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0xa0(%rbp), %eax
jge 0x38413f
movl -0x88(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x94(%rbp)
cmpl $0x2, -0x94(%rbp)
jge 0x384083
movq -0x80(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x383f66
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x383f11
xorl %eax, %eax
movl %eax, -0x108(%rbp)
jmp 0x383f4c
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
movslq %eax, %rcx
movslq -0x94(%rbp), %rax
movq %rcx, -0xe0(%rbp,%rax,8)
jmp 0x383fd5
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x383f7e
xorl %eax, %eax
movl %eax, -0x10c(%rbp)
jmp 0x383fbd
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
movslq %eax, %rcx
movslq -0x94(%rbp), %rax
movq %rcx, -0xe0(%rbp,%rax,8)
movl -0x8c(%rbp), %eax
cmpl -0x84(%rbp), %eax
jl 0x383fed
xorl %eax, %eax
movl %eax, -0x110(%rbp)
jmp 0x38401b
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
movslq %eax, %rcx
movslq -0x94(%rbp), %rax
movq %rcx, -0xf0(%rbp,%rax,8)
movslq -0x94(%rbp), %rax
cmpq $0x0, -0xe0(%rbp,%rax,8)
setg %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movslq -0x94(%rbp), %rax
movq %rcx, -0x100(%rbp,%rax,8)
movl -0xa0(%rbp), %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x383ee2
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 0x383eba
jmp 0x384141
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
jmp 0x383e9e
movq -0xa8(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0xb0(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0xb8(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0xc8(%rbp), %rax
leaq -0x1fc9(%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 %cs:(%rax,%rax)