#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 PDF_0(double);
double CDF(double x, double mu, double sigma) {
  double t;
  x -= mu;
  x /= sigma;
  if (x < 0)
    return 1 - CDF(-x, 0, 1);
  t = 1 / (1 + 0.2316419 * x);
  return 1 -
         PDF_0(x) *
             (0.319381530 * t + -0.356563782 * t * t + 1.781477937 * t * t * t +
              -1.821255978 * t * t * t * t + 1.330274429 * t * t * t * t * t);
}


x86 assembly (clang, -O0):
<CDF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11b0 <CDF+0x90>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
xorps  %xmm1,%xmm1
movsd  0xe6e(%rip),%xmm2
call   1040 <CDF@plt>
movaps %xmm0,%xmm1
movsd  0xe5e(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    12a7 <CDF+0x187>
movsd  -0x10(%rbp),%xmm1
movsd  0xe73(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe37(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe2b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <PDF_0@plt>
movsd  -0x28(%rbp),%xmm2
movsd  0xe33(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  0xe19(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xe01(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xdda(%rip),%xmm2
mulsd  -0x28(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
mulsd  -0x28(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xdae(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd62(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDF>:
push   %rax
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    115e <CDF+0x3e>
xorpd  0xf05(%rip),%xmm0
movsd  0xec5(%rip),%xmm2
xorpd  %xmm1,%xmm1
call   1040 <CDF@plt>
movsd  0xeb4(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret
movsd  0xe9a(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe96(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
call   1030 <PDF_0@plt>
movsd  0xe84(%rip),%xmm1
movsd  (%rsp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movsd  0xe77(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xe6f(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe5f(%rip),%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xe4b(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xdff(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @CDF(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%9 = load double, double* %6
%10 = load double, double* %5
%11 = fsub double %10, %9
store double %11, double* %5
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fdiv double %13, %12
store double %14, double* %5
%15 = load double, double* %5
%16 = fcmp olt double %15, 0.000000e+00
br i1 %16, label %17, label %22
17: ; preds = %3
%18 = load double, double* %5
%19 = fneg double %18
%20 = call double @CDF(double %19, double 0.000000e+00, double 1.000000e+00)
%21 = fsub double 1.000000e+00, %20
store double %21, double* %4
br label %60
22: ; preds = %3
%23 = load double, double* %5
%24 = call double @llvm.fmuladd.f64(double 0x3FCDA6711871100E, double %23, double 1.000000e+00)
%25 = fdiv double 1.000000e+00, %24
store double %25, double* %8
%26 = load double, double* %5
%27 = call double @PDF_0(double %26)
%28 = load double, double* %8
%29 = load double, double* %8
%30 = fmul double 0xBFD6D1F0E5A8325B, %29
%31 = load double, double* %8
%32 = fmul double %30, %31
%33 = call double @llvm.fmuladd.f64(double 0x3FD470BF3A92F8EC, double %28, double %32)
%34 = load double, double* %8
%35 = fmul double 0x3FFC80EF025F5E68, %34
%36 = load double, double* %8
%37 = fmul double %35, %36
%38 = load double, double* %8
%39 = call double @llvm.fmuladd.f64(double %37, double %38, double %33)
%40 = load double, double* %8
%41 = fmul double 0xBFFD23DD4EF278D0, %40
%42 = load double, double* %8
%43 = fmul double %41, %42
%44 = load double, double* %8
%45 = fmul double %43, %44
%46 = load double, double* %8
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %39)
%48 = load double, double* %8
%49 = fmul double 0x3FF548CDD6F42943, %48
%50 = load double, double* %8
%51 = fmul double %49, %50
%52 = load double, double* %8
%53 = fmul double %51, %52
%54 = load double, double* %8
%55 = fmul double %53, %54
%56 = load double, double* %8
%57 = call double @llvm.fmuladd.f64(double %55, double %56, double %47)
%58 = fneg double %27
%59 = call double @llvm.fmuladd.f64(double %58, double %57, double 1.000000e+00)
store double %59, double* %4
br label %60
60: ; preds = %22, %17
%61 = load double, double* %4
ret double %61
}

LLVM IR (-O2):
define double @CDF(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = fdiv double %4, %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %9, label %13
7: ; preds = %13, %9
%8 = phi double [ %12, %9 ], [ %33, %13 ]
ret double %8
9: ; preds = %3
%10 = fneg double %5
%11 = tail call double @CDF(double %10, double 0.000000e+00, double 1.000000e+00)
%12 = fsub double 1.000000e+00, %11
br label %7
13: ; preds = %3
%14 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FCDA6711871100E, double 1.000000e+00)
%15 = fdiv double 1.000000e+00, %14
%16 = tail call double @PDF_0(double %5)
%17 = fmul double %15, 0xBFD6D1F0E5A8325B
%18 = fmul double %15, %17
%19 = tail call double @llvm.fmuladd.f64(double %15, double 0x3FD470BF3A92F8EC, double %18)
%20 = fmul double %15, 0x3FFC80EF025F5E68
%21 = fmul double %15, %20
%22 = tail call double @llvm.fmuladd.f64(double %21, double %15, double %19)
%23 = fmul double %15, 0xBFFD23DD4EF278D0
%24 = fmul double %15, %23
%25 = fmul double %15, %24
%26 = tail call double @llvm.fmuladd.f64(double %25, double %15, double %22)
%27 = fmul double %15, 0x3FF548CDD6F42943
%28 = fmul double %15, %27
%29 = fmul double %15, %28
%30 = fmul double %15, %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %15, double %26)
%32 = fneg double %16
%33 = tail call double @llvm.fmuladd.f64(double %32, double %31, double 1.000000e+00)
br label %7
}