void print(int arg) {
  switch (arg) {
  case 0:
    printf("n is too low");
  case 1:
    printf("n is too high");
  case 2:
    printf("Fibonaccis are:");
  case 3:
    printf(" ");
  default:
    printf("wrong arg");
  }
  printf(arg);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x3,%rax
ja     1178 <print+0x68>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x4(%rbp),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    %edi,%ebx
cmp    $0x3,%edi
ja     116e <print+0x4e>
mov    %ebx,%eax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xecf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movslq %ebx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"n is too low\00"
@.str.1 = [14 x i8] c"n is too high\00"
@.str.2 = [16 x i8] c"Fibonaccis are:\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [10 x i8] c"wrong arg\00"
define void @print(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %12 [
i32 0, label %4
i32 1, label %6
i32 2, label %8
i32 3, label %10
]
4: ; preds = %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %1, %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %1, %8
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %12
12: ; preds = %1, %10
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %14
14: ; preds = %12
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
%18 = call i32 (i8*, ...) @printf(i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"n is too low\00"
@.str.1 = [14 x i8] c"n is too high\00"
@.str.2 = [16 x i8] c"Fibonaccis are:\00"
@.str.4 = [10 x i8] c"wrong arg\00"
define void @print(i32 %0) {
switch i32 %0, label %10 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
i32 3, label %8
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %1, %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %1, %6
%9 = tail call i32 @putchar(i32 32)
br label %10
10: ; preds = %1, %8
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%12 = sext i32 %0 to i64
%13 = inttoptr i64 %12 to i8*
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %13)
ret void
}