#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  for (int i = 1; i < 101; ++i) {
    if (i % 15 == 0)
      printf("%s\n", "FizzBuzz");
    else if (i % 3 == 0)
      printf("%s\n", "Fizz");
    else if (i % 5 == 0)
      printf("%s\n", "Buzz");
    else
      printf("%i\n", i);
  }
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    11f8 <main+0xd8>
mov    -0x8(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116e <main+0x4e>
lea    0xea5(%rip),%rdi
lea    0xea2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e5 <main+0xc5>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    119c <main+0x7c>
lea    0xe77(%rip),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e0 <main+0xc0>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ca <main+0xaa>
lea    0xe49(%rip),%rdi
lea    0xe4a(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11db <main+0xbb>
mov    -0x8(%rbp),%esi
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11e0 <main+0xc0>
jmp    11e5 <main+0xc5>
jmp    11ea <main+0xca>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    $0x0,%al
call   1040 <getchar@plt>
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    0xebb(%rip),%r14
lea    0xebd(%rip),%r15
lea    0xeb1(%rip),%r12
lea    0xeb4(%rip),%r13
jmp    1170 <main+0x40>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11ca <main+0x9a>
movzbl %bl,%eax
imul   $0x89,%eax,%ecx
shr    $0xb,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
sub    %edx,%ecx
add    %al,%cl
je     1160 <main+0x30>
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %bl,%cl
je     11c0 <main+0x90>
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
add    %bl,%al
je     11c5 <main+0x95>
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1168 <main+0x38>
nopl   0x0(%rax)
mov    %r15,%rdi
jmp    1163 <main+0x33>
mov    %r12,%rdi
jmp    1163 <main+0x33>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"FizzBuzz\00"
@.str.2 = [5 x i8] c"Fizz\00"
@.str.3 = [5 x i8] c"Buzz\00"
@.str.4 = [4 x i8] c"%i\0A\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 = %30, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %33
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 15
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %29
12: ; preds = %6
%13 = load i32, i32* %2
%14 = srem i32 %13, 3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %28
18: ; preds = %12
%19 = load i32, i32* %2
%20 = srem i32 %19, 5
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %27
24: ; preds = %18
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %25)
br label %27
27: ; preds = %24, %22
br label %28
28: ; preds = %27, %16
br label %29
29: ; preds = %28, %10
br label %30
30: ; preds = %29
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
br label %3
33: ; preds = %3
%34 = call i32 (...) @getchar()
ret i32 0
}

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