#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 fabs(double const);
double poz(const double z) {
  double y, x, w;
  if (z == 0.0) {
    x = 0.0;
  } else {
    y = 0.5 * fabs(z);
    if (y >= (6.0 * 0.5)) {
      x = 1.0;
    } else if (y < 1.0) {
      w = y * y;
      x = ((((((((0.000124818987 * w - 0.001075204047) * w + 0.005198775019) *
                    w -
                0.019198292004) *
                   w +
               0.059054035642) *
                  w -
              0.151968751364) *
                 w +
             0.319152932694) *
                w -
            0.531923007300) *
               w +
           0.797884560593) *
          y * 2.0;
    } else {
      y -= 2.0;
      x = (((((((((((((-0.000045255659 * y + 0.000152529290) * y -
                      0.000019538132) *
                         y -
                     0.000676904986) *
                        y +
                    0.001390604284) *
                       y -
                   0.000794620820) *
                      y -
                  0.002034254874) *
                     y +
                 0.006549791214) *
                    y -
                0.010557625006) *
                   y +
               0.011630447319) *
                  y -
              0.009279453341) *
                 y +
             0.005353579108) *
                y -
            0.002141268741) *
               y +
           0.000535310849) *
              y +
          0.999936657524;
    }
  }
  return (z > 0.0 ? ((x + 1.0) * 0.5) : ((1.0 - x) * 0.5));
}


x86 assembly (clang, -O0):
<poz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    112e <poz+0x2e>
jp     112e <poz+0x2e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    13b8 <poz+0x2b8>
movsd  -0x8(%rbp),%xmm1
movaps 0xfa6(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xec2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1178 <poz+0x78>
movsd  0xea2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    13b3 <poz+0x2b3>
movsd  0xe90(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1265 <poz+0x165>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xf29(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf25(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf00(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe52(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe39(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    13ae <poz+0x2ae>
movsd  -0x10(%rbp),%xmm0
movsd  0xe1e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf4(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdcf(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdb2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd95(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd78(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd5b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd3e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd21(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd04(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xce7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcca(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcad(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc90(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc73(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    13b3 <poz+0x2b3>
jmp    13b8 <poz+0x2b8>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13ed <poz+0x2ed>
movsd  0xc3e(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xc29(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    140b <poz+0x30b>
movsd  0xc1b(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xc06(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<poz>:
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
xorpd  %xmm2,%xmm2
jne    1118 <poz+0x18>
jnp    127d <poz+0x17d>
movapd 0xee0(%rip),%xmm3
andpd  %xmm1,%xmm3
mulsd  0xef4(%rip),%xmm3
movsd  0xef4(%rip),%xmm2
ucomisd 0xef4(%rip),%xmm3
jae    127d <poz+0x17d>
ucomisd %xmm3,%xmm2
jbe    11c5 <poz+0xc5>
movapd %xmm3,%xmm4
mulsd  %xmm3,%xmm4
movsd  0xf60(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf5c(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf58(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf54(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf50(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf4c(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf48(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf44(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xf40(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm2,%xmm2
jmp    127d <poz+0x17d>
addsd  0xe6b(%rip),%xmm3
movsd  0xe6b(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe67(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe63(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe5f(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe5b(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe57(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe53(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe4f(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe4b(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe47(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe43(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe3f(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe3b(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe37(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xe33(%rip),%xmm2
movapd 0xd8b(%rip),%xmm3
xorpd  %xmm2,%xmm3
cmpltsd %xmm1,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm3,%xmm0
orpd   %xmm2,%xmm0
addsd  0xd86(%rip),%xmm0
mulsd  0xd76(%rip),%xmm0
ret

LLVM IR (-O0):
define double @poz(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %1
store double 0.000000e+00, double* %4
br label %75
9: ; preds = %1
%10 = load double, double* %2
%11 = call double @llvm.fabs.f64(double %10)
%12 = fmul double 5.000000e-01, %11
store double %12, double* %3
%13 = load double, double* %3
%14 = fcmp oge double %13, 3.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %9
store double 1.000000e+00, double* %4
br label %74
16: ; preds = %9
%17 = load double, double* %3
%18 = fcmp olt double %17, 1.000000e+00
br i1 %18, label %19, label %42
19: ; preds = %16
%20 = load double, double* %3
%21 = load double, double* %3
%22 = fmul double %20, %21
store double %22, double* %5
%23 = load double, double* %5
%24 = call double @llvm.fmuladd.f64(double 0x3F205C3AEF25BECF, double %23, double 0xBF519DBB8DFA21CC)
%25 = load double, double* %5
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0x3F754B4F8AF94F71)
%27 = load double, double* %5
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double 0xBF93A8B7912F5918)
%29 = load double, double* %5
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 0x3FAE3C549F8EF466)
%31 = load double, double* %5
%32 = call double @llvm.fmuladd.f64(double %30, double %31, double 0xBFC373B6488FA8B0)
%33 = load double, double* %5
%34 = call double @llvm.fmuladd.f64(double %32, double %33, double 0x3FD46D006C15F74E)
%35 = load double, double* %5
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 0xBFE10583660AFDB3)
%37 = load double, double* %5
%38 = call double @llvm.fmuladd.f64(double %36, double %37, double 0x3FE9884533B75E55)
%39 = load double, double* %3
%40 = fmul double %38, %39
%41 = fmul double %40, 2.000000e+00
store double %41, double* %4
br label %73
42: ; preds = %16
%43 = load double, double* %3
%44 = fsub double %43, 2.000000e+00
store double %44, double* %3
%45 = load double, double* %3
%46 = call double @llvm.fmuladd.f64(double 0xBF07BA1C9A586733, double %45, double 0x3F23FE089FDCE2C3)
%47 = load double, double* %3
%48 = call double @llvm.fmuladd.f64(double %46, double %47, double 0xBEF47CBA351AB72F)
%49 = load double, double* %3
%50 = call double @llvm.fmuladd.f64(double %48, double %49, double 0xBF462E4A6380D6A6)
%51 = load double, double* %3
%52 = call double @llvm.fmuladd.f64(double %50, double %51, double 0x3F56C89DFAF928DD)
%53 = load double, double* %3
%54 = call double @llvm.fmuladd.f64(double %52, double %53, double 0xBF4A09C337A1A6B4)
%55 = load double, double* %3
%56 = call double @llvm.fmuladd.f64(double %54, double %55, double 0xBF60AA2444FA5608)
%57 = load double, double* %3
%58 = call double @llvm.fmuladd.f64(double %56, double %57, double 0x3F7AD3F430F4C4F3)
%59 = load double, double* %3
%60 = call double @llvm.fmuladd.f64(double %58, double %59, double 0xBF859F3C70FE5D84)
%61 = load double, double* %3
%62 = call double @llvm.fmuladd.f64(double %60, double %61, double 0x3F87D1B436FBD04B)
%63 = load double, double* %3
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double 0xBF83011B24FEACC1)
%65 = load double, double* %3
%66 = call double @llvm.fmuladd.f64(double %64, double %65, double 0x3F75EDA272F76F46)
%67 = load double, double* %3
%68 = call double @llvm.fmuladd.f64(double %66, double %67, double 0xBF618A90E6DD8762)
%69 = load double, double* %3
%70 = call double @llvm.fmuladd.f64(double %68, double %69, double 0x3F418A834B799E45)
%71 = load double, double* %3
%72 = call double @llvm.fmuladd.f64(double %70, double %71, double 0x3FEFFF7B29446363)
store double %72, double* %4
br label %73
73: ; preds = %42, %19
br label %74
74: ; preds = %73, %15
br label %75
75: ; preds = %74, %8
%76 = load double, double* %2
%77 = fcmp ogt double %76, 0.000000e+00
br i1 %77, label %78, label %82
78: ; preds = %75
%79 = load double, double* %4
%80 = fadd double %79, 1.000000e+00
%81 = fmul double %80, 5.000000e-01
br label %86
82: ; preds = %75
%83 = load double, double* %4
%84 = fsub double 1.000000e+00, %83
%85 = fmul double %84, 5.000000e-01
br label %86
86: ; preds = %82, %78
%87 = phi double [ %81, %78 ], [ %85, %82 ]
ret double %87
}

LLVM IR (-O2):
define double @poz(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %37, label %3
3: ; preds = %1
%4 = tail call double @llvm.fabs.f64(double %0)
%5 = fmul double %4, 5.000000e-01
%6 = fcmp ult double %5, 3.000000e+00
br i1 %6, label %7, label %37
7: ; preds = %3
%8 = fcmp olt double %5, 1.000000e+00
br i1 %8, label %9, label %21
9: ; preds = %7
%10 = fmul double %5, %5
%11 = tail call double @llvm.fmuladd.f64(double %10, double 0x3F205C3AEF25BECF, double 0xBF519DBB8DFA21CC)
%12 = tail call double @llvm.fmuladd.f64(double %11, double %10, double 0x3F754B4F8AF94F71)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %10, double 0xBF93A8B7912F5918)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %10, double 0x3FAE3C549F8EF466)
%15 = tail call double @llvm.fmuladd.f64(double %14, double %10, double 0xBFC373B6488FA8B0)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %10, double 0x3FD46D006C15F74E)
%17 = tail call double @llvm.fmuladd.f64(double %16, double %10, double 0xBFE10583660AFDB3)
%18 = tail call double @llvm.fmuladd.f64(double %17, double %10, double 0x3FE9884533B75E55)
%19 = fmul double %5, %18
%20 = fmul double %19, 2.000000e+00
br label %37
21: ; preds = %7
%22 = fadd double %5, -2.000000e+00
%23 = tail call double @llvm.fmuladd.f64(double %22, double 0xBF07BA1C9A586733, double 0x3F23FE089FDCE2C3)
%24 = tail call double @llvm.fmuladd.f64(double %23, double %22, double 0xBEF47CBA351AB72F)
%25 = tail call double @llvm.fmuladd.f64(double %24, double %22, double 0xBF462E4A6380D6A6)
%26 = tail call double @llvm.fmuladd.f64(double %25, double %22, double 0x3F56C89DFAF928DD)
%27 = tail call double @llvm.fmuladd.f64(double %26, double %22, double 0xBF4A09C337A1A6B4)
%28 = tail call double @llvm.fmuladd.f64(double %27, double %22, double 0xBF60AA2444FA5608)
%29 = tail call double @llvm.fmuladd.f64(double %28, double %22, double 0x3F7AD3F430F4C4F3)
%30 = tail call double @llvm.fmuladd.f64(double %29, double %22, double 0xBF859F3C70FE5D84)
%31 = tail call double @llvm.fmuladd.f64(double %30, double %22, double 0x3F87D1B436FBD04B)
%32 = tail call double @llvm.fmuladd.f64(double %31, double %22, double 0xBF83011B24FEACC1)
%33 = tail call double @llvm.fmuladd.f64(double %32, double %22, double 0x3F75EDA272F76F46)
%34 = tail call double @llvm.fmuladd.f64(double %33, double %22, double 0xBF618A90E6DD8762)
%35 = tail call double @llvm.fmuladd.f64(double %34, double %22, double 0x3F418A834B799E45)
%36 = tail call double @llvm.fmuladd.f64(double %35, double %22, double 0x3FEFFF7B29446363)
br label %37
37: ; preds = %3, %1, %21, %9
%38 = phi double [ %20, %9 ], [ %36, %21 ], [ 0.000000e+00, %1 ], [ 1.000000e+00, %3 ]
%39 = fcmp ogt double %0, 0.000000e+00
%40 = fneg double %38
%41 = select i1 %39, double %38, double %40
%42 = fadd double %41, 1.000000e+00
%43 = fmul double %42, 5.000000e-01
ret double %43
}