#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 */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ COMPASS;

/* Variables and functions */
char const *hazer_format_nanodegrees2compass(int /*<<< orphan*/, char const **,
                                             int);
const char *hazer_format_nanodegrees2compass16(int64_t nanodegrees) {
  static const char *COMPASS[] = {
      "N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE",
      "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW",
  };
  return hazer_format_nanodegrees2compass(
      nanodegrees, COMPASS, (sizeof(COMPASS) / sizeof(COMPASS[0])));
}


x86 assembly (clang, -O0):
<hazer_format_nanodegrees2compass16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0x2f0b(%rip),%rsi
mov    $0x10,%edx
call   1030 <hazer_format_nanodegrees2compass@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hazer_format_nanodegrees2compass16>:
lea    0x2f19(%rip),%rsi
mov    $0x10,%edx
jmp    1030 <hazer_format_nanodegrees2compass@plt>

LLVM IR (-O0):
@hazer_format_nanodegrees2compass16.COMPASS = internal global [16 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0)]
@.str = [2 x i8] c"N\00"
@.str.1 = [4 x i8] c"NNE\00"
@.str.2 = [3 x i8] c"NE\00"
@.str.3 = [4 x i8] c"ENE\00"
@.str.4 = [2 x i8] c"E\00"
@.str.5 = [4 x i8] c"ESE\00"
@.str.6 = [3 x i8] c"SE\00"
@.str.7 = [4 x i8] c"SSE\00"
@.str.8 = [2 x i8] c"S\00"
@.str.9 = [4 x i8] c"SSW\00"
@.str.10 = [3 x i8] c"SW\00"
@.str.11 = [4 x i8] c"WSW\00"
@.str.12 = [2 x i8] c"W\00"
@.str.13 = [4 x i8] c"WNW\00"
@.str.14 = [3 x i8] c"NW\00"
@.str.15 = [4 x i8] c"NNW\00"
define i8* @hazer_format_nanodegrees2compass16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @hazer_format_nanodegrees2compass(i32 %3, i8** getelementptr inbounds ([16 x i8*], [16 x i8*]* @hazer_format_nanodegrees2compass16.COMPASS, i64 0, i64 0), i32 16)
ret i8* %4
}

LLVM IR (-O2):
@hazer_format_nanodegrees2compass16.COMPASS = internal global [16 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0)]
@.str = [2 x i8] c"N\00"
@.str.1 = [4 x i8] c"NNE\00"
@.str.2 = [3 x i8] c"NE\00"
@.str.3 = [4 x i8] c"ENE\00"
@.str.4 = [2 x i8] c"E\00"
@.str.5 = [4 x i8] c"ESE\00"
@.str.6 = [3 x i8] c"SE\00"
@.str.7 = [4 x i8] c"SSE\00"
@.str.8 = [2 x i8] c"S\00"
@.str.9 = [4 x i8] c"SSW\00"
@.str.10 = [3 x i8] c"SW\00"
@.str.11 = [4 x i8] c"WSW\00"
@.str.12 = [2 x i8] c"W\00"
@.str.13 = [4 x i8] c"WNW\00"
@.str.14 = [3 x i8] c"NW\00"
@.str.15 = [4 x i8] c"NNW\00"
define i8* @hazer_format_nanodegrees2compass16(i32 %0) {
%2 = tail call i8* @hazer_format_nanodegrees2compass(i32 %0, i8** getelementptr inbounds ([16 x i8*], [16 x i8*]* @hazer_format_nanodegrees2compass16.COMPASS, i64 0, i64 0), i32 16)
ret i8* %2
}