#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 Z(double);
double Q(double chi) {
  double t, b[6], factor[6], p, total = 0;
  double x;
  int i;
  b[1] = 0.319381530;
  b[2] = -0.356563782;
  b[3] = 1.781477937;
  b[4] = -1.821255978;
  b[5] = 1.330274429;
  p = 0.2316419;
  t = 1.0 / (1.0 + (p * chi));
  x = 1;
  for (i = 1; i <= 5; i++) {
    x *= t;
    factor[i] = b[i] * x;
  }
  for (i = 1; i <= 5; i++) {
    total += factor[i];
  }
  return total * Z(chi);
}


x86 assembly (clang, -O0):
<Q>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xf00(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe74(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe68(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe57(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x1,-0x8c(%rbp)
cmpl   $0x5,-0x8c(%rbp)
jg     1213 <Q+0x103>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movslq -0x8c(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movslq -0x8c(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    11bb <Q+0xab>
movl   $0x1,-0x8c(%rbp)
cmpl   $0x5,-0x8c(%rbp)
jg     1255 <Q+0x145>
movslq -0x8c(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    121d <Q+0x10d>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
call   1030 <Z@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q>:
push   %rax
movsd  0xee7(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xee3(%rip),%xmm1
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xed3(%rip),%xmm2
movsd  0xec3(%rip),%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm3,%xmm5
mulsd  0xec3(%rip),%xmm3
mulsd  %xmm1,%xmm4
mulsd  %xmm5,%xmm1
mulsd  0xebb(%rip),%xmm5
mulsd  0xebb(%rip),%xmm1
xorpd  %xmm6,%xmm6
addsd  %xmm4,%xmm6
addsd  %xmm2,%xmm6
addsd  %xmm3,%xmm6
addsd  %xmm5,%xmm6
addsd  %xmm1,%xmm6
movsd  %xmm6,(%rsp)
call   1030 <Z@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Q(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca [6 x double]
%5 = alloca [6 x double]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
store double %0, double* %2
store double 0.000000e+00, double* %7
%10 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 1
store double 0x3FD470BF3A92F8EC, double* %10
%11 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 2
store double 0xBFD6D1F0E5A8325B, double* %11
%12 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 3
store double 0x3FFC80EF025F5E68, double* %12
%13 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 4
store double 0xBFFD23DD4EF278D0, double* %13
%14 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 5
store double 0x3FF548CDD6F42943, double* %14
store double 0x3FCDA6711871100E, double* %6
%15 = load double, double* %6
%16 = load double, double* %2
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 1.000000e+00)
%18 = fdiv double 1.000000e+00, %17
store double %18, double* %3
store double 1.000000e+00, double* %8
store i32 1, i32* %9
br label %19
19: ; preds = %35, %1
%20 = load i32, i32* %9
%21 = icmp sle i32 %20, 5
br i1 %21, label %22, label %38
22: ; preds = %19
%23 = load double, double* %3
%24 = load double, double* %8
%25 = fmul double %24, %23
store double %25, double* %8
%26 = load i32, i32* %9
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [6 x double], [6 x double]* %4, i64 0, i64 %27
%29 = load double, double* %28
%30 = load double, double* %8
%31 = fmul double %29, %30
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [6 x double], [6 x double]* %5, i64 0, i64 %33
store double %31, double* %34
br label %35
35: ; preds = %22
%36 = load i32, i32* %9
%37 = add nsw i32 %36, 1
store i32 %37, i32* %9
br label %19
38: ; preds = %19
store i32 1, i32* %9
br label %39
39: ; preds = %49, %38
%40 = load i32, i32* %9
%41 = icmp sle i32 %40, 5
br i1 %41, label %42, label %52
42: ; preds = %39
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [6 x double], [6 x double]* %5, i64 0, i64 %44
%46 = load double, double* %45
%47 = load double, double* %7
%48 = fadd double %47, %46
store double %48, double* %7
br label %49
49: ; preds = %42
%50 = load i32, i32* %9
%51 = add nsw i32 %50, 1
store i32 %51, i32* %9
br label %39
52: ; preds = %39
%53 = load double, double* %7
%54 = load double, double* %2
%55 = call double @Z(double %54)
%56 = fmul double %53, %55
ret double %56
}

LLVM IR (-O2):
define double @Q(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FCDA6711871100E, double 1.000000e+00)
%3 = fdiv double 1.000000e+00, %2
%4 = fmul double %3, 0x3FD470BF3A92F8EC
%5 = fmul double %3, %3
%6 = fmul double %5, 0xBFD6D1F0E5A8325B
%7 = fmul double %3, %5
%8 = fmul double %7, 0x3FFC80EF025F5E68
%9 = fmul double %3, %7
%10 = fmul double %9, 0xBFFD23DD4EF278D0
%11 = fmul double %3, %9
%12 = fmul double %11, 0x3FF548CDD6F42943
%13 = fadd double %4, 0.000000e+00
%14 = fadd double %13, %6
%15 = fadd double %14, %8
%16 = fadd double %15, %10
%17 = fadd double %16, %12
%18 = tail call double @Z(double %0)
%19 = fmul double %17, %18
ret double %19
}