#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ err_msg(char *);
int /*<<< orphan*/ sgefa(double *, int, int, int *, int *);
int /*<<< orphan*/ sgesl(double *, int, int, int *, double *,
                         int /*<<< orphan*/);
int step_eul(double **jac, int k, int k2, double *yold, double *work, int node,
             double dt) {
  int j, i, n2 = node * node, info;
  int ipvt[5000];
  double *mat, *fold;
  fold = work;
  mat = work + node;
  for (j = 0; j < node; j++) {
    fold[j] = 0.0;
    for (i = 0; i < node; i++)
      fold[j] = fold[j] + jac[i + j * node][k] * yold[i];
  }
  for (j = 0; j < node; j++)
    yold[j] = yold[j] + .5 * dt * fold[j];
  for (i = 0; i < n2; i++)
    mat[i] = -jac[i][k2] * dt * .5;
  for (i = 0; i < node; i++)
    mat[i + i * node] = 1. + mat[i + i * node];
  sgefa(mat, node, node, ipvt, &info);
  if (info != -1) {
    err_msg("Univertible Jacobian");
    return (0);
  }
  sgesl(mat, node, node, ipvt, yold, 0);
  return (1);
}


x86 assembly (clang, -O0):
<step_eul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
imul   -0x2c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x4e80(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x4e78(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1230 <step_eul+0x100>
mov    -0x4e80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    121d <step_eul+0xed>
mov    -0x4e80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
mov    -0x3c(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x4e80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11ae <step_eul+0x7e>
jmp    1222 <step_eul+0xf2>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1188 <step_eul+0x58>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1290 <step_eul+0x160>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xdb0(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x4e80(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1237 <step_eul+0x107>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    12fe <step_eul+0x1ce>
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xd2c(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x4e78(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1297 <step_eul+0x167>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    135d <step_eul+0x22d>
mov    -0x4e78(%rbp),%rax
mov    -0x40(%rbp),%ecx
mov    -0x40(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  0xcd1(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
mov    -0x4e78(%rbp),%rax
mov    -0x40(%rbp),%ecx
mov    -0x40(%rbp),%edx
imul   -0x2c(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1305 <step_eul+0x1d5>
mov    -0x4e78(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    -0x4e70(%rbp),%rcx
lea    -0x48(%rbp),%r8
call   1030 <sgefa@plt>
cmpl   $0xffffffff,-0x48(%rbp)
je     139c <step_eul+0x26c>
lea    0xc85(%rip),%rdi
call   1050 <err_msg@plt>
movl   $0x0,-0x4(%rbp)
jmp    13c3 <step_eul+0x293>
mov    -0x4e78(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    -0x4e70(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %r9d,%r9d
call   1040 <sgesl@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4e80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<step_eul>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4e38,%rsp
mov    %r9d,%r14d
mov    %rcx,%r12
imul   %r9d,%r9d
movslq %r14d,%r10
mov    %r14d,%r11d
test   %r10d,%r10d
jle    13b0 <step_eul+0x280>
movslq %esi,%rsi
mov    %r11d,%r13d
and    $0xfffffffe,%r13d
lea    0x8(%rdi),%rcx
lea    0x0(,%r10,8),%r15
xor    %ebx,%ebx
jmp    1190 <step_eul+0x60>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbx
add    %r15,%rcx
cmp    %r11,%rbx
je     121e <step_eul+0xee>
movq   $0x0,(%r8,%rbx,8)
xorpd  %xmm1,%xmm1
xor    %eax,%eax
cmp    $0x1,%r14d
je     11ef <step_eul+0xbf>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x8(%rcx,%rax,8),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm2
mulsd  (%r12,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%r8,%rbx,8)
mov    (%rcx,%rax,8),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm1
mulsd  0x8(%r12,%rax,8),%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,(%r8,%rbx,8)
add    $0x2,%rax
cmp    %rax,%r13
jne    11b0 <step_eul+0x80>
test   $0x1,%r11b
je     1180 <step_eul+0x50>
mov    %rbx,%rbp
imul   %r10,%rbp
add    %rax,%rbp
mov    (%rdi,%rbp,8),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm2
mulsd  (%r12,%rax,8),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%r8,%rbx,8)
jmp    1180 <step_eul+0x50>
test   %r14d,%r14d
jle    13b0 <step_eul+0x280>
movsd  0xdd1(%rip),%xmm1
mulsd  %xmm0,%xmm1
cmp    $0x4,%r14d
jb     124b <step_eul+0x11b>
lea    (%r8,%r11,8),%rax
cmp    %r12,%rax
jbe    12bd <step_eul+0x18d>
lea    (%r12,%r11,8),%rax
cmp    %r8,%rax
jbe    12bd <step_eul+0x18d>
xor    %esi,%esi
mov    %rsi,%rax
not    %rax
test   $0x1,%r11b
je     1273 <step_eul+0x143>
movsd  (%r8,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r12,%rsi,8),%xmm2
movsd  %xmm2,(%r12,%rsi,8)
or     $0x1,%rsi
add    %r11,%rax
je     13b0 <step_eul+0x280>
nopl   0x0(%rax)
movsd  (%r8,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r12,%rsi,8),%xmm2
movsd  %xmm2,(%r12,%rsi,8)
movsd  0x8(%r8,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%r12,%rsi,8),%xmm2
movsd  %xmm2,0x8(%r12,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%r11
jne    1280 <step_eul+0x150>
jmp    13b0 <step_eul+0x280>
mov    %r11d,%esi
and    $0xfffffffc,%esi
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
lea    -0x4(%rsi),%rax
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rax,%rax
je     154f <step_eul+0x41f>
mov    %rcx,%rbx
and    $0xfffffffffffffffe,%rbx
xor    %eax,%eax
nopl   0x0(%rax)
movupd (%r8,%rax,8),%xmm3
movupd 0x10(%r8,%rax,8),%xmm4
mulpd  %xmm2,%xmm3
movupd (%r12,%rax,8),%xmm5
addpd  %xmm3,%xmm5
movupd 0x10(%r12,%rax,8),%xmm3
movupd 0x20(%r12,%rax,8),%xmm6
movupd 0x30(%r12,%rax,8),%xmm7
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm5,(%r12,%rax,8)
movupd %xmm4,0x10(%r12,%rax,8)
movupd 0x20(%r8,%rax,8),%xmm3
movupd 0x30(%r8,%rax,8),%xmm4
mulpd  %xmm2,%xmm3
addpd  %xmm6,%xmm3
mulpd  %xmm2,%xmm4
addpd  %xmm7,%xmm4
movupd %xmm3,0x20(%r12,%rax,8)
movupd %xmm4,0x30(%r12,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rbx
jne    12f0 <step_eul+0x1c0>
test   $0x1,%cl
je     13a7 <step_eul+0x277>
movupd (%r12,%rax,8),%xmm3
movupd 0x10(%r12,%rax,8),%xmm4
movupd (%r8,%rax,8),%xmm5
movupd 0x10(%r8,%rax,8),%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,(%r12,%rax,8)
movupd %xmm6,0x10(%r12,%rax,8)
cmp    %r11,%rsi
jne    124d <step_eul+0x11d>
lea    (%r8,%r10,8),%r15
test   %r9d,%r9d
je     144d <step_eul+0x31d>
movslq %edx,%rax
mov    %r9d,%ecx
cmp    $0x1,%r9d
jne    13cd <step_eul+0x29d>
xor    %edx,%edx
jmp    1431 <step_eul+0x301>
mov    %ecx,%esi
and    $0xfffffffe,%esi
lea    (%r8,%r10,8),%rbx
add    $0x8,%rbx
xor    %edx,%edx
movapd 0xc3c(%rip),%xmm1
movsd  0xc14(%rip),%xmm2
nopl   0x0(%rax)
mov    (%rdi,%rdx,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm3
xorpd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,-0x8(%rbx,%rdx,8)
mov    0x8(%rdi,%rdx,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm3
xorpd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,(%rbx,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rsi
jne    13f0 <step_eul+0x2c0>
test   $0x1,%cl
je     144d <step_eul+0x31d>
mov    (%rdi,%rdx,8),%rcx
mulsd  (%rcx,%rax,8),%xmm0
mulsd  0xbc1(%rip),%xmm0
movsd  %xmm0,(%r15,%rdx,8)
test   %r14d,%r14d
jle    14f0 <step_eul+0x3c0>
xor    %eax,%eax
cmp    $0x1,%r14d
je     14ca <step_eul+0x39a>
lea    (%r14,%r14,1),%r9d
mov    %r11d,%r8d
and    $0xfffffffe,%r8d
neg    %r8
mov    $0x1,%edi
movsd  0xb97(%rip),%xmm0
xor    %esi,%esi
mov    %r14d,%ebx
xor    %edx,%edx
movslq %ebx,%rbx
lea    (%rdi,%rbx,1),%rbp
cltq
lea    (%rdx,%rax,1),%rcx
movsd  (%r15,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rcx,8)
movsd  (%r15,%rbp,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rbp,8)
add    $0x2,%rdx
add    %r9d,%eax
add    $0x2,%rdi
add    %r9d,%ebx
add    $0xfffffffffffffffe,%rsi
cmp    %rsi,%r8
jne    1480 <step_eul+0x350>
neg    %rsi
mov    %rsi,%rax
test   $0x1,%r11b
je     14f0 <step_eul+0x3c0>
mov    %eax,%ecx
imul   %r14d,%ecx
movslq %ecx,%rcx
add    %rax,%rcx
movsd  (%r15,%rcx,8),%xmm0
addsd  0xb26(%rip),%xmm0
movsd  %xmm0,(%r15,%rcx,8)
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r14d,%edx
call   1030 <sgefa@plt>
cmpl   $0xffffffff,0xc(%rsp)
je     151f <step_eul+0x3ef>
lea    0xb1a(%rip),%rdi
call   1050 <err_msg@plt>
xor    %eax,%eax
jmp    153d <step_eul+0x40d>
lea    0x10(%rsp),%rcx
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r14d,%edx
mov    %r12,%r8
xor    %r9d,%r9d
call   1040 <sgesl@plt>
mov    $0x1,%eax
add    $0x4e38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
test   $0x1,%cl
jne    1370 <step_eul+0x240>
jmp    13a7 <step_eul+0x277>

LLVM IR (-O0):
@.str = [21 x i8] c"Univertible Jacobian\00"
define i32 @step_eul(double** %0, i32 %1, i32 %2, double* %3, double* %4, i32 %5, double %6) {
%8 = alloca i32
%9 = alloca double**
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca double
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca [5000 x i32]
%21 = alloca double*
%22 = alloca double*
store double** %0, double*** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store double* %3, double** %12
store double* %4, double** %13
store i32 %5, i32* %14
store double %6, double* %15
%23 = load i32, i32* %14
%24 = load i32, i32* %14
%25 = mul nsw i32 %23, %24
store i32 %25, i32* %18
%26 = load double*, double** %13
store double* %26, double** %22
%27 = load double*, double** %13
%28 = load i32, i32* %14
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
store double* %30, double** %21
store i32 0, i32* %16
br label %31
31: ; preds = %77, %7
%32 = load i32, i32* %16
%33 = load i32, i32* %14
%34 = icmp slt i32 %32, %33
br i1 %34, label %35, label %80
35: ; preds = %31
%36 = load double*, double** %22
%37 = load i32, i32* %16
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
store double 0.000000e+00, double* %39
store i32 0, i32* %17
br label %40
40: ; preds = %73, %35
%41 = load i32, i32* %17
%42 = load i32, i32* %14
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %76
44: ; preds = %40
%45 = load double*, double** %22
%46 = load i32, i32* %16
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %45, i64 %47
%49 = load double, double* %48
%50 = load double**, double*** %9
%51 = load i32, i32* %17
%52 = load i32, i32* %16
%53 = load i32, i32* %14
%54 = mul nsw i32 %52, %53
%55 = add nsw i32 %51, %54
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double*, double** %50, i64 %56
%58 = load double*, double** %57
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = load double*, double** %12
%64 = load i32, i32* %17
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = call double @llvm.fmuladd.f64(double %62, double %67, double %49)
%69 = load double*, double** %22
%70 = load i32, i32* %16
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
store double %68, double* %72
br label %73
73: ; preds = %44
%74 = load i32, i32* %17
%75 = add nsw i32 %74, 1
store i32 %75, i32* %17
br label %40
76: ; preds = %40
br label %77
77: ; preds = %76
%78 = load i32, i32* %16
%79 = add nsw i32 %78, 1
store i32 %79, i32* %16
br label %31
80: ; preds = %31
store i32 0, i32* %16
br label %81
81: ; preds = %103, %80
%82 = load i32, i32* %16
%83 = load i32, i32* %14
%84 = icmp slt i32 %82, %83
br i1 %84, label %85, label %106
85: ; preds = %81
%86 = load double*, double** %12
%87 = load i32, i32* %16
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
%91 = load double, double* %15
%92 = fmul double 5.000000e-01, %91
%93 = load double*, double** %22
%94 = load i32, i32* %16
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %93, i64 %95
%97 = load double, double* %96
%98 = call double @llvm.fmuladd.f64(double %92, double %97, double %90)
%99 = load double*, double** %12
%100 = load i32, i32* %16
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
store double %98, double* %102
br label %103
103: ; preds = %85
%104 = load i32, i32* %16
%105 = add nsw i32 %104, 1
store i32 %105, i32* %16
br label %81
106: ; preds = %81
store i32 0, i32* %17
br label %107
107: ; preds = %129, %106
%108 = load i32, i32* %17
%109 = load i32, i32* %18
%110 = icmp slt i32 %108, %109
br i1 %110, label %111, label %132
111: ; preds = %107
%112 = load double**, double*** %9
%113 = load i32, i32* %17
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double*, double** %112, i64 %114
%116 = load double*, double** %115
%117 = load i32, i32* %11
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = fneg double %120
%122 = load double, double* %15
%123 = fmul double %121, %122
%124 = fmul double %123, 5.000000e-01
%125 = load double*, double** %21
%126 = load i32, i32* %17
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double, double* %125, i64 %127
store double %124, double* %128
br label %129
129: ; preds = %111
%130 = load i32, i32* %17
%131 = add nsw i32 %130, 1
store i32 %131, i32* %17
br label %107
132: ; preds = %107
store i32 0, i32* %17
br label %133
133: ; preds = %156, %132
%134 = load i32, i32* %17
%135 = load i32, i32* %14
%136 = icmp slt i32 %134, %135
br i1 %136, label %137, label %159
137: ; preds = %133
%138 = load double*, double** %21
%139 = load i32, i32* %17
%140 = load i32, i32* %17
%141 = load i32, i32* %14
%142 = mul nsw i32 %140, %141
%143 = add nsw i32 %139, %142
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %138, i64 %144
%146 = load double, double* %145
%147 = fadd double 1.000000e+00, %146
%148 = load double*, double** %21
%149 = load i32, i32* %17
%150 = load i32, i32* %17
%151 = load i32, i32* %14
%152 = mul nsw i32 %150, %151
%153 = add nsw i32 %149, %152
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %148, i64 %154
store double %147, double* %155
br label %156
156: ; preds = %137
%157 = load i32, i32* %17
%158 = add nsw i32 %157, 1
store i32 %158, i32* %17
br label %133
159: ; preds = %133
%160 = load double*, double** %21
%161 = load i32, i32* %14
%162 = load i32, i32* %14
%163 = getelementptr inbounds [5000 x i32], [5000 x i32]* %20, i64 0, i64 0
%164 = call i32 @sgefa(double* %160, i32 %161, i32 %162, i32* %163, i32* %19)
%165 = load i32, i32* %19
%166 = icmp ne i32 %165, -1
br i1 %166, label %167, label %169
167: ; preds = %159
%168 = call i32 @err_msg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %176
169: ; preds = %159
%170 = load double*, double** %21
%171 = load i32, i32* %14
%172 = load i32, i32* %14
%173 = getelementptr inbounds [5000 x i32], [5000 x i32]* %20, i64 0, i64 0
%174 = load double*, double** %12
%175 = call i32 @sgesl(double* %170, i32 %171, i32 %172, i32* %173, double* %174, i32 0)
store i32 1, i32* %8
br label %176
176: ; preds = %169, %167
%177 = load i32, i32* %8
ret i32 %177
}

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