#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 onerun(double, int, int, int, int, double, double, double, double);
efm(double *in, double *out, int nin, int nout, double *var, double *con) {
  double S = in[0], ibar = in[1], isig = in[2], tau = in[3];
  double dt = .05;
  int ntrials = 100, niter = 200, nstart = 50, n = 100;
  out[0] = onerun(dt, n, ntrials, niter, nstart, ibar, isig, S, tau);
}


x86 assembly (clang, -O0):
<efm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe93(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x64,-0x5c(%rbp)
movl   $0xc8,-0x60(%rbp)
movl   $0x32,-0x64(%rbp)
movl   $0x64,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x68(%rbp),%edi
mov    -0x5c(%rbp),%esi
mov    -0x60(%rbp),%edx
mov    -0x64(%rbp),%ecx
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x50(%rbp),%xmm4
call   1030 <onerun@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efm>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm3
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm4
movsd  0xed1(%rip),%xmm0
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0xc8,%edx
mov    $0x32,%ecx
call   1030 <onerun@plt>
movsd  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define i32 @efm(double* %0, double* %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store double* %0, double** %8
store double* %1, double** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%23 = load double*, double** %8
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
store double %25, double* %14
%26 = load double*, double** %8
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
store double %28, double* %15
%29 = load double*, double** %8
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
store double %31, double* %16
%32 = load double*, double** %8
%33 = getelementptr inbounds double, double* %32, i64 3
%34 = load double, double* %33
store double %34, double* %17
store double 5.000000e-02, double* %18
store i32 100, i32* %19
store i32 200, i32* %20
store i32 50, i32* %21
store i32 100, i32* %22
%35 = load double, double* %18
%36 = load i32, i32* %22
%37 = load i32, i32* %19
%38 = load i32, i32* %20
%39 = load i32, i32* %21
%40 = load double, double* %15
%41 = load double, double* %16
%42 = load double, double* %14
%43 = load double, double* %17
%44 = call double @onerun(double %35, i32 %36, i32 %37, i32 %38, i32 %39, double %40, double %41, double %42, double %43)
%45 = load double*, double** %9
%46 = getelementptr inbounds double, double* %45, i64 0
store double %44, double* %46
%47 = load i32, i32* %7
ret i32 %47
}

LLVM IR (-O2):
define i32 @efm(double* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = load double, double* %0
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = getelementptr inbounds double, double* %0, i64 2
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %0, i64 3
%13 = load double, double* %12
%14 = tail call double @onerun(double 5.000000e-02, i32 100, i32 100, i32 200, i32 50, double %9, double %11, double %7, double %13)
store double %14, double* %1
ret i32 undef
}