void mass_spring_system(double Ts, int nx, int nu, 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);
  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
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%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    1227 <mass_spring_system+0x97>
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xe1c(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11ed <mass_spring_system+0x5d>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1270 <mass_spring_system+0xe0>
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  0xdab(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    122e <mass_spring_system+0x9e>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12b4 <mass_spring_system+0x124>
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  0xd67(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1277 <mass_spring_system+0xe7>
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    1317 <mass_spring_system+0x187>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x3c(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xd04(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12dd <mass_spring_system+0x14d>
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    1438 <mass_spring_system+0x2a8>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0x10(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xbe3(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13fe <mass_spring_system+0x26e>
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    -0x28(%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    -0x18(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    $0x0,%al
call   1060 <dmcopy@plt>
mov    -0x34(%rbp),%edi
movsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rsi
mov    $0x1,%al
call   10b0 <dscal_3l@plt>
mov    -0xc(%rbp),%edi
mov    -0x18(%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    154a <mass_spring_system+0x3ba>
mov    -0x60(%rbp),%rax
mov    -0x4c(%rbp),%ecx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
movsd  0xad1(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1510 <mass_spring_system+0x380>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%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  0xa87(%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    -0x20(%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>
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    -0x20(%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    1668 <mass_spring_system+0x4d8>
mov    -0x30(%rbp),%rax
movsd  0x9fc(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0x9e4(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x30(%rbp),%rax
movsd  0x9cb(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x30(%rbp),%rax
movsd  0x9b2(%rip),%xmm0
movsd  %xmm0,0x18(%rax)
jmp    16b2 <mass_spring_system+0x522>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16ad <mass_spring_system+0x51d>
mov    -0x30(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  0x974(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1672 <mass_spring_system+0x4e2>
jmp    16b2 <mass_spring_system+0x522>
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    $0x78,%rsp
mov    %r9,%r14
mov    %r8,0x50(%rsp)
mov    %rcx,0x70(%rsp)
mov    %rdx,0x60(%rsp)
mov    %rsi,0x68(%rsp)
mov    %edi,%r15d
movsd  %xmm0,0x58(%rsp)
movl   $0x0,0x3c(%rsp)
mov    %edi,%r12d
shr    $0x1f,%r12d
add    %edi,%r12d
sar    %r12d
lea    0x10(%rsp),%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    %r12d,%r13d
cmp    $0x2,%r15d
jl     145c <mass_spring_system+0x2cc>
mov    0x10(%rsp),%r8
lea    0x1(%r12),%eax
movslq %eax,%r9
lea    -0x1(%r13),%rax
mov    %r13d,%ecx
and    $0x3,%ecx
movabs $0xc000000000000000,%rdx
cmp    $0x3,%rax
jae    121d <mass_spring_system+0x8d>
xor    %eax,%eax
jmp    126e <mass_spring_system+0xde>
mov    %r13d,%r10d
and    $0xfffffffc,%r10d
lea    -0x1(%r9),%r11
mov    %r11,%rsi
shl    $0x4,%rsi
mov    %r11,%rbp
shl    $0x5,%rbp
add    $0x20,%rbp
lea    -0x8(,%r9,8),%rax
ff
lea    (%rax,%rax,2),%rdi
xor    %eax,%eax
mov    %r8,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rbx)
mov    %rdx,0x8(%rbx,%r11,8)
mov    %rdx,0x10(%rbx,%rsi,1)
mov    %rdx,0x18(%rbx,%rdi,1)
add    $0x4,%rax
add    %rbp,%rbx
cmp    %rax,%r10
jne    1250 <mass_spring_system+0xc0>
test   %rcx,%rcx
je     129c <mass_spring_system+0x10c>
imul   %r9,%rax
lea    (%r8,%rax,8),%rax
lea    0x0(,%r9,8),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rdx,(%rax)
add    %rsi,%rax
add    $0xffffffffffffffff,%rcx
jne    1290 <mass_spring_system+0x100>
cmp    $0x4,%r15d
jl     145c <mass_spring_system+0x2cc>
mov    0x10(%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,%rdx
shl    $0x5,%rdx
add    $0x20,%rdx
lea    -0x8(,%r9,8),%rax
ff
lea    (%rax,%rax,2),%rbx
xor    %edi,%edi
movabs $0x3ff0000000000000,%rbp
mov    %r8,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,0x8(%rax)
mov    %rbp,0x10(%rax,%r10,8)
mov    %rbp,0x18(%rax,%r11,1)
mov    %rbp,0x20(%rax,%rbx,1)
add    $0x4,%rdi
add    %rdx,%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,%r15d
jl     145c <mass_spring_system+0x2cc>
mov    %r9,0x20(%rsp)
mov    0x10(%rsp),%rax
mov    %rax,0x40(%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>
mov    0x20(%rsp),%rax
lea    -0x1(%rax),%rsi
mov    %rsi,%rdx
shl    $0x5,%rdx
lea    0x20(%rdx),%r11
lea    -0x8(,%rax,8),%rax
ff
lea    (%rax,%rax,2),%rbp
mov    %rsi,%rax
shl    $0x4,%rax
and    $0xfffffffffffffffc,%r10
neg    %r10
mov    $0x1,%edi
movabs $0x3ff0000000000000,%rbx
mov    0x40(%rsp),%r8
nopl   (%rax)
mov    %rbx,(%r8,%rsi,8)
mov    %rbx,0x8(%r8,%rax,1)
mov    %rbx,0x10(%r8,%rbp,1)
mov    %rbx,0x18(%r8,%rdx,1)
add    %r11,%r8
lea    (%r10,%rdi,1),%r9
add    $0x4,%r9
add    $0x4,%rdi
cmp    $0x1,%r9
jne    13f0 <mass_spring_system+0x260>
test   %rcx,%rcx
mov    0x20(%rsp),%rsi
je     145c <mass_spring_system+0x2cc>
imul   %rsi,%rdi
mov    0x40(%rsp),%rax
lea    (%rax,%rdi,8),%rax
add    $0xfffffffffffffff8,%rax
shl    $0x3,%rsi
movabs $0x3ff0000000000000,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rdx,(%rax)
add    %rsi,%rax
add    $0xffffffffffffffff,%rcx
jne    1450 <mass_spring_system+0x2c0>
lea    0x30(%rsp),%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
lea    0x8(%rsp),%rdi
mov    %r12d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
cmp    $0x2,%r15d
jl     152c <mass_spring_system+0x39c>
mov    0x8(%rsp),%r8
lea    0x1(%r12),%eax
movslq %eax,%r9
lea    -0x1(%r13),%rax
mov    %r13d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rax
jae    14ab <mass_spring_system+0x31b>
xor    %esi,%esi
jmp    14fe <mass_spring_system+0x36e>
and    $0xfffffffc,%r13d
lea    -0x1(%r9),%r10
mov    %r10,%rdi
shl    $0x4,%rdi
mov    %r10,%rbp
shl    $0x5,%rbp
add    $0x20,%rbp
lea    -0x8(,%r9,8),%rax
ff
lea    (%rax,%rax,2),%rdx
xor    %esi,%esi
movabs $0x3ff0000000000000,%rax
mov    %r8,%rbx
mov    %rax,(%rbx)
mov    %rax,0x8(%rbx,%r10,8)
mov    %rax,0x10(%rbx,%rdi,1)
mov    %rax,0x18(%rbx,%rdx,1)
add    $0x4,%rsi
add    %rbp,%rbx
cmp    %rsi,%r13
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
nopl   0x0(%rax)
mov    %rdx,(%rax)
add    %r9,%rax
add    $0xffffffffffffffff,%rcx
jne    1520 <mass_spring_system+0x390>
mov    %r15d,%ebx
imul   %r15d,%ebx
lea    0x18(%rsp),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    0x30(%rsp),%rdx
mov    0x18(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x10(%rsp),%rdx
movslq %r12d,%r13
shl    $0x3,%r13
mov    0x18(%rsp),%r8
add    %r13,%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x8(%rsp),%rdx
mov    %r12d,%eax
imul   %r15d,%eax
movslq %eax,%r8
shl    $0x3,%r8
add    0x18(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x30(%rsp),%rdx
lea    0x1(%r15),%ebp
mov    %r12d,%eax
imul   %ebp,%eax
movslq %eax,%r8
shl    $0x3,%r8
add    0x18(%rsp),%r8
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x10(%rsp),%rdi
call   1050 <free@plt>
mov    0x30(%rsp),%rdi
call   1050 <free@plt>
mov    0x8(%rsp),%rdi
call   1050 <free@plt>
lea    0x8(%rsp),%rdi
mov    0x68(%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    %ebp,0x20(%rsp)
mov    %ebx,%r11d
mov    0x8(%rsp),%r8
lea    0x1(%r12),%eax
mov    %r12d,%r9d
lea    -0x1(%r9),%rdx
mov    %r9d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    1648 <mass_spring_system+0x4b8>
xor    %edi,%edi
jmp    169f <mass_spring_system+0x50f>
and    $0xfffffffc,%r9d
mov    %rax,%r10
shl    $0x4,%r10
mov    %rax,%rbx
shl    $0x5,%rbx
lea    0x0(,%rax,8),%rdx
lea    (%rdx,%rdx,2),%rdx
xor    %edi,%edi
movabs $0x3ff0000000000000,%rsi
mov    %r8,%rbp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rsi,0x0(%rbp)
mov    %rsi,0x0(%rbp,%rax,8)
mov    %rsi,0x0(%rbp,%r10,1)
mov    %rsi,0x0(%rbp,%rdx,1)
add    $0x4,%rdi
add    %rbx,%rbp
cmp    %rdi,%r9
jne    1680 <mass_spring_system+0x4f0>
test   %rcx,%rcx
mov    %r11d,%ebx
mov    0x20(%rsp),%ebp
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    0x28(%rsp),%rdi
mov    %r15d,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    0x8(%rsp),%rdx
add    0x28(%rsp),%r13
mov    %r12d,%edi
mov    %r12d,%esi
mov    %r12d,%ecx
mov    %r13,%r8
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x8(%rsp),%rdi
call   1050 <free@plt>
lea    0x48(%rsp),%rdi
mov    %r15d,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
mov    0x48(%rsp),%rdx
mov    %r15d,%edi
mov    $0x1,%esi
mov    %r15d,%ecx
mov    0x50(%rsp),%r8
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x18(%rsp),%rdx
mov    %r15d,%edi
mov    %r15d,%esi
mov    %r15d,%ecx
mov    0x60(%rsp),%r13
mov    %r13,%r8
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    %ebx,%edi
movsd  0x58(%rsp),%xmm0
mov    %r13,%rsi
mov    $0x1,%al
call   10b0 <dscal_3l@plt>
mov    %r15d,%edi
mov    %r13,%rsi
xor    %eax,%eax
call   10a0 <expm@plt>
lea    0x10(%rsp),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
lea    0x8(%rsp),%rdi
mov    %r15d,%esi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <d_zeros@plt>
test   %r15d,%r15d
jle    185c <mass_spring_system+0x6cc>
mov    %ebx,%r11d
mov    0x8(%rsp),%r8
movslq %ebp,%rax
mov    %r15d,%r9d
lea    -0x1(%r9),%rdx
mov    %r9d,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    17d9 <mass_spring_system+0x649>
xor    %edi,%edi
jmp    182f <mass_spring_system+0x69f>
and    $0xfffffffc,%r9d
mov    %rax,%r10
shl    $0x4,%r10
mov    %rax,%rbx
shl    $0x5,%rbx
lea    0x0(,%rax,8),%rdx
lea    (%rdx,%rdx,2),%rdx
xor    %edi,%edi
movabs $0x3ff0000000000000,%rsi
mov    %r8,%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %rsi,0x0(%rbp)
mov    %rsi,0x0(%rbp,%rax,8)
mov    %rsi,0x0(%rbp,%r10,1)
mov    %rsi,0x0(%rbp,%rdx,1)
add    $0x4,%rdi
add    %rbx,%rbp
cmp    %rdi,%r9
jne    1810 <mass_spring_system+0x680>
test   %rcx,%rcx
mov    %r11d,%ebx
je     185c <mass_spring_system+0x6cc>
imul   %rax,%rdi
lea    (%r8,%rdi,8),%rdx
shl    $0x3,%rax
movabs $0x3ff0000000000000,%rsi
nopl   (%rax)
mov    %rsi,(%rdx)
add    %rax,%rdx
add    $0xffffffffffffffff,%rcx
jne    1850 <mass_spring_system+0x6c0>
mov    0x10(%rsp),%r8
mov    %r15d,%edi
mov    %r15d,%esi
mov    %r13,%rdx
mov    %r15d,%ecx
mov    %r15d,%r9d
xor    %eax,%eax
call   1060 <dmcopy@plt>
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
movsd  0x777(%rip),%xmm0
mov    %ebx,%edi
mov    $0x1,%al
call   1030 <daxpy_3l@plt>
mov    0x10(%rsp),%rcx
mov    0x28(%rsp),%r9
sub    $0x8,%rsp
mov    %r15d,%edi
mov    %r12d,%esi
mov    %r15d,%edx
mov    %r15d,%r8d
xor    %eax,%eax
push   %r15
mov    0x80(%rsp),%rbp
push   %rbp
push   %r15
call   1090 <dgemm_nn_3l@plt>
add    $0x20,%rsp
movslq %r15d,%rdi
shl    $0x2,%rdi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    0x18(%rsp),%rdx
lea    0x3c(%rsp),%r10
mov    %r15d,%edi
mov    %r12d,%esi
mov    %r15d,%ecx
mov    %rax,%r8
mov    %rbp,%r9
xor    %eax,%eax
push   %r10
push   %r15
call   1070 <dgesv_3l@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
call   1050 <free@plt>
mov    0x18(%rsp),%rdi
call   1050 <free@plt>
mov    0x28(%rsp),%rdi
call   1050 <free@plt>
mov    0x48(%rsp),%rdi
call   1050 <free@plt>
cmp    $0x4,%r15d
jne    1943 <mass_spring_system+0x7b3>
movaps 0x6f2(%rip),%xmm0
movups %xmm0,(%r14)
movaps 0x6f7(%rip),%xmm0
movups %xmm0,0x10(%r14)
jmp    1a6d <mass_spring_system+0x8dd>
test   %r15d,%r15d
jle    1a6d <mass_spring_system+0x8dd>
mov    %r15d,%eax
cmp    $0x4,%r15d
jae    195c <mass_spring_system+0x7cc>
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    1982 <mass_spring_system+0x7f2>
xor    %edi,%edi
jmp    1a15 <mass_spring_system+0x885>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
movaps 0x681(%rip),%xmm0
nop
movups %xmm0,(%r14,%rdi,8)
movups %xmm0,0x10(%r14,%rdi,8)
movups %xmm0,0x20(%r14,%rdi,8)
movups %xmm0,0x30(%r14,%rdi,8)
movups %xmm0,0x40(%r14,%rdi,8)
movups %xmm0,0x50(%r14,%rdi,8)
movups %xmm0,0x60(%r14,%rdi,8)
movups %xmm0,0x70(%r14,%rdi,8)
movups %xmm0,0x80(%r14,%rdi,8)
movups %xmm0,0x90(%r14,%rdi,8)
movups %xmm0,0xa0(%r14,%rdi,8)
movups %xmm0,0xb0(%r14,%rdi,8)
movups %xmm0,0xc0(%r14,%rdi,8)
movups %xmm0,0xd0(%r14,%rdi,8)
movups %xmm0,0xe0(%r14,%rdi,8)
movups %xmm0,0xf0(%r14,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    1990 <mass_spring_system+0x800>
test   %rdx,%rdx
je     1a42 <mass_spring_system+0x8b2>
lea    (%r14,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movaps 0x5e1(%rip),%xmm0
nop
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,(%r14,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1a60 <mass_spring_system+0x8d0>
add    $0x78,%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, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double*
%19 = alloca i32
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca i32*
%26 = alloca i32
store double %0, double* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%27 = load i32, i32* %9
%28 = load i32, i32* %9
%29 = mul nsw i32 %27, %28
store i32 %29, i32* %15
store i32 0, i32* %16
%30 = load i32, i32* %9
%31 = sdiv i32 %30, 2
store i32 %31, i32* %17
%32 = load i32, i32* %17
%33 = load i32, i32* %17
%34 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %18, i32 %32, i32 %33)
store i32 0, i32* %19
br label %35
35: ; preds = %47, %7
%36 = load i32, i32* %19
%37 = load i32, i32* %17
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %50
39: ; preds = %35
%40 = load double*, double** %18
%41 = load i32, i32* %19
%42 = load i32, i32* %17
%43 = add nsw i32 %42, 1
%44 = mul nsw i32 %41, %43
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %40, i64 %45
store double -2.000000e+00, double* %46
br label %47
47: ; preds = %39
%48 = load i32, i32* %19
%49 = add nsw i32 %48, 1
store i32 %49, i32* %19
br label %35
50: ; preds = %35
store i32 0, i32* %19
br label %51
51: ; preds = %65, %50
%52 = load i32, i32* %19
%53 = load i32, i32* %17
%54 = sub nsw i32 %53, 1
%55 = icmp slt i32 %52, %54
br i1 %55, label %56, label %68
56: ; preds = %51
%57 = load double*, double** %18
%58 = load i32, i32* %19
%59 = load i32, i32* %17
%60 = add nsw i32 %59, 1
%61 = mul nsw i32 %58, %60
%62 = add nsw i32 %61, 1
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %57, i64 %63
store double 1.000000e+00, double* %64
br label %65
65: ; preds = %56
%66 = load i32, i32* %19
%67 = add nsw i32 %66, 1
store i32 %67, i32* %19
br label %51
68: ; preds = %51
store i32 1, i32* %19
br label %69
69: ; preds = %82, %68
%70 = load i32, i32* %19
%71 = load i32, i32* %17
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %85
73: ; preds = %69
%74 = load double*, double** %18
%75 = load i32, i32* %19
%76 = load i32, i32* %17
%77 = add nsw i32 %76, 1
%78 = mul nsw i32 %75, %77
%79 = sub nsw i32 %78, 1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %74, i64 %80
store double 1.000000e+00, double* %81
br label %82
82: ; preds = %73
%83 = load i32, i32* %19
%84 = add nsw i32 %83, 1
store i32 %84, i32* %19
br label %69
85: ; preds = %69
%86 = load i32, i32* %17
%87 = load i32, i32* %17
%88 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %20, i32 %86, i32 %87)
%89 = load i32, i32* %17
%90 = load i32, i32* %17
%91 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %21, i32 %89, i32 %90)
store i32 0, i32* %19
br label %92
92: ; preds = %104, %85
%93 = load i32, i32* %19
%94 = load i32, i32* %17
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %107
96: ; preds = %92
%97 = load double*, double** %21
%98 = load i32, i32* %19
%99 = load i32, i32* %17
%100 = add nsw i32 %99, 1
%101 = mul nsw i32 %98, %100
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %97, i64 %102
store double 1.000000e+00, double* %103
br label %104
104: ; preds = %96
%105 = load i32, i32* %19
%106 = add nsw i32 %105, 1
store i32 %106, i32* %19
br label %92
107: ; preds = %92
%108 = load i32, i32* %9
%109 = load i32, i32* %9
%110 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %22, i32 %108, i32 %109)
%111 = load i32, i32* %17
%112 = load i32, i32* %17
%113 = load double*, double** %20
%114 = load i32, i32* %17
%115 = load double*, double** %22
%116 = load i32, i32* %9
%117 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %111, i32 %112, double* %113, i32 %114, double* %115, i32 %116)
%118 = load i32, i32* %17
%119 = load i32, i32* %17
%120 = load double*, double** %18
%121 = load i32, i32* %17
%122 = load double*, double** %22
%123 = load i32, i32* %17
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load i32, i32* %9
%127 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %118, i32 %119, double* %120, i32 %121, double* %125, i32 %126)
%128 = load i32, i32* %17
%129 = load i32, i32* %17
%130 = load double*, double** %21
%131 = load i32, i32* %17
%132 = load double*, double** %22
%133 = load i32, i32* %17
%134 = load i32, i32* %9
%135 = mul nsw i32 %133, %134
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %132, i64 %136
%138 = load i32, i32* %9
%139 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %128, i32 %129, double* %130, i32 %131, double* %137, i32 %138)
%140 = load i32, i32* %17
%141 = load i32, i32* %17
%142 = load double*, double** %20
%143 = load i32, i32* %17
%144 = load double*, double** %22
%145 = load i32, i32* %17
%146 = load i32, i32* %9
%147 = add nsw i32 %146, 1
%148 = mul nsw i32 %145, %147
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %144, i64 %149
%151 = load i32, i32* %9
%152 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %140, i32 %141, double* %142, i32 %143, double* %150, i32 %151)
%153 = load double*, double** %18
%154 = bitcast double* %153 to i8*
%155 = load double*, double** %20
%156 = bitcast double* %155 to i8*
%157 = load double*, double** %21
%158 = bitcast double* %157 to i8*
%159 = load i32, i32* %10
%160 = load i32, i32* %10
%161 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %21, i32 %159, i32 %160)
store i32 0, i32* %19
br label %162
162: ; preds = %174, %107
%163 = load i32, i32* %19
%164 = load i32, i32* %10
%165 = icmp slt i32 %163, %164
br i1 %165, label %166, label %177
166: ; preds = %162
%167 = load double*, double** %21
%168 = load i32, i32* %19
%169 = load i32, i32* %10
%170 = add nsw i32 %169, 1
%171 = mul nsw i32 %168, %170
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %167, i64 %172
store double 1.000000e+00, double* %173
br label %174
174: ; preds = %166
%175 = load i32, i32* %19
%176 = add nsw i32 %175, 1
store i32 %176, i32* %19
br label %162
177: ; preds = %162
%178 = load i32, i32* %9
%179 = load i32, i32* %10
%180 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %23, i32 %178, i32 %179)
%181 = load i32, i32* %10
%182 = load i32, i32* %10
%183 = load double*, double** %21
%184 = load i32, i32* %10
%185 = load double*, double** %23
%186 = load i32, i32* %17
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds double, double* %185, i64 %187
%189 = load i32, i32* %9
%190 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %181, i32 %182, double* %183, i32 %184, double* %188, i32 %189)
%191 = load double*, double** %21
%192 = bitcast double* %191 to i8*
%193 = load i32, i32* %9
%194 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %24, i32 %193, i32 1)
%195 = load i32, i32* %9
%196 = load double*, double** %24
%197 = load i32, i32* %9
%198 = load double*, double** %13
%199 = load i32, i32* %9
%200 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %195, i32 1, double* %196, i32 %197, double* %198, i32 %199)
%201 = load i32, i32* %9
%202 = load i32, i32* %9
%203 = load double*, double** %22
%204 = load i32, i32* %9
%205 = load double*, double** %11
%206 = load i32, i32* %9
%207 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %201, i32 %202, double* %203, i32 %204, double* %205, i32 %206)
%208 = load i32, i32* %15
%209 = load double, double* %8
%210 = load double*, double** %11
%211 = call i32 (i32, double, double*, ...) bitcast (i32 (...)* @dscal_3l to i32 (i32, double, double*, ...)*)(i32 %208, double %209, double* %210)
%212 = load i32, i32* %9
%213 = load double*, double** %11
%214 = call i32 (i32, double*, ...) bitcast (i32 (...)* @expm to i32 (i32, double*, ...)*)(i32 %212, double* %213)
%215 = load i32, i32* %9
%216 = load i32, i32* %9
%217 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %18, i32 %215, i32 %216)
%218 = load i32, i32* %9
%219 = load i32, i32* %9
%220 = call i32 (double**, i32, i32, ...) bitcast (i32 (...)* @d_zeros to i32 (double**, i32, i32, ...)*)(double** %21, i32 %218, i32 %219)
store i32 0, i32* %19
br label %221
221: ; preds = %233, %177
%222 = load i32, i32* %19
%223 = load i32, i32* %9
%224 = icmp slt i32 %222, %223
br i1 %224, label %225, label %236
225: ; preds = %221
%226 = load double*, double** %21
%227 = load i32, i32* %19
%228 = load i32, i32* %9
%229 = add nsw i32 %228, 1
%230 = mul nsw i32 %227, %229
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double, double* %226, i64 %231
store double 1.000000e+00, double* %232
br label %233
233: ; preds = %225
%234 = load i32, i32* %19
%235 = add nsw i32 %234, 1
store i32 %235, i32* %19
br label %221
236: ; preds = %221
%237 = load i32, i32* %9
%238 = load i32, i32* %9
%239 = load double*, double** %11
%240 = load i32, i32* %9
%241 = load double*, double** %18
%242 = load i32, i32* %9
%243 = call i32 (i32, i32, double*, i32, double*, i32, ...) bitcast (i32 (...)* @dmcopy to i32 (i32, i32, double*, i32, double*, i32, ...)*)(i32 %237, i32 %238, double* %239, i32 %240, double* %241, i32 %242)
%244 = load i32, i32* %15
%245 = load double*, double** %21
%246 = load double*, double** %18
%247 = call i32 (i32, double, double*, double*, ...) bitcast (i32 (...)* @daxpy_3l to i32 (i32, double, double*, double*, ...)*)(i32 %244, double -1.000000e+00, double* %245, double* %246)
%248 = load i32, i32* %9
%249 = load i32, i32* %10
%250 = load i32, i32* %9
%251 = load double*, double** %18
%252 = load i32, i32* %9
%253 = load double*, double** %23
%254 = load i32, i32* %9
%255 = load double*, double** %12
%256 = load i32, i32* %9
%257 = 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 %248, i32 %249, i32 %250, double* %251, i32 %252, double* %253, i32 %254, double* %255, i32 %256)
%258 = load i32, i32* %9
%259 = sext i32 %258 to i64
%260 = mul i64 %259, 4
%261 = call i8* @malloc(i64 %260)
%262 = bitcast i8* %261 to i32*
store i32* %262, i32** %25
%263 = load i32, i32* %9
%264 = load i32, i32* %10
%265 = load double*, double** %22
%266 = load i32, i32* %9
%267 = load i32*, i32** %25
%268 = load double*, double** %12
%269 = load i32, i32* %9
%270 = 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 %263, i32 %264, double* %265, i32 %266, i32* %267, double* %268, i32 %269, i32* %16)
%271 = load i32*, i32** %25
%272 = bitcast i32* %271 to i8*
%273 = load double*, double** %22
%274 = bitcast double* %273 to i8*
%275 = load double*, double** %23
%276 = bitcast double* %275 to i8*
%277 = load double*, double** %24
%278 = bitcast double* %277 to i8*
%279 = load i32, i32* %9
%280 = icmp eq i32 %279, 4
br i1 %280, label %281, label %290
281: ; preds = %236
%282 = load double*, double** %14
%283 = getelementptr inbounds double, double* %282, i64 0
store double 5.000000e+00, double* %283
%284 = load double*, double** %14
%285 = getelementptr inbounds double, double* %284, i64 1
store double 1.000000e+01, double* %285
%286 = load double*, double** %14
%287 = getelementptr inbounds double, double* %286, i64 2
store double 1.500000e+01, double* %287
%288 = load double*, double** %14
%289 = getelementptr inbounds double, double* %288, i64 3
store double 2.000000e+01, double* %289
br label %304
290: ; preds = %236
store i32 0, i32* %26
br label %291
291: ; preds = %300, %290
%292 = load i32, i32* %26
%293 = load i32, i32* %9
%294 = icmp slt i32 %292, %293
br i1 %294, label %295, label %303
295: ; preds = %291
%296 = load double*, double** %14
%297 = load i32, i32* %26
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds double, double* %296, i64 %298
store double 1.000000e+00, double* %299
br label %300
300: ; preds = %295
%301 = load i32, i32* %26
%302 = add nsw i32 %301, 1
store i32 %302, i32* %26
br label %291
303: ; preds = %291
br label %304
304: ; preds = %303, %281
ret void
}

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