#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 */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ determinant_poorly(int /*<<< orphan*/,
                                      int /*<<< orphan*/ **);
int /*<<< orphan*/ mpfr_div(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_init2(int /*<<< orphan*/, int);
int /*<<< orphan*/ mpfr_mul_si(int /*<<< orphan*/, int /*<<< orphan*/, int,
                               int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int /*<<< orphan*/ mpfr_set_si(int /*<<< orphan*/, int, int /*<<< orphan*/);
void invert_poorly(mpfr_t A[][5 + 2], mpfr_t Ainv[][5 + 2]) {
  mpfr_t Mij[5 + 2][5 + 2];
  mpfr_t det;
  mpfr_t Mijdet;
  mpfr_init2(det, 200);
  mpfr_init2(Mijdet, 200);
  determinant_poorly(det, A);
  for (int i = 0; i < 5 + 2; ++i) {
    for (int j = 0; j < 5 + 2; ++j) {
      mpfr_init2(Mij[i][j], 200);
      if (i == (5 + 1) && j == (5 + 1)) {
        mpfr_set_si(Mij[i][j], 1, MPFR_RNDN);
      } else if (i == (5 + 1) || j == (5 + 1)) {
        mpfr_set_si(Mij[i][j], 0, MPFR_RNDN);
      }
    }
  }
  for (int i = 0; i < 5 + 2; ++i) {
    for (int j = 0; j < 5 + 2; ++j) {
      for (int ii = 0; ii < 5 + 2; ii++) {
        if (ii == i) {
          continue;
        }
        int ri = ii > i ? ii - 1 : ii;
        for (int jj = 0; jj < 5 + 2; jj++) {
          if (jj == j) {
            continue;
          }
          int rj = jj > j ? jj - 1 : jj;
          mpfr_set(Mij[ri][rj], A[ii][jj], MPFR_RNDN);
        }
      }
      determinant_poorly(Mijdet, Mij);
      mpfr_div(Ainv[j][i], Mijdet, det, MPFR_RNDN);
      if ((i + j) % 2) {
        mpfr_mul_si(Ainv[j][i], Ainv[j][i], -1, MPFR_RNDN);
      }
    }
  }
}


x86 assembly (clang, -O0):
<invert_poorly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0xe4(%rbp),%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
mov    -0xe8(%rbp),%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
mov    -0xe4(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <determinant_poorly@plt>
movl   $0x0,-0xec(%rbp)
cmpl   $0x7,-0xec(%rbp)
jge    12ca <invert_poorly+0x16a>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x7,-0xf0(%rbp)
jge    12b1 <invert_poorly+0x151>
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmpl   $0x6,-0xec(%rbp)
jne    124a <invert_poorly+0xea>
cmpl   $0x6,-0xf0(%rbp)
jne    124a <invert_poorly+0xea>
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    0x2daf(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%esi
call   1060 <mpfr_set_si@plt>
jmp    1298 <invert_poorly+0x138>
cmpl   $0x6,-0xec(%rbp)
je     1264 <invert_poorly+0x104>
cmpl   $0x6,-0xf0(%rbp)
jne    1293 <invert_poorly+0x133>
movslq -0xec(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf0(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    0x2d5e(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
jmp    1298 <invert_poorly+0x138>
jmp    129d <invert_poorly+0x13d>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    11c3 <invert_poorly+0x63>
jmp    12b6 <invert_poorly+0x156>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    11ac <invert_poorly+0x4c>
movl   $0x0,-0xf4(%rbp)
cmpl   $0x7,-0xf4(%rbp)
jge    1528 <invert_poorly+0x3c8>
movl   $0x0,-0xf8(%rbp)
cmpl   $0x7,-0xf8(%rbp)
jge    150f <invert_poorly+0x3af>
movl   $0x0,-0xfc(%rbp)
cmpl   $0x7,-0xfc(%rbp)
jge    1446 <invert_poorly+0x2e6>
mov    -0xfc(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jne    1326 <invert_poorly+0x1c6>
jmp    1432 <invert_poorly+0x2d2>
mov    -0xfc(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jle    134c <invert_poorly+0x1ec>
mov    -0xfc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    1358 <invert_poorly+0x1f8>
mov    -0xfc(%rbp),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
mov    %eax,-0x100(%rbp)
movl   $0x0,-0x104(%rbp)
cmpl   $0x7,-0x104(%rbp)
jge    142d <invert_poorly+0x2cd>
mov    -0x104(%rbp),%eax
cmp    -0xf8(%rbp),%eax
jne    1392 <invert_poorly+0x232>
jmp    1419 <invert_poorly+0x2b9>
mov    -0x104(%rbp),%eax
cmp    -0xf8(%rbp),%eax
jle    13b8 <invert_poorly+0x258>
mov    -0x104(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x110(%rbp)
jmp    13c4 <invert_poorly+0x264>
mov    -0x104(%rbp),%eax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%eax
mov    %eax,-0x108(%rbp)
movslq -0x100(%rbp),%rcx
lea    -0xe0(%rbp),%rax
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0x108(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x8(%rbp),%rax
movslq -0xfc(%rbp),%rcx
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0x104(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    0x2bd6(%rip),%rax
mov    (%rax),%edx
call   1040 <mpfr_set@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    136e <invert_poorly+0x20e>
jmp    1432 <invert_poorly+0x2d2>
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    1302 <invert_poorly+0x1a2>
mov    -0xe8(%rbp),%edi
lea    -0xe0(%rbp),%rsi
call   1030 <determinant_poorly@plt>
mov    -0x10(%rbp),%rax
movslq -0xf8(%rbp),%rcx
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf4(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0xe8(%rbp),%esi
mov    -0xe4(%rbp),%edx
mov    0x2b61(%rip),%rax
mov    (%rax),%ecx
call   1050 <mpfr_div@plt>
mov    -0xf4(%rbp),%eax
add    -0xf8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     14f6 <invert_poorly+0x396>
mov    -0x10(%rbp),%rax
movslq -0xf8(%rbp),%rcx
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf4(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x10(%rbp),%rax
movslq -0xf8(%rbp),%rcx
imul   $0x1c,%rcx,%rcx
add    %rcx,%rax
movslq -0xf4(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    0x2afe(%rip),%rax
mov    (%rax),%ecx
mov    $0xffffffff,%edx
call   1070 <mpfr_mul_si@plt>
jmp    14fb <invert_poorly+0x39b>
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    12eb <invert_poorly+0x18b>
jmp    1514 <invert_poorly+0x3b4>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    12d4 <invert_poorly+0x174>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert_poorly>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x108,%rsp
mov    %rsi,0x10(%rsp)
mov    %rdi,%rbx
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
mov    %rbx,0x8(%rsp)
mov    %rbx,%rsi
call   1030 <determinant_poorly@plt>
mov    $0x18,%ebx
nop
mov    0x28(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    11ce <invert_poorly+0x6e>
mov    0x2e26(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x2c(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    11fc <invert_poorly+0x9c>
mov    0x2df8(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x30(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    122a <invert_poorly+0xca>
mov    0x2dca(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x34(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    1258 <invert_poorly+0xf8>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x38(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    1286 <invert_poorly+0x126>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x3c(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
cmp    $0xc0,%rbx
jne    12b4 <invert_poorly+0x154>
mov    0x2d40(%rip),%rax
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
mov    0x40(%rsp,%rbx,1),%r15d
mov    %r15d,%edi
mov    $0xc8,%esi
call   1080 <mpfr_init2@plt>
mov    0x2d1b(%rip),%rax
cmp    $0xc0,%rbx
je     12f5 <invert_poorly+0x195>
mov    (%rax),%edx
mov    %r15d,%edi
xor    %esi,%esi
call   1060 <mpfr_set_si@plt>
add    $0x1c,%rbx
cmp    $0xdc,%rbx
jne    11a0 <invert_poorly+0x40>
jmp    1304 <invert_poorly+0x1a4>
mov    (%rax),%edx
mov    %r15d,%edi
mov    $0x1,%esi
call   1060 <mpfr_set_si@plt>
addq   $0x18,0x8(%rsp)
xor    %r13d,%r13d
jmp    131e <invert_poorly+0x1be>
nop
add    $0x1,%r13
cmp    $0x7,%r13
je     154c <invert_poorly+0x3ec>
xor    %ebp,%ebp
jmp    133a <invert_poorly+0x1da>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    $0x7,%rbp
je     1310 <invert_poorly+0x1b0>
xor    %eax,%eax
test   %rbp,%rbp
setne  %al
mov    %rax,0x38(%rsp)
cmp    $0x2,%rbp
mov    $0x2,%eax
sbb    $0x0,%rax
mov    %rax,0x18(%rsp)
cmp    $0x3,%rbp
mov    $0x3,%eax
sbb    $0x0,%rax
mov    %rax,0x30(%rsp)
cmp    $0x4,%rbp
mov    $0x4,%eax
sbb    $0x0,%rax
mov    %rax,0x20(%rsp)
cmp    $0x5,%rbp
mov    $0x5,%eax
sbb    $0x0,%rax
mov    %rax,0x28(%rsp)
mov    0x8(%rsp),%r12
xor    %r15d,%r15d
mov    0x2c4a(%rip),%rbx
jmp    13cc <invert_poorly+0x26c>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
mov    0x54(%rsp,%rax,1),%edi
mov    (%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
add    $0x1,%r15
add    $0x1c,%r12
cmp    $0x7,%r15
je     14f0 <invert_poorly+0x390>
cmp    %r15,%r13
je     13ba <invert_poorly+0x25a>
mov    %r15d,%eax
sbb    $0x0,%eax
movslq %eax,%r14
test   %rbp,%rbp
je     1400 <invert_poorly+0x2a0>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
mov    0x40(%rsp,%rax,1),%edi
mov    -0x18(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x1,%rbp
je     142c <invert_poorly+0x2cc>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
add    %rsp,%rax
add    $0x40,%rax
mov    0x38(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x14(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x2,%rbp
je     1458 <invert_poorly+0x2f8>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
add    %rsp,%rax
add    $0x40,%rax
mov    0x18(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x10(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x3,%rbp
je     1484 <invert_poorly+0x324>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
add    %rsp,%rax
add    $0x40,%rax
mov    0x30(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0xc(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x4,%rbp
je     14b4 <invert_poorly+0x354>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
add    %rsp,%rax
add    $0x40,%rax
mov    0x20(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x8(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x5,%rbp
je     13a0 <invert_poorly+0x240>
lea    (%r14,%r14,8),%rax
lea    (%rax,%rax,2),%rax
add    %r14,%rax
add    %rsp,%rax
add    $0x40,%rax
mov    0x28(%rsp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0x4(%r12),%esi
mov    (%rbx),%edx
call   1040 <mpfr_set@plt>
cmp    $0x6,%rbp
jne    13a0 <invert_poorly+0x240>
jmp    13ba <invert_poorly+0x25a>
nopl   0x0(%rax)
lea    0x40(%rsp),%rsi
call   1030 <determinant_poorly@plt>
lea    0x0(,%rbp,8),%rax
add    %rbp,%rax
mov    %rbx,%rcx
lea    (%rax,%rax,2),%rbx
add    %rbp,%rbx
add    0x10(%rsp),%rbx
mov    (%rbx,%r13,4),%edi
mov    (%rcx),%ecx
call   1050 <mpfr_div@plt>
lea    0x0(%rbp,%r13,1),%eax
test   $0x1,%al
je     1330 <invert_poorly+0x1d0>
lea    (%rbx,%r13,4),%rax
mov    (%rax),%edi
mov    0x2aaf(%rip),%rax
mov    (%rax),%ecx
mov    %edi,%esi
mov    $0xffffffff,%edx
call   1070 <mpfr_mul_si@plt>
jmp    1330 <invert_poorly+0x1d0>
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@MPFR_RNDN = global i32 0
define void @invert_poorly([7 x i32]* %0, [7 x i32]* nocapture %1) {
%3 = alloca [7 x [7 x i32]]
%4 = bitcast [7 x [7 x i32]]* %3 to i8*
%5 = tail call i32 @mpfr_init2(i32 undef, i32 200)
%6 = tail call i32 @mpfr_init2(i32 undef, i32 200)
%7 = bitcast [7 x i32]* %0 to i32**
%8 = tail call i32 @determinant_poorly(i32 undef, i32** %7)
br label %9
9: ; preds = %2, %62
%10 = phi i64 [ 0, %2 ], [ %65, %62 ]
%11 = icmp eq i64 %10, 6
%12 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 0
%13 = load i32, i32* %12
%14 = tail call i32 @mpfr_init2(i32 %13, i32 200)
br i1 %11, label %20, label %23
15: ; preds = %62, %17
%16 = bitcast [7 x [7 x i32]]* %3 to i32**
br label %67
17: ; preds = %58
%18 = load i32, i32* @MPFR_RNDN
%19 = tail call i32 @mpfr_set_si(i32 %60, i32 1, i32 %18)
br label %15
20: ; preds = %9
%21 = load i32, i32* @MPFR_RNDN
%22 = tail call i32 @mpfr_set_si(i32 %13, i32 0, i32 %21)
br label %23
23: ; preds = %9, %20
%24 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 1
%25 = load i32, i32* %24
%26 = tail call i32 @mpfr_init2(i32 %25, i32 200)
br i1 %11, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* @MPFR_RNDN
%29 = tail call i32 @mpfr_set_si(i32 %25, i32 0, i32 %28)
br label %30
30: ; preds = %27, %23
%31 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 2
%32 = load i32, i32* %31
%33 = tail call i32 @mpfr_init2(i32 %32, i32 200)
br i1 %11, label %34, label %37
34: ; preds = %30
%35 = load i32, i32* @MPFR_RNDN
%36 = tail call i32 @mpfr_set_si(i32 %32, i32 0, i32 %35)
br label %37
37: ; preds = %34, %30
%38 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 3
%39 = load i32, i32* %38
%40 = tail call i32 @mpfr_init2(i32 %39, i32 200)
br i1 %11, label %41, label %44
41: ; preds = %37
%42 = load i32, i32* @MPFR_RNDN
%43 = tail call i32 @mpfr_set_si(i32 %39, i32 0, i32 %42)
br label %44
44: ; preds = %41, %37
%45 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 4
%46 = load i32, i32* %45
%47 = tail call i32 @mpfr_init2(i32 %46, i32 200)
br i1 %11, label %48, label %51
48: ; preds = %44
%49 = load i32, i32* @MPFR_RNDN
%50 = tail call i32 @mpfr_set_si(i32 %46, i32 0, i32 %49)
br label %51
51: ; preds = %48, %44
%52 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 5
%53 = load i32, i32* %52
%54 = tail call i32 @mpfr_init2(i32 %53, i32 200)
br i1 %11, label %55, label %58
55: ; preds = %51
%56 = load i32, i32* @MPFR_RNDN
%57 = tail call i32 @mpfr_set_si(i32 %53, i32 0, i32 %56)
br label %58
58: ; preds = %55, %51
%59 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %10, i64 6
%60 = load i32, i32* %59
%61 = tail call i32 @mpfr_init2(i32 %60, i32 200)
br i1 %11, label %17, label %62
62: ; preds = %58
%63 = load i32, i32* @MPFR_RNDN
%64 = tail call i32 @mpfr_set_si(i32 %60, i32 0, i32 %63)
%65 = add nuw nsw i64 %10, 1
%66 = icmp eq i64 %65, 7
br i1 %66, label %15, label %9
67: ; preds = %15, %89
%68 = phi i64 [ 0, %15 ], [ %90, %89 ]
br label %70
69: ; preds = %89
ret void
70: ; preds = %67, %166
%71 = phi i64 [ 0, %67 ], [ %167, %166 ]
%72 = icmp eq i64 %71, 0
%73 = icmp eq i64 %71, 1
%74 = icmp ne i64 %71, 0
%75 = zext i1 %74 to i64
%76 = icmp eq i64 %71, 2
%77 = icmp ult i64 %71, 2
%78 = select i1 %77, i64 1, i64 2
%79 = icmp eq i64 %71, 3
%80 = icmp ult i64 %71, 3
%81 = select i1 %80, i64 2, i64 3
%82 = icmp eq i64 %71, 4
%83 = icmp ult i64 %71, 4
%84 = select i1 %83, i64 3, i64 4
%85 = icmp eq i64 %71, 5
%86 = icmp ult i64 %71, 5
%87 = select i1 %86, i64 4, i64 5
%88 = icmp eq i64 %71, 6
br label %101
89: ; preds = %166
%90 = add nuw nsw i64 %68, 1
%91 = icmp eq i64 %90, 7
br i1 %91, label %69, label %67
92: ; preds = %159
%93 = call i32 @determinant_poorly(i32 undef, i32** %16)
%94 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 %71, i64 %68
%95 = load i32, i32* %94
%96 = load i32, i32* @MPFR_RNDN
%97 = call i32 @mpfr_div(i32 %95, i32 undef, i32 undef, i32 %96)
%98 = add nuw nsw i64 %71, %68
%99 = and i64 %98, 1
%100 = icmp eq i64 %99, 0
br i1 %100, label %166, label %162
101: ; preds = %70, %159
%102 = phi i64 [ 0, %70 ], [ %160, %159 ]
%103 = icmp eq i64 %102, %68
br i1 %103, label %159, label %104
104: ; preds = %101
%105 = icmp ugt i64 %102, %68
%106 = sext i1 %105 to i64
%107 = add i64 %102, %106
%108 = shl i64 %107, 32
%109 = ashr exact i64 %108, 32
br i1 %72, label %117, label %110
110: ; preds = %104
%111 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 0
%112 = load i32, i32* %111
%113 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 0
%114 = load i32, i32* %113
%115 = load i32, i32* @MPFR_RNDN
%116 = call i32 @mpfr_set(i32 %112, i32 %114, i32 %115)
br i1 %73, label %124, label %117
117: ; preds = %104, %110
%118 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 %75
%119 = load i32, i32* %118
%120 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 1
%121 = load i32, i32* %120
%122 = load i32, i32* @MPFR_RNDN
%123 = call i32 @mpfr_set(i32 %119, i32 %121, i32 %122)
br i1 %76, label %131, label %124
124: ; preds = %110, %117
%125 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 %78
%126 = load i32, i32* %125
%127 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 2
%128 = load i32, i32* %127
%129 = load i32, i32* @MPFR_RNDN
%130 = call i32 @mpfr_set(i32 %126, i32 %128, i32 %129)
br i1 %79, label %138, label %131
131: ; preds = %117, %124
%132 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 %81
%133 = load i32, i32* %132
%134 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 3
%135 = load i32, i32* %134
%136 = load i32, i32* @MPFR_RNDN
%137 = call i32 @mpfr_set(i32 %133, i32 %135, i32 %136)
br i1 %82, label %145, label %138
138: ; preds = %124, %131
%139 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 %84
%140 = load i32, i32* %139
%141 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 4
%142 = load i32, i32* %141
%143 = load i32, i32* @MPFR_RNDN
%144 = call i32 @mpfr_set(i32 %140, i32 %142, i32 %143)
br i1 %85, label %152, label %145
145: ; preds = %131, %138
%146 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 %87
%147 = load i32, i32* %146
%148 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 5
%149 = load i32, i32* %148
%150 = load i32, i32* @MPFR_RNDN
%151 = call i32 @mpfr_set(i32 %147, i32 %149, i32 %150)
br i1 %88, label %159, label %152
152: ; preds = %138, %145
%153 = getelementptr inbounds [7 x [7 x i32]], [7 x [7 x i32]]* %3, i64 0, i64 %109, i64 5
%154 = load i32, i32* %153
%155 = getelementptr inbounds [7 x i32], [7 x i32]* %0, i64 %102, i64 6
%156 = load i32, i32* %155
%157 = load i32, i32* @MPFR_RNDN
%158 = call i32 @mpfr_set(i32 %154, i32 %156, i32 %157)
br label %159
159: ; preds = %145, %152, %101
%160 = add nuw nsw i64 %102, 1
%161 = icmp eq i64 %160, 7
br i1 %161, label %92, label %101
162: ; preds = %92
%163 = load i32, i32* %94
%164 = load i32, i32* @MPFR_RNDN
%165 = call i32 @mpfr_mul_si(i32 %163, i32 %163, i32 -1, i32 %164)
br label %166
166: ; preds = %92, %162
%167 = add nuw nsw i64 %71, 1
%168 = icmp eq i64 %167, 7
br i1 %168, label %89, label %70
}