#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*/ printf(char *, ...);
int /*<<< orphan*/ solveSudoku(char **, int, int);
int main(int argc, char **argv) {
  int i;
  if (argc != 10) {
    printf("Solve Sudoku <line1> <line2> ... <line9>\n");
    return 0;
  }
  solveSudoku(argv + 1, 9, 9);
  for (i = 1; i < 10; ++i) {
    printf("%s\n", *(argv + i));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     115a <main+0x3a>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11a7 <main+0x87>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    $0x9,%edx
mov    %edx,%esi
call   1040 <solveSudoku@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11a7 <main+0x87>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1175 <main+0x55>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0xa,%edi
jne    118a <main+0x6a>
mov    %rsi,%rbx
lea    0x8(%rsi),%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1040 <solveSudoku@plt>
mov    0x8(%rbx),%rdi
call   1030 <puts@plt>
mov    0x10(%rbx),%rdi
call   1030 <puts@plt>
mov    0x18(%rbx),%rdi
call   1030 <puts@plt>
mov    0x20(%rbx),%rdi
call   1030 <puts@plt>
mov    0x28(%rbx),%rdi
call   1030 <puts@plt>
mov    0x30(%rbx),%rdi
call   1030 <puts@plt>
mov    0x38(%rbx),%rdi
call   1030 <puts@plt>
mov    0x40(%rbx),%rdi
call   1030 <puts@plt>
mov    0x48(%rbx),%rdi
jmp    1191 <main+0x71>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Solve Sudoku <line1> <line2> ... <line9>\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 10
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %28
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = call i32 @solveSudoku(i8** %13, i32 9, i32 9)
store i32 1, i32* %6
br label %15
15: ; preds = %25, %11
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 10
br i1 %17, label %18, label %28
18: ; preds = %15
%19 = load i8**, i8*** %5
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8*, i8** %19, i64 %21
%23 = load i8*, i8** %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %23)
br label %25
25: ; preds = %18
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 1
store i32 %27, i32* %6
br label %15
28: ; preds = %9, %15
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@str = [41 x i8] c"Solve Sudoku <line1> <line2> ... <line9>\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 10
br i1 %3, label %4, label %32
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = tail call i32 @solveSudoku(i8** %5, i32 9, i32 9)
%7 = load i8*, i8** %5
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @puts(i8* dereferenceable(1) %10)
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = load i8*, i8** %12
%14 = tail call i32 @puts(i8* dereferenceable(1) %13)
%15 = getelementptr inbounds i8*, i8** %1, i64 4
%16 = load i8*, i8** %15
%17 = tail call i32 @puts(i8* dereferenceable(1) %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 5
%19 = load i8*, i8** %18
%20 = tail call i32 @puts(i8* dereferenceable(1) %19)
%21 = getelementptr inbounds i8*, i8** %1, i64 6
%22 = load i8*, i8** %21
%23 = tail call i32 @puts(i8* dereferenceable(1) %22)
%24 = getelementptr inbounds i8*, i8** %1, i64 7
%25 = load i8*, i8** %24
%26 = tail call i32 @puts(i8* dereferenceable(1) %25)
%27 = getelementptr inbounds i8*, i8** %1, i64 8
%28 = load i8*, i8** %27
%29 = tail call i32 @puts(i8* dereferenceable(1) %28)
%30 = getelementptr inbounds i8*, i8** %1, i64 9
%31 = load i8*, i8** %30
br label %32
32: ; preds = %2, %4
%33 = phi i8* [ %31, %4 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0), %2 ]
%34 = tail call i32 @puts(i8* dereferenceable(1) %33)
ret i32 0
}