#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*/ cdflib_cumbet(double *, double *, double *, double *,
                                 double *, double *);
void cdflib_cumt(const double *t, const double *df, double *cum, double *ccum) {
  double a;
  double dfptt;
  double K2 = 0.5e0;
  double oma;
  double T1;
  double tt;
  double xx;
  double yy;
  tt = (*t) * (*t);
  dfptt = (*df) + tt;
  xx = *df / dfptt;
  yy = tt / dfptt;
  T1 = 0.5e0 * (*df);
  cdflib_cumbet(&xx, &yy, &T1, &K2, &a, &oma);
  if (*t <= 0.0e0) {
    *cum = 0.5e0 * a;
    *ccum = oma + (*cum);
  } else {
    *ccum = 0.5e0 * a;
    *cum = oma + (*ccum);
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_cumt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  0xed0(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xe77(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    -0x58(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x48(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x40(%rbp),%r9
call   1030 <cdflib_cumbet@plt>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jb     11ef <cdflib_cumt+0xdf>
movsd  0xe38(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1219 <cdflib_cumt+0x109>
movsd  0xe09(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_cumt>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rdi,%r15
movabs $0x3fe0000000000000,%rax
mov    %rax,0x20(%rsp)
movsd  (%rdi),%xmm0
mulsd  %xmm0,%xmm0
movsd  (%rsi),%xmm1
movapd %xmm1,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
movsd  %xmm3,0x8(%rsp)
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe9c(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x18(%rsp),%r9
call   1030 <cdflib_cumbet@plt>
xorpd  %xmm0,%xmm0
ucomisd (%r15),%xmm0
movsd  0xe64(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
mov    %r14,%rax
cmovb  %rbx,%rax
cmovb  %r14,%rbx
movsd  %xmm0,(%rax)
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @cdflib_cumt(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store double 5.000000e-01, double* %11
%17 = load double*, double** %5
%18 = load double, double* %17
%19 = load double*, double** %5
%20 = load double, double* %19
%21 = fmul double %18, %20
store double %21, double* %14
%22 = load double*, double** %6
%23 = load double, double* %22
%24 = load double, double* %14
%25 = fadd double %23, %24
store double %25, double* %10
%26 = load double*, double** %6
%27 = load double, double* %26
%28 = load double, double* %10
%29 = fdiv double %27, %28
store double %29, double* %15
%30 = load double, double* %14
%31 = load double, double* %10
%32 = fdiv double %30, %31
store double %32, double* %16
%33 = load double*, double** %6
%34 = load double, double* %33
%35 = fmul double 5.000000e-01, %34
store double %35, double* %13
%36 = call i32 @cdflib_cumbet(double* %15, double* %16, double* %13, double* %11, double* %9, double* %12)
%37 = load double*, double** %5
%38 = load double, double* %37
%39 = fcmp ole double %38, 0.000000e+00
br i1 %39, label %40, label %49
40: ; preds = %4
%41 = load double, double* %9
%42 = fmul double 5.000000e-01, %41
%43 = load double*, double** %7
store double %42, double* %43
%44 = load double, double* %12
%45 = load double*, double** %7
%46 = load double, double* %45
%47 = fadd double %44, %46
%48 = load double*, double** %8
store double %47, double* %48
br label %58
49: ; preds = %4
%50 = load double, double* %9
%51 = fmul double 5.000000e-01, %50
%52 = load double*, double** %8
store double %51, double* %52
%53 = load double, double* %12
%54 = load double*, double** %8
%55 = load double, double* %54
%56 = fadd double %53, %55
%57 = load double*, double** %7
store double %56, double* %57
br label %58
58: ; preds = %49, %40
ret void
}

LLVM IR (-O2):
define void @cdflib_cumt(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = bitcast double* %5 to i8*
%12 = bitcast double* %6 to i8*
store double 5.000000e-01, double* %6
%13 = bitcast double* %7 to i8*
%14 = bitcast double* %8 to i8*
%15 = bitcast double* %9 to i8*
%16 = bitcast double* %10 to i8*
%17 = load double, double* %0
%18 = fmul double %17, %17
%19 = load double, double* %1
%20 = fadd double %19, %18
%21 = fdiv double %19, %20
store double %21, double* %9
%22 = fdiv double %18, %20
store double %22, double* %10
%23 = fmul double %19, 5.000000e-01
store double %23, double* %8
%24 = call i32 @cdflib_cumbet(double* %9, double* %10, double* %8, double* %6, double* %5, double* %7)
%25 = load double, double* %0
%26 = fcmp ugt double %25, 0.000000e+00
%27 = load double, double* %5
%28 = fmul double %27, 5.000000e-01
%29 = select i1 %26, double* %3, double* %2
%30 = select i1 %26, double* %2, double* %3
store double %28, double* %29
%31 = load double, double* %7
%32 = fadd double %28, %31
store double %32, double* %30
ret void
}