#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 cos(double);
int exp(double);
double sin(double);
int sqrt(int);
void cgau5(double *x, int sigInLength, double *psir, double *psii,
           int sigOutLength, double ys) {
  int count;
  double x2, cosx, sinx, x3, x4, x5;
  for (count = 0; count < sigInLength; count++) {
    x2 = x[count] * x[count];
    x3 = x[count] * x2;
    x4 = x2 * x2;
    x5 = x2 * x3;
    cosx = cos(x[count]);
    sinx = sin(x[count]);
    psir[count] = (-32 * x5 * cosx - 80 * x4 * sinx + 240 * x3 * cosx +
                   280 * x2 * sinx - 250 * x[count] * cosx - 81 * sinx) *
                  exp(-x2) / sqrt(9496 * sqrt(3.1415926535897931159980 / 2));
    psii[count] = (32 * x5 * sinx - 80 * x4 * cosx - 240 * x3 * sinx +
                   280 * x2 * cosx + 250 * x[count] * sinx - 81 * cosx) *
                  exp(-x2) / sqrt(9496 * sqrt(3.1415926535897931159980 / 2));
  }
  return;
}


x86 assembly (clang, -O0):
<cgau5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1464 <cgau5+0x324>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  0xe30(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0xe0e(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdd5(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdb3(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xd89(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  -0x48(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  0xd4b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    $0x1,%edi
call   1060 <sqrt@plt>
imul   $0x2518,%eax,%edi
call   1060 <sqrt@plt>
movsd  -0x80(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xcf6(%rip),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  0xcdc(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xca3(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc6a(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  0xc40(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  0xc19(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  -0x78(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    $0x1,%edi
call   1060 <sqrt@plt>
imul   $0x2518,%eax,%edi
call   1060 <sqrt@plt>
movsd  -0x70(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    116a <cgau5+0x2a>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgau5>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x70,%rsp
test   %esi,%esi
jle    1392 <cgau5+0x252>
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%r13
mov    %esi,%r12d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x0(%r13,%rbx,8),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x18(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,0x30(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm2,0x50(%rsp)
call   1050 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x0(%r13,%rbx,8),%xmm0
call   1030 <sin@plt>
movapd 0x50(%rsp),%xmm4
mulsd  0xe2c(%rip),%xmm4
movapd 0x30(%rsp),%xmm2
mulsd  0xe26(%rip),%xmm2
movapd %xmm2,0x30(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm4
addsd  %xmm1,%xmm4
movsd  0x18(%rsp),%xmm1
mulsd  0xe04(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
mulsd  %xmm3,%xmm1
movapd %xmm3,%xmm2
addsd  %xmm4,%xmm1
movapd 0x20(%rsp),%xmm4
movapd %xmm4,%xmm3
mulsd  0xde8(%rip),%xmm3
movapd %xmm3,0x60(%rsp)
movsd  %xmm0,0x48(%rsp)
mulsd  %xmm0,%xmm3
addsd  %xmm1,%xmm3
movsd  0x0(%r13,%rbx,8),%xmm1
mulsd  0xdcd(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
movapd %xmm0,%xmm2
movsd  0xdc1(%rip),%xmm0
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm4,%xmm0
xorpd  0xdbf(%rip),%xmm0
movapd %xmm0,0x20(%rsp)
call   1040 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%edi
call   1060 <sqrt@plt>
imul   $0x2518,%eax,%edi
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rbx,8)
movapd 0x50(%rsp),%xmm0
mulsd  0xd57(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
movapd 0x30(%rsp),%xmm3
mulsd  %xmm1,%xmm3
movsd  0x48(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
movsd  0x18(%rsp),%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
movapd 0x60(%rsp),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm0,%xmm3
movsd  0x0(%r13,%rbx,8),%xmm0
mulsd  0xd16(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xcf6(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movaps 0x20(%rsp),%xmm0
call   1040 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
call   1060 <sqrt@plt>
imul   $0x2518,%eax,%edi
call   1060 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1170 <cgau5+0x30>
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @cgau5(double* %0, i32 %1, double* %2, double* %3, i32 %4, double %5) {
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca double
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double* %0, double** %7
store i32 %1, i32* %8
store double* %2, double** %9
store double* %3, double** %10
store i32 %4, i32* %11
store double %5, double* %12
store i32 0, i32* %13
br label %20
20: ; preds = %145, %6
%21 = load i32, i32* %13
%22 = load i32, i32* %8
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %148
24: ; preds = %20
%25 = load double*, double** %7
%26 = load i32, i32* %13
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds double, double* %25, i64 %27
%29 = load double, double* %28
%30 = load double*, double** %7
%31 = load i32, i32* %13
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %30, i64 %32
%34 = load double, double* %33
%35 = fmul double %29, %34
store double %35, double* %14
%36 = load double*, double** %7
%37 = load i32, i32* %13
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
%40 = load double, double* %39
%41 = load double, double* %14
%42 = fmul double %40, %41
store double %42, double* %17
%43 = load double, double* %14
%44 = load double, double* %14
%45 = fmul double %43, %44
store double %45, double* %18
%46 = load double, double* %14
%47 = load double, double* %17
%48 = fmul double %46, %47
store double %48, double* %19
%49 = load double*, double** %7
%50 = load i32, i32* %13
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
%53 = load double, double* %52
%54 = call double @cos(double %53)
store double %54, double* %15
%55 = load double*, double** %7
%56 = load i32, i32* %13
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = call double @sin(double %59)
store double %60, double* %16
%61 = load double, double* %19
%62 = fmul double -3.200000e+01, %61
%63 = load double, double* %15
%64 = load double, double* %18
%65 = fmul double 8.000000e+01, %64
%66 = load double, double* %16
%67 = fmul double %65, %66
%68 = fneg double %67
%69 = call double @llvm.fmuladd.f64(double %62, double %63, double %68)
%70 = load double, double* %17
%71 = fmul double 2.400000e+02, %70
%72 = load double, double* %15
%73 = call double @llvm.fmuladd.f64(double %71, double %72, double %69)
%74 = load double, double* %14
%75 = fmul double 2.800000e+02, %74
%76 = load double, double* %16
%77 = call double @llvm.fmuladd.f64(double %75, double %76, double %73)
%78 = load double*, double** %7
%79 = load i32, i32* %13
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
%82 = load double, double* %81
%83 = fmul double 2.500000e+02, %82
%84 = load double, double* %15
%85 = fneg double %83
%86 = call double @llvm.fmuladd.f64(double %85, double %84, double %77)
%87 = load double, double* %16
%88 = call double @llvm.fmuladd.f64(double -8.100000e+01, double %87, double %86)
%89 = load double, double* %14
%90 = fneg double %89
%91 = call i32 @exp(double %90)
%92 = sitofp i32 %91 to double
%93 = fmul double %88, %92
%94 = call i32 @sqrt(i32 1)
%95 = mul nsw i32 9496, %94
%96 = call i32 @sqrt(i32 %95)
%97 = sitofp i32 %96 to double
%98 = fdiv double %93, %97
%99 = load double*, double** %9
%100 = load i32, i32* %13
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
store double %98, double* %102
%103 = load double, double* %19
%104 = fmul double 3.200000e+01, %103
%105 = load double, double* %16
%106 = load double, double* %18
%107 = fmul double 8.000000e+01, %106
%108 = load double, double* %15
%109 = fmul double %107, %108
%110 = fneg double %109
%111 = call double @llvm.fmuladd.f64(double %104, double %105, double %110)
%112 = load double, double* %17
%113 = fmul double 2.400000e+02, %112
%114 = load double, double* %16
%115 = fneg double %113
%116 = call double @llvm.fmuladd.f64(double %115, double %114, double %111)
%117 = load double, double* %14
%118 = fmul double 2.800000e+02, %117
%119 = load double, double* %15
%120 = call double @llvm.fmuladd.f64(double %118, double %119, double %116)
%121 = load double*, double** %7
%122 = load i32, i32* %13
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = fmul double 2.500000e+02, %125
%127 = load double, double* %16
%128 = call double @llvm.fmuladd.f64(double %126, double %127, double %120)
%129 = load double, double* %15
%130 = call double @llvm.fmuladd.f64(double -8.100000e+01, double %129, double %128)
%131 = load double, double* %14
%132 = fneg double %131
%133 = call i32 @exp(double %132)
%134 = sitofp i32 %133 to double
%135 = fmul double %130, %134
%136 = call i32 @sqrt(i32 1)
%137 = mul nsw i32 9496, %136
%138 = call i32 @sqrt(i32 %137)
%139 = sitofp i32 %138 to double
%140 = fdiv double %135, %139
%141 = load double*, double** %10
%142 = load i32, i32* %13
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %141, i64 %143
store double %140, double* %144
br label %145
145: ; preds = %24
%146 = load i32, i32* %13
%147 = add nsw i32 %146, 1
store i32 %147, i32* %13
br label %20
148: ; preds = %20
ret void
}

LLVM IR (-O2):
define void @cgau5(double* nocapture %0, i32 %1, double* nocapture writeonly %2, double* nocapture writeonly %3, i32 %4, double %5) {
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %64
8: ; preds = %6
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %62, %10 ]
%12 = getelementptr inbounds double, double* %0, i64 %11
%13 = load double, double* %12
%14 = fmul double %13, %13
%15 = fmul double %13, %14
%16 = fmul double %14, %14
%17 = fmul double %14, %15
%18 = tail call double @cos(double %13)
%19 = load double, double* %12
%20 = tail call double @sin(double %19)
%21 = fmul double %17, -3.200000e+01
%22 = fmul double %16, -8.000000e+01
%23 = fmul double %20, %22
%24 = tail call double @llvm.fmuladd.f64(double %21, double %18, double %23)
%25 = fmul double %15, 2.400000e+02
%26 = tail call double @llvm.fmuladd.f64(double %25, double %18, double %24)
%27 = fmul double %14, 2.800000e+02
%28 = tail call double @llvm.fmuladd.f64(double %27, double %20, double %26)
%29 = load double, double* %12
%30 = fmul double %29, -2.500000e+02
%31 = tail call double @llvm.fmuladd.f64(double %30, double %18, double %28)
%32 = tail call double @llvm.fmuladd.f64(double %20, double -8.100000e+01, double %31)
%33 = fneg double %14
%34 = tail call i32 @exp(double %33)
%35 = sitofp i32 %34 to double
%36 = fmul double %32, %35
%37 = tail call i32 @sqrt(i32 1)
%38 = mul nsw i32 %37, 9496
%39 = tail call i32 @sqrt(i32 %38)
%40 = sitofp i32 %39 to double
%41 = fdiv double %36, %40
%42 = getelementptr inbounds double, double* %2, i64 %11
store double %41, double* %42
%43 = fmul double %17, 3.200000e+01
%44 = fmul double %18, %22
%45 = tail call double @llvm.fmuladd.f64(double %43, double %20, double %44)
%46 = fneg double %25
%47 = tail call double @llvm.fmuladd.f64(double %46, double %20, double %45)
%48 = tail call double @llvm.fmuladd.f64(double %27, double %18, double %47)
%49 = load double, double* %12
%50 = fmul double %49, 2.500000e+02
%51 = tail call double @llvm.fmuladd.f64(double %50, double %20, double %48)
%52 = tail call double @llvm.fmuladd.f64(double %18, double -8.100000e+01, double %51)
%53 = tail call i32 @exp(double %33)
%54 = sitofp i32 %53 to double
%55 = fmul double %52, %54
%56 = tail call i32 @sqrt(i32 1)
%57 = mul nsw i32 %56, 9496
%58 = tail call i32 @sqrt(i32 %57)
%59 = sitofp i32 %58 to double
%60 = fdiv double %55, %59
%61 = getelementptr inbounds double, double* %3, i64 %11
store double %60, double* %61
%62 = add nuw nsw i64 %11, 1
%63 = icmp eq i64 %62, %9
br i1 %63, label %64, label %10
64: ; preds = %10, %6
ret void
}