#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);
int /*<<< orphan*/ transpose(int, double const *, double *);
void matmul(int i_matdim, const double *pd_A, const double *pd_B,
            double *pd_C) {
  int i, j, k;
  int n = 2;
  int N = i_matdim;
  int Ntiles = N / n;
  double *A = pd_A;
  double *B = (double *)malloc(i_matdim * i_matdim * sizeof(double));
  double *C = pd_C;
  transpose(i_matdim, pd_B, B);
  for (i = 0; i < Ntiles; i++)
    for (j = 0; j < Ntiles; j++)
      for (k = 0; k < Ntiles; k++) {
        double *bA = A + i * n * N + k * n;
        double *bB = B + j * n * N + k * n;
        double *bC = C + i * n * N + j * n;
        bC[0] += bA[0] * bB[0] + bA[1] * bB[1];
        bC[1] += bA[0] * bB[N] + bA[1] * bB[N + 1];
        bC[N] += bA[N] * bB[0] + bA[N + 1] * bB[1];
        bC[N + 1] += bA[N] * bB[N] + bA[N + 1] * bB[N + 1];
      }
  if ((i_matdim & 1) == 0)
    return;
  for (i = 0; i < N - 1; i++)
    for (j = 0; j < N - 1; j++) {
      C[i * N + j] += A[i * N + N - 1] * pd_B[(N - 1) * N + j];
    }
  for (i = 0; i < N; i++)
    for (k = 0; k < N; k++)
      C[i * N + N - 1] += A[i * N + k] * pd_B[k * N + N - 1];
  for (i = 0; i < N - 1; i++)
    for (k = 0; k < N; k++)
      C[(N - 1) * N + i] += A[(N - 1) * N + k] * pd_B[k * N + i];
}


x86 assembly (clang, -O0):
<matmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x2,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cltd
idivl  -0x30(%rbp)
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1030 <transpose@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    13a0 <matmul+0x280>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    138d <matmul+0x26d>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    137a <matmul+0x25a>
mov    -0x40(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x2c(%rbp),%ecx
imul   -0x30(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x2c(%rbp),%ecx
imul   -0x30(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x30(%rbp),%ecx
imul   -0x34(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x28(%rbp),%ecx
imul   -0x30(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x60(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x60(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x58(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x60(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x58(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x60(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b3 <matmul+0x93>
jmp    137f <matmul+0x25f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a0 <matmul+0x80>
jmp    1392 <matmul+0x272>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    118d <matmul+0x6d>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    13b4 <matmul+0x294>
jmp    1597 <matmul+0x477>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    145a <matmul+0x33a>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1447 <matmul+0x327>
mov    -0x40(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x34(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x50(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13d3 <matmul+0x2b3>
jmp    144c <matmul+0x32c>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13bb <matmul+0x29b>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    14f6 <matmul+0x3d6>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    14e3 <matmul+0x3c3>
mov    -0x40(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x50(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1474 <matmul+0x354>
jmp    14e8 <matmul+0x3c8>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1461 <matmul+0x341>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1597 <matmul+0x477>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1584 <matmul+0x464>
mov    -0x40(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x34(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x50(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
imul   -0x34(%rbp),%ecx
add    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1515 <matmul+0x3f5>
jmp    1589 <matmul+0x469>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    14fd <matmul+0x3dd>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matmul>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,%rbx
mov    %rdx,%r12
mov    %rsi,%r13
mov    %edi,%ebp
imul   %edi,%edi
shl    $0x3,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
mov    %r12,%rsi
mov    %rax,%rdx
call   1030 <transpose@plt>
mov    %rbp,%rdx
cmp    $0x2,%edx
mov    %rbp,(%rsp)
jl     140e <matmul+0x2ee>
mov    %rbx,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %rdx,%rax
mov    %eax,%ebx
shr    %ebx
lea    (%rdx,%rdx,1),%r9d
mov    %eax,%eax
lea    0x1(%rax),%rsi
mov    %rax,%rdi
shl    $0x4,%rdi
lea    (%r14,%rax,8),%rcx
mov    %rcx,0x30(%rsp)
lea    (%r14,%rax,8),%rcx
add    $0x8,%rcx
mov    %rcx,0x28(%rsp)
lea    0x0(,%rax,8),%rcx
add    %r13,%rcx
mov    %rcx,0x20(%rsp)
mov    %rbx,%rcx
shl    $0x4,%rcx
xor    %ebp,%ebp
xor    %edx,%edx
mov    %r13,0x40(%rsp)
mov    %r14,0x38(%rsp)
mov    %r9d,0xc(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,0x50(%rsp)
movslq %ebp,%rbp
lea    0x0(,%rbp,8),%r8
add    %r13,%r8
mov    %rbx,%r11
mov    0x20(%rsp),%rbx
lea    (%rbx,%rbp,8),%r10
mov    %r9d,%ebp
mov    %rdx,0x48(%rsp)
imul   %edx,%ebp
movslq %ebp,%rbp
mov    0x10(%rsp),%rbx
lea    (%rbx,%rbp,8),%r9
mov    %r11,%rbx
mov    0x28(%rsp),%r11
mov    0x30(%rsp),%r15
mov    %r14,%r12
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbp,%r14
shl    $0x4,%r14
add    %r9,%r14
xor    %r13d,%r13d
nopl   (%rax)
movsd  (%r8,%r13,1),%xmm0
movsd  0x8(%r8,%r13,1),%xmm1
mulsd  0x8(%r12,%r13,1),%xmm1
mulsd  (%r12,%r13,1),%xmm0
addsd  %xmm1,%xmm0
addsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
movsd  (%r8,%r13,1),%xmm0
movsd  0x8(%r8,%r13,1),%xmm1
mulsd  (%r11,%r13,1),%xmm1
mulsd  (%r15,%r13,1),%xmm0
addsd  %xmm1,%xmm0
addsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%r14)
movsd  (%r10,%r13,1),%xmm0
movsd  0x8(%r10,%r13,1),%xmm1
mulsd  0x8(%r12,%r13,1),%xmm1
mulsd  (%r12,%r13,1),%xmm0
addsd  %xmm1,%xmm0
addsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  (%r10,%r13,1),%xmm0
movsd  0x8(%r10,%r13,1),%xmm1
mulsd  (%r11,%r13,1),%xmm1
mulsd  (%r15,%r13,1),%xmm0
addsd  %xmm1,%xmm0
addsd  (%r14,%rsi,8),%xmm0
movsd  %xmm0,(%r14,%rsi,8)
add    $0x10,%r13
cmp    %r13,%rcx
jne    1230 <matmul+0x110>
add    $0x1,%rbp
add    %rdi,%r12
add    %rdi,%r15
add    %rdi,%r11
cmp    %rbx,%rbp
jne    1220 <matmul+0x100>
mov    0x48(%rsp),%rdx
add    $0x1,%rdx
mov    0xc(%rsp),%r9d
mov    0x50(%rsp),%rbp
add    %r9d,%ebp
cmp    %rbx,%rdx
mov    0x40(%rsp),%r13
mov    0x38(%rsp),%r14
jne    11d0 <matmul+0xb0>
mov    (%rsp),%rdx
test   $0x1,%dl
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%rbx
je     15df <matmul+0x4bf>
lea    -0x1(%rdx),%r9d
cmp    $0x2,%edx
jl     1421 <matmul+0x301>
mov    %r9d,%ecx
imul   %edx,%ecx
movslq %ecx,%r8
mov    %r9d,%edx
lea    0x8(%rbx),%rsi
lea    0x0(,%rax,8),%r10
lea    (%r12,%r8,8),%rbp
add    $0x8,%rbp
xor    %r11d,%r11d
jmp    1380 <matmul+0x260>
nopl   0x0(%rax)
add    $0x1,%r11
add    %r10,%rsi
cmp    %rdx,%r11
je     141d <matmul+0x2fd>
mov    %r11,%rcx
imul   %rax,%rcx
lea    (%r9,%rcx,1),%edi
movslq %edi,%rdi
test   $0x1,%dl
jne    13a0 <matmul+0x280>
xor    %ecx,%ecx
cmp    $0x1,%r9d
jne    13d0 <matmul+0x2b0>
jmp    1370 <matmul+0x250>
nopl   (%rax)
movsd  0x0(%r13,%rdi,8),%xmm0
mulsd  (%r12,%r8,8),%xmm0
addsd  (%rbx,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
mov    $0x1,%ecx
cmp    $0x1,%r9d
je     1370 <matmul+0x250>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%r13,%rdi,8),%xmm0
mulsd  -0x8(%rbp,%rcx,8),%xmm0
addsd  -0x8(%rsi,%rcx,8),%xmm0
movsd  %xmm0,-0x8(%rsi,%rcx,8)
movsd  0x0(%r13,%rdi,8),%xmm0
mulsd  0x0(%rbp,%rcx,8),%xmm0
addsd  (%rsi,%rcx,8),%xmm0
movsd  %xmm0,(%rsi,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    13d0 <matmul+0x2b0>
jmp    1370 <matmul+0x250>
test   $0x1,%dl
je     15df <matmul+0x4bf>
lea    -0x1(%rdx),%r9d
jmp    1421 <matmul+0x301>
mov    (%rsp),%rdx
mov    %edx,%r14d
test   %edx,%edx
jle    1505 <matmul+0x3e5>
mov    %r14d,%r15d
and    $0xfffffffe,%r15d
lea    0x8(%r13),%rsi
lea    0x0(,%r14,8),%r8
lea    (%rdx,%rdx,1),%ebp
xor    %r11d,%r11d
jmp    1460 <matmul+0x340>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r11
add    %r8,%rsi
cmp    %r14,%r11
je     1505 <matmul+0x3e5>
mov    %r11,%r10
imul   %r14,%r10
lea    (%r9,%r10,1),%eax
cltq
movsd  (%rbx,%rax,8),%xmm0
cmp    $0x1,%edx
jne    1480 <matmul+0x360>
xor    %edi,%edi
jmp    14d4 <matmul+0x3b4>
nopl   0x0(%rax,%rax,1)
mov    %r9d,%ecx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rsi,%rdi,8),%xmm1
movslq %ecx,%rcx
mulsd  (%r12,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  (%rsi,%rdi,8),%xmm0
mov    (%rsp),%rdx
add    %ecx,%edx
movslq %edx,%rdx
mulsd  (%r12,%rdx,8),%xmm0
mov    (%rsp),%rdx
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x2,%rdi
add    %ebp,%ecx
cmp    %rdi,%r15
jne    1490 <matmul+0x370>
test   $0x1,%r14b
je     1450 <matmul+0x330>
add    %rdi,%r10
movsd  0x0(%r13,%r10,8),%xmm1
imul   %edx,%edi
add    %r9d,%edi
movslq %edi,%rcx
mulsd  (%r12,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
jmp    1450 <matmul+0x330>
cmp    $0x2,%edx
jl     15df <matmul+0x4bf>
mov    %r9d,%r8d
imul   %edx,%r9d
movslq %r9d,%r9
mov    %r14d,%esi
and    $0xfffffffe,%esi
lea    0x8(,%r9,8),%rdi
add    %r13,%rdi
mov    %r14,%rax
shl    $0x4,%rax
xor    %r11d,%r11d
mov    %r12,%r10
jmp    1555 <matmul+0x435>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r11
add    $0x8,%r10
cmp    %r8,%r11
mov    (%rsp),%rdx
je     15df <matmul+0x4bf>
lea    (%r11,%r9,1),%rbp
movsd  (%rbx,%rbp,8),%xmm0
cmp    $0x1,%edx
jne    1570 <matmul+0x450>
xor    %edx,%edx
jmp    15b3 <matmul+0x493>
nopw   0x0(%rax,%rax,1)
mov    %r10,%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rdi,%rdx,8),%xmm1
mulsd  (%rcx),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
movsd  (%rdi,%rdx,8),%xmm0
mulsd  (%rcx,%r14,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x2,%rdx
add    %rax,%rcx
cmp    %rdx,%rsi
jne    1580 <matmul+0x460>
test   $0x1,%r14b
je     1540 <matmul+0x420>
lea    (%rdx,%r9,1),%rcx
movsd  0x0(%r13,%rcx,8),%xmm1
imul   %r14,%rdx
add    %r11,%rdx
mulsd  (%r12,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rbp,8)
jmp    1540 <matmul+0x420>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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