#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 */
float cauchy(double);
float gumbel(int /*<<< orphan*/, double, double);
float laplace(double, double, double);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ system(char *);
void main() {
  float x, y, z;
  x = cauchy(-2.0);
  y = gumbel(0, 0.5, 2.0);
  z = laplace(-6.0, -5.0, 4.0);
  printf("\n cauchy para x = -2 : %f \n", x);
  printf("\n gumbel para x= 0 , mu = 0.5 e beta = 2 : %f \n", y);
  printf("\n laplace para x = -6, mu = -5 e beta = 4 : %f \n", z);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xec8(%rip),%xmm0
call   1060 <cauchy@plt>
movss  %xmm0,-0x4(%rbp)
xor    %edi,%edi
movsd  0xea4(%rip),%xmm0
movsd  0xea4(%rip),%xmm1
call   1070 <gumbel@plt>
movss  %xmm0,-0x8(%rbp)
movsd  0xe72(%rip),%xmm0
movsd  0xe72(%rip),%xmm1
movsd  0xe72(%rip),%xmm2
call   1030 <laplace@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
call   1050 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xe87(%rip),%rdi
call   1050 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1050 <printf@plt>
lea    0xecb(%rip),%rdi
call   1040 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movsd  0xea4(%rip),%xmm0
call   1060 <cauchy@plt>
movss  %xmm0,0x14(%rsp)
movsd  0xe99(%rip),%xmm0
movsd  0xe99(%rip),%xmm1
xor    %edi,%edi
call   1070 <gumbel@plt>
movss  %xmm0,0x10(%rsp)
movsd  0xe8c(%rip),%xmm0
movsd  0xe8c(%rip),%xmm1
movsd  0xe8c(%rip),%xmm2
call   1030 <laplace@plt>
movss  %xmm0,0xc(%rsp)
lea    0xe82(%rip),%rdi
movss  0x14(%rsp),%xmm0
call   1050 <printf@plt>
lea    0xe8c(%rip),%rdi
movss  0x10(%rsp),%xmm0
call   1050 <printf@plt>
lea    0xeaa(%rip),%rdi
movss  0xc(%rsp),%xmm0
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
add    $0x18,%rsp
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0A cauchy para x = -2 : %f \0A\00"
@.str.1 = [48 x i8] c"\0A gumbel para x= 0 , mu = 0.5 e beta = 2 : %f \0A\00"
@.str.2 = [49 x i8] c"\0A laplace para x = -6, mu = -5 e beta = 4 : %f \0A\00"
@.str.3 = [6 x i8] c"pause\00"
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call float @cauchy(double -2.000000e+00)
store float %4, float* %1
%5 = call float @gumbel(i32 0, double 5.000000e-01, double 2.000000e+00)
store float %5, float* %2
%6 = call float @laplace(double -6.000000e+00, double -5.000000e+00, double 4.000000e+00)
store float %6, float* %3
%7 = load float, float* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float, float* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), float %9)
%11 = load float, float* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), float %11)
%13 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A cauchy para x = -2 : %f \0A\00"
@.str.1 = [48 x i8] c"\0A gumbel para x= 0 , mu = 0.5 e beta = 2 : %f \0A\00"
@.str.2 = [49 x i8] c"\0A laplace para x = -6, mu = -5 e beta = 4 : %f \0A\00"
@.str.3 = [6 x i8] c"pause\00"
define void @main() {
%1 = tail call float @cauchy(double -2.000000e+00)
%2 = tail call float @gumbel(i32 0, double 5.000000e-01, double 2.000000e+00)
%3 = tail call float @laplace(double -6.000000e+00, double -5.000000e+00, double 4.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), float %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), float %2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), float %3)
%7 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}