#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(void) {
  int i;
  for (i = 1; i <= 100; i++)
    if (i % 3 == 0 || i % 5 == 0)
      printf("%s%s\n", i % 3 == 0 ? "Fizz" : "", i % 5 == 0 ? "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   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     11d1 <main+0xc1>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1158 <main+0x48>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ad <main+0x9d>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
lea    0xea9(%rip),%rsi
lea    0xe95(%rip),%rax
cmp    $0x0,%edx
cmove  %rax,%rsi
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
lea    0xe87(%rip),%rdx
lea    0xe78(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <main+0xae>
mov    -0x8(%rbp),%esi
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c3 <main+0xb3>
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   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xedf(%rip),%r12
lea    0xedd(%rip),%r13
lea    0xede(%rip),%rbp
lea    0xec4(%rip),%r14
lea    0xecd(%rip),%r15
jmp    1162 <main+0x52>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11c1 <main+0xb1>
movzbl %bl,%ecx
imul   $0xcd,%ecx,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
movzbl %al,%eax
imul   $0xab,%ecx,%edx
shr    $0x9,%edx
lea    (%rdx,%rdx,2),%edx
neg    %edx
add    %ebx,%eax
add    %dl,%cl
je     11a0 <main+0x90>
test   %al,%al
je     11b0 <main+0xa0>
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    115a <main+0x4a>
nopl   0x0(%rax)
mov    %r12,%rsi
jmp    11b5 <main+0xa5>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
mov    %rbp,%rsi
mov    %r13,%rdx
test   %al,%al
je     1150 <main+0x40>
mov    %rbp,%rdx
jmp    1150 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s%s\0A\00"
@.str.1 = [5 x i8] c"Fizz\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [5 x i8] c"Buzz\00"
@.str.4 = [4 x i8] c"%d\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 sle i32 %4, 100
br i1 %5, label %6, label %33
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 3
%9 = icmp eq i32 %8, 0
br i1 %9, label %14, label %10
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 %26
14: ; preds = %10, %6
%15 = load i32, i32* %2
%16 = srem i32 %15, 3
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%20 = load i32, i32* %2
%21 = srem i32 %20, 5
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i64
%24 = select i1 %22, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %19, i8* %24)
br label %29
26: ; preds = %10
%27 = load i32, i32* %2
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %26, %14
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
ret i32 0
}

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