#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
double const fabs(double);
int /*<<< orphan*/ lm_invert(double *, int, int *, double *, double *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ show_matrix(char *, double *, int);
int test(int n, double *A, int expect_singular) {
  double *ws = (double *)calloc(n * n, sizeof(double));
  double *inv = (double *)calloc(n * n, sizeof(double));
  int *P = (int *)calloc(n, sizeof(int));
  if (!ws || !inv) {
    printf("unexpected error !ws or !inv\n");
    exit(1);
  }
  show_matrix("A", A, n);
  int failure = 0;
  lm_invert(A, n, P, ws, inv, &failure);
  if (failure == 0) {
    ;
  } else if (failure == 21) {
    if (expect_singular) {
      printf("singular as expected\n");
      return 0;
    }
    printf("ERROR: unexpectedly singular\n");
    return 1;
  } else if (failure == 22) {
    printf("ERROR: inaccurate\n");
    return 1;
  } else {
    printf("ERROR: unexpected error %i\n", failure);
    return 1;
  }
  if (expect_singular) {
    printf("ERROR: unexpectedly nonsingular\n");
    return 0;
  }
  show_matrix("Ainv", inv, n);
  double *UL = (double *)calloc(n * n, sizeof(double));
  double *UR = (double *)calloc(n * n, sizeof(double));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      UL[i * n + j] = 0;
      UR[i * n + j] = 0;
      for (int k = 0; k < n; ++k) {
        UL[i * n + j] += inv[n * i + k] * A[n * k + j];
        UR[i * n + j] += A[n * i + k] * inv[n * k + j];
      }
    }
  }
  show_matrix("Ainv*A", UL, n);
  show_matrix("A*Ainv", UR, n);
  int err = 0;
  const double eps0 = 1e-13;
  const double eps1 = eps0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i == j ? fabs(UL[i * n + j] - 1) > eps1
                 : fabs(UL[i * n + j]) > eps0) {
        printf("inaccurate element UL[%i,%i]=%g\n", i, j, UL[i * n + j]);
        err += 1;
      }
      if (i == j ? fabs(UR[i * n + j] - 1) > eps1
                 : fabs(UR[i * n + j]) > eps0) {
        printf("inaccurate element UR[%i,%i]=%g\n", i, j, UR[i * n + j]);
        err += 1;
      }
    }
  }
  return err;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11c3 <test+0x63>
cmpq   $0x0,-0x28(%rbp)
jne    11db <test+0x7b>
lea    0xe46(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xece(%rip),%rdi
call   1030 <show_matrix@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    -0x34(%rbp),%r9
call   1070 <lm_invert@plt>
cmpl   $0x0,-0x34(%rbp)
jne    1220 <test+0xc0>
jmp    12a9 <test+0x149>
cmpl   $0x15,-0x34(%rbp)
jne    1268 <test+0x108>
cmpl   $0x0,-0x14(%rbp)
je     124e <test+0xee>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1634 <test+0x4d4>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1634 <test+0x4d4>
cmpl   $0x16,-0x34(%rbp)
jne    128c <test+0x12c>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1634 <test+0x4d4>
mov    -0x34(%rbp),%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1634 <test+0x4d4>
cmpl   $0x0,-0x14(%rbp)
je     12cd <test+0x16d>
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1634 <test+0x4d4>
mov    -0x28(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xde0(%rip),%rdi
call   1030 <show_matrix@plt>
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%edi
imul   -0x8(%rbp),%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1447 <test+0x2e7>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1434 <test+0x2d4>
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1421 <test+0x2c1>
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x4c(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x40(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x4c(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x48(%rbp),%rax
mov    -0x4c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1369 <test+0x209>
jmp    1426 <test+0x2c6>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1324 <test+0x1c4>
jmp    1439 <test+0x2d9>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1311 <test+0x1b1>
mov    -0x40(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xc5d(%rip),%rdi
call   1030 <show_matrix@plt>
mov    -0x48(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xc51(%rip),%rdi
call   1030 <show_matrix@plt>
movl   $0x0,-0x58(%rbp)
movsd  0xb84(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xb77(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    162e <test+0x4ce>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    161b <test+0x4bb>
mov    -0x6c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jne    14fe <test+0x39e>
mov    -0x40(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xb2a(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1060 <fabs@plt>
movsd  0xb11(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     152b <test+0x3cb>
jmp    155e <test+0x3fe>
mov    -0x40(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
movsd  0xadf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    155e <test+0x3fe>
mov    -0x6c(%rbp),%esi
mov    -0x70(%rbp),%edx
mov    -0x40(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xb72(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jne    15a8 <test+0x448>
mov    -0x48(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xa80(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1060 <fabs@plt>
movsd  0xa67(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     15d5 <test+0x475>
jmp    1608 <test+0x4a8>
mov    -0x48(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <fabs@plt>
movsd  0xa35(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1608 <test+0x4a8>
mov    -0x6c(%rbp),%esi
mov    -0x70(%rbp),%edx
mov    -0x48(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xae9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    160d <test+0x4ad>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    14a8 <test+0x348>
jmp    1620 <test+0x4c0>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1495 <test+0x335>
mov    -0x58(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,0x8(%rsp)
mov    %rsi,%r13
mov    %edi,%r12d
mov    %edi,%ebx
imul   %edi,%ebx
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%rbp
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r15
mov    %r12d,%edi
mov    $0x4,%esi
call   1060 <calloc@plt>
test   %rbp,%rbp
je     1534 <test+0x3d4>
test   %r15,%r15
je     1534 <test+0x3d4>
mov    %rax,%r14
lea    0xe7d(%rip),%rdi
mov    %r13,%rsi
mov    %r12d,%edx
call   1040 <show_matrix@plt>
movl   $0x0,0x14(%rsp)
lea    0x14(%rsp),%r9
mov    %r13,%rdi
mov    %r12d,%esi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r15,%r8
call   1070 <lm_invert@plt>
mov    0x14(%rsp),%esi
test   %esi,%esi
je     1212 <test+0xb2>
cmp    $0x16,%esi
je     122a <test+0xca>
cmp    $0x15,%esi
jne    1233 <test+0xd3>
cmpl   $0x0,0x8(%rsp)
je     1243 <test+0xe3>
lea    0xec8(%rip),%rdi
jmp    1220 <test+0xc0>
cmpl   $0x0,0x8(%rsp)
je     1267 <test+0x107>
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
xor    %r15d,%r15d
jmp    1255 <test+0xf5>
lea    0xe78(%rip),%rdi
jmp    124a <test+0xea>
lea    0xde6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    124f <test+0xef>
lea    0xe71(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdd7(%rip),%rdi
mov    %r15,%rsi
mov    %r12d,%edx
call   1040 <show_matrix@plt>
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%r14
mov    %ebx,%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%rbx
test   %r12d,%r12d
jle    150b <test+0x3ab>
mov    %r12d,0x18(%rsp)
mov    %r13,%rdx
mov    %r12d,%r13d
lea    0x0(,%r13,8),%r8
xor    %r9d,%r9d
mov    %rdx,0x8(%rsp)
mov    %r15,%rsi
xchg   %ax,%ax
mov    %r9,%r10
imul   %r13,%r10
mov    %r15,%rbp
mov    0x8(%rsp),%rax
xor    %r11d,%r11d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r11,%r10,1),%rdi
movq   $0x0,(%r14,%rdi,8)
movq   $0x0,(%rbx,%rdi,8)
xor    %ecx,%ecx
xor    %r12d,%r12d
nopl   0x0(%rax)
movsd  (%rsi,%r12,8),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
addsd  (%r14,%rdi,8),%xmm0
movsd  %xmm0,(%r14,%rdi,8)
movsd  (%rdx,%r12,8),%xmm0
mulsd  0x0(%rbp,%rcx,8),%xmm0
addsd  (%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rbx,%rdi,8)
add    $0x1,%r12
add    %r13,%rcx
cmp    %r12,%r13
jne    1300 <test+0x1a0>
add    $0x1,%r11
add    $0x8,%rax
add    $0x8,%rbp
cmp    %r13,%r11
jne    12e0 <test+0x180>
add    $0x1,%r9
add    %r8,%rsi
add    %r8,%rdx
cmp    %r13,%r9
jne    12c0 <test+0x160>
lea    0xcd8(%rip),%rdi
mov    %r14,%rsi
mov    0x18(%rsp),%ebp
mov    %ebp,%edx
call   1040 <show_matrix@plt>
lea    0xcca(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <show_matrix@plt>
test   %ebp,%ebp
jle    1225 <test+0xc5>
lea    0x0(,%r13,8),%rax
mov    %rax,0x20(%rsp)
xor    %ebp,%ebp
movapd 0xc5e(%rip),%xmm2
movsd  0xc66(%rip),%xmm3
mov    %r14,%rcx
xor    %r15d,%r15d
jmp    13d8 <test+0x278>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
mov    0x20(%rsp),%rax
add    %rax,%rbx
add    %rax,%rcx
cmp    %r13,%rbp
je     1255 <test+0xf5>
mov    %rbp,%rax
imul   %r13,%rax
add    %rbp,%rax
mov    %rax,0x18(%rsp)
xor    %r12d,%r12d
mov    %rcx,0x8(%rsp)
jmp    1409 <test+0x2a9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
cmp    %r12,%r13
je     13c0 <test+0x260>
cmp    %r12,%rbp
jne    1480 <test+0x320>
mov    0x18(%rsp),%rax
movsd  (%r14,%rax,8),%xmm0
addsd  0xbf7(%rip),%xmm0
andpd  %xmm2,%xmm0
ucomisd %xmm3,%xmm0
jbe    145d <test+0x2fd>
movsd  (%rcx,%r12,8),%xmm0
lea    0xc12(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x8(%rsp),%rcx
movsd  0xbbf(%rip),%xmm3
movapd 0xba7(%rip),%xmm2
add    $0x1,%r15d
movsd  (%rbx,%r12,8),%xmm0
movapd %xmm0,%xmm1
addsd  0xba9(%rip),%xmm1
jmp    14cc <test+0x36c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%r12,8),%xmm0
andpd  %xmm2,%xmm0
ucomisd %xmm3,%xmm0
jbe    14c2 <test+0x362>
movsd  (%rcx,%r12,8),%xmm0
lea    0xbad(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x8(%rsp),%rcx
movsd  0xb5a(%rip),%xmm3
movapd 0xb42(%rip),%xmm2
add    $0x1,%r15d
movsd  (%rbx,%r12,8),%xmm0
movapd %xmm0,%xmm1
andpd  %xmm2,%xmm1
ucomisd %xmm3,%xmm1
jbe    1400 <test+0x2a0>
lea    0xb8a(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x8(%rsp),%rcx
movsd  0xb16(%rip),%xmm3
movapd 0xafe(%rip),%xmm2
add    $0x1,%r15d
jmp    1400 <test+0x2a0>
lea    0xb2a(%rip),%rdi
mov    %r14,%rsi
mov    %r12d,%edx
call   1040 <show_matrix@plt>
lea    0xb1f(%rip),%rdi
mov    %rbx,%rsi
mov    %r12d,%edx
call   1040 <show_matrix@plt>
jmp    1225 <test+0xc5>
lea    0xb51(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

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

LLVM IR (-O2):
@.str.1 = [2 x i8] c"A\00"
@.str.5 = [28 x i8] c"ERROR: unexpected error %i\0A\00"
@.str.7 = [5 x i8] c"Ainv\00"
@.str.8 = [7 x i8] c"Ainv*A\00"
@.str.9 = [7 x i8] c"A*Ainv\00"
@.str.10 = [33 x i8] c"inaccurate element UL[%i,%i]=%g\0A\00"
@.str.11 = [33 x i8] c"inaccurate element UR[%i,%i]=%g\0A\00"
@str = [29 x i8] c"unexpected error !ws or !inv\00"
@str.12 = [18 x i8] c"ERROR: inaccurate\00"
@str.13 = [29 x i8] c"ERROR: unexpectedly singular\00"
@str.14 = [21 x i8] c"singular as expected\00"
@str.15 = [32 x i8] c"ERROR: unexpectedly nonsingular\00"
define i32 @test(i32 %0, double* %1, i32 %2) {
%4 = alloca i32
%5 = mul nsw i32 %0, %0
%6 = tail call i64 @calloc(i32 %5, i32 8)
%7 = tail call i64 @calloc(i32 %5, i32 8)
%8 = inttoptr i64 %7 to double*
%9 = tail call i64 @calloc(i32 %0, i32 4)
%10 = icmp ne i64 %6, 0
%11 = icmp ne i64 %7, 0
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %16, label %13
13: ; preds = %3
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
16: ; preds = %3
%17 = inttoptr i64 %6 to double*
%18 = inttoptr i64 %9 to i32*
%19 = tail call i32 @show_matrix(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), double* %1, i32 %0)
%20 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%21 = call i32 @lm_invert(double* %1, i32 %0, i32* %18, double* %17, double* %8, i32* %4)
%22 = load i32, i32* %4
switch i32 %22, label %31 [
i32 0, label %33
i32 21, label %23
i32 22, label %29
]
23: ; preds = %16
%24 = icmp eq i32 %2, 0
br i1 %24, label %27, label %25
25: ; preds = %23
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.14, i64 0, i64 0))
br label %152
27: ; preds = %23
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.13, i64 0, i64 0))
br label %152
29: ; preds = %16
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.12, i64 0, i64 0))
br label %152
31: ; preds = %16
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0), i32 %22)
br label %152
33: ; preds = %16
%34 = icmp eq i32 %2, 0
br i1 %34, label %37, label %35
35: ; preds = %33
%36 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.15, i64 0, i64 0))
br label %152
37: ; preds = %33
%38 = call i32 @show_matrix(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), double* %8, i32 %0)
%39 = call i64 @calloc(i32 %5, i32 8)
%40 = inttoptr i64 %39 to double*
%41 = call i64 @calloc(i32 %5, i32 8)
%42 = inttoptr i64 %41 to double*
%43 = icmp sgt i32 %0, 0
br i1 %43, label %44, label %149
44: ; preds = %37
%45 = zext i32 %0 to i64
%46 = zext i32 %0 to i64
br label %47
47: ; preds = %56, %44
%48 = phi i64 [ 0, %44 ], [ %57, %56 ]
%49 = mul nsw i64 %48, %45
br label %59
50: ; preds = %56
%51 = call i32 @show_matrix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double* %40, i32 %0)
%52 = call i32 @show_matrix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double* %42, i32 %0)
br i1 %43, label %53, label %152
53: ; preds = %50
%54 = zext i32 %0 to i64
%55 = zext i32 %0 to i64
br label %86
56: ; preds = %64
%57 = add nuw nsw i64 %48, 1
%58 = icmp eq i64 %57, %46
br i1 %58, label %50, label %47
59: ; preds = %64, %47
%60 = phi i64 [ 0, %47 ], [ %65, %64 ]
%61 = add nuw nsw i64 %60, %49
%62 = getelementptr inbounds double, double* %40, i64 %61
store double 0.000000e+00, double* %62
%63 = getelementptr inbounds double, double* %42, i64 %61
store double 0.000000e+00, double* %63
br label %67
64: ; preds = %67
%65 = add nuw nsw i64 %60, 1
%66 = icmp eq i64 %65, %46
br i1 %66, label %56, label %59
67: ; preds = %59, %67
%68 = phi i64 [ 0, %59 ], [ %84, %67 ]
%69 = add nuw nsw i64 %68, %49
%70 = getelementptr inbounds double, double* %8, i64 %69
%71 = load double, double* %70
%72 = mul nsw i64 %68, %45
%73 = add nuw nsw i64 %72, %60
%74 = getelementptr inbounds double, double* %1, i64 %73
%75 = load double, double* %74
%76 = load double, double* %62
%77 = call double @llvm.fmuladd.f64(double %71, double %75, double %76)
store double %77, double* %62
%78 = getelementptr inbounds double, double* %1, i64 %69
%79 = load double, double* %78
%80 = getelementptr inbounds double, double* %8, i64 %73
%81 = load double, double* %80
%82 = load double, double* %63
%83 = call double @llvm.fmuladd.f64(double %79, double %81, double %82)
store double %83, double* %63
%84 = add nuw nsw i64 %68, 1
%85 = icmp eq i64 %84, %46
br i1 %85, label %64, label %67
86: ; preds = %95, %53
%87 = phi i64 [ 0, %53 ], [ %96, %95 ]
%88 = phi i32 [ 0, %53 ], [ %146, %95 ]
%89 = mul nsw i64 %87, %54
%90 = trunc i64 %87 to i32
%91 = add nuw nsw i64 %87, %89
%92 = getelementptr inbounds double, double* %40, i64 %91
%93 = trunc i64 %87 to i32
%94 = trunc i64 %87 to i32
br label %98
95: ; preds = %145
%96 = add nuw nsw i64 %87, 1
%97 = icmp eq i64 %96, %55
br i1 %97, label %152, label %86
98: ; preds = %86, %145
%99 = phi i64 [ 0, %86 ], [ %147, %145 ]
%100 = phi i32 [ %88, %86 ], [ %146, %145 ]
%101 = icmp eq i64 %87, %99
br i1 %101, label %102, label %114
102: ; preds = %98
%103 = load double, double* %92
%104 = fadd double %103, -1.000000e+00
%105 = call double @llvm.fabs.f64(double %104)
%106 = fcmp ogt double %105, 1.000000e-13
%107 = add nuw nsw i64 %99, %89
br i1 %106, label %108, label %126
108: ; preds = %102
%109 = getelementptr inbounds double, double* %40, i64 %107
%110 = load double, double* %109
%111 = trunc i64 %99 to i32
%112 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %93, i32 %111, double %110)
%113 = add nsw i32 %100, 1
br label %126
114: ; preds = %98
%115 = add nuw nsw i64 %99, %89
%116 = getelementptr inbounds double, double* %40, i64 %115
%117 = load double, double* %116
%118 = call double @llvm.fabs.f64(double %117)
%119 = fcmp ogt double %118, 1.000000e-13
br i1 %119, label %120, label %133
120: ; preds = %114
%121 = getelementptr inbounds double, double* %40, i64 %115
%122 = load double, double* %121
%123 = trunc i64 %99 to i32
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i32 %90, i32 %123, double %122)
%125 = add nsw i32 %100, 1
br label %133
126: ; preds = %102, %108
%127 = phi i32 [ %113, %108 ], [ %100, %102 ]
%128 = getelementptr inbounds double, double* %42, i64 %107
%129 = load double, double* %128
%130 = fadd double %129, -1.000000e+00
%131 = call double @llvm.fabs.f64(double %130)
%132 = fcmp ogt double %131, 1.000000e-13
br i1 %132, label %139, label %145
133: ; preds = %120, %114
%134 = phi i32 [ %100, %114 ], [ %125, %120 ]
%135 = getelementptr inbounds double, double* %42, i64 %115
%136 = load double, double* %135
%137 = call double @llvm.fabs.f64(double %136)
%138 = fcmp ogt double %137, 1.000000e-13
br i1 %138, label %139, label %145
139: ; preds = %133, %126
%140 = phi double [ %136, %133 ], [ %129, %126 ]
%141 = phi i32 [ %134, %133 ], [ %127, %126 ]
%142 = trunc i64 %99 to i32
%143 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i32 %94, i32 %142, double %140)
%144 = add nsw i32 %141, 1
br label %145
145: ; preds = %126, %133, %139
%146 = phi i32 [ %144, %139 ], [ %127, %126 ], [ %134, %133 ]
%147 = add nuw nsw i64 %99, 1
%148 = icmp eq i64 %147, %55
br i1 %148, label %95, label %98
149: ; preds = %37
%150 = call i32 @show_matrix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), double* %40, i32 %0)
%151 = call i32 @show_matrix(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), double* %42, i32 %0)
br label %152
152: ; preds = %95, %149, %50, %35, %31, %29, %27, %25
%153 = phi i32 [ 0, %35 ], [ 0, %25 ], [ 1, %27 ], [ 1, %29 ], [ 1, %31 ], [ 0, %50 ], [ 0, %149 ], [ %146, %95 ]
ret i32 %153
}