#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 IncompleteGamma(double, double, double);
double LnGamma(double);
double PointChi2(int, double);
int DiscreteGamma(double freqK[], double rK[], double alpha, double beta, int K,
                  int mean) {
  int i;
  double t, factor = alpha / beta * K, lnga1;
  if (mean) {
    lnga1 = LnGamma(alpha + 1);
    for (i = 0; i < K - 1; i++)
      freqK[i] = PointChi2((i + 1.0) / K, 2.0 * (alpha)) / (2.0 * (beta));
    for (i = 0; i < K - 1; i++)
      freqK[i] = IncompleteGamma(freqK[i] * beta, alpha + 1, lnga1);
    rK[0] = freqK[0] * factor;
    rK[K - 1] = (1 - freqK[K - 2]) * factor;
    for (i = 1; i < K - 1; i++)
      rK[i] = (freqK[i] - freqK[i - 1]) * factor;
  } else {
    for (i = 0; i < K; i++)
      rK[i] =
          PointChi2((i * 2. + 1) / (2. * K), 2.0 * (alpha)) / (2.0 * (beta));
    for (i = 0, t = 0; i < K; i++)
      t += rK[i];
    for (i = 0; i < K; i++)
      rK[i] *= factor / t;
  }
  for (i = 0; i < K; i++)
    freqK[i] = 1.0 / K;
  return (0);
}


x86 assembly (clang, -O0):
<DiscreteGamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
cmpl   $0x0,-0x28(%rbp)
je     12fb <DiscreteGamma+0x1cb>
movsd  0xe8e(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <LnGamma@plt>
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11fd <DiscreteGamma+0xcd>
cvtsi2sdl -0x2c(%rbp),%xmm0
movsd  0xe5a(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe39(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <PointChi2@plt>
movsd  0xe27(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1190 <DiscreteGamma+0x60>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1259 <DiscreteGamma+0x129>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xdd9(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
call   1030 <IncompleteGamma@plt>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1204 <DiscreteGamma+0xd4>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd85(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12f6 <DiscreteGamma+0x1c6>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12a6 <DiscreteGamma+0x176>
jmp    13fc <DiscreteGamma+0x2cc>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    137a <DiscreteGamma+0x24a>
cvtsi2sdl -0x2c(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xce9(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x24(%rbp),%xmm2
movsd  0xcd0(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xcbc(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <PointChi2@plt>
movsd  0xcaa(%rip),%xmm1
mulsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1302 <DiscreteGamma+0x1d2>
movl   $0x0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13ba <DiscreteGamma+0x28a>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1389 <DiscreteGamma+0x259>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13f7 <DiscreteGamma+0x2c7>
movsd  -0x40(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13c1 <DiscreteGamma+0x291>
jmp    13fc <DiscreteGamma+0x2cc>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    143b <DiscreteGamma+0x30b>
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  0xbec(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1403 <DiscreteGamma+0x2d3>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DiscreteGamma>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %edx,%r14d
movapd %xmm0,%xmm3
mov    %rsi,%r15
mov    %rdi,%rbx
movapd %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
divsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
mov    %edx,%r12d
test   %ecx,%ecx
je     1449 <DiscreteGamma+0x319>
movapd %xmm2,0x30(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  0xe83(%rip),%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  %xmm1,(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1050 <LnGamma@plt>
lea    -0x1(%r14),%eax
mov    %eax,0x24(%rsp)
mov    %eax,%r13d
cmp    $0x2,%r14d
jl     126d <DiscreteGamma+0x13d>
movsd  %xmm0,0x40(%rsp)
mov    %r14,%rbp
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
xor    %r14d,%r14d
movsd  %xmm1,0x8(%rsp)
nopw   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
addsd  0xe10(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
movapd %xmm1,%xmm0
call   1040 <PointChi2@plt>
movsd  0x8(%rsp),%xmm1
divsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%rbx,%r14,8)
add    $0x1,%r14
cmp    %r14,%r13
jne    11e0 <DiscreteGamma+0xb0>
mov    %rbp,%r14
cmp    $0x2,%r14d
movsd  (%rsp),%xmm2
movsd  0x28(%rsp),%xmm1
jl     126d <DiscreteGamma+0x13d>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rbp,8),%xmm0
mulsd  %xmm2,%xmm0
movsd  0x40(%rsp),%xmm2
call   1030 <IncompleteGamma@plt>
movsd  0x28(%rsp),%xmm1
movsd  (%rsp),%xmm2
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1240 <DiscreteGamma+0x110>
movsd  (%rbx),%xmm0
movapd 0x30(%rsp),%xmm4
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%r15)
movslq %r14d,%rax
movsd  0xd75(%rip),%xmm0
subsd  -0x10(%rbx,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
movslq 0x24(%rsp),%rax
movsd  %xmm0,(%r15,%rax,8)
cmp    $0x3,%r14d
movsd  0x10(%rsp),%xmm5
jl     1669 <DiscreteGamma+0x539>
lea    -0x1(%r13),%rcx
mov    $0x1,%eax
cmp    $0x4,%rcx
jb     13d7 <DiscreteGamma+0x2a7>
lea    0x8(%r15),%rdx
lea    (%rbx,%r13,8),%rsi
cmp    %rsi,%rdx
jae    12dd <DiscreteGamma+0x1ad>
lea    (%r15,%r13,8),%rdx
cmp    %rbx,%rdx
ja     13d7 <DiscreteGamma+0x2a7>
mov    %rcx,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm4,%xmm0
unpcklpd %xmm4,%xmm0
lea    -0x4(%rax),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     1602 <DiscreteGamma+0x4d2>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nopl   (%rax)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x8(%rbx,%rdx,8),%xmm2
subpd  %xmm1,%xmm2
movupd 0x10(%rbx,%rdx,8),%xmm1
movupd 0x18(%rbx,%rdx,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x8(%r15,%rdx,8)
movupd %xmm3,0x18(%r15,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm1
movupd 0x28(%rbx,%rdx,8),%xmm2
subpd  %xmm1,%xmm2
movupd 0x30(%rbx,%rdx,8),%xmm1
movupd 0x38(%rbx,%rdx,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x28(%r15,%rdx,8)
movupd %xmm3,0x38(%r15,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1310 <DiscreteGamma+0x1e0>
test   $0x1,%sil
je     13ca <DiscreteGamma+0x29a>
lea    0x0(,%rdx,8),%rsi
or     $0x8,%rsi
movupd (%rbx,%rsi,1),%xmm1
movupd 0x10(%rbx,%rsi,1),%xmm2
movupd (%rbx,%rdx,8),%xmm3
subpd  %xmm3,%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm3
subpd  %xmm3,%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r15,%rsi,1)
movupd %xmm2,0x10(%r15,%rsi,1)
cmp    %rax,%rcx
je     1669 <DiscreteGamma+0x539>
or     $0x1,%rax
mov    %rax,%rcx
not    %rcx
test   $0x1,%r13b
jne    13fc <DiscreteGamma+0x2cc>
movsd  (%rbx,%rax,8),%xmm0
subsd  -0x8(%rbx,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
add    %r13,%rcx
je     1669 <DiscreteGamma+0x539>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rbx,%rax,8),%xmm0
subsd  -0x8(%rbx,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%r15,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
subsd  (%rbx,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,0x8(%r15,%rax,8)
add    $0x2,%rax
cmp    %rax,%r13
jne    1410 <DiscreteGamma+0x2e0>
jmp    1669 <DiscreteGamma+0x539>
test   %r14d,%r14d
jle    179e <DiscreteGamma+0x66e>
movapd %xmm2,0x30(%rsp)
movsd  %xmm0,0x10(%rsp)
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
addsd  %xmm3,%xmm3
addsd  %xmm1,%xmm1
xor    %ebp,%ebp
movsd  %xmm1,(%rsp)
movsd  %xmm3,0x8(%rsp)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
addsd  %xmm0,%xmm0
addsd  0xb6d(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%edi
movapd %xmm3,%xmm0
call   1040 <PointChi2@plt>
movsd  0x8(%rsp),%xmm3
movsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1480 <DiscreteGamma+0x350>
test   %r14d,%r14d
movsd  0x10(%rsp),%xmm5
movapd 0x30(%rsp),%xmm6
jle    179e <DiscreteGamma+0x66e>
lea    -0x1(%r12),%rcx
mov    %r12d,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    14f2 <DiscreteGamma+0x3c2>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    1540 <DiscreteGamma+0x410>
mov    %r12d,%edx
and    $0xfffffff8,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
xchg   %ax,%ax
addsd  (%r15,%rcx,8),%xmm0
addsd  0x8(%r15,%rcx,8),%xmm0
addsd  0x10(%r15,%rcx,8),%xmm0
addsd  0x18(%r15,%rcx,8),%xmm0
addsd  0x20(%r15,%rcx,8),%xmm0
addsd  0x28(%r15,%rcx,8),%xmm0
addsd  0x30(%r15,%rcx,8),%xmm0
addsd  0x38(%r15,%rcx,8),%xmm0
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    1500 <DiscreteGamma+0x3d0>
test   %rax,%rax
je     155e <DiscreteGamma+0x42e>
lea    (%r15,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
addsd  (%rcx,%rdx,8),%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1550 <DiscreteGamma+0x420>
test   %r14d,%r14d
jle    179e <DiscreteGamma+0x66e>
divsd  %xmm0,%xmm6
cmp    $0x4,%r12d
jae    1578 <DiscreteGamma+0x448>
xor    %eax,%eax
jmp    1650 <DiscreteGamma+0x520>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1613 <DiscreteGamma+0x4e3>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd (%r15,%rcx,8),%xmm1
movupd 0x10(%r15,%rcx,8),%xmm2
movupd 0x20(%r15,%rcx,8),%xmm3
movupd 0x30(%r15,%rcx,8),%xmm4
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r15,%rcx,8)
movupd %xmm2,0x10(%r15,%rcx,8)
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd %xmm3,0x20(%r15,%rcx,8)
movupd %xmm4,0x30(%r15,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    15b0 <DiscreteGamma+0x480>
jmp    1615 <DiscreteGamma+0x4e5>
xor    %edx,%edx
test   $0x1,%sil
jne    138b <DiscreteGamma+0x25b>
jmp    13ca <DiscreteGamma+0x29a>
xor    %ecx,%ecx
test   $0x1,%dl
je     163c <DiscreteGamma+0x50c>
movupd (%r15,%rcx,8),%xmm1
movupd 0x10(%r15,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r15,%rcx,8)
movupd %xmm2,0x10(%r15,%rcx,8)
cmp    %r12,%rax
je     1669 <DiscreteGamma+0x539>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rax,8),%xmm0
mulsd  %xmm6,%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1650 <DiscreteGamma+0x520>
test   %r14d,%r14d
jle    179e <DiscreteGamma+0x66e>
movsd  0x986(%rip),%xmm0
divsd  %xmm5,%xmm0
cmp    $0x4,%r14d
jae    168b <DiscreteGamma+0x55b>
xor    %eax,%eax
jmp    1790 <DiscreteGamma+0x660>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    16ba <DiscreteGamma+0x58a>
xor    %esi,%esi
jmp    1755 <DiscreteGamma+0x625>
movabs $0x7ffffffffffffffe,%rsi
ff ff 7f
add    $0xfffffffffffffffa,%rsi
and    %rsi,%rdx
xor    %esi,%esi
nopl   (%rax)
movupd %xmm1,(%rbx,%rsi,8)
movupd %xmm1,0x10(%rbx,%rsi,8)
movupd %xmm1,0x20(%rbx,%rsi,8)
movupd %xmm1,0x30(%rbx,%rsi,8)
movupd %xmm1,0x40(%rbx,%rsi,8)
movupd %xmm1,0x50(%rbx,%rsi,8)
movupd %xmm1,0x60(%rbx,%rsi,8)
movupd %xmm1,0x70(%rbx,%rsi,8)
movupd %xmm1,0x80(%rbx,%rsi,8)
movupd %xmm1,0x90(%rbx,%rsi,8)
movupd %xmm1,0xa0(%rbx,%rsi,8)
movupd %xmm1,0xb0(%rbx,%rsi,8)
movupd %xmm1,0xc0(%rbx,%rsi,8)
movupd %xmm1,0xd0(%rbx,%rsi,8)
movupd %xmm1,0xe0(%rbx,%rsi,8)
movupd %xmm1,0xf0(%rbx,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    16d0 <DiscreteGamma+0x5a0>
test   %rcx,%rcx
je     1784 <DiscreteGamma+0x654>
lea    (%rbx,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd %xmm1,-0x10(%rdx,%rsi,1)
movupd %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    1770 <DiscreteGamma+0x640>
cmp    %r12,%rax
je     179e <DiscreteGamma+0x66e>
nopl   0x0(%rax)
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1790 <DiscreteGamma+0x660>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @DiscreteGamma(double* nocapture %0, double* nocapture %1, double %2, double %3, i32 %4, i32 %5) {
%7 = fdiv double %2, %3
%8 = sitofp i32 %4 to double
%9 = fmul double %7, %8
%10 = icmp eq i32 %5, 0
br i1 %10, label %11, label %18
11: ; preds = %6
%12 = icmp sgt i32 %4, 0
br i1 %12, label %13, label %431
13: ; preds = %11
%14 = fmul double %8, 2.000000e+00
%15 = fmul double %2, 2.000000e+00
%16 = fmul double %3, 2.000000e+00
%17 = zext i32 %4 to i64
br label %209
18: ; preds = %6
%19 = fadd double %2, 1.000000e+00
%20 = tail call double @LnGamma(double %19)
%21 = add i32 %4, -1
%22 = icmp sgt i32 %4, 1
br i1 %22, label %23, label %50
23: ; preds = %18
%24 = fmul double %2, 2.000000e+00
%25 = fmul double %3, 2.000000e+00
%26 = zext i32 %21 to i64
br label %30
27: ; preds = %30
br i1 %22, label %28, label %50
28: ; preds = %27
%29 = zext i32 %21 to i64
br label %42
30: ; preds = %23, %30
%31 = phi i64 [ 0, %23 ], [ %40, %30 ]
%32 = trunc i64 %31 to i32
%33 = sitofp i32 %32 to double
%34 = fadd double %33, 1.000000e+00
%35 = fdiv double %34, %8
%36 = fptosi double %35 to i32
%37 = tail call double @PointChi2(i32 %36, double %24)
%38 = fdiv double %37, %25
%39 = getelementptr inbounds double, double* %0, i64 %31
store double %38, double* %39
%40 = add nuw nsw i64 %31, 1
%41 = icmp eq i64 %40, %26
br i1 %41, label %27, label %30
42: ; preds = %28, %42
%43 = phi i64 [ 0, %28 ], [ %48, %42 ]
%44 = getelementptr inbounds double, double* %0, i64 %43
%45 = load double, double* %44
%46 = fmul double %45, %3
%47 = tail call double @IncompleteGamma(double %46, double %19, double %20)
store double %47, double* %44
%48 = add nuw nsw i64 %43, 1
%49 = icmp eq i64 %48, %29
br i1 %49, label %50, label %42
50: ; preds = %42, %18, %27
%51 = load double, double* %0
%52 = fmul double %9, %51
store double %52, double* %1
%53 = add nsw i32 %4, -2
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %0, i64 %54
%56 = load double, double* %55
%57 = fsub double 1.000000e+00, %56
%58 = fmul double %9, %57
%59 = sext i32 %21 to i64
%60 = getelementptr inbounds double, double* %1, i64 %59
store double %58, double* %60
%61 = icmp sgt i32 %4, 2
br i1 %61, label %62, label %345
62: ; preds = %50
%63 = zext i32 %21 to i64
%64 = add nsw i64 %63, -1
%65 = icmp ult i64 %64, 4
br i1 %65, label %163, label %66
66: ; preds = %62
%67 = getelementptr double, double* %1, i64 1
%68 = getelementptr double, double* %1, i64 %63
%69 = getelementptr double, double* %0, i64 %63
%70 = icmp ult double* %67, %69
%71 = icmp ugt double* %68, %0
%72 = and i1 %70, %71
br i1 %72, label %163, label %73
73: ; preds = %66
%74 = and i64 %64, -4
%75 = or i64 %74, 1
%76 = insertelement <2 x double> poison, double %9, i64 0
%77 = shufflevector <2 x double> %76, <2 x double> poison, <2 x i32> zeroinitializer
%78 = insertelement <2 x double> poison, double %9, i64 0
%79 = shufflevector <2 x double> %78, <2 x double> poison, <2 x i32> zeroinitializer
%80 = add nsw i64 %74, -4
%81 = lshr exact i64 %80, 2
%82 = add nuw nsw i64 %81, 1
%83 = and i64 %82, 1
%84 = icmp eq i64 %80, 0
br i1 %84, label %136, label %85
85: ; preds = %73
%86 = and i64 %82, 9223372036854775806
br label %87
87: ; preds = %87, %85
%88 = phi i64 [ 0, %85 ], [ %133, %87 ]
%89 = phi i64 [ 0, %85 ], [ %134, %87 ]
%90 = or i64 %88, 1
%91 = getelementptr inbounds double, double* %0, i64 %90
%92 = bitcast double* %91 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = getelementptr inbounds double, double* %91, i64 2
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = getelementptr inbounds double, double* %0, i64 %88
%98 = bitcast double* %97 to <2 x double>*
%99 = load <2 x double>, <2 x double>* %98
%100 = getelementptr inbounds double, double* %97, i64 2
%101 = bitcast double* %100 to <2 x double>*
%102 = load <2 x double>, <2 x double>* %101
%103 = fsub <2 x double> %93, %99
%104 = fsub <2 x double> %96, %102
%105 = fmul <2 x double> %77, %103
%106 = fmul <2 x double> %79, %104
%107 = getelementptr inbounds double, double* %1, i64 %90
%108 = bitcast double* %107 to <2 x double>*
store <2 x double> %105, <2 x double>* %108
%109 = getelementptr inbounds double, double* %107, i64 2
%110 = bitcast double* %109 to <2 x double>*
store <2 x double> %106, <2 x double>* %110
%111 = or i64 %88, 4
%112 = or i64 %88, 5
%113 = getelementptr inbounds double, double* %0, i64 %112
%114 = bitcast double* %113 to <2 x double>*
%115 = load <2 x double>, <2 x double>* %114
%116 = getelementptr inbounds double, double* %113, i64 2
%117 = bitcast double* %116 to <2 x double>*
%118 = load <2 x double>, <2 x double>* %117
%119 = getelementptr inbounds double, double* %0, i64 %111
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds double, double* %119, i64 2
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = fsub <2 x double> %115, %121
%126 = fsub <2 x double> %118, %124
%127 = fmul <2 x double> %77, %125
%128 = fmul <2 x double> %79, %126
%129 = getelementptr inbounds double, double* %1, i64 %112
%130 = bitcast double* %129 to <2 x double>*
store <2 x double> %127, <2 x double>* %130
%131 = getelementptr inbounds double, double* %129, i64 2
%132 = bitcast double* %131 to <2 x double>*
store <2 x double> %128, <2 x double>* %132
%133 = add nuw i64 %88, 8
%134 = add i64 %89, 2
%135 = icmp eq i64 %134, %86
br i1 %135, label %136, label %87
136: ; preds = %87, %73
%137 = phi i64 [ 0, %73 ], [ %133, %87 ]
%138 = icmp eq i64 %83, 0
br i1 %138, label %161, label %139
139: ; preds = %136
%140 = or i64 %137, 1
%141 = getelementptr inbounds double, double* %0, i64 %140
%142 = bitcast double* %141 to <2 x double>*
%143 = load <2 x double>, <2 x double>* %142
%144 = getelementptr inbounds double, double* %141, i64 2
%145 = bitcast double* %144 to <2 x double>*
%146 = load <2 x double>, <2 x double>* %145
%147 = getelementptr inbounds double, double* %0, i64 %137
%148 = bitcast double* %147 to <2 x double>*
%149 = load <2 x double>, <2 x double>* %148
%150 = getelementptr inbounds double, double* %147, i64 2
%151 = bitcast double* %150 to <2 x double>*
%152 = load <2 x double>, <2 x double>* %151
%153 = fsub <2 x double> %143, %149
%154 = fsub <2 x double> %146, %152
%155 = fmul <2 x double> %77, %153
%156 = fmul <2 x double> %79, %154
%157 = getelementptr inbounds double, double* %1, i64 %140
%158 = bitcast double* %157 to <2 x double>*
store <2 x double> %155, <2 x double>* %158
%159 = getelementptr inbounds double, double* %157, i64 2
%160 = bitcast double* %159 to <2 x double>*
store <2 x double> %156, <2 x double>* %160
br label %161
161: ; preds = %136, %139
%162 = icmp eq i64 %64, %74
br i1 %162, label %345, label %163
163: ; preds = %66, %62, %161
%164 = phi i64 [ 1, %66 ], [ 1, %62 ], [ %75, %161 ]
%165 = xor i64 %164, -1
%166 = and i64 %63, 1
%167 = icmp eq i64 %166, 0
br i1 %167, label %168, label %178
168: ; preds = %163
%169 = getelementptr inbounds double, double* %0, i64 %164
%170 = load double, double* %169
%171 = add nsw i64 %164, -1
%172 = getelementptr inbounds double, double* %0, i64 %171
%173 = load double, double* %172
%174 = fsub double %170, %173
%175 = fmul double %9, %174
%176 = getelementptr inbounds double, double* %1, i64 %164
store double %175, double* %176
%177 = add nuw nsw i64 %164, 1
br label %178
178: ; preds = %168, %163
%179 = phi i64 [ %164, %163 ], [ %177, %168 ]
%180 = sub nsw i64 0, %63
%181 = icmp eq i64 %165, %180
br i1 %181, label %345, label %182
182: ; preds = %178, %182
%183 = phi i64 [ %200, %182 ], [ %179, %178 ]
%184 = getelementptr inbounds double, double* %0, i64 %183
%185 = load double, double* %184
%186 = add nsw i64 %183, -1
%187 = getelementptr inbounds double, double* %0, i64 %186
%188 = load double, double* %187
%189 = fsub double %185, %188
%190 = fmul double %9, %189
%191 = getelementptr inbounds double, double* %1, i64 %183
store double %190, double* %191
%192 = add nuw nsw i64 %183, 1
%193 = getelementptr inbounds double, double* %0, i64 %192
%194 = load double, double* %193
%195 = getelementptr inbounds double, double* %0, i64 %183
%196 = load double, double* %195
%197 = fsub double %194, %196
%198 = fmul double %9, %197
%199 = getelementptr inbounds double, double* %1, i64 %192
store double %198, double* %199
%200 = add nuw nsw i64 %183, 2
%201 = icmp eq i64 %200, %63
br i1 %201, label %345, label %182
202: ; preds = %209
br i1 %12, label %203, label %431
203: ; preds = %202
%204 = add nsw i64 %17, -1
%205 = and i64 %17, 7
%206 = icmp ult i64 %204, 7
br i1 %206, label %221, label %207
207: ; preds = %203
%208 = and i64 %17, 4294967288
br label %300
209: ; preds = %13, %209
%210 = phi i64 [ 0, %13 ], [ %219, %209 ]
%211 = trunc i64 %210 to i32
%212 = sitofp i32 %211 to double
%213 = tail call double @llvm.fmuladd.f64(double %212, double 2.000000e+00, double 1.000000e+00)
%214 = fdiv double %213, %14
%215 = fptosi double %214 to i32
%216 = tail call double @PointChi2(i32 %215, double %15)
%217 = fdiv double %216, %16
%218 = getelementptr inbounds double, double* %1, i64 %210
store double %217, double* %218
%219 = add nuw nsw i64 %210, 1
%220 = icmp eq i64 %219, %17
br i1 %220, label %202, label %209
221: ; preds = %300, %203
%222 = phi double [ undef, %203 ], [ %334, %300 ]
%223 = phi i64 [ 0, %203 ], [ %335, %300 ]
%224 = phi double [ 0.000000e+00, %203 ], [ %334, %300 ]
%225 = icmp eq i64 %205, 0
br i1 %225, label %236, label %226
226: ; preds = %221, %226
%227 = phi i64 [ %233, %226 ], [ %223, %221 ]
%228 = phi double [ %232, %226 ], [ %224, %221 ]
%229 = phi i64 [ %234, %226 ], [ 0, %221 ]
%230 = getelementptr inbounds double, double* %1, i64 %227
%231 = load double, double* %230
%232 = fadd double %228, %231
%233 = add nuw nsw i64 %227, 1
%234 = add i64 %229, 1
%235 = icmp eq i64 %234, %205
br i1 %235, label %236, label %226
236: ; preds = %226, %221
%237 = phi double [ %222, %221 ], [ %232, %226 ]
br i1 %12, label %238, label %431
238: ; preds = %236
%239 = fdiv double %9, %237
%240 = zext i32 %4 to i64
%241 = icmp ult i32 %4, 4
br i1 %241, label %298, label %242
242: ; preds = %238
%243 = and i64 %17, 4294967292
%244 = insertelement <2 x double> poison, double %239, i64 0
%245 = shufflevector <2 x double> %244, <2 x double> poison, <2 x i32> zeroinitializer
%246 = insertelement <2 x double> poison, double %239, i64 0
%247 = shufflevector <2 x double> %246, <2 x double> poison, <2 x i32> zeroinitializer
%248 = add nsw i64 %243, -4
%249 = lshr exact i64 %248, 2
%250 = add nuw nsw i64 %249, 1
%251 = and i64 %250, 1
%252 = icmp eq i64 %248, 0
br i1 %252, label %282, label %253
253: ; preds = %242
%254 = and i64 %250, 9223372036854775806
br label %255
255: ; preds = %255, %253
%256 = phi i64 [ 0, %253 ], [ %279, %255 ]
%257 = phi i64 [ 0, %253 ], [ %280, %255 ]
%258 = getelementptr inbounds double, double* %1, i64 %256
%259 = bitcast double* %258 to <2 x double>*
%260 = load <2 x double>, <2 x double>* %259
%261 = getelementptr inbounds double, double* %258, i64 2
%262 = bitcast double* %261 to <2 x double>*
%263 = load <2 x double>, <2 x double>* %262
%264 = fmul <2 x double> %245, %260
%265 = fmul <2 x double> %247, %263
%266 = bitcast double* %258 to <2 x double>*
store <2 x double> %264, <2 x double>* %266
%267 = bitcast double* %261 to <2 x double>*
store <2 x double> %265, <2 x double>* %267
%268 = or i64 %256, 4
%269 = getelementptr inbounds double, double* %1, i64 %268
%270 = bitcast double* %269 to <2 x double>*
%271 = load <2 x double>, <2 x double>* %270
%272 = getelementptr inbounds double, double* %269, i64 2
%273 = bitcast double* %272 to <2 x double>*
%274 = load <2 x double>, <2 x double>* %273
%275 = fmul <2 x double> %245, %271
%276 = fmul <2 x double> %247, %274
%277 = bitcast double* %269 to <2 x double>*
store <2 x double> %275, <2 x double>* %277
%278 = bitcast double* %272 to <2 x double>*
store <2 x double> %276, <2 x double>* %278
%279 = add nuw i64 %256, 8
%280 = add i64 %257, 2
%281 = icmp eq i64 %280, %254
br i1 %281, label %282, label %255
282: ; preds = %255, %242
%283 = phi i64 [ 0, %242 ], [ %279, %255 ]
%284 = icmp eq i64 %251, 0
br i1 %284, label %296, label %285
285: ; preds = %282
%286 = getelementptr inbounds double, double* %1, i64 %283
%287 = bitcast double* %286 to <2 x double>*
%288 = load <2 x double>, <2 x double>* %287
%289 = getelementptr inbounds double, double* %286, i64 2
%290 = bitcast double* %289 to <2 x double>*
%291 = load <2 x double>, <2 x double>* %290
%292 = fmul <2 x double> %245, %288
%293 = fmul <2 x double> %247, %291
%294 = bitcast double* %286 to <2 x double>*
store <2 x double> %292, <2 x double>* %294
%295 = bitcast double* %289 to <2 x double>*
store <2 x double> %293, <2 x double>* %295
br label %296
296: ; preds = %282, %285
%297 = icmp eq i64 %243, %17
br i1 %297, label %345, label %298
298: ; preds = %238, %296
%299 = phi i64 [ 0, %238 ], [ %243, %296 ]
br label %338
300: ; preds = %300, %207
%301 = phi i64 [ 0, %207 ], [ %335, %300 ]
%302 = phi double [ 0.000000e+00, %207 ], [ %334, %300 ]
%303 = phi i64 [ 0, %207 ], [ %336, %300 ]
%304 = getelementptr inbounds double, double* %1, i64 %301
%305 = load double, double* %304
%306 = fadd double %302, %305
%307 = or i64 %301, 1
%308 = getelementptr inbounds double, double* %1, i64 %307
%309 = load double, double* %308
%310 = fadd double %306, %309
%311 = or i64 %301, 2
%312 = getelementptr inbounds double, double* %1, i64 %311
%313 = load double, double* %312
%314 = fadd double %310, %313
%315 = or i64 %301, 3
%316 = getelementptr inbounds double, double* %1, i64 %315
%317 = load double, double* %316
%318 = fadd double %314, %317
%319 = or i64 %301, 4
%320 = getelementptr inbounds double, double* %1, i64 %319
%321 = load double, double* %320
%322 = fadd double %318, %321
%323 = or i64 %301, 5
%324 = getelementptr inbounds double, double* %1, i64 %323
%325 = load double, double* %324
%326 = fadd double %322, %325
%327 = or i64 %301, 6
%328 = getelementptr inbounds double, double* %1, i64 %327
%329 = load double, double* %328
%330 = fadd double %326, %329
%331 = or i64 %301, 7
%332 = getelementptr inbounds double, double* %1, i64 %331
%333 = load double, double* %332
%334 = fadd double %330, %333
%335 = add nuw nsw i64 %301, 8
%336 = add i64 %303, 8
%337 = icmp eq i64 %336, %208
br i1 %337, label %221, label %300
338: ; preds = %298, %338
%339 = phi i64 [ %343, %338 ], [ %299, %298 ]
%340 = getelementptr inbounds double, double* %1, i64 %339
%341 = load double, double* %340
%342 = fmul double %239, %341
store double %342, double* %340
%343 = add nuw nsw i64 %339, 1
%344 = icmp eq i64 %343, %240
br i1 %344, label %345, label %338
345: ; preds = %178, %182, %338, %161, %296, %50
%346 = icmp sgt i32 %4, 0
br i1 %346, label %347, label %431
347: ; preds = %345
%348 = fdiv double 1.000000e+00, %8
%349 = zext i32 %4 to i64
%350 = icmp ult i32 %4, 4
br i1 %350, label %424, label %351
351: ; preds = %347
%352 = and i64 %349, 4294967292
%353 = insertelement <2 x double> poison, double %348, i64 0
%354 = shufflevector <2 x double> %353, <2 x double> poison, <2 x i32> zeroinitializer
%355 = insertelement <2 x double> poison, double %348, i64 0
%356 = shufflevector <2 x double> %355, <2 x double> poison, <2 x i32> zeroinitializer
%357 = add nsw i64 %352, -4
%358 = lshr exact i64 %357, 2
%359 = add nuw nsw i64 %358, 1
%360 = and i64 %359, 7
%361 = icmp ult i64 %357, 28
br i1 %361, label %409, label %362
362: ; preds = %351
%363 = and i64 %359, 9223372036854775800
br label %364
364: ; preds = %364, %362
%365 = phi i64 [ 0, %362 ], [ %406, %364 ]
%366 = phi i64 [ 0, %362 ], [ %407, %364 ]
%367 = getelementptr inbounds double, double* %0, i64 %365
%368 = bitcast double* %367 to <2 x double>*
store <2 x double> %354, <2 x double>* %368
%369 = getelementptr inbounds double, double* %367, i64 2
%370 = bitcast double* %369 to <2 x double>*
store <2 x double> %356, <2 x double>* %370
%371 = or i64 %365, 4
%372 = getelementptr inbounds double, double* %0, i64 %371
%373 = bitcast double* %372 to <2 x double>*
store <2 x double> %354, <2 x double>* %373
%374 = getelementptr inbounds double, double* %372, i64 2
%375 = bitcast double* %374 to <2 x double>*
store <2 x double> %356, <2 x double>* %375
%376 = or i64 %365, 8
%377 = getelementptr inbounds double, double* %0, i64 %376
%378 = bitcast double* %377 to <2 x double>*
store <2 x double> %354, <2 x double>* %378
%379 = getelementptr inbounds double, double* %377, i64 2
%380 = bitcast double* %379 to <2 x double>*
store <2 x double> %356, <2 x double>* %380
%381 = or i64 %365, 12
%382 = getelementptr inbounds double, double* %0, i64 %381
%383 = bitcast double* %382 to <2 x double>*
store <2 x double> %354, <2 x double>* %383
%384 = getelementptr inbounds double, double* %382, i64 2
%385 = bitcast double* %384 to <2 x double>*
store <2 x double> %356, <2 x double>* %385
%386 = or i64 %365, 16
%387 = getelementptr inbounds double, double* %0, i64 %386
%388 = bitcast double* %387 to <2 x double>*
store <2 x double> %354, <2 x double>* %388
%389 = getelementptr inbounds double, double* %387, i64 2
%390 = bitcast double* %389 to <2 x double>*
store <2 x double> %356, <2 x double>* %390
%391 = or i64 %365, 20
%392 = getelementptr inbounds double, double* %0, i64 %391
%393 = bitcast double* %392 to <2 x double>*
store <2 x double> %354, <2 x double>* %393
%394 = getelementptr inbounds double, double* %392, i64 2
%395 = bitcast double* %394 to <2 x double>*
store <2 x double> %356, <2 x double>* %395
%396 = or i64 %365, 24
%397 = getelementptr inbounds double, double* %0, i64 %396
%398 = bitcast double* %397 to <2 x double>*
store <2 x double> %354, <2 x double>* %398
%399 = getelementptr inbounds double, double* %397, i64 2
%400 = bitcast double* %399 to <2 x double>*
store <2 x double> %356, <2 x double>* %400
%401 = or i64 %365, 28
%402 = getelementptr inbounds double, double* %0, i64 %401
%403 = bitcast double* %402 to <2 x double>*
store <2 x double> %354, <2 x double>* %403
%404 = getelementptr inbounds double, double* %402, i64 2
%405 = bitcast double* %404 to <2 x double>*
store <2 x double> %356, <2 x double>* %405
%406 = add nuw i64 %365, 32
%407 = add i64 %366, 8
%408 = icmp eq i64 %407, %363
br i1 %408, label %409, label %364
409: ; preds = %364, %351
%410 = phi i64 [ 0, %351 ], [ %406, %364 ]
%411 = icmp eq i64 %360, 0
br i1 %411, label %422, label %412
412: ; preds = %409, %412
%413 = phi i64 [ %419, %412 ], [ %410, %409 ]
%414 = phi i64 [ %420, %412 ], [ 0, %409 ]
%415 = getelementptr inbounds double, double* %0, i64 %413
%416 = bitcast double* %415 to <2 x double>*
store <2 x double> %354, <2 x double>* %416
%417 = getelementptr inbounds double, double* %415, i64 2
%418 = bitcast double* %417 to <2 x double>*
store <2 x double> %356, <2 x double>* %418
%419 = add nuw i64 %413, 4
%420 = add i64 %414, 1
%421 = icmp eq i64 %420, %360
br i1 %421, label %422, label %412
422: ; preds = %412, %409
%423 = icmp eq i64 %352, %349
br i1 %423, label %431, label %424
424: ; preds = %347, %422
%425 = phi i64 [ 0, %347 ], [ %352, %422 ]
br label %426
426: ; preds = %424, %426
%427 = phi i64 [ %429, %426 ], [ %425, %424 ]
%428 = getelementptr inbounds double, double* %0, i64 %427
store double %348, double* %428
%429 = add nuw nsw i64 %427, 1
%430 = icmp eq i64 %429, %349
br i1 %430, label %431, label %426
431: ; preds = %426, %422, %11, %202, %236, %345
ret i32 0
}