#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);
void computeVariables(double voi, double *states, double *rates,
                      double *variables) {
  variables[0] = states[1] + 5.0 * states[1] / 3.0 + 1.0 * exp(states[1] / 2.0);
  variables[1] = 2.0 * states[0];
}


x86 assembly (clang, -O0):
<computeVariables>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0xed2(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
movsd  0xebd(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xe97(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  -0x28(%rbp),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe71(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeVariables>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movsd  0x8(%rdi),%xmm0
movsd  0xedc(%rip),%xmm1
mulsd  %xmm0,%xmm1
divsd  0xed8(%rip),%xmm1
mov    %rdx,%rbx
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mulsd  0xecc(%rip),%xmm0
call   1030 <exp@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%r14),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @computeVariables(double %0, double* %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double %0, double* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %6
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double 5.000000e+00, %14
%16 = fdiv double %15, 3.000000e+00
%17 = fadd double %11, %16
%18 = load double*, double** %6
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %19
%21 = fdiv double %20, 2.000000e+00
%22 = call double @exp(double %21)
%23 = call double @llvm.fmuladd.f64(double 1.000000e+00, double %22, double %17)
%24 = load double*, double** %8
%25 = getelementptr inbounds double, double* %24, i64 0
store double %23, double* %25
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = fmul double 2.000000e+00, %28
%30 = load double*, double** %8
%31 = getelementptr inbounds double, double* %30, i64 1
store double %29, double* %31
ret void
}

LLVM IR (-O2):
define void @computeVariables(double %0, double* nocapture %1, double* nocapture readnone %2, double* nocapture writeonly %3) {
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fmul double %6, 5.000000e+00
%8 = fdiv double %7, 3.000000e+00
%9 = fadd double %6, %8
%10 = fmul double %6, 5.000000e-01
%11 = tail call double @exp(double %10)
%12 = fadd double %11, %9
store double %12, double* %3
%13 = load double, double* %1
%14 = fmul double %13, 2.000000e+00
%15 = getelementptr inbounds double, double* %3, i64 1
store double %14, double* %15
ret void
}