#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 const exp(double);
void born_value(const double r, const double *p, double *f) {
  double x = p[2] - r;
  double r2 = r * r;
  double r6 = r2 * r2 * r2;
  double r8 = r6 * r2;
  *f = p[0] * exp(x / p[1]) - p[3] / r6 + p[4] / r8;
}


x86 assembly (clang, -O0):
<born_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
divsd  0x8(%rax),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
divsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
divsd  -0x38(%rbp),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<born_value>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm1
movsd  (%rdi),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rdi),%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
divsd  0x8(%rdi),%xmm0
call   1030 <exp@plt>
movsd  0x18(%rbx),%xmm1
movsd  0x20(%rbx),%xmm2
divsd  (%rsp),%xmm2
divsd  0x8(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @born_value(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %1, i64 2
%5 = load double, double* %4
%6 = fsub double %5, %0
%7 = fmul double %0, %0
%8 = fmul double %7, %7
%9 = fmul double %7, %8
%10 = fmul double %7, %9
%11 = load double, double* %1
%12 = getelementptr inbounds double, double* %1, i64 1
%13 = load double, double* %12
%14 = fdiv double %6, %13
%15 = tail call double @exp(double %14)
%16 = getelementptr inbounds double, double* %1, i64 3
%17 = load double, double* %16
%18 = fneg double %17
%19 = fdiv double %18, %9
%20 = tail call double @llvm.fmuladd.f64(double %11, double %15, double %19)
%21 = getelementptr inbounds double, double* %1, i64 4
%22 = load double, double* %21
%23 = fdiv double %22, %10
%24 = fadd double %20, %23
store double %24, double* %2
ret void
}