#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 main() {
  int i;
  for (i = 1; i <= 100; i++) {
    if (i % 3 == 0 && i % 5 == 0)
      printf("\nFizzBuzz");
    else if (i % 5 == 0)
      printf("\nBuzz");
    else if (i % 3 == 0)
      printf("\nFizz");
    else
      printf("\n%d", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11e7 <main+0xd7>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116b <main+0x5b>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116b <main+0x5b>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d4 <main+0xc4>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1192 <main+0x82>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cf <main+0xbf>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b9 <main+0xa9>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ca <main+0xba>
mov    -0x8(%rbp),%esi
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cf <main+0xbf>
jmp    11d4 <main+0xc4>
jmp    11d9 <main+0xc9>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <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
mov    $0x1,%ebx
lea    0xedb(%rip),%r14
lea    0xede(%rip),%r15
lea    0xedd(%rip),%r12
lea    0xedc(%rip),%r13
jmp    1152 <main+0x42>
nopl   0x0(%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11aa <main+0x9a>
movzbl %bl,%ecx
imul   $0xcd,%ecx,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
movzbl %al,%eax
imul   $0xab,%ecx,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%edx
mov    %ebx,%ecx
sub    %edx,%ecx
add    %ebx,%eax
mov    %eax,%edx
or     %cl,%dl
je     1140 <main+0x30>
test   %al,%al
je     11a0 <main+0x90>
test   %cl,%cl
je     11a5 <main+0x95>
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    114a <main+0x3a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
jmp    1143 <main+0x33>
mov    %r12,%rdi
jmp    1143 <main+0x33>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"\0AFizzBuzz\00"
@.str.1 = [6 x i8] c"\0ABuzz\00"
@.str.2 = [6 x i8] c"\0AFizz\00"
@.str.3 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %34, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 100
br i1 %5, label %6, label %37
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32, i32* %2
%12 = srem i32 %11, 5
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %33
16: ; preds = %10, %6
%17 = load i32, i32* %2
%18 = srem i32 %17, 5
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %32
22: ; preds = %16
%23 = load i32, i32* %2
%24 = srem i32 %23, 3
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %31
28: ; preds = %22
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28, %26
br label %32
32: ; preds = %31, %20
br label %33
33: ; preds = %32, %14
br label %34
34: ; preds = %33
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %3
37: ; preds = %3
ret i32 0
}

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