#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(float *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sgetrf_(int *, int *, float *, int *, int *, int *);
int /*<<< orphan*/ sgetrs_(char *, int *, int *, float *, int *, int *, float *,
                           int *, int *);
int /*<<< orphan*/ stderr;
int sAx_eq_b_LU(float *A, float *B, float *x, int m) {
  static float *buf = NULL;
  static int buf_sz = 0;
  int a_sz, ipiv_sz, tot_sz;
  register int i, j;
  int info, *ipiv, nrhs = 1;
  float *a;
  if (!A) {
    if (buf)
      free(buf);
    buf = NULL;
    buf_sz = 0;
    return 1;
  }
  ipiv_sz = m;
  a_sz = m * m;
  tot_sz = a_sz * sizeof(float) + ipiv_sz * sizeof(int);
  if (tot_sz > buf_sz) {
    if (buf)
      free(buf);
    buf_sz = tot_sz;
    buf = (float *)malloc(buf_sz);
    if (!buf) {
      fprintf(stderr, "memory allocation in "
                      "sAx_eq_b_LU"
                      "() failed!\n");
      exit(1);
    }
  }
  a = buf;
  ipiv = (int *)(a + a_sz);
  for (i = 0; i < m; i++) {
    for (j = 0; j < m; j++)
      a[i + j * m] = A[i * m + j];
    x[i] = B[i];
  }
  sgetrf_((int *)&m, (int *)&m, a, (int *)&m, ipiv, (int *)&info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "argument %d of "
              "sgetrf_"
              " illegal in "
              "sAx_eq_b_LU"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr, "singular matrix A for "
                      "sgetrf_"
                      " in "
                      "sAx_eq_b_LU"
                      "()\n");
      return 0;
    }
  }
  sgetrs_("N", (int *)&m, (int *)&nrhs, a, (int *)&m, ipiv, x, (int *)&m,
          (int *)&info);
  if (info != 0) {
    if (info < 0) {
      fprintf(stderr,
              "argument %d of "
              "sgetrs_"
              " illegal in "
              "sAx_eq_b_LU"
              "()\n",
              -info);
      exit(1);
    } else {
      fprintf(stderr, "unknown error for "
                      "sgetrs_"
                      " in "
                      "sAx_eq_b_LU"
                      "()\n");
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<sAx_eq_b_LU>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x1,-0x4c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11c4 <sAx_eq_b_LU+0x64>
cmpq   $0x0,0x2ec7(%rip)
je     11a3 <sAx_eq_b_LU+0x43>
mov    0x2eba(%rip),%rdi
call   1040 <free@plt>
movq   $0x0,0x2eaa(%rip)
movl   $0x0,0x2ea8(%rip)
movl   $0x1,-0x4(%rbp)
jmp    141e <sAx_eq_b_LU+0x2be>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
movslq -0x28(%rbp),%rax
shl    $0x2,%rax
movslq -0x2c(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x2e6d(%rip),%eax
jle    1262 <sAx_eq_b_LU+0x102>
cmpq   $0x0,0x2e57(%rip)
je     1213 <sAx_eq_b_LU+0xb3>
mov    0x2e4a(%rip),%rdi
call   1040 <free@plt>
mov    -0x30(%rbp),%eax
mov    %eax,0x2e44(%rip)
mov    0x2e3e(%rip),%edi
call   1060 <malloc@plt>
mov    %rax,0x2e2a(%rip)
cmpq   $0x0,0x2e22(%rip)
jne    125d <sAx_eq_b_LU+0xfd>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
lea    0xdb4(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
jmp    1262 <sAx_eq_b_LU+0x102>
mov    0x2def(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    130a <sAx_eq_b_LU+0x1aa>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    12e2 <sAx_eq_b_LU+0x182>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%edx
imul   -0x24(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    129a <sAx_eq_b_LU+0x13a>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1287 <sAx_eq_b_LU+0x127>
mov    -0x58(%rbp),%rdx
mov    -0x48(%rbp),%r8
lea    -0x24(%rbp),%rcx
lea    -0x3c(%rbp),%r9
mov    %rcx,%rdi
mov    %rcx,%rsi
call   1030 <sgetrf_@plt>
cmpl   $0x0,-0x3c(%rbp)
je     1382 <sAx_eq_b_LU+0x222>
cmpl   $0x0,-0x3c(%rbp)
jge    135f <sAx_eq_b_LU+0x1ff>
mov    0x2ca0(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x3c(%rbp),%edx
lea    0xcde(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2c7a(%rip),%rax
mov    (%rax),%edi
lea    0xcee(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    141e <sAx_eq_b_LU+0x2be>
mov    -0x58(%rbp),%rcx
mov    -0x48(%rbp),%r9
mov    -0x20(%rbp),%r11
lea    0xcf8(%rip),%rdi
lea    -0x24(%rbp),%r10
lea    -0x4c(%rbp),%rdx
lea    -0x3c(%rbp),%rax
mov    %r10,%rsi
mov    %r10,%r8
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1080 <sgetrs_@plt>
cmpl   $0x0,-0x3c(%rbp)
je     1417 <sAx_eq_b_LU+0x2b7>
cmpl   $0x0,-0x3c(%rbp)
jge    13f4 <sAx_eq_b_LU+0x294>
mov    0x2c0b(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
sub    -0x3c(%rbp),%edx
lea    0xcac(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2be5(%rip),%rax
mov    (%rax),%edi
lea    0xcbc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    141e <sAx_eq_b_LU+0x2be>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sAx_eq_b_LU>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,0x14(%rsp)
movl   $0x1,0x10(%rsp)
test   %rdi,%rdi
je     12ee <sAx_eq_b_LU+0x18e>
mov    %ecx,%r12d
mov    %rdx,%r14
mov    %rsi,%r15
mov    %ecx,%ebx
imul   %ebx,%ebx
lea    (%rbx,%r12,1),%ebp
shl    $0x2,%ebp
mov    0x2eb9(%rip),%r13
cmp    0x2ebb(%rip),%ebp
jle    11de <sAx_eq_b_LU+0x7e>
mov    %rdi,0x8(%rsp)
test   %r13,%r13
je     11b9 <sAx_eq_b_LU+0x59>
mov    %r13,%rdi
call   1040 <free@plt>
mov    %ebp,0x2ea1(%rip)
mov    %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%r13
mov    %rax,0x2e88(%rip)
test   %rax,%rax
mov    0x8(%rsp),%rdi
je     138b <sAx_eq_b_LU+0x22b>
lea    0x0(,%rbx,4),%rax
add    %r13,%rax
mov    %rax,0x8(%rsp)
test   %r12d,%r12d
jle    12a8 <sAx_eq_b_LU+0x148>
mov    %r12d,%r8d
mov    %r8d,%r11d
and    $0xfffffffe,%r11d
lea    0x4(%rdi),%rdx
lea    0x0(,%r8,4),%rsi
lea    0x0(,%r8,8),%rcx
xor    %r10d,%r10d
mov    %r13,%r9
jmp    123c <sAx_eq_b_LU+0xdc>
nopl   (%rax)
movss  (%r15,%r10,4),%xmm0
movss  %xmm0,(%r14,%r10,4)
add    $0x1,%r10
add    %rsi,%rdx
add    $0x4,%r9
cmp    %r8,%r10
je     12a8 <sAx_eq_b_LU+0x148>
cmp    $0x1,%r12d
jne    1250 <sAx_eq_b_LU+0xf0>
xor    %eax,%eax
jmp    1280 <sAx_eq_b_LU+0x120>
cs nopw 0x0(%rax,%rax,1)
mov    %r9,%rbx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movss  -0x4(%rdx,%rax,4),%xmm0
movss  %xmm0,(%rbx)
movss  (%rdx,%rax,4),%xmm0
movss  %xmm0,(%rbx,%rsi,1)
add    $0x2,%rax
add    %rcx,%rbx
cmp    %rax,%r11
jne    1260 <sAx_eq_b_LU+0x100>
test   $0x1,%r8b
je     1220 <sAx_eq_b_LU+0xc0>
mov    %r10,%rbp
imul   %r8,%rbp
add    %rax,%rbp
movss  (%rdi,%rbp,4),%xmm0
imul   %r8,%rax
add    %r10,%rax
movss  %xmm0,0x0(%r13,%rax,4)
jmp    1220 <sAx_eq_b_LU+0xc0>
lea    0x14(%rsp),%rbx
lea    0x4(%rsp),%r15
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
mov    0x8(%rsp),%rbp
mov    %rbp,%r8
mov    %r15,%r9
call   1030 <sgetrf_@plt>
mov    0x4(%rsp),%edx
test   %edx,%edx
je     131b <sAx_eq_b_LU+0x1bb>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
js     1380 <sAx_eq_b_LU+0x220>
lea    0xd71(%rip),%rsi
jmp    135f <sAx_eq_b_LU+0x1ff>
mov    0x2d63(%rip),%rdi
test   %rdi,%rdi
je     12ff <sAx_eq_b_LU+0x19f>
call   1040 <free@plt>
movq   $0x0,0x2d4e(%rip)
movl   $0x0,0x2d4c(%rip)
mov    $0x1,%ebx
jmp    1368 <sAx_eq_b_LU+0x208>
sub    $0x8,%rsp
lea    0xd67(%rip),%rdi
lea    0x18(%rsp),%rdx
mov    %rbx,%rsi
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rbp,%r9
push   %r15
push   %rbx
push   %r14
call   1080 <sgetrs_@plt>
add    $0x20,%rsp
mov    0x4(%rsp),%edx
test   %edx,%edx
je     1379 <sAx_eq_b_LU+0x219>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
js     13ac <sAx_eq_b_LU+0x24c>
lea    0xd61(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%ebx
jmp    1368 <sAx_eq_b_LU+0x208>
neg    %edx
lea    0xca3(%rip),%rsi
jmp    13b5 <sAx_eq_b_LU+0x255>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edi
lea    0xc65(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
neg    %edx
lea    0xcda(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@sAx_eq_b_LU.buf = internal global float* null
@sAx_eq_b_LU.buf_sz = internal global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in sAx_eq_b_LU() failed!\0A\00"
@.str.1 = [49 x i8] c"argument %d of sgetrf_ illegal in sAx_eq_b_LU()\0A\00"
@.str.2 = [48 x i8] c"singular matrix A for sgetrf_ in sAx_eq_b_LU()\0A\00"
@.str.3 = [2 x i8] c"N\00"
@.str.4 = [49 x i8] c"argument %d of sgetrs_ illegal in sAx_eq_b_LU()\0A\00"
@.str.5 = [44 x i8] c"unknown error for sgetrs_ in sAx_eq_b_LU()\0A\00"
define i32 @sAx_eq_b_LU(float* %0, float* %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32*
%17 = alloca i32
%18 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store i32 %3, i32* %9
store i32 1, i32* %17
%19 = load float*, float** %6
%20 = icmp ne float* %19, null
br i1 %20, label %28, label %21
21: ; preds = %4
%22 = load float*, float** @sAx_eq_b_LU.buf
%23 = icmp ne float* %22, null
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load float*, float** @sAx_eq_b_LU.buf
%26 = call i32 @free(float* %25)
br label %27
27: ; preds = %24, %21
store float* null, float** @sAx_eq_b_LU.buf
store i32 0, i32* @sAx_eq_b_LU.buf_sz
store i32 1, i32* %5
br label %150
28: ; preds = %4
%29 = load i32, i32* %9
store i32 %29, i32* %11
%30 = load i32, i32* %9
%31 = load i32, i32* %9
%32 = mul nsw i32 %30, %31
store i32 %32, i32* %10
%33 = load i32, i32* %10
%34 = sext i32 %33 to i64
%35 = mul i64 %34, 4
%36 = load i32, i32* %11
%37 = sext i32 %36 to i64
%38 = mul i64 %37, 4
%39 = add i64 %35, %38
%40 = trunc i64 %39 to i32
store i32 %40, i32* %12
%41 = load i32, i32* %12
%42 = load i32, i32* @sAx_eq_b_LU.buf_sz
%43 = icmp sgt i32 %41, %42
br i1 %43, label %44, label %62
44: ; preds = %28
%45 = load float*, float** @sAx_eq_b_LU.buf
%46 = icmp ne float* %45, null
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load float*, float** @sAx_eq_b_LU.buf
%49 = call i32 @free(float* %48)
br label %50
50: ; preds = %47, %44
%51 = load i32, i32* %12
store i32 %51, i32* @sAx_eq_b_LU.buf_sz
%52 = load i32, i32* @sAx_eq_b_LU.buf_sz
%53 = call i64 @malloc(i32 %52)
%54 = inttoptr i64 %53 to float*
store float* %54, float** @sAx_eq_b_LU.buf
%55 = load float*, float** @sAx_eq_b_LU.buf
%56 = icmp ne float* %55, null
br i1 %56, label %61, label %57
57: ; preds = %50
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%60 = call i32 @exit(i32 1)
unreachable
61: ; preds = %50
br label %62
62: ; preds = %61, %28
%63 = load float*, float** @sAx_eq_b_LU.buf
store float* %63, float** %18
%64 = load float*, float** %18
%65 = load i32, i32* %10
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds float, float* %64, i64 %66
%68 = bitcast float* %67 to i32*
store i32* %68, i32** %16
store i32 0, i32* %13
br label %69
69: ; preds = %109, %62
%70 = load i32, i32* %13
%71 = load i32, i32* %9
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %112
73: ; preds = %69
store i32 0, i32* %14
br label %74
74: ; preds = %96, %73
%75 = load i32, i32* %14
%76 = load i32, i32* %9
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %99
78: ; preds = %74
%79 = load float*, float** %6
%80 = load i32, i32* %13
%81 = load i32, i32* %9
%82 = mul nsw i32 %80, %81
%83 = load i32, i32* %14
%84 = add nsw i32 %82, %83
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds float, float* %79, i64 %85
%87 = load float, float* %86
%88 = load float*, float** %18
%89 = load i32, i32* %13
%90 = load i32, i32* %14
%91 = load i32, i32* %9
%92 = mul nsw i32 %90, %91
%93 = add nsw i32 %89, %92
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds float, float* %88, i64 %94
store float %87, float* %95
br label %96
96: ; preds = %78
%97 = load i32, i32* %14
%98 = add nsw i32 %97, 1
store i32 %98, i32* %14
br label %74
99: ; preds = %74
%100 = load float*, float** %7
%101 = load i32, i32* %13
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds float, float* %100, i64 %102
%104 = load float, float* %103
%105 = load float*, float** %8
%106 = load i32, i32* %13
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds float, float* %105, i64 %107
store float %104, float* %108
br label %109
109: ; preds = %99
%110 = load i32, i32* %13
%111 = add nsw i32 %110, 1
store i32 %111, i32* %13
br label %69
112: ; preds = %69
%113 = load float*, float** %18
%114 = load i32*, i32** %16
%115 = call i32 @sgetrf_(i32* %9, i32* %9, float* %113, i32* %9, i32* %114, i32* %15)
%116 = load i32, i32* %15
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %130
118: ; preds = %112
%119 = load i32, i32* %15
%120 = icmp slt i32 %119, 0
br i1 %120, label %121, label %127
121: ; preds = %118
%122 = load i32, i32* @stderr
%123 = load i32, i32* %15
%124 = sub nsw i32 0, %123
%125 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %124)
%126 = call i32 @exit(i32 1)
unreachable
127: ; preds = %118
%128 = load i32, i32* @stderr
%129 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %150
130: ; preds = %112
%131 = load float*, float** %18
%132 = load i32*, i32** %16
%133 = load float*, float** %8
%134 = call i32 @sgetrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32* %9, i32* %17, float* %131, i32* %9, i32* %132, float* %133, i32* %9, i32* %15)
%135 = load i32, i32* %15
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %149
137: ; preds = %130
%138 = load i32, i32* %15
%139 = icmp slt i32 %138, 0
br i1 %139, label %140, label %146
140: ; preds = %137
%141 = load i32, i32* @stderr
%142 = load i32, i32* %15
%143 = sub nsw i32 0, %142
%144 = call i32 (i32, i8*, ...) @fprintf(i32 %141, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i32 %143)
%145 = call i32 @exit(i32 1)
unreachable
146: ; preds = %137
%147 = load i32, i32* @stderr
%148 = call i32 (i32, i8*, ...) @fprintf(i32 %147, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %5
br label %150
149: ; preds = %130
store i32 1, i32* %5
br label %150
150: ; preds = %149, %146, %127, %27
%151 = load i32, i32* %5
ret i32 %151
}

LLVM IR (-O2):
@sAx_eq_b_LU.buf = internal unnamed_addr global float* null
@sAx_eq_b_LU.buf_sz = internal unnamed_addr global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"memory allocation in sAx_eq_b_LU() failed!\0A\00"
@.str.1 = [49 x i8] c"argument %d of sgetrf_ illegal in sAx_eq_b_LU()\0A\00"
@.str.2 = [48 x i8] c"singular matrix A for sgetrf_ in sAx_eq_b_LU()\0A\00"
@.str.3 = [2 x i8] c"N\00"
@.str.4 = [49 x i8] c"argument %d of sgetrs_ illegal in sAx_eq_b_LU()\0A\00"
@.str.5 = [44 x i8] c"unknown error for sgetrs_ in sAx_eq_b_LU()\0A\00"
define i32 @sAx_eq_b_LU(float* %0, float* nocapture %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %3, i32* %5
%8 = bitcast i32* %6 to i8*
%9 = bitcast i32* %7 to i8*
store i32 1, i32* %7
%10 = icmp eq float* %0, null
br i1 %10, label %11, label %17
11: ; preds = %4
%12 = load float*, float** @sAx_eq_b_LU.buf
%13 = icmp eq float* %12, null
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = tail call i32 @free(float* %12)
br label %16
16: ; preds = %14, %11
store float* null, float** @sAx_eq_b_LU.buf
store i32 0, i32* @sAx_eq_b_LU.buf_sz
br label %112
17: ; preds = %4
%18 = mul nsw i32 %3, %3
%19 = zext i32 %18 to i64
%20 = add i32 %18, %3
%21 = shl i32 %20, 2
%22 = load i32, i32* @sAx_eq_b_LU.buf_sz
%23 = icmp sgt i32 %21, %22
%24 = load float*, float** @sAx_eq_b_LU.buf
br i1 %23, label %25, label %37
25: ; preds = %17
%26 = icmp eq float* %24, null
br i1 %26, label %29, label %27
27: ; preds = %25
%28 = tail call i32 @free(float* %24)
br label %29
29: ; preds = %27, %25
store i32 %21, i32* @sAx_eq_b_LU.buf_sz
%30 = tail call i64 @malloc(i32 %21)
%31 = inttoptr i64 %30 to float*
store float* %31, float** @sAx_eq_b_LU.buf
%32 = icmp eq i64 %30, 0
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = load i32, i32* @stderr
%35 = tail call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%36 = tail call i32 @exit(i32 1)
unreachable
37: ; preds = %17, %29
%38 = phi float* [ %31, %29 ], [ %24, %17 ]
%39 = getelementptr inbounds float, float* %38, i64 %19
%40 = bitcast float* %39 to i32*
%41 = icmp sgt i32 %3, 0
br i1 %41, label %42, label %86
42: ; preds = %37
%43 = zext i32 %3 to i64
%44 = zext i32 %3 to i64
%45 = and i64 %44, 1
%46 = icmp eq i32 %3, 1
%47 = and i64 %44, 4294967294
%48 = icmp eq i64 %45, 0
br label %49
49: ; preds = %80, %42
%50 = phi i64 [ 0, %42 ], [ %84, %80 ]
%51 = mul nsw i64 %50, %43
br i1 %46, label %71, label %52
52: ; preds = %49, %52
%53 = phi i64 [ %68, %52 ], [ 0, %49 ]
%54 = phi i64 [ %69, %52 ], [ 0, %49 ]
%55 = add nuw nsw i64 %53, %51
%56 = getelementptr inbounds float, float* %0, i64 %55
%57 = load float, float* %56
%58 = mul nsw i64 %53, %43
%59 = add nuw nsw i64 %58, %50
%60 = getelementptr inbounds float, float* %38, i64 %59
store float %57, float* %60
%61 = or i64 %53, 1
%62 = add nuw nsw i64 %61, %51
%63 = getelementptr inbounds float, float* %0, i64 %62
%64 = load float, float* %63
%65 = mul nsw i64 %61, %43
%66 = add nuw nsw i64 %65, %50
%67 = getelementptr inbounds float, float* %38, i64 %66
store float %64, float* %67
%68 = add nuw nsw i64 %53, 2
%69 = add i64 %54, 2
%70 = icmp eq i64 %69, %47
br i1 %70, label %71, label %52
71: ; preds = %52, %49
%72 = phi i64 [ 0, %49 ], [ %68, %52 ]
br i1 %48, label %80, label %73
73: ; preds = %71
%74 = add nuw nsw i64 %72, %51
%75 = getelementptr inbounds float, float* %0, i64 %74
%76 = load float, float* %75
%77 = mul nsw i64 %72, %43
%78 = add nuw nsw i64 %77, %50
%79 = getelementptr inbounds float, float* %38, i64 %78
store float %76, float* %79
br label %80
80: ; preds = %71, %73
%81 = getelementptr inbounds float, float* %1, i64 %50
%82 = load float, float* %81
%83 = getelementptr inbounds float, float* %2, i64 %50
store float %82, float* %83
%84 = add nuw nsw i64 %50, 1
%85 = icmp eq i64 %84, %44
br i1 %85, label %86, label %49
86: ; preds = %80, %37
%87 = call i32 @sgetrf_(i32* %5, i32* %5, float* %38, i32* %5, i32* %40, i32* %6)
%88 = load i32, i32* %6
%89 = icmp eq i32 %88, 0
br i1 %89, label %99, label %90
90: ; preds = %86
%91 = icmp slt i32 %88, 0
%92 = load i32, i32* @stderr
br i1 %91, label %93, label %97
93: ; preds = %90
%94 = sub nsw i32 0, %88
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i32 %94)
%96 = call i32 @exit(i32 1)
unreachable
97: ; preds = %90
%98 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %112
99: ; preds = %86
%100 = call i32 @sgetrs_(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32* %5, i32* %7, float* %38, i32* %5, i32* %40, float* %2, i32* %5, i32* %6)
%101 = load i32, i32* %6
%102 = icmp eq i32 %101, 0
br i1 %102, label %112, label %103
103: ; preds = %99
%104 = icmp slt i32 %101, 0
%105 = load i32, i32* @stderr
br i1 %104, label %106, label %110
106: ; preds = %103
%107 = sub nsw i32 0, %101
%108 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0), i32 %107)
%109 = call i32 @exit(i32 1)
unreachable
110: ; preds = %103
%111 = call i32 (i32, i8*, ...) @fprintf(i32 %105, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
br label %112
112: ; preds = %99, %110, %97, %16
%113 = phi i32 [ 0, %97 ], [ 0, %110 ], [ 1, %16 ], [ 1, %99 ]
ret i32 %113
}