void fill_hardy_weinberg(double **exact_HW, int asize, int n) {
  double **marg, sum, p;
  int i, j, naa, nab, nbb, Na, Nb, start, expect;
  marg = dmatrix(0, asize, 0, n);
  for (i = 0; i <= asize; i++)
    for (j = 0; j <= n; j++)
      exact_HW[i][j] = marg[i][j] = 0.0;
  for (i = 1; i <= asize; i++) {
    Na = 2 * n - i;
    Nb = i;
    p = (double)i / (double)(Na + Nb);
    expect = ceil(i * (1.0 - p));
    if (i % 2 == 0) {
      if (expect % 2 == 1)
        start = expect - 1;
      else
        start = expect;
    } else {
      if (expect % 2 == 1)
        start = expect;
      else
        start = expect - 1;
    }
    sum = marg[i][start] = 1.0;
    nbb = ((Nb - start) / 2);
    naa = ((Na - start) / 2);
    for (nab = start + 2; naa > 0 && nbb > 0; nab += 2, naa--, nbb--) {
      marg[i][nab] = marg[i][nab - 2] * 4.0 * ((double)naa * (double)nbb) /
                     ((double)(nab) * (double)(nab - 1.0));
      sum += marg[i][nab];
    }
    nbb = ((Nb - start) / 2);
    naa = ((Na - start) / 2);
    for (nab = start - 2; nab >= 0; nab -= 2, naa++, nbb++) {
      marg[i][nab] = marg[i][nab + 2] *
                     ((double)(nab + 2.0) * (double)(nab + 1.0)) /
                     ((double)4.0 * ((double)(naa + 1.0) * (nbb + 1.0)));
      sum += marg[i][nab];
    }
    for (j = 0; j <= n; j++)
      marg[i][j] /= sum;
  }
  for (i = 0; i <= asize; i++)
    for (j = 0; j <= n; j++) {
      exact_HW[i][j] = log(marg[i][j]);
    }
  free_dmatrix(marg, 0, asize, 0, n);
}


x86 assembly (clang, -O0):
<fill_hardy_weinberg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%edi
mov    $0x0,%al
call   1040 <dmatrix@plt>
cltq
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11e0 <fill_hardy_weinberg+0xa0>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11cd <fill_hardy_weinberg+0x8d>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1183 <fill_hardy_weinberg+0x43>
jmp    11d2 <fill_hardy_weinberg+0x92>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1170 <fill_hardy_weinberg+0x30>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     152b <fill_hardy_weinberg+0x3eb>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm0
mov    -0x40(%rbp),%eax
add    -0x44(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x2c(%rbp),%xmm0
movsd  0xdd6(%rip),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <ceil@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1280 <fill_hardy_weinberg+0x140>
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1275 <fill_hardy_weinberg+0x135>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    127b <fill_hardy_weinberg+0x13b>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    12ad <fill_hardy_weinberg+0x16d>
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    129f <fill_hardy_weinberg+0x15f>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    12a8 <fill_hardy_weinberg+0x168>
mov    -0x4c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12ad <fill_hardy_weinberg+0x16d>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x48(%rbp),%rcx
movsd  0xd3b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xd2e(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x44(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x38(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x34(%rbp)
mov    %al,-0x4d(%rbp)
jle    131b <fill_hardy_weinberg+0x1db>
cmpl   $0x0,-0x3c(%rbp)
setg   %al
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
test   $0x1,%al
jne    132b <fill_hardy_weinberg+0x1eb>
jmp    13d1 <fill_hardy_weinberg+0x291>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xcc0(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
cvtsi2sdl -0x3c(%rbp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
cvtsi2sdl -0x38(%rbp),%xmm2
movsd  0xc8f(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x38(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    1302 <fill_hardy_weinberg+0x1c2>
mov    -0x44(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%eax
sub    -0x48(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x48(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jl     14d4 <fill_hardy_weinberg+0x394>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x38(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x38(%rbp),%xmm1
movsd  0xbe3(%rip),%xmm2
addsd  %xmm2,%xmm1
cvtsi2sdl -0x38(%rbp),%xmm2
movsd  0xbc2(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x34(%rbp),%xmm2
movsd  0xba9(%rip),%xmm1
addsd  %xmm1,%xmm2
cvtsi2sdl -0x3c(%rbp),%xmm1
movsd  0xb98(%rip),%xmm3
addsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  0xb90(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x38(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13fc <fill_hardy_weinberg+0x2bc>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1518 <fill_hardy_weinberg+0x3d8>
movsd  -0x20(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    14db <fill_hardy_weinberg+0x39b>
jmp    151d <fill_hardy_weinberg+0x3dd>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11e7 <fill_hardy_weinberg+0xa7>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     15a1 <fill_hardy_weinberg+0x461>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     158e <fill_hardy_weinberg+0x44e>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1050 <log@plt>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1545 <fill_hardy_weinberg+0x405>
jmp    1593 <fill_hardy_weinberg+0x453>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1532 <fill_hardy_weinberg+0x3f2>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%r8d
xor    %ecx,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1060 <free_dmatrix@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_hardy_weinberg>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r12
xor    %edi,%edi
xor    %edx,%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1040 <dmatrix@plt>
movslq %eax,%r13
mov    %rbx,0x8(%rsp)
test   %ebx,%ebx
js     16b3 <fill_hardy_weinberg+0x573>
lea    0x1(%r15),%r14d
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    %r14d,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r10
mov    %r10,(%rsp)
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10d,%r9d
and    $0x3,%r9d
and    $0xfffffffffffffffc,%r10
mov    %r14d,%r8d
and    $0x3,%r8d
mov    %r9,%rsi
shl    $0x5,%rsi
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
jmp    11cf <fill_hardy_weinberg+0x8f>
nopl   (%rax)
add    $0x1,%rcx
cmp    0x10(%rsp),%rcx
je     1350 <fill_hardy_weinberg+0x210>
test   %r15d,%r15d
js     11c0 <fill_hardy_weinberg+0x80>
mov    0x0(%r13,%rcx,8),%rdx
mov    (%r12,%rcx,8),%rax
cmp    $0x4,%r14d
jb     11fd <fill_hardy_weinberg+0xbd>
lea    (%rax,%r14,8),%rdi
cmp    %rdi,%rdx
jae    1284 <fill_hardy_weinberg+0x144>
lea    (%rdx,%r14,8),%rdi
cmp    %rdi,%rax
jae    1284 <fill_hardy_weinberg+0x144>
xor    %ebp,%ebp
mov    %rbp,%rdi
not    %rdi
add    %r14,%rdi
test   %r8,%r8
je     122a <fill_hardy_weinberg+0xea>
mov    %r8,%rbx
movq   $0x0,(%rdx,%rbp,8)
movq   $0x0,(%rax,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rbx
jne    1210 <fill_hardy_weinberg+0xd0>
cmp    $0x3,%rdi
jb     11c0 <fill_hardy_weinberg+0x80>
movq   $0x0,(%rdx,%rbp,8)
movq   $0x0,(%rax,%rbp,8)
movq   $0x0,0x8(%rdx,%rbp,8)
movq   $0x0,0x8(%rax,%rbp,8)
movq   $0x0,0x10(%rdx,%rbp,8)
movq   $0x0,0x10(%rax,%rbp,8)
movq   $0x0,0x18(%rdx,%rbp,8)
movq   $0x0,0x18(%rax,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r14
jne    1230 <fill_hardy_weinberg+0xf0>
jmp    11c0 <fill_hardy_weinberg+0x80>
cmpq   $0xc,(%rsp)
jae    128f <fill_hardy_weinberg+0x14f>
xor    %ebp,%ebp
jmp    1308 <fill_hardy_weinberg+0x1c8>
mov    %r10,%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd %xmm0,(%rdx,%rbp,8)
movupd %xmm0,0x10(%rdx,%rbp,8)
movupd %xmm0,(%rax,%rbp,8)
movupd %xmm0,0x10(%rax,%rbp,8)
movupd %xmm0,0x20(%rdx,%rbp,8)
movupd %xmm0,0x30(%rdx,%rbp,8)
movupd %xmm0,0x20(%rax,%rbp,8)
movupd %xmm0,0x30(%rax,%rbp,8)
movupd %xmm0,0x40(%rdx,%rbp,8)
movupd %xmm0,0x50(%rdx,%rbp,8)
movupd %xmm0,0x40(%rax,%rbp,8)
movupd %xmm0,0x50(%rax,%rbp,8)
movupd %xmm0,0x60(%rdx,%rbp,8)
movupd %xmm0,0x70(%rdx,%rbp,8)
movupd %xmm0,0x60(%rax,%rbp,8)
movupd %xmm0,0x70(%rax,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rdi
jne    12a0 <fill_hardy_weinberg+0x160>
test   %r9,%r9
je     133f <fill_hardy_weinberg+0x1ff>
lea    (%rax,%rbp,8),%rdi
add    $0x10,%rdi
lea    (%rdx,%rbp,8),%rbx
add    $0x10,%rbx
xor    %ebp,%ebp
nop
movupd %xmm0,-0x10(%rbx,%rbp,1)
movupd %xmm0,(%rbx,%rbp,1)
movupd %xmm0,-0x10(%rdi,%rbp,1)
movupd %xmm0,(%rdi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rsi
jne    1320 <fill_hardy_weinberg+0x1e0>
mov    %r11,%rbp
cmp    %r14,%r11
je     11c0 <fill_hardy_weinberg+0x80>
jmp    11ff <fill_hardy_weinberg+0xbf>
mov    %r15,(%rsp)
cmpl   $0x0,0x8(%rsp)
jle    1657 <fill_hardy_weinberg+0x517>
mov    (%rsp),%rax
add    %eax,%eax
mov    %eax,0x1c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x40(%rsp)
mov    %r14d,%eax
and    $0xfffffffe,%eax
mov    %rax,0x38(%rsp)
add    $0xfffffffffffffffe,%rax
mov    %rax,0x30(%rsp)
mov    %rax,%rcx
shr    %rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x28(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x20(%rsp)
mov    $0x1,%r15d
movsd  0xc4c(%rip),%xmm8
jmp    13cf <fill_hardy_weinberg+0x28f>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    0x10(%rsp),%r15
je     1657 <fill_hardy_weinberg+0x517>
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
movapd %xmm1,%xmm2
divsd  0x40(%rsp),%xmm2
movapd %xmm8,%xmm0
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  0xc15(%rip),%xmm6
movsd  0xc05(%rip),%xmm4
movsd  0xbf4(%rip),%xmm8
cvttsd2si %xmm0,%r9d
mov    %r9d,%eax
shr    $0x1f,%eax
add    %r9d,%eax
and    $0xfffffffe,%eax
mov    %r9d,%ecx
sub    %eax,%ecx
xor    %eax,%eax
xor    %edx,%edx
cmp    $0x1,%ecx
sete   %al
setne  %dl
test   $0x1,%r15b
cmove  %eax,%edx
movzbl %dl,%r8d
mov    %r9d,%r10d
sub    %r8d,%r10d
neg    %r8d
mov    0x0(%r13,%r15,8),%rax
movslq %r10d,%rcx
movabs $0x3ff0000000000000,%rdx
mov    %rdx,(%rax,%rcx,8)
lea    (%r10,%r15,1),%esi
mov    %r15d,%edx
sub    %ecx,%edx
mov    %edx,%ecx
shr    $0x1f,%ecx
add    %edx,%ecx
sar    %ecx
mov    0x1c(%rsp),%edi
sub    %esi,%edi
mov    %edi,%ebp
shr    $0x1f,%ebp
add    %edi,%ebp
sar    %ebp
movapd %xmm8,%xmm0
cmp    $0x2,%edi
jl     1504 <fill_hardy_weinberg+0x3c4>
movapd %xmm8,%xmm0
cmp    $0x2,%edx
jl     1504 <fill_hardy_weinberg+0x3c4>
movslq %r9d,%rbx
mov    %r8d,%edx
and    $0x1,%edx
sub    %rdx,%rbx
movsd  (%rax,%rbx,8),%xmm1
movapd %xmm8,%xmm0
mov    %ecx,%esi
mov    %ebp,%edx
nopl   0x0(%rax)
mov    %rbx,%rdi
add    $0x2,%rbx
mulsd  %xmm4,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
xorps  %xmm3,%xmm3
cvtsi2sd %esi,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ebx,%xmm2
movapd %xmm2,%xmm3
addsd  %xmm6,%xmm3
mulsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
movsd  %xmm1,0x10(%rax,%rdi,8)
addsd  %xmm1,%xmm0
cmp    $0x2,%edx
jl     1504 <fill_hardy_weinberg+0x3c4>
add    $0xffffffff,%edx
lea    -0x1(%rsi),%edi
cmp    $0x1,%esi
mov    %edi,%esi
jg     14b0 <fill_hardy_weinberg+0x370>
cmp    $0x2,%r10d
jl     159e <fill_hardy_weinberg+0x45e>
mov    %r10d,%edx
movsd  (%rax,%rdx,8),%xmm1
lea    (%r9,%r8,1),%esi
add    $0x2,%esi
movapd 0xafb(%rip),%xmm6
movapd 0xb03(%rip),%xmm7
movapd 0xb0b(%rip),%xmm5
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x4(%rsi),%edx
movd   %ebp,%xmm2
movd   %edx,%xmm3
punpckldq %xmm2,%xmm3
cvtdq2pd %xmm3,%xmm2
shufpd $0x2,%xmm5,%xmm1
movapd %xmm2,%xmm3
addpd  %xmm6,%xmm3
xorps  %xmm4,%xmm4
cvtsi2sd %ecx,%xmm4
unpcklpd %xmm4,%xmm2
addpd  %xmm7,%xmm2
mulpd  %xmm3,%xmm2
mulpd  %xmm1,%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rax,%rdx,8)
addsd  %xmm2,%xmm0
add    $0x1,%ebp
add    $0x1,%ecx
add    $0xfffffffe,%esi
movapd %xmm2,%xmm1
cmp    $0x3,%esi
ja     1540 <fill_hardy_weinberg+0x400>
cmpl   $0x0,(%rsp)
js     13c0 <fill_hardy_weinberg+0x280>
cmp    $0x2,%r14d
jae    15c0 <fill_hardy_weinberg+0x480>
xor    %ecx,%ecx
jmp    1630 <fill_hardy_weinberg+0x4f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x0,0x30(%rsp)
je     164c <fill_hardy_weinberg+0x50c>
mov    0x20(%rsp),%rdx
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movupd (%rax,%rcx,8),%xmm2
movupd 0x10(%rax,%rcx,8),%xmm3
divpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rcx,8)
divpd  %xmm1,%xmm3
movupd %xmm3,0x10(%rax,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rdx
jne    15e0 <fill_hardy_weinberg+0x4a0>
testb  $0x1,0x28(%rsp)
je     161d <fill_hardy_weinberg+0x4dd>
movupd (%rax,%rcx,8),%xmm2
divpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rcx,8)
mov    0x38(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r14,%rdx
je     13c0 <fill_hardy_weinberg+0x280>
xchg   %ax,%ax
movsd  (%rax,%rcx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%r14
jne    1630 <fill_hardy_weinberg+0x4f0>
jmp    13c0 <fill_hardy_weinberg+0x280>
xor    %ecx,%ecx
testb  $0x1,0x28(%rsp)
jne    160f <fill_hardy_weinberg+0x4cf>
jmp    161d <fill_hardy_weinberg+0x4dd>
cmpl   $0x0,0x8(%rsp)
mov    (%rsp),%r15
js     16b3 <fill_hardy_weinberg+0x573>
xor    %ebp,%ebp
jmp    167b <fill_hardy_weinberg+0x53b>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
je     16b3 <fill_hardy_weinberg+0x573>
test   %r15d,%r15d
js     1670 <fill_hardy_weinberg+0x530>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x0(%r13,%rbp,8),%rax
movsd  (%rax,%rbx,8),%xmm0
call   1050 <log@plt>
mov    (%r12,%rbp,8),%rax
movsd  %xmm0,(%rax,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1690 <fill_hardy_weinberg+0x550>
jmp    1670 <fill_hardy_weinberg+0x530>
mov    %r13,%rdi
xor    %esi,%esi
mov    0x8(%rsp),%rdx
xor    %ecx,%ecx
mov    %r15d,%r8d
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <free_dmatrix@plt>

LLVM IR (-O0):
define void @fill_hardy_weinberg(double** %0, i32 %1, i32 %2) {
%4 = alloca double**
%5 = alloca i32
%6 = alloca i32
%7 = alloca double**
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store double** %0, double*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 0, i32 %19, i32 0, i32 %20)
%22 = sext i32 %21 to i64
%23 = inttoptr i64 %22 to double**
store double** %23, double*** %7
store i32 0, i32* %10
br label %24
24: ; preds = %54, %3
%25 = load i32, i32* %10
%26 = load i32, i32* %5
%27 = icmp sle i32 %25, %26
br i1 %27, label %28, label %57
28: ; preds = %24
store i32 0, i32* %11
br label %29
29: ; preds = %50, %28
%30 = load i32, i32* %11
%31 = load i32, i32* %6
%32 = icmp sle i32 %30, %31
br i1 %32, label %33, label %53
33: ; preds = %29
%34 = load double**, double*** %7
%35 = load i32, i32* %10
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double*, double** %34, i64 %36
%38 = load double*, double** %37
%39 = load i32, i32* %11
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double 0.000000e+00, double* %41
%42 = load double**, double*** %4
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double*, double** %42, i64 %44
%46 = load double*, double** %45
%47 = load i32, i32* %11
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %46, i64 %48
store double 0.000000e+00, double* %49
br label %50
50: ; preds = %33
%51 = load i32, i32* %11
%52 = add nsw i32 %51, 1
store i32 %52, i32* %11
br label %29
53: ; preds = %29
br label %54
54: ; preds = %53
%55 = load i32, i32* %10
%56 = add nsw i32 %55, 1
store i32 %56, i32* %10
br label %24
57: ; preds = %24
store i32 1, i32* %10
br label %58
58: ; preds = %272, %57
%59 = load i32, i32* %10
%60 = load i32, i32* %5
%61 = icmp sle i32 %59, %60
br i1 %61, label %62, label %275
62: ; preds = %58
%63 = load i32, i32* %6
%64 = mul nsw i32 2, %63
%65 = load i32, i32* %10
%66 = sub nsw i32 %64, %65
store i32 %66, i32* %15
%67 = load i32, i32* %10
store i32 %67, i32* %16
%68 = load i32, i32* %10
%69 = sitofp i32 %68 to double
%70 = load i32, i32* %15
%71 = load i32, i32* %16
%72 = add nsw i32 %70, %71
%73 = sitofp i32 %72 to double
%74 = fdiv double %69, %73
store double %74, double* %9
%75 = load i32, i32* %10
%76 = sitofp i32 %75 to double
%77 = load double, double* %9
%78 = fsub double 1.000000e+00, %77
%79 = fmul double %76, %78
%80 = call double @llvm.ceil.f64(double %79)
%81 = fptosi double %80 to i32
store i32 %81, i32* %18
%82 = load i32, i32* %10
%83 = srem i32 %82, 2
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %95
85: ; preds = %62
%86 = load i32, i32* %18
%87 = srem i32 %86, 2
%88 = icmp eq i32 %87, 1
br i1 %88, label %89, label %92
89: ; preds = %85
%90 = load i32, i32* %18
%91 = sub nsw i32 %90, 1
store i32 %91, i32* %17
br label %94
92: ; preds = %85
%93 = load i32, i32* %18
store i32 %93, i32* %17
br label %94
94: ; preds = %92, %89
br label %105
95: ; preds = %62
%96 = load i32, i32* %18
%97 = srem i32 %96, 2
%98 = icmp eq i32 %97, 1
br i1 %98, label %99, label %101
99: ; preds = %95
%100 = load i32, i32* %18
store i32 %100, i32* %17
br label %104
101: ; preds = %95
%102 = load i32, i32* %18
%103 = sub nsw i32 %102, 1
store i32 %103, i32* %17
br label %104
104: ; preds = %101, %99
br label %105
105: ; preds = %104, %94
%106 = load double**, double*** %7
%107 = load i32, i32* %10
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double*, double** %106, i64 %108
%110 = load double*, double** %109
%111 = load i32, i32* %17
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %110, i64 %112
store double 1.000000e+00, double* %113
store double 1.000000e+00, double* %8
%114 = load i32, i32* %16
%115 = load i32, i32* %17
%116 = sub nsw i32 %114, %115
%117 = sdiv i32 %116, 2
store i32 %117, i32* %14
%118 = load i32, i32* %15
%119 = load i32, i32* %17
%120 = sub nsw i32 %118, %119
%121 = sdiv i32 %120, 2
store i32 %121, i32* %12
%122 = load i32, i32* %17
%123 = add nsw i32 %122, 2
store i32 %123, i32* %13
br label %124
124: ; preds = %176, %105
%125 = load i32, i32* %12
%126 = icmp sgt i32 %125, 0
br i1 %126, label %127, label %130
127: ; preds = %124
%128 = load i32, i32* %14
%129 = icmp sgt i32 %128, 0
br label %130
130: ; preds = %127, %124
%131 = phi i1 [ false, %124 ], [ %129, %127 ]
br i1 %131, label %132, label %183
132: ; preds = %130
%133 = load double**, double*** %7
%134 = load i32, i32* %10
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double*, double** %133, i64 %135
%137 = load double*, double** %136
%138 = load i32, i32* %13
%139 = sub nsw i32 %138, 2
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %137, i64 %140
%142 = load double, double* %141
%143 = fmul double %142, 4.000000e+00
%144 = load i32, i32* %12
%145 = sitofp i32 %144 to double
%146 = load i32, i32* %14
%147 = sitofp i32 %146 to double
%148 = fmul double %145, %147
%149 = fmul double %143, %148
%150 = load i32, i32* %13
%151 = sitofp i32 %150 to double
%152 = load i32, i32* %13
%153 = sitofp i32 %152 to double
%154 = fsub double %153, 1.000000e+00
%155 = fmul double %151, %154
%156 = fdiv double %149, %155
%157 = load double**, double*** %7
%158 = load i32, i32* %10
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double*, double** %157, i64 %159
%161 = load double*, double** %160
%162 = load i32, i32* %13
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
store double %156, double* %164
%165 = load double**, double*** %7
%166 = load i32, i32* %10
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds double*, double** %165, i64 %167
%169 = load double*, double** %168
%170 = load i32, i32* %13
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds double, double* %169, i64 %171
%173 = load double, double* %172
%174 = load double, double* %8
%175 = fadd double %174, %173
store double %175, double* %8
br label %176
176: ; preds = %132
%177 = load i32, i32* %13
%178 = add nsw i32 %177, 2
store i32 %178, i32* %13
%179 = load i32, i32* %12
%180 = add nsw i32 %179, -1
store i32 %180, i32* %12
%181 = load i32, i32* %14
%182 = add nsw i32 %181, -1
store i32 %182, i32* %14
br label %124
183: ; preds = %130
%184 = load i32, i32* %16
%185 = load i32, i32* %17
%186 = sub nsw i32 %184, %185
%187 = sdiv i32 %186, 2
store i32 %187, i32* %14
%188 = load i32, i32* %15
%189 = load i32, i32* %17
%190 = sub nsw i32 %188, %189
%191 = sdiv i32 %190, 2
store i32 %191, i32* %12
%192 = load i32, i32* %17
%193 = sub nsw i32 %192, 2
store i32 %193, i32* %13
br label %194
194: ; preds = %244, %183
%195 = load i32, i32* %13
%196 = icmp sge i32 %195, 0
br i1 %196, label %197, label %251
197: ; preds = %194
%198 = load double**, double*** %7
%199 = load i32, i32* %10
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double*, double** %198, i64 %200
%202 = load double*, double** %201
%203 = load i32, i32* %13
%204 = add nsw i32 %203, 2
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds double, double* %202, i64 %205
%207 = load double, double* %206
%208 = load i32, i32* %13
%209 = sitofp i32 %208 to double
%210 = fadd double %209, 2.000000e+00
%211 = load i32, i32* %13
%212 = sitofp i32 %211 to double
%213 = fadd double %212, 1.000000e+00
%214 = fmul double %210, %213
%215 = fmul double %207, %214
%216 = load i32, i32* %12
%217 = sitofp i32 %216 to double
%218 = fadd double %217, 1.000000e+00
%219 = load i32, i32* %14
%220 = sitofp i32 %219 to double
%221 = fadd double %220, 1.000000e+00
%222 = fmul double %218, %221
%223 = fmul double 4.000000e+00, %222
%224 = fdiv double %215, %223
%225 = load double**, double*** %7
%226 = load i32, i32* %10
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double*, double** %225, i64 %227
%229 = load double*, double** %228
%230 = load i32, i32* %13
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %229, i64 %231
store double %224, double* %232
%233 = load double**, double*** %7
%234 = load i32, i32* %10
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double*, double** %233, i64 %235
%237 = load double*, double** %236
%238 = load i32, i32* %13
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds double, double* %237, i64 %239
%241 = load double, double* %240
%242 = load double, double* %8
%243 = fadd double %242, %241
store double %243, double* %8
br label %244
244: ; preds = %197
%245 = load i32, i32* %13
%246 = sub nsw i32 %245, 2
store i32 %246, i32* %13
%247 = load i32, i32* %12
%248 = add nsw i32 %247, 1
store i32 %248, i32* %12
%249 = load i32, i32* %14
%250 = add nsw i32 %249, 1
store i32 %250, i32* %14
br label %194
251: ; preds = %194
store i32 0, i32* %11
br label %252
252: ; preds = %268, %251
%253 = load i32, i32* %11
%254 = load i32, i32* %6
%255 = icmp sle i32 %253, %254
br i1 %255, label %256, label %271
256: ; preds = %252
%257 = load double, double* %8
%258 = load double**, double*** %7
%259 = load i32, i32* %10
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds double*, double** %258, i64 %260
%262 = load double*, double** %261
%263 = load i32, i32* %11
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds double, double* %262, i64 %264
%266 = load double, double* %265
%267 = fdiv double %266, %257
store double %267, double* %265
br label %268
268: ; preds = %256
%269 = load i32, i32* %11
%270 = add nsw i32 %269, 1
store i32 %270, i32* %11
br label %252
271: ; preds = %252
br label %272
272: ; preds = %271
%273 = load i32, i32* %10
%274 = add nsw i32 %273, 1
store i32 %274, i32* %10
br label %58
275: ; preds = %58
store i32 0, i32* %10
br label %276
276: ; preds = %308, %275
%277 = load i32, i32* %10
%278 = load i32, i32* %5
%279 = icmp sle i32 %277, %278
br i1 %279, label %280, label %311
280: ; preds = %276
store i32 0, i32* %11
br label %281
281: ; preds = %304, %280
%282 = load i32, i32* %11
%283 = load i32, i32* %6
%284 = icmp sle i32 %282, %283
br i1 %284, label %285, label %307
285: ; preds = %281
%286 = load double**, double*** %7
%287 = load i32, i32* %10
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double*, double** %286, i64 %288
%290 = load double*, double** %289
%291 = load i32, i32* %11
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds double, double* %290, i64 %292
%294 = load double, double* %293
%295 = call double @log(double %294)
%296 = load double**, double*** %4
%297 = load i32, i32* %10
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds double*, double** %296, i64 %298
%300 = load double*, double** %299
%301 = load i32, i32* %11
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
store double %295, double* %303
br label %304
304: ; preds = %285
%305 = load i32, i32* %11
%306 = add nsw i32 %305, 1
store i32 %306, i32* %11
br label %281
307: ; preds = %281
br label %308
308: ; preds = %307
%309 = load i32, i32* %10
%310 = add nsw i32 %309, 1
store i32 %310, i32* %10
br label %276
311: ; preds = %276
%312 = load double**, double*** %7
%313 = load i32, i32* %5
%314 = load i32, i32* %6
%315 = call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %312, i32 0, i32 %313, i32 0, i32 %314)
ret void
}

LLVM IR (-O2):
define void @fill_hardy_weinberg(double** nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, i32, i32, ...) bitcast (i32 (...)* @dmatrix to i32 (i32, i32, i32, i32, ...)*)(i32 0, i32 %1, i32 0, i32 %2)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to double**
%7 = icmp slt i32 %1, 0
br i1 %7, label %314, label %8
8: ; preds = %3
%9 = icmp slt i32 %2, 0
%10 = add i32 %2, 1
%11 = add nuw i32 %1, 1
%12 = zext i32 %11 to i64
%13 = zext i32 %10 to i64
%14 = and i64 %13, 4294967292
%15 = add nsw i64 %14, -4
%16 = lshr exact i64 %15, 2
%17 = add nuw nsw i64 %16, 1
%18 = icmp ult i32 %10, 4
%19 = and i64 %13, 4294967292
%20 = and i64 %17, 3
%21 = icmp ult i64 %15, 12
%22 = and i64 %17, 9223372036854775804
%23 = icmp eq i64 %20, 0
%24 = icmp eq i64 %19, %13
%25 = and i64 %13, 3
%26 = icmp eq i64 %25, 0
br label %27
27: ; preds = %8, %150
%28 = phi i64 [ 0, %8 ], [ %151, %150 ]
br i1 %9, label %150, label %29
29: ; preds = %27
%30 = getelementptr inbounds double*, double** %6, i64 %28
%31 = load double*, double** %30
%32 = getelementptr inbounds double*, double** %0, i64 %28
%33 = load double*, double** %32
br i1 %18, label %99, label %34
34: ; preds = %29
%35 = getelementptr double, double* %31, i64 %13
%36 = getelementptr double, double* %33, i64 %13
%37 = icmp ult double* %31, %36
%38 = icmp ult double* %33, %35
%39 = and i1 %37, %38
br i1 %39, label %99, label %40
40: ; preds = %34
br i1 %21, label %82, label %41
41: ; preds = %40, %41
%42 = phi i64 [ %79, %41 ], [ 0, %40 ]
%43 = phi i64 [ %80, %41 ], [ 0, %40 ]
%44 = getelementptr inbounds double, double* %31, i64 %42
%45 = bitcast double* %44 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %45
%46 = getelementptr inbounds double, double* %44, i64 2
%47 = bitcast double* %46 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %47
%48 = getelementptr inbounds double, double* %33, i64 %42
%49 = bitcast double* %48 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %49
%50 = getelementptr inbounds double, double* %48, i64 2
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %51
%52 = or i64 %42, 4
%53 = getelementptr inbounds double, double* %31, i64 %52
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %54
%55 = getelementptr inbounds double, double* %53, i64 2
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %56
%57 = getelementptr inbounds double, double* %33, i64 %52
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %58
%59 = getelementptr inbounds double, double* %57, i64 2
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %60
%61 = or i64 %42, 8
%62 = getelementptr inbounds double, double* %31, i64 %61
%63 = bitcast double* %62 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %63
%64 = getelementptr inbounds double, double* %62, i64 2
%65 = bitcast double* %64 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %65
%66 = getelementptr inbounds double, double* %33, i64 %61
%67 = bitcast double* %66 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %67
%68 = getelementptr inbounds double, double* %66, i64 2
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %69
%70 = or i64 %42, 12
%71 = getelementptr inbounds double, double* %31, i64 %70
%72 = bitcast double* %71 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %72
%73 = getelementptr inbounds double, double* %71, i64 2
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %74
%75 = getelementptr inbounds double, double* %33, i64 %70
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %76
%77 = getelementptr inbounds double, double* %75, i64 2
%78 = bitcast double* %77 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %78
%79 = add nuw i64 %42, 16
%80 = add nuw i64 %43, 4
%81 = icmp eq i64 %80, %22
br i1 %81, label %82, label %41
82: ; preds = %41, %40
%83 = phi i64 [ 0, %40 ], [ %79, %41 ]
br i1 %23, label %98, label %84
84: ; preds = %82, %84
%85 = phi i64 [ %95, %84 ], [ %83, %82 ]
%86 = phi i64 [ %96, %84 ], [ 0, %82 ]
%87 = getelementptr inbounds double, double* %31, i64 %85
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %88
%89 = getelementptr inbounds double, double* %87, i64 2
%90 = bitcast double* %89 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %90
%91 = getelementptr inbounds double, double* %33, i64 %85
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %92
%93 = getelementptr inbounds double, double* %91, i64 2
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %94
%95 = add nuw i64 %85, 4
%96 = add i64 %86, 1
%97 = icmp eq i64 %96, %20
br i1 %97, label %98, label %84
98: ; preds = %84, %82
br i1 %24, label %150, label %99
99: ; preds = %34, %29, %98
%100 = phi i64 [ 0, %34 ], [ 0, %29 ], [ %19, %98 ]
%101 = xor i64 %100, -1
%102 = add nsw i64 %101, %13
br i1 %26, label %111, label %103
103: ; preds = %99, %103
%104 = phi i64 [ %108, %103 ], [ %100, %99 ]
%105 = phi i64 [ %109, %103 ], [ 0, %99 ]
%106 = getelementptr inbounds double, double* %31, i64 %104
store double 0.000000e+00, double* %106
%107 = getelementptr inbounds double, double* %33, i64 %104
store double 0.000000e+00, double* %107
%108 = add nuw nsw i64 %104, 1
%109 = add i64 %105, 1
%110 = icmp eq i64 %109, %25
br i1 %110, label %111, label %103
111: ; preds = %103, %99
%112 = phi i64 [ %100, %99 ], [ %108, %103 ]
%113 = icmp ult i64 %102, 3
br i1 %113, label %150, label %135
114: ; preds = %150
%115 = icmp slt i32 %1, 1
br i1 %115, label %153, label %116
116: ; preds = %114
%117 = shl nsw i32 %2, 1
%118 = sitofp i32 %117 to double
%119 = icmp slt i32 %2, 0
%120 = add i32 %2, 1
%121 = add nuw i32 %1, 1
%122 = zext i32 %121 to i64
%123 = zext i32 %120 to i64
%124 = and i64 %13, 4294967294
%125 = add nsw i64 %124, -2
%126 = lshr exact i64 %125, 1
%127 = add nuw i64 %126, 1
%128 = icmp ult i32 %10, 2
%129 = and i64 %13, 4294967294
%130 = and i64 %127, 1
%131 = icmp eq i64 %125, 0
%132 = and i64 %127, -2
%133 = icmp eq i64 %130, 0
%134 = icmp eq i64 %129, %13
br label %160
135: ; preds = %111, %135
%136 = phi i64 [ %148, %135 ], [ %112, %111 ]
%137 = getelementptr inbounds double, double* %31, i64 %136
store double 0.000000e+00, double* %137
%138 = getelementptr inbounds double, double* %33, i64 %136
store double 0.000000e+00, double* %138
%139 = add nuw nsw i64 %136, 1
%140 = getelementptr inbounds double, double* %31, i64 %139
store double 0.000000e+00, double* %140
%141 = getelementptr inbounds double, double* %33, i64 %139
store double 0.000000e+00, double* %141
%142 = add nuw nsw i64 %136, 2
%143 = getelementptr inbounds double, double* %31, i64 %142
store double 0.000000e+00, double* %143
%144 = getelementptr inbounds double, double* %33, i64 %142
store double 0.000000e+00, double* %144
%145 = add nuw nsw i64 %136, 3
%146 = getelementptr inbounds double, double* %31, i64 %145
store double 0.000000e+00, double* %146
%147 = getelementptr inbounds double, double* %33, i64 %145
store double 0.000000e+00, double* %147
%148 = add nuw nsw i64 %136, 4
%149 = icmp eq i64 %148, %13
br i1 %149, label %150, label %135
150: ; preds = %111, %135, %98, %27
%151 = add nuw nsw i64 %28, 1
%152 = icmp eq i64 %151, %12
br i1 %152, label %114, label %27
153: ; preds = %293, %114
br i1 %7, label %314, label %154
154: ; preds = %153
%155 = icmp slt i32 %2, 0
%156 = add i32 %2, 1
%157 = add nuw i32 %1, 1
%158 = zext i32 %157 to i64
%159 = zext i32 %156 to i64
br label %296
160: ; preds = %116, %293
%161 = phi i64 [ 1, %116 ], [ %294, %293 ]
%162 = trunc i64 %161 to i32
%163 = sitofp i32 %162 to double
%164 = fdiv double %163, %118
%165 = fsub double 1.000000e+00, %164
%166 = fmul double %165, %163
%167 = tail call double @llvm.ceil.f64(double %166)
%168 = fptosi double %167 to i32
%169 = and i32 %162, 1
%170 = icmp eq i32 %169, 0
%171 = srem i32 %168, 2
%172 = icmp eq i32 %171, 1
%173 = icmp ne i32 %171, 1
%174 = select i1 %170, i1 %172, i1 %173
%175 = sext i1 %174 to i32
%176 = add nsw i32 %175, %168
%177 = getelementptr inbounds double*, double** %6, i64 %161
%178 = load double*, double** %177
%179 = sext i32 %176 to i64
%180 = getelementptr inbounds double, double* %178, i64 %179
store double 1.000000e+00, double* %180
%181 = sub nsw i32 %162, %176
%182 = sdiv i32 %181, 2
%183 = add i32 %176, %162
%184 = sub i32 %117, %183
%185 = sdiv i32 %184, 2
%186 = icmp sgt i32 %184, 1
%187 = icmp sgt i32 %181, 1
%188 = select i1 %186, i1 %187, i1 false
br i1 %188, label %189, label %195
189: ; preds = %160
%190 = sext i1 %174 to i64
%191 = sext i32 %168 to i64
%192 = add nsw i64 %190, %191
%193 = getelementptr inbounds double, double* %178, i64 %192
%194 = load double, double* %193
br label %202
195: ; preds = %202, %160
%196 = phi double [ 1.000000e+00, %160 ], [ %220, %202 ]
%197 = icmp sgt i32 %176, 1
br i1 %197, label %198, label %226
198: ; preds = %195
%199 = zext i32 %176 to i64
%200 = getelementptr inbounds double, double* %178, i64 %199
%201 = load double, double* %200
br label %260
202: ; preds = %189, %202
%203 = phi double [ %194, %189 ], [ %218, %202 ]
%204 = phi i64 [ %192, %189 ], [ %208, %202 ]
%205 = phi double [ 1.000000e+00, %189 ], [ %220, %202 ]
%206 = phi i32 [ %182, %189 ], [ %222, %202 ]
%207 = phi i32 [ %185, %189 ], [ %221, %202 ]
%208 = add nsw i64 %204, 2
%209 = fmul double %203, 4.000000e+00
%210 = sitofp i32 %207 to double
%211 = sitofp i32 %206 to double
%212 = fmul double %210, %211
%213 = fmul double %212, %209
%214 = trunc i64 %208 to i32
%215 = sitofp i32 %214 to double
%216 = fadd double %215, -1.000000e+00
%217 = fmul double %216, %215
%218 = fdiv double %213, %217
%219 = getelementptr inbounds double, double* %178, i64 %208
store double %218, double* %219
%220 = fadd double %205, %218
%221 = add nsw i32 %207, -1
%222 = add nsw i32 %206, -1
%223 = icmp sgt i32 %207, 1
%224 = icmp sgt i32 %206, 1
%225 = select i1 %223, i1 %224, i1 false
br i1 %225, label %202, label %195
226: ; preds = %260, %195
%227 = phi double [ %196, %195 ], [ %282, %260 ]
br i1 %119, label %293, label %228
228: ; preds = %226
br i1 %128, label %258, label %229
229: ; preds = %228
%230 = insertelement <2 x double> poison, double %227, i64 0
%231 = shufflevector <2 x double> %230, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %131, label %249, label %232
232: ; preds = %229, %232
%233 = phi i64 [ %246, %232 ], [ 0, %229 ]
%234 = phi i64 [ %247, %232 ], [ 0, %229 ]
%235 = getelementptr inbounds double, double* %178, i64 %233
%236 = bitcast double* %235 to <2 x double>*
%237 = load <2 x double>, <2 x double>* %236
%238 = fdiv <2 x double> %237, %231
%239 = bitcast double* %235 to <2 x double>*
store <2 x double> %238, <2 x double>* %239
%240 = or i64 %233, 2
%241 = getelementptr inbounds double, double* %178, i64 %240
%242 = bitcast double* %241 to <2 x double>*
%243 = load <2 x double>, <2 x double>* %242
%244 = fdiv <2 x double> %243, %231
%245 = bitcast double* %241 to <2 x double>*
store <2 x double> %244, <2 x double>* %245
%246 = add nuw i64 %233, 4
%247 = add nuw i64 %234, 2
%248 = icmp eq i64 %247, %132
br i1 %248, label %249, label %232
249: ; preds = %232, %229
%250 = phi i64 [ 0, %229 ], [ %246, %232 ]
br i1 %133, label %257, label %251
251: ; preds = %249
%252 = getelementptr inbounds double, double* %178, i64 %250
%253 = bitcast double* %252 to <2 x double>*
%254 = load <2 x double>, <2 x double>* %253
%255 = fdiv <2 x double> %254, %231
%256 = bitcast double* %252 to <2 x double>*
store <2 x double> %255, <2 x double>* %256
br label %257
257: ; preds = %249, %251
br i1 %134, label %293, label %258
258: ; preds = %228, %257
%259 = phi i64 [ 0, %228 ], [ %129, %257 ]
br label %286
260: ; preds = %198, %260
%261 = phi double [ %279, %260 ], [ %201, %198 ]
%262 = phi double [ %282, %260 ], [ %196, %198 ]
%263 = phi i32 [ %284, %260 ], [ %182, %198 ]
%264 = phi i32 [ %266, %260 ], [ %176, %198 ]
%265 = phi i32 [ %283, %260 ], [ %185, %198 ]
%266 = add nsw i32 %264, -2
%267 = insertelement <2 x i32> poison, i32 %266, i64 0
%268 = insertelement <2 x i32> %267, i32 %265, i64 1
%269 = sitofp <2 x i32> %268 to <2 x double>
%270 = fadd <2 x double> %269, <double 2.000000e+00, double 1.000000e+00>
%271 = sitofp i32 %263 to double
%272 = insertelement <2 x double> %269, double %271, i64 1
%273 = fadd <2 x double> %272, <double 1.000000e+00, double 1.000000e+00>
%274 = fmul <2 x double> %270, %273
%275 = insertelement <2 x double> <double poison, double 4.000000e+00>, double %261, i64 0
%276 = fmul <2 x double> %274, %275
%277 = extractelement <2 x double> %276, i64 0
%278 = extractelement <2 x double> %276, i64 1
%279 = fdiv double %277, %278
%280 = zext i32 %266 to i64
%281 = getelementptr inbounds double, double* %178, i64 %280
store double %279, double* %281
%282 = fadd double %262, %279
%283 = add nsw i32 %265, 1
%284 = add nsw i32 %263, 1
%285 = icmp ugt i32 %264, 3
br i1 %285, label %260, label %226
286: ; preds = %258, %286
%287 = phi i64 [ %291, %286 ], [ %259, %258 ]
%288 = getelementptr inbounds double, double* %178, i64 %287
%289 = load double, double* %288
%290 = fdiv double %289, %227
store double %290, double* %288
%291 = add nuw nsw i64 %287, 1
%292 = icmp eq i64 %291, %123
br i1 %292, label %293, label %286
293: ; preds = %286, %257, %226
%294 = add nuw nsw i64 %161, 1
%295 = icmp eq i64 %294, %122
br i1 %295, label %153, label %160
296: ; preds = %154, %311
%297 = phi i64 [ 0, %154 ], [ %312, %311 ]
br i1 %155, label %311, label %298
298: ; preds = %296
%299 = getelementptr inbounds double*, double** %6, i64 %297
%300 = getelementptr inbounds double*, double** %0, i64 %297
br label %301
301: ; preds = %298, %301
%302 = phi i64 [ 0, %298 ], [ %309, %301 ]
%303 = load double*, double** %299
%304 = getelementptr inbounds double, double* %303, i64 %302
%305 = load double, double* %304
%306 = tail call double @log(double %305)
%307 = load double*, double** %300
%308 = getelementptr inbounds double, double* %307, i64 %302
store double %306, double* %308
%309 = add nuw nsw i64 %302, 1
%310 = icmp eq i64 %309, %159
br i1 %310, label %311, label %301
311: ; preds = %301, %296
%312 = add nuw nsw i64 %297, 1
%313 = icmp eq i64 %312, %158
br i1 %313, label %314, label %296
314: ; preds = %311, %3, %153
%315 = tail call i32 (double**, i32, i32, i32, i32, ...) bitcast (i32 (...)* @free_dmatrix to i32 (double**, i32, i32, i32, i32, ...)*)(double** %6, i32 0, i32 %1, i32 0, i32 %2)
ret void
}