void aica_init() {
  int i, j;
  (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                (0x2800)))) = 0x0000;
  for (i = 0; i < 64; i++) {
    (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                  (0x80 * (i) + (0))))) = 0x8000;
    for (j = 4; j < 0x80; j += 4)
      (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                    (0x80 * (i) + (j))))) = 0;
    (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                  (0x80 * (i) + (20))))) = 0x1f;
  }
  (*((volatile unsigned long *)(((volatile unsigned char *)0x00800000) +
                                (0x2800)))) = 0x000f;
}


x86 assembly (clang, -O0):
<aica_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x800000,%eax
movq   $0x0,0x2800(%rax)
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    11a0 <aica_init+0xa0>
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    $0x0,%eax
movslq %eax,%rcx
mov    $0x800000,%eax
movq   $0x8000,(%rax,%rcx,1)
movl   $0x4,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1179 <aica_init+0x79>
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    -0x8(%rbp),%eax
movslq %eax,%rcx
mov    $0x800000,%eax
movq   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <aica_init+0x45>
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
add    $0x14,%eax
movslq %eax,%rcx
mov    $0x800000,%eax
movq   $0x1f,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <aica_init+0x1b>
mov    $0x800000,%eax
movq   $0xf,0x2800(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<aica_init>:
mov    $0x80007c,%eax
movq   $0x0,0x802800
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movq   $0x8000,-0x7c(%rax,%rcx,1)
movq   $0x0,-0x78(%rax,%rcx,1)
movq   $0x0,-0x74(%rax,%rcx,1)
movq   $0x0,-0x70(%rax,%rcx,1)
movq   $0x0,-0x6c(%rax,%rcx,1)
movq   $0x0,-0x68(%rax,%rcx,1)
movq   $0x0,-0x64(%rax,%rcx,1)
movq   $0x0,-0x60(%rax,%rcx,1)
movq   $0x0,-0x5c(%rax,%rcx,1)
movq   $0x0,-0x58(%rax,%rcx,1)
movq   $0x0,-0x54(%rax,%rcx,1)
movq   $0x0,-0x50(%rax,%rcx,1)
movq   $0x0,-0x4c(%rax,%rcx,1)
movq   $0x0,-0x48(%rax,%rcx,1)
movq   $0x0,-0x44(%rax,%rcx,1)
movq   $0x0,-0x40(%rax,%rcx,1)
movq   $0x0,-0x3c(%rax,%rcx,1)
movq   $0x0,-0x38(%rax,%rcx,1)
movq   $0x0,-0x34(%rax,%rcx,1)
movq   $0x0,-0x30(%rax,%rcx,1)
movq   $0x0,-0x2c(%rax,%rcx,1)
movq   $0x0,-0x28(%rax,%rcx,1)
movq   $0x0,-0x24(%rax,%rcx,1)
movq   $0x0,-0x20(%rax,%rcx,1)
movq   $0x0,-0x1c(%rax,%rcx,1)
movq   $0x0,-0x18(%rax,%rcx,1)
movq   $0x0,-0x14(%rax,%rcx,1)
movq   $0x0,-0x10(%rax,%rcx,1)
movq   $0x0,-0xc(%rax,%rcx,1)
movq   $0x0,-0x8(%rax,%rcx,1)
movq   $0x0,-0x4(%rax,%rcx,1)
movq   $0x0,(%rax,%rcx,1)
movq   $0x1f,-0x68(%rax,%rcx,1)
sub    $0xffffffffffffff80,%rcx
cmp    $0x2000,%rcx
jne    1120 <aica_init+0x20>
movq   $0xf,0x802800
ret

LLVM IR (-O0):
define void @aica_init() {
%1 = alloca i32
%2 = alloca i32
store volatile i64 0, i64* bitcast (i8* getelementptr inbounds (i8, i8* inttoptr (i64 8388608 to i8*), i64 10240) to i64*)
store i32 0, i32* %1
br label %3
3: ; preds = %34, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 64
br i1 %5, label %6, label %37
6: ; preds = %3
%7 = load i32, i32* %1
%8 = mul nsw i32 128, %7
%9 = add nsw i32 %8, 0
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %10
%12 = bitcast i8* %11 to i64*
store volatile i64 32768, i64* %12
store i32 4, i32* %2
br label %13
13: ; preds = %24, %6
%14 = load i32, i32* %2
%15 = icmp slt i32 %14, 128
br i1 %15, label %16, label %27
16: ; preds = %13
%17 = load i32, i32* %1
%18 = mul nsw i32 128, %17
%19 = load i32, i32* %2
%20 = add nsw i32 %18, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %21
%23 = bitcast i8* %22 to i64*
store volatile i64 0, i64* %23
br label %24
24: ; preds = %16
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 4
store i32 %26, i32* %2
br label %13
27: ; preds = %13
%28 = load i32, i32* %1
%29 = mul nsw i32 128, %28
%30 = add nsw i32 %29, 20
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %31
%33 = bitcast i8* %32 to i64*
store volatile i64 31, i64* %33
br label %34
34: ; preds = %27
%35 = load i32, i32* %1
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %3
37: ; preds = %3
store volatile i64 15, i64* bitcast (i8* getelementptr inbounds (i8, i8* inttoptr (i64 8388608 to i8*), i64 10240) to i64*)
ret void
}

LLVM IR (-O2):
define void @aica_init() {
store volatile i64 0, i64* inttoptr (i64 8398848 to i64*)
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %102, %1 ]
%3 = shl nuw nsw i64 %2, 7
%4 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %3
%5 = bitcast i8* %4 to i64*
store volatile i64 32768, i64* %5
%6 = or i64 %3, 4
%7 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %6
%8 = bitcast i8* %7 to i64*
store volatile i64 0, i64* %8
%9 = or i64 %3, 8
%10 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %9
%11 = bitcast i8* %10 to i64*
store volatile i64 0, i64* %11
%12 = or i64 %3, 12
%13 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %12
%14 = bitcast i8* %13 to i64*
store volatile i64 0, i64* %14
%15 = or i64 %3, 16
%16 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %15
%17 = bitcast i8* %16 to i64*
store volatile i64 0, i64* %17
%18 = or i64 %3, 20
%19 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %18
%20 = bitcast i8* %19 to i64*
store volatile i64 0, i64* %20
%21 = or i64 %3, 24
%22 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %21
%23 = bitcast i8* %22 to i64*
store volatile i64 0, i64* %23
%24 = or i64 %3, 28
%25 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %24
%26 = bitcast i8* %25 to i64*
store volatile i64 0, i64* %26
%27 = or i64 %3, 32
%28 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %27
%29 = bitcast i8* %28 to i64*
store volatile i64 0, i64* %29
%30 = or i64 %3, 36
%31 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %30
%32 = bitcast i8* %31 to i64*
store volatile i64 0, i64* %32
%33 = or i64 %3, 40
%34 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %33
%35 = bitcast i8* %34 to i64*
store volatile i64 0, i64* %35
%36 = or i64 %3, 44
%37 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %36
%38 = bitcast i8* %37 to i64*
store volatile i64 0, i64* %38
%39 = or i64 %3, 48
%40 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %39
%41 = bitcast i8* %40 to i64*
store volatile i64 0, i64* %41
%42 = or i64 %3, 52
%43 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %42
%44 = bitcast i8* %43 to i64*
store volatile i64 0, i64* %44
%45 = or i64 %3, 56
%46 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %45
%47 = bitcast i8* %46 to i64*
store volatile i64 0, i64* %47
%48 = or i64 %3, 60
%49 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %48
%50 = bitcast i8* %49 to i64*
store volatile i64 0, i64* %50
%51 = or i64 %3, 64
%52 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %51
%53 = bitcast i8* %52 to i64*
store volatile i64 0, i64* %53
%54 = or i64 %3, 68
%55 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %54
%56 = bitcast i8* %55 to i64*
store volatile i64 0, i64* %56
%57 = or i64 %3, 72
%58 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %57
%59 = bitcast i8* %58 to i64*
store volatile i64 0, i64* %59
%60 = or i64 %3, 76
%61 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %60
%62 = bitcast i8* %61 to i64*
store volatile i64 0, i64* %62
%63 = or i64 %3, 80
%64 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %63
%65 = bitcast i8* %64 to i64*
store volatile i64 0, i64* %65
%66 = or i64 %3, 84
%67 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %66
%68 = bitcast i8* %67 to i64*
store volatile i64 0, i64* %68
%69 = or i64 %3, 88
%70 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %69
%71 = bitcast i8* %70 to i64*
store volatile i64 0, i64* %71
%72 = or i64 %3, 92
%73 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %72
%74 = bitcast i8* %73 to i64*
store volatile i64 0, i64* %74
%75 = or i64 %3, 96
%76 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %75
%77 = bitcast i8* %76 to i64*
store volatile i64 0, i64* %77
%78 = or i64 %3, 100
%79 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %78
%80 = bitcast i8* %79 to i64*
store volatile i64 0, i64* %80
%81 = or i64 %3, 104
%82 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %81
%83 = bitcast i8* %82 to i64*
store volatile i64 0, i64* %83
%84 = or i64 %3, 108
%85 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %84
%86 = bitcast i8* %85 to i64*
store volatile i64 0, i64* %86
%87 = or i64 %3, 112
%88 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %87
%89 = bitcast i8* %88 to i64*
store volatile i64 0, i64* %89
%90 = or i64 %3, 116
%91 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %90
%92 = bitcast i8* %91 to i64*
store volatile i64 0, i64* %92
%93 = or i64 %3, 120
%94 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %93
%95 = bitcast i8* %94 to i64*
store volatile i64 0, i64* %95
%96 = or i64 %3, 124
%97 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %96
%98 = bitcast i8* %97 to i64*
store volatile i64 0, i64* %98
%99 = or i64 %3, 20
%100 = getelementptr inbounds i8, i8* inttoptr (i64 8388608 to i8*), i64 %99
%101 = bitcast i8* %100 to i64*
store volatile i64 31, i64* %101
%102 = add nuw nsw i64 %2, 1
%103 = icmp eq i64 %102, 64
br i1 %103, label %104, label %1
104: ; preds = %1
store volatile i64 15, i64* inttoptr (i64 8398848 to i64*)
ret void
}