#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 */
int /*<<< orphan*/ printf(char *, ...);
void fizzbuzz(int fizzbuzz) {
  if (fizzbuzz % 3 == 0)
    printf("Fizz");
  if (fizzbuzz % 5 == 0)
    printf("Buzz");
  if ((fizzbuzz % 3 != 0) && (fizzbuzz % 5 != 0))
    printf("%d", fizzbuzz);
  printf("\n");
}


x86 assembly (clang, -O0):
<fizzbuzz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    113d <fizzbuzz+0x2d>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115f <fizzbuzz+0x4f>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1198 <fizzbuzz+0x88>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1198 <fizzbuzz+0x88>
mov    -0x4(%rbp),%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fizzbuzz>:
push   %rbx
mov    %edi,%ebx
imul   $0xaaaaaaab,%edi,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555554,%eax
jbe    1159 <fizzbuzz+0x39>
imul   $0xcccccccd,%ebx,%eax
add    $0x19999999,%eax
cmp    $0x33333332,%eax
jbe    1179 <fizzbuzz+0x59>
lea    0xebc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1187 <fizzbuzz+0x67>
lea    0xea0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
imul   $0xcccccccd,%ebx,%eax
add    $0x19999999,%eax
cmp    $0x33333333,%eax
jae    1187 <fizzbuzz+0x67>
lea    0xe85(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"Fizz\00"
@.str.1 = [5 x i8] c"Buzz\00"
@.str.2 = [3 x i8] c"%d\00"
define void @fizzbuzz(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = srem i32 %0, 5
%7 = icmp eq i32 %6, 0
br i1 %7, label %11, label %15
8: ; preds = %1
%9 = srem i32 %0, 5
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8, %4
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %15
15: ; preds = %4, %11, %13
%16 = tail call i32 @putchar(i32 10)
ret void
}