// File: /workspace/github_c_makefile_star2_O1/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 0xb284(%rip), %xmm1     # 0x121b0
movaps %xmm1, -0x50(%rsp)
movaps 0xb288(%rip), %xmm1     # 0x121c0
movaps %xmm1, -0x40(%rsp)
movabsq $0x3fb0d08ec54894e1, %rax # imm = 0x3FB0D08EC54894E1
movq %rax, -0x30(%rsp)
movaps 0xb27d(%rip), %xmm1     # 0x121d0
movaps %xmm1, -0x20(%rsp)
movaps 0xb281(%rip), %xmm1     # 0x121e0
movaps %xmm1, -0x10(%rsp)
movaps 0xb285(%rip), %xmm1     # 0x121f0
movaps %xmm1, (%rsp)
movaps 0xb28a(%rip), %xmm1     # 0x12200
movaps %xmm1, -0x80(%rsp)
movaps 0xb28e(%rip), %xmm1     # 0x12210
movaps %xmm1, -0x70(%rsp)
movabsq $0x3f132147a014bad1, %rax # imm = 0x3F132147A014BAD1
movq %rax, -0x60(%rsp)
movapd 0xb1f2(%rip), %xmm2     # 0x12190
andpd %xmm0, %xmm2
movsd 0xb136(%rip), %xmm1     # 0x120e0
ucomisd %xmm2, %xmm1
jae 0x705a
movsd 0xb14c(%rip), %xmm1     # 0x12108
ucomisd %xmm2, %xmm1
jae 0x70c3
movsd 0xb14a(%rip), %xmm1     # 0x12118
ucomisd %xmm2, %xmm1
jbe 0x715f
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0xb0a8(%rip), %xmm3     # 0x12090
divsd %xmm1, %xmm3
movsd 0xb134(%rip), %xmm1     # 0x12128
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 0x7006
addpd 0xb215(%rip), %xmm1     # 0x12240
mulsd %xmm1, %xmm3
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm3
movsd 0xb0f1(%rip), %xmm1     # 0x12130
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
xorpd %xmm2, %xmm2
xorl %edi, %edi
ucomisd %xmm0, %xmm2
setae %dil
jmp 0x712d
ucomisd 0xb086(%rip), %xmm2     # 0x120e8
jbe 0x7136
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd 0xb088(%rip), %xmm1     # 0x12100
mulsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
xorl %eax, %eax
leaq 0xcf13(%rip), %rcx      # 0x13fa0
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 0x708d
addpd 0xb16e(%rip), %xmm1     # 0x12220
mulsd %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm0
jmp 0x7146
movsd 0xb045(%rip), %xmm1     # 0x12110
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 0xb42c(%rip), %rcx      # 0x12510
leaq 0xb475(%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 0x70eb
addpd 0xb121(%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 0x6e82
mulsd 0xafb2(%rip), %xmm0     # 0x120f0
divsd 0xafb2(%rip), %xmm0     # 0x120f8
movsd 0xaf62(%rip), %xmm1     # 0x120b0
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
jmp 0x2170
movsd 0xafb9(%rip), %xmm0     # 0x12120
addq $0x18, %rsp
retq