void jacobn(float x, float y[], float dfdx[], float **dfdy, int n) {
  int i;
  for (i = 1; i <= n; i++)
    dfdx[i] = 0.0;
  dfdy[1][1] = -0.013 - 1000.0 * y[3];
  dfdy[1][2] = 0.0;
  dfdy[1][3] = -1000.0 * y[1];
  dfdy[2][1] = 0.0;
  dfdy[2][2] = -2500.0 * y[3];
  dfdy[2][3] = -2500.0 * y[2];
  dfdy[3][1] = -0.013 - 1000.0 * y[3];
  dfdy[3][2] = -2500.0 * y[3];
  dfdy[3][3] = -1000.0 * y[1] - 2500.0 * y[2];
}


x86 assembly (clang, -O0):
<jacobn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1149 <jacobn+0x49>
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    111f <jacobn+0x1f>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeae(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movss  %xmm0,0x4(%rax)
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe5c(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movss  %xmm0,0xc(%rax)
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe32(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe08(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rax
movss  %xmm0,0xc(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdce(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdda(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xda8(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xd69(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xd3e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jacobn>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
test   %ecx,%ecx
jle    1132 <jacobn+0x22>
add    $0x4,%rsi
mov    %ecx,%edx
shl    $0x2,%rdx
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xebd(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeb9(%rip),%xmm2
addsd  %xmm2,%xmm1
cvtsd2ss %xmm1,%xmm1
mov    0x8(%r14),%rax
movss  %xmm1,0x4(%rax)
movl   $0x0,0x8(%rax)
movss  0x4(%rbx),%xmm1
mulss  0xea4(%rip),%xmm1
movss  %xmm1,0xc(%rax)
mov    0x10(%r14),%rax
movl   $0x0,0x4(%rax)
movss  0xe90(%rip),%xmm1
movss  0xc(%rbx),%xmm3
mulss  %xmm1,%xmm3
movss  %xmm3,0x8(%rax)
movss  0x8(%rbx),%xmm3
mulss  %xmm1,%xmm3
movss  %xmm3,0xc(%rax)
movss  0xc(%rbx),%xmm3
cvtss2sd %xmm3,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
xorps  %xmm2,%xmm2
cvtsd2ss %xmm3,%xmm2
mov    0x18(%r14),%rax
movss  %xmm2,0x4(%rax)
mulss  0xc(%rbx),%xmm1
movss  %xmm1,0x8(%rax)
movss  0x4(%rbx),%xmm1
movss  0x8(%rbx),%xmm2
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
mulsd  0xe23(%rip),%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0xc(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @jacobn(float %0, float* %1, float* %2, float** %3, i32 %4) {
%6 = alloca float
%7 = alloca float*
%8 = alloca float*
%9 = alloca float**
%10 = alloca i32
%11 = alloca i32
store float %0, float* %6
store float* %1, float** %7
store float* %2, float** %8
store float** %3, float*** %9
store i32 %4, i32* %10
store i32 1, i32* %11
br label %12
12: ; preds = %21, %5
%13 = load i32, i32* %11
%14 = load i32, i32* %10
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %24
16: ; preds = %12
%17 = load float*, float** %8
%18 = load i32, i32* %11
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds float, float* %17, i64 %19
store float 0.000000e+00, float* %20
br label %21
21: ; preds = %16
%22 = load i32, i32* %11
%23 = add nsw i32 %22, 1
store i32 %23, i32* %11
br label %12
24: ; preds = %12
%25 = load float*, float** %7
%26 = getelementptr inbounds float, float* %25, i64 3
%27 = load float, float* %26
%28 = fpext float %27 to double
%29 = call double @llvm.fmuladd.f64(double -1.000000e+03, double %28, double -1.300000e-02)
%30 = fptrunc double %29 to float
%31 = load float**, float*** %9
%32 = getelementptr inbounds float*, float** %31, i64 1
%33 = load float*, float** %32
%34 = getelementptr inbounds float, float* %33, i64 1
store float %30, float* %34
%35 = load float**, float*** %9
%36 = getelementptr inbounds float*, float** %35, i64 1
%37 = load float*, float** %36
%38 = getelementptr inbounds float, float* %37, i64 2
store float 0.000000e+00, float* %38
%39 = load float*, float** %7
%40 = getelementptr inbounds float, float* %39, i64 1
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = fmul double -1.000000e+03, %42
%44 = fptrunc double %43 to float
%45 = load float**, float*** %9
%46 = getelementptr inbounds float*, float** %45, i64 1
%47 = load float*, float** %46
%48 = getelementptr inbounds float, float* %47, i64 3
store float %44, float* %48
%49 = load float**, float*** %9
%50 = getelementptr inbounds float*, float** %49, i64 2
%51 = load float*, float** %50
%52 = getelementptr inbounds float, float* %51, i64 1
store float 0.000000e+00, float* %52
%53 = load float*, float** %7
%54 = getelementptr inbounds float, float* %53, i64 3
%55 = load float, float* %54
%56 = fpext float %55 to double
%57 = fmul double -2.500000e+03, %56
%58 = fptrunc double %57 to float
%59 = load float**, float*** %9
%60 = getelementptr inbounds float*, float** %59, i64 2
%61 = load float*, float** %60
%62 = getelementptr inbounds float, float* %61, i64 2
store float %58, float* %62
%63 = load float*, float** %7
%64 = getelementptr inbounds float, float* %63, i64 2
%65 = load float, float* %64
%66 = fpext float %65 to double
%67 = fmul double -2.500000e+03, %66
%68 = fptrunc double %67 to float
%69 = load float**, float*** %9
%70 = getelementptr inbounds float*, float** %69, i64 2
%71 = load float*, float** %70
%72 = getelementptr inbounds float, float* %71, i64 3
store float %68, float* %72
%73 = load float*, float** %7
%74 = getelementptr inbounds float, float* %73, i64 3
%75 = load float, float* %74
%76 = fpext float %75 to double
%77 = call double @llvm.fmuladd.f64(double -1.000000e+03, double %76, double -1.300000e-02)
%78 = fptrunc double %77 to float
%79 = load float**, float*** %9
%80 = getelementptr inbounds float*, float** %79, i64 3
%81 = load float*, float** %80
%82 = getelementptr inbounds float, float* %81, i64 1
store float %78, float* %82
%83 = load float*, float** %7
%84 = getelementptr inbounds float, float* %83, i64 3
%85 = load float, float* %84
%86 = fpext float %85 to double
%87 = fmul double -2.500000e+03, %86
%88 = fptrunc double %87 to float
%89 = load float**, float*** %9
%90 = getelementptr inbounds float*, float** %89, i64 3
%91 = load float*, float** %90
%92 = getelementptr inbounds float, float* %91, i64 2
store float %88, float* %92
%93 = load float*, float** %7
%94 = getelementptr inbounds float, float* %93, i64 1
%95 = load float, float* %94
%96 = fpext float %95 to double
%97 = load float*, float** %7
%98 = getelementptr inbounds float, float* %97, i64 2
%99 = load float, float* %98
%100 = fpext float %99 to double
%101 = fmul double 2.500000e+03, %100
%102 = fneg double %101
%103 = call double @llvm.fmuladd.f64(double -1.000000e+03, double %96, double %102)
%104 = fptrunc double %103 to float
%105 = load float**, float*** %9
%106 = getelementptr inbounds float*, float** %105, i64 3
%107 = load float*, float** %106
%108 = getelementptr inbounds float, float* %107, i64 3
store float %104, float* %108
ret void
}

LLVM IR (-O2):
define void @jacobn(float %0, float* nocapture %1, float* nocapture writeonly %2, float** nocapture %3, i32 %4) {
%6 = icmp slt i32 %4, 1
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = getelementptr float, float* %2, i64 1
%9 = bitcast float* %8 to i8*
%10 = zext i32 %4 to i64
%11 = shl nuw nsw i64 %10, 2
br label %12
12: ; preds = %7, %5
%13 = getelementptr inbounds float, float* %1, i64 3
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = tail call double @llvm.fmuladd.f64(double %15, double -1.000000e+03, double -1.300000e-02)
%17 = fptrunc double %16 to float
%18 = getelementptr inbounds float*, float** %3, i64 1
%19 = load float*, float** %18
%20 = getelementptr inbounds float, float* %19, i64 1
store float %17, float* %20
%21 = getelementptr inbounds float, float* %19, i64 2
store float 0.000000e+00, float* %21
%22 = getelementptr inbounds float, float* %1, i64 1
%23 = load float, float* %22
%24 = fmul float %23, -1.000000e+03
%25 = getelementptr inbounds float, float* %19, i64 3
store float %24, float* %25
%26 = getelementptr inbounds float*, float** %3, i64 2
%27 = load float*, float** %26
%28 = getelementptr inbounds float, float* %27, i64 1
store float 0.000000e+00, float* %28
%29 = load float, float* %13
%30 = fmul float %29, -2.500000e+03
%31 = getelementptr inbounds float, float* %27, i64 2
store float %30, float* %31
%32 = getelementptr inbounds float, float* %1, i64 2
%33 = load float, float* %32
%34 = fmul float %33, -2.500000e+03
%35 = getelementptr inbounds float, float* %27, i64 3
store float %34, float* %35
%36 = load float, float* %13
%37 = fpext float %36 to double
%38 = tail call double @llvm.fmuladd.f64(double %37, double -1.000000e+03, double -1.300000e-02)
%39 = fptrunc double %38 to float
%40 = getelementptr inbounds float*, float** %3, i64 3
%41 = load float*, float** %40
%42 = getelementptr inbounds float, float* %41, i64 1
store float %39, float* %42
%43 = load float, float* %13
%44 = fmul float %43, -2.500000e+03
%45 = getelementptr inbounds float, float* %41, i64 2
store float %44, float* %45
%46 = load float, float* %22
%47 = fpext float %46 to double
%48 = load float, float* %32
%49 = fpext float %48 to double
%50 = fmul double %49, -2.500000e+03
%51 = tail call double @llvm.fmuladd.f64(double %47, double -1.000000e+03, double %50)
%52 = fptrunc double %51 to float
%53 = getelementptr inbounds float, float* %41, i64 3
store float %52, float* %53
ret void
}