void geom_igam_cart_xyz(double x[], double igam[3][3]) {
  igam[0][0] = 1.0;
  igam[0][1] = 0.0;
  igam[0][2] = 0.0;
  igam[1][0] = 0.0;
  igam[1][1] = 1.0;
  igam[1][2] = 0.0;
  igam[2][0] = 0.0;
  igam[2][1] = 0.0;
  igam[2][2] = 1.0;
}


x86 assembly (clang, -O0):
<geom_igam_cart_xyz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x10(%rbp),%rax
movsd  0xe7f(%rip),%xmm0
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_igam_cart_xyz>:
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rsi)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsi)
movq   $0x0,0x18(%rsi)
mov    %rax,0x20(%rsi)
movups %xmm0,0x28(%rsi)
movq   $0x0,0x38(%rsi)
mov    %rax,0x40(%rsi)
ret

LLVM IR (-O0):
define void @geom_igam_cart_xyz(double* %0, [3 x double]* %1) {
%3 = alloca double*
%4 = alloca [3 x double]*
store double* %0, double** %3
store [3 x double]* %1, [3 x double]** %4
%5 = load [3 x double]*, [3 x double]** %4
%6 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0
%7 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
store double 1.000000e+00, double* %7
%8 = load [3 x double]*, [3 x double]** %4
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0
%10 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 1
store double 0.000000e+00, double* %10
%11 = load [3 x double]*, [3 x double]** %4
%12 = getelementptr inbounds [3 x double], [3 x double]* %11, i64 0
%13 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
store double 0.000000e+00, double* %13
%14 = load [3 x double]*, [3 x double]** %4
%15 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 1
%16 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
store double 0.000000e+00, double* %16
%17 = load [3 x double]*, [3 x double]** %4
%18 = getelementptr inbounds [3 x double], [3 x double]* %17, i64 1
%19 = getelementptr inbounds [3 x double], [3 x double]* %18, i64 0, i64 1
store double 1.000000e+00, double* %19
%20 = load [3 x double]*, [3 x double]** %4
%21 = getelementptr inbounds [3 x double], [3 x double]* %20, i64 1
%22 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 2
store double 0.000000e+00, double* %22
%23 = load [3 x double]*, [3 x double]** %4
%24 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 2
%25 = getelementptr inbounds [3 x double], [3 x double]* %24, i64 0, i64 0
store double 0.000000e+00, double* %25
%26 = load [3 x double]*, [3 x double]** %4
%27 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 2
%28 = getelementptr inbounds [3 x double], [3 x double]* %27, i64 0, i64 1
store double 0.000000e+00, double* %28
%29 = load [3 x double]*, [3 x double]** %4
%30 = getelementptr inbounds [3 x double], [3 x double]* %29, i64 2
%31 = getelementptr inbounds [3 x double], [3 x double]* %30, i64 0, i64 2
store double 1.000000e+00, double* %31
ret void
}

LLVM IR (-O2):
define void @geom_igam_cart_xyz(double* nocapture readnone %0, [3 x double]* nocapture writeonly %1) {
%3 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
store double 1.000000e+00, double* %3
%4 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
%5 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
%6 = bitcast double* %4 to i8*
store double 1.000000e+00, double* %5
%7 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 2
%8 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
%9 = bitcast double* %7 to i8*
store double 1.000000e+00, double* %8
ret void
}