#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() {
  int counter;
  for (counter = 1; counter < 100; counter++) {
    if (counter % 3 == 0) {
      puts("fizz");
    }
    if (counter % 5 == 0) {
      puts("buzz");
    }
    if ((counter % 3 > 0) && (counter % 5 > 0)) {
      printf("%i", counter);
    }
    puts("\n");
  }
  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)
jge    11d1 <main+0xb1>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1160 <main+0x40>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1180 <main+0x60>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jle    11b7 <main+0x97>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jle    11b7 <main+0x97>
mov    -0x8(%rbp),%esi
lea    0xe58(%rip),%rdi
call   1040 <printf@plt>
lea    0xe4f(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <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    0xec9(%rip),%r14
lea    0xec7(%rip),%r15
lea    0xec8(%rip),%r12
lea    0xebe(%rip),%r13
jmp    1168 <main+0x48>
xchg   %ax,%ax
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
je     11af <main+0x8f>
movzbl %bl,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
lea    (%rcx,%rcx,4),%ebp
neg    %ebp
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %cl,%al
je     11a0 <main+0x80>
add    %bl,%bpl
je     1150 <main+0x30>
mov    %r13,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
jmp    1158 <main+0x38>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
add    %bl,%bpl
jne    1158 <main+0x38>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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