#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 fizzBuzz(int begin, int end) {
  if (begin <= end) {
    if (!(begin % 3))
      printf("Fizz");
    if (!(begin % 5))
      printf("Buzz");
    if (begin % 3 && begin % 5)
      printf("%d", begin);
    printf("\n");
    fizzBuzz(++begin, end);
  }
}


x86 assembly (clang, -O0):
<fizzBuzz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11d6 <fizzBuzz+0xb6>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115c <fizzBuzz+0x3c>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117e <fizzBuzz+0x5e>
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b7 <fizzBuzz+0x97>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11b7 <fizzBuzz+0x97>
mov    -0x8(%rbp),%esi
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    %edi,-0x8(%rbp)
mov    -0xc(%rbp),%esi
call   1040 <fizzBuzz@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fizzBuzz>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    %esi,%edi
jle    1135 <fizzBuzz+0x15>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xebd(%rip),%r14
lea    0xebb(%rip),%r15
lea    0xeb9(%rip),%r12
jmp    117b <fizzBuzz+0x5b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
je     112c <fizzBuzz+0xc>
imul   $0xaaaaaaab,%ebp,%eax
add    $0x2aaaaaaa,%eax
cmp    $0x55555554,%eax
jbe    11b0 <fizzBuzz+0x90>
imul   $0xcccccccd,%ebp,%eax
add    $0x19999999,%eax
cmp    $0x33333332,%eax
jbe    1160 <fizzBuzz+0x40>
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    116a <fizzBuzz+0x4a>
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
imul   $0xcccccccd,%ebp,%eax
add    $0x19999999,%eax
cmp    $0x33333333,%eax
jae    116a <fizzBuzz+0x4a>
jmp    1160 <fizzBuzz+0x40>

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

LLVM IR (-O2):
@.str = [5 x i8] c"Fizz\00"
@.str.1 = [5 x i8] c"Buzz\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @fizzBuzz(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %23, label %4
4: ; preds = %2, %19
%5 = phi i32 [ %21, %19 ], [ %0, %2 ]
%6 = srem i32 %5, 3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = srem i32 %5, 5
%11 = icmp eq i32 %10, 0
br i1 %11, label %15, label %19
12: ; preds = %4
%13 = srem i32 %5, 5
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12, %8
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %19
19: ; preds = %8, %15, %17
%20 = tail call i32 @putchar(i32 10)
%21 = add i32 %5, 1
%22 = icmp eq i32 %5, %1
br i1 %22, label %23, label %4
23: ; preds = %19, %2
ret i32 undef
}