#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*/ strcpy(char *, char *);
int strlen(char *);
int iubdekode(char *a, char iub) {
  switch (iub) {
  case 'A':
    strcpy(a, "A");
    break;
  case 'C':
    strcpy(a, "C");
    break;
  case 'G':
    strcpy(a, "G");
    break;
  case 'T':
    strcpy(a, "T");
    break;
  case 'M':
    strcpy(a, "AC");
    break;
  case 'R':
    strcpy(a, "AG");
    break;
  case 'W':
    strcpy(a, "AT");
    break;
  case 'S':
    strcpy(a, "CG");
    break;
  case 'Y':
    strcpy(a, "CT");
    break;
  case 'K':
    strcpy(a, "GT");
    break;
  case 'V':
    strcpy(a, "ACG");
    break;
  case 'H':
    strcpy(a, "ACT");
    break;
  case 'D':
    strcpy(a, "AGT");
    break;
  case 'B':
    strcpy(a, "CGT");
    break;
  case 'X':
    strcpy(a, "ACGT");
    break;
  case 'N':
    strcpy(a, "ACGT");
    break;
  default:
    a[0] = '\0';
  }
  return strlen(a);
}


x86 assembly (clang, -O0):
<iubdekode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x18,%eax
ja     12ac <iubdekode+0x18c>
mov    -0x18(%rbp),%rax
lea    0xead(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
lea    0xefd(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xeeb(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe87(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe76(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe54(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe36(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe25(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe14(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xdee(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rdi
lea    0xdd9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12b3 <iubdekode+0x193>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iubdekode>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffbf,%esi
cmp    $0x18,%esi
ja     116c <iubdekode+0x4c>
lea    0xecd(%rip),%rax
movslq (%rax,%rsi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf38(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xf15(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xf24(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xf06(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xf0d(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
movb   $0x0,(%rbx)
jmp    11d1 <iubdekode+0xb1>
lea    0xef2(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xef2(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xeee(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xed3(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xecd(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xecb(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xebf(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xeb8(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xeac(%rip),%rsi
jmp    11c9 <iubdekode+0xa9>
lea    0xeab(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"C\00"
@.str.2 = [2 x i8] c"G\00"
@.str.3 = [2 x i8] c"T\00"
@.str.4 = [3 x i8] c"AC\00"
@.str.5 = [3 x i8] c"AG\00"
@.str.6 = [3 x i8] c"AT\00"
@.str.7 = [3 x i8] c"CG\00"
@.str.8 = [3 x i8] c"CT\00"
@.str.9 = [3 x i8] c"GT\00"
@.str.10 = [4 x i8] c"ACG\00"
@.str.11 = [4 x i8] c"ACT\00"
@.str.12 = [4 x i8] c"AGT\00"
@.str.13 = [4 x i8] c"CGT\00"
@.str.14 = [5 x i8] c"ACGT\00"
define i32 @iubdekode(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %55 [
i32 65, label %7
i32 67, label %10
i32 71, label %13
i32 84, label %16
i32 77, label %19
i32 82, label %22
i32 87, label %25
i32 83, label %28
i32 89, label %31
i32 75, label %34
i32 86, label %37
i32 72, label %40
i32 68, label %43
i32 66, label %46
i32 88, label %49
i32 78, label %52
]
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %58
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %58
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %58
16: ; preds = %2
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %58
19: ; preds = %2
%20 = load i8*, i8** %3
%21 = call i32 @strcpy(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %58
22: ; preds = %2
%23 = load i8*, i8** %3
%24 = call i32 @strcpy(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %58
25: ; preds = %2
%26 = load i8*, i8** %3
%27 = call i32 @strcpy(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %58
28: ; preds = %2
%29 = load i8*, i8** %3
%30 = call i32 @strcpy(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %58
31: ; preds = %2
%32 = load i8*, i8** %3
%33 = call i32 @strcpy(i8* %32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %58
34: ; preds = %2
%35 = load i8*, i8** %3
%36 = call i32 @strcpy(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %58
37: ; preds = %2
%38 = load i8*, i8** %3
%39 = call i32 @strcpy(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %58
40: ; preds = %2
%41 = load i8*, i8** %3
%42 = call i32 @strcpy(i8* %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %58
43: ; preds = %2
%44 = load i8*, i8** %3
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
br label %58
46: ; preds = %2
%47 = load i8*, i8** %3
%48 = call i32 @strcpy(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %58
49: ; preds = %2
%50 = load i8*, i8** %3
%51 = call i32 @strcpy(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %58
52: ; preds = %2
%53 = load i8*, i8** %3
%54 = call i32 @strcpy(i8* %53, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %58
55: ; preds = %2
%56 = load i8*, i8** %3
%57 = getelementptr inbounds i8, i8* %56, i64 0
store i8 0, i8* %57
br label %58
58: ; preds = %55, %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7
%59 = load i8*, i8** %3
%60 = call i32 @strlen(i8* %59)
ret i32 %60
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"C\00"
@.str.2 = [2 x i8] c"G\00"
@.str.3 = [2 x i8] c"T\00"
@.str.4 = [3 x i8] c"AC\00"
@.str.5 = [3 x i8] c"AG\00"
@.str.6 = [3 x i8] c"AT\00"
@.str.7 = [3 x i8] c"CG\00"
@.str.8 = [3 x i8] c"CT\00"
@.str.9 = [3 x i8] c"GT\00"
@.str.10 = [4 x i8] c"ACG\00"
@.str.11 = [4 x i8] c"ACT\00"
@.str.12 = [4 x i8] c"AGT\00"
@.str.13 = [4 x i8] c"CGT\00"
@.str.14 = [5 x i8] c"ACGT\00"
define i32 @iubdekode(i8* %0, i8 signext %1) {
%3 = sext i8 %1 to i32
switch i32 %3, label %36 [
i32 65, label %4
i32 67, label %6
i32 71, label %8
i32 84, label %10
i32 77, label %12
i32 82, label %14
i32 87, label %16
i32 83, label %18
i32 89, label %20
i32 75, label %22
i32 86, label %24
i32 72, label %26
i32 68, label %28
i32 66, label %30
i32 88, label %32
i32 78, label %34
]
4: ; preds = %2
%5 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %37
6: ; preds = %2
%7 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %37
8: ; preds = %2
%9 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %37
10: ; preds = %2
%11 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %37
12: ; preds = %2
%13 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %37
14: ; preds = %2
%15 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %37
16: ; preds = %2
%17 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %37
18: ; preds = %2
%19 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
br label %37
20: ; preds = %2
%21 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %37
22: ; preds = %2
%23 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %37
24: ; preds = %2
%25 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0))
br label %37
26: ; preds = %2
%27 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0))
br label %37
28: ; preds = %2
%29 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
br label %37
30: ; preds = %2
%31 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %37
32: ; preds = %2
%33 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %37
34: ; preds = %2
%35 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
br label %37
36: ; preds = %2
store i8 0, i8* %0
br label %37
37: ; preds = %36, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16, %14, %12, %10, %8, %6, %4
%38 = tail call i32 @strlen(i8* %0)
ret i32 %38
}