#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 */
double exp(double);
int pow(double, int);
double log_gaussian_prior_integrand(double u, double ak, double bk, double mulB,
                                    double siglB, double T, double B_best,
                                    double lB_best) {
  double B = exp(u) * B_best;
  double lB = u + lB_best;
  double ret = exp(-ak / (2 * T) * pow(B - B_best, 2) -
                   pow(lB - mulB, 2) / (2 * pow(siglB, 2)));
  return ret;
}


x86 assembly (clang, -O0):
<log_gaussian_prior_integrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe69(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,-0x5c(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
shl    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_gaussian_prior_integrand>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm7,0x8(%rsp)
movsd  %xmm6,0x28(%rsp)
movsd  %xmm5,(%rsp)
movsd  %xmm4,0x38(%rsp)
movsd  %xmm3,0x30(%rsp)
movaps %xmm1,0x10(%rsp)
movsd  %xmm0,0x20(%rsp)
call   1030 <exp@plt>
movsd  0x28(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd 0x10(%rsp),%xmm1
xorpd  0xe96(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
addsd  0x20(%rsp),%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  (%rsp),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
subsd  %xmm3,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ebx
movsd  0x38(%rsp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbx
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @log_gaussian_prior_integrand(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%20 = load double, double* %9
%21 = call double @exp(double %20)
%22 = load double, double* %15
%23 = fmul double %21, %22
store double %23, double* %17
%24 = load double, double* %9
%25 = load double, double* %16
%26 = fadd double %24, %25
store double %26, double* %18
%27 = load double, double* %10
%28 = fneg double %27
%29 = load double, double* %14
%30 = fmul double 2.000000e+00, %29
%31 = fdiv double %28, %30
%32 = load double, double* %17
%33 = load double, double* %15
%34 = fsub double %32, %33
%35 = call i32 @pow(double %34, i32 2)
%36 = sitofp i32 %35 to double
%37 = load double, double* %18
%38 = load double, double* %12
%39 = fsub double %37, %38
%40 = call i32 @pow(double %39, i32 2)
%41 = load double, double* %13
%42 = call i32 @pow(double %41, i32 2)
%43 = mul nsw i32 2, %42
%44 = sdiv i32 %40, %43
%45 = sitofp i32 %44 to double
%46 = fneg double %45
%47 = call double @llvm.fmuladd.f64(double %31, double %36, double %46)
%48 = call double @exp(double %47)
store double %48, double* %19
%49 = load double, double* %19
ret double %49
}

LLVM IR (-O2):
define double @log_gaussian_prior_integrand(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = tail call double @exp(double %0)
%10 = fmul double %9, %6
%11 = fadd double %0, %7
%12 = fneg double %1
%13 = fmul double %5, 2.000000e+00
%14 = fdiv double %12, %13
%15 = fsub double %10, %6
%16 = tail call i32 @pow(double %15, i32 2)
%17 = sitofp i32 %16 to double
%18 = fsub double %11, %3
%19 = tail call i32 @pow(double %18, i32 2)
%20 = tail call i32 @pow(double %4, i32 2)
%21 = shl nsw i32 %20, 1
%22 = sdiv i32 %19, %21
%23 = sitofp i32 %22 to double
%24 = fneg double %23
%25 = tail call double @llvm.fmuladd.f64(double %14, double %17, double %24)
%26 = tail call double @exp(double %25)
ret double %26
}