// File: /workspace/github_c_makefile_star2_O3/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 0xb238(%rip), %xmm1     # 0x121b0
movaps %xmm1, -0x50(%rsp)
movaps 0xb23c(%rip), %xmm1     # 0x121c0
movaps %xmm1, -0x40(%rsp)
movabsq $0x3fb0d08ec54894e1, %rax # imm = 0x3FB0D08EC54894E1
movq %rax, -0x30(%rsp)
movaps 0xb231(%rip), %xmm1     # 0x121d0
movaps %xmm1, -0x20(%rsp)
movaps 0xb235(%rip), %xmm1     # 0x121e0
movaps %xmm1, -0x10(%rsp)
movaps 0xb239(%rip), %xmm1     # 0x121f0
movaps %xmm1, (%rsp)
movaps 0xb23e(%rip), %xmm1     # 0x12200
movaps %xmm1, -0x80(%rsp)
movaps 0xb242(%rip), %xmm1     # 0x12210
movaps %xmm1, -0x70(%rsp)
movabsq $0x3f132147a014bad1, %rax # imm = 0x3F132147A014BAD1
movq %rax, -0x60(%rsp)
movapd 0xb1a6(%rip), %xmm2     # 0x12190
andpd %xmm0, %xmm2
movsd 0xb0e2(%rip), %xmm1     # 0x120d8
ucomisd %xmm2, %xmm1
jae 0x70a6
movsd 0xb0f8(%rip), %xmm1     # 0x12100
ucomisd %xmm2, %xmm1
jae 0x710f
movsd 0xb0f6(%rip), %xmm1     # 0x12110
ucomisd %xmm2, %xmm1
jbe 0x71ab
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0xb054(%rip), %xmm3     # 0x12088
divsd %xmm1, %xmm3
movsd 0xb0e0(%rip), %xmm1     # 0x12120
mulsd %xmm3, %xmm1
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
movapd %xmm3, %xmm4
unpcklpd %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
xorl %eax, %eax
movsd -0x20(%rsp,%rax,8), %xmm5
movhpd -0x80(%rsp,%rax,8), %xmm5 # xmm5 = xmm5[0],mem[0]
addpd %xmm5, %xmm1
mulpd %xmm4, %xmm1
incq %rax
cmpq $0x4, %rax
jne 0x7052
addpd 0xb1c9(%rip), %xmm1     # 0x12240
mulsd %xmm1, %xmm3
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm3
movsd 0xb09d(%rip), %xmm1     # 0x12128
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
xorpd %xmm2, %xmm2
xorl %edi, %edi
ucomisd %xmm0, %xmm2
setae %dil
jmp 0x7179
ucomisd 0xb032(%rip), %xmm2     # 0x120e0
jbe 0x7182
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0xb034(%rip), %xmm1     # 0x120f8
mulsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
xorl %eax, %eax
leaq 0xceb7(%rip), %rcx      # 0x13f90
movsd -0x50(%rsp,%rax), %xmm3
movhpd (%rax,%rcx), %xmm3      # xmm3 = xmm3[0],mem[0]
addpd %xmm3, %xmm1
mulpd %xmm2, %xmm1
addq $0x8, %rax
cmpq $0x18, %rax
jne 0x70d9
addpd 0xb122(%rip), %xmm1     # 0x12220
mulsd %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm0
jmp 0x7192
movsd 0xaff1(%rip), %xmm1     # 0x12108
mulsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
movapd %xmm2, %xmm3
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
xorl %eax, %eax
leaq 0xb3e0(%rip), %rcx      # 0x12510
leaq 0xb429(%rip), %rdx      # 0x12560
movsd (%rax,%rcx), %xmm4
movhpd (%rax,%rdx), %xmm4      # xmm4 = xmm4[0],mem[0]
addpd %xmm4, %xmm1
mulpd %xmm3, %xmm1
addq $0x8, %rax
cmpq $0x38, %rax
jne 0x7137
addpd 0xb0d5(%rip), %xmm1     # 0x12230
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
divsd %xmm3, %xmm1
xorpd %xmm3, %xmm3
xorl %edi, %edi
ucomisd %xmm0, %xmm3
setae %dil
movapd %xmm2, %xmm0
addq $0x18, %rsp
jmp 0x6ece
mulsd 0xaf5e(%rip), %xmm0     # 0x120e8
divsd 0xaf5e(%rip), %xmm0     # 0x120f0
movsd 0xaf0e(%rip), %xmm1     # 0x120a8
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x2170
movsd 0xaf65(%rip), %xmm0     # 0x12118
addq $0x18, %rsp
retq