#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 *);
page3() {
  printf("You walk to the nearest Computer terminal and request more "
         "information about\n");
  printf("Christmas.  The Computer says, \"That is an A-1 ULTRAVIOLET ONLY "
         "IMMEDIATE\n");
  printf("TERMINATION classified topic.  What is your clearance please, "
         "Troubleshooter?\"\n");
  return choose(4, "You give your correct clearance", 5,
                "You lie and claim Ultraviolet clearance");
}


x86 assembly (clang, -O0):
<page3>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf17(%rip),%rdi
call   1040 <printf@plt>
lea    0xf56(%rip),%rdi
call   1040 <printf@plt>
mov    $0x4,%edi
lea    0xf95(%rip),%rsi
mov    $0x5,%edx
lea    0xfa9(%rip),%rcx
call   1030 <choose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page3>:
push   %rax
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xf61(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9f(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rsi
lea    0xecd(%rip),%rcx
mov    $0x4,%edi
mov    $0x5,%edx
pop    %rax
jmp    1040 <choose@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"You walk to the nearest Computer terminal and request more information about\0A\00"
@.str.1 = [75 x i8] c"Christmas. The Computer says, \22That is an A-1 ULTRAVIOLET ONLY IMMEDIATE\0A\00"
@.str.2 = [80 x i8] c"TERMINATION classified topic. What is your clearance please, Troubleshooter?\22\0A\00"
@.str.3 = [32 x i8] c"You give your correct clearance\00"
@.str.4 = [40 x i8] c"You lie and claim Ultraviolet clearance\00"
define i32 @page3() {
%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 ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @choose(i32 4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str.3 = [32 x i8] c"You give your correct clearance\00"
@.str.4 = [40 x i8] c"You lie and claim Ultraviolet clearance\00"
@str = [77 x i8] c"You walk to the nearest Computer terminal and request more information about\00"
@str.5 = [74 x i8] c"Christmas. The Computer says, \22That is an A-1 ULTRAVIOLET ONLY IMMEDIATE\00"
@str.6 = [79 x i8] c"TERMINATION classified topic. What is your clearance please, Troubleshooter?\22\00"
define i32 @page3() {
%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 ([74 x i8], [74 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @choose(i32 4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0))
ret i32 %4
}