#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(char *, int);
int Assign_State_With_Ambiguity(char *c) {
  int state[3];
  state[0] = state[1] = state[2] = -1;
  switch (c[0]) {
  case 'A': {
    state[0] = 0;
    break;
  }
  case 'R': {
    state[0] = 1;
    break;
  }
  case 'N': {
    state[0] = 2;
    break;
  }
  case 'D': {
    state[0] = 3;
    break;
  }
  case 'C': {
    state[0] = 4;
    break;
  }
  case 'Q': {
    state[0] = 5;
    break;
  }
  case 'E': {
    state[0] = 6;
    break;
  }
  case 'G': {
    state[0] = 7;
    break;
  }
  case 'H': {
    state[0] = 8;
    break;
  }
  case 'I': {
    state[0] = 9;
    break;
  }
  case 'L': {
    state[0] = 10;
    break;
  }
  case 'K': {
    state[0] = 11;
    break;
  }
  case 'M': {
    state[0] = 12;
    break;
  }
  case 'F': {
    state[0] = 13;
    break;
  }
  case 'P': {
    state[0] = 14;
    break;
  }
  case 'S': {
    state[0] = 15;
    break;
  }
  case 'T': {
    state[0] = 16;
    break;
  }
  case 'W': {
    state[0] = 17;
    break;
  }
  case 'Y': {
    state[0] = 18;
    break;
  }
  case 'V': {
    state[0] = 19;
    break;
  }
  case 'B': {
    state[0] = 2;
    break;
  }
  case 'Z': {
    state[0] = 5;
    break;
  }
  case 'X':
  case '?':
  case '-':
    state[0] = 20;
    break;
  default: {
    Exit((char *)"Unknown character state : %c. Check the data type.",
         state[0]);
  }
  }
  return state[0];
}


x86 assembly (clang, -O0):
<Assign_State_With_Ambiguity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffd3,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x2d,%eax
ja     1272 <Assign_State_With_Ambiguity+0x162>
mov    -0x20(%rbp),%rax
lea    0xeab(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x1,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x2,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x3,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x4,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x5,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x6,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x7,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x8,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x9,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xa,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xb,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xc,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xd,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xe,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0xf,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x10,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x11,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x12,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x13,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x2,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x5,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
movl   $0x14,-0x14(%rbp)
jmp    1281 <Assign_State_With_Ambiguity+0x171>
mov    -0x14(%rbp),%esi
lea    0xe3c(%rip),%rdi
call   1030 <Exit@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Assign_State_With_Ambiguity>:
push   %rbx
movsbl (%rdi),%eax
lea    -0x2d(%rax),%ecx
cmp    $0x2e,%ecx
jae    112c <Assign_State_With_Ambiguity+0x1c>
movabs $0x3efbdff40001,%rdx
bt     %rcx,%rdx
jb     1144 <Assign_State_With_Ambiguity+0x34>
lea    0xecd(%rip),%rdi
mov    $0xffffffff,%ebx
mov    $0xffffffff,%esi
call   1030 <Exit@plt>
jmp    1154 <Assign_State_With_Ambiguity+0x44>
cltq
lea    0xee7(%rip),%rcx
mov    -0xb4(%rcx,%rax,4),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"Unknown character state : %c. Check the data type.\00"
define i32 @Assign_State_With_Ambiguity(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i32]
store i8* %0, i8** %2
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 -1, i32* %4
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 -1, i32* %5
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 -1, i32* %6
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
switch i32 %10, label %57 [
i32 65, label %11
i32 82, label %13
i32 78, label %15
i32 68, label %17
i32 67, label %19
i32 81, label %21
i32 69, label %23
i32 71, label %25
i32 72, label %27
i32 73, label %29
i32 76, label %31
i32 75, label %33
i32 77, label %35
i32 70, label %37
i32 80, label %39
i32 83, label %41
i32 84, label %43
i32 87, label %45
i32 89, label %47
i32 86, label %49
i32 66, label %51
i32 90, label %53
i32 88, label %55
i32 63, label %55
i32 45, label %55
]
11: ; preds = %1
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 0, i32* %12
br label %61
13: ; preds = %1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 1, i32* %14
br label %61
15: ; preds = %1
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2, i32* %16
br label %61
17: ; preds = %1
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 3, i32* %18
br label %61
19: ; preds = %1
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 4, i32* %20
br label %61
21: ; preds = %1
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 5, i32* %22
br label %61
23: ; preds = %1
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 6, i32* %24
br label %61
25: ; preds = %1
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 7, i32* %26
br label %61
27: ; preds = %1
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 8, i32* %28
br label %61
29: ; preds = %1
%30 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 9, i32* %30
br label %61
31: ; preds = %1
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 10, i32* %32
br label %61
33: ; preds = %1
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 11, i32* %34
br label %61
35: ; preds = %1
%36 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 12, i32* %36
br label %61
37: ; preds = %1
%38 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 13, i32* %38
br label %61
39: ; preds = %1
%40 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 14, i32* %40
br label %61
41: ; preds = %1
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 15, i32* %42
br label %61
43: ; preds = %1
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 16, i32* %44
br label %61
45: ; preds = %1
%46 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 17, i32* %46
br label %61
47: ; preds = %1
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 18, i32* %48
br label %61
49: ; preds = %1
%50 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 19, i32* %50
br label %61
51: ; preds = %1
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 2, i32* %52
br label %61
53: ; preds = %1
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 5, i32* %54
br label %61
55: ; preds = %1, %1, %1
%56 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 20, i32* %56
br label %61
57: ; preds = %1
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%59 = load i32, i32* %58
%60 = call i32 @Exit(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %59)
br label %61
61: ; preds = %57, %55, %53, %51, %49, %47, %45, %43, %41, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11
%62 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%63 = load i32, i32* %62
ret i32 %63
}

LLVM IR (-O2):
@.str = [51 x i8] c"Unknown character state : %c. Check the data type.\00"
@switch.table.Assign_State_With_Ambiguity = [46 x i32] [i32 20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 20, i32 0, i32 0, i32 2, i32 4, i32 3, i32 6, i32 13, i32 7, i32 8, i32 9, i32 0, i32 11, i32 10, i32 12, i32 2, i32 0, i32 14, i32 5, i32 1, i32 15, i32 16, i32 0, i32 19, i32 17, i32 20, i32 18, i32 5]
define i32 @Assign_State_With_Ambiguity(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = add nsw i32 %3, -45
%5 = icmp ult i32 %4, 46
br i1 %5, label %8, label %6
6: ; preds = %8, %1
%7 = tail call i32 @Exit(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 -1)
br label %17
8: ; preds = %1
%9 = zext i32 %4 to i64
%10 = lshr i64 69251515023361, %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 [46 x i32], [46 x i32]* @switch.table.Assign_State_With_Ambiguity, i64 0, i64 %14
%16 = load i32, i32* %15
br label %17
17: ; preds = %13, %6
%18 = phi i32 [ -1, %6 ], [ %16, %13 ]
ret i32 %18
}