#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 */
scalar_t__ have_first_special_num(int, int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int special_num_a = 3, special_num_b = 5, special_num_c = 7;
  int students = 100;
  int number;
  int flag;
  for (number = 0; number < students; ++number) {
    if (have_first_special_num(number, special_num_a)) {
      printf("Fizz\n");
      continue;
    }
    flag = 0;
    if (number % special_num_a == 0) {
      printf("Fizz");
      flag = 1;
    }
    if (number % special_num_b == 0) {
      printf("Buzz");
      flag = 1;
    }
    if (number % special_num_c == 0) {
      printf("Whizz");
      flag = 1;
    }
    if (flag == 0)
      printf("%d", number);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1233 <main+0x113>
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <have_first_special_num@plt>
cmp    $0x0,%rax
je     1186 <main+0x66>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1225 <main+0x105>
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    11b2 <main+0x92>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    11d7 <main+0xb7>
lea    0xe42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%edx
jne    11fc <main+0xdc>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1217 <main+0xf7>
mov    -0x18(%rbp),%esi
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1152 <main+0x32>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebc(%rip),%r13
lea    0xeac(%rip),%r15
xor    %ebp,%ebp
jmp    1174 <main+0x34>
nopl   (%rax)
mov    %r13,%rdi
call   1050 <puts@plt>
add    $0x1,%ebp
cmp    $0x64,%ebp
je     122d <main+0xed>
mov    %ebp,%edi
mov    $0x3,%esi
call   1030 <have_first_special_num@plt>
test   %rax,%rax
jne    1160 <main+0x20>
movzbl %bpl,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
imul   $0xcd,%eax,%edx
imul   $0xab,%eax,%esi
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%ebx
lea    0x0(,%rbx,8),%eax
sub    %eax,%ebx
shr    $0xa,%edx
lea    (%rdx,%rdx,4),%r14d
neg    %r14d
shr    $0x9,%esi
lea    (%rsi,%rsi,2),%eax
neg    %eax
movzbl %al,%r12d
add    %ebp,%r12d
test   %r12b,%r12b
je     11f2 <main+0xb2>
add    %bpl,%r14b
je     1201 <main+0xc1>
add    %bpl,%bl
je     1214 <main+0xd4>
test   %r12b,%r12b
je     121e <main+0xde>
lea    0xe24(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    121e <main+0xde>
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    %bpl,%r14b
jne    11d6 <main+0x96>
lea    0xdf8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
add    %bpl,%bl
jne    121e <main+0xde>
mov    %r15,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1168 <main+0x28>
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"Fizz\0A\00"
@.str.1 = [5 x i8] c"Fizz\00"
@.str.2 = [5 x i8] c"Buzz\00"
@.str.3 = [6 x i8] c"Whizz\00"
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 5, i32* %3
store i32 7, i32* %4
store i32 100, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %48, %0
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %51
12: ; preds = %8
%13 = load i32, i32* %6
%14 = load i32, i32* %2
%15 = call i64 @have_first_special_num(i32 %13, i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %48
19: ; preds = %12
store i32 0, i32* %7
%20 = load i32, i32* %6
%21 = load i32, i32* %2
%22 = srem i32 %20, %21
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %7
br label %26
26: ; preds = %24, %19
%27 = load i32, i32* %6
%28 = load i32, i32* %3
%29 = srem i32 %27, %28
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %26
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %7
br label %33
33: ; preds = %31, %26
%34 = load i32, i32* %6
%35 = load i32, i32* %4
%36 = srem i32 %34, %35
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %33
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %7
br label %40
40: ; preds = %38, %33
%41 = load i32, i32* %7
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = load i32, i32* %6
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %40
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %48
48: ; preds = %46, %17
%49 = load i32, i32* %6
%50 = add nsw i32 %49, 1
store i32 %50, i32* %6
br label %8
51: ; preds = %8
ret i32 0
}

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