#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 *fizzbuzz(unsigned int num) {
  if (num % 3 == 0 && num % 5 == 0) {
    return "FizzBuzz";
  }
  if (num % 3 == 0) {
    return "Fizz";
  }
  if (num % 5 == 0) {
    return "Buzz";
  }
  return NULL;
}


x86 assembly (clang, -O0):
<fizzbuzz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1141 <fizzbuzz+0x41>
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1141 <fizzbuzz+0x41>
lea    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1193 <fizzbuzz+0x93>
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1166 <fizzbuzz+0x66>
lea    0xeac(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1193 <fizzbuzz+0x93>
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    118b <fizzbuzz+0x8b>
lea    0xe82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1193 <fizzbuzz+0x93>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fizzbuzz>:
mov    %edi,%eax
mov    $0xaaaaaaab,%ecx
imul   %rax,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,2),%ecx
mov    %edi,%edx
sub    %ecx,%edx
mov    $0xcccccccd,%ecx
imul   %rax,%rcx
shr    $0x22,%rcx
lea    (%rcx,%rcx,4),%eax
sub    %eax,%edi
mov    %edx,%eax
or     %edi,%eax
lea    0xecd(%rip),%rax
lea    0xecf(%rip),%rcx
cmove  %rax,%rcx
xor    %eax,%eax
test   %edi,%edi
lea    0xebb(%rip),%rsi
cmove  %rsi,%rax
test   %edx,%edx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"FizzBuzz\00"
@.str.1 = [5 x i8] c"Fizz\00"
@.str.2 = [5 x i8] c"Buzz\00"
define i8* @fizzbuzz(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = urem i32 %4, 3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = urem i32 %8, 5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %2
br label %23
12: ; preds = %7, %1
%13 = load i32, i32* %3
%14 = urem i32 %13, 3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %23
17: ; preds = %12
%18 = load i32, i32* %3
%19 = urem i32 %18, 5
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %23
22: ; preds = %17
store i8* null, i8** %2
br label %23
23: ; preds = %22, %21, %16, %11
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
@.str = [9 x i8] c"FizzBuzz\00"
@.str.1 = [5 x i8] c"Fizz\00"
@.str.2 = [5 x i8] c"Buzz\00"
define i8* @fizzbuzz(i32 %0) {
%2 = urem i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = urem i32 %0, 5
%5 = icmp eq i32 %4, 0
%6 = or i32 %2, %4
%7 = icmp eq i32 %6, 0
%8 = select i1 %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%9 = select i1 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* null
%10 = select i1 %3, i8* %8, i8* %9
ret i8* %10
}