#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 *, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int i;
  for (i = 0; i <= 100; i++) {
    int fizz = !(i % 3);
    int buzz = !(i % 5);
    if (fizz && buzz) {
      puts("FizzBuzz");
    } else if (fizz) {
      puts("Fizz");
    } else if (buzz) {
      puts("Buzz");
    } else {
      printf("%d\n", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11fd <main+0xdd>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     119b <main+0x7b>
cmpl   $0x0,-0x10(%rbp)
je     119b <main+0x7b>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
jmp    11ea <main+0xca>
cmpl   $0x0,-0xc(%rbp)
je     11b6 <main+0x96>
lea    0xe5d(%rip),%rdi
call   1030 <puts@plt>
jmp    11e5 <main+0xc5>
cmpl   $0x0,-0x10(%rbp)
je     11d1 <main+0xb1>
lea    0xe3d(%rip),%rdi
call   1030 <puts@plt>
jmp    11e0 <main+0xc0>
mov    -0x8(%rbp),%esi
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
jmp    11e5 <main+0xc5>
jmp    11ea <main+0xca>
jmp    11ef <main+0xcf>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
xor    %ebx,%ebx
lea    0xece(%rip),%r14
lea    0xed0(%rip),%r15
lea    0xec4(%rip),%r12
lea    0xec7(%rip),%r13
jmp    1160 <main+0x40>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11aa <main+0x8a>
movzbl %bl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
lea    (%rcx,%rcx,4),%edx
imul   $0xab,%eax,%eax
shr    $0x9,%eax
lea    (%rax,%rax,2),%eax
neg    %eax
movzbl %al,%ecx
add    %ebx,%ecx
mov    %ebx,%eax
sub    %edx,%eax
mov    %ecx,%edx
or     %al,%dl
je     1150 <main+0x30>
test   %cl,%cl
je     11a0 <main+0x80>
test   %al,%al
je     11a5 <main+0x85>
mov    %r13,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1158 <main+0x38>
mov    %r15,%rdi
jmp    1153 <main+0x33>
mov    %r12,%rdi
jmp    1153 <main+0x33>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %42, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %45
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 3
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %2
%15 = srem i32 %14, 5
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %8
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %41
26: ; preds = %21, %8
%27 = load i32, i32* %3
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %40
31: ; preds = %26
%32 = load i32, i32* %4
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %39
36: ; preds = %31
%37 = load i32, i32* %2
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %36, %34
br label %40
40: ; preds = %39, %29
br label %41
41: ; preds = %40, %24
br label %42
42: ; preds = %41
%43 = load i32, i32* %2
%44 = add nsw i32 %43, 1
store i32 %44, i32* %2
br label %5
45: ; preds = %5
ret i32 0
}

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"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %20
%2 = phi i32 [ 0, %0 ], [ %21, %20 ]
%3 = trunc i32 %2 to i8
%4 = urem i8 %3, 3
%5 = urem i8 %3, 5
%6 = icmp eq i8 %5, 0
%7 = or i8 %4, %5
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %20
11: ; preds = %1
%12 = icmp eq i8 %4, 0
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %20
15: ; preds = %11
br i1 %6, label %16, label %18
16: ; preds = %15
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %20
18: ; preds = %15
%19 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %2)
br label %20
20: ; preds = %13, %18, %16, %9
%21 = add nuw nsw i32 %2, 1
%22 = icmp eq i32 %21, 101
br i1 %22, label %23, label %1
23: ; preds = %20
ret i32 0
}