#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 */
const char *get_region_name_CA(int region_code) {
  switch (region_code) {
  case 849:
    return "Alberta";
  case 893:
    return "British Columbia";
  case 1365:
    return "Manitoba";
  case 1408:
    return "New Brunswick";
  case 1418:
    return "Newfoundland";
  case 1425:
    return "Nova Scotia";
  case 1426:
    return "Northwest Territories";
  case 1427:
    return "Nunavut";
  case 1463:
    return "Ontario";
  case 1497:
    return "Prince Edward Island";
  case 1538:
    return "Quebec";
  case 1632:
    return "Saskatchewan";
  case 1899:
    return "Yukon Territory";
  default:
    return NULL;
  }
}


x86 assembly (clang, -O0):
<get_region_name_CA>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x351,%eax
je     1201 <get_region_name_CA+0x101>
jmp    111d <get_region_name_CA+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x37d,%eax
je     1211 <get_region_name_CA+0x111>
jmp    1130 <get_region_name_CA+0x30>
mov    -0x10(%rbp),%eax
sub    $0x555,%eax
je     1221 <get_region_name_CA+0x121>
jmp    1143 <get_region_name_CA+0x43>
mov    -0x10(%rbp),%eax
sub    $0x580,%eax
je     1231 <get_region_name_CA+0x131>
jmp    1156 <get_region_name_CA+0x56>
mov    -0x10(%rbp),%eax
sub    $0x58a,%eax
je     1241 <get_region_name_CA+0x141>
jmp    1169 <get_region_name_CA+0x69>
mov    -0x10(%rbp),%eax
sub    $0x591,%eax
je     1251 <get_region_name_CA+0x151>
jmp    117c <get_region_name_CA+0x7c>
mov    -0x10(%rbp),%eax
sub    $0x592,%eax
je     1261 <get_region_name_CA+0x161>
jmp    118f <get_region_name_CA+0x8f>
mov    -0x10(%rbp),%eax
sub    $0x593,%eax
je     1271 <get_region_name_CA+0x171>
jmp    11a2 <get_region_name_CA+0xa2>
mov    -0x10(%rbp),%eax
sub    $0x5b7,%eax
je     1281 <get_region_name_CA+0x181>
jmp    11b5 <get_region_name_CA+0xb5>
mov    -0x10(%rbp),%eax
sub    $0x5d9,%eax
je     1291 <get_region_name_CA+0x191>
jmp    11c8 <get_region_name_CA+0xc8>
mov    -0x10(%rbp),%eax
sub    $0x602,%eax
je     12a1 <get_region_name_CA+0x1a1>
jmp    11db <get_region_name_CA+0xdb>
mov    -0x10(%rbp),%eax
sub    $0x660,%eax
je     12b1 <get_region_name_CA+0x1b1>
jmp    11ee <get_region_name_CA+0xee>
mov    -0x10(%rbp),%eax
sub    $0x76b,%eax
je     12c1 <get_region_name_CA+0x1c1>
jmp    12d1 <get_region_name_CA+0x1d1>
lea    0xdf8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdf0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdf1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdea(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xde8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xde5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xde1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xde7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xddf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdd7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xddc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdd3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
lea    0xdd0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12d9 <get_region_name_CA+0x1d9>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_region_name_CA>:
cmp    $0x5d8,%edi
jg     1137 <get_region_name_CA+0x37>
cmp    $0x57f,%edi
jle    115b <get_region_name_CA+0x5b>
add    $0xfffffa80,%edi
cmp    $0x37,%edi
ja     11db <get_region_name_CA+0xdb>
lea    0xeda(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xfcc(%rip),%rax
ret
cmp    $0x65f,%edi
jg     117b <get_region_name_CA+0x7b>
cmp    $0x5d9,%edi
je     11bb <get_region_name_CA+0xbb>
cmp    $0x602,%edi
jne    11db <get_region_name_CA+0xdb>
lea    0x100a(%rip),%rax
ret
cmp    $0x351,%edi
je     11c3 <get_region_name_CA+0xc3>
cmp    $0x37d,%edi
je     11cb <get_region_name_CA+0xcb>
cmp    $0x555,%edi
jne    11db <get_region_name_CA+0xdb>
lea    0xf7f(%rip),%rax
ret
cmp    $0x660,%edi
je     11d3 <get_region_name_CA+0xd3>
cmp    $0x76b,%edi
jne    11db <get_region_name_CA+0xdb>
lea    0xfe6(%rip),%rax
ret
lea    0xf76(%rip),%rax
ret
lea    0xf7b(%rip),%rax
ret
lea    0xf7f(%rip),%rax
ret
lea    0xf8d(%rip),%rax
ret
lea    0xf8d(%rip),%rax
ret
lea    0xf8d(%rip),%rax
ret
lea    0xf16(%rip),%rax
ret
lea    0xf16(%rip),%rax
ret
lea    0xf91(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Alberta\00"
@.str.1 = [17 x i8] c"British Columbia\00"
@.str.2 = [9 x i8] c"Manitoba\00"
@.str.3 = [14 x i8] c"New Brunswick\00"
@.str.4 = [13 x i8] c"Newfoundland\00"
@.str.5 = [12 x i8] c"Nova Scotia\00"
@.str.6 = [22 x i8] c"Northwest Territories\00"
@.str.7 = [8 x i8] c"Nunavut\00"
@.str.8 = [8 x i8] c"Ontario\00"
@.str.9 = [21 x i8] c"Prince Edward Island\00"
@.str.10 = [7 x i8] c"Quebec\00"
@.str.11 = [13 x i8] c"Saskatchewan\00"
@.str.12 = [16 x i8] c"Yukon Territory\00"
define i8* @get_region_name_CA(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %18 [
i32 849, label %5
i32 893, label %6
i32 1365, label %7
i32 1408, label %8
i32 1418, label %9
i32 1425, label %10
i32 1426, label %11
i32 1427, label %12
i32 1463, label %13
i32 1497, label %14
i32 1538, label %15
i32 1632, label %16
i32 1899, label %17
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %19
6: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %19
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %19
8: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %19
9: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %19
10: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %19
11: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %19
12: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %19
13: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %19
14: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %19
15: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %19
16: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %19
17: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %19
18: ; preds = %1
store i8* null, i8** %2
br label %19
19: ; preds = %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [8 x i8] c"Alberta\00"
@.str.1 = [17 x i8] c"British Columbia\00"
@.str.2 = [9 x i8] c"Manitoba\00"
@.str.3 = [14 x i8] c"New Brunswick\00"
@.str.4 = [13 x i8] c"Newfoundland\00"
@.str.5 = [12 x i8] c"Nova Scotia\00"
@.str.6 = [22 x i8] c"Northwest Territories\00"
@.str.7 = [8 x i8] c"Nunavut\00"
@.str.8 = [8 x i8] c"Ontario\00"
@.str.9 = [21 x i8] c"Prince Edward Island\00"
@.str.10 = [7 x i8] c"Quebec\00"
@.str.11 = [13 x i8] c"Saskatchewan\00"
@.str.12 = [16 x i8] c"Yukon Territory\00"
define i8* @get_region_name_CA(i32 %0) {
switch i32 %0, label %14 [
i32 849, label %15
i32 893, label %2
i32 1365, label %3
i32 1408, label %4
i32 1418, label %5
i32 1425, label %6
i32 1426, label %7
i32 1427, label %8
i32 1463, label %9
i32 1497, label %10
i32 1538, label %11
i32 1632, label %12
i32 1899, label %13
]
2: ; preds = %1
br label %15
3: ; preds = %1
br label %15
4: ; preds = %1
br label %15
5: ; preds = %1
br label %15
6: ; preds = %1
br label %15
7: ; preds = %1
br label %15
8: ; preds = %1
br label %15
9: ; preds = %1
br label %15
10: ; preds = %1
br label %15
11: ; preds = %1
br label %15
12: ; preds = %1
br label %15
13: ; preds = %1
br label %15
14: ; preds = %1
br label %15
15: ; preds = %1, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%16 = phi i8* [ null, %14 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %16
}