fcn(m, n, x, fvec, iflag) int m, n;
int *iflag;
double x[], fvec[];
{
  double temp;
  double exp(), sin(), log();
  fvec[0] = 1.0 - 0.3 * x[0] + 0.9 * x[1] - 1.7 * x[2] + log(1.5 + x[3]);
  fvec[1] = sin(-4.0 * x[0]) - 3.0 * x[1] + 0.1 * x[2] + x[3] * x[3];
  temp = (x[2] + 2.0) * x[2] * x[1];
  fvec[2] = 0.5 * x[1] - sin(x[2] + 1.0) + temp + .3 * x[3];
  fvec[3] = x[0] * x[1] + x[1] * x[2] + x[0] * x[2] - x[3] * x[3];
}


x86 assembly (clang, -O0):
<fcn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xf06(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xedd(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xebc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xe9b(%rip),%xmm0
addsd  0x18(%rax),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xe69(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xe44(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  0xe23(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0xde4(%rip),%xmm0
addsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xda6(%rip),%xmm0
addsd  0x10(%rax),%xmm0
call   1030 <sin@plt>
movsd  -0x38(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xd70(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  -0x30(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xd4a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcn>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
movsd  (%rdx),%xmm0
movsd  0x8(%rdx),%xmm1
mulsd  0xec2(%rip),%xmm0
addsd  0xec2(%rip),%xmm0
mulsd  0xec2(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdx),%xmm0
mulsd  0xeb9(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rdx),%xmm0
addsd  0xeaa(%rip),%xmm0
call   1040 <log@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
mulsd  0xe96(%rip),%xmm0
call   1030 <sin@plt>
movsd  0x8(%rbx),%xmm1
mulsd  0xe8c(%rip),%xmm1
movsd  0x10(%rbx),%xmm2
addsd  %xmm0,%xmm1
mulsd  0xe83(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  0x18(%rbx),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x8(%rbx),%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x10(%rbx),%xmm0
movsd  0xe5c(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsp)
addsd  0xe0a(%rip),%xmm0
call   1030 <sin@plt>
movsd  0x10(%rsp),%xmm1
mulsd  0xe37(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  0x8(%rsp),%xmm1
movsd  0x18(%rbx),%xmm0
mulsd  0xe28(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%r14)
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
movsd  0x10(%rbx),%xmm2
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%rbx),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @fcn(i32 %0, i32 %1, double* %2, double* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32*
%12 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store double* %2, double** %9
store double* %3, double** %10
store i32* %4, i32** %11
%13 = load double*, double** %9
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = call double @llvm.fmuladd.f64(double -3.000000e-01, double %15, double 1.000000e+00)
%17 = load double*, double** %9
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = call double @llvm.fmuladd.f64(double 9.000000e-01, double %19, double %16)
%21 = load double*, double** %9
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = call double @llvm.fmuladd.f64(double -1.700000e+00, double %23, double %20)
%25 = load double*, double** %9
%26 = getelementptr inbounds double, double* %25, i64 3
%27 = load double, double* %26
%28 = fadd double 1.500000e+00, %27
%29 = call double @log(double %28)
%30 = fadd double %24, %29
%31 = load double*, double** %10
%32 = getelementptr inbounds double, double* %31, i64 0
store double %30, double* %32
%33 = load double*, double** %9
%34 = getelementptr inbounds double, double* %33, i64 0
%35 = load double, double* %34
%36 = fmul double -4.000000e+00, %35
%37 = call double @sin(double %36)
%38 = load double*, double** %9
%39 = getelementptr inbounds double, double* %38, i64 1
%40 = load double, double* %39
%41 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %40, double %37)
%42 = load double*, double** %9
%43 = getelementptr inbounds double, double* %42, i64 2
%44 = load double, double* %43
%45 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %44, double %41)
%46 = load double*, double** %9
%47 = getelementptr inbounds double, double* %46, i64 3
%48 = load double, double* %47
%49 = load double*, double** %9
%50 = getelementptr inbounds double, double* %49, i64 3
%51 = load double, double* %50
%52 = call double @llvm.fmuladd.f64(double %48, double %51, double %45)
%53 = load double*, double** %10
%54 = getelementptr inbounds double, double* %53, i64 1
store double %52, double* %54
%55 = load double*, double** %9
%56 = getelementptr inbounds double, double* %55, i64 2
%57 = load double, double* %56
%58 = fadd double %57, 2.000000e+00
%59 = load double*, double** %9
%60 = getelementptr inbounds double, double* %59, i64 2
%61 = load double, double* %60
%62 = fmul double %58, %61
%63 = load double*, double** %9
%64 = getelementptr inbounds double, double* %63, i64 1
%65 = load double, double* %64
%66 = fmul double %62, %65
store double %66, double* %12
%67 = load double*, double** %9
%68 = getelementptr inbounds double, double* %67, i64 1
%69 = load double, double* %68
%70 = load double*, double** %9
%71 = getelementptr inbounds double, double* %70, i64 2
%72 = load double, double* %71
%73 = fadd double %72, 1.000000e+00
%74 = call double @sin(double %73)
%75 = fneg double %74
%76 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %69, double %75)
%77 = load double, double* %12
%78 = fadd double %76, %77
%79 = load double*, double** %9
%80 = getelementptr inbounds double, double* %79, i64 3
%81 = load double, double* %80
%82 = call double @llvm.fmuladd.f64(double 3.000000e-01, double %81, double %78)
%83 = load double*, double** %10
%84 = getelementptr inbounds double, double* %83, i64 2
store double %82, double* %84
%85 = load double*, double** %9
%86 = getelementptr inbounds double, double* %85, i64 0
%87 = load double, double* %86
%88 = load double*, double** %9
%89 = getelementptr inbounds double, double* %88, i64 1
%90 = load double, double* %89
%91 = load double*, double** %9
%92 = getelementptr inbounds double, double* %91, i64 1
%93 = load double, double* %92
%94 = load double*, double** %9
%95 = getelementptr inbounds double, double* %94, i64 2
%96 = load double, double* %95
%97 = fmul double %93, %96
%98 = call double @llvm.fmuladd.f64(double %87, double %90, double %97)
%99 = load double*, double** %9
%100 = getelementptr inbounds double, double* %99, i64 0
%101 = load double, double* %100
%102 = load double*, double** %9
%103 = getelementptr inbounds double, double* %102, i64 2
%104 = load double, double* %103
%105 = call double @llvm.fmuladd.f64(double %101, double %104, double %98)
%106 = load double*, double** %9
%107 = getelementptr inbounds double, double* %106, i64 3
%108 = load double, double* %107
%109 = load double*, double** %9
%110 = getelementptr inbounds double, double* %109, i64 3
%111 = load double, double* %110
%112 = fneg double %108
%113 = call double @llvm.fmuladd.f64(double %112, double %111, double %105)
%114 = load double*, double** %10
%115 = getelementptr inbounds double, double* %114, i64 3
store double %113, double* %115
%116 = load i32, i32* %6
ret i32 %116
}

LLVM IR (-O2):
define i32 @fcn(i32 %0, i32 %1, double* nocapture %2, double* nocapture writeonly %3, i32* nocapture readnone %4) {
%6 = load double, double* %2
%7 = tail call double @llvm.fmuladd.f64(double %6, double -3.000000e-01, double 1.000000e+00)
%8 = getelementptr inbounds double, double* %2, i64 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double 9.000000e-01, double %7)
%11 = getelementptr inbounds double, double* %2, i64 2
%12 = load double, double* %11
%13 = tail call double @llvm.fmuladd.f64(double %12, double -1.700000e+00, double %10)
%14 = getelementptr inbounds double, double* %2, i64 3
%15 = load double, double* %14
%16 = fadd double %15, 1.500000e+00
%17 = tail call double @log(double %16)
%18 = fadd double %13, %17
store double %18, double* %3
%19 = load double, double* %2
%20 = fmul double %19, -4.000000e+00
%21 = tail call double @sin(double %20)
%22 = load double, double* %8
%23 = tail call double @llvm.fmuladd.f64(double %22, double -3.000000e+00, double %21)
%24 = load double, double* %11
%25 = tail call double @llvm.fmuladd.f64(double %24, double 1.000000e-01, double %23)
%26 = load double, double* %14
%27 = tail call double @llvm.fmuladd.f64(double %26, double %26, double %25)
%28 = getelementptr inbounds double, double* %3, i64 1
store double %27, double* %28
%29 = load double, double* %11
%30 = fadd double %29, 2.000000e+00
%31 = fmul double %29, %30
%32 = load double, double* %8
%33 = fmul double %32, %31
%34 = fadd double %29, 1.000000e+00
%35 = tail call double @sin(double %34)
%36 = fneg double %35
%37 = tail call double @llvm.fmuladd.f64(double %32, double 5.000000e-01, double %36)
%38 = fadd double %37, %33
%39 = load double, double* %14
%40 = tail call double @llvm.fmuladd.f64(double %39, double 3.000000e-01, double %38)
%41 = getelementptr inbounds double, double* %3, i64 2
store double %40, double* %41
%42 = load double, double* %2
%43 = load double, double* %8
%44 = load double, double* %11
%45 = fmul double %43, %44
%46 = tail call double @llvm.fmuladd.f64(double %42, double %43, double %45)
%47 = tail call double @llvm.fmuladd.f64(double %42, double %44, double %46)
%48 = load double, double* %14
%49 = fneg double %48
%50 = tail call double @llvm.fmuladd.f64(double %49, double %48, double %47)
%51 = getelementptr inbounds double, double* %3, i64 3
store double %50, double* %51
ret i32 undef
}