#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*/ assert(int);
int dlx_get_exact_cover(int, int, int *, int *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(int *);
int *malloc(int);
int /*<<< orphan*/ read_csv(char *, int, int, int *);
int /*<<< orphan*/ stderr;
int main() {
  int matrix[6 * 7] = {0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1,
                       0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,
                       0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1};
  int *solution = malloc(729 * sizeof(*solution));
  int result = dlx_get_exact_cover(6, 7, matrix, solution);
  assert(result == 3);
  assert(solution[0] == 3);
  assert(solution[1] == 0);
  assert(solution[2] == 4);
  int matrix2[6 * 7] = {1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1,
                        0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,
                        0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1};
  result = dlx_get_exact_cover(6, 7, matrix2, solution);
  assert(result == 0);
  assert((solution[0] == 0) && (solution[1] == 0));
  int matrix3[9 * 9] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
                        0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
                        0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
                        0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
                        0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
  result = dlx_get_exact_cover(9, 9, matrix3, solution);
  assert(result == 9);
  assert((solution[0] != 0) || (solution[1] != 0));
  int matrix4[64 * 64];
  char filename[] = "tests/con4.csv";
  read_csv(filename, 64, 64, matrix4);
  result = dlx_get_exact_cover(64, 64, matrix4, solution);
  assert(result == 16);
  assert((solution[0] == 0) && (solution[1] == 26) && (solution[2] == 37) &&
         (solution[3] == 23) && (solution[15] == 57));
  int matrix5[729 * 324];
  char filename2[] = "tests/con2.csv";
  read_csv(filename2, 729, 324, matrix5);
  result = dlx_get_exact_cover(729, 324, matrix5, solution);
  assert(result == 81);
  assert((solution[0] == 11) && (solution[1] == 22) && (solution[2] == 28) &&
         (solution[3] == 44) && (solution[80] == 725));
  if (0 >= 0)
    fprintf(stderr, "Passed all tests!\n");
  ;
  free(solution);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xead80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0xe70(%rip),%rsi
mov    $0xa8,%edx
call   1080 <memcpy@plt>
mov    $0xb64,%edi
call   1090 <malloc@plt>
mov    %rax,-0xb8(%rbp)
lea    -0xb0(%rbp),%rdx
mov    -0xb8(%rbp),%rcx
mov    $0x6,%edi
mov    $0x7,%esi
call   1070 <dlx_get_exact_cover@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x3,-0xbc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rax
cmpl   $0x3,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rax
cmpl   $0x4,0x8(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x170(%rbp),%rdi
lea    0xe79(%rip),%rsi
mov    $0xa8,%edx
call   1080 <memcpy@plt>
lea    -0x170(%rbp),%rdx
mov    -0xb8(%rbp),%rcx
mov    $0x6,%edi
mov    $0x7,%esi
call   1070 <dlx_get_exact_cover@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x0,-0xbc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0xead70(%rbp)
jne    12a4 <main+0x134>
mov    -0xb8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
sete   %al
mov    %al,-0xead70(%rbp)
mov    -0xead70(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x2c0(%rbp),%rdi
lea    0xe9e(%rip),%rsi
mov    $0x144,%edx
call   1080 <memcpy@plt>
lea    -0x2c0(%rbp),%rdx
mov    -0xb8(%rbp),%rcx
mov    $0x9,%esi
mov    %esi,%edi
call   1070 <dlx_get_exact_cover@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x9,-0xbc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x0,(%rcx)
mov    %al,-0xead71(%rbp)
jne    132c <main+0x1bc>
mov    -0xb8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
setne  %al
mov    %al,-0xead71(%rbp)
mov    -0xead71(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0xf61(%rip),%rax
mov    %rax,-0x42cf(%rbp)
mov    0xf5c(%rip),%eax
mov    %eax,-0x42c7(%rbp)
mov    0xf53(%rip),%ax
mov    %ax,-0x42c3(%rbp)
mov    0xf48(%rip),%al
mov    %al,-0x42c1(%rbp)
lea    -0x42cf(%rbp),%rdi
lea    -0x42c0(%rbp),%rcx
mov    $0x40,%edx
mov    %edx,%esi
call   1040 <read_csv@plt>
lea    -0x42c0(%rbp),%rdx
mov    -0xb8(%rbp),%rcx
mov    $0x40,%esi
mov    %esi,%edi
call   1070 <dlx_get_exact_cover@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x10,-0xbc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0xead72(%rbp)
jne    1435 <main+0x2c5>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x1a,0x4(%rcx)
mov    %al,-0xead72(%rbp)
jne    1435 <main+0x2c5>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x25,0x8(%rcx)
mov    %al,-0xead72(%rbp)
jne    1435 <main+0x2c5>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x17,0xc(%rcx)
mov    %al,-0xead72(%rbp)
jne    1435 <main+0x2c5>
mov    -0xb8(%rbp),%rax
cmpl   $0x39,0x3c(%rax)
sete   %al
mov    %al,-0xead72(%rbp)
mov    -0xead72(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0xe67(%rip),%rax
mov    %rax,-0xead6f(%rbp)
mov    0xe62(%rip),%eax
mov    %eax,-0xead67(%rbp)
mov    0xe59(%rip),%ax
mov    %ax,-0xead63(%rbp)
mov    0xe4e(%rip),%al
mov    %al,-0xead61(%rbp)
lea    -0xead6f(%rbp),%rdi
lea    -0xead60(%rbp),%rcx
mov    $0x2d9,%esi
mov    $0x144,%edx
call   1040 <read_csv@plt>
lea    -0xead60(%rbp),%rdx
mov    -0xb8(%rbp),%rcx
mov    $0x2d9,%edi
mov    $0x144,%esi
call   1070 <dlx_get_exact_cover@plt>
mov    %eax,-0xbc(%rbp)
cmpl   $0x51,-0xbc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0xb,(%rcx)
mov    %al,-0xead73(%rbp)
jne    154a <main+0x3da>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x16,0x4(%rcx)
mov    %al,-0xead73(%rbp)
jne    154a <main+0x3da>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x1c,0x8(%rcx)
mov    %al,-0xead73(%rbp)
jne    154a <main+0x3da>
mov    -0xb8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x2c,0xc(%rcx)
mov    %al,-0xead73(%rbp)
jne    154a <main+0x3da>
mov    -0xb8(%rbp),%rax
cmpl   $0x2d5,0x140(%rax)
sete   %al
mov    %al,-0xead73(%rbp)
mov    -0xead73(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0x2a7f(%rip),%rax
mov    (%rax),%edi
lea    0xd58(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xead80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xead68,%rsp
lea    0xe7c(%rip),%rsi
lea    0xd0(%rsp),%rbp
mov    $0xa8,%edx
mov    %rbp,%rdi
call   1080 <memcpy@plt>
mov    $0xb64,%edi
call   1090 <malloc@plt>
mov    %rax,%rbx
mov    $0x6,%edi
mov    $0x7,%esi
mov    %rbp,%rdx
mov    %rax,%rcx
call   1070 <dlx_get_exact_cover@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x3,(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x0,0x4(%rbx)
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x4,0x8(%rbx)
sete   %dil
call   1050 <assert@plt>
lea    0xeb4(%rip),%rsi
lea    0x20(%rsp),%rbp
mov    $0xa8,%edx
mov    %rbp,%rdi
call   1080 <memcpy@plt>
mov    $0x6,%edi
mov    $0x7,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1070 <dlx_get_exact_cover@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
cmpl   $0x0,(%rbx)
jne    1241 <main+0xd1>
xor    %edi,%edi
cmpl   $0x0,0x4(%rbx)
sete   %dil
call   1050 <assert@plt>
lea    0xf13(%rip),%rsi
lea    0x180(%rsp),%rbp
mov    $0x144,%edx
mov    %rbp,%rdi
call   1080 <memcpy@plt>
mov    $0x9,%edi
mov    $0x9,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1070 <dlx_get_exact_cover@plt>
xor    %edi,%edi
cmp    $0x9,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
cmpl   $0x0,(%rbx)
jne    1299 <main+0x129>
xor    %edi,%edi
cmpl   $0x0,0x4(%rbx)
setne  %dil
call   1050 <assert@plt>
movabs $0x7673632e346e6f,%rax
mov    %rax,0x17(%rsp)
movabs $0x6f632f7374736574,%r15
2f 63 6f
mov    %r15,0x10(%rsp)
lea    0x10(%rsp),%rdi
lea    0x2d0(%rsp),%rbp
mov    $0x40,%esi
mov    $0x40,%edx
mov    %rbp,%rcx
call   1040 <read_csv@plt>
mov    $0x40,%edi
mov    $0x40,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1070 <dlx_get_exact_cover@plt>
xor    %edi,%edi
cmp    $0x10,%eax
sete   %dil
call   1050 <assert@plt>
xor    %r14d,%r14d
cmpl   $0x0,(%rbx)
mov    $0x0,%edi
jne    1336 <main+0x1c6>
cmpl   $0x1a,0x4(%rbx)
mov    $0x0,%edi
jne    1336 <main+0x1c6>
cmpl   $0x25,0x8(%rbx)
mov    $0x0,%edi
jne    1336 <main+0x1c6>
cmpl   $0x17,0xc(%rbx)
mov    $0x0,%edi
jne    1336 <main+0x1c6>
xor    %edi,%edi
cmpl   $0x39,0x3c(%rbx)
sete   %dil
call   1050 <assert@plt>
movabs $0x7673632e326e6f,%rax
mov    %rax,0x7(%rsp)
mov    %r15,(%rsp)
mov    %rsp,%rdi
lea    0x42d0(%rsp),%rbp
mov    $0x2d9,%esi
mov    $0x144,%edx
mov    %rbp,%rcx
call   1040 <read_csv@plt>
mov    $0x2d9,%edi
mov    $0x144,%esi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1070 <dlx_get_exact_cover@plt>
xor    %edi,%edi
cmp    $0x51,%eax
sete   %dil
call   1050 <assert@plt>
cmpl   $0xb,(%rbx)
jne    13b6 <main+0x246>
cmpl   $0x16,0x4(%rbx)
jne    13b6 <main+0x246>
cmpl   $0x1c,0x8(%rbx)
jne    13b6 <main+0x246>
cmpl   $0x2c,0xc(%rbx)
jne    13b6 <main+0x246>
xor    %r14d,%r14d
cmpl   $0x2d5,0x140(%rbx)
sete   %r14b
mov    %r14d,%edi
call   1050 <assert@plt>
mov    0x2c1b(%rip),%rax
mov    (%rax),%edi
lea    0xef4(%rip),%rsi
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0xead68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.matrix = [42 x i32] [i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1]
@__const.main.matrix2 = [42 x i32] [i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1]
@__const.main.matrix3 = [81 x i32] [i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1]
@__const.main.filename = [15 x i8] c"tests/con4.csv\00"
@__const.main.filename2 = [15 x i8] c"tests/con2.csv\00"
@stderr = global i32 0
@.str = [19 x i8] c"Passed all tests!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [42 x i32]
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [42 x i32]
%6 = alloca [81 x i32]
%7 = alloca [4096 x i32]
%8 = alloca [15 x i8]
%9 = alloca [236196 x i32]
%10 = alloca [15 x i8]
store i32 0, i32* %1
%11 = bitcast [42 x i32]* %2 to i8*
%12 = call i32* @malloc(i32 2916)
store i32* %12, i32** %3
%13 = getelementptr inbounds [42 x i32], [42 x i32]* %2, i64 0, i64 0
%14 = load i32*, i32** %3
%15 = call i32 @dlx_get_exact_cover(i32 6, i32 7, i32* %13, i32* %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 3
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 0
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 3
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 1
%28 = load i32, i32* %27
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i64 2
%34 = load i32, i32* %33
%35 = icmp eq i32 %34, 4
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = bitcast [42 x i32]* %5 to i8*
%39 = getelementptr inbounds [42 x i32], [42 x i32]* %5, i64 0, i64 0
%40 = load i32*, i32** %3
%41 = call i32 @dlx_get_exact_cover(i32 6, i32 7, i32* %39, i32* %40)
store i32 %41, i32* %4
%42 = load i32, i32* %4
%43 = icmp eq i32 %42, 0
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = load i32*, i32** %3
%47 = getelementptr inbounds i32, i32* %46, i64 0
%48 = load i32, i32* %47
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %0
%51 = load i32*, i32** %3
%52 = getelementptr inbounds i32, i32* %51, i64 1
%53 = load i32, i32* %52
%54 = icmp eq i32 %53, 0
br label %55
55: ; preds = %50, %0
%56 = phi i1 [ false, %0 ], [ %54, %50 ]
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = bitcast [81 x i32]* %6 to i8*
%60 = getelementptr inbounds [81 x i32], [81 x i32]* %6, i64 0, i64 0
%61 = load i32*, i32** %3
%62 = call i32 @dlx_get_exact_cover(i32 9, i32 9, i32* %60, i32* %61)
store i32 %62, i32* %4
%63 = load i32, i32* %4
%64 = icmp eq i32 %63, 9
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32*, i32** %3
%68 = getelementptr inbounds i32, i32* %67, i64 0
%69 = load i32, i32* %68
%70 = icmp ne i32 %69, 0
br i1 %70, label %76, label %71
71: ; preds = %55
%72 = load i32*, i32** %3
%73 = getelementptr inbounds i32, i32* %72, i64 1
%74 = load i32, i32* %73
%75 = icmp ne i32 %74, 0
br label %76
76: ; preds = %71, %55
%77 = phi i1 [ true, %55 ], [ %75, %71 ]
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = bitcast [15 x i8]* %8 to i8*
%81 = getelementptr inbounds [15 x i8], [15 x i8]* %8, i64 0, i64 0
%82 = getelementptr inbounds [4096 x i32], [4096 x i32]* %7, i64 0, i64 0
%83 = call i32 @read_csv(i8* %81, i32 64, i32 64, i32* %82)
%84 = getelementptr inbounds [4096 x i32], [4096 x i32]* %7, i64 0, i64 0
%85 = load i32*, i32** %3
%86 = call i32 @dlx_get_exact_cover(i32 64, i32 64, i32* %84, i32* %85)
store i32 %86, i32* %4
%87 = load i32, i32* %4
%88 = icmp eq i32 %87, 16
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = load i32*, i32** %3
%92 = getelementptr inbounds i32, i32* %91, i64 0
%93 = load i32, i32* %92
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %115
95: ; preds = %76
%96 = load i32*, i32** %3
%97 = getelementptr inbounds i32, i32* %96, i64 1
%98 = load i32, i32* %97
%99 = icmp eq i32 %98, 26
br i1 %99, label %100, label %115
100: ; preds = %95
%101 = load i32*, i32** %3
%102 = getelementptr inbounds i32, i32* %101, i64 2
%103 = load i32, i32* %102
%104 = icmp eq i32 %103, 37
br i1 %104, label %105, label %115
105: ; preds = %100
%106 = load i32*, i32** %3
%107 = getelementptr inbounds i32, i32* %106, i64 3
%108 = load i32, i32* %107
%109 = icmp eq i32 %108, 23
br i1 %109, label %110, label %115
110: ; preds = %105
%111 = load i32*, i32** %3
%112 = getelementptr inbounds i32, i32* %111, i64 15
%113 = load i32, i32* %112
%114 = icmp eq i32 %113, 57
br label %115
115: ; preds = %110, %105, %100, %95, %76
%116 = phi i1 [ false, %105 ], [ false, %100 ], [ false, %95 ], [ false, %76 ], [ %114, %110 ]
%117 = zext i1 %116 to i32
%118 = call i32 @assert(i32 %117)
%119 = bitcast [15 x i8]* %10 to i8*
%120 = getelementptr inbounds [15 x i8], [15 x i8]* %10, i64 0, i64 0
%121 = getelementptr inbounds [236196 x i32], [236196 x i32]* %9, i64 0, i64 0
%122 = call i32 @read_csv(i8* %120, i32 729, i32 324, i32* %121)
%123 = getelementptr inbounds [236196 x i32], [236196 x i32]* %9, i64 0, i64 0
%124 = load i32*, i32** %3
%125 = call i32 @dlx_get_exact_cover(i32 729, i32 324, i32* %123, i32* %124)
store i32 %125, i32* %4
%126 = load i32, i32* %4
%127 = icmp eq i32 %126, 81
%128 = zext i1 %127 to i32
%129 = call i32 @assert(i32 %128)
%130 = load i32*, i32** %3
%131 = getelementptr inbounds i32, i32* %130, i64 0
%132 = load i32, i32* %131
%133 = icmp eq i32 %132, 11
br i1 %133, label %134, label %154
134: ; preds = %115
%135 = load i32*, i32** %3
%136 = getelementptr inbounds i32, i32* %135, i64 1
%137 = load i32, i32* %136
%138 = icmp eq i32 %137, 22
br i1 %138, label %139, label %154
139: ; preds = %134
%140 = load i32*, i32** %3
%141 = getelementptr inbounds i32, i32* %140, i64 2
%142 = load i32, i32* %141
%143 = icmp eq i32 %142, 28
br i1 %143, label %144, label %154
144: ; preds = %139
%145 = load i32*, i32** %3
%146 = getelementptr inbounds i32, i32* %145, i64 3
%147 = load i32, i32* %146
%148 = icmp eq i32 %147, 44
br i1 %148, label %149, label %154
149: ; preds = %144
%150 = load i32*, i32** %3
%151 = getelementptr inbounds i32, i32* %150, i64 80
%152 = load i32, i32* %151
%153 = icmp eq i32 %152, 725
br label %154
154: ; preds = %149, %144, %139, %134, %115
%155 = phi i1 [ false, %144 ], [ false, %139 ], [ false, %134 ], [ false, %115 ], [ %153, %149 ]
%156 = zext i1 %155 to i32
%157 = call i32 @assert(i32 %156)
%158 = load i32, i32* @stderr
%159 = call i32 @fprintf(i32 %158, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%160 = load i32*, i32** %3
%161 = call i32 @free(i32* %160)
ret i32 0
}

LLVM IR (-O2):
@__const.main.matrix = [42 x i32] [i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1]
@__const.main.matrix2 = [42 x i32] [i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1]
@__const.main.matrix3 = [81 x i32] [i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1]
@__const.main.filename = [15 x i8] c"tests/con4.csv\00"
@__const.main.filename2 = [15 x i8] c"tests/con2.csv\00"
@stderr = global i32 0
@.str = [19 x i8] c"Passed all tests!\0A\00"
define i32 @main() {
%1 = alloca [42 x i32]
%2 = alloca [42 x i32]
%3 = alloca [81 x i32]
%4 = alloca [4096 x i32]
%5 = alloca [15 x i8]
%6 = alloca [236196 x i32]
%7 = alloca [15 x i8]
%8 = bitcast [42 x i32]* %1 to i8*
%9 = tail call i32* @malloc(i32 2916)
%10 = getelementptr inbounds [42 x i32], [42 x i32]* %1, i64 0, i64 0
%11 = call i32 @dlx_get_exact_cover(i32 6, i32 7, i32* %10, i32* %9)
%12 = icmp eq i32 %11, 3
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i32, i32* %9
%16 = icmp eq i32 %15, 3
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = getelementptr inbounds i32, i32* %9, i64 1
%20 = load i32, i32* %19
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = getelementptr inbounds i32, i32* %9, i64 2
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 4
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = bitcast [42 x i32]* %2 to i8*
%30 = getelementptr inbounds [42 x i32], [42 x i32]* %2, i64 0, i64 0
%31 = call i32 @dlx_get_exact_cover(i32 6, i32 7, i32* %30, i32* %9)
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i32, i32* %9
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %41
37: ; preds = %0
%38 = load i32, i32* %19
%39 = icmp eq i32 %38, 0
%40 = zext i1 %39 to i32
br label %41
41: ; preds = %37, %0
%42 = phi i32 [ 0, %0 ], [ %40, %37 ]
%43 = call i32 @assert(i32 %42)
%44 = bitcast [81 x i32]* %3 to i8*
%45 = getelementptr inbounds [81 x i32], [81 x i32]* %3, i64 0, i64 0
%46 = call i32 @dlx_get_exact_cover(i32 9, i32 9, i32* %45, i32* %9)
%47 = icmp eq i32 %46, 9
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = load i32, i32* %9
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %41
%53 = load i32, i32* %19
%54 = icmp ne i32 %53, 0
%55 = zext i1 %54 to i32
br label %56
56: ; preds = %52, %41
%57 = phi i32 [ 1, %41 ], [ %55, %52 ]
%58 = call i32 @assert(i32 %57)
%59 = bitcast [4096 x i32]* %4 to i8*
%60 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%61 = getelementptr inbounds [4096 x i32], [4096 x i32]* %4, i64 0, i64 0
%62 = call i32 @read_csv(i8* %60, i32 64, i32 64, i32* %61)
%63 = call i32 @dlx_get_exact_cover(i32 64, i32 64, i32* %61, i32* %9)
%64 = icmp eq i32 %63, 16
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i32, i32* %9
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %84
69: ; preds = %56
%70 = load i32, i32* %19
%71 = icmp eq i32 %70, 26
br i1 %71, label %72, label %84
72: ; preds = %69
%73 = load i32, i32* %24
%74 = icmp eq i32 %73, 37
br i1 %74, label %75, label %84
75: ; preds = %72
%76 = getelementptr inbounds i32, i32* %9, i64 3
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, 23
br i1 %78, label %79, label %84
79: ; preds = %75
%80 = getelementptr inbounds i32, i32* %9, i64 15
%81 = load i32, i32* %80
%82 = icmp eq i32 %81, 57
%83 = zext i1 %82 to i32
br label %84
84: ; preds = %79, %75, %72, %69, %56
%85 = phi i32 [ 0, %75 ], [ 0, %72 ], [ 0, %69 ], [ 0, %56 ], [ %83, %79 ]
%86 = call i32 @assert(i32 %85)
%87 = bitcast [236196 x i32]* %6 to i8*
%88 = getelementptr inbounds [15 x i8], [15 x i8]* %7, i64 0, i64 0
%89 = getelementptr inbounds [236196 x i32], [236196 x i32]* %6, i64 0, i64 0
%90 = call i32 @read_csv(i8* %88, i32 729, i32 324, i32* %89)
%91 = call i32 @dlx_get_exact_cover(i32 729, i32 324, i32* %89, i32* %9)
%92 = icmp eq i32 %91, 81
%93 = zext i1 %92 to i32
%94 = call i32 @assert(i32 %93)
%95 = load i32, i32* %9
%96 = icmp eq i32 %95, 11
br i1 %96, label %97, label %112
97: ; preds = %84
%98 = load i32, i32* %19
%99 = icmp eq i32 %98, 22
br i1 %99, label %100, label %112
100: ; preds = %97
%101 = load i32, i32* %24
%102 = icmp eq i32 %101, 28
br i1 %102, label %103, label %112
103: ; preds = %100
%104 = getelementptr inbounds i32, i32* %9, i64 3
%105 = load i32, i32* %104
%106 = icmp eq i32 %105, 44
br i1 %106, label %107, label %112
107: ; preds = %103
%108 = getelementptr inbounds i32, i32* %9, i64 80
%109 = load i32, i32* %108
%110 = icmp eq i32 %109, 725
%111 = zext i1 %110 to i32
br label %112
112: ; preds = %107, %103, %100, %97, %84
%113 = phi i32 [ 0, %103 ], [ 0, %100 ], [ 0, %97 ], [ 0, %84 ], [ %111, %107 ]
%114 = call i32 @assert(i32 %113)
%115 = load i32, i32* @stderr
%116 = call i32 @fprintf(i32 %115, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%117 = call i32 @free(i32* %9)
ret i32 0
}