#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ stderr;
int Base2int(char base) {
  if (base == 'A') {
    return 1;
  } else if (base == 'C') {
    return 2;
  } else if (base == 'G') {
    return 3;
  } else if (base == 'T' || base == 'U') {
    return 4;
  } else if (base == '+') {
    return 15;
  } else {
    fprintf(stderr, "Error in Converting base %c!\n", base);
    exit(1);
    return 100000;
  }
}


x86 assembly (clang, -O0):
<Base2int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jne    1147 <Base2int+0x27>
movl   $0x1,-0x4(%rbp)
jmp    11db <Base2int+0xbb>
movsbl -0x5(%rbp),%eax
cmp    $0x43,%eax
jne    1160 <Base2int+0x40>
movl   $0x2,-0x4(%rbp)
jmp    11db <Base2int+0xbb>
movsbl -0x5(%rbp),%eax
cmp    $0x47,%eax
jne    1179 <Base2int+0x59>
movl   $0x3,-0x4(%rbp)
jmp    11db <Base2int+0xbb>
movsbl -0x5(%rbp),%eax
cmp    $0x54,%eax
je     1193 <Base2int+0x73>
movsbl -0x5(%rbp),%eax
cmp    $0x55,%eax
jne    119f <Base2int+0x7f>
movl   $0x4,-0x4(%rbp)
jmp    11db <Base2int+0xbb>
movsbl -0x5(%rbp),%eax
cmp    $0x2b,%eax
jne    11b8 <Base2int+0x98>
movl   $0xf,-0x4(%rbp)
jmp    11db <Base2int+0xbb>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
lea    0xe38(%rip),%rsi
movsbl -0x5(%rbp),%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Base2int>:
cmp    $0x41,%dil
je     1138 <Base2int+0x18>
cmp    $0x47,%dil
je     113e <Base2int+0x1e>
cmp    $0x43,%dil
jne    1145 <Base2int+0x25>
mov    $0x2,%eax
ret
mov    $0x1,%eax
ret
mov    $0x3,%eax
jmp    115f <Base2int+0x3f>
mov    %edi,%ecx
and    $0xfe,%cl
mov    $0x4,%eax
cmp    $0x54,%cl
je     115f <Base2int+0x3f>
mov    $0xf,%eax
cmp    $0x2b,%dil
jne    1160 <Base2int+0x40>
ret
push   %rax
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
movsbl %dil,%edx
lea    0xe8b(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"Error in Converting base %c!\0A\00"
define i32 @Base2int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 65
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %37
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 67
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 2, i32* %2
br label %37
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 71
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 3, i32* %2
br label %37
18: ; preds = %13
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 84
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 85
br i1 %25, label %26, label %27
26: ; preds = %22, %18
store i32 4, i32* %2
br label %37
27: ; preds = %22
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 43
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 15, i32* %2
br label %37
32: ; preds = %27
%33 = load i32, i32* @stderr
%34 = load i8, i8* %3
%35 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 signext %34)
%36 = call i32 @exit(i32 1)
unreachable
37: ; preds = %31, %26, %17, %12, %7
%38 = load i32, i32* %2
ret i32 %38
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Error in Converting base %c!\0A\00"
define i32 @Base2int(i8 signext %0) {
switch i8 %0, label %4 [
i8 65, label %13
i8 67, label %2
i8 71, label %3
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
%5 = and i8 %0, -2
%6 = icmp eq i8 %5, 84
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = icmp eq i8 %0, 43
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %7, %4, %1, %3, %2
%14 = phi i32 [ 2, %2 ], [ 3, %3 ], [ 1, %1 ], [ 4, %4 ], [ 15, %7 ]
ret i32 %14
}