#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 choose(int, char *, int, char *);
int /*<<< orphan*/ printf(char *);
page42() {
  printf("\"Aha, so you are a member of the elitist Illuminati secret "
         "society,\" he says\n");
  printf("loudly, \"that is most interesting.\"  He turns to the large class "
         "already\n");
  printf("seated in the auditorium and says, \"You see, class, by simply using "
         "the correct\n");
  printf("hand shake you can identify the member of any secret society.  "
         "Please keep your\n");
  printf("weapons trained on him while I call a guard.\n");
  return choose(51, "You run for it", 52, "You wait for the guard");
}


x86 assembly (clang, -O0):
<page42>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf17(%rip),%rdi
call   1040 <printf@plt>
lea    0xf55(%rip),%rdi
call   1040 <printf@plt>
lea    0xf9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xfdf(%rip),%rdi
call   1040 <printf@plt>
mov    $0x33,%edi
lea    0xffc(%rip),%rsi
mov    $0x34,%edx
lea    0xfff(%rip),%rcx
call   1030 <choose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page42>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7c(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc0(%rip),%rdi
call   1030 <puts@plt>
lea    0x1004(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9c(%rip),%rsi
lea    0xea4(%rip),%rcx
mov    $0x33,%edi
mov    $0x34,%edx
pop    %rax
jmp    1040 <choose@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"\22Aha, so you are a member of the elitist Illuminati secret society,\22 he says\0A\00"
@.str.1 = [74 x i8] c"loudly, \22that is most interesting.\22 He turns to the large class already\0A\00"
@.str.2 = [81 x i8] c"seated in the auditorium and says, \22You see, class, by simply using the correct\0A\00"
@.str.3 = [81 x i8] c"hand shake you can identify the member of any secret society. Please keep your\0A\00"
@.str.4 = [46 x i8] c"weapons trained on him while I call a guard.\0A\00"
@.str.5 = [15 x i8] c"You run for it\00"
@.str.6 = [23 x i8] c"You wait for the guard\00"
define i32 @page42() {
%1 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @choose(i32 51, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
ret i32 %6
}

LLVM IR (-O2):
@.str.5 = [15 x i8] c"You run for it\00"
@.str.6 = [23 x i8] c"You wait for the guard\00"
@str = [77 x i8] c"\22Aha, so you are a member of the elitist Illuminati secret society,\22 he says\00"
@str.7 = [73 x i8] c"loudly, \22that is most interesting.\22 He turns to the large class already\00"
@str.8 = [80 x i8] c"seated in the auditorium and says, \22You see, class, by simply using the correct\00"
@str.9 = [80 x i8] c"hand shake you can identify the member of any secret society. Please keep your\00"
@str.10 = [45 x i8] c"weapons trained on him while I call a guard.\00"
define i32 @page42() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.8, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.10, i64 0, i64 0))
%6 = tail call i32 @choose(i32 51, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
ret i32 %6
}