#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 fdistribution(double, int, int);
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printf(char *, double, double);
main() {
  int n;
  for (n = 1; n < 6; n++) {
    printf("\nfdistribution(%4.2f,2,3)=%e", 1.5 * n,
           fdistribution(1.5 * n, 2, 3));
  }
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
jge    11a8 <main+0x78>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xe8d(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
mov    $0x0,%al
call   1050 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
lea    0xed6(%rip),%rbx
mov    %rbx,%rdi
movsd  0xea3(%rip),%xmm0
call   1040 <printf@plt>
movsd  0xe9e(%rip),%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe81(%rip),%xmm0
call   1040 <printf@plt>
movsd  0xe7c(%rip),%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe5f(%rip),%xmm0
call   1040 <printf@plt>
movsd  0xe5a(%rip),%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe3d(%rip),%xmm0
call   1040 <printf@plt>
movsd  0xe38(%rip),%xmm0
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <fdistribution@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movsd  0xe1b(%rip),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getch@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\0Afdistribution(%4.2f,2,3)=%e\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 6
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to double
%9 = fmul double 1.500000e+00, %8
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to double
%12 = fmul double 1.500000e+00, %11
%13 = call double @fdistribution(double %12, i32 2, i32 3)
%14 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %9, double %13)
br label %15
15: ; preds = %6
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %3
18: ; preds = %3
%19 = call i32 (...) @getch()
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0Afdistribution(%4.2f,2,3)=%e\00"
define i32 @main() {
%1 = tail call double @fdistribution(double 1.500000e+00, i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 1.500000e+00, double %1)
%3 = tail call double @fdistribution(double 3.000000e+00, i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double %3)
%5 = tail call double @fdistribution(double 4.500000e+00, i32 2, i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 4.500000e+00, double %5)
%7 = tail call double @fdistribution(double 6.000000e+00, i32 2, i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 6.000000e+00, double %7)
%9 = tail call double @fdistribution(double 7.500000e+00, i32 2, i32 3)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double 7.500000e+00, double %9)
%11 = tail call i32 (...) @getch()
ret i32 0
}