#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__ initialize(char *);
int /*<<< orphan*/ is_solved();
int /*<<< orphan*/ print_sudoku();
int /*<<< orphan*/ printf(char *);
scalar_t__ simplify_hiddenpair();
scalar_t__ simplify_hiddensingle();
scalar_t__ simplify_hiddentriple();
scalar_t__ simplify_intersection();
scalar_t__ simplify_nakedpair();
scalar_t__ simplify_nakedsingle();
scalar_t__ simplify_nakedtriple();
scalar_t__ simplify_xwing();
int main(int argc, char **args) {
  if (argc != 2 || initialize(args[1])) {
    printf("Malformed or missing input!\nExemplary usage: sudoku "
           "7.4.95...9.6.8...73.1.76.9.5...1.84613865472946.8......1.5..97.84."
           "76.23..........\n\n");
    return -1;
  }
  while (!is_solved()) {
    if (simplify_nakedsingle())
      continue;
    if (simplify_hiddensingle())
      continue;
    if (simplify_nakedpair())
      continue;
    if (simplify_nakedtriple())
      continue;
    if (simplify_hiddenpair())
      continue;
    if (simplify_hiddentriple())
      continue;
    if (simplify_intersection())
      continue;
    if (simplify_xwing())
      continue;
    printf("THIS SUDOKU IS TOO HARD TO SOLVE FOR ME!\n");
    break;
  }
  print_sudoku();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    11f7 <main+0x37>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <initialize@plt>
cmp    $0x0,%rax
je     120f <main+0x4f>
lea    0xe02(%rip),%rdi
call   1080 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12fa <main+0x13a>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   10c0 <is_solved@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1230 <main+0x70>
jmp    12ec <main+0x12c>
mov    $0x0,%al
call   1050 <simplify_nakedsingle@plt>
cmp    $0x0,%rax
je     1246 <main+0x86>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   10a0 <simplify_hiddensingle@plt>
cmp    $0x0,%rax
je     125c <main+0x9c>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   10e0 <simplify_nakedpair@plt>
cmp    $0x0,%rax
je     1272 <main+0xb2>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   1070 <simplify_nakedtriple@plt>
cmp    $0x0,%rax
je     1288 <main+0xc8>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   10b0 <simplify_hiddenpair@plt>
cmp    $0x0,%rax
je     129e <main+0xde>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   1040 <simplify_hiddentriple@plt>
cmp    $0x0,%rax
je     12b4 <main+0xf4>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   10d0 <simplify_intersection@plt>
cmp    $0x0,%rax
je     12ca <main+0x10a>
jmp    1214 <main+0x54>
mov    $0x0,%al
call   1060 <simplify_xwing@plt>
cmp    $0x0,%rax
je     12e0 <main+0x120>
jmp    1214 <main+0x54>
lea    0xda1(%rip),%rdi
call   1080 <printf@plt>
mov    $0x0,%al
call   1030 <print_sudoku@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    11d4 <main+0x14>
mov    0x8(%rsi),%rdi
call   1090 <initialize@plt>
test   %rax,%rax
je     11e9 <main+0x29>
lea    0xe4e(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   10c0 <is_solved@plt>
test   %eax,%eax
jne    1267 <main+0xa7>
xor    %eax,%eax
call   1060 <simplify_nakedsingle@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   10a0 <simplify_hiddensingle@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   10e0 <simplify_nakedpair@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   1080 <simplify_nakedtriple@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   10b0 <simplify_hiddenpair@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   1050 <simplify_hiddentriple@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   10d0 <simplify_intersection@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
xor    %eax,%eax
call   1070 <simplify_xwing@plt>
test   %rax,%rax
jne    11f0 <main+0x30>
lea    0xd9e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <print_sudoku@plt>
jmp    11e5 <main+0x25>

LLVM IR (-O0):
@.str = [136 x i8] c"Malformed or missing input!\0AExemplary usage: sudoku 7.4.95...9.6.8...73.1.76.9.5...1.84613865472946.8......1.5..97.84.76.23..........\0A\0A\00"
@.str.1 = [42 x i8] c"THIS SUDOKU IS TOO HARD TO SOLVE FOR ME!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @initialize(i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %8, %2
%15 = call i32 @printf(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %57
16: ; preds = %8
br label %17
17: ; preds = %52, %48, %44, %40, %36, %32, %28, %24, %16
%18 = call i32 (...) @is_solved()
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
br i1 %20, label %21, label %55
21: ; preds = %17
%22 = call i64 (...) @simplify_nakedsingle()
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21
br label %17
25: ; preds = %21
%26 = call i64 (...) @simplify_hiddensingle()
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %25
br label %17
29: ; preds = %25
%30 = call i64 (...) @simplify_nakedpair()
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %29
br label %17
33: ; preds = %29
%34 = call i64 (...) @simplify_nakedtriple()
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %33
br label %17
37: ; preds = %33
%38 = call i64 (...) @simplify_hiddenpair()
%39 = icmp ne i64 %38, 0
br i1 %39, label %40, label %41
40: ; preds = %37
br label %17
41: ; preds = %37
%42 = call i64 (...) @simplify_hiddentriple()
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %41
br label %17
45: ; preds = %41
%46 = call i64 (...) @simplify_intersection()
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %45
br label %17
49: ; preds = %45
%50 = call i64 (...) @simplify_xwing()
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %49
br label %17
53: ; preds = %49
%54 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %55
55: ; preds = %53, %17
%56 = call i32 (...) @print_sudoku()
store i32 0, i32* %3
br label %57
57: ; preds = %55, %14
%58 = load i32, i32* %3
ret i32 %58
}

LLVM IR (-O2):
@str = [41 x i8] c"THIS SUDOKU IS TOO HARD TO SOLVE FOR ME!\00"
@str.2 = [135 x i8] c"Malformed or missing input!\0AExemplary usage: sudoku 7.4.95...9.6.8...73.1.76.9.5...1.84613865472946.8......1.5..97.84.76.23..........\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @initialize(i8* %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = tail call i32 (...) @is_solved()
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %43
12: ; preds = %4, %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([135 x i8], [135 x i8]* @str.2, i64 0, i64 0))
br label %45
14: ; preds = %9, %17
%15 = tail call i64 (...) @simplify_nakedsingle()
%16 = icmp eq i64 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %14, %20, %23, %26, %29, %32, %35, %38
%18 = tail call i32 (...) @is_solved()
%19 = icmp eq i32 %18, 0
br i1 %19, label %14, label %43
20: ; preds = %14
%21 = tail call i64 (...) @simplify_hiddensingle()
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %17
23: ; preds = %20
%24 = tail call i64 (...) @simplify_nakedpair()
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %17
26: ; preds = %23
%27 = tail call i64 (...) @simplify_nakedtriple()
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %17
29: ; preds = %26
%30 = tail call i64 (...) @simplify_hiddenpair()
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %17
32: ; preds = %29
%33 = tail call i64 (...) @simplify_hiddentriple()
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %17
35: ; preds = %32
%36 = tail call i64 (...) @simplify_intersection()
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %17
38: ; preds = %35
%39 = tail call i64 (...) @simplify_xwing()
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %17
41: ; preds = %38
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
br label %43
43: ; preds = %17, %9, %41
%44 = tail call i32 (...) @print_sudoku()
br label %45
45: ; preds = %43, %12
%46 = phi i32 [ -1, %12 ], [ 0, %43 ]
ret i32 %46
}