#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 cdfStudent(long, double);
double fabs(double);
double pdfStudent(long, double);
double idfStudent(long n, double u) {
  double t, x = 0.0;
  do {
    t = x;
    x = t + (u - cdfStudent(n, t)) / pdfStudent(n, t);
  } while (fabs(x - t) >= 1.0e-10);
  return (x);
}


x86 assembly (clang, -O0):
<idfStudent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   1030 <cdfStudent@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
call   1040 <pdfStudent@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movaps 0xe61(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
ucomisd %xmm1,%xmm0
jae    1139 <idfStudent+0x19>
movsd  -0x20(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idfStudent>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%rbx
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  %xmm1,0x8(%rsp)
mov    %rbx,%rdi
movapd %xmm1,%xmm0
call   1030 <cdfStudent@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
call   1040 <pdfStudent@plt>
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm2
addsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
andpd  0xe6c(%rip),%xmm0
ucomisd 0xe74(%rip),%xmm0
jae    1140 <idfStudent+0x20>
movapd %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @idfStudent(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
store double 0.000000e+00, double* %6
br label %7
7: ; preds = %20, %2
%8 = load double, double* %6
store double %8, double* %5
%9 = load double, double* %5
%10 = load double, double* %4
%11 = load i64, i64* %3
%12 = load double, double* %5
%13 = call double @cdfStudent(i64 %11, double %12)
%14 = fsub double %10, %13
%15 = load i64, i64* %3
%16 = load double, double* %5
%17 = call double @pdfStudent(i64 %15, double %16)
%18 = fdiv double %14, %17
%19 = fadd double %9, %18
store double %19, double* %6
br label %20
20: ; preds = %7
%21 = load double, double* %6
%22 = load double, double* %5
%23 = fsub double %21, %22
%24 = call double @llvm.fabs.f64(double %23)
%25 = fcmp oge double %24, 1.000000e-10
br i1 %25, label %7, label %26
26: ; preds = %20
%27 = load double, double* %6
ret double %27
}

LLVM IR (-O2):
define double @idfStudent(i64 %0, double %1) {
br label %3
3: ; preds = %3, %2
%4 = phi double [ 0.000000e+00, %2 ], [ %9, %3 ]
%5 = tail call double @cdfStudent(i64 %0, double %4)
%6 = fsub double %1, %5
%7 = tail call double @pdfStudent(i64 %0, double %4)
%8 = fdiv double %6, %7
%9 = fadd double %4, %8
%10 = fsub double %9, %4
%11 = tail call double @llvm.fabs.f64(double %10)
%12 = fcmp ult double %11, 1.000000e-10
br i1 %12, label %13, label %3
13: ; preds = %3
ret double %9
}