// File: /workspace/github_c_makefile_star2_O2/nh13[P]ksw/src/parasail/tests/test_openmp.c
// Function: main
int main(int argc, char **argv)
{
    double timer_clock = 0.0;
    unsigned long i = 0;
    size_t limit = 0;
    char *filename_database = NULL;
    parasail_sequences_t *sequences_database = NULL;
    size_t seq_count_database = 0;
    char *filename_queries = NULL;
    parasail_sequences_t *sequences_queries = NULL;
    size_t seq_count_queries = 0;
    char *endptr = NULL;
    char *funcname1 = NULL;
    char *funcname2 = NULL;
    parasail_function_t *function1 = NULL;
    parasail_function_t *function2 = NULL;
    int banded = 0;
    int kbandsize = 3;
    int c = 0;
    char *matrixname = "blosum62";
    const parasail_matrix_t *matrix = NULL;
    int gap_open = 10;
    int gap_extend = 1;
    int N = 1;
    int saturated = 0;
    int smallest_first = 0;
    int biggest_first = 0;
    int truncate = 0;
    int iterations = 1;
    int func_cutoff = 0;
    int iter = 0;
    stats_t stats_time;

    stats_clear(&stats_time);

    while ((c = getopt(argc, argv, "a:A:c:b:f:k:q:o:e:slt:i:")) != -1) {
        switch (c) {
            case 'a':
                funcname1 = optarg;
                break;
            case 'A':
                funcname2 = optarg;
                break;
            case 'b':
                matrixname = optarg;
                break;
            case 'c':
                errno = 0;
                func_cutoff = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case 'f':
                filename_database = optarg;
                break;
            case 'q':
                filename_queries = optarg;
                break;
            case 'k':
                errno = 0;
                kbandsize = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case 'i':
                errno = 0;
                iterations = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case 'o':
                errno = 0;
                gap_open = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case 'e':
                errno = 0;
                gap_extend = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case 's':
                smallest_first = 1;
                break;
            case 'l':
                biggest_first = 1;
                break;
            case 't':
                errno = 0;
                truncate = strtol(optarg, &endptr, 10);
                if (errno) {
                    perror("strtol");
                    exit(1);
                }
                break;
            case '?':
                if (optopt == 'a'
                        || optopt == 'b'
                        || optopt == 'e'
                        || optopt == 'f'
                        || optopt == 'i'
                        || optopt == 'n'
                        || optopt == 'o'
                        || optopt == 't')
                {
                    fprintf(stderr,
                            "Option -%c requires an argument.\n",
                            optopt);
                }
                else if (isprint(optopt)) {
                    fprintf(stderr, "Unknown option `-%c'.\n",
                            optopt);
                }
                else {
                    fprintf(stderr,
                            "Unknown option character `\\x%x'.\n",
                            optopt);
                }
                exit(1);
            default:
                fprintf(stderr, "default case in getopt\n");
                exit(1);
        }
    }

    if (smallest_first && biggest_first) {
        fprintf(stderr, "cannot choose both smallest and biggest first\n");
        exit(1);
    }

    /* select the function */
    if (funcname1) {
        function1 = parasail_lookup_function(funcname1);
#if HAVE_SSE2
        if (NULL == function1) {
            if (0 == strcmp(funcname1, "ssw_16")) {
                function1 = ssw_16;
            }
            else if (0 == strcmp(funcname1, "ssw_8")) {
                function1 = ssw;
            }
        }
#endif
        if (NULL == function1 && NULL != strstr(funcname1, "nw_banded")) {
            banded = 1;
        }
        if (NULL == function1 && 0 == banded) {
            fprintf(stderr, "Specified function1 not found.\n");
            exit(1);
        }
    }
    else {
        fprintf(stderr, "No alignment function1 specified.\n");
        exit(1);
    }

    if (funcname2) {
        function2 = parasail_lookup_function(funcname2);
        if (NULL == function2) {
            fprintf(stderr, "Specified function2 not found.\n");
            exit(1);
        }
    }

    /* select the substitution matrix */
    if (matrixname) {
        matrix = parasail_matrix_lookup(matrixname);
        if (NULL == matrix) {
            fprintf(stderr, "Specified substitution matrix not found.\n");
            exit(1);
        }
    }

    if (filename_database) {
        sequences_database = parasail_sequences_from_file(filename_database);
        seq_count_database = sequences_database->l;
    }
    else {
        fprintf(stderr, "missing database filename\n");
        exit(1);
    }

    limit = binomial_coefficient(seq_count_database, 2);
    /*printf("%lu choose 2 is %lu\n", seq_count_database, limit);*/

#if defined(_OPENMP)
#pragma omp parallel
    {
#pragma omp single
        {
            N = omp_get_max_threads();
            /*printf("omp_get_max_threads()=%d\n", N);*/
        }
    }
#endif

    if (filename_queries) {
        double total_timer = 0.0;
        sequences_queries = parasail_sequences_from_file(filename_queries);
        seq_count_queries = sequences_queries->l;
        for (i=0; i<seq_count_queries; ++i) {
            int saturated_query = 0;
            double local_timer = 0.0;
            parasail_function_t *function = function1;

            if (func_cutoff > 0) {
                if (sequences_queries->seqs[i].seq.l > (unsigned long)func_cutoff) {
                    function = function2;
                }
            }

            local_timer = timer_real();
#pragma omp parallel
            {
				long long int seq_count_database_signed = seq_count_database;
				long long int j_signed = 0;
#pragma omp for schedule(guided)
                for (j_signed=0; j_signed<seq_count_database_signed; ++j_signed) {
                    parasail_result_t *result = function(
                            sequences_queries->seqs[i].seq.s,
                            sequences_queries->seqs[i].seq.l,
                            sequences_database->seqs[j_signed].seq.s,
                            sequences_database->seqs[j_signed].seq.l,
                            gap_open, gap_extend, matrix);
#pragma omp atomic
                    saturated_query += parasail_result_is_saturated(result);
                    parasail_result_free(result);
                }
            }
            local_timer = timer_real() - local_timer;
            total_timer += local_timer;
            printf("%lu\t %lu\t %d\t %f\n",
                    i, (unsigned long)sequences_queries->seqs[i].seq.l,
                    saturated_query, local_timer);
            fflush(stdout);
        }
        printf("total_time=%f\n", total_timer);
        fflush(stdout);
    }
    else {
        for (iter=0; iter<iterations; ++iter) {
            timer_clock = timer_real();
#pragma omp parallel
            {
                unsigned long a=0;
                unsigned long b=1;
                unsigned long swap=0;
				long long i_signed = 0;
				long long limit_signed = limit;
#pragma omp for schedule(guided)
                for (i_signed=0; i_signed<limit_signed; ++i_signed) {
                    parasail_function_t *function = function1;
                    parasail_result_t *result = NULL;
                    unsigned long query_size;
                    k_combination2(i_signed, &a, &b);
                    if (smallest_first) {
                        if (sequences_database->seqs[a].seq.l > sequences_database->seqs[b].seq.l) {
                            swap = a;
                            a = b;
                            b = swap;
                        }
                    }
                    else if (biggest_first) {
                        if (sequences_database->seqs[a].seq.l < sequences_database->seqs[b].seq.l) {
                            swap = a;
                            a = b;
                            b = swap;
                        }
                    }
                    query_size = sequences_database->seqs[a].seq.l;
                    if (truncate > 0) {
                        if (query_size > (unsigned long)truncate) {
                            query_size = truncate;
                        }
                    }
                    if (func_cutoff > 0) {
                        if (query_size > (unsigned long)func_cutoff) {
                            function = function2;
                        }
                    }
                    if (NULL != function1) {
                        result = function(
                                sequences_database->seqs[a].seq.s, query_size,
                                sequences_database->seqs[b].seq.s, sequences_database->seqs[b].seq.l,
                                gap_open, gap_extend, matrix);
                    }
                    else if (0 != banded) {
                        result = parasail_nw_banded(
                                sequences_database->seqs[a].seq.s, query_size,
                                sequences_database->seqs[b].seq.s, sequences_database->seqs[b].seq.l,
                                gap_open, gap_extend, kbandsize, matrix);
                    }
#pragma omp atomic
                    saturated += parasail_result_is_saturated(result);
                    if (parasail_result_is_saturated(result)) {
#pragma omp critical(printer)
                        {
                            printf("saturated -- (%lu,%lu)\n", a, b);
                        }
                    }
                    parasail_result_free(result);
                }
            }
            timer_clock = timer_real() - timer_clock;
            stats_sample_value(&stats_time, timer_clock);
        }
        printf("%s\t %s\t %d\t %d\t %d\t %d\t %f\t %f\t %f\t %f\n",
                funcname1, matrixname, gap_open, gap_extend, N,
                saturated,
                stats_time._mean, stats_stddev(&stats_time),
                stats_time._min, stats_time._max);
        fflush(stdout);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
leaq 0x40(%rsp), %rax
andq $0x0, (%rax)
movq %rsi, %rbp
movl %edi, %r15d
movq $0x0, 0x20(%rsp)
pushq $0x1
popq %r14
pushq $0xa
popq %rcx
leaq 0x3bfdcd(%rip), %rax    # 0x65b120
movq %rax, 0x80(%rsp)
pushq $0x3
popq %rax
movq %rax, 0xc0(%rsp)
leaq 0x3bfdbc(%rip), %r12    # 0x65b129
leaq 0x3bfcdc(%rip), %r13    # 0x65b050
movq $0x0, 0x78(%rsp)
movq $0x0, 0x18(%rsp)
movl %ecx, %eax
movq %rax, 0x60(%rsp)
movl %r14d, %eax
movq %rax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
xorl %eax, %eax
movl $0x0, 0x34(%rsp)
movq $0x0, 0x28(%rsp)
movl %r14d, %ecx
movq %rcx, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movl %eax, %ebx
movl %r15d, %edi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x29b080
leal -0x61(%rax), %ecx
cmpl $0x13, %ecx
ja 0x29b3fa
movslq (%r13,%rcx,4), %rcx
addq %r13, %rcx
movl %r14d, %eax
jmpq *%rcx
movq 0x5b9bca(%rip), %rax    # 0x854fb8
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movl %ebx, %eax
jmp 0x29b3c2
cmpl $0x41, %eax
jne 0x29b59a
movq 0x5b9bae(%rip), %rax    # 0x854fb8
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl %ebx, %eax
jmp 0x29b3c2
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9b8d(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0x60(%rsp)
jmp 0x29b579
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9b5e(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0x68(%rsp)
jmp 0x29b579
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9b2f(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0x50(%rsp)
jmp 0x29b579
movq 0x5b9b0e(%rip), %rax    # 0x854fb8
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movl %ebx, %eax
jmp 0x29b3c2
movq 0x5b9af8(%rip), %rax    # 0x854fb8
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movl %ebx, %eax
jmp 0x29b3c2
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9ad1(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0xc0(%rsp)
jmp 0x29b579
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9aa2(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0x48(%rsp)
jmp 0x29b579
movl %ebx, %eax
movl %r14d, 0x34(%rsp)
jmp 0x29b3c2
movq 0x5b9a78(%rip), %rax    # 0x854fb8
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl %ebx, %eax
jmp 0x29b3c2
callq 0x29b030
movl %ebx, %r14d
movq %rax, %rbx
andl $0x0, (%rax)
movq 0x5b9a54(%rip), %rax    # 0x854fb8
movq (%rax), %rdi
leaq 0x40(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x29b1b0
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
movl %r14d, %eax
pushq $0x1
popq %r14
je 0x29b3c2
leaq 0x3bfbb2(%rip), %rdi    # 0x65b142
callq 0x29b110
jmp 0x29bd3b
cmpl $-0x1, %eax
jne 0x29bcb4
movl %ebx, 0x58(%rsp)
testl %ebx, %ebx
setne %al
cmpl $0x0, 0x34(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
movq 0x80(%rsp), %rbx
movq 0x78(%rsp), %r14
je 0x29bd43
testq %r14, %r14
je 0x29bd58
movq %r14, %rdi
callq 0x29d820
movb $0x1, %cl
movq %rcx, 0xc8(%rsp)
testq %rax, %rax
je 0x29b638
movl $0x0, 0x38(%rsp)
movq 0x18(%rsp), %rdi
movq %rax, 0xd0(%rsp)
testq %rdi, %rdi
je 0x29b697
callq 0x29d820
movq %rax, 0x88(%rsp)
testq %rax, %rax
jne 0x29b6a3
movq 0x5b99b1(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bfc0a(%rip), %rdi    # 0x65b23b
pushq $0x1f
jmp 0x29bd32
leaq 0x3bfbac(%rip), %rsi    # 0x65b1eb
movq %r14, %rdi
callq 0x29b1a0
testl %eax, %eax
je 0x29bc9c
leaq 0x3bfb9c(%rip), %rsi    # 0x65b1f2
movq %r14, %rdi
callq 0x29b1a0
testl %eax, %eax
je 0x29bca8
leaq 0x445439(%rip), %rsi    # 0x6e0aa6
movq %r14, %rdi
callq 0x29b070
testq %rax, %rax
je 0x29bd82
movb $0x1, %al
movl %eax, 0x38(%rsp)
movq $0x0, 0xc8(%rsp)
xorl %eax, %eax
jmp 0x29b5f4
movq $0x0, 0x88(%rsp)
testq %rbx, %rbx
je 0x29b6d6
movq %rbx, %rdi
callq 0x29d99c
movq %rax, 0x18(%rsp)
testq %rax, %rax
movl 0x58(%rsp), %ebx
jne 0x29b6e3
movq 0x5b9913(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bfb8c(%rip), %rdi    # 0x65b25b
pushq $0x29
jmp 0x29bd32
movq $0x0, 0x18(%rsp)
movl 0x58(%rsp), %ebx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x29bd6d
callq 0x29fc78
movq %rax, 0x70(%rsp)
movq 0x8(%rax), %r12
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x29b881
callq 0x29fc78
movq %rax, 0x20(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movl 0x50(%rsp), %eax
movq %rax, 0x90(%rsp)
xorl %r15d, %r15d
testq %r12, %r12
cmovleq %r15, %r12
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r12, 0xa0(%rsp)
cmpq 0x38(%rsp), %r15
movq 0xd0(%rsp), %rdx
je 0x29b868
movq %rdx, %rbp
cmpl $0x0, 0x50(%rsp)
jle 0x29b78d
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %r15, %rcx
shlq $0x6, %rcx
movq 0x90(%rsp), %rsi
cmpq %rsi, 0x20(%rax,%rcx)
movq %rdx, %rbp
cmovaq 0x88(%rsp), %rbp
xorl %r13d, %r13d
callq 0x2a0858
movsd %xmm0, 0x58(%rsp)
movq %r15, 0x98(%rsp)
shlq $0x6, %r15
pushq $0x28
popq %r14
subq $0x1, %r12
jb 0x29b805
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax,%r15), %rdi
movl 0x20(%rax,%r15), %esi
movq 0x70(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r14), %rdx
movl -0x8(%rax,%r14), %ecx
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %r8
movq 0x68(%rsp), %r9
callq *%rbp
movq %rax, %rbx
movq %rax, %rdi
callq 0x29f152
addl %eax, %r13d
movq %rbx, %rdi
callq 0x29e0bd
addq $0x40, %r14
jmp 0x29b7ab
callq 0x2a0858
subsd 0x58(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax,%r15), %rdx
leaq 0x3bfa6c(%rip), %rdi    # 0x65b2a0
movq 0x98(%rsp), %r15
movq %r15, %rsi
movl %r13d, %ecx
movb $0x1, %al
callq 0x29b040
movq 0x5b9758(%rip), %rax    # 0x854fa8
movq (%rax), %rdi
callq 0x29b150
incq %r15
movq 0xa0(%rsp), %r12
jmp 0x29b748
leaq 0x3bfa43(%rip), %rdi    # 0x65b2b2
movsd 0x28(%rsp), %xmm0
movb $0x1, %al
callq 0x29b040
jmp 0x29bc79
leaq -0x1(%r12), %rax
imulq %r12, %rax
shrq %rax
movq %rax, 0x98(%rsp)
movl 0x28(%rsp), %eax
movq %rax, 0x90(%rsp)
movl 0x50(%rsp), %eax
movq %rax, 0xf0(%rsp)
xorl %eax, %eax
movq 0x48(%rsp), %rcx
testl %ecx, %ecx
cmovlel %eax, %ecx
movq %rcx, 0x48(%rsp)
xorl %eax, %eax
xorpd %xmm6, %xmm6
xorpd %xmm3, %xmm3
xorps %xmm2, %xmm2
xorpd %xmm7, %xmm7
xorl %ebp, %ebp
movq %r12, 0xa0(%rsp)
cmpq 0x48(%rsp), %rax
movsd %xmm6, 0xb8(%rsp)
movsd %xmm2, 0xb0(%rsp)
movsd %xmm7, 0xa8(%rsp)
je 0x29bbe0
movq %rax, 0xe0(%rsp)
movsd %xmm3, 0xe8(%rsp)
callq 0x2a0858
movsd %xmm0, 0xd8(%rsp)
xorl %r15d, %r15d
cmpq $0x2, %r12
jb 0x29bb60
cmpq %r15, 0x98(%rsp)
jbe 0x29bb60
cvtsi2sd %r15, %xmm0
movsd %xmm0, 0x20(%rsp)
addsd %xmm0, %xmm0
ucomisd 0x3bf6d8(%rip), %xmm0   # 0x65b028
jb 0x29b958
sqrtsd %xmm0, %xmm0
jmp 0x29b95d
callq 0x29b0f0
callq 0x29b1f0
movsd 0x3bf69e(%rip), %xmm2   # 0x65b008
addsd %xmm2, %xmm0
movsd 0x3bf69a(%rip), %xmm3   # 0x65b010
movapd %xmm3, %xmm1
maxsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd 0x3bf686(%rip), %xmm0   # 0x65b018
movsd 0x20(%rsp), %xmm4
movapd %xmm4, %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jb 0x29b9b0
addsd %xmm1, %xmm0
addsd %xmm3, %xmm1
jmp 0x29b998
cvttsd2si %xmm2, %rax
movsd 0x3bf663(%rip), %xmm0   # 0x65b020
subsd %xmm0, %xmm2
cvttsd2si %xmm2, %rcx
movq %rax, %r13
sarq $0x3f, %r13
andq %rcx, %r13
orq %rax, %r13
cvttsd2si %xmm1, %rax
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rax, %r12
sarq $0x3f, %r12
andq %rcx, %r12
orq %rax, %r12
movq 0x70(%rsp), %rax
movq (%rax), %rax
testl %ebx, %ebx
je 0x29ba1f
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rcx
movq %r12, %rdx
shlq $0x6, %rdx
cmpq 0x20(%rax,%rdx), %rcx
movq %r13, %rcx
cmovaq %r12, %rcx
cmovaq %r13, %r12
jmp 0x29ba49
cmpl $0x0, 0x34(%rsp)
je 0x29ba4c
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rcx
movq %r12, %rdx
shlq $0x6, %rdx
cmpq 0x20(%rax,%rdx), %rcx
movq %r13, %rcx
cmovbq %r12, %rcx
cmovbq %r13, %r12
movq %rcx, %r13
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rdx
movq 0x90(%rsp), %rsi
cmpq %rsi, %rdx
cmovbq %rdx, %rsi
cmpl $0x0, 0x28(%rsp)
cmovleq %rdx, %rsi
cmpb $0x0, 0x38(%rsp)
je 0x29ba88
cmpb $0x0, 0xc8(%rsp)
je 0x29bada
xorl %ebx, %ebx
jmp 0x29bb16
cmpq 0xf0(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq %rdx, %r10
cmovaq 0x88(%rsp), %r10
cmpl $0x0, 0x50(%rsp)
cmovleq %rdx, %r10
movq 0x28(%rax,%rcx), %rdi
movq %r12, %rcx
shlq $0x6, %rcx
movq 0x28(%rax,%rcx), %rdx
movl 0x20(%rax,%rcx), %ecx
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %r8
movq 0x68(%rsp), %r9
callq *%r10
jmp 0x29bb13
movq 0x28(%rax,%rcx), %rdi
movq %r12, %rcx
shlq $0x6, %rcx
movq 0x28(%rax,%rcx), %rdx
movl 0x20(%rax,%rcx), %ecx
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movl %eax, (%rsp)
movq 0x60(%rsp), %r8
movq 0x68(%rsp), %r9
callq 0x32fcf0
movq %rax, %rbx
movq %rbx, %rdi
callq 0x29f152
movl %eax, %r14d
movq %rbx, %rdi
callq 0x29f152
testl %eax, %eax
je 0x29bb41
leaq 0x3bf78d(%rip), %rdi    # 0x65b2c1
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x29b040
addl %r14d, %ebp
movq %rbx, %rdi
callq 0x29e0bd
incq %r15
movl 0x58(%rsp), %ebx
movq 0xa0(%rsp), %r12
jmp 0x29b921
callq 0x2a0858
subsd 0xd8(%rsp), %xmm0
movapd %xmm0, %xmm1
movapd %xmm0, %xmm7
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x29bb9d
movsd 0xb0(%rsp), %xmm1
minsd %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm7
maxsd %xmm0, %xmm7
incq %rax
movapd %xmm0, %xmm3
movsd 0xb8(%rsp), %xmm6
subsd %xmm6, %xmm3
cvtsi2sd %rax, %xmm4
movapd %xmm3, %xmm5
divsd %xmm4, %xmm5
addsd %xmm5, %xmm6
subsd %xmm6, %xmm0
mulsd %xmm3, %xmm0
movsd 0xe8(%rsp), %xmm3
addsd %xmm0, %xmm3
movapd %xmm1, %xmm2
jmp 0x29b8d9
movq 0x48(%rsp), %rax
decq %rax
movq %rax, %xmm0
punpckldq 0x3bf43b(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x3bf443(%rip), %xmm0   # 0x65b040
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jb 0x29bc1d
sqrtsd %xmm3, %xmm1
jmp 0x29bc45
movapd %xmm3, %xmm0
callq 0x29b0f0
movsd 0xa8(%rsp), %xmm7
movsd 0xb0(%rsp), %xmm2
movsd 0xb8(%rsp), %xmm6
movapd %xmm0, %xmm1
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rsi
movl %ebp, (%rsp)
leaq 0x3bf67d(%rip), %rdi    # 0x65b2d9
pushq $0x1
popq %r9
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movapd %xmm6, %xmm0
movapd %xmm7, %xmm3
movb $0x4, %al
callq 0x29b040
movq 0x5b9328(%rip), %rax    # 0x854fa8
movq (%rax), %rdi
callq 0x29b150
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf5(%rip), %rax        # 0x29bd98
jmp 0x29b5ec
leaq 0xf9(%rip), %rax        # 0x29bda8
jmp 0x29b5ec
cmpl $0x3f, %eax
jne 0x29bd1f
movq 0x5b9310(%rip), %rax    # 0x854fd0
movl (%rax), %ebx
movl %ebx, %eax
andl $-0x5, %eax
addl $-0x61, %eax
leaq 0x3bf478(%rip), %rsi    # 0x65b149
cmpl $0x2, %eax
jb 0x29bd0a
leal -0x69(%rbx), %eax
cmpl $0xb, %eax
ja 0x29bce8
movl $0x861, %ecx            # imm = 0x861
btl %eax, %ecx
jb 0x29bd0a
callq 0x29b140
movq (%rax), %rax
movslq %ebx, %rcx
testb $0x40, 0x1(%rax,%rcx,2)
leaq 0x3bf483(%rip), %rax    # 0x65b182
leaq 0x3bf465(%rip), %rsi    # 0x65b16b
cmoveq %rax, %rsi
movq 0x5b92c7(%rip), %rax    # 0x854fd8
movq (%rax), %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x29b1c0
jmp 0x29bd3b
movq 0x5b92b2(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bf474(%rip), %rdi    # 0x65b1a4
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x29b210
pushq $0x1
popq %rdi
callq 0x29b180
movq 0x5b928e(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bf468(%rip), %rdi    # 0x65b1bc
pushq $0x2e
jmp 0x29bd32
movq 0x5b9279(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bf4af(%rip), %rdi    # 0x65b218
pushq $0x22
jmp 0x29bd32
movq 0x5b9264(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bf507(%rip), %rdi    # 0x65b285
pushq $0x1a
jmp 0x29bd32
movq 0x5b924f(%rip), %rax    # 0x854fd8
movq (%rax), %rcx
leaq 0x3bf465(%rip), %rdi    # 0x65b1f8
jmp 0x29b631