// File: /workspace/github_c_makefile_star2_O2/jsh58[P]Genrich/Genrich.c
// Function: pnorm
double pnorm(double x) {
  double a[5] = {
    2.2352520354606839287,
    161.02823106855587881,
    1067.6894854603709582,
    18154.981253343561249,
    0.065682337918207449113
  };
  double b[4] = {
    47.20258190468824187,
    976.09855173777669322,
    10260.932208618978205,
    45507.789335026729956
  };
  double c[9] = {
    0.39894151208813466764,
    8.8831497943883759412,
    93.506656132177855979,
    597.27027639480026226,
    2494.5375852903726711,
    6848.1904505362823326,
    11602.651437647350124,
    9842.7148383839780218,
    1.0765576773720192317e-8
  };
  double d[8] = {
    22.266688044328115691,
    235.38790178262499861,
    1519.377599407554805,
    6485.558298266760755,
    18615.571640885098091,
    34900.952721145977266,
    38912.003286093271411,
    19685.429676859990727
  };
  double p[6] = {
    0.21589853405795699,
    0.1274011611602473639,
    0.022235277870649807,
    0.001421619193227893466,
    2.9112874951168792e-5,
    0.02307344176494017303
  };
  double q[5] = {
    1.28426009614491121,
    0.468238212480865118,
    0.0659881378689285515,
    0.00378239633202758244,
    7.29751555083966205e-5
  };

  double xden, xnum, xsq, temp;
  double y = fabs(x);
  if (y <= 0.67448975) {

    // small values of fabs(x)
    if (y > DBL_EPSILON * 0.5) {
      xsq = x * x;
      xnum = a[4] * xsq;
      xden = xsq;
      for (int i = 0; i < 3; i++) {
        xnum = (xnum + a[i]) * xsq;
        xden = (xden + b[i]) * xsq;
      }
      temp = x * (xnum + a[3]) / (xden + b[3]);
    } else
      temp = x * a[3] / b[3];
    return log(0.5 - temp);

  } else if (y <= sqrt(32.0)) {

    // slightly larger values of fabs(x)
    xnum = c[8] * y;
    xden = y;
    for (int i = 0; i < 7; i++) {
      xnum = (xnum + c[i]) * y;
      xden = (xden + d[i]) * y;
    }
    temp = (xnum + c[7]) / (xden + d[7]);
    return do_del(y, temp, x <= 0.0);

  } else if (y < 1e170) {

    // even larger values of fabs(x)
    xsq = 1.0 / (x * x);
    xnum = p[5] * xsq;
    xden = xsq;
    for (int i = 0; i < 4; i++) {
      xnum = (xnum + p[i]) * xsq;
      xden = (xden + q[i]) * xsq;
    }
    temp = xsq * (xnum + p[4]) / (xden + q[4]);
    temp = (1/sqrt(2*M_PI) - temp) / y;
    return do_del(x, temp, x <= 0.0);
  }

  // default
  return -0.0;
}

// Assembly:
subq $0x18, %rsp
movaps 0xa6ca(%rip), %xmm1     # 0x101c0
movaps %xmm1, -0x50(%rsp)
movaps 0xa6ce(%rip), %xmm1     # 0x101d0
movaps %xmm1, -0x40(%rsp)
movabsq $0x3fb0d08ec54894e1, %rax # imm = 0x3FB0D08EC54894E1
movq %rax, -0x30(%rsp)
movaps 0xa6c3(%rip), %xmm1     # 0x101e0
movaps %xmm1, -0x20(%rsp)
movaps 0xa6c7(%rip), %xmm1     # 0x101f0
movaps %xmm1, -0x10(%rsp)
movaps 0xa6cb(%rip), %xmm1     # 0x10200
movaps %xmm1, (%rsp)
movaps 0xa6d0(%rip), %xmm1     # 0x10210
movaps %xmm1, -0x80(%rsp)
movaps 0xa6d4(%rip), %xmm1     # 0x10220
movaps %xmm1, -0x70(%rsp)
movabsq $0x3f132147a014bad1, %rax # imm = 0x3F132147A014BAD1
movq %rax, -0x60(%rsp)
movapd 0xa638(%rip), %xmm2     # 0x101a0
andpd %xmm0, %xmm2
movsd 0xa564(%rip), %xmm1     # 0x100d8
ucomisd %xmm2, %xmm1
jae 0x5be3
movsd 0xa57e(%rip), %xmm1     # 0x10100
ucomisd %xmm2, %xmm1
jae 0x5c29
movsd 0xa58c(%rip), %xmm1     # 0x10120
ucomisd %xmm2, %xmm1
jbe 0x5cce
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0xa4da(%rip), %xmm3     # 0x10088
divsd %xmm1, %xmm3
movsd 0xa576(%rip), %xmm1     # 0x10130
xorl %eax, %eax
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm1
cmpq $0x4, %rax
je 0x5cdb
addsd -0x20(%rsp,%rax,8), %xmm1
addsd -0x80(%rsp,%rax,8), %xmm4
mulsd %xmm3, %xmm4
incq %rax
jmp 0x5bc0
ucomisd 0xa4f5(%rip), %xmm2     # 0x100e0
jbe 0x5c63
movapd %xmm0, %xmm3
mulsd %xmm0, %xmm3
movsd 0xa4fb(%rip), %xmm1     # 0x100f8
xorl %eax, %eax
leaq 0xc2da(%rip), %rcx      # 0x11ee0
movapd %xmm3, %xmm2
mulsd %xmm3, %xmm1
cmpq $0x18, %rax
je 0x5c79
addsd -0x50(%rsp,%rax), %xmm1
addsd (%rax,%rcx), %xmm2
mulsd %xmm3, %xmm2
addq $0x8, %rax
jmp 0x5c0a
movsd 0xa4d7(%rip), %xmm1     # 0x10108
xorl %eax, %eax
leaq 0xa826(%rip), %rcx      # 0x10460
leaq 0xa86f(%rip), %rdx      # 0x104b0
movapd %xmm2, %xmm3
mulsd %xmm2, %xmm1
cmpq $0x38, %rax
je 0x5ca6
addsd (%rax,%rcx), %xmm1
addsd (%rax,%rdx), %xmm3
mulsd %xmm2, %xmm3
addq $0x8, %rax
jmp 0x5c45
mulsd 0xa47d(%rip), %xmm0     # 0x100e8
divsd 0xa47d(%rip), %xmm0     # 0x100f0
movapd %xmm0, %xmm1
jmp 0x5c91
addsd 0xa467(%rip), %xmm1     # 0x100e8
mulsd %xmm0, %xmm1
addsd 0xa463(%rip), %xmm2     # 0x100f0
divsd %xmm2, %xmm1
movsd 0xa40f(%rip), %xmm0     # 0x100a8
subsd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x2160
addsd 0xa462(%rip), %xmm1     # 0x10110
addsd 0xa462(%rip), %xmm3     # 0x10118
divsd %xmm3, %xmm1
xorpd %xmm3, %xmm3
xorl %edi, %edi
ucomisd %xmm0, %xmm3
setae %dil
movapd %xmm2, %xmm0
jmp 0x5d11
movsd 0xa452(%rip), %xmm0     # 0x10128
addq $0x18, %rsp
retq
addsd 0xa455(%rip), %xmm1     # 0x10138
mulsd %xmm1, %xmm3
addsd 0xa451(%rip), %xmm4     # 0x10140
divsd %xmm4, %xmm3
movsd 0xa44d(%rip), %xmm1     # 0x10148
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
xorpd %xmm2, %xmm2
xorl %edi, %edi
ucomisd %xmm0, %xmm2
setae %dil
addq $0x18, %rsp
jmp 0x5a4c