void dmat_dtugxtlms_l(double **a, double **b, double **c, double **d,
                      double **e, double **f, double **g, double **h,
                      double **w1, int n) {
  int i;
  int j;
  int k;
  double x;
  double y;
  for (i = 0; i < n; ++i) {
    for (j = 0; j <= i; ++j) {
      x = 0.;
      for (k = j; k < n; ++k) {
        x += f[i][k] * c[k][j];
        x += b[i][k] * g[k][j];
      }
      w1[i][j] = x;
    }
  }
  for (i = 0; i < n; ++i) {
    for (j = 0; j <= i; ++j) {
      x = 0.;
      for (k = i; k < n; ++k) {
        x += a[i][k] * w1[k][j];
      }
      h[j][i] = x;
    }
  }
  for (i = 0; i < n; ++i) {
    for (j = 0; j <= i; ++j) {
      x = 0.;
      for (k = j; k < n; ++k) {
        x += b[i][k] * c[k][j];
      }
      w1[i][j] = x;
    }
  }
  for (i = 0; i < n; ++i) {
    for (j = 0; j <= i; ++j) {
      x = 0.;
      y = 0.;
      for (k = i; k < n; ++k) {
        x += e[i][k] * w1[k][j];
        y += a[i][k] * w1[k][j];
      }
      h[j][i] += x;
      d[j][i] = y;
    }
  }
}


x86 assembly (clang, -O0):
<dmat_dtugxtlms_l>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    122c <dmat_dtugxtlms_l+0x12c>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     1219 <dmat_dtugxtlms_l+0x119>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    11f1 <dmat_dtugxtlms_l+0xf1>
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    115f <dmat_dtugxtlms_l+0x5f>
movsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1145 <dmat_dtugxtlms_l+0x45>
jmp    121e <dmat_dtugxtlms_l+0x11e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1132 <dmat_dtugxtlms_l+0x32>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    12f1 <dmat_dtugxtlms_l+0x1f1>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     12de <dmat_dtugxtlms_l+0x1de>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    12b6 <dmat_dtugxtlms_l+0x1b6>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1260 <dmat_dtugxtlms_l+0x160>
movsd  -0x48(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1246 <dmat_dtugxtlms_l+0x146>
jmp    12e3 <dmat_dtugxtlms_l+0x1e3>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1233 <dmat_dtugxtlms_l+0x133>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    13b6 <dmat_dtugxtlms_l+0x2b6>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     13a3 <dmat_dtugxtlms_l+0x2a3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    137b <dmat_dtugxtlms_l+0x27b>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1325 <dmat_dtugxtlms_l+0x225>
movsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    130b <dmat_dtugxtlms_l+0x20b>
jmp    13a8 <dmat_dtugxtlms_l+0x2a8>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12f8 <dmat_dtugxtlms_l+0x1f8>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    14de <dmat_dtugxtlms_l+0x3de>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     14cb <dmat_dtugxtlms_l+0x3cb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x28(%rbp),%eax
jge    1484 <dmat_dtugxtlms_l+0x384>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13f2 <dmat_dtugxtlms_l+0x2f2>
movsd  -0x48(%rbp),%xmm0
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13d0 <dmat_dtugxtlms_l+0x2d0>
jmp    14d0 <dmat_dtugxtlms_l+0x3d0>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13bd <dmat_dtugxtlms_l+0x2bd>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dmat_dtugxtlms_l>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,-0x18(%rsp)
mov    %rdi,-0x20(%rsp)
mov    0x50(%rsp),%eax
test   %eax,%eax
jle    1486 <dmat_dtugxtlms_l+0x386>
mov    %rcx,-0x10(%rsp)
mov    %r8,-0x8(%rsp)
mov    0x48(%rsp),%r11
mov    %eax,%r13d
mov    $0x1,%r15d
xor    %ebp,%ebp
jmp    1151 <dmat_dtugxtlms_l+0x51>
nopl   0x0(%rax)
add    $0x1,%rbp
add    $0x1,%r15
cmp    %r13,%rbp
je     11e3 <dmat_dtugxtlms_l+0xe3>
mov    (%r11,%rbp,8),%r12
mov    %r13,%rbx
mov    -0x18(%rsp),%rax
mov    0x38(%rsp),%r14
xor    %r8d,%r8d
jmp    118b <dmat_dtugxtlms_l+0x8b>
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%r12,%r8,8)
add    $0x1,%r8
add    $0x8,%r14
add    $0x8,%rax
add    $0xffffffffffffffff,%rbx
cmp    %r15,%r8
je     1140 <dmat_dtugxtlms_l+0x40>
xorpd  %xmm0,%xmm0
cmp    %r13,%r8
jae    1170 <dmat_dtugxtlms_l+0x70>
lea    0x0(,%r8,8),%rdi
mov    (%rsi,%rbp,8),%rdx
add    %rdi,%rdx
add    (%r9,%rbp,8),%rdi
xorpd  %xmm0,%xmm0
xor    %r10d,%r10d
xchg   %ax,%ax
movsd  (%rdi,%r10,8),%xmm1
mov    (%rax,%r10,8),%rcx
mulsd  (%rcx,%r8,8),%xmm1
addsd  %xmm0,%xmm1
movsd  (%rdx,%r10,8),%xmm0
mov    (%r14,%r10,8),%rcx
mulsd  (%rcx,%r8,8),%xmm0
addsd  %xmm1,%xmm0
add    $0x1,%r10
cmp    %r10,%rbx
jne    11b0 <dmat_dtugxtlms_l+0xb0>
jmp    1170 <dmat_dtugxtlms_l+0x70>
cmpl   $0x0,0x50(%rsp)
jle    1486 <dmat_dtugxtlms_l+0x386>
mov    $0x1,%r15d
xor    %r12d,%r12d
movabs $0x7ffffffffffffffe,%r9
ff ff 7f
mov    %r13,%rax
mov    %r11,%rbp
jmp    1229 <dmat_dtugxtlms_l+0x129>
nopl   0x0(%rax)
add    $0x1,%r12
add    $0x1,%r15
add    $0x8,%rbp
add    $0xffffffffffffffff,%rax
cmp    %r13,%r12
je     1341 <dmat_dtugxtlms_l+0x241>
mov    -0x20(%rsp),%rcx
mov    (%rcx,%r12,8),%r14
test   %r12,%r12
je     12f0 <dmat_dtugxtlms_l+0x1f0>
mov    %r15,%r8
and    %r9,%r8
lea    (%r14,%r12,8),%rdi
xor    %r10d,%r10d
nopl   0x0(%rax,%rax,1)
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm1
mov    0x0(%rbp,%rcx,8),%rdx
mulsd  (%rdx,%r10,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1260 <dmat_dtugxtlms_l+0x160>
mov    0x40(%rsp),%rcx
mov    (%rcx,%r10,8),%rcx
movsd  %xmm0,(%rcx,%r12,8)
mov    %r10,%rdx
or     $0x1,%rdx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nopl   0x0(%rax)
movsd  (%rdi,%rcx,8),%xmm1
mov    0x0(%rbp,%rcx,8),%rbx
mulsd  (%rbx,%rdx,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rcx
cmp    %rcx,%rax
jne    12a0 <dmat_dtugxtlms_l+0x1a0>
mov    0x40(%rsp),%rcx
mov    (%rcx,%rdx,8),%rcx
movsd  %xmm0,(%rcx,%r12,8)
add    $0x2,%r10
cmp    %r8,%r10
jne    1250 <dmat_dtugxtlms_l+0x150>
test   $0x1,%r15b
je     1210 <dmat_dtugxtlms_l+0x110>
jmp    12fd <dmat_dtugxtlms_l+0x1fd>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %r10d,%r10d
test   $0x1,%r15b
je     1210 <dmat_dtugxtlms_l+0x110>
lea    (%r14,%r12,8),%rdx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rcx,8),%xmm1
mov    0x0(%rbp,%rcx,8),%rdi
mulsd  (%rdi,%r10,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1310 <dmat_dtugxtlms_l+0x210>
mov    0x40(%rsp),%rcx
mov    (%rcx,%r10,8),%rcx
movsd  %xmm0,(%rcx,%r12,8)
jmp    1210 <dmat_dtugxtlms_l+0x110>
mov    0x50(%rsp),%r12d
test   %r12d,%r12d
mov    -0x8(%rsp),%r14
mov    -0x10(%rsp),%r15
jle    1486 <dmat_dtugxtlms_l+0x386>
mov    $0x1,%r9d
xor    %r8d,%r8d
jmp    137d <dmat_dtugxtlms_l+0x27d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r8
add    $0x1,%r9
cmp    %r13,%r8
je     13ee <dmat_dtugxtlms_l+0x2ee>
mov    (%r11,%r8,8),%r10
mov    %r13,%rbx
mov    -0x18(%rsp),%rbp
xor    %eax,%eax
jmp    13a7 <dmat_dtugxtlms_l+0x2a7>
nopl   (%rax)
movsd  %xmm0,(%r10,%rax,8)
add    $0x1,%rax
add    $0x8,%rbp
add    $0xffffffffffffffff,%rbx
cmp    %r9,%rax
je     1370 <dmat_dtugxtlms_l+0x270>
xorpd  %xmm0,%xmm0
cmp    %r13,%rax
jae    1390 <dmat_dtugxtlms_l+0x290>
lea    0x0(,%rax,8),%rdx
add    (%rsi,%r8,8),%rdx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rdx,%rcx,8),%xmm1
mov    0x0(%rbp,%rcx,8),%rdi
mulsd  (%rdi,%rax,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rcx
cmp    %rcx,%rbx
jne    13d0 <dmat_dtugxtlms_l+0x2d0>
jmp    1390 <dmat_dtugxtlms_l+0x290>
test   %r12d,%r12d
jle    1486 <dmat_dtugxtlms_l+0x386>
mov    $0x1,%eax
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r14,%rbx,8),%rsi
mov    -0x20(%rsp),%rcx
mov    (%rcx,%rbx,8),%rdi
xor    %ebp,%ebp
nop
xorpd  %xmm0,%xmm0
mov    %rbx,%rdx
nopw   0x0(%rax,%rax,1)
mov    (%r11,%rdx,8),%rcx
movsd  (%rdi,%rdx,8),%xmm1
movhpd (%rsi,%rdx,8),%xmm1
movsd  (%rcx,%rbp,8),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm2,%xmm0
add    $0x1,%rdx
cmp    %rdx,%r13
jne    1420 <dmat_dtugxtlms_l+0x320>
mov    0x40(%rsp),%rcx
mov    (%rcx,%rbp,8),%rcx
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  (%rcx,%rbx,8),%xmm1
movsd  %xmm1,(%rcx,%rbx,8)
mov    (%r15,%rbp,8),%rcx
movlpd %xmm0,(%rcx,%rbx,8)
add    $0x1,%rbp
cmp    %rax,%rbp
jne    1410 <dmat_dtugxtlms_l+0x310>
add    $0x1,%rbx
add    $0x1,%rax
cmp    %r13,%rbx
jne    1400 <dmat_dtugxtlms_l+0x300>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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