#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void kernel_main() {
  for (size_t i = 0; i < 32; i++) {
    ((uint64_t *)(0xB8000))[i] = 0x1F201F201F201F20;
  }
}


x86 assembly (clang, -O0):
<kernel_main>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
cmpq   $0x20,-0x8(%rbp)
jae    1138 <kernel_main+0x38>
mov    -0x8(%rbp),%rcx
mov    $0xb8000,%eax
movl   $0x1f201f20,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <kernel_main+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_main>:
movl   $0x1f201f20,0xb8000
20 1f 20 1f
movl   $0x1f201f20,0xb8004
20 1f 20 1f
movl   $0x1f201f20,0xb8008
20 1f 20 1f
movl   $0x1f201f20,0xb800c
20 1f 20 1f
movl   $0x1f201f20,0xb8010
20 1f 20 1f
movl   $0x1f201f20,0xb8014
20 1f 20 1f
movl   $0x1f201f20,0xb8018
20 1f 20 1f
movl   $0x1f201f20,0xb801c
20 1f 20 1f
movl   $0x1f201f20,0xb8020
20 1f 20 1f
movl   $0x1f201f20,0xb8024
20 1f 20 1f
movl   $0x1f201f20,0xb8028
20 1f 20 1f
movl   $0x1f201f20,0xb802c
20 1f 20 1f
movl   $0x1f201f20,0xb8030
20 1f 20 1f
movl   $0x1f201f20,0xb8034
20 1f 20 1f
movl   $0x1f201f20,0xb8038
20 1f 20 1f
movl   $0x1f201f20,0xb803c
20 1f 20 1f
movl   $0x1f201f20,0xb8040
20 1f 20 1f
movl   $0x1f201f20,0xb8044
20 1f 20 1f
movl   $0x1f201f20,0xb8048
20 1f 20 1f
movl   $0x1f201f20,0xb804c
20 1f 20 1f
movl   $0x1f201f20,0xb8050
20 1f 20 1f
movl   $0x1f201f20,0xb8054
20 1f 20 1f
movl   $0x1f201f20,0xb8058
20 1f 20 1f
movl   $0x1f201f20,0xb805c
20 1f 20 1f
movl   $0x1f201f20,0xb8060
20 1f 20 1f
movl   $0x1f201f20,0xb8064
20 1f 20 1f
movl   $0x1f201f20,0xb8068
20 1f 20 1f
movl   $0x1f201f20,0xb806c
20 1f 20 1f
movl   $0x1f201f20,0xb8070
20 1f 20 1f
movl   $0x1f201f20,0xb8074
20 1f 20 1f
movl   $0x1f201f20,0xb8078
20 1f 20 1f
movl   $0x1f201f20,0xb807c
20 1f 20 1f
ret

LLVM IR (-O0):
define void @kernel_main() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %8, %0
%3 = load i64, i64* %1
%4 = icmp ult i64 %3, 32
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i64, i64* %1
%7 = getelementptr inbounds i32, i32* inttoptr (i64 753664 to i32*), i64 %6
store i32 522198816, i32* %7
br label %8
8: ; preds = %5
%9 = load i64, i64* %1
%10 = add i64 %9, 1
store i64 %10, i64* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @kernel_main() {
store i32 522198816, i32* inttoptr (i64 753664 to i32*)
store i32 522198816, i32* inttoptr (i64 753668 to i32*)
store i32 522198816, i32* inttoptr (i64 753672 to i32*)
store i32 522198816, i32* inttoptr (i64 753676 to i32*)
store i32 522198816, i32* inttoptr (i64 753680 to i32*)
store i32 522198816, i32* inttoptr (i64 753684 to i32*)
store i32 522198816, i32* inttoptr (i64 753688 to i32*)
store i32 522198816, i32* inttoptr (i64 753692 to i32*)
store i32 522198816, i32* inttoptr (i64 753696 to i32*)
store i32 522198816, i32* inttoptr (i64 753700 to i32*)
store i32 522198816, i32* inttoptr (i64 753704 to i32*)
store i32 522198816, i32* inttoptr (i64 753708 to i32*)
store i32 522198816, i32* inttoptr (i64 753712 to i32*)
store i32 522198816, i32* inttoptr (i64 753716 to i32*)
store i32 522198816, i32* inttoptr (i64 753720 to i32*)
store i32 522198816, i32* inttoptr (i64 753724 to i32*)
store i32 522198816, i32* inttoptr (i64 753728 to i32*)
store i32 522198816, i32* inttoptr (i64 753732 to i32*)
store i32 522198816, i32* inttoptr (i64 753736 to i32*)
store i32 522198816, i32* inttoptr (i64 753740 to i32*)
store i32 522198816, i32* inttoptr (i64 753744 to i32*)
store i32 522198816, i32* inttoptr (i64 753748 to i32*)
store i32 522198816, i32* inttoptr (i64 753752 to i32*)
store i32 522198816, i32* inttoptr (i64 753756 to i32*)
store i32 522198816, i32* inttoptr (i64 753760 to i32*)
store i32 522198816, i32* inttoptr (i64 753764 to i32*)
store i32 522198816, i32* inttoptr (i64 753768 to i32*)
store i32 522198816, i32* inttoptr (i64 753772 to i32*)
store i32 522198816, i32* inttoptr (i64 753776 to i32*)
store i32 522198816, i32* inttoptr (i64 753780 to i32*)
store i32 522198816, i32* inttoptr (i64 753784 to i32*)
store i32 522198816, i32* inttoptr (i64 753788 to i32*)
ret void
}