#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 calcn(int);
int fatorial(int);
int pot(int, int);
int /*<<< orphan*/ printf(char *, int);
int seno(double);
int main() {
  printf("%d\n ", pot(2, 4));
  printf("%d\n", fatorial(10));
  printf("%d\n", calcn(20));
  printf("%lf\n", seno(60.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pot@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1060 <fatorial@plt>
mov    %eax,%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1070 <calcn@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe4c(%rip),%xmm0
call   1050 <seno@plt>
mov    %eax,%esi
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <pot@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1060 <fatorial@plt>
lea    0xe8e(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1070 <calcn@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
movsd  0xe5b(%rip),%xmm0
call   1050 <seno@plt>
lea    0xe60(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d\0A \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @pot(i32 2, i32 4)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @fatorial(i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @calcn(i32 20)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 @seno(double 6.000000e+01)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d\0A \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = tail call i32 @pot(i32 2, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @fatorial(i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @calcn(i32 20)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 @seno(double 6.000000e+01)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}