#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 M_2_SQRTPI;
double M_SQRT1_2;
double fabs(double const);
double get_del(double const, double);
double gauss_large(const double x) {
  int i;
  double result;
  double xsq;
  double temp;
  double xnum;
  double xden;
  double absx;
  const double p[6] = {0.21589853405795699,   0.1274011611602473639,
                       0.022235277870649807,  0.001421619193227893466,
                       2.9112874951168792e-5, 0.02307344176494017303};
  const double q[5] = {1.28426009614491121, 0.468238212480865118,
                       0.0659881378689285515, 0.00378239633202758244,
                       7.29751555083966205e-5};
  absx = fabs(x);
  xsq = 1.0 / (x * x);
  xnum = p[5] * xsq;
  xden = xsq;
  for (i = 0; i < 4; i++) {
    xnum = (xnum + p[i]) * xsq;
    xden = (xden + q[i]) * xsq;
  }
  temp = xsq * (xnum + p[4]) / (xden + q[4]);
  temp = ((M_2_SQRTPI * M_SQRT1_2 / 2.0) - temp) / absx;
  result = get_del(x, temp);
  return result;
}


x86 assembly (clang, -O0):
<gauss_large>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1030 <memset@plt>
movsd  0xf10(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xefb(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xea7(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1030 <memset@plt>
movsd  0xe7f(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xe67(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xe4f(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe37(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe1f(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xe76(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xdeb(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    128b <gauss_large+0x16b>
movsd  -0x30(%rbp),%xmm0
movslq -0xc(%rbp),%rax
addsd  -0x70(%rbp,%rax,8),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movslq -0xc(%rbp),%rax
addsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    123e <gauss_large+0x11e>
movsd  -0x20(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2d20(%rip),%rax
movsd  (%rax),%xmm0
mov    0x2d1d(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xd91(%rip),%xmm1
divsd  %xmm1,%xmm0
subsd  -0x28(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
call   1040 <get_del@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_large>:
movapd 0xf48(%rip),%xmm2
andpd  %xmm0,%xmm2
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xed4(%rip),%xmm3
divsd  %xmm1,%xmm3
movsd  0xed0(%rip),%xmm4
mulsd  %xmm3,%xmm4
addsd  0xecc(%rip),%xmm4
mulsd  %xmm3,%xmm4
unpcklpd %xmm3,%xmm4
addpd  0xedc(%rip),%xmm4
unpcklpd %xmm3,%xmm3
mulpd  %xmm3,%xmm4
addpd  0xedc(%rip),%xmm4
mulpd  %xmm3,%xmm4
addpd  0xee0(%rip),%xmm4
mulpd  %xmm3,%xmm4
addpd  0xef4(%rip),%xmm4
mulpd  %xmm3,%xmm4
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
addsd  0xe88(%rip),%xmm1
divsd  %xmm1,%xmm4
mov    0x2e3d(%rip),%rax
movsd  (%rax),%xmm1
mov    0x2e3a(%rip),%rax
mulsd  (%rax),%xmm1
mulsd  0xe6e(%rip),%xmm1
subsd  %xmm4,%xmm1
divsd  %xmm2,%xmm1
jmp    1030 <get_del@plt>

LLVM IR (-O0):
@M_2_SQRTPI = global double 0.000000e+00
@M_SQRT1_2 = global double 0.000000e+00
define double @gauss_large(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca [6 x double]
%11 = alloca [5 x double]
store double %0, double* %2
%12 = bitcast [6 x double]* %10 to i8*
%13 = bitcast i8* %12 to [6 x double]*
%14 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 0
store double 0x3FCBA2902B84421C, double* %14
%15 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 1
store double 0x3FC04EAE6653ED94, double* %15
%16 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 2
store double 0x3F96C4D83D16707A, double* %16
%17 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 3
store double 0x3F574AB3FC4E4F8B, double* %17
%18 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 4
store double 0x3EFE86ED886DC483, double* %18
%19 = getelementptr inbounds [6 x double], [6 x double]* %13, i32 0, i32 5
store double 0x3F97A090772574DA, double* %19
%20 = bitcast [5 x double]* %11 to i8*
%21 = bitcast i8* %20 to [5 x double]*
%22 = getelementptr inbounds [5 x double], [5 x double]* %21, i32 0, i32 0
store double 0x3FF48C54508800DB, double* %22
%23 = getelementptr inbounds [5 x double], [5 x double]* %21, i32 0, i32 1
store double 0x3FDDF79D6855F0AD, double* %23
%24 = getelementptr inbounds [5 x double], [5 x double]* %21, i32 0, i32 2
store double 0x3FB0E4993E122C39, double* %24
%25 = getelementptr inbounds [5 x double], [5 x double]* %21, i32 0, i32 3
store double 0x3F6EFC42917D7DE7, double* %25
%26 = getelementptr inbounds [5 x double], [5 x double]* %21, i32 0, i32 4
store double 0x3F132147A014BAD1, double* %26
%27 = load double, double* %2
%28 = call double @llvm.fabs.f64(double %27)
store double %28, double* %9
%29 = load double, double* %2
%30 = load double, double* %2
%31 = fmul double %29, %30
%32 = fdiv double 1.000000e+00, %31
store double %32, double* %5
%33 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 5
%34 = load double, double* %33
%35 = load double, double* %5
%36 = fmul double %34, %35
store double %36, double* %7
%37 = load double, double* %5
store double %37, double* %8
store i32 0, i32* %3
br label %38
38: ; preds = %58, %1
%39 = load i32, i32* %3
%40 = icmp slt i32 %39, 4
br i1 %40, label %41, label %61
41: ; preds = %38
%42 = load double, double* %7
%43 = load i32, i32* %3
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 %44
%46 = load double, double* %45
%47 = fadd double %42, %46
%48 = load double, double* %5
%49 = fmul double %47, %48
store double %49, double* %7
%50 = load double, double* %8
%51 = load i32, i32* %3
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [5 x double], [5 x double]* %11, i64 0, i64 %52
%54 = load double, double* %53
%55 = fadd double %50, %54
%56 = load double, double* %5
%57 = fmul double %55, %56
store double %57, double* %8
br label %58
58: ; preds = %41
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
store i32 %60, i32* %3
br label %38
61: ; preds = %38
%62 = load double, double* %5
%63 = load double, double* %7
%64 = getelementptr inbounds [6 x double], [6 x double]* %10, i64 0, i64 4
%65 = load double, double* %64
%66 = fadd double %63, %65
%67 = fmul double %62, %66
%68 = load double, double* %8
%69 = getelementptr inbounds [5 x double], [5 x double]* %11, i64 0, i64 4
%70 = load double, double* %69
%71 = fadd double %68, %70
%72 = fdiv double %67, %71
store double %72, double* %6
%73 = load double, double* @M_2_SQRTPI
%74 = load double, double* @M_SQRT1_2
%75 = fmul double %73, %74
%76 = fdiv double %75, 2.000000e+00
%77 = load double, double* %6
%78 = fsub double %76, %77
%79 = load double, double* %9
%80 = fdiv double %78, %79
store double %80, double* %6
%81 = load double, double* %2
%82 = load double, double* %6
%83 = call double @get_del(double %81, double %82)
store double %83, double* %4
%84 = load double, double* %4
ret double %84
}

LLVM IR (-O2):
@M_2_SQRTPI = global double 0.000000e+00
@M_SQRT1_2 = global double 0.000000e+00
define double @gauss_large(double %0) {
%2 = fmul double %0, %0
%3 = fdiv double 1.000000e+00, %2
%4 = fmul double %3, 0x3F97A090772574DA
%5 = fadd double %4, 0x3FCBA2902B84421C
%6 = fmul double %3, %5
%7 = insertelement <2 x double> poison, double %6, i64 0
%8 = insertelement <2 x double> %7, double %3, i64 1
%9 = fadd <2 x double> %8, <double 0x3FC04EAE6653ED94, double 0x3FF48C54508800DB>
%10 = insertelement <2 x double> poison, double %3, i64 0
%11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> zeroinitializer
%12 = fmul <2 x double> %11, %9
%13 = fadd <2 x double> %12, <double 0x3F96C4D83D16707A, double 0x3FDDF79D6855F0AD>
%14 = fmul <2 x double> %11, %13
%15 = fadd <2 x double> %14, <double 0x3F574AB3FC4E4F8B, double 0x3FB0E4993E122C39>
%16 = fmul <2 x double> %11, %15
%17 = tail call double @llvm.fabs.f64(double %0)
%18 = fadd <2 x double> %16, <double 0x3EFE86ED886DC483, double 0x3F6EFC42917D7DE7>
%19 = fmul <2 x double> %11, %18
%20 = extractelement <2 x double> %19, i64 1
%21 = fadd double %20, 0x3F132147A014BAD1
%22 = extractelement <2 x double> %19, i64 0
%23 = fdiv double %22, %21
%24 = load double, double* @M_2_SQRTPI
%25 = load double, double* @M_SQRT1_2
%26 = fmul double %24, %25
%27 = fmul double %26, 5.000000e-01
%28 = fsub double %27, %23
%29 = fdiv double %28, %17
%30 = tail call double @get_del(double %0, double %29)
ret double %30
}