#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 abs(double);
double atan2(double, double);
double cos(int);
double sin(int);
void compute_event_plane(int ipart, int ibin, double *evtPlanes, int *ptCount,
                         double ptArray[10000][25], double phiArray[10000][25],
                         double rapArray[10000][25], int chArray[10000][25]) {
  int i, j;
  int nloop = 0;
  double v2SinSum = 0.0;
  double v2CosSum = 0.0;
  double v3SinSum = 0.0;
  double v3CosSum = 0.0;
  double rapCutEvtPlane = 2.0;
  for (i = 0; i < 25; i++) {
    if (ptCount[i] > 0) {
      for (j = 0; j < ptCount[i]; j++) {
        if (abs(rapArray[j][i]) <= rapCutEvtPlane) {
          if (i == ibin && j == ipart) {
            continue;
          }
          nloop++;
          v2SinSum += ptArray[j][i] * sin(2 * phiArray[j][i]);
          v2CosSum += ptArray[j][i] * cos(2 * phiArray[j][i]);
          v3SinSum += ptArray[j][i] * sin(3 * phiArray[j][i]);
          v3CosSum += ptArray[j][i] * cos(3 * phiArray[j][i]);
        }
      }
    }
  }
  v2SinSum = v2SinSum / (double)nloop;
  v2CosSum = v2CosSum / (double)nloop;
  v3SinSum = v3SinSum / (double)nloop;
  v3CosSum = v3CosSum / (double)nloop;
  evtPlanes[0] = atan2(v2SinSum, v2CosSum) / 2.0;
  evtPlanes[1] = atan2(v3SinSum, v3CosSum) / 3.0;
}


x86 assembly (clang, -O0):
<compute_event_plane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe68(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x19,-0x2c(%rbp)
jge    13f6 <compute_event_plane+0x2b6>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    13e3 <compute_event_plane+0x2a3>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
mov    -0x18(%rbp),%rcx
movslq -0x2c(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    13de <compute_event_plane+0x29e>
mov    0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <abs@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     13cb <compute_event_plane+0x28b>
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    122a <compute_event_plane+0xea>
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    122a <compute_event_plane+0xea>
jmp    13d0 <compute_event_plane+0x290>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xd8f(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xd29(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xccb(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0xc8,%rcx,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xc65(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1060 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    13d0 <compute_event_plane+0x290>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11c7 <compute_event_plane+0x87>
jmp    13e3 <compute_event_plane+0x2a3>
jmp    13e8 <compute_event_plane+0x2a8>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11a4 <compute_event_plane+0x64>
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
call   1040 <atan2@plt>
movsd  0xba7(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1040 <atan2@plt>
movsd  0xb8c(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_event_plane>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r9,%r15
mov    %r8,%r13
mov    %rcx,0x20(%rsp)
mov    %rdx,0x68(%rsp)
mov    0xf0(%rsp),%rbx
mov    %edi,%eax
mov    %esi,%ecx
mov    %rcx,0x78(%rsp)
imul   $0xc8,%rax,%rax
mov    %rax,0x70(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
xor    %r14d,%r14d
movl   $0x0,0xc(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
jmp    11ba <compute_event_plane+0x7a>
nop
add    $0x1,%r14
add    $0x8,%rbx
add    $0x8,%r13
add    $0x8,%r15
cmp    $0x19,%r14
je     131f <compute_event_plane+0x1df>
mov    0x20(%rsp),%rax
cmpl   $0x0,(%rax,%r14,4)
jle    11a0 <compute_event_plane+0x60>
xor    %ebp,%ebp
xor    %r12d,%r12d
jmp    12f0 <compute_event_plane+0x1b0>
addl   $0x1,0xc(%rsp)
movsd  (%r15,%rbp,1),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
movsd  0x0(%r13,%rbp,1),%xmm0
movaps %xmm0,0x50(%rsp)
call   1050 <sin@plt>
movaps %xmm0,0xa0(%rsp)
movsd  (%r15,%rbp,1),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
movaps 0x50(%rsp),%xmm0
movhps 0x0(%r13,%rbp,1),%xmm0
movaps %xmm0,0x50(%rsp)
call   1060 <cos@plt>
movaps %xmm0,0x90(%rsp)
movsd  (%r15,%rbp,1),%xmm0
movsd  0xdd3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0x0(%r13,%rbp,1),%xmm0
movaps %xmm0,0x40(%rsp)
call   1050 <sin@plt>
movaps %xmm0,0x80(%rsp)
movsd  (%r15,%rbp,1),%xmm0
mulsd  0xda4(%rip),%xmm0
cvttsd2si %xmm0,%edi
movapd 0x40(%rsp),%xmm0
movhpd 0x0(%r13,%rbp,1),%xmm0
movapd %xmm0,0x40(%rsp)
call   1060 <cos@plt>
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x40(%rsp),%xmm1
movapd %xmm1,%xmm2
movapd 0xa0(%rsp),%xmm0
unpcklpd 0x90(%rsp),%xmm0
mulpd  0x50(%rsp),%xmm0
movapd %xmm0,%xmm1
movapd 0x10(%rsp),%xmm0
addpd  %xmm2,%xmm0
movapd %xmm0,0x10(%rsp)
movapd 0x30(%rsp),%xmm0
addpd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
add    $0x1,%r12
mov    0x20(%rsp),%rax
movslq (%rax,%r14,4),%rax
add    $0xc8,%rbp
cmp    %rax,%r12
jge    11a0 <compute_event_plane+0x60>
movsd  (%rbx,%rbp,1),%xmm0
call   1030 <abs@plt>
movsd  0xcfe(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     12d3 <compute_event_plane+0x193>
cmp    0x78(%rsp),%r14
jne    11d0 <compute_event_plane+0x90>
cmp    %rbp,0x70(%rsp)
je     12d3 <compute_event_plane+0x193>
jmp    11d0 <compute_event_plane+0x90>
xorps  %xmm2,%xmm2
cvtsi2sdl 0xc(%rsp),%xmm2
movapd 0x30(%rsp),%xmm1
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
unpckhpd %xmm1,%xmm1
divsd  %xmm2,%xmm1
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm4
divsd  %xmm2,%xmm4
movapd %xmm4,0x20(%rsp)
unpckhpd %xmm3,%xmm3
divsd  %xmm2,%xmm3
movapd %xmm3,0x10(%rsp)
call   1040 <atan2@plt>
mulsd  0xca3(%rip),%xmm0
mov    0x68(%rsp),%rbx
movsd  %xmm0,(%rbx)
movapd 0x20(%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
call   1040 <atan2@plt>
divsd  0xc7a(%rip),%xmm0
movsd  %xmm0,0x8(%rbx)
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @compute_event_plane(i32 %0, i32 %1, double* %2, i32* %3, [25 x double]* %4, [25 x double]* %5, [25 x double]* %6, [25 x i32]* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca i32*
%13 = alloca [25 x double]*
%14 = alloca [25 x double]*
%15 = alloca [25 x double]*
%16 = alloca [25 x i32]*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
store i32 %0, i32* %9
store i32 %1, i32* %10
store double* %2, double** %11
store i32* %3, i32** %12
store [25 x double]* %4, [25 x double]** %13
store [25 x double]* %5, [25 x double]** %14
store [25 x double]* %6, [25 x double]** %15
store [25 x i32]* %7, [25 x i32]** %16
store i32 0, i32* %19
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
store double 0.000000e+00, double* %22
store double 0.000000e+00, double* %23
store double 2.000000e+00, double* %24
store i32 0, i32* %17
br label %25
25: ; preds = %158, %8
%26 = load i32, i32* %17
%27 = icmp slt i32 %26, 25
br i1 %27, label %28, label %161
28: ; preds = %25
%29 = load i32*, i32** %12
%30 = load i32, i32* %17
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %29, i64 %31
%33 = load i32, i32* %32
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %157
35: ; preds = %28
store i32 0, i32* %18
br label %36
36: ; preds = %153, %35
%37 = load i32, i32* %18
%38 = load i32*, i32** %12
%39 = load i32, i32* %17
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %38, i64 %40
%42 = load i32, i32* %41
%43 = icmp slt i32 %37, %42
br i1 %43, label %44, label %156
44: ; preds = %36
%45 = load [25 x double]*, [25 x double]** %15
%46 = load i32, i32* %18
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [25 x double], [25 x double]* %45, i64 %47
%49 = load i32, i32* %17
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [25 x double], [25 x double]* %48, i64 0, i64 %50
%52 = load double, double* %51
%53 = call double @abs(double %52)
%54 = load double, double* %24
%55 = fcmp ole double %53, %54
br i1 %55, label %56, label %152
56: ; preds = %44
%57 = load i32, i32* %17
%58 = load i32, i32* %10
%59 = icmp eq i32 %57, %58
br i1 %59, label %60, label %65
60: ; preds = %56
%61 = load i32, i32* %18
%62 = load i32, i32* %9
%63 = icmp eq i32 %61, %62
br i1 %63, label %64, label %65
64: ; preds = %60
br label %153
65: ; preds = %60, %56
%66 = load i32, i32* %19
%67 = add nsw i32 %66, 1
store i32 %67, i32* %19
%68 = load [25 x double]*, [25 x double]** %13
%69 = load i32, i32* %18
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [25 x double], [25 x double]* %68, i64 %70
%72 = load i32, i32* %17
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [25 x double], [25 x double]* %71, i64 0, i64 %73
%75 = load double, double* %74
%76 = load [25 x double]*, [25 x double]** %14
%77 = load i32, i32* %18
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [25 x double], [25 x double]* %76, i64 %78
%80 = load i32, i32* %17
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [25 x double], [25 x double]* %79, i64 0, i64 %81
%83 = load double, double* %82
%84 = fmul double 2.000000e+00, %83
%85 = fptosi double %84 to i32
%86 = call double @sin(i32 %85)
%87 = load double, double* %20
%88 = call double @llvm.fmuladd.f64(double %75, double %86, double %87)
store double %88, double* %20
%89 = load [25 x double]*, [25 x double]** %13
%90 = load i32, i32* %18
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [25 x double], [25 x double]* %89, i64 %91
%93 = load i32, i32* %17
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [25 x double], [25 x double]* %92, i64 0, i64 %94
%96 = load double, double* %95
%97 = load [25 x double]*, [25 x double]** %14
%98 = load i32, i32* %18
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [25 x double], [25 x double]* %97, i64 %99
%101 = load i32, i32* %17
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds [25 x double], [25 x double]* %100, i64 0, i64 %102
%104 = load double, double* %103
%105 = fmul double 2.000000e+00, %104
%106 = fptosi double %105 to i32
%107 = call double @cos(i32 %106)
%108 = load double, double* %21
%109 = call double @llvm.fmuladd.f64(double %96, double %107, double %108)
store double %109, double* %21
%110 = load [25 x double]*, [25 x double]** %13
%111 = load i32, i32* %18
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [25 x double], [25 x double]* %110, i64 %112
%114 = load i32, i32* %17
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [25 x double], [25 x double]* %113, i64 0, i64 %115
%117 = load double, double* %116
%118 = load [25 x double]*, [25 x double]** %14
%119 = load i32, i32* %18
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [25 x double], [25 x double]* %118, i64 %120
%122 = load i32, i32* %17
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [25 x double], [25 x double]* %121, i64 0, i64 %123
%125 = load double, double* %124
%126 = fmul double 3.000000e+00, %125
%127 = fptosi double %126 to i32
%128 = call double @sin(i32 %127)
%129 = load double, double* %22
%130 = call double @llvm.fmuladd.f64(double %117, double %128, double %129)
store double %130, double* %22
%131 = load [25 x double]*, [25 x double]** %13
%132 = load i32, i32* %18
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [25 x double], [25 x double]* %131, i64 %133
%135 = load i32, i32* %17
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [25 x double], [25 x double]* %134, i64 0, i64 %136
%138 = load double, double* %137
%139 = load [25 x double]*, [25 x double]** %14
%140 = load i32, i32* %18
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [25 x double], [25 x double]* %139, i64 %141
%143 = load i32, i32* %17
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [25 x double], [25 x double]* %142, i64 0, i64 %144
%146 = load double, double* %145
%147 = fmul double 3.000000e+00, %146
%148 = fptosi double %147 to i32
%149 = call double @cos(i32 %148)
%150 = load double, double* %23
%151 = call double @llvm.fmuladd.f64(double %138, double %149, double %150)
store double %151, double* %23
br label %152
152: ; preds = %65, %44
br label %153
153: ; preds = %152, %64
%154 = load i32, i32* %18
%155 = add nsw i32 %154, 1
store i32 %155, i32* %18
br label %36
156: ; preds = %36
br label %157
157: ; preds = %156, %28
br label %158
158: ; preds = %157
%159 = load i32, i32* %17
%160 = add nsw i32 %159, 1
store i32 %160, i32* %17
br label %25
161: ; preds = %25
%162 = load double, double* %20
%163 = load i32, i32* %19
%164 = sitofp i32 %163 to double
%165 = fdiv double %162, %164
store double %165, double* %20
%166 = load double, double* %21
%167 = load i32, i32* %19
%168 = sitofp i32 %167 to double
%169 = fdiv double %166, %168
store double %169, double* %21
%170 = load double, double* %22
%171 = load i32, i32* %19
%172 = sitofp i32 %171 to double
%173 = fdiv double %170, %172
store double %173, double* %22
%174 = load double, double* %23
%175 = load i32, i32* %19
%176 = sitofp i32 %175 to double
%177 = fdiv double %174, %176
store double %177, double* %23
%178 = load double, double* %20
%179 = load double, double* %21
%180 = call double @atan2(double %178, double %179)
%181 = fdiv double %180, 2.000000e+00
%182 = load double*, double** %11
%183 = getelementptr inbounds double, double* %182, i64 0
store double %181, double* %183
%184 = load double, double* %22
%185 = load double, double* %23
%186 = call double @atan2(double %184, double %185)
%187 = fdiv double %186, 3.000000e+00
%188 = load double*, double** %11
%189 = getelementptr inbounds double, double* %188, i64 1
store double %187, double* %189
ret void
}

LLVM IR (-O2):
define void @compute_event_plane(i32 %0, i32 %1, double* nocapture writeonly %2, i32* nocapture %3, [25 x double]* nocapture %4, [25 x double]* nocapture %5, [25 x double]* nocapture %6, [25 x i32]* nocapture readnone %7) {
%9 = zext i32 %0 to i64
%10 = zext i32 %1 to i64
br label %11
11: ; preds = %8, %71
%12 = phi i64 [ 0, %8 ], [ %74, %71 ]
%13 = phi i32 [ 0, %8 ], [ %72, %71 ]
%14 = phi <4 x double> [ zeroinitializer, %8 ], [ %73, %71 ]
%15 = getelementptr inbounds i32, i32* %3, i64 %12
%16 = load i32, i32* %15
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %71
18: ; preds = %11
%19 = icmp eq i64 %12, %10
br label %20
20: ; preds = %18, %64
%21 = phi i64 [ 0, %18 ], [ %67, %64 ]
%22 = phi i32 [ %13, %18 ], [ %65, %64 ]
%23 = phi <4 x double> [ %14, %18 ], [ %66, %64 ]
%24 = getelementptr inbounds [25 x double], [25 x double]* %6, i64 %21, i64 %12
%25 = load double, double* %24
%26 = tail call double @abs(double %25)
%27 = fcmp ugt double %26, 2.000000e+00
br i1 %27, label %64, label %28
28: ; preds = %20
%29 = icmp eq i64 %21, %9
%30 = select i1 %19, i1 %29, i1 false
br i1 %30, label %64, label %31
31: ; preds = %28
%32 = add nsw i32 %22, 1
%33 = getelementptr inbounds [25 x double], [25 x double]* %4, i64 %21, i64 %12
%34 = load double, double* %33
%35 = getelementptr inbounds [25 x double], [25 x double]* %5, i64 %21, i64 %12
%36 = load double, double* %35
%37 = fmul double %36, 2.000000e+00
%38 = fptosi double %37 to i32
%39 = tail call double @sin(i32 %38)
%40 = load double, double* %33
%41 = load double, double* %35
%42 = fmul double %41, 2.000000e+00
%43 = fptosi double %42 to i32
%44 = tail call double @cos(i32 %43)
%45 = load double, double* %33
%46 = load double, double* %35
%47 = fmul double %46, 3.000000e+00
%48 = fptosi double %47 to i32
%49 = tail call double @sin(i32 %48)
%50 = load double, double* %33
%51 = load double, double* %35
%52 = fmul double %51, 3.000000e+00
%53 = fptosi double %52 to i32
%54 = tail call double @cos(i32 %53)
%55 = insertelement <4 x double> poison, double %34, i64 0
%56 = insertelement <4 x double> %55, double %40, i64 1
%57 = insertelement <4 x double> %56, double %45, i64 2
%58 = insertelement <4 x double> %57, double %50, i64 3
%59 = insertelement <4 x double> poison, double %39, i64 0
%60 = insertelement <4 x double> %59, double %44, i64 1
%61 = insertelement <4 x double> %60, double %49, i64 2
%62 = insertelement <4 x double> %61, double %54, i64 3
%63 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %58, <4 x double> %62, <4 x double> %23)
br label %64
64: ; preds = %28, %20, %31
%65 = phi i32 [ %32, %31 ], [ %22, %20 ], [ %22, %28 ]
%66 = phi <4 x double> [ %63, %31 ], [ %23, %20 ], [ %23, %28 ]
%67 = add nuw nsw i64 %21, 1
%68 = load i32, i32* %15
%69 = sext i32 %68 to i64
%70 = icmp slt i64 %67, %69
br i1 %70, label %20, label %71
71: ; preds = %64, %11
%72 = phi i32 [ %13, %11 ], [ %65, %64 ]
%73 = phi <4 x double> [ %14, %11 ], [ %66, %64 ]
%74 = add nuw nsw i64 %12, 1
%75 = icmp eq i64 %74, 25
br i1 %75, label %76, label %11
76: ; preds = %71
%77 = sitofp i32 %72 to double
%78 = extractelement <4 x double> %73, i64 0
%79 = fdiv double %78, %77
%80 = extractelement <4 x double> %73, i64 1
%81 = fdiv double %80, %77
%82 = extractelement <4 x double> %73, i64 2
%83 = fdiv double %82, %77
%84 = extractelement <4 x double> %73, i64 3
%85 = fdiv double %84, %77
%86 = tail call double @atan2(double %79, double %81)
%87 = fmul double %86, 5.000000e-01
store double %87, double* %2
%88 = tail call double @atan2(double %83, double %85)
%89 = fdiv double %88, 3.000000e+00
%90 = getelementptr inbounds double, double* %2, i64 1
store double %89, double* %90
ret void
}