#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*/ putnum(int);
int /*<<< orphan*/ puts(char *);
void main() {
  for (int i = 1; i < 100; ++i) {
    if ((i % 15) == 0) {
      puts("Fizzbuzz");
    } else if ((i % 3) == 0) {
      puts("Fizz");
    } else if ((i % 5) == 0) {
      puts("Buzz");
    } else {
      putnum(i);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    11cd <main+0xad>
mov    -0x4(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115e <main+0x3e>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
jmp    11ba <main+0x9a>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1183 <main+0x63>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
jmp    11b5 <main+0x95>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a8 <main+0x88>
lea    0xe70(%rip),%rdi
call   1030 <puts@plt>
jmp    11b0 <main+0x90>
mov    -0x4(%rbp),%edi
call   1040 <putnum@plt>
jmp    11b5 <main+0x95>
jmp    11ba <main+0x9a>
jmp    11bf <main+0x9f>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xecc(%rip),%r14
lea    0xece(%rip),%r15
lea    0xecc(%rip),%r12
jmp    1160 <main+0x40>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
je     11ba <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     1150 <main+0x30>
imul   $0xab,%eax,%ecx
shr    $0x9,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %bl,%cl
je     11b0 <main+0x90>
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
neg    %eax
add    %bl,%al
je     11b5 <main+0x95>
mov    %ebx,%edi
call   1040 <putnum@plt>
jmp    1158 <main+0x38>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
jmp    1153 <main+0x33>
mov    %r12,%rdi
jmp    1153 <main+0x33>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Fizzbuzz\00"
@.str.1 = [5 x i8] c"Fizz\00"
@.str.2 = [5 x i8] c"Buzz\00"
define void @main() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %29, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 100
br i1 %4, label %5, label %32
5: ; preds = %2
%6 = load i32, i32* %1
%7 = srem i32 %6, 15
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %28
11: ; preds = %5
%12 = load i32, i32* %1
%13 = srem i32 %12, 3
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %27
17: ; preds = %11
%18 = load i32, i32* %1
%19 = srem i32 %18, 5
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %26
23: ; preds = %17
%24 = load i32, i32* %1
%25 = call i32 @putnum(i32 %24)
br label %26
26: ; preds = %23, %21
br label %27
27: ; preds = %26, %15
br label %28
28: ; preds = %27, %9
br label %29
29: ; preds = %28
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %2
32: ; preds = %2
ret void
}

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