#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 */
scalar_t__ memcmp(char const *, char *, int);
const char *get_continent_name_and_code(const char *continentid) {
  if (memcmp(continentid, "NA", 2) == 0)
    return "NA North America";
  else if (memcmp(continentid, "OC", 2) == 0)
    return "OC Oceania";
  else if (memcmp(continentid, "EU", 2) == 0)
    return "EU Europe";
  else if (memcmp(continentid, "SA", 2) == 0)
    return "SA South America";
  else if (memcmp(continentid, "AF", 2) == 0)
    return "AF Africa";
  else if (memcmp(continentid, "AN", 2) == 0)
    return "AN Antarctica";
  else if (memcmp(continentid, "AS", 2) == 0)
    return "AS Asia";
  else
    return "-- Unknown";
}


x86 assembly (clang, -O0):
<get_continent_name_and_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    114b <get_continent_name_and_code+0x3b>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xebe(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    117a <get_continent_name_and_code+0x6a>
lea    0xea6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    11a9 <get_continent_name_and_code+0x99>
lea    0xe85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xe7b(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    11d8 <get_continent_name_and_code+0xc8>
lea    0xe63(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xe60(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1207 <get_continent_name_and_code+0xf7>
lea    0xe48(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xe3e(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1236 <get_continent_name_and_code+0x126>
lea    0xe26(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
mov    -0x10(%rbp),%rdi
lea    0xe20(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1265 <get_continent_name_and_code+0x155>
lea    0xe08(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1270 <get_continent_name_and_code+0x160>
lea    0xe00(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_continent_name_and_code>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     11de <get_continent_name_and_code+0xce>
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     11e7 <get_continent_name_and_code+0xd7>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     11f0 <get_continent_name_and_code+0xe0>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     11f9 <get_continent_name_and_code+0xe9>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     1202 <get_continent_name_and_code+0xf2>
lea    0xeaf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     120b <get_continent_name_and_code+0xfb>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
lea    0xe93(%rip),%rcx
lea    0xe94(%rip),%rax
cmove  %rcx,%rax
pop    %rbx
ret
lea    0xe1e(%rip),%rax
pop    %rbx
ret
lea    0xe29(%rip),%rax
pop    %rbx
ret
lea    0xe2e(%rip),%rax
pop    %rbx
ret
lea    0xe32(%rip),%rax
pop    %rbx
ret
lea    0xe3d(%rip),%rax
pop    %rbx
ret
lea    0xe41(%rip),%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"NA\00"
@.str.1 = [17 x i8] c"NA North America\00"
@.str.2 = [3 x i8] c"OC\00"
@.str.3 = [11 x i8] c"OC Oceania\00"
@.str.4 = [3 x i8] c"EU\00"
@.str.5 = [10 x i8] c"EU Europe\00"
@.str.6 = [3 x i8] c"SA\00"
@.str.7 = [17 x i8] c"SA South America\00"
@.str.8 = [3 x i8] c"AF\00"
@.str.9 = [10 x i8] c"AF Africa\00"
@.str.10 = [3 x i8] c"AN\00"
@.str.11 = [14 x i8] c"AN Antarctica\00"
@.str.12 = [3 x i8] c"AS\00"
@.str.13 = [8 x i8] c"AS Asia\00"
@.str.14 = [11 x i8] c"-- Unknown\00"
define i8* @get_continent_name_and_code(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @memcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %39
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @memcmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %39
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i64 @memcmp(i8* %14, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %39
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = call i64 @memcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %39
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = call i64 @memcmp(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %39
28: ; preds = %23
%29 = load i8*, i8** %3
%30 = call i64 @memcmp(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %28
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %39
33: ; preds = %28
%34 = load i8*, i8** %3
%35 = call i64 @memcmp(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 2)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %33
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %39
38: ; preds = %33
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %39
39: ; preds = %38, %37, %32, %27, %22, %17, %12, %7
%40 = load i8*, i8** %2
ret i8* %40
}

LLVM IR (-O2):
@.str = [3 x i8] c"NA\00"
@.str.1 = [17 x i8] c"NA North America\00"
@.str.2 = [3 x i8] c"OC\00"
@.str.3 = [11 x i8] c"OC Oceania\00"
@.str.4 = [3 x i8] c"EU\00"
@.str.5 = [10 x i8] c"EU Europe\00"
@.str.6 = [3 x i8] c"SA\00"
@.str.7 = [17 x i8] c"SA South America\00"
@.str.8 = [3 x i8] c"AF\00"
@.str.9 = [10 x i8] c"AF Africa\00"
@.str.10 = [3 x i8] c"AN\00"
@.str.11 = [14 x i8] c"AN Antarctica\00"
@.str.12 = [3 x i8] c"AS\00"
@.str.13 = [8 x i8] c"AS Asia\00"
@.str.14 = [11 x i8] c"-- Unknown\00"
define i8* @get_continent_name_and_code(i8* %0) {
%2 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = icmp eq i64 %2, 0
br i1 %3, label %23, label %4
4: ; preds = %1
%5 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %23, label %7
7: ; preds = %4
%8 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %23, label %10
10: ; preds = %7
%11 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %23, label %13
13: ; preds = %10
%14 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%15 = icmp eq i64 %14, 0
br i1 %15, label %23, label %16
16: ; preds = %13
%17 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%18 = icmp eq i64 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %16
%20 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i32 2)
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0)
br label %23
23: ; preds = %19, %16, %13, %10, %7, %4, %1
%24 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), %13 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), %16 ], [ %22, %19 ]
ret i8* %24
}