int cofatores(double mtx[3][3], double resp[3][3]) {
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      resp[i][j] = (mtx[(i - 1 + 3) % 3][(j - 1 + 3) % 3] *
                        mtx[(i + 1 + 3) % 3][(j + 1 + 3) % 3] -
                    mtx[(i - 1 + 3) % 3][(j + 1 + 3) % 3] *
                        mtx[(i + 1 + 3) % 3][(j - 1 + 3) % 3]);
    }
  }
}


x86 assembly (clang, -O0):
<cofatores>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    12a6 <cofatores+0x1a6>
movl   $0x0,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jge    1293 <cofatores+0x193>
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x60(%rbp),%rax
movslq %edx,%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x58(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x50(%rbp),%rax
movslq %edx,%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x48(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x40(%rbp),%rax
movslq %edx,%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x38(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x30(%rbp),%rax
movslq %edx,%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
add    $0x3,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%rax
movslq %edx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1124 <cofatores+0x24>
jmp    1298 <cofatores+0x198>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <cofatores+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cofatores>:
movsd  0x28(%rdi),%xmm0
movsd  0x40(%rdi),%xmm1
mulsd  0x38(%rdi),%xmm0
mulsd  0x20(%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
movsd  0x18(%rdi),%xmm0
movsd  0x30(%rdi),%xmm1
mulsd  0x40(%rdi),%xmm0
mulsd  0x28(%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsi)
movsd  0x20(%rdi),%xmm0
movsd  0x38(%rdi),%xmm1
mulsd  0x30(%rdi),%xmm0
mulsd  0x18(%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  0x40(%rdi),%xmm1
mulsd  0x8(%rdi),%xmm1
mulsd  0x38(%rdi),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsi)
movsd  (%rdi),%xmm0
movsd  0x30(%rdi),%xmm1
mulsd  0x10(%rdi),%xmm1
mulsd  0x40(%rdi),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  0x38(%rdi),%xmm1
mulsd  (%rdi),%xmm1
mulsd  0x30(%rdi),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  0x28(%rdi),%xmm1
mulsd  0x20(%rdi),%xmm0
mulsd  0x8(%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsi)
movsd  (%rdi),%xmm0
movsd  0x18(%rdi),%xmm1
mulsd  0x28(%rdi),%xmm0
mulsd  0x10(%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  0x20(%rdi),%xmm1
mulsd  0x18(%rdi),%xmm0
mulsd  (%rdi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsi)
ret

LLVM IR (-O0):
define i32 @cofatores([3 x double]* %0, [3 x double]* %1) {
%3 = alloca i32
%4 = alloca [3 x double]*
%5 = alloca [3 x double]*
%6 = alloca i32
%7 = alloca i32
store [3 x double]* %0, [3 x double]** %4
store [3 x double]* %1, [3 x double]** %5
store i32 0, i32* %6
br label %8
8: ; preds = %86, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %89
11: ; preds = %8
store i32 0, i32* %7
br label %12
12: ; preds = %82, %11
%13 = load i32, i32* %7
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %85
15: ; preds = %12
%16 = load [3 x double]*, [3 x double]** %4
%17 = load i32, i32* %6
%18 = sub nsw i32 %17, 1
%19 = add nsw i32 %18, 3
%20 = srem i32 %19, 3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [3 x double], [3 x double]* %16, i64 %21
%23 = load i32, i32* %7
%24 = sub nsw i32 %23, 1
%25 = add nsw i32 %24, 3
%26 = srem i32 %25, 3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 %27
%29 = load double, double* %28
%30 = load [3 x double]*, [3 x double]** %4
%31 = load i32, i32* %6
%32 = add nsw i32 %31, 1
%33 = add nsw i32 %32, 3
%34 = srem i32 %33, 3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [3 x double], [3 x double]* %30, i64 %35
%37 = load i32, i32* %7
%38 = add nsw i32 %37, 1
%39 = add nsw i32 %38, 3
%40 = srem i32 %39, 3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x double], [3 x double]* %36, i64 0, i64 %41
%43 = load double, double* %42
%44 = load [3 x double]*, [3 x double]** %4
%45 = load i32, i32* %6
%46 = sub nsw i32 %45, 1
%47 = add nsw i32 %46, 3
%48 = srem i32 %47, 3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [3 x double], [3 x double]* %44, i64 %49
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
%53 = add nsw i32 %52, 3
%54 = srem i32 %53, 3
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [3 x double], [3 x double]* %50, i64 0, i64 %55
%57 = load double, double* %56
%58 = load [3 x double]*, [3 x double]** %4
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
%61 = add nsw i32 %60, 3
%62 = srem i32 %61, 3
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [3 x double], [3 x double]* %58, i64 %63
%65 = load i32, i32* %7
%66 = sub nsw i32 %65, 1
%67 = add nsw i32 %66, 3
%68 = srem i32 %67, 3
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [3 x double], [3 x double]* %64, i64 0, i64 %69
%71 = load double, double* %70
%72 = fmul double %57, %71
%73 = fneg double %72
%74 = call double @llvm.fmuladd.f64(double %29, double %43, double %73)
%75 = load [3 x double]*, [3 x double]** %5
%76 = load i32, i32* %6
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [3 x double], [3 x double]* %75, i64 %77
%79 = load i32, i32* %7
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [3 x double], [3 x double]* %78, i64 0, i64 %80
store double %74, double* %81
br label %82
82: ; preds = %15
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %12
85: ; preds = %12
br label %86
86: ; preds = %85
%87 = load i32, i32* %6
%88 = add nsw i32 %87, 1
store i32 %88, i32* %6
br label %8
89: ; preds = %8
%90 = load i32, i32* %3
ret i32 %90
}

LLVM IR (-O2):
define i32 @cofatores([3 x double]* nocapture %0, [3 x double]* nocapture writeonly %1) {
%3 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 2
%4 = load double, double* %3
%5 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 2
%10 = load double, double* %9
%11 = fneg double %8
%12 = fmul double %10, %11
%13 = tail call double @llvm.fmuladd.f64(double %4, double %6, double %12)
%14 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
store double %13, double* %14
%15 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%16 = load double, double* %15
%17 = load double, double* %9
%18 = load double, double* %3
%19 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%20 = load double, double* %19
%21 = fneg double %18
%22 = fmul double %20, %21
%23 = tail call double @llvm.fmuladd.f64(double %16, double %17, double %22)
%24 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 1
store double %23, double* %24
%25 = load double, double* %7
%26 = load double, double* %19
%27 = load double, double* %15
%28 = load double, double* %5
%29 = fneg double %27
%30 = fmul double %28, %29
%31 = tail call double @llvm.fmuladd.f64(double %25, double %26, double %30)
%32 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 2
store double %31, double* %32
%33 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 2
%34 = load double, double* %33
%35 = load double, double* %7
%36 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 1
%37 = load double, double* %36
%38 = load double, double* %3
%39 = fneg double %37
%40 = fmul double %38, %39
%41 = tail call double @llvm.fmuladd.f64(double %34, double %35, double %40)
%42 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 0
store double %41, double* %42
%43 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%44 = load double, double* %43
%45 = load double, double* %3
%46 = load double, double* %33
%47 = load double, double* %15
%48 = fneg double %46
%49 = fmul double %47, %48
%50 = tail call double @llvm.fmuladd.f64(double %44, double %45, double %49)
%51 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
store double %50, double* %51
%52 = load double, double* %36
%53 = load double, double* %15
%54 = load double, double* %43
%55 = load double, double* %7
%56 = fneg double %54
%57 = fmul double %55, %56
%58 = tail call double @llvm.fmuladd.f64(double %52, double %53, double %57)
%59 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 2
store double %58, double* %59
%60 = load double, double* %9
%61 = load double, double* %36
%62 = load double, double* %5
%63 = load double, double* %33
%64 = fneg double %62
%65 = fmul double %63, %64
%66 = tail call double @llvm.fmuladd.f64(double %60, double %61, double %65)
%67 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 0
store double %66, double* %67
%68 = load double, double* %19
%69 = load double, double* %33
%70 = load double, double* %9
%71 = load double, double* %43
%72 = fneg double %70
%73 = fmul double %71, %72
%74 = tail call double @llvm.fmuladd.f64(double %68, double %69, double %73)
%75 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 1
store double %74, double* %75
%76 = load double, double* %5
%77 = load double, double* %43
%78 = load double, double* %19
%79 = load double, double* %36
%80 = fneg double %78
%81 = fmul double %79, %80
%82 = tail call double @llvm.fmuladd.f64(double %76, double %77, double %81)
%83 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
store double %82, double* %83
ret i32 undef
}