#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 /*<<< orphan*/ printf(char *);
void print_instructions(int choice) {
  if (choice == 1 || choice == 2 || choice == 4 || choice == 6 || choice == 9)
    printf("Do not give a dollar sign.\n");
  else if (choice == 3)
    printf("Give a bwt string.\n");
  else if (choice == 5)
    printf("Give a dollar sign ($) to the end of the string.\n");
}


x86 assembly (clang, -O0):
<print_instructions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     114d <print_instructions+0x3d>
cmpl   $0x2,-0x4(%rbp)
je     114d <print_instructions+0x3d>
cmpl   $0x4,-0x4(%rbp)
je     114d <print_instructions+0x3d>
cmpl   $0x6,-0x4(%rbp)
je     114d <print_instructions+0x3d>
cmpl   $0x9,-0x4(%rbp)
jne    115e <print_instructions+0x4e>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <print_instructions+0x89>
cmpl   $0x3,-0x4(%rbp)
jne    1179 <print_instructions+0x69>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <print_instructions+0x84>
cmpl   $0x5,-0x4(%rbp)
jne    118f <print_instructions+0x7f>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1194 <print_instructions+0x84>
jmp    1199 <print_instructions+0x89>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_instructions>:
add    $0xffffffff,%edi
cmp    $0x8,%edi
ja     1122 <print_instructions+0x12>
mov    $0x13f,%eax
bt     %edi,%eax
jb     1123 <print_instructions+0x13>
ret
movslq %edi,%rax
lea    0xf33(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Do not give a dollar sign.\0A\00"
@.str.1 = [20 x i8] c"Give a bwt string.\0A\00"
@.str.2 = [50 x i8] c"Give a dollar sign ($) to the end of the string.\0A\00"
define void @print_instructions(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 %17, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 2
br i1 %7, label %17, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 4
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 6
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %17, label %19
17: ; preds = %14, %11, %8, %5, %1
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %31
19: ; preds = %14
%20 = load i32, i32* %2
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %30
24: ; preds = %19
%25 = load i32, i32* %2
%26 = icmp eq i32 %25, 5
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
br label %30
30: ; preds = %29, %22
br label %31
31: ; preds = %30, %17
ret void
}

LLVM IR (-O2):
@str = [49 x i8] c"Give a dollar sign ($) to the end of the string.\00"
@str.3 = [19 x i8] c"Give a bwt string.\00"
@str.4 = [27 x i8] c"Do not give a dollar sign.\00"
@reltable.print_instructions = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([49 x i8]* @str to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.print_instructions to i64)) to i32)]
define void @print_instructions(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 9
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = trunc i32 %2 to i16
%6 = lshr i16 319, %5
%7 = and i16 %6, 1
%8 = icmp eq i16 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %4
%10 = sext i32 %2 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.print_instructions to i8*), i64 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %4, %1, %9
ret void
}