#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int main(int argc, const char *argv[]) {
  for (int iCounter = 1; iCounter <= 100; iCounter++) {
    if (iCounter % 3 == 0 && iCounter % 5 == 0) {
      fprintf(stdout, "FizzBuzz\n");
    } else if (iCounter % 3 == 0) {
      fprintf(stdout, "Fizz\n");
    } else if (iCounter % 5 == 0) {
      fprintf(stdout, "Buzz\n");
    } else {
      fprintf(stdout, "%d\n", iCounter);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jg     1212 <main+0x102>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117b <main+0x6b>
mov    -0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117b <main+0x6b>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11ff <main+0xef>
mov    -0x14(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ab <main+0x9b>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
lea    0xe6b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11fa <main+0xea>
mov    -0x14(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11db <main+0xcb>
mov    0x2e1a(%rip),%rax
mov    (%rax),%edi
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11f5 <main+0xe5>
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
jmp    11fa <main+0xea>
jmp    11ff <main+0xef>
jmp    1204 <main+0xf4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%ebx
mov    0x2eb9(%rip),%rbp
lea    0xed2(%rip),%r14
lea    0xed5(%rip),%r15
lea    0xec8(%rip),%r12
lea    0xecd(%rip),%r13
jmp    1165 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x0(%rbp),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11ba <main+0xaa>
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+0x40>
mov    0x0(%rbp),%edi
test   %cl,%cl
je     11b0 <main+0xa0>
test   %al,%al
je     11b5 <main+0xa5>
mov    %r13,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    115d <main+0x4d>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rsi
jmp    1156 <main+0x46>
mov    %r12,%rsi
jmp    1156 <main+0x46>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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