#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*/ matmat3(double *, double *, double *, double, double);
int /*<<< orphan*/ matvec3(double *, double *, double *, int, int);
int /*<<< orphan*/ solve(double *, double *, int, int);
void thomas_alg_block(double *a, double *b, double *c, double *d, int n,
                      int m) {
  int i;
  int size = m * m;
  solve(&b[0], &c[0], m, m);
  solve(&b[0], &d[0], m, 1);
  for (i = 1; i < n - 1; i++) {
    matmat3(&a[(i - 1) * size], &c[(i - 1) * size], &b[i * size], -1.0, 1.0);
    matvec3(&a[(i - 1) * size], &d[(i - 1) * m], &d[i * m], -1.0, 1.0);
    solve(&b[i * size], &c[i * size], m, m);
    solve(&b[i * size], &d[i * m], m, 1);
  }
  i = n - 1;
  matmat3(&a[(i - 1) * size], &c[(i - 1) * size], &b[i * size], -1.0, 1.0);
  matvec3(&a[(i - 1) * size], &d[(i - 1) * m], &d[i * m], -1.0, 1.0);
  solve(&b[i * size], &d[i * m], m, 1);
  for (i = n - 2; i >= 0; i--) {
    matvec3(&c[i * size], &d[(i + 1) * m], &d[i * m], -1, 1);
  }
  return;
}


x86 assembly (clang, -O0):
<thomas_alg_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x28(%rbp),%eax
imul   -0x28(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%edx
mov    -0x28(%rbp),%ecx
call   1030 <solve@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12b9 <thomas_alg_block+0x189>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
movsd  0xe1c(%rip),%xmm0
movsd  0xe1c(%rip),%xmm1
call   1050 <matmat3@plt>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x28(%rbp),%edx
mov    -0x28(%rbp),%ecx
call   1030 <solve@plt>
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x28(%rbp),%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1189 <thomas_alg_block+0x59>
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
movsd  0xcf4(%rip),%xmm0
movsd  0xcf4(%rip),%xmm1
call   1050 <matmat3@plt>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x28(%rbp),%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
mov    -0x24(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     1410 <thomas_alg_block+0x2e0>
mov    -0x18(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rdx
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    13a9 <thomas_alg_block+0x279>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thomas_alg_block>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,%r13d
mov    %r8d,%r15d
mov    %rcx,%r14
mov    %rsi,%r12
mov    %rdi,0x28(%rsp)
mov    %r9d,%ebp
imul   %r9d,%ebp
mov    %rsi,%rdi
mov    %rdx,0x10(%rsp)
mov    %rdx,%rsi
mov    %r9d,%edx
mov    %r9d,%ecx
call   1030 <solve@plt>
mov    %r12,0x48(%rsp)
mov    %r12,%rdi
mov    %r14,0x30(%rsp)
mov    %r14,%rsi
mov    %r13d,%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
lea    -0x1(%r15),%eax
mov    %eax,0xc(%rsp)
movslq %r13d,%rax
mov    %rax,0x20(%rsp)
mov    %ebp,0x8(%rsp)
mov    %ebp,%eax
mov    %rax,0x38(%rsp)
mov    %r15,0x40(%rsp)
cmp    $0x3,%r15d
jl     12a2 <thomas_alg_block+0x172>
mov    0xc(%rsp),%ecx
mov    0x20(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x58(%rsp)
mov    0x38(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x50(%rsp)
add    $0xffffffffffffffff,%rcx
mov    0x10(%rsp),%r12
mov    0x28(%rsp),%r15
mov    0x30(%rsp),%r14
mov    0x8(%rsp),%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rcx,0x18(%rsp)
mov    %ebp,%ecx
mov    %rcx,0x60(%rsp)
mov    0x48(%rsp),%rax
lea    (%rax,%rcx,8),%rbx
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
movsd  0xdda(%rip),%xmm0
movsd  0xdda(%rip),%xmm1
call   1050 <matmat3@plt>
mov    0x58(%rsp),%rax
lea    (%r14,%rax,1),%rdx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rdx,%r14
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
mov    0x10(%rsp),%rax
mov    0x60(%rsp),%rcx
lea    (%rax,%rcx,8),%rsi
mov    %rbx,%rdi
mov    %r13d,%edx
mov    %r13d,%ecx
call   1030 <solve@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
mov    0x18(%rsp),%rcx
add    0x8(%rsp),%ebp
mov    0x50(%rsp),%rax
add    %rax,%r15
add    %rax,%r12
add    $0xffffffffffffffff,%rcx
jne    1200 <thomas_alg_block+0xd0>
mov    0x40(%rsp),%rax
lea    -0x2(%rax),%r12d
mov    0x8(%rsp),%edx
mov    %edx,%eax
imul   %r12d,%eax
cltq
mov    0x28(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
mov    0xc(%rsp),%ebp
imul   %ebp,%edx
movslq %edx,%rax
mov    0x48(%rsp),%rcx
lea    (%rcx,%rax,8),%r14
movsd  0xd1c(%rip),%xmm0
movsd  0xd1c(%rip),%xmm1
mov    %r15,%rdi
mov    %r14,%rdx
call   1050 <matmat3@plt>
mov    %r12d,0x18(%rsp)
mov    %r12d,%eax
imul   %r13d,%eax
cltq
mov    0x30(%rsp),%r12
lea    (%r12,%rax,8),%rsi
imul   %r13d,%ebp
movslq %ebp,%rax
lea    (%r12,%rax,8),%rbx
mov    %r15,%rdi
mov    %rbx,%rdx
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    $0x1,%ecx
call   1030 <solve@plt>
cmpl   $0x2,0x40(%rsp)
mov    0x38(%rsp),%r13
jl     13c8 <thomas_alg_block+0x298>
mov    0x18(%rsp),%eax
lea    0x1(%rax),%r14
mov    0x20(%rsp),%rdx
mov    %rdx,%rcx
imul   %rax,%rcx
lea    (%r12,%rcx,8),%r15
mov    %r12,%rbp
lea    0x0(,%rdx,8),%r12
neg    %r12
imul   %r14,%rdx
lea    0x0(%rbp,%rdx,8),%rbp
imul   %r13,%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rbx
shl    $0x3,%r13
neg    %r13
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    $0xffffffff,%ecx
mov    $0x1,%r8d
call   1040 <matvec3@plt>
add    %r12,%r15
add    %r12,%rbp
add    %r13,%rbx
add    $0xffffffffffffffff,%r14
jne    13a0 <thomas_alg_block+0x270>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @thomas_alg_block(double* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5) {
%7 = mul nsw i32 %5, %5
%8 = tail call i32 @solve(double* %1, double* %2, i32 %5, i32 %5)
%9 = tail call i32 @solve(double* %1, double* %3, i32 %5, i32 1)
%10 = add i32 %4, -1
%11 = icmp sgt i32 %4, 2
br i1 %11, label %12, label %37
12: ; preds = %6
%13 = sext i32 %5 to i64
%14 = zext i32 %7 to i64
%15 = zext i32 %10 to i64
br label %16
16: ; preds = %12, %16
%17 = phi i64 [ 1, %12 ], [ %35, %16 ]
%18 = add nsw i64 %17, -1
%19 = mul nsw i64 %18, %14
%20 = getelementptr inbounds double, double* %0, i64 %19
%21 = getelementptr inbounds double, double* %2, i64 %19
%22 = trunc i64 %17 to i32
%23 = mul i32 %7, %22
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds double, double* %1, i64 %24
%26 = tail call i32 @matmat3(double* %20, double* %21, double* %25, double -1.000000e+00, double 1.000000e+00)
%27 = mul nsw i64 %18, %13
%28 = getelementptr inbounds double, double* %3, i64 %27
%29 = mul nsw i64 %17, %13
%30 = getelementptr inbounds double, double* %3, i64 %29
%31 = tail call i32 @matvec3(double* %20, double* %28, double* %30, i32 -1, i32 1)
%32 = getelementptr inbounds double, double* %2, i64 %24
%33 = tail call i32 @solve(double* %25, double* %32, i32 %5, i32 %5)
%34 = tail call i32 @solve(double* %25, double* %30, i32 %5, i32 1)
%35 = add nuw nsw i64 %17, 1
%36 = icmp eq i64 %35, %15
br i1 %36, label %37, label %16
37: ; preds = %16, %6
%38 = add nsw i32 %4, -2
%39 = mul nsw i32 %7, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %0, i64 %40
%42 = getelementptr inbounds double, double* %2, i64 %40
%43 = mul nsw i32 %7, %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %1, i64 %44
%46 = tail call i32 @matmat3(double* %41, double* %42, double* %45, double -1.000000e+00, double 1.000000e+00)
%47 = mul nsw i32 %38, %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %3, i64 %48
%50 = mul nsw i32 %10, %5
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %3, i64 %51
%53 = tail call i32 @matvec3(double* %41, double* %49, double* %52, i32 -1, i32 1)
%54 = tail call i32 @solve(double* %45, double* %52, i32 %5, i32 1)
%55 = icmp sgt i32 %4, 1
br i1 %55, label %56, label %72
56: ; preds = %37
%57 = zext i32 %38 to i64
%58 = zext i32 %7 to i64
%59 = sext i32 %5 to i64
br label %60
60: ; preds = %56, %60
%61 = phi i64 [ %57, %56 ], [ %70, %60 ]
%62 = mul nsw i64 %61, %58
%63 = getelementptr inbounds double, double* %2, i64 %62
%64 = add nuw nsw i64 %61, 1
%65 = mul nsw i64 %64, %59
%66 = getelementptr inbounds double, double* %3, i64 %65
%67 = mul nsw i64 %61, %59
%68 = getelementptr inbounds double, double* %3, i64 %67
%69 = tail call i32 @matvec3(double* %63, double* %66, double* %68, i32 -1, i32 1)
%70 = add nsw i64 %61, -1
%71 = icmp eq i64 %61, 0
br i1 %71, label %72, label %60
72: ; preds = %60, %37
ret void
}