copytransform(a, b) double a[4][4], b[4][4];
{
  register int i, j;
  for (i = 0; i < 4; i++)
    for (j = 0; j < 4; j++)
      b[i][j] = a[i][j];
}


x86 assembly (clang, -O0):
<copytransform>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    117f <copytransform+0x7f>
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    116c <copytransform+0x6c>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x5,%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 <copytransform+0x24>
jmp    1171 <copytransform+0x71>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <copytransform+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copytransform>:
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rsi)
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x18(%rsi)
movsd  0x20(%rdi),%xmm0
movsd  %xmm0,0x20(%rsi)
movsd  0x28(%rdi),%xmm0
movsd  %xmm0,0x28(%rsi)
movsd  0x30(%rdi),%xmm0
movsd  %xmm0,0x30(%rsi)
movsd  0x38(%rdi),%xmm0
movsd  %xmm0,0x38(%rsi)
movsd  0x40(%rdi),%xmm0
movsd  %xmm0,0x40(%rsi)
movsd  0x48(%rdi),%xmm0
movsd  %xmm0,0x48(%rsi)
movsd  0x50(%rdi),%xmm0
movsd  %xmm0,0x50(%rsi)
movsd  0x58(%rdi),%xmm0
movsd  %xmm0,0x58(%rsi)
movsd  0x60(%rdi),%xmm0
movsd  %xmm0,0x60(%rsi)
movsd  0x68(%rdi),%xmm0
movsd  %xmm0,0x68(%rsi)
movsd  0x70(%rdi),%xmm0
movsd  %xmm0,0x70(%rsi)
movsd  0x78(%rdi),%xmm0
movsd  %xmm0,0x78(%rsi)
ret

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

LLVM IR (-O2):
define i32 @copytransform([4 x double]* nocapture %0, [4 x double]* nocapture writeonly %1) {
%3 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 0
%4 = load double, double* %3
%5 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
store double %4, double* %5
%6 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 1
store double %7, double* %8
%9 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 2
store double %10, double* %11
%12 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 0, i64 3
%13 = load double, double* %12
%14 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 3
store double %13, double* %14
%15 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 0
store double %16, double* %17
%18 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 1
%19 = load double, double* %18
%20 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 1
store double %19, double* %20
%21 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 2
%22 = load double, double* %21
%23 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 2
store double %22, double* %23
%24 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 1, i64 3
%25 = load double, double* %24
%26 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 1, i64 3
store double %25, double* %26
%27 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 0
%28 = load double, double* %27
%29 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 0
store double %28, double* %29
%30 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 1
%31 = load double, double* %30
%32 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 1
store double %31, double* %32
%33 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 2
%34 = load double, double* %33
%35 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 2
store double %34, double* %35
%36 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 2, i64 3
%37 = load double, double* %36
%38 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 2, i64 3
store double %37, double* %38
%39 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 0
%40 = load double, double* %39
%41 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 0
store double %40, double* %41
%42 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 1
%43 = load double, double* %42
%44 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 1
store double %43, double* %44
%45 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 2
%46 = load double, double* %45
%47 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 2
store double %46, double* %47
%48 = getelementptr inbounds [4 x double], [4 x double]* %0, i64 3, i64 3
%49 = load double, double* %48
%50 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 3, i64 3
store double %49, double* %50
ret i32 undef
}