#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 assertDeepEqual(int *, int *, int);
int sudoku_solve(int *);
char *test_sudoku_solve() {
  static int actual[81] = {0, 0, 0, 0, 6, 0, 1, 7, 0, 8, 0, 0, 9, 0, 0, 0, 0,
                           0, 3, 0, 5, 0, 0, 4, 6, 0, 0, 0, 0, 4, 1, 0, 7, 0,
                           5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 4, 0, 5,
                           3, 0, 0, 0, 0, 1, 6, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0,
                           9, 0, 0, 2, 0, 4, 9, 0, 8, 0, 0, 0, 0};
  static int expected[81] = {4, 9, 2, 3, 6, 8, 1, 7, 5, 8, 7, 6, 9, 5, 1, 2, 3,
                             4, 3, 1, 5, 2, 7, 4, 6, 8, 9, 9, 3, 4, 1, 2, 7, 8,
                             5, 6, 2, 5, 7, 8, 3, 6, 9, 4, 1, 1, 6, 8, 4, 9, 5,
                             3, 2, 7, 5, 2, 1, 6, 4, 3, 7, 9, 8, 7, 8, 3, 5, 1,
                             9, 4, 6, 2, 6, 4, 9, 7, 8, 2, 5, 1, 3};
  int result = sudoku_solve(actual);
  int deepEqual = assertDeepEqual(actual, expected, 81);
  do {
    if (!(result && deepEqual))
      return "e: test_sudoku_solve()";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_sudoku_solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f11(%rip),%rdi
call   1040 <sudoku_solve@plt>
mov    %eax,-0xc(%rbp)
lea    0x2f02(%rip),%rdi
lea    0x304b(%rip),%rsi
mov    $0x51,%edx
call   1030 <assertDeepEqual@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1166 <test_sudoku_solve+0x46>
cmpl   $0x0,-0x10(%rbp)
jne    1176 <test_sudoku_solve+0x56>
lea    0xe93(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1183 <test_sudoku_solve+0x63>
jmp    117b <test_sudoku_solve+0x5b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sudoku_solve>:
push   %rbp
push   %rbx
push   %rax
lea    0x2f16(%rip),%rbx
mov    %rbx,%rdi
call   1040 <sudoku_solve@plt>
mov    %eax,%ebp
lea    0x3055(%rip),%rsi
mov    %rbx,%rdi
mov    $0x51,%edx
call   1030 <assertDeepEqual@plt>
xor    %ecx,%ecx
test   %eax,%eax
lea    0xead(%rip),%rax
cmove  %rax,%rcx
test   %ebp,%ebp
cmove  %rax,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@test_sudoku_solve.actual = internal global [81 x i32] [i32 0, i32 0, i32 0, i32 0, i32 6, i32 0, i32 1, i32 7, i32 0, i32 8, i32 0, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 5, i32 0, i32 0, i32 4, i32 6, i32 0, i32 0, i32 0, i32 0, i32 4, i32 1, i32 0, i32 7, i32 0, i32 5, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 6, i32 0, i32 4, i32 0, i32 5, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1, i32 6, i32 0, i32 0, i32 7, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 4, i32 9, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0]
@test_sudoku_solve.expected = internal global [81 x i32] [i32 4, i32 9, i32 2, i32 3, i32 6, i32 8, i32 1, i32 7, i32 5, i32 8, i32 7, i32 6, i32 9, i32 5, i32 1, i32 2, i32 3, i32 4, i32 3, i32 1, i32 5, i32 2, i32 7, i32 4, i32 6, i32 8, i32 9, i32 9, i32 3, i32 4, i32 1, i32 2, i32 7, i32 8, i32 5, i32 6, i32 2, i32 5, i32 7, i32 8, i32 3, i32 6, i32 9, i32 4, i32 1, i32 1, i32 6, i32 8, i32 4, i32 9, i32 5, i32 3, i32 2, i32 7, i32 5, i32 2, i32 1, i32 6, i32 4, i32 3, i32 7, i32 9, i32 8, i32 7, i32 8, i32 3, i32 5, i32 1, i32 9, i32 4, i32 6, i32 2, i32 6, i32 4, i32 9, i32 7, i32 8, i32 2, i32 5, i32 1, i32 3]
@.str = [23 x i8] c"e: test_sudoku_solve()\00"
define i8* @test_sudoku_solve() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @sudoku_solve(i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.actual, i64 0, i64 0))
store i32 %4, i32* %2
%5 = call i32 @assertDeepEqual(i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.actual, i64 0, i64 0), i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.expected, i64 0, i64 0), i32 81)
store i32 %5, i32* %3
br label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9, %6
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %1
br label %15
13: ; preds = %9
br label %14
14: ; preds = %13
store i8* null, i8** %1
br label %15
15: ; preds = %14, %12
%16 = load i8*, i8** %1
ret i8* %16
}

LLVM IR (-O2):
@test_sudoku_solve.actual = internal global [81 x i32] [i32 0, i32 0, i32 0, i32 0, i32 6, i32 0, i32 1, i32 7, i32 0, i32 8, i32 0, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 5, i32 0, i32 0, i32 4, i32 6, i32 0, i32 0, i32 0, i32 0, i32 4, i32 1, i32 0, i32 7, i32 0, i32 5, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 6, i32 0, i32 4, i32 0, i32 5, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1, i32 6, i32 0, i32 0, i32 7, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 4, i32 9, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0]
@test_sudoku_solve.expected = internal global [81 x i32] [i32 4, i32 9, i32 2, i32 3, i32 6, i32 8, i32 1, i32 7, i32 5, i32 8, i32 7, i32 6, i32 9, i32 5, i32 1, i32 2, i32 3, i32 4, i32 3, i32 1, i32 5, i32 2, i32 7, i32 4, i32 6, i32 8, i32 9, i32 9, i32 3, i32 4, i32 1, i32 2, i32 7, i32 8, i32 5, i32 6, i32 2, i32 5, i32 7, i32 8, i32 3, i32 6, i32 9, i32 4, i32 1, i32 1, i32 6, i32 8, i32 4, i32 9, i32 5, i32 3, i32 2, i32 7, i32 5, i32 2, i32 1, i32 6, i32 4, i32 3, i32 7, i32 9, i32 8, i32 7, i32 8, i32 3, i32 5, i32 1, i32 9, i32 4, i32 6, i32 2, i32 6, i32 4, i32 9, i32 7, i32 8, i32 2, i32 5, i32 1, i32 3]
@.str = [23 x i8] c"e: test_sudoku_solve()\00"
define i8* @test_sudoku_solve() {
%1 = tail call i32 @sudoku_solve(i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.actual, i64 0, i64 0))
%2 = tail call i32 @assertDeepEqual(i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.actual, i64 0, i64 0), i32* getelementptr inbounds ([81 x i32], [81 x i32]* @test_sudoku_solve.expected, i64 0, i64 0), i32 81)
%3 = icmp ne i32 %1, 0
%4 = icmp ne i32 %2, 0
%5 = select i1 %3, i1 %4, i1 false
%6 = select i1 %5, i8* null, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
ret i8* %6
}