#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ malloc(int);
double distgen(int *d, int *na, double *a, double *ds) {
  int i, j, k, nb;
  double *x1, *x2;
  x1 = (double *)malloc(*na * sizeof(double));
  x2 = (double *)malloc(*na * sizeof(double));
  for (i = 1; i < *d; i++) {
    for (k = 0; k < *na; k++)
      x1[k] = a[i * (*na) + k];
    for (j = 0; j < i; j++) {
      nb = 0;
      for (k = 0; k < *na; k++) {
        x2[k] = a[j * (*na) + k];
        if (x1[k] == x2[k])
          nb++;
      }
      for (k = 0; k < (*na / 2); k++) {
        if (x1[2 * k] == x2[2 * k + 1])
          nb++;
        if (x1[2 * k + 1] == x2[2 * k])
          nb++;
      }
      ds[j * (*d) + i] = 1.0 - (double)(nb) / (double)(*na * 2);
    }
  }
}


x86 assembly (clang, -O0):
<distgen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq (%rax),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    135b <distgen+0x24b>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    11b4 <distgen+0xa4>
mov    -0x20(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    -0x18(%rbp),%rdx
imul   (%rdx),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1171 <distgen+0x61>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1348 <distgen+0x238>
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    124c <distgen+0x13c>
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x18(%rbp),%rdx
imul   (%rdx),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1239 <distgen+0x129>
jp     1239 <distgen+0x129>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    123e <distgen+0x12e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11d5 <distgen+0xc5>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
cmp    %ecx,%eax
jge    12ff <distgen+0x1ef>
mov    -0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    12b0 <distgen+0x1a0>
jp     12b0 <distgen+0x1a0>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    12ec <distgen+0x1dc>
jp     12ec <distgen+0x1dc>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12f1 <distgen+0x1e1>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1253 <distgen+0x143>
cvtsi2sdl -0x38(%rbp),%xmm1
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
divsd  %xmm0,%xmm1
movsd  0xce3(%rip),%xmm0
subsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    -0x10(%rbp),%rdx
imul   (%rdx),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11bb <distgen+0xab>
jmp    134d <distgen+0x23d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    115b <distgen+0x4b>
movsd  -0x8(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distgen>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rcx,0xc0(%rsp)
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r13
mov    (%rsi),%edi
shl    $0x3,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    (%r12),%edi
shl    $0x3,%edi
call   1030 <malloc@plt>
mov    0x0(%r13),%ecx
mov    %rcx,0x48(%rsp)
cmp    $0x2,%ecx
jl     1787 <distgen+0x677>
mov    (%r12),%edx
mov    %edx,%r11d
shr    $0x1f,%r11d
add    %edx,%r11d
sar    %r11d
lea    (%rdx,%rdx,1),%ecx
cvtsi2sd %ecx,%xmm9
movslq %edx,%r15
lea    (%rax,%rdx,8),%r8
lea    (%rbx,%rdx,8),%rcx
mov    %r15d,%ebp
and    $0xfffffffc,%ebp
mov    %rbp,0x30(%rsp)
add    $0xfffffffffffffffc,%rbp
mov    %rbp,0x68(%rsp)
shr    $0x2,%rbp
add    $0x1,%rbp
mov    %ebp,%edi
and    $0x3,%edi
and    $0xfffffffffffffffc,%rbp
mov    %rbp,0x50(%rsp)
mov    %r15d,%r9d
and    $0x3,%r9d
mov    %rcx,0x70(%rsp)
cmp    %rcx,%rax
setb   %r10b
mov    %r8,0xb0(%rsp)
cmp    %r8,%rbx
setb   %cl
and    %r10b,%cl
mov    %cl,0x7(%rsp)
mov    %rdx,%rcx
neg    %rcx
mov    %rcx,0xb8(%rsp)
mov    %r11d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0xa8(%rsp)
mov    %rdi,0x60(%rsp)
mov    %rdi,%r8
shl    $0x5,%r8
lea    0x0(,%rdx,8),%r10
and    $0xffffffffffffffe0,%r10
mov    %r11,0x10(%rsp)
shl    $0x4,%r11
and    $0xffffffffffffffc0,%r11
movsd  0xde3(%rip),%xmm8
lea    (%r15,%rdx,1),%rcx
mov    %rcx,0x78(%rsp)
lea    (%r14,%r15,8),%r13
add    $0x70,%r13
lea    0x0(,%r15,8),%rcx
mov    %rcx,0x40(%rsp)
lea    0x10(%rbx),%rcx
mov    %rcx,0x58(%rsp)
lea    0x10(%r14),%rcx
mov    %rcx,0x20(%rsp)
lea    (%r14,%r15,8),%rsi
lea    0x8(%r14),%rcx
mov    %rcx,0x80(%rsp)
mov    $0x1,%r12d
xor    %ecx,%ecx
mov    %rcx,0x28(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x8(%rsp)
mov    %r15,0x38(%rsp)
mov    %r9,0x90(%rsp)
mov    %r8,0x88(%rsp)
jmp    12df <distgen+0x1cf>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
addq   $0x1,0x28(%rsp)
mov    0xa0(%rsp),%r13
mov    0x40(%rsp),%rcx
add    %rcx,%r13
mov    0x38(%rsp),%r15
add    %r15,0x18(%rsp)
mov    0x98(%rsp),%rsi
add    %rcx,%rsi
cmp    0x48(%rsp),%r12
mov    0x8(%rsp),%r14
mov    0x90(%rsp),%r9
mov    0x88(%rsp),%r8
je     1787 <distgen+0x677>
test   %edx,%edx
jle    1460 <distgen+0x350>
cmp    $0x4,%edx
jb     1318 <distgen+0x208>
mov    0x28(%rsp),%rcx
imul   %r15,%rcx
mov    0x78(%rsp),%rdi
add    %rcx,%rdi
lea    (%r14,%rdi,8),%rdi
cmp    %rdi,%rbx
jae    138c <distgen+0x27c>
add    %r15,%rcx
lea    (%r14,%rcx,8),%rcx
cmp    0x70(%rsp),%rcx
jae    138c <distgen+0x27c>
xor    %ecx,%ecx
mov    %rcx,%rdi
not    %rdi
add    %rdx,%rdi
test   %r9,%r9
je     1344 <distgen+0x234>
mov    %r9,%rbp
nopl   0x0(%rax,%rax,1)
movq   (%rsi,%rcx,8),%xmm2
movq   %xmm2,(%rbx,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rbp
jne    1330 <distgen+0x220>
cmp    $0x3,%rdi
jb     1460 <distgen+0x350>
xchg   %ax,%ax
movsd  (%rsi,%rcx,8),%xmm2
movsd  %xmm2,(%rbx,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm2
movsd  %xmm2,0x8(%rbx,%rcx,8)
movsd  0x10(%rsi,%rcx,8),%xmm2
movsd  %xmm2,0x10(%rbx,%rcx,8)
movq   0x18(%rsi,%rcx,8),%xmm2
movq   %xmm2,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1350 <distgen+0x240>
jmp    1460 <distgen+0x350>
cmpq   $0xc,0x68(%rsp)
jae    1398 <distgen+0x288>
xor    %ecx,%ecx
jmp    1405 <distgen+0x2f5>
mov    0x50(%rsp),%rdi
xor    %ecx,%ecx
nop
movups -0x70(%r13,%rcx,8),%xmm2
movups -0x60(%r13,%rcx,8),%xmm3
movups %xmm2,(%rbx,%rcx,8)
movups %xmm3,0x10(%rbx,%rcx,8)
movups -0x50(%r13,%rcx,8),%xmm2
movups -0x40(%r13,%rcx,8),%xmm3
movups %xmm2,0x20(%rbx,%rcx,8)
movups %xmm3,0x30(%rbx,%rcx,8)
movups -0x30(%r13,%rcx,8),%xmm2
movups -0x20(%r13,%rcx,8),%xmm3
movups %xmm2,0x40(%rbx,%rcx,8)
movups %xmm3,0x50(%rbx,%rcx,8)
movdqu -0x10(%r13,%rcx,8),%xmm2
movdqu 0x0(%r13,%rcx,8),%xmm3
movdqu %xmm2,0x60(%rbx,%rcx,8)
movdqu %xmm3,0x70(%rbx,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rdi
jne    13a0 <distgen+0x290>
cmpq   $0x0,0x60(%rsp)
je     144f <distgen+0x33f>
mov    0x58(%rsp),%rdi
lea    (%rdi,%rcx,8),%rdi
add    0x18(%rsp),%rcx
mov    0x20(%rsp),%rbp
lea    0x0(,%rcx,8),%rcx
add    %rbp,%rcx
xor    %ebp,%ebp
nopl   (%rax)
movdqu -0x10(%rcx,%rbp,1),%xmm2
movdqu (%rcx,%rbp,1),%xmm3
movdqu %xmm2,-0x10(%rdi,%rbp,1)
movdqu %xmm3,(%rdi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r8
jne    1430 <distgen+0x320>
mov    0x30(%rsp),%rdi
mov    %rdi,%rcx
cmp    %rdx,%rdi
jne    131a <distgen+0x20a>
mov    %rsi,0x98(%rsp)
mov    %r13,0xa0(%rsp)
mov    0x80(%rsp),%r13
mov    0x20(%rsp),%rdi
xor    %r15d,%r15d
jmp    14d7 <distgen+0x3c7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %r8d,%xmm0
divsd  %xmm9,%xmm0
movapd %xmm8,%xmm1
subsd  %xmm0,%xmm1
mov    %r15,%rcx
imul   0x48(%rsp),%rcx
add    %r12,%rcx
mov    0xc0(%rsp),%rsi
movsd  %xmm1,(%rsi,%rcx,8)
add    $0x1,%r15
mov    0x40(%rsp),%rcx
add    %rcx,%rdi
add    %rcx,%r13
cmp    %r12,%r15
je     1290 <distgen+0x180>
test   %edx,%edx
jle    1530 <distgen+0x420>
mov    %r15,%r14
imul   0x38(%rsp),%r14
cmp    $0x4,%edx
jb     1519 <distgen+0x409>
lea    (%r14,%rdx,1),%rcx
mov    0x8(%rsp),%rsi
lea    (%rsi,%r14,8),%rbp
lea    (%rsi,%rcx,8),%rcx
cmp    %rcx,%rax
setb   %r8b
cmp    0xb0(%rsp),%rbp
setb   %cl
and    %r8b,%cl
or     0x7(%rsp),%cl
je     15c1 <distgen+0x4b1>
xor    %r9d,%r9d
xor    %r8d,%r8d
test   $0x1,%dl
jne    1540 <distgen+0x430>
mov    %r9,%rcx
jmp    156a <distgen+0x45a>
nopl   0x0(%rax)
xor    %r8d,%r8d
jmp    1640 <distgen+0x530>
nopl   0x0(%rax,%rax,1)
add    %r9,%r14
mov    0x8(%rsp),%rcx
movsd  (%rcx,%r14,8),%xmm2
movsd  %xmm2,(%rax,%r9,8)
cmpeqsd (%rbx,%r9,8),%xmm2
movq   %xmm2,%rcx
sub    %ecx,%r8d
mov    %r9,%rcx
or     $0x1,%rcx
not    %r9
cmp    0xb8(%rsp),%r9
je     1640 <distgen+0x530>
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r13,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cmpeqsd (%rbx,%rcx,8),%xmm0
movq   %xmm0,%rbp
sub    %ebp,%r8d
movsd  0x0(%r13,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rax,%rcx,8)
cmpeqsd 0x8(%rbx,%rcx,8),%xmm0
movq   %xmm0,%rbp
sub    %ebp,%r8d
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    1580 <distgen+0x470>
jmp    1640 <distgen+0x530>
pxor   %xmm2,%xmm2
xor    %ecx,%ecx
pxor   %xmm3,%xmm3
nopl   0x0(%rax,%rax,1)
movupd -0x10(%rdi,%rcx,1),%xmm4
movupd (%rdi,%rcx,1),%xmm5
movupd %xmm4,(%rax,%rcx,1)
movupd %xmm5,0x10(%rax,%rcx,1)
movupd (%rbx,%rcx,1),%xmm6
movupd 0x10(%rbx,%rcx,1),%xmm7
cmpeqpd %xmm4,%xmm6
shufps $0xe8,%xmm6,%xmm6
psubd  %xmm6,%xmm2
cmpeqpd %xmm5,%xmm7
shufps $0xe8,%xmm7,%xmm7
psubd  %xmm7,%xmm3
add    $0x20,%rcx
cmp    %rcx,%r10
jne    15d0 <distgen+0x4c0>
paddd  %xmm2,%xmm3
pshufd $0x55,%xmm3,%xmm2
paddd  %xmm3,%xmm2
movd   %xmm2,%r8d
mov    0x30(%rsp),%rcx
mov    %rcx,%r9
cmp    %rdx,%rcx
jne    151f <distgen+0x40f>
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%edx
jl     1490 <distgen+0x380>
cmpl   $0x4,0x10(%rsp)
jae    1660 <distgen+0x550>
xor    %ecx,%ecx
jmp    1740 <distgen+0x630>
nopw   0x0(%rax,%rax,1)
movd   %r8d,%xmm3
pxor   %xmm2,%xmm2
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd (%rbx,%rcx,1),%xmm4
movupd 0x10(%rbx,%rcx,1),%xmm5
movupd 0x20(%rbx,%rcx,1),%xmm6
movupd 0x30(%rbx,%rcx,1),%xmm7
movapd %xmm4,%xmm1
unpcklpd %xmm5,%xmm1
movapd %xmm6,%xmm10
unpcklpd %xmm7,%xmm10
unpckhpd %xmm5,%xmm4
unpckhpd %xmm7,%xmm6
movupd (%rax,%rcx,1),%xmm5
movupd 0x10(%rax,%rcx,1),%xmm12
movupd 0x20(%rax,%rcx,1),%xmm0
movupd 0x30(%rax,%rcx,1),%xmm11
movapd %xmm5,%xmm7
unpcklpd %xmm12,%xmm7
cmpeqpd %xmm4,%xmm7
movapd %xmm0,%xmm4
unpcklpd %xmm11,%xmm4
cmpeqpd %xmm6,%xmm4
unpckhpd %xmm12,%xmm5
cmpeqpd %xmm1,%xmm5
unpckhpd %xmm11,%xmm0
cmpeqpd %xmm10,%xmm0
shufps $0xe8,%xmm5,%xmm5
psubd  %xmm5,%xmm3
shufps $0xe8,%xmm0,%xmm0
psubd  %xmm0,%xmm2
shufps $0xe8,%xmm7,%xmm7
psubd  %xmm7,%xmm3
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm2
add    $0x40,%rcx
cmp    %rcx,%r11
jne    1670 <distgen+0x560>
paddd  %xmm3,%xmm2
pshufd $0x55,%xmm2,%xmm0
paddd  %xmm2,%xmm0
movd   %xmm0,%r8d
mov    0xa8(%rsp),%rsi
mov    %rsi,%rcx
cmp    0x10(%rsp),%rsi
je     1490 <distgen+0x380>
mov    0x10(%rsp),%rbp
sub    %rcx,%rbp
shl    $0x4,%rcx
or     $0x8,%rcx
movsd  -0x8(%rax,%rcx,1),%xmm0
movsd  (%rax,%rcx,1),%xmm1
cmpeqsd -0x8(%rbx,%rcx,1),%xmm1
movq   %xmm1,%rsi
sub    %esi,%r8d
cmpeqsd (%rbx,%rcx,1),%xmm0
movq   %xmm0,%rsi
sub    %esi,%r8d
add    $0x10,%rcx
add    $0xffffffffffffffff,%rbp
jne    1750 <distgen+0x640>
jmp    1490 <distgen+0x380>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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