#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 const);
void kawamura_mix_value(const double r, const double *p, double *f) {
  double r6 = r * r * r;
  r6 = r6 * r6;
  *f = p[0] * p[1] / r +
       p[2] * (p[5] + p[6]) * exp((p[3] + p[4] - r) / (p[5] + p[6])) -
       p[7] * p[8] / r6 +
       p[2] * p[9] *
           (exp(-2 * p[10] * (r - p[11])) - 2.0 * exp(-p[10] * (r - p[11])));
}


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

x86 assembly (clang, -O2):
<kawamura_mix_value>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rdi),%xmm2
movsd  0x18(%rdi),%xmm0
mulsd  0x8(%rdi),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm1,%xmm2
movsd  %xmm1,0x20(%rsp)
movsd  0x28(%rdi),%xmm1
addsd  0x30(%rdi),%xmm1
movsd  0x10(%rdi),%xmm3
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x8(%rsp)
addsd  0x20(%rdi),%xmm0
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x10(%rbx),%xmm1
movsd  0x38(%rbx),%xmm0
mulsd  0x40(%rbx),%xmm0
mulsd  0x48(%rbx),%xmm1
movsd  %xmm1,0x10(%rsp)
divsd  0x18(%rsp),%xmm0
movsd  0x50(%rbx),%xmm1
mulsd  0xe43(%rip),%xmm1
subsd  %xmm0,%xmm2
movsd  %xmm2,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
subsd  0x58(%rbx),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0x50(%rbx),%xmm1
xorpd  0xe28(%rip),%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
subsd  0x58(%rbx),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
addsd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @kawamura_mix_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* %4
%10 = fmul double %8, %9
%11 = load double, double* %4
%12 = fmul double %10, %11
store double %12, double* %7
%13 = load double, double* %7
%14 = load double, double* %7
%15 = fmul double %13, %14
store double %15, double* %7
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fmul double %18, %21
%23 = load double, double* %4
%24 = fdiv double %22, %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 5
%30 = load double, double* %29
%31 = load double*, double** %5
%32 = getelementptr inbounds double, double* %31, i64 6
%33 = load double, double* %32
%34 = fadd double %30, %33
%35 = fmul double %27, %34
%36 = load double*, double** %5
%37 = getelementptr inbounds double, double* %36, i64 3
%38 = load double, double* %37
%39 = load double*, double** %5
%40 = getelementptr inbounds double, double* %39, i64 4
%41 = load double, double* %40
%42 = fadd double %38, %41
%43 = load double, double* %4
%44 = fsub double %42, %43
%45 = load double*, double** %5
%46 = getelementptr inbounds double, double* %45, i64 5
%47 = load double, double* %46
%48 = load double*, double** %5
%49 = getelementptr inbounds double, double* %48, i64 6
%50 = load double, double* %49
%51 = fadd double %47, %50
%52 = fdiv double %44, %51
%53 = call double @exp(double %52)
%54 = call double @llvm.fmuladd.f64(double %35, double %53, double %24)
%55 = load double*, double** %5
%56 = getelementptr inbounds double, double* %55, i64 7
%57 = load double, double* %56
%58 = load double*, double** %5
%59 = getelementptr inbounds double, double* %58, i64 8
%60 = load double, double* %59
%61 = fmul double %57, %60
%62 = load double, double* %7
%63 = fdiv double %61, %62
%64 = fsub double %54, %63
%65 = load double*, double** %5
%66 = getelementptr inbounds double, double* %65, i64 2
%67 = load double, double* %66
%68 = load double*, double** %5
%69 = getelementptr inbounds double, double* %68, i64 9
%70 = load double, double* %69
%71 = fmul double %67, %70
%72 = load double*, double** %5
%73 = getelementptr inbounds double, double* %72, i64 10
%74 = load double, double* %73
%75 = fmul double -2.000000e+00, %74
%76 = load double, double* %4
%77 = load double*, double** %5
%78 = getelementptr inbounds double, double* %77, i64 11
%79 = load double, double* %78
%80 = fsub double %76, %79
%81 = fmul double %75, %80
%82 = call double @exp(double %81)
%83 = load double*, double** %5
%84 = getelementptr inbounds double, double* %83, i64 10
%85 = load double, double* %84
%86 = fneg double %85
%87 = load double, double* %4
%88 = load double*, double** %5
%89 = getelementptr inbounds double, double* %88, i64 11
%90 = load double, double* %89
%91 = fsub double %87, %90
%92 = fmul double %86, %91
%93 = call double @exp(double %92)
%94 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %93, double %82)
%95 = call double @llvm.fmuladd.f64(double %71, double %94, double %64)
%96 = load double*, double** %6
store double %95, double* %96
ret void
}

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