char compl(c) char c;
{
  switch (c) {
  case 'a':
    return 't';
  case 'A':
    return 'T';
  case 'c':
    return 'g';
  case 'C':
    return 'G';
  case 'g':
    return 'c';
  case 'G':
    return 'C';
  case 't':
  case 'u':
    return 'a';
  case 'T':
  case 'U':
    return 'A';
  case 'm':
    return 'k';
  case 'M':
    return 'K';
  case 'r':
    return 'y';
  case 'R':
    return 'Y';
  case 'w':
    return 'w';
  case 'W':
    return 'W';
  case 's':
    return 'S';
  case 'S':
    return 'S';
  case 'y':
    return 'r';
  case 'Y':
    return 'R';
  case 'k':
    return 'm';
  case 'K':
    return 'M';
  case 'b':
    return 'v';
  case 'B':
    return 'V';
  case 'd':
    return 'h';
  case 'D':
    return 'H';
  case 'h':
    return 'd';
  case 'H':
    return 'D';
  case 'v':
    return 'b';
  case 'V':
    return 'B';
  case 'n':
    return 'n';
  case 'N':
    return 'N';
  default:
    return c;
  }
}


x86 assembly (clang, -O0):
<compl>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x38,%eax
ja     1242 <compl+0x142>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x74,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x54,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x67,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x47,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x63,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x43,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x61,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x41,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x6b,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x4b,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x79,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x59,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x77,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x57,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x53,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x53,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x72,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x52,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x6d,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x4d,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x76,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x56,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x68,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x48,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x64,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x44,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x62,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x42,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x6e,-0x1(%rbp)
jmp    1248 <compl+0x148>
movb   $0x4e,-0x1(%rbp)
jmp    1248 <compl+0x148>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compl>:
mov    %edi,%eax
movsbl %al,%ecx
movslq %ecx,%rcx
add    $0xffffffffffffffbf,%rcx
cmp    $0x39,%ecx
jae    112b <compl+0x2b>
movabs $0x17e34cf017e34cf,%rdx
34 7e 01
bt     %rcx,%rdx
jae    112b <compl+0x2b>
lea    0xed8(%rip),%rax
mov    (%rcx,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @compl(i32 %0) {
%2 = alloca i8
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
switch i32 %6, label %37 [
i32 97, label %7
i32 65, label %8
i32 99, label %9
i32 67, label %10
i32 103, label %11
i32 71, label %12
i32 116, label %13
i32 117, label %13
i32 84, label %14
i32 85, label %14
i32 109, label %15
i32 77, label %16
i32 114, label %17
i32 82, label %18
i32 119, label %19
i32 87, label %20
i32 115, label %21
i32 83, label %22
i32 121, label %23
i32 89, label %24
i32 107, label %25
i32 75, label %26
i32 98, label %27
i32 66, label %28
i32 100, label %29
i32 68, label %30
i32 104, label %31
i32 72, label %32
i32 118, label %33
i32 86, label %34
i32 110, label %35
i32 78, label %36
]
7: ; preds = %1
store i8 116, i8* %2
br label %39
8: ; preds = %1
store i8 84, i8* %2
br label %39
9: ; preds = %1
store i8 103, i8* %2
br label %39
10: ; preds = %1
store i8 71, i8* %2
br label %39
11: ; preds = %1
store i8 99, i8* %2
br label %39
12: ; preds = %1
store i8 67, i8* %2
br label %39
13: ; preds = %1, %1
store i8 97, i8* %2
br label %39
14: ; preds = %1, %1
store i8 65, i8* %2
br label %39
15: ; preds = %1
store i8 107, i8* %2
br label %39
16: ; preds = %1
store i8 75, i8* %2
br label %39
17: ; preds = %1
store i8 121, i8* %2
br label %39
18: ; preds = %1
store i8 89, i8* %2
br label %39
19: ; preds = %1
store i8 119, i8* %2
br label %39
20: ; preds = %1
store i8 87, i8* %2
br label %39
21: ; preds = %1
store i8 83, i8* %2
br label %39
22: ; preds = %1
store i8 83, i8* %2
br label %39
23: ; preds = %1
store i8 114, i8* %2
br label %39
24: ; preds = %1
store i8 82, i8* %2
br label %39
25: ; preds = %1
store i8 109, i8* %2
br label %39
26: ; preds = %1
store i8 77, i8* %2
br label %39
27: ; preds = %1
store i8 118, i8* %2
br label %39
28: ; preds = %1
store i8 86, i8* %2
br label %39
29: ; preds = %1
store i8 104, i8* %2
br label %39
30: ; preds = %1
store i8 72, i8* %2
br label %39
31: ; preds = %1
store i8 100, i8* %2
br label %39
32: ; preds = %1
store i8 68, i8* %2
br label %39
33: ; preds = %1
store i8 98, i8* %2
br label %39
34: ; preds = %1
store i8 66, i8* %2
br label %39
35: ; preds = %1
store i8 110, i8* %2
br label %39
36: ; preds = %1
store i8 78, i8* %2
br label %39
37: ; preds = %1
%38 = load i8, i8* %3
store i8 %38, i8* %2
br label %39
39: ; preds = %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, %12, %11, %10, %9, %8, %7
%40 = load i8, i8* %2
ret i8 %40
}

LLVM IR (-O2):
@switch.table.compl = [57 x i8] c"TVGHttCDttMtKNtttYSAABWtRttttttttvghttcdttmtkntttySaabwtr"
define signext i8 @compl(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = add nsw i32 %3, -65
%5 = icmp ult i32 %4, 57
br i1 %5, label %8, label %6
6: ; preds = %8, %1
%7 = trunc i32 %0 to i8
br label %17
8: ; preds = %1
%9 = zext i32 %4 to i64
%10 = lshr i64 107581504791393487, %9
%11 = and i64 %10, 1
%12 = icmp eq i64 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %8
%14 = sext i32 %4 to i64
%15 = getelementptr inbounds [57 x i8], [57 x i8]* @switch.table.compl, i64 0, i64 %14
%16 = load i8, i8* %15
br label %17
17: ; preds = %13, %6
%18 = phi i8 [ %7, %6 ], [ %16, %13 ]
ret i8 %18
}