void g23(double *x, double *f, double *g, double *h, int nx, int nf, int ng,
         int nh) {
  int i;
  f[0] = -9.0 * x[4] - 15.0 * x[7] + 6.0 * x[0] + 16.0 * x[1] +
         10.0 * (x[5] + x[6]);
  g[0] = x[8] * x[2] + 0.02 * x[5] - 0.025 * x[4];
  g[1] = x[8] * x[3] + 0.02 * x[6] - 0.015 * x[7];
  h[0] = x[0] + x[1] - x[2] - x[3];
  h[1] = 0.03 * x[0] + 0.01 * x[1] - x[8] * (x[2] + x[3]);
  h[2] = x[2] + x[5] - x[4];
  h[3] = x[3] + x[6] - x[7];
}


x86 assembly (clang, -O0):
<g23>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xf11(%rip),%xmm0
mulsd  0x38(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xee5(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xec5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xea4(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x30(%rax),%xmm0
movsd  0xe7a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0xe3c(%rip),%xmm0
mulsd  0x28(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  0xe26(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0xdf0(%rip),%xmm0
mulsd  0x30(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  0xdca(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0xd72(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  0xd5d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
addsd  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,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x30(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x38(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<g23>:
movsd  0x20(%rdi),%xmm0
movsd  0x38(%rdi),%xmm1
mulsd  0xeee(%rip),%xmm1
mulsd  0xeee(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
mulsd  0xee1(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xedd(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  0x28(%rdi),%xmm0
addsd  0x30(%rdi),%xmm0
mulsd  0xecf(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%rsi)
movsd  0x20(%rdi),%xmm0
movsd  0x40(%rdi),%xmm1
movsd  0xebd(%rip),%xmm2
movsd  0x28(%rdi),%xmm3
mulsd  0x10(%rdi),%xmm1
mulsd  %xmm2,%xmm3
addsd  %xmm3,%xmm1
mulsd  0xeab(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx)
movsd  0x38(%rdi),%xmm0
movsd  0x40(%rdi),%xmm1
mulsd  0x30(%rdi),%xmm2
mulsd  0x18(%rdi),%xmm1
addsd  %xmm2,%xmm1
mulsd  0xe8b(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  (%rdi),%xmm0
addsd  0x8(%rdi),%xmm0
subsd  0x10(%rdi),%xmm0
subsd  0x18(%rdi),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdi),%xmm0
mulsd  0xe66(%rip),%xmm0
movsd  (%rdi),%xmm1
mulsd  0xe62(%rip),%xmm1
movsd  0x10(%rdi),%xmm2
addsd  0x18(%rdi),%xmm2
mulsd  0x40(%rdi),%xmm2
addsd  %xmm0,%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rcx)
movsd  0x10(%rdi),%xmm0
addsd  0x28(%rdi),%xmm0
subsd  0x20(%rdi),%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x18(%rdi),%xmm0
addsd  0x30(%rdi),%xmm0
subsd  0x38(%rdi),%xmm0
movsd  %xmm0,0x18(%rcx)
ret

LLVM IR (-O0):
define void @g23(double* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load double*, double** %9
%19 = getelementptr inbounds double, double* %18, i64 4
%20 = load double, double* %19
%21 = load double*, double** %9
%22 = getelementptr inbounds double, double* %21, i64 7
%23 = load double, double* %22
%24 = fmul double 1.500000e+01, %23
%25 = fneg double %24
%26 = call double @llvm.fmuladd.f64(double -9.000000e+00, double %20, double %25)
%27 = load double*, double** %9
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = call double @llvm.fmuladd.f64(double 6.000000e+00, double %29, double %26)
%31 = load double*, double** %9
%32 = getelementptr inbounds double, double* %31, i64 1
%33 = load double, double* %32
%34 = call double @llvm.fmuladd.f64(double 1.600000e+01, double %33, double %30)
%35 = load double*, double** %9
%36 = getelementptr inbounds double, double* %35, i64 5
%37 = load double, double* %36
%38 = load double*, double** %9
%39 = getelementptr inbounds double, double* %38, i64 6
%40 = load double, double* %39
%41 = fadd double %37, %40
%42 = call double @llvm.fmuladd.f64(double 1.000000e+01, double %41, double %34)
%43 = load double*, double** %10
%44 = getelementptr inbounds double, double* %43, i64 0
store double %42, double* %44
%45 = load double*, double** %9
%46 = getelementptr inbounds double, double* %45, i64 8
%47 = load double, double* %46
%48 = load double*, double** %9
%49 = getelementptr inbounds double, double* %48, i64 2
%50 = load double, double* %49
%51 = load double*, double** %9
%52 = getelementptr inbounds double, double* %51, i64 5
%53 = load double, double* %52
%54 = fmul double 2.000000e-02, %53
%55 = call double @llvm.fmuladd.f64(double %47, double %50, double %54)
%56 = load double*, double** %9
%57 = getelementptr inbounds double, double* %56, i64 4
%58 = load double, double* %57
%59 = call double @llvm.fmuladd.f64(double -2.500000e-02, double %58, double %55)
%60 = load double*, double** %11
%61 = getelementptr inbounds double, double* %60, i64 0
store double %59, double* %61
%62 = load double*, double** %9
%63 = getelementptr inbounds double, double* %62, i64 8
%64 = load double, double* %63
%65 = load double*, double** %9
%66 = getelementptr inbounds double, double* %65, i64 3
%67 = load double, double* %66
%68 = load double*, double** %9
%69 = getelementptr inbounds double, double* %68, i64 6
%70 = load double, double* %69
%71 = fmul double 2.000000e-02, %70
%72 = call double @llvm.fmuladd.f64(double %64, double %67, double %71)
%73 = load double*, double** %9
%74 = getelementptr inbounds double, double* %73, i64 7
%75 = load double, double* %74
%76 = call double @llvm.fmuladd.f64(double -1.500000e-02, double %75, double %72)
%77 = load double*, double** %11
%78 = getelementptr inbounds double, double* %77, i64 1
store double %76, double* %78
%79 = load double*, double** %9
%80 = getelementptr inbounds double, double* %79, i64 0
%81 = load double, double* %80
%82 = load double*, double** %9
%83 = getelementptr inbounds double, double* %82, i64 1
%84 = load double, double* %83
%85 = fadd double %81, %84
%86 = load double*, double** %9
%87 = getelementptr inbounds double, double* %86, i64 2
%88 = load double, double* %87
%89 = fsub double %85, %88
%90 = load double*, double** %9
%91 = getelementptr inbounds double, double* %90, i64 3
%92 = load double, double* %91
%93 = fsub double %89, %92
%94 = load double*, double** %12
%95 = getelementptr inbounds double, double* %94, i64 0
store double %93, double* %95
%96 = load double*, double** %9
%97 = getelementptr inbounds double, double* %96, i64 0
%98 = load double, double* %97
%99 = load double*, double** %9
%100 = getelementptr inbounds double, double* %99, i64 1
%101 = load double, double* %100
%102 = fmul double 1.000000e-02, %101
%103 = call double @llvm.fmuladd.f64(double 3.000000e-02, double %98, double %102)
%104 = load double*, double** %9
%105 = getelementptr inbounds double, double* %104, i64 8
%106 = load double, double* %105
%107 = load double*, double** %9
%108 = getelementptr inbounds double, double* %107, i64 2
%109 = load double, double* %108
%110 = load double*, double** %9
%111 = getelementptr inbounds double, double* %110, i64 3
%112 = load double, double* %111
%113 = fadd double %109, %112
%114 = fneg double %106
%115 = call double @llvm.fmuladd.f64(double %114, double %113, double %103)
%116 = load double*, double** %12
%117 = getelementptr inbounds double, double* %116, i64 1
store double %115, double* %117
%118 = load double*, double** %9
%119 = getelementptr inbounds double, double* %118, i64 2
%120 = load double, double* %119
%121 = load double*, double** %9
%122 = getelementptr inbounds double, double* %121, i64 5
%123 = load double, double* %122
%124 = fadd double %120, %123
%125 = load double*, double** %9
%126 = getelementptr inbounds double, double* %125, i64 4
%127 = load double, double* %126
%128 = fsub double %124, %127
%129 = load double*, double** %12
%130 = getelementptr inbounds double, double* %129, i64 2
store double %128, double* %130
%131 = load double*, double** %9
%132 = getelementptr inbounds double, double* %131, i64 3
%133 = load double, double* %132
%134 = load double*, double** %9
%135 = getelementptr inbounds double, double* %134, i64 6
%136 = load double, double* %135
%137 = fadd double %133, %136
%138 = load double*, double** %9
%139 = getelementptr inbounds double, double* %138, i64 7
%140 = load double, double* %139
%141 = fsub double %137, %140
%142 = load double*, double** %12
%143 = getelementptr inbounds double, double* %142, i64 3
store double %141, double* %143
ret void
}

LLVM IR (-O2):
define void @g23(double* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = getelementptr inbounds double, double* %0, i64 4
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %0, i64 7
%12 = load double, double* %11
%13 = fmul double %12, -1.500000e+01
%14 = tail call double @llvm.fmuladd.f64(double %10, double -9.000000e+00, double %13)
%15 = load double, double* %0
%16 = tail call double @llvm.fmuladd.f64(double %15, double 6.000000e+00, double %14)
%17 = getelementptr inbounds double, double* %0, i64 1
%18 = load double, double* %17
%19 = tail call double @llvm.fmuladd.f64(double %18, double 1.600000e+01, double %16)
%20 = getelementptr inbounds double, double* %0, i64 5
%21 = load double, double* %20
%22 = getelementptr inbounds double, double* %0, i64 6
%23 = load double, double* %22
%24 = fadd double %21, %23
%25 = tail call double @llvm.fmuladd.f64(double %24, double 1.000000e+01, double %19)
store double %25, double* %1
%26 = getelementptr inbounds double, double* %0, i64 8
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %0, i64 2
%29 = load double, double* %28
%30 = load double, double* %20
%31 = fmul double %30, 2.000000e-02
%32 = tail call double @llvm.fmuladd.f64(double %27, double %29, double %31)
%33 = load double, double* %9
%34 = tail call double @llvm.fmuladd.f64(double %33, double -2.500000e-02, double %32)
store double %34, double* %2
%35 = load double, double* %26
%36 = getelementptr inbounds double, double* %0, i64 3
%37 = load double, double* %36
%38 = load double, double* %22
%39 = fmul double %38, 2.000000e-02
%40 = tail call double @llvm.fmuladd.f64(double %35, double %37, double %39)
%41 = load double, double* %11
%42 = tail call double @llvm.fmuladd.f64(double %41, double -1.500000e-02, double %40)
%43 = getelementptr inbounds double, double* %2, i64 1
store double %42, double* %43
%44 = load double, double* %0
%45 = load double, double* %17
%46 = fadd double %44, %45
%47 = load double, double* %28
%48 = fsub double %46, %47
%49 = load double, double* %36
%50 = fsub double %48, %49
store double %50, double* %3
%51 = load double, double* %0
%52 = load double, double* %17
%53 = fmul double %52, 1.000000e-02
%54 = tail call double @llvm.fmuladd.f64(double %51, double 3.000000e-02, double %53)
%55 = load double, double* %26
%56 = load double, double* %28
%57 = load double, double* %36
%58 = fadd double %56, %57
%59 = fneg double %55
%60 = tail call double @llvm.fmuladd.f64(double %59, double %58, double %54)
%61 = getelementptr inbounds double, double* %3, i64 1
store double %60, double* %61
%62 = load double, double* %28
%63 = load double, double* %20
%64 = fadd double %62, %63
%65 = load double, double* %9
%66 = fsub double %64, %65
%67 = getelementptr inbounds double, double* %3, i64 2
store double %66, double* %67
%68 = load double, double* %36
%69 = load double, double* %22
%70 = fadd double %68, %69
%71 = load double, double* %11
%72 = fsub double %70, %71
%73 = getelementptr inbounds double, double* %3, i64 3
store double %72, double* %73
ret void
}