#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() {
  for (int n = 1; n <= 100; n++) {
    int fizz = 0;
    int buzz = 0;
    if ((n % 3) == 0) {
      fizz = 1;
    }
    if ((n % 5) == 0) {
      buzz = 1;
    }
    if (fizz == 1 && buzz == 0) {
      printf("Fizz\n");
      continue;
    }
    if (fizz == 0 && buzz == 1) {
      printf("Buzz\n");
      continue;
    }
    if (fizz == 1 && buzz == 1) {
      printf("FizzBuzz\n");
      continue;
    }
    printf("%d\n", 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)
jg     1208 <main+0xf8>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1159 <main+0x49>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1174 <main+0x64>
movl   $0x1,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    119b <main+0x8b>
cmpl   $0x0,-0x10(%rbp)
jne    119b <main+0x8b>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fa <main+0xea>
cmpl   $0x0,-0xc(%rbp)
jne    11c2 <main+0xb2>
cmpl   $0x1,-0x10(%rbp)
jne    11c2 <main+0xb2>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fa <main+0xea>
cmpl   $0x1,-0xc(%rbp)
jne    11e9 <main+0xd9>
cmpl   $0x1,-0x10(%rbp)
jne    11e9 <main+0xd9>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11fa <main+0xea>
mov    -0x8(%rbp),%esi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
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    0xed8(%rip),%r14
lea    0xecc(%rip),%r15
lea    0xec1(%rip),%r12
lea    0xeb6(%rip),%r13
jmp    1160 <main+0x40>
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
je     11b7 <main+0x97>
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),%ecx
neg    %ecx
movzbl %cl,%ecx
add    %ebx,%ecx
add    %ebx,%eax
test   %cl,%cl
jne    1191 <main+0x71>
test   %al,%al
jne    1150 <main+0x30>
test   %cl,%cl
je     11a0 <main+0x80>
test   %al,%al
jne    11a0 <main+0x80>
mov    %r15,%rdi
jmp    1153 <main+0x33>
xchg   %ax,%ax
or     %al,%cl
je     11b2 <main+0x92>
mov    %r13,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1158 <main+0x38>
mov    %r12,%rdi
jmp    1153 <main+0x33>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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