#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*/ KEYBOARD_HANDLER();
int /*<<< orphan*/ os_clear_screen();
int /*<<< orphan*/ os_move_cursor(int, int /*<<< orphan*/);
int /*<<< orphan*/ os_print_string(char *, int);
int main() {
  os_clear_screen();
  os_move_cursor(4, 0);
  os_print_string("64-bit Kernel Loaded in Memory", 1);
  os_print_string("SYSTEM INITIALIZED SUCCESSFULLY!", 2);
  os_print_string(
      "x86 Keyboard Port Enabling......... Press a Key to see the Pressed one!",
      3);
  os_print_string(">", 4);
  while (1) {
    KEYBOARD_HANDLER();
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <os_clear_screen@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1050 <os_move_cursor@plt>
lea    0xe97(%rip),%rdi
mov    $0x1,%esi
call   1060 <os_print_string@plt>
lea    0xea5(%rip),%rdi
mov    $0x2,%esi
call   1060 <os_print_string@plt>
lea    0xeb5(%rip),%rdi
mov    $0x3,%esi
call   1060 <os_print_string@plt>
lea    0xeec(%rip),%rdi
mov    $0x4,%esi
call   1060 <os_print_string@plt>
mov    $0x0,%al
call   1040 <KEYBOARD_HANDLER@plt>
jmp    11a6 <main+0x66>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <os_clear_screen@plt>
mov    $0x4,%edi
xor    %esi,%esi
call   1050 <os_move_cursor@plt>
lea    0xea5(%rip),%rdi
mov    $0x1,%esi
call   1060 <os_print_string@plt>
lea    0xeb3(%rip),%rdi
mov    $0x2,%esi
call   1060 <os_print_string@plt>
lea    0xec3(%rip),%rdi
mov    $0x3,%esi
call   1060 <os_print_string@plt>
lea    0xefa(%rip),%rdi
mov    $0x4,%esi
call   1060 <os_print_string@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <KEYBOARD_HANDLER@plt>
jmp    11a0 <main+0x60>

LLVM IR (-O0):
@.str = [31 x i8] c"64-bit Kernel Loaded in Memory\00"
@.str.1 = [33 x i8] c"SYSTEM INITIALIZED SUCCESSFULLY!\00"
@.str.2 = [72 x i8] c"x86 Keyboard Port Enabling......... Press a Key to see the Pressed one!\00"
@.str.3 = [2 x i8] c">\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @os_clear_screen()
%3 = call i32 @os_move_cursor(i32 4, i32 0)
%4 = call i32 @os_print_string(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 @os_print_string(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 2)
%6 = call i32 @os_print_string(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0), i32 3)
%7 = call i32 @os_print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 4)
br label %8
8: ; preds = %0, %8
%9 = call i32 (...) @KEYBOARD_HANDLER()
br label %8
}

LLVM IR (-O2):
@.str = [31 x i8] c"64-bit Kernel Loaded in Memory\00"
@.str.1 = [33 x i8] c"SYSTEM INITIALIZED SUCCESSFULLY!\00"
@.str.2 = [72 x i8] c"x86 Keyboard Port Enabling......... Press a Key to see the Pressed one!\00"
@.str.3 = [2 x i8] c">\00"
define i32 @main() {
%1 = tail call i32 (...) @os_clear_screen()
%2 = tail call i32 @os_move_cursor(i32 4, i32 0)
%3 = tail call i32 @os_print_string(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @os_print_string(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 2)
%5 = tail call i32 @os_print_string(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0), i32 3)
%6 = tail call i32 @os_print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 4)
br label %7
7: ; preds = %0, %7
%8 = tail call i32 (...) @KEYBOARD_HANDLER()
br label %7
}