#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 const *, double const *, double *,
                                 double *, double *, double *);
void cdflib_cumbin(const double *s, const double *xn, const double *pr,
                   const double *ompr, double *cum, double *ccum) {
  double T1, T2;
  if (*s < *xn) {
    T1 = *s + 1.0;
    T2 = *xn - *s;
    cdflib_cumbet(pr, ompr, &T1, &T2, ccum, cum);
  } else {
    *cum = 1.0;
    *ccum = 0.0;
  }
  return;
}


x86 assembly (clang, -O0):
<cdflib_cumbin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1196 <cdflib_cumbin+0x86>
mov    -0x8(%rbp),%rax
movsd  0xeaa(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%r8
mov    -0x28(%rbp),%r9
lea    -0x38(%rbp),%rdx
lea    -0x40(%rbp),%rcx
call   1030 <cdflib_cumbet@plt>
jmp    11b1 <cdflib_cumbin+0xa1>
mov    -0x28(%rbp),%rax
movsd  0xe5e(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_cumbin>:
sub    $0x18,%rsp
mov    %r8,%rax
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
ucomisd %xmm0,%xmm1
jbe    1163 <cdflib_cumbin+0x53>
subsd  %xmm0,%xmm1
addsd  0xecf(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%r8
lea    0x8(%rsp),%r10
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %r8,%rdx
mov    %r10,%rcx
mov    %r9,%r8
mov    %rax,%r9
call   1030 <cdflib_cumbet@plt>
add    $0x18,%rsp
ret
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax)
movq   $0x0,(%r9)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @cdflib_cumbin(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%15 = load double*, double** %7
%16 = load double, double* %15
%17 = load double*, double** %8
%18 = load double, double* %17
%19 = fcmp olt double %16, %18
br i1 %19, label %20, label %34
20: ; preds = %6
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fadd double %22, 1.000000e+00
store double %23, double* %13
%24 = load double*, double** %8
%25 = load double, double* %24
%26 = load double*, double** %7
%27 = load double, double* %26
%28 = fsub double %25, %27
store double %28, double* %14
%29 = load double*, double** %9
%30 = load double*, double** %10
%31 = load double*, double** %12
%32 = load double*, double** %11
%33 = call i32 @cdflib_cumbet(double* %29, double* %30, double* %13, double* %14, double* %31, double* %32)
br label %37
34: ; preds = %6
%35 = load double*, double** %11
store double 1.000000e+00, double* %35
%36 = load double*, double** %12
store double 0.000000e+00, double* %36
br label %37
37: ; preds = %34, %20
ret void
}

LLVM IR (-O2):
define void @cdflib_cumbin(double* nocapture %0, double* nocapture %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %7 to i8*
%10 = bitcast double* %8 to i8*
%11 = load double, double* %0
%12 = load double, double* %1
%13 = fcmp olt double %11, %12
br i1 %13, label %14, label %18
14: ; preds = %6
%15 = fadd double %11, 1.000000e+00
store double %15, double* %7
%16 = fsub double %12, %11
store double %16, double* %8
%17 = call i32 @cdflib_cumbet(double* %2, double* %3, double* %7, double* %8, double* %5, double* %4)
br label %19
18: ; preds = %6
store double 1.000000e+00, double* %4
store double 0.000000e+00, double* %5
br label %19
19: ; preds = %18, %14
ret void
}