#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*/ initOs();
int /*<<< orphan*/ kprintf(char *, int, int);
int /*<<< orphan*/ userLogn();
int main() {
  initOs();
  userLogn();
  kprintf("*************************************************", 0xA, 1);
  kprintf("*\t\t WELCOME TO Moonshine Kernel\t\t *", 0xA, 2);
  kprintf("*\t\t Copyright (c) 2016 Paul & Jan\t\t*", 0xA, 3);
  kprintf("*************************************************", 0xA, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <initOs@plt>
mov    $0x0,%al
call   1030 <userLogn@plt>
lea    0xeac(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
call   1050 <kprintf@plt>
lea    0xec8(%rip),%rdi
mov    $0xa,%esi
mov    $0x2,%edx
call   1050 <kprintf@plt>
lea    0xed6(%rip),%rdi
mov    $0xa,%esi
mov    $0x3,%edx
call   1050 <kprintf@plt>
lea    0xe6a(%rip),%rdi
mov    $0xa,%esi
mov    $0x4,%edx
call   1050 <kprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <initOs@plt>
xor    %eax,%eax
call   1030 <userLogn@plt>
lea    0xeba(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x1,%edx
call   1050 <kprintf@plt>
lea    0xed3(%rip),%rdi
mov    $0xa,%esi
mov    $0x2,%edx
call   1050 <kprintf@plt>
lea    0xee1(%rip),%rdi
mov    $0xa,%esi
mov    $0x3,%edx
call   1050 <kprintf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x4,%edx
call   1050 <kprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"*************************************************\00"
@.str.1 = [36 x i8] c"*\09\09 WELCOME TO Moonshine Kernel\09\09 *\00"
@.str.2 = [37 x i8] c"*\09\09 Copyright (c) 2016 Paul & Jan\09\09*\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initOs()
%3 = call i32 (...) @userLogn()
%4 = call i32 @kprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 10, i32 1)
%5 = call i32 @kprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 2)
%6 = call i32 @kprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 3)
%7 = call i32 @kprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 10, i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [50 x i8] c"*************************************************\00"
@.str.1 = [36 x i8] c"*\09\09 WELCOME TO Moonshine Kernel\09\09 *\00"
@.str.2 = [37 x i8] c"*\09\09 Copyright (c) 2016 Paul & Jan\09\09*\00"
define i32 @main() {
%1 = tail call i32 (...) @initOs()
%2 = tail call i32 (...) @userLogn()
%3 = tail call i32 @kprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 10, i32 1)
%4 = tail call i32 @kprintf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 10, i32 2)
%5 = tail call i32 @kprintf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 3)
%6 = tail call i32 @kprintf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 10, i32 4)
ret i32 0
}