// File: /workspace/github_c_makefile_star2_O0/nh13[P]ksw/src/parasail/tests/test_basic.c
// Function: main
int main(int argc, char ** argv)
{
    int major = 0;
    int minor = 0;
    int patch = 0;
    parasail_result_t *result = NULL;
    parasail_matrix_t *matrix = NULL;
    parasail_profile_t *profile = NULL;

    parasail_version(&major, &minor, &patch);
    printf("parasail is using C lib version %d.%d.%d\n", major, minor, patch);

    printf("\ntest1\n");
    printf("result = parasail_sw(\"asdf\", 4, \"asdf\", 4, 10, 1, &parasail_blosum62)\n");
    result = parasail_sw("asdf", 4, "asdf", 4, 10, 1, &parasail_blosum62);
    if (result->score != 20) {
        printf("failed\n");
        return EXIT_FAILURE;
    }
    else {
        printf("pass\n");
    }
    parasail_result_free(result);

    printf("\ntest2\n");
    printf("result = parasail_sw(\"asdf\", 4, \"asdf\", 4, 10, 1, &parasail_pam50)\n");
    result = parasail_sw("asdf", 4, "asdf", 4, 10, 1, &parasail_pam50);
    if (result->score != 27) {
        printf("failed\n");
        return EXIT_FAILURE;
    }
    else {
        printf("pass\n");
    }
    parasail_result_free(result);

    printf("\ntest3\n");
    printf("matrix = parasail_matrix_create(\"acgt\", 1, -1)\n");
    matrix = parasail_matrix_create("acgt", 1, -1);
    printf("result = parasail_sw(\"acgt\", 4, \"acgt\", 4, 10, 1, matrix)\n");
    result = parasail_sw("acgt", 4, "acgt", 4, 10, 1, matrix);
    if (result->score != 4) {
        printf("failed\n");
        return EXIT_FAILURE;
    }
    else {
        printf("pass\n");
    }
    parasail_result_free(result);
    parasail_matrix_free(matrix);

    /* if no vector ISA detected at build-time and/or run-time, this will fail */
    printf("\ntest4\n");
    printf("profile = parasail_profile_create_8(\"asdf\", 4, &parasail_blosum62)\n");
    profile = parasail_profile_create_8("asdf", 4, &parasail_blosum62);
    if (!profile) {
        printf("NULL profile returned; vector ISA not supported\n");
        printf("pass\n");
    }
    else {
        printf("result = parasail_sw_striped_profile_8(profile, \"asdf\", 4, 10, 1)\n");
        result = parasail_sw_striped_profile_8(profile, "asdf", 4, 10, 1);
        if (!result) {
            printf("NULL result returned; vector ISA not supported\n");
            printf("pass\n");
        }
        else {
            if (result->score != 20) {
                printf("failed\n");
                return EXIT_FAILURE;
            }
            else {
                printf("pass\n");
            }
            parasail_result_free(result);
        }
    }

    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x14850
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq 0x315dc0(%rip), %rdi    # 0x329004
movb $0x0, %al
callq 0x13030
leaq 0x315ddc(%rip), %rdi    # 0x32902e
movb $0x0, %al
callq 0x13030
leaq 0x315dd6(%rip), %rdi    # 0x329036
movb $0x0, %al
callq 0x13030
leaq 0x315e0f(%rip), %rdx    # 0x32907d
movl $0x4, %ecx
movl $0xa, %r8d
movl $0x1, %r9d
leaq 0x32eaba(%rip), %rax    # 0x341d40
movq %rdx, %rdi
movl %ecx, %esi
movq %rax, (%rsp)
callq 0x20c80
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x14, (%rax)
je 0x132bb
leaq 0x317ecd(%rip), %rdi    # 0x32b175
movb $0x0, %al
callq 0x13030
movl $0x1, -0x4(%rbp)
jmp 0x13505
leaq 0x315dc0(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
movq -0x28(%rbp), %rdi
callq 0x145c0
leaq 0x315daf(%rip), %rdi    # 0x329088
movb $0x0, %al
callq 0x13030
leaq 0x315da9(%rip), %rdi    # 0x329090
movb $0x0, %al
callq 0x13030
leaq 0x315d88(%rip), %rdx    # 0x32907d
movl $0x4, %ecx
movl $0xa, %r8d
movl $0x1, %r9d
leaq 0x32ea7b(%rip), %rax    # 0x341d88
movq %rdx, %rdi
movl %ecx, %esi
movq %rax, (%rsp)
callq 0x20c80
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x1b, (%rax)
je 0x13342
leaq 0x317e46(%rip), %rdi    # 0x32b175
movb $0x0, %al
callq 0x13030
movl $0x1, -0x4(%rbp)
jmp 0x13505
leaq 0x315d39(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
movq -0x28(%rbp), %rdi
callq 0x145c0
leaq 0x315d74(%rip), %rdi    # 0x3290d4
movb $0x0, %al
callq 0x13030
leaq 0x315d6e(%rip), %rdi    # 0x3290dc
movb $0x0, %al
callq 0x13030
leaq 0x315d90(%rip), %rdi    # 0x32910c
movl $0x1, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x14880
movq %rax, -0x30(%rbp)
leaq 0x315d7b(%rip), %rdi    # 0x329111
movb $0x0, %al
callq 0x13030
movq -0x30(%rbp), %rax
leaq 0x315d64(%rip), %rdx    # 0x32910c
movl $0x4, %ecx
movl $0xa, %r8d
movl $0x1, %r9d
movq %rdx, %rdi
movl %ecx, %esi
movq %rax, (%rsp)
callq 0x20c80
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x4, (%rax)
je 0x133ee
leaq 0x317d9a(%rip), %rdi    # 0x32b175
movb $0x0, %al
callq 0x13030
movl $0x1, -0x4(%rbp)
jmp 0x13505
leaq 0x315c8d(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
movq -0x28(%rbp), %rdi
callq 0x145c0
movq -0x30(%rbp), %rdi
callq 0x15c70
leaq 0x315d37(%rip), %rdi    # 0x32914c
movb $0x0, %al
callq 0x13030
leaq 0x315d31(%rip), %rdi    # 0x329154
movb $0x0, %al
callq 0x13030
leaq 0x315c4c(%rip), %rdi    # 0x32907d
movl $0x4, %esi
leaq 0x32e903(%rip), %rdx    # 0x341d40
callq 0x20b30
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1346e
leaq 0x315d44(%rip), %rdi    # 0x329198
movb $0x0, %al
callq 0x13030
leaq 0x315c20(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
jmp 0x134fe
leaq 0x315d54(%rip), %rdi    # 0x3291c9
movb $0x0, %al
callq 0x13030
movq -0x38(%rbp), %rdi
leaq 0x315bf6(%rip), %rsi    # 0x32907d
movl $0x4, %edx
movl $0xa, %ecx
movl $0x1, %r8d
callq 0x1f820
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x134c5
leaq 0x315d5e(%rip), %rdi    # 0x32920c
movb $0x0, %al
callq 0x13030
leaq 0x315bc6(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
jmp 0x134fc
movq -0x28(%rbp), %rax
cmpl $0x14, (%rax)
je 0x134e5
leaq 0x317ca0(%rip), %rdi    # 0x32b175
movb $0x0, %al
callq 0x13030
movl $0x1, -0x4(%rbp)
jmp 0x13505
leaq 0x315b96(%rip), %rdi    # 0x329082
movb $0x0, %al
callq 0x13030
movq -0x28(%rbp), %rdi
callq 0x145c0
jmp 0x134fe
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop