const char *seqidx2difficultystr(const unsigned long long idx) {
  return (idx < 100ULL)     ? "Trivial joke"
         : (idx < 1000ULL)  ? "Easy"
         : (idx < 4000ULL)  ? "Medium"
         : (idx < 8000ULL)  ? "Formidable"
         : (idx < 16000ULL) ? "Worthy challenge"
                            : "Good luck!";
}


x86 assembly (clang, -O0):
<seqidx2difficultystr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x64,-0x8(%rbp)
jae    1123 <seqidx2difficultystr+0x23>
lea    0xee6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    11b6 <seqidx2difficultystr+0xb6>
cmpq   $0x3e8,-0x8(%rbp)
jae    1141 <seqidx2difficultystr+0x41>
lea    0xed5(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    11ae <seqidx2difficultystr+0xae>
cmpq   $0xfa0,-0x8(%rbp)
jae    115f <seqidx2difficultystr+0x5f>
lea    0xebc(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    11a6 <seqidx2difficultystr+0xa6>
cmpq   $0x1f40,-0x8(%rbp)
jae    117d <seqidx2difficultystr+0x7d>
lea    0xea5(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    119e <seqidx2difficultystr+0x9e>
mov    -0x8(%rbp),%rdx
lea    0xead(%rip),%rax
lea    0xe95(%rip),%rcx
cmp    $0x3e80,%rdx
cmovb  %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<seqidx2difficultystr>:
cmp    $0x64,%rdi
jae    110e <seqidx2difficultystr+0xe>
lea    0xef3(%rip),%rax
ret
cmp    $0x3e8,%rdi
jae    111f <seqidx2difficultystr+0x1f>
lea    0xeef(%rip),%rax
ret
cmp    $0xfa0,%rdi
jae    1130 <seqidx2difficultystr+0x30>
lea    0xee3(%rip),%rax
ret
cmp    $0x1f40,%rdi
jae    1141 <seqidx2difficultystr+0x41>
lea    0xed9(%rip),%rax
ret
cmp    $0x3e80,%rdi
lea    0xed5(%rip),%rcx
lea    0xedf(%rip),%rax
cmovb  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Trivial joke\00"
@.str.1 = [5 x i8] c"Easy\00"
@.str.2 = [7 x i8] c"Medium\00"
@.str.3 = [11 x i8] c"Formidable\00"
@.str.4 = [17 x i8] c"Worthy challenge\00"
@.str.5 = [11 x i8] c"Good luck!\00"
define i8* @seqidx2difficultystr(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ult i64 %3, 100
br i1 %4, label %5, label %6
5: ; preds = %1
br label %29
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp ult i64 %7, 1000
br i1 %8, label %9, label %10
9: ; preds = %6
br label %27
10: ; preds = %6
%11 = load i64, i64* %2
%12 = icmp ult i64 %11, 4000
br i1 %12, label %13, label %14
13: ; preds = %10
br label %25
14: ; preds = %10
%15 = load i64, i64* %2
%16 = icmp ult i64 %15, 8000
br i1 %16, label %17, label %18
17: ; preds = %14
br label %23
18: ; preds = %14
%19 = load i64, i64* %2
%20 = icmp ult i64 %19, 16000
%21 = zext i1 %20 to i64
%22 = select i1 %20, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0)
br label %23
23: ; preds = %18, %17
%24 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %17 ], [ %22, %18 ]
br label %25
25: ; preds = %23, %13
%26 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %13 ], [ %24, %23 ]
br label %27
27: ; preds = %25, %9
%28 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %9 ], [ %26, %25 ]
br label %29
29: ; preds = %27, %5
%30 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %5 ], [ %28, %27 ]
ret i8* %30
}

LLVM IR (-O2):
@.str = [13 x i8] c"Trivial joke\00"
@.str.1 = [5 x i8] c"Easy\00"
@.str.2 = [7 x i8] c"Medium\00"
@.str.3 = [11 x i8] c"Formidable\00"
@.str.4 = [17 x i8] c"Worthy challenge\00"
@.str.5 = [11 x i8] c"Good luck!\00"
define i8* @seqidx2difficultystr(i64 %0) {
%2 = icmp ult i64 %0, 100
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = icmp ult i64 %0, 1000
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = icmp ult i64 %0, 4000
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = icmp ult i64 %0, 8000
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp ult i64 %0, 16000
%11 = select i1 %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0)
br label %12
12: ; preds = %3, %9, %7, %5, %1
%13 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), %1 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %5 ], [ %11, %9 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %7 ]
ret i8* %13
}