#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*/ fizz_buzz(int);
int main() {
  int i;
  for (i = 0; i <= 100; i++) {
    int prev_num = i - 1;
    if ((i != 0) && (prev_num % 5 == 0) && (prev_num % 10 != 0)) {
      i = i + 3;
    } else {
      fizz_buzz(i);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1194 <main+0x84>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1179 <main+0x69>
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1179 <main+0x69>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1179 <main+0x69>
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
jmp    1181 <main+0x71>
mov    -0x8(%rbp),%edi
call   1030 <fizz_buzz@plt>
jmp    1186 <main+0x76>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
jmp    1131 <main+0x21>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <fizz_buzz@plt>
lea    0x1(%rbx),%eax
cmp    $0x64,%ebx
mov    %eax,%ebx
jge    116d <main+0x5d>
mov    %ebx,%eax
sub    $0x1,%eax
jb     1120 <main+0x10>
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rdi
sar    $0x21,%rdi
mov    %rcx,%rdx
shr    $0x3f,%rdx
add    %edx,%edi
lea    (%rdi,%rdi,4),%edi
sub    %edi,%esi
jne    1120 <main+0x10>
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
je     1120 <main+0x10>
add    $0x3,%ebx
jmp    1127 <main+0x17>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %27, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 100
br i1 %6, label %7, label %30
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %7
%13 = load i32, i32* %3
%14 = srem i32 %13, 5
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = load i32, i32* %3
%18 = srem i32 %17, 10
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 3
store i32 %22, i32* %2
br label %26
23: ; preds = %16, %12, %7
%24 = load i32, i32* %2
%25 = call i32 @fizz_buzz(i32 %24)
br label %26
26: ; preds = %23, %20
br label %27
27: ; preds = %26
%28 = load i32, i32* %2
%29 = add nsw i32 %28, 1
store i32 %29, i32* %2
br label %4
30: ; preds = %4
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %15
%2 = phi i32 [ 0, %0 ], [ %17, %15 ]
%3 = add nsw i32 %2, -1
%4 = icmp eq i32 %2, 0
%5 = srem i32 %3, 5
%6 = icmp ne i32 %5, 0
%7 = select i1 %4, i1 true, i1 %6
%8 = srem i32 %3, 10
%9 = icmp eq i32 %8, 0
%10 = select i1 %7, i1 true, i1 %9
br i1 %10, label %13, label %11
11: ; preds = %1
%12 = add nsw i32 %2, 3
br label %15
13: ; preds = %1
%14 = tail call i32 @fizz_buzz(i32 %2)
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %2, %13 ]
%17 = add nsw i32 %16, 1
%18 = icmp slt i32 %16, 100
br i1 %18, label %1, label %19
19: ; preds = %15
ret i32 0
}