#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 boltzmann(double, double const, double const);
void derivs_one(double *y, double *dxdt, const double *p) {
  dxdt[0] = p[5] * (y[0] - y[0] * y[0] * y[0]) - y[1] + p[0];
  dxdt[1] = p[1] * (boltzmann(y[0], p[2], p[3]) - y[1]);
}


x86 assembly (clang, -O0):
<derivs_one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
call   1030 <boltzmann@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<derivs_one>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm1,%xmm0
mulsd  0x28(%rdx),%xmm0
subsd  0x8(%rdi),%xmm0
mov    %rsi,%r14
addsd  (%rdx),%xmm0
movsd  %xmm0,(%rsi)
movsd  (%rdi),%xmm0
movsd  0x8(%rdx),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x10(%rdx),%xmm1
movsd  0x18(%rdx),%xmm2
call   1030 <boltzmann@plt>
subsd  0x8(%rbx),%xmm0
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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