#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 */
scalar_t__ pj_malloc(int);
double *pj_authset(double es) {
  double t, *APA;
  if ((APA = (double *)pj_malloc(3 * sizeof(double))) != 0) {
    APA[0] = es * .33333333333333333333;
    t = es * es;
    APA[0] += t * .17222222222222222222;
    APA[1] = t * .06388888888888888888;
    t *= es;
    APA[0] += t * .10257936507936507936;
    APA[1] += t * .06640211640211640211;
    APA[2] = t * .01641501294219154443;
  }
  return APA;
}


x86 assembly (clang, -O0):
<pj_authset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x18,%edi
call   1030 <pj_malloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     11f9 <pj_authset+0xe9>
movsd  0xeeb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xeb2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  0xe96(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xe5c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  0xe32(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0xe15(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pj_authset>:
push   %rax
movsd  %xmm0,(%rsp)
mov    $0x18,%edi
call   1030 <pj_malloc@plt>
test   %rax,%rax
je     1187 <pj_authset+0x77>
movsd  0xed3(%rip),%xmm0
movsd  (%rsp),%xmm3
mulsd  %xmm3,%xmm0
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movsd  0xec2(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
unpcklpd %xmm0,%xmm2
mulsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
mulpd  0xeae(%rip),%xmm0
addpd  %xmm2,%xmm0
movupd %xmm0,(%rax)
mulsd  0xe96(%rip),%xmm1
movsd  %xmm1,0x10(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define double* @pj_authset(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double*
store double %0, double* %2
%5 = call i64 @pj_malloc(i32 24)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %4
%7 = icmp ne double* %6, null
br i1 %7, label %8, label %42
8: ; preds = %1
%9 = load double, double* %2
%10 = fmul double %9, 0x3FD5555555555555
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 0
store double %10, double* %12
%13 = load double, double* %2
%14 = load double, double* %2
%15 = fmul double %13, %14
store double %15, double* %3
%16 = load double, double* %3
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = call double @llvm.fmuladd.f64(double %16, double 0x3FC60B60B60B60B6, double %19)
store double %20, double* %18
%21 = load double, double* %3
%22 = fmul double %21, 0x3FB05B05B05B05B0
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double, double* %2
%26 = load double, double* %3
%27 = fmul double %26, %25
store double %27, double* %3
%28 = load double, double* %3
%29 = load double*, double** %4
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = call double @llvm.fmuladd.f64(double %28, double 0x3FBA42A42A42A42A, double %31)
store double %32, double* %30
%33 = load double, double* %3
%34 = load double*, double** %4
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = call double @llvm.fmuladd.f64(double %33, double 0x3FB0FFBAA6550FFC, double %36)
store double %37, double* %35
%38 = load double, double* %3
%39 = fmul double %38, 0x3F90CF18DF0021ED
%40 = load double*, double** %4
%41 = getelementptr inbounds double, double* %40, i64 2
store double %39, double* %41
br label %42
42: ; preds = %8, %1
%43 = load double*, double** %4
ret double* %43
}

LLVM IR (-O2):
define double* @pj_authset(double %0) {
%2 = tail call i64 @pj_malloc(i32 24)
%3 = inttoptr i64 %2 to double*
%4 = icmp eq i64 %2, 0
br i1 %4, label %19, label %5
5: ; preds = %1
%6 = fmul double %0, 0x3FD5555555555555
%7 = fmul double %0, %0
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FC60B60B60B60B6, double %6)
%9 = fmul double %7, 0x3FB05B05B05B05B0
%10 = fmul double %7, %0
%11 = insertelement <2 x double> poison, double %10, i64 0
%12 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> zeroinitializer
%13 = insertelement <2 x double> poison, double %8, i64 0
%14 = insertelement <2 x double> %13, double %9, i64 1
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %12, <2 x double> <double 0x3FBA42A42A42A42A, double 0x3FB0FFBAA6550FFC>, <2 x double> %14)
%16 = inttoptr i64 %2 to <2 x double>*
store <2 x double> %15, <2 x double>* %16
%17 = fmul double %10, 0x3F90CF18DF0021ED
%18 = getelementptr inbounds double, double* %3, i64 2
store double %17, double* %18
br label %19
19: ; preds = %5, %1
ret double* %3
}