#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 atoi(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  int number = 0;
  number = atoi(argv[1]);
  char **result = FizzBuzz(number);
  for (int i = 0; i < number; i++) {
    printf("%s\n", result[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <FizzBuzz@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a2 <main+0x72>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1170 <main+0x40>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1030 <FizzBuzz@plt>
test   %ebp,%ebp
jle    1175 <main+0x45>
mov    %rax,%r15
mov    %ebp,%ebp
xor    %ebx,%ebx
lea    0xea5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i8** @FizzBuzz(i32 %13)
store i8** %14, i8*** %7
store i32 0, i32* %8
br label %15
15: ; preds = %26, %2
%16 = load i32, i32* %8
%17 = load i32, i32* %6
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %29
19: ; preds = %15
%20 = load i8**, i8*** %7
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %24)
br label %26
26: ; preds = %19
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
br label %15
29: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i8** @FizzBuzz(i32 %5)
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = zext i32 %5 to i64
br label %11
10: ; preds = %11, %2
ret i32 0
11: ; preds = %8, %11
%12 = phi i64 [ 0, %8 ], [ %16, %11 ]
%13 = getelementptr inbounds i8*, i8** %6, i64 %12
%14 = load i8*, i8** %13
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = add nuw nsw i64 %12, 1
%17 = icmp eq i64 %16, %9
br i1 %17, label %10, label %11
}