#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 */
char **fizzBuzz(int, int *);
int /*<<< orphan*/ puts(char *);
int main() {
  int i, n = 15, returnSize = 0;
  char **res = fizzBuzz(n, &returnSize);
  for (i = 0; i < n; i++)
    puts(res[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xf,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1040 <fizzBuzz@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117f <main+0x5f>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0xf,%edi
call   1040 <fizzBuzz@plt>
mov    %rax,%rbx
mov    (%rax),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
mov    0x10(%rbx),%rdi
call   1030 <puts@plt>
mov    0x18(%rbx),%rdi
call   1030 <puts@plt>
mov    0x20(%rbx),%rdi
call   1030 <puts@plt>
mov    0x28(%rbx),%rdi
call   1030 <puts@plt>
mov    0x30(%rbx),%rdi
call   1030 <puts@plt>
mov    0x38(%rbx),%rdi
call   1030 <puts@plt>
mov    0x40(%rbx),%rdi
call   1030 <puts@plt>
mov    0x48(%rbx),%rdi
call   1030 <puts@plt>
mov    0x50(%rbx),%rdi
call   1030 <puts@plt>
mov    0x58(%rbx),%rdi
call   1030 <puts@plt>
mov    0x60(%rbx),%rdi
call   1030 <puts@plt>
mov    0x68(%rbx),%rdi
call   1030 <puts@plt>
mov    0x70(%rbx),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %1
store i32 15, i32* %3
store i32 0, i32* %4
%6 = load i32, i32* %3
%7 = call i8** @fizzBuzz(i32 %6, i32* %4)
store i8** %7, i8*** %5
store i32 0, i32* %2
br label %8
8: ; preds = %19, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = load i8**, i8*** %5
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @puts(i8* %17)
br label %19
19: ; preds = %12
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %8
22: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i8** @fizzBuzz(i32 15, i32* %1)
%4 = load i8*, i8** %3
%5 = call i32 @puts(i8* dereferenceable(1) %4)
%6 = getelementptr inbounds i8*, i8** %3, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @puts(i8* dereferenceable(1) %7)
%9 = getelementptr inbounds i8*, i8** %3, i64 2
%10 = load i8*, i8** %9
%11 = call i32 @puts(i8* dereferenceable(1) %10)
%12 = getelementptr inbounds i8*, i8** %3, i64 3
%13 = load i8*, i8** %12
%14 = call i32 @puts(i8* dereferenceable(1) %13)
%15 = getelementptr inbounds i8*, i8** %3, i64 4
%16 = load i8*, i8** %15
%17 = call i32 @puts(i8* dereferenceable(1) %16)
%18 = getelementptr inbounds i8*, i8** %3, i64 5
%19 = load i8*, i8** %18
%20 = call i32 @puts(i8* dereferenceable(1) %19)
%21 = getelementptr inbounds i8*, i8** %3, i64 6
%22 = load i8*, i8** %21
%23 = call i32 @puts(i8* dereferenceable(1) %22)
%24 = getelementptr inbounds i8*, i8** %3, i64 7
%25 = load i8*, i8** %24
%26 = call i32 @puts(i8* dereferenceable(1) %25)
%27 = getelementptr inbounds i8*, i8** %3, i64 8
%28 = load i8*, i8** %27
%29 = call i32 @puts(i8* dereferenceable(1) %28)
%30 = getelementptr inbounds i8*, i8** %3, i64 9
%31 = load i8*, i8** %30
%32 = call i32 @puts(i8* dereferenceable(1) %31)
%33 = getelementptr inbounds i8*, i8** %3, i64 10
%34 = load i8*, i8** %33
%35 = call i32 @puts(i8* dereferenceable(1) %34)
%36 = getelementptr inbounds i8*, i8** %3, i64 11
%37 = load i8*, i8** %36
%38 = call i32 @puts(i8* dereferenceable(1) %37)
%39 = getelementptr inbounds i8*, i8** %3, i64 12
%40 = load i8*, i8** %39
%41 = call i32 @puts(i8* dereferenceable(1) %40)
%42 = getelementptr inbounds i8*, i8** %3, i64 13
%43 = load i8*, i8** %42
%44 = call i32 @puts(i8* dereferenceable(1) %43)
%45 = getelementptr inbounds i8*, i8** %3, i64 14
%46 = load i8*, i8** %45
%47 = call i32 @puts(i8* dereferenceable(1) %46)
ret i32 0
}