#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 */
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
scalar_t__ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int main(int argc, char **argv) {
  char *target;
  target = malloc(sizeof(char));
  strncpy(target, "Wait this isn't a lie?", 22);
  printf(argv[1]);
  puts("Now that your celebration has come, how do you feel?");
  printf("%p\n", target);
  printf("%s\n", target);
  if (strncmp(target, "Wait this isn't a lie?", 22) != 0) {
    puts("I bet you fell cheated, don't you? Level Cleared!\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe81(%rip),%rsi
mov    $0x16,%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe78(%rip),%rdi
call   1050 <puts@plt>
mov    -0x18(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xe2d(%rip),%rsi
mov    $0x16,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     11f3 <main+0xa3>
lea    0xe66(%rip),%rdi
call   1050 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    $0x1,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
lea    0xe94(%rip),%r14
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x16,%edx
call   1030 <strncpy@plt>
mov    0x8(%r15),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe89(%rip),%rdi
call   1050 <puts@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x16,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     11cd <main+0x7d>
lea    0xe88(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Wait this isn't a lie?\00"
@.str.1 = [53 x i8] c"Now that your celebration has come, how do you feel?\00"
@.str.2 = [4 x i8] c"%p\0A\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [51 x i8] c"I bet you fell cheated, don't you? Level Cleared!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @malloc(i32 1)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @strncpy(i8* %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 (i8*, ...) @printf(i8* %12)
%14 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8*, i8** %6
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = load i8*, i8** %6
%20 = call i64 @strncmp(i8* %19, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = call i32 @puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %22, %2
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [23 x i8] c"Wait this isn't a lie?\00"
@.str.1 = [53 x i8] c"Now that your celebration has come, how do you feel?\00"
@.str.2 = [4 x i8] c"%p\0A\00"
@.str.4 = [51 x i8] c"I bet you fell cheated, don't you? Level Cleared!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%4 = tail call i32 @strncpy(i8* %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22)
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%10 = tail call i32 @puts(i8* dereferenceable(1) %3)
%11 = tail call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret i32 0
}