#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ calculate_covariance(double *, double *, double *, double *,
                                        double *, double *, double *);
int /*<<< orphan*/ calculate_overdensity(double *, double *, double *);
double calculate_signal(double *, double *, int *, int *);
double calculate_matrices(double *bin_number, double *solid_angle, double *ra,
                          double *dec, double *overdensity, double *cos_angle,
                          double *noise, double *data_covariance,
                          double *signal, int *C_start, int *C_stop) {
  double signaltime;
  calculate_overdensity(overdensity, bin_number, solid_angle);
  calculate_covariance(cos_angle, noise, data_covariance, ra, dec, solid_angle,
                       overdensity);
  signaltime = calculate_signal(signal, cos_angle, C_start, C_stop);
  return signaltime;
}


x86 assembly (clang, -O0):
<calculate_matrices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <calculate_overdensity@plt>
mov    -0x30(%rbp),%rdi
mov    0x10(%rbp),%rsi
mov    0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x28(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <calculate_covariance@plt>
mov    0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x28(%rbp),%rdx
mov    0x30(%rbp),%rcx
call   1040 <calculate_signal@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_matrices>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r14
mov    %r8,%rbx
mov    %rcx,0x10(%rsp)
mov    %rdx,%r12
mov    %rsi,%r13
mov    %rdi,%rsi
mov    0x70(%rsp),%rax
mov    %rax,0x8(%rsp)
mov    0x78(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0x80(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0x60(%rsp),%r15
mov    0x68(%rsp),%rbp
mov    %r8,%rdi
mov    %r13,%rdx
call   1030 <calculate_overdensity@plt>
mov    %rbx,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
mov    0x10(%rsp),%r8
mov    %r13,%r9
call   1050 <calculate_covariance@plt>
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rcx
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <calculate_signal@plt>

LLVM IR (-O0):
define double @calculate_matrices(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, i32* %9, i32* %10) {
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca double
store double* %0, double** %12
store double* %1, double** %13
store double* %2, double** %14
store double* %3, double** %15
store double* %4, double** %16
store double* %5, double** %17
store double* %6, double** %18
store double* %7, double** %19
store double* %8, double** %20
store i32* %9, i32** %21
store i32* %10, i32** %22
%24 = load double*, double** %16
%25 = load double*, double** %12
%26 = load double*, double** %13
%27 = call i32 @calculate_overdensity(double* %24, double* %25, double* %26)
%28 = load double*, double** %17
%29 = load double*, double** %18
%30 = load double*, double** %19
%31 = load double*, double** %14
%32 = load double*, double** %15
%33 = load double*, double** %13
%34 = load double*, double** %16
%35 = call i32 @calculate_covariance(double* %28, double* %29, double* %30, double* %31, double* %32, double* %33, double* %34)
%36 = load double*, double** %20
%37 = load double*, double** %17
%38 = load i32*, i32** %21
%39 = load i32*, i32** %22
%40 = call double @calculate_signal(double* %36, double* %37, i32* %38, i32* %39)
store double %40, double* %23
%41 = load double, double* %23
ret double %41
}

LLVM IR (-O2):
define double @calculate_matrices(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, i32* %9, i32* %10) {
%12 = tail call i32 @calculate_overdensity(double* %4, double* %0, double* %1)
%13 = tail call i32 @calculate_covariance(double* %5, double* %6, double* %7, double* %2, double* %3, double* %1, double* %4)
%14 = tail call double @calculate_signal(double* %8, double* %5, i32* %9, i32* %10)
ret double %14
}