#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 */

/* Variables and functions */
int /*<<< orphan*/ core_exception_init();
int /*<<< orphan*/ core_exception_regist_thrd_ref();
int /*<<< orphan*/ core_kclock_init();
int /*<<< orphan*/ core_kconsole_init();
int /*<<< orphan*/ core_kconsole_kprint(int, char *);
int /*<<< orphan*/ core_mm_init();
int /*<<< orphan*/ core_pm_init();
void core_main_main() {
  core_kconsole_init();
  core_kconsole_kprint(0x00000004, "\nEntering kernel main...\n");
  ;
  core_kconsole_kprint(0x00000004,
                       "\nInitializing exception handling framework...\n");
  ;
  core_exception_init();
  core_kconsole_kprint(0x00000004, "\nInitializing mm module...\n");
  ;
  core_mm_init();
  core_kconsole_kprint(0x00000004, "\nInitializing kernel clock...\n");
  ;
  core_kclock_init();
  core_kconsole_kprint(0x00000004, "\nInitializing process management...\n");
  ;
  core_pm_init();
  core_exception_regist_thrd_ref();
  void test();
  test();
  while (1)
    ;
}


x86 assembly (clang, -O0):
<core_main_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <core_kconsole_init@plt>
mov    $0x4,%edi
lea    0xe69(%rip),%rsi
call   1060 <core_kconsole_kprint@plt>
mov    $0x4,%edi
lea    0xe72(%rip),%rsi
call   1060 <core_kconsole_kprint@plt>
mov    $0x0,%al
call   1050 <core_exception_init@plt>
mov    $0x4,%edi
lea    0xe89(%rip),%rsi
call   1060 <core_kconsole_kprint@plt>
mov    $0x0,%al
call   1090 <core_mm_init@plt>
mov    $0x4,%edi
lea    0xe8d(%rip),%rsi
call   1060 <core_kconsole_kprint@plt>
mov    $0x0,%al
call   1040 <core_kclock_init@plt>
mov    $0x4,%edi
lea    0xe94(%rip),%rsi
call   1060 <core_kconsole_kprint@plt>
mov    $0x0,%al
call   1080 <core_pm_init@plt>
mov    $0x0,%al
call   1030 <core_exception_regist_thrd_ref@plt>
mov    $0x0,%al
call   10a0 <test@plt>
jmp    120a <core_main_main+0x8a>

x86 assembly (clang, -O2):
<core_main_main>:
push   %rax
xor    %eax,%eax
call   1070 <core_kconsole_init@plt>
lea    0xe71(%rip),%rsi
mov    $0x4,%edi
call   1060 <core_kconsole_kprint@plt>
lea    0xe7a(%rip),%rsi
mov    $0x4,%edi
call   1060 <core_kconsole_kprint@plt>
xor    %eax,%eax
call   1050 <core_exception_init@plt>
lea    0xe91(%rip),%rsi
mov    $0x4,%edi
call   1060 <core_kconsole_kprint@plt>
xor    %eax,%eax
call   1090 <core_mm_init@plt>
lea    0xe95(%rip),%rsi
mov    $0x4,%edi
call   1060 <core_kconsole_kprint@plt>
xor    %eax,%eax
call   1040 <core_kclock_init@plt>
lea    0xe9c(%rip),%rsi
mov    $0x4,%edi
call   1060 <core_kconsole_kprint@plt>
xor    %eax,%eax
call   1080 <core_pm_init@plt>
xor    %eax,%eax
call   1030 <core_exception_regist_thrd_ref@plt>
xor    %eax,%eax
call   10a0 <test@plt>
nopw   0x0(%rax,%rax,1)
jmp    1210 <core_main_main+0x90>

LLVM IR (-O0):
@.str = [26 x i8] c"\0AEntering kernel main...\0A\00"
@.str.1 = [47 x i8] c"\0AInitializing exception handling framework...\0A\00"
@.str.2 = [28 x i8] c"\0AInitializing mm module...\0A\00"
@.str.3 = [31 x i8] c"\0AInitializing kernel clock...\0A\00"
@.str.4 = [37 x i8] c"\0AInitializing process management...\0A\00"
define void @core_main_main() {
%1 = call i32 (...) @core_kconsole_init()
%2 = call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @core_exception_init()
%5 = call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (...) @core_mm_init()
%7 = call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (...) @core_kclock_init()
%9 = call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (...) @core_pm_init()
%11 = call i32 (...) @core_exception_regist_thrd_ref()
br label %12
12: ; preds = %0, %12
br label %12
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AEntering kernel main...\0A\00"
@.str.1 = [47 x i8] c"\0AInitializing exception handling framework...\0A\00"
@.str.2 = [28 x i8] c"\0AInitializing mm module...\0A\00"
@.str.3 = [31 x i8] c"\0AInitializing kernel clock...\0A\00"
@.str.4 = [37 x i8] c"\0AInitializing process management...\0A\00"
define void @core_main_main() {
%1 = tail call i32 (...) @core_kconsole_init()
%2 = tail call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @core_exception_init()
%5 = tail call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (...) @core_mm_init()
%7 = tail call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 (...) @core_kclock_init()
%9 = tail call i32 @core_kconsole_kprint(i32 4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (...) @core_pm_init()
%11 = tail call i32 (...) @core_exception_regist_thrd_ref()
tail call void (...) @test()
br label %12
12: ; preds = %0, %12
br label %12
}