#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 */
double areaRectangulo(double, double);
double factorial(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
double volumenEsfera(double);
int main() {
  double radio;
  printf("%.2e \n", factorial(150));
  printf("%.2f \n", areaRectangulo(2.5, 2.1));
  printf("%.3f \n", volumenEsfera(15.25));
  printf("Ingrese un radio: \n");
  scanf("%lf", &radio);
  printf("%.3f \n", volumenEsfera(radio));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x96,%edi
call   1040 <factorial@plt>
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xe89(%rip),%xmm0
movsd  0xe89(%rip),%xmm1
call   1050 <areaRectangulo@plt>
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
movsd  0xe5e(%rip),%xmm0
call   1030 <volumenEsfera@plt>
lea    0xe78(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe77(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1070 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
call   1030 <volumenEsfera@plt>
lea    0xe42(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x96,%edi
call   1050 <factorial@plt>
lea    0xea2(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xe7b(%rip),%xmm0
movsd  0xe7b(%rip),%xmm1
call   1060 <areaRectangulo@plt>
lea    0xe86(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movsd  0xe68(%rip),%xmm0
call   1030 <volumenEsfera@plt>
lea    0xe72(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
lea    0xe6c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe5c(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1080 <scanf@plt>
movsd  0x8(%rsp),%xmm0
call   1030 <volumenEsfera@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%.2e \0A\00"
@.str.1 = [7 x i8] c"%.2f \0A\00"
@.str.2 = [7 x i8] c"%.3f \0A\00"
@.str.3 = [20 x i8] c"Ingrese un radio: \0A\00"
@.str.4 = [4 x i8] c"%lf\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @factorial(i32 150)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call double @areaRectangulo(double 2.500000e+00, double 2.100000e+00)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = call double @volumenEsfera(double 1.525000e+01)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %2)
%11 = load double, double* %2
%12 = call double @volumenEsfera(double %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%.2e \0A\00"
@.str.1 = [7 x i8] c"%.2f \0A\00"
@.str.2 = [7 x i8] c"%.3f \0A\00"
@.str.4 = [4 x i8] c"%lf\00"
@str = [19 x i8] c"Ingrese un radio: \00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call double @factorial(i32 150)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call double @areaRectangulo(double 2.500000e+00, double 2.100000e+00)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = tail call double @volumenEsfera(double 1.525000e+01)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %1)
%11 = load double, double* %1
%12 = call double @volumenEsfera(double %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}