void calc_av_and_cvmat_double(double *av, double *cvmat, double **kyoushi_dbl,
                              int n_tch_moji, int max_dim, int n_shuku) {
  int i, k, k1, k2;
  for (k = 0; k < max_dim; k++)
    av[k] = 0.0;
  for (i = 0; i < n_tch_moji; i++)
    for (k = 0; k < max_dim; k++)
      av[k] += (*((double *)kyoushi_dbl + i * n_shuku + k));
  for (k = 0; k < max_dim; k++)
    av[k] /= (double)n_tch_moji;
  for (k1 = 0; k1 < max_dim; k1++)
    for (k2 = 0; k2 < max_dim; k2++)
      (*((double *)cvmat + k1 * max_dim + k2)) = 0.0;
  for (i = 0; i < n_tch_moji; i++)
    for (k1 = 0; k1 < max_dim; k1++)
      for (k2 = k1; k2 < max_dim; k2++)
        (*((double *)cvmat + k1 * max_dim + k2)) +=
            ((*((double *)kyoushi_dbl + i * n_shuku + k1)) - av[k1]) *
            ((*((double *)kyoushi_dbl + i * n_shuku + k2)) - av[k2]);
  for (k1 = 0; k1 < max_dim; k1++)
    for (k2 = k1; k2 < max_dim; k2++)
      (*((double *)cvmat + k1 * max_dim + k2)) =
          (*((double *)cvmat + k2 * max_dim + k1)) =
              (*((double *)cvmat + k1 * max_dim + k2)) / (double)n_tch_moji;
}


x86 assembly (clang, -O0):
<calc_av_and_cvmat_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    114c <calc_av_and_cvmat_double+0x4c>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1122 <calc_av_and_cvmat_double+0x22>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11c3 <calc_av_and_cvmat_double+0xc3>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11b0 <calc_av_and_cvmat_double+0xb0>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1166 <calc_av_and_cvmat_double+0x66>
jmp    11b5 <calc_av_and_cvmat_double+0xb5>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1153 <calc_av_and_cvmat_double+0x53>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11ff <calc_av_and_cvmat_double+0xff>
cvtsi2sdl -0x1c(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ca <calc_av_and_cvmat_double+0xca>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1267 <calc_av_and_cvmat_double+0x167>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1254 <calc_av_and_cvmat_double+0x154>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1219 <calc_av_and_cvmat_double+0x119>
jmp    1259 <calc_av_and_cvmat_double+0x159>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1206 <calc_av_and_cvmat_double+0x106>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1354 <calc_av_and_cvmat_double+0x254>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1341 <calc_av_and_cvmat_double+0x241>
mov    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    132e <calc_av_and_cvmat_double+0x22e>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1293 <calc_av_and_cvmat_double+0x193>
jmp    1333 <calc_av_and_cvmat_double+0x233>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1281 <calc_av_and_cvmat_double+0x181>
jmp    1346 <calc_av_and_cvmat_double+0x246>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    126e <calc_av_and_cvmat_double+0x16e>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13fd <calc_av_and_cvmat_double+0x2fd>
mov    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13ea <calc_av_and_cvmat_double+0x2ea>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x20(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    136d <calc_av_and_cvmat_double+0x26d>
jmp    13ef <calc_av_and_cvmat_double+0x2ef>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    135b <calc_av_and_cvmat_double+0x25b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_av_and_cvmat_double>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9d,%ebp
mov    %r8d,%r12d
mov    %ecx,0x28(%rsp)
mov    %rdx,0x20(%rsp)
mov    %rsi,0x30(%rsp)
mov    %rdi,%rbx
mov    %r8d,%edx
test   %r8d,%r8d
mov    %rdx,0x8(%rsp)
jle    1161 <calc_av_and_cvmat_double+0x51>
mov    0x8(%rsp),%rax
lea    0x0(,%rax,8),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x8(%rsp),%rdx
movslq %ebp,%rax
mov    %rax,0x38(%rsp)
mov    0x28(%rsp),%ecx
mov    %ecx,%eax
mov    %rax,0x68(%rsp)
test   %ecx,%ecx
mov    %r12,0x10(%rsp)
jle    13b4 <calc_av_and_cvmat_double+0x2a4>
lea    (%rbx,%rdx,8),%r10
mov    %edx,%r14d
and    $0xfffffffc,%r14d
lea    -0x4(%r14),%r9
mov    %r9,%r11
shr    $0x2,%r11
add    $0x1,%r11
mov    %r11,%r8
and    $0xfffffffffffffffe,%r8
mov    %edx,%r15d
and    $0x3,%r15d
mov    0x20(%rsp),%rsi
lea    0x30(%rsi),%rdi
mov    0x38(%rsp),%rax
lea    0x0(,%rax,8),%r13
xor    %eax,%eax
jmp    11e5 <calc_av_and_cvmat_double+0xd5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rax
add    %r13,%rdi
add    %r13,%rsi
cmp    0x68(%rsp),%rax
je     13b4 <calc_av_and_cvmat_double+0x2a4>
test   %r12d,%r12d
jle    11d0 <calc_av_and_cvmat_double+0xc0>
cmp    $0x4,%r12d
jae    1200 <calc_av_and_cvmat_double+0xf0>
xor    %ecx,%ecx
jmp    1300 <calc_av_and_cvmat_double+0x1f0>
nopw   0x0(%rax,%rax,1)
mov    %rax,%rcx
imul   0x38(%rsp),%rcx
mov    0x20(%rsp),%rbp
lea    0x0(,%rcx,8),%r12
add    %rbp,%r12
add    %rdx,%rcx
lea    0x0(,%rcx,8),%rcx
add    %rbp,%rcx
cmp    %rbx,%rcx
jbe    123d <calc_av_and_cvmat_double+0x12d>
cmp    %r10,%r12
jae    123d <calc_av_and_cvmat_double+0x12d>
xor    %ecx,%ecx
mov    0x10(%rsp),%r12
jmp    1300 <calc_av_and_cvmat_double+0x1f0>
test   %r9,%r9
je     13a3 <calc_av_and_cvmat_double+0x293>
mov    %r8,%rcx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movupd -0x30(%rdi,%rbp,8),%xmm0
movupd -0x20(%rdi,%rbp,8),%xmm1
movupd (%rbx,%rbp,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%rbx,%rbp,8),%xmm0
addpd  %xmm1,%xmm0
movupd 0x20(%rbx,%rbp,8),%xmm1
movupd 0x30(%rbx,%rbp,8),%xmm3
movupd %xmm2,(%rbx,%rbp,8)
movupd %xmm0,0x10(%rbx,%rbp,8)
movupd -0x10(%rdi,%rbp,8),%xmm0
addpd  %xmm1,%xmm0
movupd (%rdi,%rbp,8),%xmm1
addpd  %xmm3,%xmm1
movupd %xmm0,0x20(%rbx,%rbp,8)
movupd %xmm1,0x30(%rbx,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%rcx
jne    1250 <calc_av_and_cvmat_double+0x140>
test   $0x1,%r11b
je     12e0 <calc_av_and_cvmat_double+0x1d0>
movupd (%r12,%rbp,8),%xmm0
movupd 0x10(%r12,%rbp,8),%xmm1
movupd (%rbx,%rbp,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%rbx,%rbp,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,(%rbx,%rbp,8)
movupd %xmm0,0x10(%rbx,%rbp,8)
mov    %r14,%rcx
cmp    %rdx,%r14
mov    0x10(%rsp),%r12
je     11d0 <calc_av_and_cvmat_double+0xc0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rbp
not    %rbp
add    %rdx,%rbp
test   %r15,%r15
je     1339 <calc_av_and_cvmat_double+0x229>
mov    %r15,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm0
addsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdx
jne    1320 <calc_av_and_cvmat_double+0x210>
cmp    $0x3,%rbp
mov    0x8(%rsp),%rdx
jb     11d0 <calc_av_and_cvmat_double+0xc0>
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rcx,8),%xmm0
addsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%rsi,%rcx,8),%xmm0
addsd  0x8(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
movsd  0x10(%rsi,%rcx,8),%xmm0
addsd  0x10(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rcx,8)
movsd  0x18(%rsi,%rcx,8),%xmm0
addsd  0x18(%rbx,%rcx,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1350 <calc_av_and_cvmat_double+0x240>
jmp    11d0 <calc_av_and_cvmat_double+0xc0>
xor    %ebp,%ebp
test   $0x1,%r11b
jne    12b5 <calc_av_and_cvmat_double+0x1a5>
jmp    12e0 <calc_av_and_cvmat_double+0x1d0>
xorps  %xmm0,%xmm0
cvtsi2sdl 0x28(%rsp),%xmm0
movapd %xmm0,0x70(%rsp)
test   %r12d,%r12d
mov    0x30(%rsp),%r13
jle    15b1 <calc_av_and_cvmat_double+0x4a1>
cmp    $0x1,%r12d
jne    13e9 <calc_av_and_cvmat_double+0x2d9>
xor    %eax,%eax
mov    0x8(%rsp),%rcx
movapd 0x70(%rsp),%xmm3
jmp    1470 <calc_av_and_cvmat_double+0x360>
mov    0x8(%rsp),%rax
and    $0xfffffffe,%eax
movapd 0x70(%rsp),%xmm3
movapd %xmm3,%xmm0
unpcklpd %xmm3,%xmm0
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     19e7 <calc_av_and_cvmat_double+0x8d7>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nop
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdx,8)
divpd  %xmm0,%xmm2
movupd %xmm2,0x10(%rbx,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1420 <calc_av_and_cvmat_double+0x310>
test   $0x1,%cl
je     145b <calc_av_and_cvmat_double+0x34b>
movupd (%rbx,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rdx,8)
mov    0x8(%rsp),%rcx
cmp    %rcx,%rax
je     1487 <calc_av_and_cvmat_double+0x377>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rbx,%rax,8),%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rcx
jne    1470 <calc_av_and_cvmat_double+0x360>
test   %r12d,%r12d
jle    15b1 <calc_av_and_cvmat_double+0x4a1>
mov    0x8(%rsp),%rcx
lea    0x0(,%rcx,8),%r14
lea    -0x1(%rcx),%rax
mov    %ecx,%r15d
and    $0x3,%r15d
xor    %r12d,%r12d
cmp    $0x3,%rax
jae    14bd <calc_av_and_cvmat_double+0x3ad>
xor    %ebp,%ebp
mov    0x30(%rsp),%r13
jmp    1579 <calc_av_and_cvmat_double+0x469>
and    $0xfffffffc,%ecx
mov    %rcx,0x50(%rsp)
mov    0x10(%rsp),%rax
lea    (%rax,%rax,1),%ecx
mov    %rcx,0x48(%rsp)
lea    0x0(,%rax,4),%ecx
mov    %ecx,0x18(%rsp)
lea    (%rax,%rax,2),%eax
mov    %rax,0x40(%rsp)
xor    %ebp,%ebp
mov    0x30(%rsp),%r13
nopl   0x0(%rax)
movslq %r12d,%r12
lea    0x0(,%r12,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    0x10(%rsp),%rax
add    %r12d,%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    0x48(%rsp),%rax
add    %r12d,%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    0x40(%rsp),%rax
add    %r12d,%eax
cltq
lea    0x0(,%rax,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
add    $0x4,%rbp
add    0x18(%rsp),%r12d
cmp    %rbp,0x50(%rsp)
jne    14f0 <calc_av_and_cvmat_double+0x3e0>
test   %r15,%r15
mov    0x10(%rsp),%r12
je     15b1 <calc_av_and_cvmat_double+0x4a1>
imul   %r12d,%ebp
nopw   0x0(%rax,%rax,1)
movslq %ebp,%rbp
lea    0x0(,%rbp,8),%rdi
add    %r13,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
add    %r12d,%ebp
add    $0xffffffffffffffff,%r15
jne    1590 <calc_av_and_cvmat_double+0x480>
cmpl   $0x0,0x28(%rsp)
mov    0x8(%rsp),%rdx
jle    1962 <calc_av_and_cvmat_double+0x852>
movslq %r12d,%rax
lea    0x0(,%rax,8),%rcx
mov    %rcx,0xd0(%rsp)
mov    %rax,0x28(%rsp)
lea    0x8(,%rax,8),%rax
mov    %rax,0x48(%rsp)
lea    (%rbx,%rdx,8),%rax
mov    %rax,0xa8(%rsp)
mov    %rdx,%rax
neg    %rax
mov    %rax,0xc8(%rsp)
mov    0x20(%rsp),%r15
lea    0x10(%r15),%rax
mov    %rax,0x60(%rsp)
mov    0x38(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0xa0(%rsp)
lea    0x10(%rbx),%rax
mov    %rax,0x98(%rsp)
lea    0x10(%r13),%rax
mov    %rax,0x90(%rsp)
lea    0x8(%r13),%rax
mov    %rax,0x88(%rsp)
xor    %eax,%eax
mov    %rax,0x58(%rsp)
jmp    1681 <calc_av_and_cvmat_double+0x571>
mov    0x58(%rsp),%rcx
add    $0x1,%rcx
mov    0xa0(%rsp),%rax
add    %rax,0x60(%rsp)
add    %rax,%r15
mov    %rcx,%rax
mov    %rcx,0x58(%rsp)
cmp    0x68(%rsp),%rcx
mov    0x10(%rsp),%r12
je     1962 <calc_av_and_cvmat_double+0x852>
test   %r12d,%r12d
jle    1650 <calc_av_and_cvmat_double+0x540>
mov    0x58(%rsp),%rsi
imul   0x38(%rsp),%rsi
lea    (%rsi,%rdx,1),%rax
lea    0x1(%rsi),%rcx
mov    %rcx,0xb8(%rsp)
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0xb0(%rsp)
mov    %rsi,0xc0(%rsp)
lea    (%rcx,%rsi,8),%rbp
mov    0x88(%rsp),%r10
mov    0x90(%rsp),%r14
mov    0x98(%rsp),%rsi
mov    0x60(%rsp),%r11
mov    %rdx,0x40(%rsp)
xor    %r8d,%r8d
jmp    1718 <calc_av_and_cvmat_double+0x608>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r8
addq   $0xffffffffffffffff,0x40(%rsp)
add    $0x8,%r11
add    $0x8,%rsi
add    0x48(%rsp),%r14
add    0xd0(%rsp),%r10
cmp    %rdx,%r8
je     1650 <calc_av_and_cvmat_double+0x540>
mov    %rdx,%r12
sub    %r8,%r12
mov    %r8,%rax
imul   0x28(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    %r8,%rax
cmp    $0x4,%r12
jb     18a0 <calc_av_and_cvmat_double+0x790>
mov    0x48(%rsp),%rax
imul   %r8,%rax
add    %r13,%rax
mov    0x50(%rsp),%rcx
add    %rdx,%rcx
mov    0x30(%rsp),%rdx
lea    (%rdx,%rcx,8),%r13
mov    0xc0(%rsp),%rcx
add    %r8,%rcx
mov    0x20(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
lea    (%rbx,%r8,8),%rdi
mov    %rdi,0x18(%rsp)
cmp    0xb0(%rsp),%rax
setb   0x7(%rsp)
cmp    %r13,%rcx
mov    0xb8(%rsp),%rcx
lea    (%rcx,%r8,1),%rcx
lea    (%rdx,%rcx,8),%rcx
setb   %dil
cmp    %rcx,%rax
setb   %cl
cmp    0xa8(%rsp),%rax
setb   %r9b
cmp    %r13,0x18(%rsp)
mov    0x30(%rsp),%r13
lea    0x8(%rbx,%r8,8),%rdx
setb   0x18(%rsp)
cmp    %rdx,%rax
mov    0x8(%rsp),%rdx
setb   0x6(%rsp)
mov    %r8,%rax
test   %dil,0x7(%rsp)
jne    18a0 <calc_av_and_cvmat_double+0x790>
mov    %r8,%rax
and    %dil,%cl
jne    18a0 <calc_av_and_cvmat_double+0x790>
mov    %r8,%rax
and    0x18(%rsp),%r9b
jne    18a0 <calc_av_and_cvmat_double+0x790>
mov    %r8,%rax
mov    0x6(%rsp),%cl
and    0x18(%rsp),%cl
jne    18a0 <calc_av_and_cvmat_double+0x790>
mov    0x40(%rsp),%rdi
and    $0xfffffffffffffffc,%rdi
mov    %r12,%rcx
and    $0xfffffffffffffffc,%rcx
lea    (%r8,%rcx,1),%rax
movsd  0x0(%rbp,%r8,8),%xmm0
subsd  (%rbx,%r8,8),%xmm0
unpcklpd %xmm0,%xmm0
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd -0x10(%r11,%rdx,8),%xmm1
movupd (%r11,%rdx,8),%xmm2
movupd -0x10(%rsi,%rdx,8),%xmm3
subpd  %xmm3,%xmm1
movupd (%rsi,%rdx,8),%xmm3
subpd  %xmm3,%xmm2
movupd -0x10(%r14,%rdx,8),%xmm3
movupd (%r14,%rdx,8),%xmm4
mulpd  %xmm0,%xmm1
addpd  %xmm3,%xmm1
mulpd  %xmm0,%xmm2
addpd  %xmm4,%xmm2
movupd %xmm1,-0x10(%r14,%rdx,8)
movupd %xmm2,(%r14,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rdi
jne    1830 <calc_av_and_cvmat_double+0x720>
cmp    %rcx,%r12
mov    0x8(%rsp),%rdx
je     16f0 <calc_av_and_cvmat_double+0x5e0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
sub    %eax,%ecx
mov    %rax,%rdi
test   $0x1,%cl
je     18e6 <calc_av_and_cvmat_double+0x7d6>
mov    0x50(%rsp),%rcx
lea    0x0(,%rcx,8),%rcx
add    %r13,%rcx
movsd  0x0(%rbp,%r8,8),%xmm0
subsd  (%rbx,%r8,8),%xmm0
movsd  0x0(%rbp,%rax,8),%xmm1
subsd  (%rbx,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rcx,%rax,8),%xmm1
movsd  %xmm1,(%rcx,%rax,8)
lea    0x1(%rax),%rdi
not    %rax
cmp    0xc8(%rsp),%rax
je     16f0 <calc_av_and_cvmat_double+0x5e0>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%r8,8),%xmm0
subsd  (%rbx,%r8,8),%xmm0
movsd  (%r15,%rdi,8),%xmm1
subsd  (%rbx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  -0x8(%r10,%rdi,8),%xmm1
movsd  %xmm1,-0x8(%r10,%rdi,8)
movsd  0x0(%rbp,%r8,8),%xmm0
subsd  (%rbx,%r8,8),%xmm0
movsd  0x8(%r15,%rdi,8),%xmm1
subsd  0x8(%rbx,%rdi,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r10,%rdi,8),%xmm1
movsd  %xmm1,(%r10,%rdi,8)
add    $0x2,%rdi
cmp    %rdi,%rdx
jne    1900 <calc_av_and_cvmat_double+0x7f0>
jmp    16f0 <calc_av_and_cvmat_double+0x5e0>
test   %r12d,%r12d
movapd 0x70(%rsp),%xmm1
jle    19d5 <calc_av_and_cvmat_double+0x8c5>
mov    0x8(%rsp),%rsi
lea    0x0(,%rsi,8),%rax
lea    0x8(,%rsi,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
mov    %r13,%rbp
cs nopw 0x0(%rax,%rax,1)
nop
movsd  0x0(%r13,%rdi,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%rbp)
movsd  %xmm0,0x0(%r13,%rdi,8)
add    %rax,%rbp
add    $0x1,%rdi
cmp    %rdi,%rsi
jne    19a0 <calc_av_and_cvmat_double+0x890>
add    $0x1,%rdx
add    %rcx,%r13
add    $0xffffffffffffffff,%rsi
cmp    0x8(%rsp),%rdx
jne    1990 <calc_av_and_cvmat_double+0x880>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%cl
jne    144d <calc_av_and_cvmat_double+0x33d>
jmp    145b <calc_av_and_cvmat_double+0x34b>

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

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