void _sram_to_pio(void) {
  unsigned long *a = (void *)0x1c20800;
  unsigned long *b = (void *)0x3000;
  int i = 0x228 >> 2;
  while (i--) {
    *a++ = *b++;
  }
}


x86 assembly (clang, -O0):
<_sram_to_pio>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c20800,%eax
mov    %rax,-0x8(%rbp)
mov    $0x3000,%eax
mov    %rax,-0x10(%rbp)
movl   $0x8a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     115a <_sram_to_pio+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x8(%rbp)
mov    %rcx,(%rax)
jmp    111d <_sram_to_pio+0x1d>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sram_to_pio>:
mov    $0x6,%eax
mov    $0x3000,%ecx
nopw   0x0(%rax,%rax,1)
movaps -0x30(%rcx,%rax,8),%xmm0
movaps -0x20(%rcx,%rax,8),%xmm1
movaps -0x10(%rcx,%rax,8),%xmm2
movaps (%rcx,%rax,8),%xmm3
movaps %xmm0,0x1c1d7d0(%rcx,%rax,8)
01
movaps %xmm1,0x1c1d7e0(%rcx,%rax,8)
01
movaps %xmm2,0x1c1d7f0(%rcx,%rax,8)
01
movaps %xmm3,0x1c1d800(%rcx,%rax,8)
01
add    $0x8,%rax
cmp    $0x8e,%rax
jne    1110 <_sram_to_pio+0x10>
mov    0x3440,%rax
mov    %rax,0x1c20c40
01
mov    0x3448,%rax
mov    %rax,0x1c20c48
01
ret

LLVM IR (-O0):
define void @_sram_to_pio() {
%1 = alloca i64*
%2 = alloca i64*
%3 = alloca i32
store i64* inttoptr (i64 29493248 to i64*), i64** %1
store i64* inttoptr (i64 12288 to i64*), i64** %2
store i32 138, i32* %3
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %3
%6 = add nsw i32 %5, -1
store i32 %6, i32* %3
%7 = icmp ne i32 %5, 0
br i1 %7, label %8, label %14
8: ; preds = %4
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i32 1
store i64* %10, i64** %2
%11 = load i64, i64* %9
%12 = load i64*, i64** %1
%13 = getelementptr inbounds i64, i64* %12, i32 1
store i64* %13, i64** %1
store i64 %11, i64* %12
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @_sram_to_pio() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %24, %1 ]
%3 = getelementptr i64, i64* inttoptr (i64 12288 to i64*), i64 %2
%4 = getelementptr i64, i64* inttoptr (i64 29493248 to i64*), i64 %2
%5 = bitcast i64* %3 to <2 x i64>*
%6 = load <2 x i64>, <2 x i64>* %5
%7 = getelementptr i64, i64* %3, i64 2
%8 = bitcast i64* %7 to <2 x i64>*
%9 = load <2 x i64>, <2 x i64>* %8
%10 = bitcast i64* %4 to <2 x i64>*
store <2 x i64> %6, <2 x i64>* %10
%11 = getelementptr i64, i64* %4, i64 2
%12 = bitcast i64* %11 to <2 x i64>*
store <2 x i64> %9, <2 x i64>* %12
%13 = or i64 %2, 4
%14 = getelementptr i64, i64* inttoptr (i64 12288 to i64*), i64 %13
%15 = getelementptr i64, i64* inttoptr (i64 29493248 to i64*), i64 %13
%16 = bitcast i64* %14 to <2 x i64>*
%17 = load <2 x i64>, <2 x i64>* %16
%18 = getelementptr i64, i64* %14, i64 2
%19 = bitcast i64* %18 to <2 x i64>*
%20 = load <2 x i64>, <2 x i64>* %19
%21 = bitcast i64* %15 to <2 x i64>*
store <2 x i64> %17, <2 x i64>* %21
%22 = getelementptr i64, i64* %15, i64 2
%23 = bitcast i64* %22 to <2 x i64>*
store <2 x i64> %20, <2 x i64>* %23
%24 = add nuw nsw i64 %2, 8
%25 = icmp eq i64 %24, 136
br i1 %25, label %26, label %1
26: ; preds = %1
%27 = load i64, i64* inttoptr (i64 13376 to i64*)
store i64 %27, i64* inttoptr (i64 29494336 to i64*)
%28 = load i64, i64* inttoptr (i64 13384 to i64*)
store i64 %28, i64* inttoptr (i64 29494344 to i64*)
ret void
}