#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 *);
page24() {
  printf("Golly, I never expected someone to pick this.  I haven\'t even "
         "designed\n");
  printf("the 12 citizens who are going to make a sponge out of you.  Tell you "
         "what,\n");
  printf("I\'ll give you a second chance.\n");
  return choose(28, "You change your mind and say it was only a bad joke", 25,
                "You REALLY want to shoot it out");
}


x86 assembly (clang, -O0):
<page24>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf11(%rip),%rdi
call   1040 <printf@plt>
lea    0xf51(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1c,%edi
lea    0xf60(%rip),%rsi
mov    $0x19,%edx
lea    0xf88(%rip),%rcx
call   1030 <choose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page24>:
push   %rax
lea    0xf2c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf67(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rsi
lea    0xee1(%rip),%rcx
mov    $0x1c,%edi
mov    $0x19,%edx
pop    %rax
jmp    1040 <choose@plt>

LLVM IR (-O0):
@.str = [72 x i8] c"Golly, I never expected someone to pick this. I haven't even designed\0A\00"
@.str.1 = [76 x i8] c"the 12 citizens who are going to make a sponge out of you. Tell you what,\0A\00"
@.str.2 = [32 x i8] c"I'll give you a second chance.\0A\00"
@.str.3 = [52 x i8] c"You change your mind and say it was only a bad joke\00"
@.str.4 = [32 x i8] c"You REALLY want to shoot it out\00"
define i32 @page24() {
%1 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @choose(i32 28, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str.3 = [52 x i8] c"You change your mind and say it was only a bad joke\00"
@.str.4 = [32 x i8] c"You REALLY want to shoot it out\00"
@str = [71 x i8] c"Golly, I never expected someone to pick this. I haven't even designed\00"
@str.5 = [75 x i8] c"the 12 citizens who are going to make a sponge out of you. Tell you what,\00"
@str.6 = [31 x i8] c"I'll give you a second chance.\00"
define i32 @page24() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @choose(i32 28, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret i32 %4
}