// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %r12
movl %edi, %r15d
leaq 0x50(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0x40(%rsp)
movl $0x1, %eax
movq %rax, 0x18(%rsp)
movl $0xa, %eax
movq %rax, 0x48(%rsp)
leaq 0x3c1f9d(%rip), %rax    # 0x6bb100
movq %rax, 0x88(%rsp)
movl $0x3, %eax
movq %rax, 0xb0(%rsp)
leaq 0x3c1f8a(%rip), %r14    # 0x6bb109
leaq 0x3c1eaa(%rip), %r13    # 0x6bb030
movq $0x0, 0x80(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
xorl %ebp, %ebp
movl $0x0, 0x58(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x1, %ecx
movq %rcx, 0x70(%rsp)
movq $0x0, 0x60(%rsp)
movl %ebp, %ebx
movl %r15d, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x29b080
cmpl $0x60, %eax
jle 0x2f9210
addl $-0x61, %eax
cmpl $0x13, %eax
ja 0x2f9b29
movslq (%r13,%rax,4), %rcx
addq %r13, %rcx
movl $0x1, %ebp
jmpq *%rcx
movq 0x5f6db7(%rip), %rax    # 0x8effb8
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
cmpl $0x41, %eax
jne 0x2f93e8
movq 0x5f6d98(%rip), %rax    # 0x8effb8
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
movl $0x1, 0x58(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6d69(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0xb0(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
jmp 0x2f9b1a
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6d2a(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0x18(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
jmp 0x2f9b10
movq 0x5f6cfe(%rip), %rax    # 0x8effb8
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6cd8(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0x60(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
jmp 0x2f9b24
movq 0x5f6cac(%rip), %rax    # 0x8effb8
movq (%rax), %rax
movq %rax, 0x88(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
movq 0x5f6c93(%rip), %rax    # 0x8effb8
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movl %ebx, %ebp
jmp 0x2f91ca
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6c6d(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0x70(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
jmp 0x2f9b15
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6c31(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0x28(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
jmp 0x2f9b1f
callq 0x29b030
movl %ebx, %ebp
movq %rax, %rbx
movl $0x0, (%rax)
movq 0x5f6bf5(%rip), %rax    # 0x8effb8
movq (%rax), %rdi
leaq 0x50(%rsp), %rsi
movl $0xa, %edx
callq 0x29b1b0
movq %rax, 0x48(%rsp)
cmpl $0x0, (%rbx)
je 0x2f91ca
callq 0x29b2c9
cmpl $-0x1, %eax
jne 0x2f9b06
movl %ebx, 0x68(%rsp)
testl %ebx, %ebx
setne %al
cmpl $0x0, 0x58(%rsp)
setne %cl
andb %al, %cl
cmpb $0x1, %cl
movq 0x88(%rsp), %rbx
movq 0x80(%rsp), %r14
je 0x2f9b2e
testq %r14, %r14
je 0x2f9b33
movq %r14, %rdi
callq 0x2fad44
movq %rax, %r15
movb $0x1, %al
movq %rax, 0xa8(%rsp)
testq %r15, %r15
je 0x2f946e
movl $0x0, 0x38(%rsp)
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2f94ce
callq 0x2fad44
movq %rax, 0x90(%rsp)
testq %rax, %rax
jne 0x2f94da
callq 0x29b342
leaq 0x3c1d56(%rip), %rsi    # 0x6bb1cb
movq %r14, %rdi
callq 0x29b1a0
testl %eax, %eax
je 0x2f9a47
leaq 0x3c1d46(%rip), %rsi    # 0x6bb1d2
movq %r14, %rdi
callq 0x29b1a0
testl %eax, %eax
je 0x2f9afa
leaq 0x44768e(%rip), %rsi    # 0x740b31
movq %r14, %rdi
callq 0x29b070
testq %rax, %rax
je 0x2f9b3d
movb $0x1, %al
movl %eax, 0x38(%rsp)
movq $0x0, 0xa8(%rsp)
xorl %r15d, %r15d
jmp 0x2f9448
movq $0x0, 0x90(%rsp)
testq %rbx, %rbx
je 0x2f94f5
movq %rbx, %rdi
callq 0x2faed0
testq %rax, %rax
movl 0x68(%rsp), %ebx
jne 0x2f94fb
callq 0x29b367
xorl %eax, %eax
movl 0x68(%rsp), %ebx
movq %rax, 0xa0(%rsp)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x2f9b38
callq 0x2fcc78
movq %rax, 0x20(%rsp)
movq 0x8(%rax), %r12
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
movq %r14, 0x18(%rsp)
movq %r15, 0xb8(%rsp)
je 0x2f9693
callq 0x2fcc78
movq %rax, %rbp
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x2f9a24
movl 0x60(%rsp), %eax
movq %rax, 0x58(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %r13d, %r13d
movq %r12, 0x98(%rsp)
movq %r15, %rbx
cmpl $0x0, 0x60(%rsp)
jle 0x2f959d
movq (%rbp), %rax
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x58(%rsp), %rdx
cmpq %rdx, 0x20(%rax,%rcx)
movq %r15, %rbx
cmovaq 0x90(%rsp), %rbx
callq 0x2fd904
movsd %xmm0, 0x38(%rsp)
testq %r12, %r12
movq %r13, 0x68(%rsp)
jle 0x2f961c
movq %rbx, 0x40(%rsp)
xorl %ebx, %ebx
movl $0x28, %r15d
shlq $0x6, %r13
movq (%rbp), %rax
movq 0x28(%rax,%r13), %rdi
movl 0x20(%rax,%r13), %esi
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r15), %rdx
movl -0x8(%rax,%r15), %ecx
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %r8
movq 0x18(%rsp), %r9
callq *0x40(%rsp)
movq %rax, %r14
movq %rax, %rdi
callq 0x2fc79a
addl %eax, %ebx
movq %r14, %rdi
callq 0x2fb928
addq $0x40, %r15
decq %r12
jne 0x2f95c3
jmp 0x2f961e
xorl %ebx, %ebx
callq 0x2fd904
subsd 0x38(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movq (%rbp), %rax
movq 0x68(%rsp), %r13
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rdx
leaq 0x3c1c2b(%rip), %rdi    # 0x6bb280
movq %r13, %rsi
movl %ebx, %ecx
movb $0x1, %al
callq 0x29b040
movq 0x5f6940(%rip), %rax    # 0x8effa8
movq (%rax), %rdi
callq 0x29b150
incq %r13
cmpq 0x30(%rsp), %r13
movq 0xb8(%rsp), %r15
movq 0x98(%rsp), %r12
jne 0x2f9572
jmp 0x2f9a2e
xorpd %xmm0, %xmm0
movq 0x70(%rsp), %rbp
testl %ebp, %ebp
jle 0x2f9a53
leaq -0x1(%r12), %rax
imulq %r12, %rax
movq %rax, %rcx
shrq %rcx
movq %rcx, 0x30(%rsp)
cmpq $0x2, %r12
setae %cl
cmpq $0x2, %rax
setae %al
andb %cl, %al
movb %al, 0x17(%rsp)
movl 0x28(%rsp), %eax
movq %rax, 0x98(%rsp)
movl 0x60(%rsp), %eax
movq %rax, 0xf0(%rsp)
movl %ebp, %eax
movq %rax, 0xc0(%rsp)
decl %ebp
movq %rbp, 0x70(%rsp)
xorl %r15d, %r15d
xorpd %xmm5, %xmm5
xorpd %xmm1, %xmm1
xorpd %xmm4, %xmm4
xorl %eax, %eax
movsd %xmm5, 0xc8(%rsp)
movsd %xmm0, 0xd0(%rsp)
movq %rax, 0xe0(%rsp)
movsd %xmm1, 0xe8(%rsp)
movsd %xmm4, 0x78(%rsp)
callq 0x2fd904
movsd %xmm0, 0xd8(%rsp)
cmpb $0x0, 0x17(%rsp)
je 0x2f9978
xorl %ebp, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %rbp, %xmm0
movsd %xmm0, 0x40(%rsp)
addsd %xmm0, %xmm0
ucomisd 0x3c18c4(%rip), %xmm0   # 0x6bb028
jb 0x2f976c
sqrtsd %xmm0, %xmm0
jmp 0x2f9771
callq 0x29b0f0
callq 0x29b1f0
movsd 0x3c188a(%rip), %xmm2   # 0x6bb008
addsd %xmm2, %xmm0
movsd 0x3c1886(%rip), %xmm3   # 0x6bb010
movapd %xmm3, %xmm1
maxsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
mulsd 0x3c1872(%rip), %xmm0   # 0x6bb018
movsd 0x40(%rsp), %xmm4
movapd %xmm4, %xmm2
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jb 0x2f97c4
addsd %xmm1, %xmm0
addsd %xmm3, %xmm1
jmp 0x2f97ac
cvttsd2si %xmm2, %rax
movsd 0x3c184f(%rip), %xmm0   # 0x6bb020
subsd %xmm0, %xmm2
cvttsd2si %xmm2, %rcx
movq %rax, %r12
sarq $0x3f, %r12
andq %rcx, %r12
orq %rax, %r12
cvttsd2si %xmm1, %rax
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
movq %rax, %r13
sarq $0x3f, %r13
andq %rcx, %r13
orq %rax, %r13
movq 0x20(%rsp), %rax
movq (%rax), %rax
testl %ebx, %ebx
je 0x2f9833
movq %r12, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rcx
movq %r13, %rdx
shlq $0x6, %rdx
cmpq 0x20(%rax,%rdx), %rcx
movq %r12, %rcx
cmovaq %r13, %rcx
cmovaq %r12, %r13
jmp 0x2f985d
cmpl $0x0, 0x58(%rsp)
je 0x2f9860
movq %r12, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rcx
movq %r13, %rdx
shlq $0x6, %rdx
cmpq 0x20(%rax,%rdx), %rcx
movq %r12, %rcx
cmovbq %r13, %rcx
cmovbq %r12, %r13
movq %rcx, %r12
movq %r12, %rcx
shlq $0x6, %rcx
movq 0x20(%rax,%rcx), %rdx
movq 0x98(%rsp), %rsi
cmpq %rsi, %rdx
cmovbq %rdx, %rsi
cmpl $0x0, 0x28(%rsp)
cmovleq %rdx, %rsi
cmpb $0x0, 0x38(%rsp)
je 0x2f989c
cmpb $0x0, 0xa8(%rsp)
je 0x2f98f1
xorl %ebx, %ebx
jmp 0x2f9930
cmpq 0xf0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
movq %rdx, %r10
cmovaq 0x90(%rsp), %r10
cmpl $0x0, 0x60(%rsp)
cmovleq %rdx, %r10
movq 0x28(%rax,%rcx), %rdi
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x28(%rax,%rcx), %rdx
movl 0x20(%rax,%rcx), %ecx
movq 0xa0(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %r8
movq 0x18(%rsp), %r9
callq *%r10
jmp 0x2f992d
movq 0x28(%rax,%rcx), %rdi
movq %r13, %rcx
shlq $0x6, %rcx
movq 0x28(%rax,%rcx), %rdx
movl 0x20(%rax,%rcx), %ecx
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rax
movl %eax, (%rsp)
movq 0x48(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x38cb60
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2fc79a
movl %eax, %r14d
movq %rbx, %rdi
callq 0x2fc79a
testl %eax, %eax
je 0x2f995b
leaq 0x3c1953(%rip), %rdi    # 0x6bb2a1
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x29b040
addl %r14d, %r15d
movq %rbx, %rdi
callq 0x2fb928
incq %rbp
cmpq %rbp, 0x30(%rsp)
movl 0x68(%rsp), %ebx
ja 0x2f974a
callq 0x2fd904
subsd 0xd8(%rsp), %xmm0
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
movq 0xe0(%rsp), %rax
testq %rax, %rax
movq 0x18(%rsp), %r14
je 0x2f99be
movsd 0xc8(%rsp), %xmm2
minsd %xmm0, %xmm2
movsd 0xd0(%rsp), %xmm1
maxsd %xmm0, %xmm1
movapd %xmm1, %xmm3
incq %rax
movapd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm4
subsd %xmm4, %xmm1
xorps %xmm5, %xmm5
cvtsi2sd %rax, %xmm5
movapd %xmm1, %xmm6
divsd %xmm5, %xmm6
addsd %xmm6, %xmm4
subsd %xmm4, %xmm0
mulsd %xmm1, %xmm0
movsd 0xe8(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm3, %xmm0
movapd %xmm2, %xmm5
cmpq 0xc0(%rsp), %rax
jne 0x2f9706
movl 0x70(%rsp), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
jmp 0x2f9a66
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x3c185d(%rip), %rdi    # 0x6bb292
movsd 0x28(%rsp), %xmm0
movb $0x1, %al
callq 0x29b040
jmp 0x2f9ad7
leaq 0xf4(%rip), %r15        # 0x2f9b42
jmp 0x2f9440
xorl %r15d, %r15d
xorpd %xmm4, %xmm4
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jb 0x2f9a72
sqrtsd %xmm1, %xmm1
jmp 0x2f9aa3
movapd %xmm1, %xmm0
movsd %xmm4, 0x78(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm3, 0x20(%rsp)
callq 0x29b0f0
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
movsd 0x78(%rsp), %xmm4
movapd %xmm0, %xmm1
movq 0x48(%rsp), %rcx
movl %r15d, (%rsp)
leaq 0x3c1806(%rip), %rdi    # 0x6bb2b9
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movl %r14d, %r8d
movl $0x1, %r9d
movapd %xmm4, %xmm0
movb $0x4, %al
callq 0x29b040
movq 0x5f64ca(%rip), %rax    # 0x8effa8
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 0x53(%rip), %r15        # 0x2f9b54
jmp 0x2f9440
cmpl $0x3f, %eax
jne 0x2f9b29
callq 0x29b230
callq 0x29b2b4
callq 0x29b2de
callq 0x29b2f3
callq 0x29b29f
callq 0x29b308
callq 0x29b3fb
callq 0x29b3d6
callq 0x29b3b1
callq 0x29b38c
callq 0x29b31d