void eqns(int neqn, int nvar, const double *x, double *f) {
  f[0] = ((x[0]) * (x[0])) + ((x[1]) * (x[1])) - 34.0;
  f[1] = ((x[0]) * (x[0])) - 2.0 * ((x[1]) * (x[1])) - 7.0;
}


x86 assembly (clang, -O0):
<eqns>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm3
movsd  0xe8e(%rip),%xmm1
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe5b(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqns>:
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
addsd  0xee3(%rip),%xmm0
movsd  %xmm0,(%rcx)
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  0xec6(%rip),%xmm0
movsd  %xmm0,0x8(%rcx)
ret

LLVM IR (-O0):
define void @eqns(i32 %0, i32 %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %7
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %7
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = load double*, double** %7
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = load double*, double** %7
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = fsub double %22, 3.400000e+01
%24 = load double*, double** %8
%25 = getelementptr inbounds double, double* %24, i64 0
store double %23, double* %25
%26 = load double*, double** %7
%27 = getelementptr inbounds double, double* %26, i64 0
%28 = load double, double* %27
%29 = load double*, double** %7
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = load double*, double** %7
%33 = getelementptr inbounds double, double* %32, i64 1
%34 = load double, double* %33
%35 = load double*, double** %7
%36 = getelementptr inbounds double, double* %35, i64 1
%37 = load double, double* %36
%38 = fmul double %34, %37
%39 = fmul double 2.000000e+00, %38
%40 = fneg double %39
%41 = call double @llvm.fmuladd.f64(double %28, double %31, double %40)
%42 = fsub double %41, 7.000000e+00
%43 = load double*, double** %8
%44 = getelementptr inbounds double, double* %43, i64 1
store double %42, double* %44
ret void
}

LLVM IR (-O2):
define void @eqns(i32 %0, i32 %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = load double, double* %2
%6 = getelementptr inbounds double, double* %2, i64 1
%7 = load double, double* %6
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %8)
%10 = fadd double %9, -3.400000e+01
store double %10, double* %3
%11 = load double, double* %2
%12 = load double, double* %6
%13 = fmul double %12, %12
%14 = fmul double %13, -2.000000e+00
%15 = tail call double @llvm.fmuladd.f64(double %11, double %11, double %14)
%16 = fadd double %15, -7.000000e+00
%17 = getelementptr inbounds double, double* %3, i64 1
store double %16, double* %17
ret void
}