#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ errAbort(char *, char);
char iupacComplementBaseLower(char iupac) {
  switch (iupac) {
  case 'a':
    return 't';
  case 'c':
    return 'g';
  case 'g':
    return 'c';
  case 't':
  case 'u':
    return 'a';
  case 'r':
    return 'y';
  case 'y':
    return 'r';
  case 's':
    return 's';
  case 'w':
    return 'w';
  case 'k':
    return 'm';
  case 'm':
    return 'k';
  case 'b':
    return 'v';
  case 'd':
    return 'h';
  case 'h':
    return 'd';
  case 'v':
    return 'b';
  case 'n':
    return 'n';
  default:
    errAbort("Unrecognized IUPAC code '%c'", iupac);
    return 0;
  }
}


x86 assembly (clang, -O0):
<iupacComplementBaseLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x18,%eax
ja     11cf <iupacComplementBaseLower+0xbf>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x74,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x67,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x63,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x61,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x79,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x72,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x73,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x77,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x6d,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x6b,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x76,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x68,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x64,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x62,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
movb   $0x6e,-0x1(%rbp)
jmp    11e3 <iupacComplementBaseLower+0xd3>
lea    0xe8e(%rip),%rdi
movsbl -0x2(%rbp),%esi
call   1030 <errAbort@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupacComplementBaseLower>:
push   %rax
movslq %edi,%rax
add    $0xffffffffffffff9f,%rax
cmp    $0x19,%eax
jae    1127 <iupacComplementBaseLower+0x17>
mov    $0x17e34cf,%ecx
bt     %eax,%ecx
jb     113b <iupacComplementBaseLower+0x2b>
movsbl %dil,%esi
lea    0xece(%rip),%rdi
call   1030 <errAbort@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xedb(%rip),%rcx
mov    (%rax,%rcx,1),%al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Unrecognized IUPAC code '%c'\00"
define signext i8 @iupacComplementBaseLower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %21 [
i32 97, label %6
i32 99, label %7
i32 103, label %8
i32 116, label %9
i32 117, label %9
i32 114, label %10
i32 121, label %11
i32 115, label %12
i32 119, label %13
i32 107, label %14
i32 109, label %15
i32 98, label %16
i32 100, label %17
i32 104, label %18
i32 118, label %19
i32 110, label %20
]
6: ; preds = %1
store i8 116, i8* %2
br label %24
7: ; preds = %1
store i8 103, i8* %2
br label %24
8: ; preds = %1
store i8 99, i8* %2
br label %24
9: ; preds = %1, %1
store i8 97, i8* %2
br label %24
10: ; preds = %1
store i8 121, i8* %2
br label %24
11: ; preds = %1
store i8 114, i8* %2
br label %24
12: ; preds = %1
store i8 115, i8* %2
br label %24
13: ; preds = %1
store i8 119, i8* %2
br label %24
14: ; preds = %1
store i8 109, i8* %2
br label %24
15: ; preds = %1
store i8 107, i8* %2
br label %24
16: ; preds = %1
store i8 118, i8* %2
br label %24
17: ; preds = %1
store i8 104, i8* %2
br label %24
18: ; preds = %1
store i8 100, i8* %2
br label %24
19: ; preds = %1
store i8 98, i8* %2
br label %24
20: ; preds = %1
store i8 110, i8* %2
br label %24
21: ; preds = %1
%22 = load i8, i8* %3
%23 = call i32 @errAbort(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext %22)
store i8 0, i8* %2
br label %24
24: ; preds = %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%25 = load i8, i8* %2
ret i8 %25
}

LLVM IR (-O2):
@.str = [29 x i8] c"Unrecognized IUPAC code '%c'\00"
@switch.table.iupacComplementBaseLower = [25 x i8] c"tvghttcdttmtkntttysaabwtr"
define signext i8 @iupacComplementBaseLower(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
%4 = icmp ult i32 %3, 25
br i1 %4, label %7, label %5
5: ; preds = %7, %1
%6 = tail call i32 @errAbort(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8 signext %0)
br label %15
7: ; preds = %1
%8 = lshr i32 25048271, %3
%9 = and i32 %8, 1
%10 = icmp eq i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %7
%12 = sext i32 %3 to i64
%13 = getelementptr inbounds [25 x i8], [25 x i8]* @switch.table.iupacComplementBaseLower, i64 0, i64 %12
%14 = load i8, i8* %13
br label %15
15: ; preds = %11, %5
%16 = phi i8 [ 0, %5 ], [ %14, %11 ]
ret i8 %16
}