void jachs01(double *p, double *jac, int m, int n, void *data) {
  register int j = 0;
  jac[j++] = -20.0 * p[0];
  jac[j++] = 10.0;
  jac[j++] = -1.0;
  jac[j++] = 0.0;
}


x86 assembly (clang, -O0):
<jachs01>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xee7(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x24(%rbp)
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jachs01>:
movsd  (%rdi),%xmm0
mulsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rsi)
movaps 0xef9(%rip),%xmm0
movups %xmm0,0x8(%rsi)
movq   $0x0,0x18(%rsi)
ret

LLVM IR (-O0):
define void @jachs01(double* %0, double* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
store i32 0, i32* %11
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = fmul double -2.000000e+01, %14
%16 = load double*, double** %7
%17 = load i32, i32* %11
%18 = add nsw i32 %17, 1
store i32 %18, i32* %11
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds double, double* %16, i64 %19
store double %15, double* %20
%21 = load double*, double** %7
%22 = load i32, i32* %11
%23 = add nsw i32 %22, 1
store i32 %23, i32* %11
%24 = sext i32 %22 to i64
%25 = getelementptr inbounds double, double* %21, i64 %24
store double 1.000000e+01, double* %25
%26 = load double*, double** %7
%27 = load i32, i32* %11
%28 = add nsw i32 %27, 1
store i32 %28, i32* %11
%29 = sext i32 %27 to i64
%30 = getelementptr inbounds double, double* %26, i64 %29
store double -1.000000e+00, double* %30
%31 = load double*, double** %7
%32 = load i32, i32* %11
%33 = add nsw i32 %32, 1
store i32 %33, i32* %11
%34 = sext i32 %32 to i64
%35 = getelementptr inbounds double, double* %31, i64 %34
store double 0.000000e+00, double* %35
ret void
}

LLVM IR (-O2):
define void @jachs01(double* nocapture %0, double* nocapture writeonly %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
%6 = load double, double* %0
%7 = fmul double %6, -2.000000e+01
store double %7, double* %1
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 1.000000e+01, double -1.000000e+00>, <2 x double>* %9
%10 = getelementptr inbounds double, double* %1, i64 3
store double 0.000000e+00, double* %10
ret void
}