const char *fbv_get_tuner_needle(int level) {
  static const char *strings[] = {"  ))))          ", "   )))          ",
                                  "    ))          ", "       **       ",
                                  "          ((    ", "          (((   ",
                                  "          ((((  "};
  if (level < -3 || level > 3)
    return "                ";
  return strings[level + 3];
}


x86 assembly (clang, -O0):
<fbv_get_tuner_needle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0xfffffffd,-0xc(%rbp)
jl     111b <fbv_get_tuner_needle+0x1b>
cmpl   $0x3,-0xc(%rbp)
jle    112b <fbv_get_tuner_needle+0x2b>
lea    0xf55(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1143 <fbv_get_tuner_needle+0x43>
mov    -0xc(%rbp),%eax
add    $0x3,%eax
movslq %eax,%rcx
lea    0x2ef5(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbv_get_tuner_needle>:
lea    -0x4(%rdi),%eax
cmp    $0xfffffff9,%eax
jae    1110 <fbv_get_tuner_needle+0x10>
lea    0xf84(%rip),%rax
ret
add    $0x3,%edi
lea    0xee6(%rip),%rcx
movslq (%rcx,%rdi,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@fbv_get_tuner_needle.strings = internal global [7 x i8*] [i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i32 0, i32 0)]
@.str = [17 x i8] c" )))) \00"
@.str.1 = [17 x i8] c" ))) \00"
@.str.2 = [17 x i8] c" )) \00"
@.str.3 = [17 x i8] c" ** \00"
@.str.4 = [17 x i8] c" (( \00"
@.str.5 = [17 x i8] c" ((( \00"
@.str.6 = [17 x i8] c" (((( \00"
@.str.7 = [17 x i8] c" \00"
define i8* @fbv_get_tuner_needle(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, -3
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %16
10: ; preds = %6
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [7 x i8*], [7 x i8*]* @fbv_get_tuner_needle.strings, i64 0, i64 %13
%15 = load i8*, i8** %14
store i8* %15, i8** %2
br label %16
16: ; preds = %10, %9
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@reltable.fbv_get_tuner_needle = internal unnamed_addr constant [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.fbv_get_tuner_needle to i64)) to i32)]
@.str = [17 x i8] c" )))) \00"
@.str.1 = [17 x i8] c" ))) \00"
@.str.2 = [17 x i8] c" )) \00"
@.str.3 = [17 x i8] c" ** \00"
@.str.4 = [17 x i8] c" (( \00"
@.str.5 = [17 x i8] c" ((( \00"
@.str.6 = [17 x i8] c" (((( \00"
@.str.7 = [17 x i8] c" \00"
define i8* @fbv_get_tuner_needle(i32 %0) {
%2 = add i32 %0, -4
%3 = icmp ult i32 %2, -7
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = add nsw i32 %0, 3
%6 = zext i32 %5 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.fbv_get_tuner_needle to i8*), i64 %7)
br label %9
9: ; preds = %1, %4
%10 = phi i8* [ %8, %4 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), %1 ]
ret i8* %10
}