int monte_solution(double *ifld, double *ofld) {
  double V, M, w;
  double E, I, L, a1, a2, F1, F2, ar1, ar2;
  E = ifld[0];
  I = ifld[1];
  L = ifld[2];
  ar1 = ifld[3];
  ar2 = ifld[4];
  F1 = ifld[5];
  F2 = ifld[6];
  a1 = ar1 * L;
  a2 = ar2 * L;
  M = a1 * F1 + a2 * F2;
  V = F1 + F2;
  w = (F1 * a1 * a1 / (6.0 * E * I)) * (3.0 * L - a1) +
      (F2 * a2 * a2 / (6.0 * E * I)) * (3.0 * L - a2);
  ofld[0] = M;
  ofld[1] = V;
  ofld[2] = w;
  return (0);
}


x86 assembly (clang, -O0):
<monte_solution>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  0xe36(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xdf7(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  0xde0(%rip),%xmm3
mulsd  -0x30(%rbp),%xmm3
mulsd  -0x38(%rbp),%xmm3
divsd  %xmm3,%xmm1
movsd  -0x40(%rbp),%xmm3
movsd  -0x50(%rbp),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
movsd  0xda1(%rip),%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<monte_solution>:
movsd  (%rdi),%xmm2
movsd  0x10(%rdi),%xmm0
movsd  0x28(%rdi),%xmm1
movsd  0x30(%rdi),%xmm8
movsd  0x18(%rdi),%xmm4
mulsd  %xmm0,%xmm4
movsd  0x20(%rdi),%xmm5
mulsd  %xmm0,%xmm5
movapd %xmm5,%xmm6
mulsd  %xmm8,%xmm6
movapd %xmm4,%xmm7
mulsd  0xecd(%rip),%xmm0
movapd %xmm0,%xmm3
subsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm4
addsd  %xmm8,%xmm1
mulsd  %xmm4,%xmm7
mulsd  0xea8(%rip),%xmm2
mulsd  0x8(%rdi),%xmm2
addsd  %xmm6,%xmm4
divsd  %xmm2,%xmm7
mulsd  %xmm7,%xmm3
mulsd  %xmm5,%xmm6
divsd  %xmm2,%xmm6
subsd  %xmm5,%xmm0
mulsd  %xmm6,%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm4,(%rsi)
movsd  %xmm1,0x8(%rsi)
movsd  %xmm0,0x10(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @monte_solution(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 3
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %0, i64 4
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %0, i64 5
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %0, i64 6
%15 = load double, double* %14
%16 = fmul double %7, %9
%17 = fmul double %7, %11
%18 = fmul double %17, %15
%19 = tail call double @llvm.fmuladd.f64(double %16, double %13, double %18)
%20 = fadd double %13, %15
%21 = fmul double %16, %13
%22 = fmul double %16, %21
%23 = fmul double %3, 6.000000e+00
%24 = fmul double %23, %5
%25 = fdiv double %22, %24
%26 = fneg double %16
%27 = tail call double @llvm.fmuladd.f64(double %7, double 3.000000e+00, double %26)
%28 = fmul double %17, %18
%29 = fdiv double %28, %24
%30 = fneg double %17
%31 = tail call double @llvm.fmuladd.f64(double %7, double 3.000000e+00, double %30)
%32 = fmul double %31, %29
%33 = tail call double @llvm.fmuladd.f64(double %25, double %27, double %32)
store double %19, double* %1
%34 = getelementptr inbounds double, double* %1, i64 1
store double %20, double* %34
%35 = getelementptr inbounds double, double* %1, i64 2
store double %33, double* %35
ret i32 0
}