void printInstructions(version) {
  if (version == 1) {
    printf("\n\n");
    printf("***  Welcome to the Simpletron!  ***\n");
    printf("***  Please enter your program one instruction  ***\n");
    printf("***  (or data word) at a time. The location  ***\n");
    printf("***  in memory one along with a question mark  ***\n");
    printf("***  You then type the word for that location.  ***\n");
    printf(
        "***  Type the sentinel -99999 to stop entering your program  ***\n\n");
  } else {
  }
}


x86 assembly (clang, -O0):
<printInstructions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    118c <printInstructions+0x7c>
lea    0x100a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1191 <printInstructions+0x81>
jmp    1191 <printInstructions+0x81>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInstructions>:
cmp    $0x1,%edi
jne    116b <printInstructions+0x5b>
push   %rax
lea    0x1014(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf64(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [38 x i8] c"*** Welcome to the Simpletron! ***\0A\00"
@.str.2 = [53 x i8] c"*** Please enter your program one instruction ***\0A\00"
@.str.3 = [50 x i8] c"*** (or data word) at a time. The location ***\0A\00"
@.str.4 = [52 x i8] c"*** in memory one along with a question mark ***\0A\00"
@.str.5 = [53 x i8] c"*** You then type the word for that location. ***\0A\00"
@.str.6 = [67 x i8] c"*** Type the sentinel -99999 to stop entering your program ***\0A\0A\00"
define void @printInstructions(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %13
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.6, i64 0, i64 0))
br label %14
13: ; preds = %1
br label %14
14: ; preds = %13, %5
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
@str.7 = [37 x i8] c"*** Welcome to the Simpletron! ***\00"
@str.8 = [52 x i8] c"*** Please enter your program one instruction ***\00"
@str.9 = [49 x i8] c"*** (or data word) at a time. The location ***\00"
@str.10 = [51 x i8] c"*** in memory one along with a question mark ***\00"
@str.11 = [52 x i8] c"*** You then type the word for that location. ***\00"
@str.12 = [66 x i8] c"*** Type the sentinel -99999 to stop entering your program ***\0A\00"
define void @printInstructions(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.8, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.9, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.10, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.11, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.12, i64 0, i64 0))
br label %11
11: ; preds = %1, %3
ret void
}