#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 *);
page31() {
  printf("Like any good troubleshooter you make the least expensive decision "
         "and threaten\n");
  printf("him for information.  With lightning like reflexes you whip out your "
         "laser and\n");
  printf("stick it up his nose.  \"Talk, you traitorous Christmas celebrator, "
         "or who nose\n");
  printf("what will happen to you, yuk yuk,\" you pun menacingly, and then you "
         "notice\n");
  printf("something is very wrong.  He doesn\'t have a nose.  As a matter of "
         "fact he\'s\n");
  printf("made of one eighth inch cardboard and your laser is sticking through "
         "the other\n");
  printf(
      "side of his head.  \"Are you going to pay?\" says his mouth speaker,\n");
  printf("\"or are you going to pssfft go away stupid?\"\n");
  return choose(30, "You pay the 30 credits", 22, "You pssfft go away stupid");
}


x86 assembly (clang, -O0):
<page31>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1040 <printf@plt>
lea    0xf5e(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa2(%rip),%rdi
call   1040 <printf@plt>
lea    0xfe2(%rip),%rdi
call   1040 <printf@plt>
lea    0x1023(%rip),%rdi
call   1040 <printf@plt>
lea    0x1067(%rip),%rdi
call   1040 <printf@plt>
lea    0x109f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1e,%edi
lea    0x10bc(%rip),%rsi
mov    $0x16,%edx
lea    0x10c7(%rip),%rcx
call   1030 <choose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page31>:
push   %rax
lea    0xf09(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf90(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1012(%rip),%rdi
call   1030 <puts@plt>
lea    0x1052(%rip),%rdi
call   1030 <puts@plt>
lea    0x1095(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cc(%rip),%rdi
call   1030 <puts@plt>
lea    0xe78(%rip),%rsi
lea    0xe88(%rip),%rcx
mov    $0x1e,%edi
mov    $0x16,%edx
pop    %rax
jmp    1040 <choose@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Like any good troubleshooter you make the least expensive decision and threaten\0A\00"
@.str.1 = [80 x i8] c"him for information. With lightning like reflexes you whip out your laser and\0A\00"
@.str.2 = [80 x i8] c"stick it up his nose. \22Talk, you traitorous Christmas celebrator, or who nose\0A\00"
@.str.3 = [76 x i8] c"what will happen to you, yuk yuk,\22 you pun menacingly, and then you notice\0A\00"
@.str.4 = [77 x i8] c"something is very wrong. He doesn't have a nose. As a matter of fact he's\0A\00"
@.str.5 = [80 x i8] c"made of one eighth inch cardboard and your laser is sticking through the other\0A\00"
@.str.6 = [68 x i8] c"side of his head. \22Are you going to pay?\22 says his mouth speaker,\0A\00"
@.str.7 = [46 x i8] c"\22or are you going to pssfft go away stupid?\22\0A\00"
@.str.8 = [23 x i8] c"You pay the 30 credits\00"
@.str.9 = [26 x i8] c"You pssfft go away stupid\00"
define i32 @page31() {
%1 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 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 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @choose(i32 30, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
ret i32 %9
}

LLVM IR (-O2):
@.str.8 = [23 x i8] c"You pay the 30 credits\00"
@.str.9 = [26 x i8] c"You pssfft go away stupid\00"
@str = [80 x i8] c"Like any good troubleshooter you make the least expensive decision and threaten\00"
@str.10 = [79 x i8] c"him for information. With lightning like reflexes you whip out your laser and\00"
@str.11 = [79 x i8] c"stick it up his nose. \22Talk, you traitorous Christmas celebrator, or who nose\00"
@str.12 = [75 x i8] c"what will happen to you, yuk yuk,\22 you pun menacingly, and then you notice\00"
@str.13 = [76 x i8] c"something is very wrong. He doesn't have a nose. As a matter of fact he's\00"
@str.14 = [79 x i8] c"made of one eighth inch cardboard and your laser is sticking through the other\00"
@str.15 = [67 x i8] c"side of his head. \22Are you going to pay?\22 says his mouth speaker,\00"
@str.16 = [45 x i8] c"\22or are you going to pssfft go away stupid?\22\00"
define i32 @page31() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.10, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.11, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.12, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.14, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @choose(i32 30, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
ret i32 %9
}