#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 */
char const *sprintf(char *, char *, int);
const char *fizzbuzz(int x) {
  static char b[0115];
  if (b[42] != 98) {
    b[21] = 102;
    b[22] = 105;
    b[23] = 122;
    b[24] = 122;
    b['A'] = 122;
    b['B'] = 122;
    b['C'] = 98;
    b['D'] = 117;
    b['E'] = 122;
    b['F'] = 122;
    b[','] = 122;
    b['*'] = 98;
    b['?'] = 102;
    b['@'] = 105;
    b['+'] = 117;
    b['-'] = 122;
  }
  return sprintf(b, "%d", x), b + ((x % 5) ? 0 : 0x15) + ((x % 3) ? 0 : '*');
}


x86 assembly (clang, -O0):
<fizzbuzz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsbl 0x2f48(%rip),%eax
cmp    $0x62,%eax
je     119b <fizzbuzz+0x8b>
movb   $0x66,0x2f23(%rip)
movb   $0x69,0x2f1d(%rip)
movb   $0x7a,0x2f17(%rip)
movb   $0x7a,0x2f11(%rip)
movb   $0x7a,0x2f33(%rip)
movb   $0x7a,0x2f2d(%rip)
movb   $0x62,0x2f27(%rip)
movb   $0x75,0x2f21(%rip)
movb   $0x7a,0x2f1b(%rip)
movb   $0x7a,0x2f15(%rip)
movb   $0x7a,0x2ef4(%rip)
movb   $0x62,0x2eeb(%rip)
movb   $0x66,0x2ef9(%rip)
movb   $0x69,0x2ef3(%rip)
movb   $0x75,0x2ed7(%rip)
movb   $0x7a,0x2ed2(%rip)
mov    -0x4(%rbp),%edx
lea    0x2e9b(%rip),%rdi
lea    0xe54(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    $0x15,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
movslq %eax,%rcx
lea    0x2e6d(%rip),%rax
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
mov    %edx,%esi
mov    $0x2a,%ecx
xor    %edx,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fizzbuzz>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
cmpb   $0x62,0x2f4d(%rip)
je     114f <fizzbuzz+0x3f>
movl   $0x7a7a6966,0x2f2c(%rip)
69 7a 7a
movl   $0x75627a7a,0x2f4e(%rip)
7a 62 75
movw   $0x7a7a,0x2f49(%rip)
7a 7a
movl   $0x7a7a7562,0x2f24(%rip)
75 7a 7a
movw   $0x6966,0x2f30(%rip)
66 69
lea    0x2eea(%rip),%r14
lea    0xea3(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <sprintf@plt>
imul   $0xcccccccd,%ebx,%eax
add    $0x19999999,%eax
cmp    $0x33333333,%eax
lea    0x2ed7(%rip),%rcx
cmovae %r14,%rcx
imul   $0xaaaaaaab,%ebx,%edx
add    $0x2aaaaaaa,%edx
lea    0x2a(%rcx),%rax
cmp    $0x55555555,%edx
cmovae %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@fizzbuzz.b = internal global [77 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @fizzbuzz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i8, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 42)
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 98
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 102, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 21)
store i8 105, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 22)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 23)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 24)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 65)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 66)
store i8 98, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 67)
store i8 117, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 68)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 69)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 70)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 44)
store i8 98, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 42)
store i8 102, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 63)
store i8 105, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 64)
store i8 117, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 43)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 45)
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
%9 = call i8* @sprintf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = srem i32 %10, 5
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 21
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 0), i64 %15
%17 = load i32, i32* %2
%18 = srem i32 %17, 3
%19 = icmp ne i32 %18, 0
%20 = zext i1 %19 to i64
%21 = select i1 %19, i32 0, i32 42
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %16, i64 %22
ret i8* %23
}

LLVM IR (-O2):
@fizzbuzz.b = internal global [77 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @fizzbuzz(i32 %0) {
%2 = load i8, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 42)
%3 = icmp eq i8 %2, 98
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 102, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 21)
store i8 105, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 22)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 23)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 24)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 65)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 66)
store i8 98, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 67)
store i8 117, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 68)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 69)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 70)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 44)
store i8 98, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 42)
store i8 102, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 63)
store i8 105, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 64)
store i8 117, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 43)
store i8 122, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 45)
br label %5
5: ; preds = %4, %1
%6 = tail call i8* @sprintf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = srem i32 %0, 5
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i64 21, i64 0
%10 = getelementptr inbounds [77 x i8], [77 x i8]* @fizzbuzz.b, i64 0, i64 %9
%11 = srem i32 %0, 3
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i64 42, i64 0
%14 = getelementptr inbounds i8, i8* %10, i64 %13
ret i8* %14
}