void eigen2d(double rho, double u, double c, double dU[], double lambda[],
             double alpha[], double evec[][3]) {
  double t2, t3;
  lambda[0] = u - c;
  lambda[1] = u + c;
  lambda[2] = u;
  t2 = rho / c;
  evec[0][0] = -t2;
  evec[0][1] = t2;
  evec[0][2] = 0;
  evec[1][0] = 1;
  evec[1][1] = 1;
  evec[1][2] = 0;
  evec[2][0] = 0;
  evec[2][1] = 0;
  evec[2][2] = 1;
  t3 = c / rho * dU[0];
  alpha[0] = -t3 / 0.2e1 + dU[1] / 0.2e1;
  alpha[1] = t3 / 0.2e1 + dU[1] / 0.2e1;
  alpha[2] = dU[2];
  return;
}


x86 assembly (clang, -O0):
<eigen2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x8(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x38(%rbp),%rax
movsd  0xe59(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x38(%rbp),%rax
movsd  0xe48(%rip),%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x38(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x38(%rbp),%rax
movsd  0xe13(%rip),%xmm0
movsd  %xmm0,0x40(%rax)
movsd  -0x18(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xdcb(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xdb6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
movsd  0xd99(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xd84(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigen2d>:
movapd %xmm1,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,(%rsi)
movapd %xmm1,%xmm3
addsd  %xmm2,%xmm3
movsd  %xmm3,0x8(%rsi)
movsd  %xmm1,0x10(%rsi)
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
movapd 0xed2(%rip),%xmm3
xorpd  %xmm1,%xmm3
movlpd %xmm3,(%rcx)
movsd  %xmm1,0x8(%rcx)
xorpd  %xmm1,%xmm1
xorpd  %xmm3,%xmm3
movhpd 0xec5(%rip),%xmm3
movupd %xmm3,0x10(%rcx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x20(%rcx)
movupd %xmm1,0x28(%rcx)
movq   $0x0,0x38(%rcx)
mov    %rax,0x40(%rcx)
divsd  %xmm0,%xmm2
mulsd  (%rdi),%xmm2
movsd  0xe99(%rip),%xmm0
mulsd  %xmm0,%xmm2
movsd  0x8(%rdi),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx)
mulsd  0x8(%rdi),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

LLVM IR (-O0):
define void @eigen2d(double %0, double %1, double %2, double* %3, double* %4, double* %5, [3 x double]* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca [3 x double]*
%15 = alloca double
%16 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store [3 x double]* %6, [3 x double]** %14
%17 = load double, double* %9
%18 = load double, double* %10
%19 = fsub double %17, %18
%20 = load double*, double** %12
%21 = getelementptr inbounds double, double* %20, i64 0
store double %19, double* %21
%22 = load double, double* %9
%23 = load double, double* %10
%24 = fadd double %22, %23
%25 = load double*, double** %12
%26 = getelementptr inbounds double, double* %25, i64 1
store double %24, double* %26
%27 = load double, double* %9
%28 = load double*, double** %12
%29 = getelementptr inbounds double, double* %28, i64 2
store double %27, double* %29
%30 = load double, double* %8
%31 = load double, double* %10
%32 = fdiv double %30, %31
store double %32, double* %15
%33 = load double, double* %15
%34 = fneg double %33
%35 = load [3 x double]*, [3 x double]** %14
%36 = getelementptr inbounds [3 x double], [3 x double]* %35, i64 0
%37 = getelementptr inbounds [3 x double], [3 x double]* %36, i64 0, i64 0
store double %34, double* %37
%38 = load double, double* %15
%39 = load [3 x double]*, [3 x double]** %14
%40 = getelementptr inbounds [3 x double], [3 x double]* %39, i64 0
%41 = getelementptr inbounds [3 x double], [3 x double]* %40, i64 0, i64 1
store double %38, double* %41
%42 = load [3 x double]*, [3 x double]** %14
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 0
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0, i64 2
store double 0.000000e+00, double* %44
%45 = load [3 x double]*, [3 x double]** %14
%46 = getelementptr inbounds [3 x double], [3 x double]* %45, i64 1
%47 = getelementptr inbounds [3 x double], [3 x double]* %46, i64 0, i64 0
store double 1.000000e+00, double* %47
%48 = load [3 x double]*, [3 x double]** %14
%49 = getelementptr inbounds [3 x double], [3 x double]* %48, i64 1
%50 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0, i64 1
store double 1.000000e+00, double* %50
%51 = load [3 x double]*, [3 x double]** %14
%52 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 1
%53 = getelementptr inbounds [3 x double], [3 x double]* %52, i64 0, i64 2
store double 0.000000e+00, double* %53
%54 = load [3 x double]*, [3 x double]** %14
%55 = getelementptr inbounds [3 x double], [3 x double]* %54, i64 2
%56 = getelementptr inbounds [3 x double], [3 x double]* %55, i64 0, i64 0
store double 0.000000e+00, double* %56
%57 = load [3 x double]*, [3 x double]** %14
%58 = getelementptr inbounds [3 x double], [3 x double]* %57, i64 2
%59 = getelementptr inbounds [3 x double], [3 x double]* %58, i64 0, i64 1
store double 0.000000e+00, double* %59
%60 = load [3 x double]*, [3 x double]** %14
%61 = getelementptr inbounds [3 x double], [3 x double]* %60, i64 2
%62 = getelementptr inbounds [3 x double], [3 x double]* %61, i64 0, i64 2
store double 1.000000e+00, double* %62
%63 = load double, double* %10
%64 = load double, double* %8
%65 = fdiv double %63, %64
%66 = load double*, double** %11
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
%69 = fmul double %65, %68
store double %69, double* %16
%70 = load double, double* %16
%71 = fneg double %70
%72 = fdiv double %71, 2.000000e+00
%73 = load double*, double** %11
%74 = getelementptr inbounds double, double* %73, i64 1
%75 = load double, double* %74
%76 = fdiv double %75, 2.000000e+00
%77 = fadd double %72, %76
%78 = load double*, double** %13
%79 = getelementptr inbounds double, double* %78, i64 0
store double %77, double* %79
%80 = load double, double* %16
%81 = fdiv double %80, 2.000000e+00
%82 = load double*, double** %11
%83 = getelementptr inbounds double, double* %82, i64 1
%84 = load double, double* %83
%85 = fdiv double %84, 2.000000e+00
%86 = fadd double %81, %85
%87 = load double*, double** %13
%88 = getelementptr inbounds double, double* %87, i64 1
store double %86, double* %88
%89 = load double*, double** %11
%90 = getelementptr inbounds double, double* %89, i64 2
%91 = load double, double* %90
%92 = load double*, double** %13
%93 = getelementptr inbounds double, double* %92, i64 2
store double %91, double* %93
ret void
}

LLVM IR (-O2):
define void @eigen2d(double %0, double %1, double %2, double* nocapture %3, double* nocapture writeonly %4, double* nocapture writeonly %5, [3 x double]* nocapture writeonly %6) {
%8 = fsub double %1, %2
store double %8, double* %4
%9 = fadd double %1, %2
%10 = getelementptr inbounds double, double* %4, i64 1
store double %9, double* %10
%11 = getelementptr inbounds double, double* %4, i64 2
store double %1, double* %11
%12 = fdiv double %0, %2
%13 = fneg double %12
%14 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
store double %13, double* %14
%15 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
store double %12, double* %15
%16 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %17
%18 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 1, i64 1
store double 1.000000e+00, double* %18
%19 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 1, i64 2
%20 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 2, i64 2
%21 = bitcast double* %19 to i8*
store double 1.000000e+00, double* %20
%22 = fdiv double %2, %0
%23 = load double, double* %3
%24 = fmul double %22, %23
%25 = fmul double %24, 5.000000e-01
%26 = getelementptr inbounds double, double* %3, i64 1
%27 = load double, double* %26
%28 = fmul double %27, 5.000000e-01
%29 = fsub double %28, %25
store double %29, double* %5
%30 = load double, double* %26
%31 = fmul double %30, 5.000000e-01
%32 = fadd double %25, %31
%33 = getelementptr inbounds double, double* %5, i64 1
store double %32, double* %33
%34 = getelementptr inbounds double, double* %3, i64 2
%35 = load double, double* %34
%36 = getelementptr inbounds double, double* %5, i64 2
store double %35, double* %36
ret void
}