#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*/ beta_cdf_inv_int_(double *, double *, double *, double *);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double result[1];
  double x[] = {0.7};
  double p[] = {2.0};
  double q[] = {3.0};
  beta_cdf_inv_int_(x, p, q, result);
  printf("Inv. Beta: %.4f\n", result[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <beta_cdf_inv_int_@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movabs $0x3fe6666666666666,%rax
66 e6 3f
mov    %rax,0x18(%rsp)
movabs $0x4000000000000000,%rax
mov    %rax,0x10(%rsp)
movabs $0x4008000000000000,%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x20(%rsp),%rcx
call   1040 <beta_cdf_inv_int_@plt>
movsd  0x20(%rsp),%xmm0
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [1 x double] [double 0x3FE6666666666666]
@__const.main.p = [1 x double] [double 2.000000e+00]
@__const.main.q = [1 x double] [double 3.000000e+00]
@.str = [17 x i8] c"Inv. Beta: %.4f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x double]
%3 = alloca [1 x double]
%4 = alloca [1 x double]
%5 = alloca [1 x double]
store i32 0, i32* %1
%6 = bitcast [1 x double]* %3 to i8*
%7 = bitcast [1 x double]* %4 to i8*
%8 = bitcast [1 x double]* %5 to i8*
%9 = getelementptr inbounds [1 x double], [1 x double]* %3, i64 0, i64 0
%10 = getelementptr inbounds [1 x double], [1 x double]* %4, i64 0, i64 0
%11 = getelementptr inbounds [1 x double], [1 x double]* %5, i64 0, i64 0
%12 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%13 = call i32 @beta_cdf_inv_int_(double* %9, double* %10, double* %11, double* %12)
%14 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%15 = load double, double* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Inv. Beta: %.4f\0A\00"
define i32 @main() {
%1 = alloca [1 x double]
%2 = alloca [1 x double]
%3 = alloca [1 x double]
%4 = alloca [1 x double]
%5 = bitcast [1 x double]* %1 to i8*
%6 = bitcast [1 x double]* %2 to i8*
%7 = bitcast [1 x double]* %2 to i64*
store i64 4604480259023595110, i64* %7
%8 = bitcast [1 x double]* %3 to i8*
%9 = bitcast [1 x double]* %3 to i64*
store i64 4611686018427387904, i64* %9
%10 = bitcast [1 x double]* %4 to i8*
%11 = bitcast [1 x double]* %4 to i64*
store i64 4613937818241073152, i64* %11
%12 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%13 = getelementptr inbounds [1 x double], [1 x double]* %3, i64 0, i64 0
%14 = getelementptr inbounds [1 x double], [1 x double]* %4, i64 0, i64 0
%15 = getelementptr inbounds [1 x double], [1 x double]* %1, i64 0, i64 0
%16 = call i32 @beta_cdf_inv_int_(double* %12, double* %13, double* %14, double* %15)
%17 = load double, double* %15
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %17)
ret i32 0
}