long Check_Out_Of_Area(char BNG500, char BNG100) {
  long Error_Code = 0x0000;
  switch (BNG500) {
  case 'S':
    switch (BNG100) {
    case 'A':
    case 'F':
    case 'L':
      Error_Code |= 0x0010;
      break;
    default:
      break;
    }
    break;
  case 'N':
    switch (BNG100) {
    case 'V':
      Error_Code |= 0x0010;
      break;
    default:
      break;
    }
    break;
  case 'H':
    if (BNG100 < 'L')
      Error_Code |= 0x0010;
    break;
  case 'T':
    switch (BNG100) {
    case 'D':
    case 'E':
    case 'J':
    case 'K':
    case 'O':
    case 'P':
    case 'T':
    case 'U':
    case 'X':
    case 'Y':
    case 'Z':
      Error_Code |= 0x0010;
      break;
    default:
      break;
    }
    break;
  case 'O':
    switch (BNG100) {
    case 'C':
    case 'D':
    case 'E':
    case 'J':
    case 'K':
    case 'O':
    case 'P':
    case 'T':
    case 'U':
    case 'Y':
    case 'Z':
      Error_Code |= 0x0010;
      break;
    default:
      break;
    }
    break;
  case 'J':
    switch (BNG100) {
    case 'L':
    case 'M':
    case 'Q':
    case 'R':
    case 'V':
    case 'W':
      Error_Code = 0x0000;
      break;
    default:
      Error_Code |= 0x0010;
      break;
    }
    break;
  default:
    Error_Code |= 0x0010;
    break;
  }
  return Error_Code;
}


x86 assembly (clang, -O0):
<Check_Out_Of_Area>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movq   $0x0,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffb8,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0xc,%eax
ja     1341 <Check_Out_Of_Area+0x241>
mov    -0x18(%rbp),%rax
lea    0xec7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsbl -0x2(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x41,%eax
je     1179 <Check_Out_Of_Area+0x79>
jmp    1157 <Check_Out_Of_Area+0x57>
mov    -0x1c(%rbp),%eax
sub    $0x46,%eax
je     1179 <Check_Out_Of_Area+0x79>
jmp    1168 <Check_Out_Of_Area+0x68>
mov    -0x1c(%rbp),%eax
sub    $0x4c,%eax
jne    118a <Check_Out_Of_Area+0x8a>
jmp    1179 <Check_Out_Of_Area+0x79>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    118f <Check_Out_Of_Area+0x8f>
jmp    118f <Check_Out_Of_Area+0x8f>
jmp    134d <Check_Out_Of_Area+0x24d>
mov    -0x2(%rbp),%al
sub    $0x56,%al
jne    11b5 <Check_Out_Of_Area+0xb5>
jmp    11a4 <Check_Out_Of_Area+0xa4>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    11ba <Check_Out_Of_Area+0xba>
jmp    11ba <Check_Out_Of_Area+0xba>
jmp    134d <Check_Out_Of_Area+0x24d>
movsbl -0x2(%rbp),%eax
cmp    $0x4c,%eax
jge    11d8 <Check_Out_Of_Area+0xd8>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    134d <Check_Out_Of_Area+0x24d>
movsbl -0x2(%rbp),%eax
mov    %eax,-0x20(%rbp)
add    $0xffffffbc,%eax
sub    $0x2,%eax
jb     1245 <Check_Out_Of_Area+0x145>
jmp    11f5 <Check_Out_Of_Area+0xf5>
mov    -0x20(%rbp),%eax
add    $0xffffffb6,%eax
sub    $0x2,%eax
jb     1245 <Check_Out_Of_Area+0x145>
jmp    1209 <Check_Out_Of_Area+0x109>
mov    -0x20(%rbp),%eax
add    $0xffffffb1,%eax
sub    $0x2,%eax
jb     1245 <Check_Out_Of_Area+0x145>
jmp    121d <Check_Out_Of_Area+0x11d>
mov    -0x20(%rbp),%eax
add    $0xffffffac,%eax
sub    $0x2,%eax
jb     1245 <Check_Out_Of_Area+0x145>
jmp    1231 <Check_Out_Of_Area+0x131>
mov    -0x20(%rbp),%eax
add    $0xffffffa8,%eax
sub    $0x2,%eax
ja     1256 <Check_Out_Of_Area+0x156>
jmp    1245 <Check_Out_Of_Area+0x145>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    125b <Check_Out_Of_Area+0x15b>
jmp    125b <Check_Out_Of_Area+0x15b>
jmp    134d <Check_Out_Of_Area+0x24d>
movsbl -0x2(%rbp),%eax
mov    %eax,-0x24(%rbp)
add    $0xffffffbd,%eax
sub    $0x3,%eax
jb     12c8 <Check_Out_Of_Area+0x1c8>
jmp    1278 <Check_Out_Of_Area+0x178>
mov    -0x24(%rbp),%eax
add    $0xffffffb6,%eax
sub    $0x2,%eax
jb     12c8 <Check_Out_Of_Area+0x1c8>
jmp    128c <Check_Out_Of_Area+0x18c>
mov    -0x24(%rbp),%eax
add    $0xffffffb1,%eax
sub    $0x2,%eax
jb     12c8 <Check_Out_Of_Area+0x1c8>
jmp    12a0 <Check_Out_Of_Area+0x1a0>
mov    -0x24(%rbp),%eax
add    $0xffffffac,%eax
sub    $0x2,%eax
jb     12c8 <Check_Out_Of_Area+0x1c8>
jmp    12b4 <Check_Out_Of_Area+0x1b4>
mov    -0x24(%rbp),%eax
add    $0xffffffa7,%eax
sub    $0x1,%eax
ja     12d9 <Check_Out_Of_Area+0x1d9>
jmp    12c8 <Check_Out_Of_Area+0x1c8>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    12de <Check_Out_Of_Area+0x1de>
jmp    12de <Check_Out_Of_Area+0x1de>
jmp    134d <Check_Out_Of_Area+0x24d>
movsbl -0x2(%rbp),%eax
mov    %eax,-0x28(%rbp)
add    $0xffffffb4,%eax
sub    $0x2,%eax
jb     1323 <Check_Out_Of_Area+0x223>
jmp    12fb <Check_Out_Of_Area+0x1fb>
mov    -0x28(%rbp),%eax
add    $0xffffffaf,%eax
sub    $0x2,%eax
jb     1323 <Check_Out_Of_Area+0x223>
jmp    130f <Check_Out_Of_Area+0x20f>
mov    -0x28(%rbp),%eax
add    $0xffffffaa,%eax
sub    $0x1,%eax
ja     1330 <Check_Out_Of_Area+0x230>
jmp    1323 <Check_Out_Of_Area+0x223>
movq   $0x0,-0x10(%rbp)
jmp    133c <Check_Out_Of_Area+0x23c>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
jmp    134d <Check_Out_Of_Area+0x24d>
mov    -0x10(%rbp),%rax
or     $0x10,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_Out_Of_Area>:
mov    $0x10,%eax
add    $0xffffffb8,%edi
cmp    $0xc,%edi
ja     118b <Check_Out_Of_Area+0x8b>
lea    0xeec(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
mov    $0x10,%eax
jmp    *%rcx
xor    %eax,%eax
cmp    $0x4c,%sil
setl   %al
shl    $0x4,%rax
ret
movsbl %sil,%ecx
add    $0xffffffb4,%ecx
mov    $0x10,%eax
cmp    $0xc,%ecx
jae    118b <Check_Out_Of_Area+0x8b>
movslq %ecx,%rax
lea    0x1065(%rip),%rcx
jmp    1187 <Check_Out_Of_Area+0x87>
xor    %eax,%eax
cmp    $0x56,%sil
sete   %al
shl    $0x4,%rax
ret
movsbl %sil,%eax
add    $0xffffffbd,%eax
cmp    $0x18,%eax
jae    118c <Check_Out_Of_Area+0x8c>
cltq
lea    0xf80(%rip),%rcx
jmp    1187 <Check_Out_Of_Area+0x87>
movsbl %sil,%eax
add    $0xffffffbc,%eax
cmp    $0x17,%eax
jae    118c <Check_Out_Of_Area+0x8c>
cltq
lea    0xeb1(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret
xor    %eax,%eax
ret
movsbl %sil,%ecx
xor    %eax,%eax
add    $0xffffffbf,%ecx
cmp    $0xb,%ecx
ja     118b <Check_Out_Of_Area+0x8b>
mov    $0x821,%edx
bt     %ecx,%edx
jae    118b <Check_Out_Of_Area+0x8b>
mov    $0x10,%eax
ret

LLVM IR (-O0):
define i64 @Check_Out_Of_Area(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i64
store i8 %0, i8* %3
store i8 %1, i8* %4
store i64 0, i64* %5
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
switch i32 %7, label %56 [
i32 83, label %8
i32 78, label %16
i32 72, label %24
i32 84, label %32
i32 79, label %40
i32 74, label %48
]
8: ; preds = %2
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
switch i32 %10, label %14 [
i32 65, label %11
i32 70, label %11
i32 76, label %11
]
11: ; preds = %8, %8, %8
%12 = load i64, i64* %5
%13 = or i64 %12, 16
store i64 %13, i64* %5
br label %15
14: ; preds = %8
br label %15
15: ; preds = %14, %11
br label %59
16: ; preds = %2
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
switch i32 %18, label %22 [
i32 86, label %19
]
19: ; preds = %16
%20 = load i64, i64* %5
%21 = or i64 %20, 16
store i64 %21, i64* %5
br label %23
22: ; preds = %16
br label %23
23: ; preds = %22, %19
br label %59
24: ; preds = %2
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp slt i32 %26, 76
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = load i64, i64* %5
%30 = or i64 %29, 16
store i64 %30, i64* %5
br label %31
31: ; preds = %28, %24
br label %59
32: ; preds = %2
%33 = load i8, i8* %4
%34 = sext i8 %33 to i32
switch i32 %34, label %38 [
i32 68, label %35
i32 69, label %35
i32 74, label %35
i32 75, label %35
i32 79, label %35
i32 80, label %35
i32 84, label %35
i32 85, label %35
i32 88, label %35
i32 89, label %35
i32 90, label %35
]
35: ; preds = %32, %32, %32, %32, %32, %32, %32, %32, %32, %32, %32
%36 = load i64, i64* %5
%37 = or i64 %36, 16
store i64 %37, i64* %5
br label %39
38: ; preds = %32
br label %39
39: ; preds = %38, %35
br label %59
40: ; preds = %2
%41 = load i8, i8* %4
%42 = sext i8 %41 to i32
switch i32 %42, label %46 [
i32 67, label %43
i32 68, label %43
i32 69, label %43
i32 74, label %43
i32 75, label %43
i32 79, label %43
i32 80, label %43
i32 84, label %43
i32 85, label %43
i32 89, label %43
i32 90, label %43
]
43: ; preds = %40, %40, %40, %40, %40, %40, %40, %40, %40, %40, %40
%44 = load i64, i64* %5
%45 = or i64 %44, 16
store i64 %45, i64* %5
br label %47
46: ; preds = %40
br label %47
47: ; preds = %46, %43
br label %59
48: ; preds = %2
%49 = load i8, i8* %4
%50 = sext i8 %49 to i32
switch i32 %50, label %52 [
i32 76, label %51
i32 77, label %51
i32 81, label %51
i32 82, label %51
i32 86, label %51
i32 87, label %51
]
51: ; preds = %48, %48, %48, %48, %48, %48
store i64 0, i64* %5
br label %55
52: ; preds = %48
%53 = load i64, i64* %5
%54 = or i64 %53, 16
store i64 %54, i64* %5
br label %55
55: ; preds = %52, %51
br label %59
56: ; preds = %2
%57 = load i64, i64* %5
%58 = or i64 %57, 16
store i64 %58, i64* %5
br label %59
59: ; preds = %56, %55, %47, %39, %31, %23, %15
%60 = load i64, i64* %5
ret i64 %60
}

LLVM IR (-O2):
@switch.table.Check_Out_Of_Area = [23 x i64] [i64 16, i64 16, i64 0, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 16, i64 16, i64 16]
@switch.table.Check_Out_Of_Area.1 = [24 x i64] [i64 16, i64 16, i64 16, i64 0, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 0, i64 16, i64 16, i64 0, i64 0, i64 0, i64 16, i64 16]
@switch.table.Check_Out_Of_Area.2 = [12 x i64] [i64 0, i64 0, i64 16, i64 16, i64 16, i64 0, i64 0, i64 16, i64 16, i64 16, i64 0, i64 0]
define i64 @Check_Out_Of_Area(i8 signext %0, i8 signext %1) {
%3 = sext i8 %0 to i32
switch i32 %3, label %37 [
i32 83, label %4
i32 78, label %7
i32 72, label %10
i32 84, label %13
i32 79, label %17
i32 74, label %21
]
4: ; preds = %2
%5 = sext i8 %1 to i32
switch i32 %5, label %37 [
i32 65, label %6
i32 70, label %6
i32 76, label %6
]
6: ; preds = %4, %4, %4
br label %37
7: ; preds = %2
%8 = icmp eq i8 %1, 86
%9 = select i1 %8, i64 16, i64 0
br label %37
10: ; preds = %2
%11 = icmp slt i8 %1, 76
%12 = select i1 %11, i64 16, i64 0
br label %37
13: ; preds = %2
%14 = sext i8 %1 to i32
%15 = add nsw i32 %14, -68
%16 = icmp ult i32 %15, 23
br i1 %16, label %25, label %37
17: ; preds = %2
%18 = sext i8 %1 to i32
%19 = add nsw i32 %18, -67
%20 = icmp ult i32 %19, 24
br i1 %20, label %29, label %37
21: ; preds = %2
%22 = sext i8 %1 to i32
%23 = add nsw i32 %22, -76
%24 = icmp ult i32 %23, 12
br i1 %24, label %33, label %37
25: ; preds = %13
%26 = sext i32 %15 to i64
%27 = getelementptr inbounds [23 x i64], [23 x i64]* @switch.table.Check_Out_Of_Area, i64 0, i64 %26
%28 = load i64, i64* %27
br label %37
29: ; preds = %17
%30 = sext i32 %19 to i64
%31 = getelementptr inbounds [24 x i64], [24 x i64]* @switch.table.Check_Out_Of_Area.1, i64 0, i64 %30
%32 = load i64, i64* %31
br label %37
33: ; preds = %21
%34 = sext i32 %23 to i64
%35 = getelementptr inbounds [12 x i64], [12 x i64]* @switch.table.Check_Out_Of_Area.2, i64 0, i64 %34
%36 = load i64, i64* %35
br label %37
37: ; preds = %21, %33, %29, %17, %25, %13, %10, %7, %2, %6, %4
%38 = phi i64 [ 0, %17 ], [ 0, %13 ], [ 0, %4 ], [ 16, %6 ], [ %9, %7 ], [ %12, %10 ], [ 16, %2 ], [ %28, %25 ], [ %32, %29 ], [ %36, %33 ], [ 16, %21 ]
ret i64 %38
}