#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 LINUX_REBOOT_MAGIC2;
int LINUX_REBOOT_MAGIC2A;
int LINUX_REBOOT_MAGIC2B;
int LINUX_REBOOT_MAGIC2C;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("MAGIC2 0x%X\n", LINUX_REBOOT_MAGIC2);
  printf("MAGIC2A 0x%X\n", LINUX_REBOOT_MAGIC2A);
  printf("MAGIC2B 0x%X\n", LINUX_REBOOT_MAGIC2B);
  printf("MAGIC2C 0x%X\n", LINUX_REBOOT_MAGIC2C);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"MAGIC2 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2 = global i32 0
@.str.1 = [14 x i8] c"MAGIC2A 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2A = global i32 0
@.str.2 = [14 x i8] c"MAGIC2B 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2B = global i32 0
@.str.3 = [14 x i8] c"MAGIC2C 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2C = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @LINUX_REBOOT_MAGIC2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @LINUX_REBOOT_MAGIC2A
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @LINUX_REBOOT_MAGIC2B
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @LINUX_REBOOT_MAGIC2C
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"MAGIC2 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2 = global i32 0
@.str.1 = [14 x i8] c"MAGIC2A 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2A = global i32 0
@.str.2 = [14 x i8] c"MAGIC2B 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2B = global i32 0
@.str.3 = [14 x i8] c"MAGIC2C 0x%X\0A\00"
@LINUX_REBOOT_MAGIC2C = global i32 0
define i32 @main() {
%1 = load i32, i32* @LINUX_REBOOT_MAGIC2
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @LINUX_REBOOT_MAGIC2A
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @LINUX_REBOOT_MAGIC2B
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @LINUX_REBOOT_MAGIC2C
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret i32 0
}