pp(double *in, double *out, int nin, int nout, double *var, double *con) {
  out[0] = in[2] * ((in[2] + in[1]) * (1 - in[2]) - in[3]);
  out[1] = in[3] * (in[2] - in[0]);
}


x86 assembly (clang, -O0):
<pp>:
push   %rbp
mov    %rsp,%rbp
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  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0xebf(%rip),%xmm3
subsd  0x10(%rax),%xmm3
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pp>:
movsd  0x10(%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0xeea(%rip),%xmm2
subsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
subsd  0x18(%rdi),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rsi)
movsd  0x10(%rdi),%xmm0
subsd  (%rdi),%xmm0
mulsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define i32 @pp(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*
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
%14 = load double*, double** %8
%15 = getelementptr inbounds double, double* %14, i64 2
%16 = load double, double* %15
%17 = load double*, double** %8
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %8
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = fadd double %19, %22
%24 = load double*, double** %8
%25 = getelementptr inbounds double, double* %24, i64 2
%26 = load double, double* %25
%27 = fsub double 1.000000e+00, %26
%28 = load double*, double** %8
%29 = getelementptr inbounds double, double* %28, i64 3
%30 = load double, double* %29
%31 = fneg double %30
%32 = call double @llvm.fmuladd.f64(double %23, double %27, double %31)
%33 = fmul double %16, %32
%34 = load double*, double** %9
%35 = getelementptr inbounds double, double* %34, i64 0
store double %33, double* %35
%36 = load double*, double** %8
%37 = getelementptr inbounds double, double* %36, i64 3
%38 = load double, double* %37
%39 = load double*, double** %8
%40 = getelementptr inbounds double, double* %39, i64 2
%41 = load double, double* %40
%42 = load double*, double** %8
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fsub double %41, %44
%46 = fmul double %38, %45
%47 = load double*, double** %9
%48 = getelementptr inbounds double, double* %47, i64 1
store double %46, double* %48
%49 = load i32, i32* %7
ret i32 %49
}

LLVM IR (-O2):
define i32 @pp(double* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = fsub double 1.000000e+00, %8
%13 = getelementptr inbounds double, double* %0, i64 3
%14 = load double, double* %13
%15 = fneg double %14
%16 = tail call double @llvm.fmuladd.f64(double %11, double %12, double %15)
%17 = fmul double %8, %16
store double %17, double* %1
%18 = load double, double* %13
%19 = load double, double* %7
%20 = load double, double* %0
%21 = fsub double %19, %20
%22 = fmul double %18, %21
%23 = getelementptr inbounds double, double* %1, i64 1
store double %22, double* %23
ret i32 undef
}