#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 const);
void strmm_value(const double r, const double *p, double *f) {
  double r_0 = r - p[4];
  *f = 2.0 * p[0] * exp(-p[1] / 2.0 * r_0) -
       p[2] * (1.0 + p[3] * r_0) * exp(-p[3] * r_0);
}


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

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

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

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