#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 */
scalar_t__ getuid();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("You know, you really need to be more important to do things.\n");
  printf("%d\n", getuid());
  if (getuid() == 0) {
    printf("Wow, maybe you are that important. Level Cleared!\n");
  } else {
    printf("You should really talk to someone more important.\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,%rsi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getuid@plt>
cmp    $0x0,%rax
jne    1179 <main+0x59>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1187 <main+0x67>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getuid@plt>
lea    0xeb5(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <getuid@plt>
test   %rax,%rax
lea    0xf0d(%rip),%rax
lea    0xed4(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [62 x i8] c"You know, you really need to be more important to do things.\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [51 x i8] c"Wow, maybe you are that important. Level Cleared!\0A\00"
@.str.3 = [51 x i8] c"You should really talk to someone more important.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = call i64 (...) @getuid()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %3)
%5 = call i64 (...) @getuid()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [61 x i8] c"You know, you really need to be more important to do things.\00"
@str.4 = [50 x i8] c"You should really talk to someone more important.\00"
@str.5 = [50 x i8] c"Wow, maybe you are that important. Level Cleared!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 (...) @getuid()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64 %2)
%4 = tail call i64 (...) @getuid()
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @str.4, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}