int Cyc_Atts_attribute_case_number(void *att) {
  void *_T0;
  int *_T1;
  unsigned _T2;
  _T0 = att;
  _T1 = (int *)_T0;
  _T2 = *_T1;
  switch (_T2) {
  case 0:
    return 0;
  case 1:
    return 1;
  case 2:
    return 2;
  case 3:
    return 3;
  case 4:
    return 4;
  case 5:
    return 5;
  case 6:
    return 6;
  case 7:
    return 7;
  case 8:
    return 8;
  case 9:
    return 9;
  case 10:
    return 10;
  case 11:
    return 11;
  case 12:
    return 12;
  case 13:
    return 13;
  case 14:
    return 14;
  case 15:
    return 15;
  case 16:
    return 16;
  case 17:
    return 17;
  case 18:
    return 18;
  case 19:
    return 19;
  case 20:
    return 20;
  case 21:
    return 21;
  case 22:
    return 22;
  case 23:
    return 23;
  case 24:
    return 24;
  case 25:
    return 25;
  case 26:
    return 26;
  default:
    return 27;
  };
}


x86 assembly (clang, -O0):
<Cyc_Atts_attribute_case_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %rax,-0x30(%rbp)
sub    $0x1a,%rax
ja     128a <Cyc_Atts_attribute_case_number+0x18a>
mov    -0x30(%rbp),%rax
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x1,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x2,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x3,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x4,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x5,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x6,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x7,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x8,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x9,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xa,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xb,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xc,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xd,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xe,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0xf,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x10,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x11,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x12,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x13,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x14,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x15,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x16,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x17,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x18,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x19,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x1a,-0x4(%rbp)
jmp    1291 <Cyc_Atts_attribute_case_number+0x191>
movl   $0x1b,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Atts_attribute_case_number>:
mov    (%rdi),%ecx
cmp    $0x1b,%ecx
mov    $0x1b,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Cyc_Atts_attribute_case_number(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %3
%7 = load i8*, i8** %3
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
store i32 %11, i32* %6
%12 = load i32, i32* %6
switch i32 %12, label %40 [
i32 0, label %13
i32 1, label %14
i32 2, label %15
i32 3, label %16
i32 4, label %17
i32 5, label %18
i32 6, label %19
i32 7, label %20
i32 8, label %21
i32 9, label %22
i32 10, label %23
i32 11, label %24
i32 12, label %25
i32 13, label %26
i32 14, label %27
i32 15, label %28
i32 16, label %29
i32 17, label %30
i32 18, label %31
i32 19, label %32
i32 20, label %33
i32 21, label %34
i32 22, label %35
i32 23, label %36
i32 24, label %37
i32 25, label %38
i32 26, label %39
]
13: ; preds = %1
store i32 0, i32* %2
br label %41
14: ; preds = %1
store i32 1, i32* %2
br label %41
15: ; preds = %1
store i32 2, i32* %2
br label %41
16: ; preds = %1
store i32 3, i32* %2
br label %41
17: ; preds = %1
store i32 4, i32* %2
br label %41
18: ; preds = %1
store i32 5, i32* %2
br label %41
19: ; preds = %1
store i32 6, i32* %2
br label %41
20: ; preds = %1
store i32 7, i32* %2
br label %41
21: ; preds = %1
store i32 8, i32* %2
br label %41
22: ; preds = %1
store i32 9, i32* %2
br label %41
23: ; preds = %1
store i32 10, i32* %2
br label %41
24: ; preds = %1
store i32 11, i32* %2
br label %41
25: ; preds = %1
store i32 12, i32* %2
br label %41
26: ; preds = %1
store i32 13, i32* %2
br label %41
27: ; preds = %1
store i32 14, i32* %2
br label %41
28: ; preds = %1
store i32 15, i32* %2
br label %41
29: ; preds = %1
store i32 16, i32* %2
br label %41
30: ; preds = %1
store i32 17, i32* %2
br label %41
31: ; preds = %1
store i32 18, i32* %2
br label %41
32: ; preds = %1
store i32 19, i32* %2
br label %41
33: ; preds = %1
store i32 20, i32* %2
br label %41
34: ; preds = %1
store i32 21, i32* %2
br label %41
35: ; preds = %1
store i32 22, i32* %2
br label %41
36: ; preds = %1
store i32 23, i32* %2
br label %41
37: ; preds = %1
store i32 24, i32* %2
br label %41
38: ; preds = %1
store i32 25, i32* %2
br label %41
39: ; preds = %1
store i32 26, i32* %2
br label %41
40: ; preds = %1
store i32 27, i32* %2
br label %41
41: ; preds = %40, %39, %38, %37, %36, %35, %34, %33, %32, %31, %30, %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13
%42 = load i32, i32* %2
ret i32 %42
}

LLVM IR (-O2):
define i32 @Cyc_Atts_attribute_case_number(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 27
%5 = select i1 %4, i32 %3, i32 27
ret i32 %5
}