void mass_spring_system(double Ts, int nx, int nu, int N, double *A, double *B,
                        double *b, double *x0) {
  int nx2 = nx * nx;
  int info = 0;
  int pp = nx / 2;
  double *T;
  d_zeros(&T, pp, pp);
  int ii;
  for (ii = 0; ii < pp; ii++)
    T[ii * (pp + 1)] = -2;
  for (ii = 0; ii < pp - 1; ii++)
    T[ii * (pp + 1) + 1] = 1;
  for (ii = 1; ii < pp; ii++)
    T[ii * (pp + 1) - 1] = 1;
  double *Z;
  d_zeros(&Z, pp, pp);
  double *I;
  d_zeros(&I, pp, pp);
  for (ii = 0; ii < pp; ii++)
    I[ii * (pp + 1)] = 1.0;
  double *Ac;
  d_zeros(&Ac, nx, nx);
  dmcopy(pp, pp, Z, pp, Ac, nx);
  dmcopy(pp, pp, T, pp, Ac + pp, nx);
  dmcopy(pp, pp, I, pp, Ac + pp * nx, nx);
  dmcopy(pp, pp, Z, pp, Ac + pp * (nx + 1), nx);
  free(T);
  free(Z);
  free(I);
  d_zeros(&I, nu, nu);
  for (ii = 0; ii < nu; ii++)
    I[ii * (nu + 1)] = 1.0;
  double *Bc;
  d_zeros(&Bc, nx, nu);
  dmcopy(nu, nu, I, nu, Bc + pp, nx);
  free(I);
  double *bb;
  d_zeros(&bb, nx, 1);
  dmcopy(nx, 1, bb, nx, b, nx);
  dmcopy(nx, nx, Ac, nx, A, nx);
  dscal_3l(nx2, Ts, A);
  expm(nx, A);
  d_zeros(&T, nx, nx);
  d_zeros(&I, nx, nx);
  for (ii = 0; ii < nx; ii++)
    I[ii * (nx + 1)] = 1.0;
  dmcopy(nx, nx, A, nx, T, nx);
  daxpy_3l(nx2, -1.0, I, T);
  dgemm_nn_3l(nx, nu, nx, T, nx, Bc, nx, B, nx);
  free(T);
  free(I);
  int *ipiv = (int *)malloc(nx * sizeof(int));
  dgesv_3l(nx, nu, Ac, nx, ipiv, B, nx, &info);
  free(ipiv);
  free(Ac);
  free(Bc);
  free(bb);
  if (nx == 4) {
    x0[0] = 5;
    x0[1] = 10;
    x0[2] = 15;
    x0[3] = 20;
  } else {
    int jj;
    for (jj = 0; jj < nx; jj++)
      x0[jj] = 1;
  }
}


x86 assembly (clang, -O0):
<mass_spring_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x10(%rbp),%rax
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    122a <mass_spring_system+0x9a>
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xe19(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11f0 <mass_spring_system+0x60>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1273 <mass_spring_system+0xe3>
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xda8(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1231 <mass_spring_system+0xa1>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12b7 <mass_spring_system+0x127>
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd64(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    127a <mass_spring_system+0xea>
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    -0x58(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    131a <mass_spring_system+0x18a>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xd01(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12e0 <mass_spring_system+0x150>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    -0x68(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
mov    -0x3c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
mov    -0x68(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x3c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
mov    -0x68(%rbp),%r8
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x3c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
mov    -0x68(%rbp),%r8
mov    -0x3c(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x3c(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    -0x3c(%rbp),%ecx
mov    -0x68(%rbp),%r8
mov    -0x3c(%rbp),%eax
mov    -0xc(%rbp),%r9d
add    $0x1,%r9d
imul   %r9d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x48(%rbp),%rdi
call   1050 <free@plt>
mov    -0x58(%rbp),%rdi
call   1050 <free@plt>
mov    -0x60(%rbp),%rdi
call   1050 <free@plt>
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    143b <mass_spring_system+0x2ab>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xbe0(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1401 <mass_spring_system+0x271>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
mov    -0x10(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x10(%rbp),%ecx
mov    -0x70(%rbp),%r8
movslq -0x3c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x60(%rbp),%rdi
call   1050 <free@plt>
mov    -0xc(%rbp),%esi
lea    -0x78(%rbp),%rdi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <d_zeros@plt>
mov    -0xc(%rbp),%edi
mov    -0x78(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x30(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    $0x1,%esi
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x68(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x34(%rbp),%edi
movsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rsi
mov    $0x1,%al
call   10b0 <dscal_3l@plt>
mov    -0xc(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    $0x0,%al
call   10a0 <expm@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <d_zeros@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    154d <mass_spring_system+0x3bd>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xace(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1513 <mass_spring_system+0x383>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x48(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x34(%rbp),%edi
mov    -0x60(%rbp),%rsi
mov    -0x48(%rbp),%rdx
movsd  0xa84(%rip),%xmm0
mov    $0x1,%al
call   1030 <daxpy_3l@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x48(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x70(%rbp),%r9
mov    -0xc(%rbp),%r11d
mov    -0x28(%rbp),%r10
mov    -0xc(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1090 <dgemm_nn_3l@plt>
mov    -0x48(%rbp),%rdi
call   1050 <free@plt>
mov    -0x60(%rbp),%rdi
call   1050 <free@plt>
movslq -0xc(%rbp),%rdi
shl    $0x2,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x68(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x80(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0xc(%rbp),%r10d
lea    -0x38(%rbp),%rax
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1070 <dgesv_3l@plt>
mov    -0x80(%rbp),%rdi
call   1050 <free@plt>
mov    -0x68(%rbp),%rdi
call   1050 <free@plt>
mov    -0x70(%rbp),%rdi
call   1050 <free@plt>
mov    -0x78(%rbp),%rdi
call   1050 <free@plt>
cmpl   $0x4,-0xc(%rbp)
jne    167d <mass_spring_system+0x4ed>
mov    0x10(%rbp),%rax
movsd  0x9e7(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movsd  0x9cf(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    0x10(%rbp),%rax
movsd  0x9b6(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    0x10(%rbp),%rax
movsd  0x99d(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
jmp    16c7 <mass_spring_system+0x537>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16c2 <mass_spring_system+0x532>
mov    0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x95f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1687 <mass_spring_system+0x4f7>
jmp    16c7 <mass_spring_system+0x537>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mass_spring_system>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,0x48(%rsp)
mov    %r8,%r15
mov    %rcx,0x58(%rsp)
mov    %rsi,0x60(%rsp)
mov    %edi,%r13d
movsd  %xmm0,0x50(%rsp)
movl   $0x0,0x34(%rsp)
mov    %edi,%r12d
shr    $0x1f,%r12d
add    %edi,%r12d
sar    %r12d
lea    0x8(%rsp),%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    %r12d,%r14d
cmp    $0x2,%r13d
jl     145c <mass_spring_system+0x2cc>
mov    0x8(%rsp),%r8
lea    0x1(%r12),%eax
movslq %eax,%r9
lea    -0x1(%r14),%rax
mov    %r14d,%ecx
and    $0x3,%ecx
movabs $0xc000000000000000,%rdx
cmp    $0x3,%rax
jae    1218 <mass_spring_system+0x88>
xor    %ebx,%ebx
jmp    126f <mass_spring_system+0xdf>
mov    %r14d,%r10d
and    $0xfffffffc,%r10d
lea    -0x1(%r9),%r11
mov    %r11,%rax
shl    $0x4,%rax
mov    %r11,%rsi
shl    $0x5,%rsi
add    $0x20,%rsi
lea    -0x8(,%r9,8),%rdi
ff
lea    (%rdi,%rdi,2),%rdi
xor    %ebx,%ebx
mov    %r8,%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %rdx,0x0(%rbp)
mov    %rdx,0x8(%rbp,%r11,8)
mov    %rdx,0x10(%rbp,%rax,1)
mov    %rdx,0x18(%rbp,%rdi,1)
add    $0x4,%rbx
add    %rsi,%rbp
cmp    %rbx,%r10
jne    1250 <mass_spring_system+0xc0>
test   %rcx,%rcx
je     129c <mass_spring_system+0x10c>
imul   %r9,%rbx
lea    (%r8,%rbx,8),%rax
lea    0x0(,%r9,8),%rsi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdx,(%rax)
add    %rsi,%rax
add    $0xffffffffffffffff,%rcx
jne    1290 <mass_spring_system+0x100>
cmp    $0x4,%r13d
jl     145c <mass_spring_system+0x2cc>
mov    0x8(%rsp),%r8
cmp    $0x3,%r12d
mov    $0x2,%esi
cmovge %r12d,%esi
add    $0xffffffff,%esi
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%rax
jae    12ce <mass_spring_system+0x13e>
xor    %edi,%edi
jmp    132f <mass_spring_system+0x19f>
and    $0xfffffffc,%esi
lea    -0x1(%r9),%r10
mov    %r10,%r11
shl    $0x4,%r11
mov    %r10,%rbx
shl    $0x5,%rbx
add    $0x20,%rbx
lea    -0x8(,%r9,8),%rax
ff
lea    (%rax,%rax,2),%rbp
xor    %edi,%edi
movabs $0x3ff0000000000000,%rdx
mov    %r8,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rdx,0x8(%rax)
mov    %rdx,0x10(%rax,%r10,8)
mov    %rdx,0x18(%rax,%r11,1)
mov    %rdx,0x20(%rax,%rbp,1)
add    $0x4,%rdi
add    %rbx,%rax
cmp    %rdi,%rsi
jne    1310 <mass_spring_system+0x180>
test   %rcx,%rcx
je     136c <mass_spring_system+0x1dc>
imul   %r9,%rdi
lea    (%r8,%rdi,8),%rax
add    $0x8,%rax
lea    0x0(,%r9,8),%rdx
movabs $0x3ff0000000000000,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,(%rax)
add    %rdx,%rax
add    $0xffffffffffffffff,%rcx
jne    1360 <mass_spring_system+0x1d0>
cmp    $0x4,%r13d
jl     145c <mass_spring_system+0x2cc>
mov    %r15,0x18(%rsp)
mov    0x8(%rsp),%rax
mov    %rax,0x38(%rsp)
cmp    $0x3,%r12d
mov    $0x2,%eax
cmovge %r12d,%eax
lea    -0x1(%rax),%r10
add    $0xfffffffffffffffe,%rax
mov    %r10d,%ecx
and    $0x3,%ecx
mov    $0x1,%edi
cmp    $0x3,%rax
jb     1418 <mass_spring_system+0x288>
lea    -0x1(%r9),%rax
mov    %rax,%rbx
shl    $0x5,%rbx
lea    0x20(%rbx),%r11
lea    -0x8(,%r9,8),%rdx
ff
lea    (%rdx,%rdx,2),%rsi
mov    %rax,%rdx
shl    $0x4,%rdx
and    $0xfffffffffffffffc,%r10
neg    %r10
mov    $0x1,%edi
movabs $0x3ff0000000000000,%rbp
mov    0x38(%rsp),%r8
nopl   0x0(%rax,%rax,1)
mov    %rbp,(%r8,%rax,8)
mov    %rbp,0x8(%r8,%rdx,1)
mov    %rbp,0x10(%r8,%rsi,1)
mov    %rbp,0x18(%r8,%rbx,1)
add    %r11,%r8
lea    (%r10,%rdi,1),%r15
add    $0x4,%r15
add    $0x4,%rdi
cmp    $0x1,%r15
jne    13f0 <mass_spring_system+0x260>
test   %rcx,%rcx
mov    0x18(%rsp),%r15
je     145c <mass_spring_system+0x2cc>
imul   %r9,%rdi
mov    0x38(%rsp),%rax
lea    (%rax,%rdi,8),%rax
add    $0xfffffffffffffff8,%rax
shl    $0x3,%r9
movabs $0x3ff0000000000000,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rax)
add    %r9,%rax
add    $0xffffffffffffffff,%rcx
jne    1450 <mass_spring_system+0x2c0>
lea    0x28(%rsp),%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    %rsp,%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
cmp    $0x2,%r13d
jl     152c <mass_spring_system+0x39c>
mov    (%rsp),%r8
lea    0x1(%r12),%eax
movslq %eax,%r9
lea    -0x1(%r14),%rax
mov    %r14d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rax
jae    14a8 <mass_spring_system+0x318>
xor    %esi,%esi
jmp    14ff <mass_spring_system+0x36f>
and    $0xfffffffc,%r14d
lea    -0x1(%r9),%r10
mov    %r10,%rdi
shl    $0x4,%rdi
mov    %r10,%rbx
shl    $0x5,%rbx
add    $0x20,%rbx
lea    -0x8(,%r9,8),%rax
ff
lea    (%rax,%rax,2),%rdx
xor    %esi,%esi
movabs $0x3ff0000000000000,%rax
mov    %r8,%rbp
nopl   (%rax)
mov    %rax,0x0(%rbp)
mov    %rax,0x8(%rbp,%r10,8)
mov    %rax,0x10(%rbp,%rdi,1)
mov    %rax,0x18(%rbp,%rdx,1)
add    $0x4,%rsi
add    %rbx,%rbp
cmp    %rsi,%r14
jne    14e0 <mass_spring_system+0x350>
test   %rcx,%rcx
je     152c <mass_spring_system+0x39c>
imul   %r9,%rsi
lea    (%r8,%rsi,8),%rax
shl    $0x3,%r9
movabs $0x3ff0000000000000,%rdx
nopw   0x0(%rax,%rax,1)
mov    %rdx,(%rax)
add    %r9,%rax
add    $0xffffffffffffffff,%rcx
jne    1520 <mass_spring_system+0x390>
mov    %r13d,%ebp
imul   %r13d,%ebp
lea    0x10(%rsp),%rdi
mov    %r13d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    0x28(%rsp),%rdx
mov    0x10(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x8(%rsp),%rdx
movslq %r12d,%r14
shl    $0x3,%r14
mov    0x10(%rsp),%r8
add    %r14,%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    (%rsp),%rdx
mov    %r12d,%eax
imul   %r13d,%eax
movslq %eax,%r8
shl    $0x3,%r8
add    0x10(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x28(%rsp),%rdx
lea    0x1(%r13),%ebx
mov    %r12d,%eax
imul   %ebx,%eax
movslq %eax,%r8
shl    $0x3,%r8
add    0x10(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x8(%rsp),%rdi
call   1050 <free@plt>
mov    0x28(%rsp),%rdi
call   1050 <free@plt>
mov    (%rsp),%rdi
call   1050 <free@plt>
mov    %rsp,%rdi
mov    0x60(%rsp),%r12
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
test   %r12d,%r12d
jle    16dc <mass_spring_system+0x54c>
mov    %r15,0x18(%rsp)
mov    %ebx,%r15d
mov    %ebp,%r11d
mov    (%rsp),%r8
lea    0x1(%r12),%eax
mov    %r12d,%r9d
lea    -0x1(%r9),%rdx
mov    %r9d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    1647 <mass_spring_system+0x4b7>
xor    %edi,%edi
jmp    169b <mass_spring_system+0x50b>
and    $0xfffffffc,%r9d
mov    %rax,%r10
shl    $0x4,%r10
mov    %rax,%rbp
shl    $0x5,%rbp
lea    0x0(,%rax,8),%rdx
lea    (%rdx,%rdx,2),%rdx
xor    %edi,%edi
movabs $0x3ff0000000000000,%rsi
mov    %r8,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rsi,(%rbx)
mov    %rsi,(%rbx,%rax,8)
mov    %rsi,(%rbx,%r10,1)
mov    %rsi,(%rbx,%rdx,1)
add    $0x4,%rdi
add    %rbp,%rbx
cmp    %rdi,%r9
jne    1680 <mass_spring_system+0x4f0>
test   %rcx,%rcx
mov    %r11d,%ebp
mov    %r15d,%ebx
mov    0x18(%rsp),%r15
je     16dc <mass_spring_system+0x54c>
imul   %rax,%rdi
lea    (%r8,%rdi,8),%rdx
shl    $0x3,%rax
movabs $0x3ff0000000000000,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,(%rdx)
add    %rax,%rdx
add    $0xffffffffffffffff,%rcx
jne    16d0 <mass_spring_system+0x540>
lea    0x20(%rsp),%rdi
mov    %r13d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    (%rsp),%rdx
add    0x20(%rsp),%r14
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r14,%r8
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    (%rsp),%rdi
call   1050 <free@plt>
lea    0x40(%rsp),%rdi
mov    %r13d,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    0x40(%rsp),%rdx
mov    %r13d,%edi
mov    $0x1,%esi
mov    %r13d,%ecx
mov    0x48(%rsp),%r8
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x10(%rsp),%rdx
mov    %r13d,%edi
mov    %r13d,%esi
mov    %r13d,%ecx
mov    0x58(%rsp),%r14
mov    %r14,%r8
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    %ebp,%edi
movsd  0x50(%rsp),%xmm0
mov    %r14,%rsi
mov    $0x1,%al
call   10b0 <dscal_3l@plt>
mov    %r13d,%edi
mov    %r14,%rsi
xor    %eax,%eax
call   10a0 <expm@plt>
lea    0x8(%rsp),%rdi
mov    %r13d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    %rsp,%rdi
mov    %r13d,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
test   %r13d,%r13d
jle    185c <mass_spring_system+0x6cc>
mov    %ebp,%r11d
mov    (%rsp),%r8
movslq %ebx,%rax
mov    %r13d,%r9d
lea    -0x1(%r9),%rdx
mov    %r9d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    17d4 <mass_spring_system+0x644>
xor    %edi,%edi
jmp    182b <mass_spring_system+0x69b>
and    $0xfffffffc,%r9d
mov    %rax,%r10
shl    $0x4,%r10
mov    %rax,%rbp
shl    $0x5,%rbp
lea    0x0(,%rax,8),%rdx
lea    (%rdx,%rdx,2),%rdx
xor    %edi,%edi
movabs $0x3ff0000000000000,%rsi
mov    %r8,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,(%rbx)
mov    %rsi,(%rbx,%rax,8)
mov    %rsi,(%rbx,%r10,1)
mov    %rsi,(%rbx,%rdx,1)
add    $0x4,%rdi
add    %rbp,%rbx
cmp    %rdi,%r9
jne    1810 <mass_spring_system+0x680>
test   %rcx,%rcx
mov    %r11d,%ebp
je     185c <mass_spring_system+0x6cc>
imul   %rax,%rdi
lea    (%r8,%rdi,8),%rdx
shl    $0x3,%rax
movabs $0x3ff0000000000000,%rsi
nopl   0x0(%rax)
mov    %rsi,(%rdx)
add    %rax,%rdx
add    $0xffffffffffffffff,%rcx
jne    1850 <mass_spring_system+0x6c0>
mov    0xa0(%rsp),%rbx
mov    0x8(%rsp),%r8
mov    %r13d,%edi
mov    %r13d,%esi
mov    %r14,%rdx
mov    %r13d,%ecx
mov    %r13d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    (%rsp),%rsi
mov    0x8(%rsp),%rdx
movsd  0x770(%rip),%xmm0
mov    %ebp,%edi
mov    $0x1,%al
call   1030 <daxpy_3l@plt>
mov    0x8(%rsp),%rcx
mov    0x20(%rsp),%r9
sub    $0x8,%rsp
mov    %r13d,%edi
mov    %r12d,%esi
mov    %r13d,%edx
mov    %r13d,%r8d
xor    %eax,%eax
push   %r13
push   %r15
push   %r13
call   1090 <dgemm_nn_3l@plt>
add    $0x20,%rsp
mov    0x8(%rsp),%rdi
call   1050 <free@plt>
mov    (%rsp),%rdi
call   1050 <free@plt>
movslq %r13d,%rdi
shl    $0x2,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    0x10(%rsp),%rdx
lea    0x34(%rsp),%r10
mov    %r13d,%edi
mov    %r12d,%esi
mov    %r13d,%ecx
mov    %rax,%r8
mov    %r15,%r9
xor    %eax,%eax
push   %r10
push   %r13
call   1070 <dgesv_3l@plt>
add    $0x10,%rsp
mov    %rbp,%rdi
call   1050 <free@plt>
mov    0x10(%rsp),%rdi
call   1050 <free@plt>
mov    0x20(%rsp),%rdi
call   1050 <free@plt>
mov    0x40(%rsp),%rdi
call   1050 <free@plt>
cmp    $0x4,%r13d
jne    1954 <mass_spring_system+0x7c4>
movaps 0x6df(%rip),%xmm0
movups %xmm0,(%rbx)
movaps 0x6e5(%rip),%xmm0
movups %xmm0,0x10(%rbx)
jmp    1a6d <mass_spring_system+0x8dd>
test   %r13d,%r13d
jle    1a6d <mass_spring_system+0x8dd>
mov    %r13d,%eax
cmp    $0x4,%r13d
jae    196d <mass_spring_system+0x7dd>
xor    %ecx,%ecx
jmp    1a47 <mass_spring_system+0x8b7>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    1993 <mass_spring_system+0x803>
xor    %edi,%edi
jmp    1a11 <mass_spring_system+0x881>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
movaps 0x670(%rip),%xmm0
movups %xmm0,(%rbx,%rdi,8)
movups %xmm0,0x10(%rbx,%rdi,8)
movups %xmm0,0x20(%rbx,%rdi,8)
movups %xmm0,0x30(%rbx,%rdi,8)
movups %xmm0,0x40(%rbx,%rdi,8)
movups %xmm0,0x50(%rbx,%rdi,8)
movups %xmm0,0x60(%rbx,%rdi,8)
movups %xmm0,0x70(%rbx,%rdi,8)
movups %xmm0,0x80(%rbx,%rdi,8)
movups %xmm0,0x90(%rbx,%rdi,8)
movups %xmm0,0xa0(%rbx,%rdi,8)
movups %xmm0,0xb0(%rbx,%rdi,8)
movups %xmm0,0xc0(%rbx,%rdi,8)
movups %xmm0,0xd0(%rbx,%rdi,8)
movups %xmm0,0xe0(%rbx,%rdi,8)
movups %xmm0,0xf0(%rbx,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    19a0 <mass_spring_system+0x810>
test   %rdx,%rdx
je     1a42 <mass_spring_system+0x8b2>
lea    (%rbx,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movaps 0x5e5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movups %xmm0,-0x10(%rsi,%rdi,1)
movups %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1a30 <mass_spring_system+0x8a0>
cmp    %rax,%rcx
je     1a6d <mass_spring_system+0x8dd>
movabs $0x3ff0000000000000,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1a60 <mass_spring_system+0x8d0>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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