#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 n, f, b;
  for (n = 0; n <= 100; f = !(n % 3), b = !(n % 5),
      (f && b)                ? puts("FizzBuzz")
                        : (f) ? puts("Fizz")
                        : (b) ? puts("Buzz")
                              : printf("%d\n", n),
      ++n)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1205 <main+0xe5>
jmp    1145 <main+0x25>
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     11a0 <main+0x80>
cmpl   $0x0,-0x10(%rbp)
je     11a0 <main+0x80>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
jmp    11f7 <main+0xd7>
cmpl   $0x0,-0xc(%rbp)
je     11be <main+0x9e>
lea    0xe58(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x14(%rbp)
jmp    11f4 <main+0xd4>
cmpl   $0x0,-0x10(%rbp)
je     11dc <main+0xbc>
lea    0xe35(%rip),%rdi
call   1030 <puts@plt>
mov    %eax,-0x18(%rbp)
jmp    11ee <main+0xce>
mov    -0x8(%rbp),%esi
lea    0xe28(%rip),%rdi
call   1040 <printf@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%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 = %44, %0
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %48
8: ; preds = %5
br label %9
9: ; preds = %8
%10 = load i32, i32* %2
%11 = srem i32 %10, 3
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = srem i32 %15, 5
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
store i32 %19, i32* %4
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %9
%23 = load i32, i32* %4
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %44
27: ; preds = %22, %9
%28 = load i32, i32* %3
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %42
32: ; preds = %27
%33 = load i32, i32* %4
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %40
37: ; preds = %32
%38 = load i32, i32* %2
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %38)
br label %40
40: ; preds = %37, %35
%41 = phi i32 [ %36, %35 ], [ %39, %37 ]
br label %42
42: ; preds = %40, %30
%43 = phi i32 [ %31, %30 ], [ %41, %40 ]
br label %44
44: ; preds = %42, %25
%45 = phi i32 [ %26, %25 ], [ %43, %42 ]
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
store i32 %47, i32* %2
br label %5
48: ; 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
}