void geom_dgam_cyl_rpz_B(double x[], double dgam[2][3][3]) {
  int k, i, j;
  for (k = 0; k < 2; k++)
    for (i = 0; i < 3; i++)
      for (j = 0; j < 3; j++)
        dgam[k][i][j] = 0.0;
  dgam[0][1][1] = 2 * x[0];
}


x86 assembly (clang, -O0):
<geom_dgam_cyl_rpz_B>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1199 <geom_dgam_cyl_rpz_B+0x99>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1186 <geom_dgam_cyl_rpz_B+0x86>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1173 <geom_dgam_cyl_rpz_B+0x73>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x48,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1135 <geom_dgam_cyl_rpz_B+0x35>
jmp    1178 <geom_dgam_cyl_rpz_B+0x78>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1124 <geom_dgam_cyl_rpz_B+0x24>
jmp    118b <geom_dgam_cyl_rpz_B+0x8b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <geom_dgam_cyl_rpz_B+0x13>
mov    -0x8(%rbp),%rax
movsd  0xe5b(%rip),%xmm0
mulsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_dgam_cyl_rpz_B>:
xorps  %xmm0,%xmm0
movups %xmm0,0x80(%rsi)
movups %xmm0,0x70(%rsi)
movups %xmm0,0x60(%rsi)
movups %xmm0,0x50(%rsi)
movups %xmm0,0x40(%rsi)
movups %xmm0,0x30(%rsi)
movups %xmm0,0x20(%rsi)
movups %xmm0,0x10(%rsi)
movups %xmm0,(%rsi)
movsd  (%rdi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x20(%rsi)
ret

LLVM IR (-O0):
define void @geom_dgam_cyl_rpz_B(double* %0, [3 x [3 x double]]* %1) {
%3 = alloca double*
%4 = alloca [3 x [3 x double]]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store double* %0, double** %3
store [3 x [3 x double]]* %1, [3 x [3 x double]]** %4
store i32 0, i32* %5
br label %8
8: ; preds = %38, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %41
11: ; preds = %8
store i32 0, i32* %6
br label %12
12: ; preds = %34, %11
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %37
15: ; preds = %12
store i32 0, i32* %7
br label %16
16: ; preds = %30, %15
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %33
19: ; preds = %16
%20 = load [3 x [3 x double]]*, [3 x [3 x double]]** %4
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %20, i64 %22
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %23, i64 0, i64 %25
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0, i64 %28
store double 0.000000e+00, double* %29
br label %30
30: ; preds = %19
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %16
33: ; preds = %16
br label %34
34: ; preds = %33
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %12
37: ; preds = %12
br label %38
38: ; preds = %37
%39 = load i32, i32* %5
%40 = add nsw i32 %39, 1
store i32 %40, i32* %5
br label %8
41: ; preds = %8
%42 = load double*, double** %3
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fmul double 2.000000e+00, %44
%46 = load [3 x [3 x double]]*, [3 x [3 x double]]** %4
%47 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %46, i64 0
%48 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %47, i64 0, i64 1
%49 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 0, i64 1
store double %45, double* %49
ret void
}

LLVM IR (-O2):
define void @geom_dgam_cyl_rpz_B(double* nocapture %0, [3 x [3 x double]]* nocapture writeonly %1) {
%3 = bitcast [3 x [3 x double]]* %1 to i8*
%4 = load double, double* %0
%5 = fmul double %4, 2.000000e+00
%6 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %1, i64 0, i64 1, i64 1
store double %5, double* %6
ret void
}