#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*/ CalcNN(int, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char buf[1000];
  CalcNN(5, buf);
  puts(buf);
  CalcNN(12, buf);
  puts(buf);
  CalcNN(13, buf);
  puts(buf);
  CalcNN(20, buf);
  puts(buf);
  CalcNN(100, buf);
  puts(buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rsi
mov    $0x5,%edi
call   1040 <CalcNN@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x3f0(%rbp),%rsi
mov    $0xc,%edi
call   1040 <CalcNN@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x3f0(%rbp),%rsi
mov    $0xd,%edi
call   1040 <CalcNN@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x3f0(%rbp),%rsi
mov    $0x14,%edi
call   1040 <CalcNN@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
lea    -0x3f0(%rbp),%rsi
mov    $0x64,%edi
call   1040 <CalcNN@plt>
lea    -0x3f0(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    $0x5,%edi
mov    %rbx,%rsi
call   1040 <CalcNN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0xc,%edi
mov    %rbx,%rsi
call   1040 <CalcNN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0xd,%edi
mov    %rbx,%rsi
call   1040 <CalcNN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x14,%edi
mov    %rbx,%rsi
call   1040 <CalcNN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x64,%edi
mov    %rbx,%rsi
call   1040 <CalcNN@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = call i32 @CalcNN(i32 5, i8* %3)
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%6 = call i32 @puts(i8* %5)
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%8 = call i32 @CalcNN(i32 12, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%12 = call i32 @CalcNN(i32 13, i8* %11)
%13 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%14 = call i32 @puts(i8* %13)
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%16 = call i32 @CalcNN(i32 20, i8* %15)
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%18 = call i32 @puts(i8* %17)
%19 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%20 = call i32 @CalcNN(i32 100, i8* %19)
%21 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%22 = call i32 @puts(i8* %21)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @CalcNN(i32 5, i8* %2)
%4 = call i32 @puts(i8* %2)
%5 = call i32 @CalcNN(i32 12, i8* %2)
%6 = call i32 @puts(i8* %2)
%7 = call i32 @CalcNN(i32 13, i8* %2)
%8 = call i32 @puts(i8* %2)
%9 = call i32 @CalcNN(i32 20, i8* %2)
%10 = call i32 @puts(i8* %2)
%11 = call i32 @CalcNN(i32 100, i8* %2)
%12 = call i32 @puts(i8* %2)
ret i32 0
}