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


x86 assembly (clang, -O0):
<DiscreteGamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %edx,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm0
movsd  0xeab(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x2c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jne    11b0 <DiscreteGamma+0x80>
mov    -0x18(%rbp),%rax
movsd  0xe60(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    147a <DiscreteGamma+0x34a>
cmpl   $0x0,-0x30(%rbp)
je     12ab <DiscreteGamma+0x17b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1229 <DiscreteGamma+0xf9>
cvtsi2sdl -0x34(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe22(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe15(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <PointChi2@plt>
movsd  0xe03(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c1 <DiscreteGamma+0x91>
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1269 <DiscreteGamma+0x139>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1238 <DiscreteGamma+0x108>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12a6 <DiscreteGamma+0x176>
movsd  -0x50(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1270 <DiscreteGamma+0x140>
jmp    1434 <DiscreteGamma+0x304>
movsd  0xd4d(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <LnGamma@plt>
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1336 <DiscreteGamma+0x206>
cvtsi2sdl -0x34(%rbp),%xmm0
movsd  0xd19(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x2c(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xd08(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <PointChi2@plt>
movsd  0xcf6(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12c9 <DiscreteGamma+0x199>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1392 <DiscreteGamma+0x262>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xc98(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
call   1030 <IncompleteGamma@plt>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    133d <DiscreteGamma+0x20d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xc44(%rip),%xmm0
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    142f <DiscreteGamma+0x2ff>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13df <DiscreteGamma+0x2af>
jmp    1434 <DiscreteGamma+0x304>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1473 <DiscreteGamma+0x343>
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  0xbac(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    143b <DiscreteGamma+0x30b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DiscreteGamma>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%rbx
cmp    $0x1,%edx
jne    1164 <DiscreteGamma+0x34>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %edx,%r13d
movapd %xmm0,%xmm3
mov    %rdi,%r15
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  0xe83(%rip),%xmm5
movapd %xmm3,%xmm2
divsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
mov    %edx,%r12d
test   %ecx,%ecx
je     124d <DiscreteGamma+0x11d>
test   %r13d,%r13d
jle    1153 <DiscreteGamma+0x23>
movapd %xmm2,0x40(%rsp)
movsd  %xmm0,0x20(%rsp)
addsd  %xmm0,%xmm0
movapd %xmm5,%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rsp)
addsd  %xmm3,%xmm3
addsd  %xmm1,%xmm1
xor    %ebp,%ebp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,0x10(%rsp)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm5,%xmm0
mulsd  0x28(%rsp),%xmm0
cvttsd2si %xmm0,%edi
movapd %xmm3,%xmm0
call   1040 <PointChi2@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movsd  0xdfa(%rip),%xmm5
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r12
jne    11d0 <DiscreteGamma+0xa0>
test   %r13d,%r13d
movsd  0x20(%rsp),%xmm6
movapd 0x40(%rsp),%xmm7
jle    1153 <DiscreteGamma+0x23>
lea    -0x1(%r12),%rcx
mov    %r12d,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    147e <DiscreteGamma+0x34e>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    14c8 <DiscreteGamma+0x398>
movapd %xmm2,0x40(%rsp)
movsd  %xmm0,0x20(%rsp)
movsd  0xd9f(%rip),%xmm0
addsd  %xmm3,%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,0x10(%rsp)
call   1050 <LnGamma@plt>
lea    -0x1(%r13),%eax
mov    %eax,0x1c(%rsp)
cmp    $0x2,%r13d
jl     1350 <DiscreteGamma+0x220>
movsd  %xmm0,0x30(%rsp)
mov    %r13,%rbp
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
mov    0x1c(%rsp),%r14d
xor    %r13d,%r13d
movsd  %xmm1,0x10(%rsp)
nop
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
movsd  0xd30(%rip),%xmm2
addsd  %xmm2,%xmm0
divsd  0x20(%rsp),%xmm0
cvttsd2si %xmm0,%edi
movapd %xmm1,%xmm0
call   1040 <PointChi2@plt>
movsd  0x10(%rsp),%xmm1
divsd  0x28(%rsp),%xmm0
movsd  %xmm0,(%r15,%r13,8)
add    $0x1,%r13
cmp    %r13,%r14
jne    12c0 <DiscreteGamma+0x190>
mov    %rbp,%r13
cmp    $0x2,%r13d
movsd  0x8(%rsp),%xmm3
movsd  0x38(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
jl     1350 <DiscreteGamma+0x220>
xor    %ebp,%ebp
nop
movsd  (%r15,%rbp,8),%xmm0
mulsd  %xmm3,%xmm0
call   1030 <IncompleteGamma@plt>
movsd  0x30(%rsp),%xmm2
movsd  0x38(%rsp),%xmm1
movsd  0x8(%rsp),%xmm3
movsd  %xmm0,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1320 <DiscreteGamma+0x1f0>
movsd  (%r15),%xmm0
movapd 0x40(%rsp),%xmm4
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%rbx)
movslq %r13d,%rax
movsd  0xc92(%rip),%xmm5
movapd %xmm5,%xmm0
subsd  -0x10(%r15,%rax,8),%xmm0
mulsd  %xmm4,%xmm0
mov    0x1c(%rsp),%ecx
movslq %ecx,%rax
movsd  %xmm0,(%rbx,%rax,8)
cmp    $0x3,%r13d
movsd  0x20(%rsp),%xmm6
jl     1696 <DiscreteGamma+0x566>
mov    %ecx,%eax
lea    -0x1(%rax),%rdx
mov    $0x1,%ecx
cmp    $0x4,%rdx
jb     162e <DiscreteGamma+0x4fe>
lea    0x8(%rbx),%rsi
lea    (%r15,%rax,8),%rdi
cmp    %rdi,%rsi
jae    13c8 <DiscreteGamma+0x298>
lea    (%rbx,%rax,8),%rsi
cmp    %r15,%rsi
ja     162e <DiscreteGamma+0x4fe>
mov    %rdx,%rcx
and    $0xfffffffffffffffc,%rcx
movapd %xmm4,%xmm0
unpcklpd %xmm4,%xmm0
lea    -0x4(%rcx),%rsi
mov    %rsi,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
test   %rsi,%rsi
je     15dc <DiscreteGamma+0x4ac>
mov    %rbp,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd (%r15,%rsi,8),%xmm1
movupd 0x8(%r15,%rsi,8),%xmm2
subpd  %xmm1,%xmm2
movupd 0x10(%r15,%rsi,8),%xmm1
movupd 0x18(%r15,%rsi,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x8(%rbx,%rsi,8)
movupd %xmm3,0x18(%rbx,%rsi,8)
movupd 0x20(%r15,%rsi,8),%xmm1
movupd 0x28(%r15,%rsi,8),%xmm2
subpd  %xmm1,%xmm2
movupd 0x30(%r15,%rsi,8),%xmm1
movupd 0x38(%r15,%rsi,8),%xmm3
subpd  %xmm1,%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x28(%rbx,%rsi,8)
movupd %xmm3,0x38(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1400 <DiscreteGamma+0x2d0>
jmp    15de <DiscreteGamma+0x4ae>
mov    %r12d,%edx
and    $0xfffffff8,%edx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
addsd  (%rbx,%rcx,8),%xmm0
addsd  0x8(%rbx,%rcx,8),%xmm0
addsd  0x10(%rbx,%rcx,8),%xmm0
addsd  0x18(%rbx,%rcx,8),%xmm0
addsd  0x20(%rbx,%rcx,8),%xmm0
addsd  0x28(%rbx,%rcx,8),%xmm0
addsd  0x30(%rbx,%rcx,8),%xmm0
addsd  0x38(%rbx,%rcx,8),%xmm0
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    1490 <DiscreteGamma+0x360>
test   %rax,%rax
je     14ee <DiscreteGamma+0x3be>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addsd  (%rcx,%rdx,8),%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    14e0 <DiscreteGamma+0x3b0>
test   %r13d,%r13d
jle    1153 <DiscreteGamma+0x23>
divsd  %xmm0,%xmm7
cmp    $0x4,%r12d
jae    1508 <DiscreteGamma+0x3d8>
xor    %eax,%eax
jmp    15c0 <DiscreteGamma+0x490>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm7,%xmm0
unpcklpd %xmm7,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     158a <DiscreteGamma+0x45a>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd (%rbx,%rcx,8),%xmm1
movupd 0x10(%rbx,%rcx,8),%xmm2
movupd 0x20(%rbx,%rcx,8),%xmm3
movupd 0x30(%rbx,%rcx,8),%xmm4
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rcx,8)
movupd %xmm2,0x10(%rbx,%rcx,8)
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd %xmm3,0x20(%rbx,%rcx,8)
movupd %xmm4,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1540 <DiscreteGamma+0x410>
jmp    158c <DiscreteGamma+0x45c>
xor    %ecx,%ecx
test   $0x1,%dl
je     15af <DiscreteGamma+0x47f>
movupd (%rbx,%rcx,8),%xmm1
movupd 0x10(%rbx,%rcx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rcx,8)
movupd %xmm2,0x10(%rbx,%rcx,8)
cmp    %r12,%rax
je     1696 <DiscreteGamma+0x566>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
mulsd  %xmm7,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    15c0 <DiscreteGamma+0x490>
jmp    1696 <DiscreteGamma+0x566>
xor    %esi,%esi
test   $0x1,%bpl
je     1625 <DiscreteGamma+0x4f5>
lea    0x0(,%rsi,8),%rdi
or     $0x8,%rdi
movupd (%r15,%rdi,1),%xmm1
movupd 0x10(%r15,%rdi,1),%xmm2
movupd (%r15,%rsi,8),%xmm3
subpd  %xmm3,%xmm1
movupd 0x10(%r15,%rsi,8),%xmm3
subpd  %xmm3,%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rdi,1)
movupd %xmm2,0x10(%rbx,%rdi,1)
cmp    %rcx,%rdx
je     1696 <DiscreteGamma+0x566>
or     $0x1,%rcx
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
jne    1652 <DiscreteGamma+0x522>
movsd  (%r15,%rcx,8),%xmm0
subsd  -0x8(%r15,%rcx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    %rax,%rdx
je     1696 <DiscreteGamma+0x566>
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rcx,8),%xmm0
subsd  -0x8(%r15,%rcx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%r15,%rcx,8),%xmm0
subsd  (%r15,%rcx,8),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    1660 <DiscreteGamma+0x530>
test   %r13d,%r13d
jle    1153 <DiscreteGamma+0x23>
divsd  %xmm6,%xmm5
cmp    $0x4,%r13d
jae    16b0 <DiscreteGamma+0x580>
xor    %eax,%eax
jmp    17d0 <DiscreteGamma+0x6a0>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rsi
jae    16df <DiscreteGamma+0x5af>
xor    %esi,%esi
jmp    1795 <DiscreteGamma+0x665>
movabs $0x7ffffffffffffffe,%rsi
ff ff 7f
add    $0xfffffffffffffffa,%rsi
and    %rsi,%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd %xmm0,(%r15,%rsi,8)
movupd %xmm0,0x10(%r15,%rsi,8)
movupd %xmm0,0x20(%r15,%rsi,8)
movupd %xmm0,0x30(%r15,%rsi,8)
movupd %xmm0,0x40(%r15,%rsi,8)
movupd %xmm0,0x50(%r15,%rsi,8)
movupd %xmm0,0x60(%r15,%rsi,8)
movupd %xmm0,0x70(%r15,%rsi,8)
movupd %xmm0,0x80(%r15,%rsi,8)
movupd %xmm0,0x90(%r15,%rsi,8)
movupd %xmm0,0xa0(%r15,%rsi,8)
movupd %xmm0,0xb0(%r15,%rsi,8)
movupd %xmm0,0xc0(%r15,%rsi,8)
movupd %xmm0,0xd0(%r15,%rsi,8)
movupd %xmm0,0xe0(%r15,%rsi,8)
movupd %xmm0,0xf0(%r15,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    1700 <DiscreteGamma+0x5d0>
test   %rcx,%rcx
je     17c4 <DiscreteGamma+0x694>
lea    (%r15,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm0,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rcx
jne    17b0 <DiscreteGamma+0x680>
cmp    %r12,%rax
je     1153 <DiscreteGamma+0x23>
nopl   (%rax)
movsd  %xmm5,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    17d0 <DiscreteGamma+0x6a0>
jmp    1153 <DiscreteGamma+0x23>

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

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