// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/tests/test_openmp.c
// Function: ssw_
static parasail_result_t* ssw_(
        const char * const restrict s1, const int s1_len,
        const char * const restrict s2, const int s2_len,
        const int open, const int gap, const parasail_matrix_t * pmatrix,
        int score_size)
{
    parasail_result_t *result = parasail_result_new();
    s_profile *profile = NULL;
    int8_t *s1_num = (int8_t*)malloc(sizeof(int8_t) * s1_len);
    int8_t *s2_num = (int8_t*)malloc(sizeof(int8_t) * s2_len);
    int8_t *matrix = (int8_t*)malloc(sizeof(int8_t) * 24 * 24);
    s_align *ssw_result = NULL;
    int m = 0;

    /* This table is used to transform amino acid letters into numbers. */
    static const int8_t table[128] = {
        23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
        23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
        23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
        23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
        23, 0,  20, 4,  3,  6,  13, 7,  8,  9,  23, 11, 10, 12, 2,  23,
        14, 5,  1,  15, 16, 23, 19, 17, 22, 18, 21, 23, 23, 23, 23, 23,
        23, 0,  20, 4,  3,  6,  13, 7,  8,  9,  23, 11, 10, 12, 2,  23,
        14, 5,  1,  15, 16, 23, 19, 17, 22, 18, 21, 23, 23, 23, 23, 23
    };

    /* initialize score matrix */
    for (m = 0; m < s1_len; ++m) s1_num[m] = table[(int)s1[m]];
    for (m = 0; m < s2_len; ++m) s2_num[m] = table[(int)s2[m]];
    for (m = 0; m < 24*24; ++m) matrix[m] = pmatrix->matrix[m];
    profile = ssw_init(s1_num, s1_len, matrix, 24, score_size);
    ssw_result = ssw_align(profile, s2_num, s2_len, -open, -gap, 2, 0, 0, s1_len/2);
    result->score = ssw_result->score1;
    if (ssw_result->saturated) {
        result->flag |= PARASAIL_FLAG_SATURATED;
    }
    align_destroy(ssw_result);
    init_destroy(profile);
    free(s1_num);
    free(s2_num);
    free(matrix);

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movb $0x0, %al
callq 0x2a12d0
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movslq -0xc(%rbp), %rdi
shlq $0x0, %rdi
callq 0x29b180
movq %rax, -0x40(%rbp)
movslq -0x1c(%rbp), %rdi
shlq $0x0, %rdi
callq 0x29b180
movq %rax, -0x48(%rbp)
movl $0x240, %edi            # imm = 0x240
callq 0x29b180
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x29c678
movq -0x8(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0xacfa91(%rip), %rax    # 0xd6c0f0
movb (%rax,%rcx), %dl
movq -0x40(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x29c641
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x29c6b6
movq -0x18(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movslq %eax, %rcx
leaq 0xacfa53(%rip), %rax    # 0xd6c0f0
movb (%rax,%rcx), %dl
movq -0x48(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x29c67f
movl $0x0, -0x5c(%rbp)
cmpl $0x240, -0x5c(%rbp)     # imm = 0x240
jge 0x29c6ed
movq 0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movb %al, %dl
movq -0x50(%rbp), %rax
movslq -0x5c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x29c6bd
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x50(%rbp), %rdx
movl 0x18(%rbp), %eax
movl $0x18, %ecx
movsbl %al, %r8d
callq 0x29c820
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl -0x1c(%rbp), %eax
movl %eax, -0x60(%rbp)
xorl %eax, %eax
subl -0x20(%rbp), %eax
movb %al, %cl
xorl %eax, %eax
subl -0x24(%rbp), %eax
movb %al, %r8b
movl -0xc(%rbp), %eax
movl $0x2, %r9d
cltd
idivl %r9d
movl -0x60(%rbp), %edx
movl $0x2, %r9d
xorl %r10d, %r10d
movzbl %cl, %ecx
movzbl %r8b, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x29cc10
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzwl (%rax), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x58(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x29c78a
movq -0x30(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0xc(%rax)
movq -0x58(%rbp), %rdi
callq 0x2a0530
movq -0x38(%rbp), %rdi
callq 0x29cbd0
movq -0x40(%rbp), %rdi
callq 0x29b160
movq -0x48(%rbp), %rdi
callq 0x29b160
movq -0x50(%rbp), %rdi
callq 0x29b160
movq -0x30(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)