#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*/ ft_check_sudoku(int **, int /*<<< orphan*/, int);
int /*<<< orphan*/ ft_copy(int **, int **);
scalar_t__ ft_diff(int **, int **);
scalar_t__ ft_error(int, char **);
int /*<<< orphan*/ ft_initial(char **, int **);
int ft_print_error();
int /*<<< orphan*/ ft_print_sudoku(int **);
int main(int argc, char **argv) {
  int sudoku[9][9];
  int copy[9][9];
  int i;
  if (ft_error(argc, argv) == 0)
    return (0);
  i = 1;
  while (i <= 9) {
    ft_initial(argv, sudoku);
    ft_check_sudoku(sudoku, 0, i);
    if (i == 2)
      ft_copy(sudoku, copy);
    else if (ft_diff(sudoku, copy) == 0 && i > 2)
      return (ft_print_error());
    i++;
  }
  ft_print_sudoku(sudoku);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <ft_error@plt>
cmp    $0x0,%rax
jne    11ab <main+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1270 <main+0x100>
movl   $0x1,-0x2b4(%rbp)
cmpl   $0x9,-0x2b4(%rbp)
jg     125d <main+0xed>
mov    -0x10(%rbp),%rdi
lea    -0x160(%rbp),%rsi
call   1090 <ft_initial@plt>
lea    -0x160(%rbp),%rdi
mov    -0x2b4(%rbp),%edx
xor    %esi,%esi
call   1030 <ft_check_sudoku@plt>
cmpl   $0x2,-0x2b4(%rbp)
jne    120b <main+0x9b>
lea    -0x160(%rbp),%rdi
lea    -0x2b0(%rbp),%rsi
call   1050 <ft_copy@plt>
jmp    1249 <main+0xd9>
lea    -0x160(%rbp),%rdi
lea    -0x2b0(%rbp),%rsi
call   1040 <ft_diff@plt>
cmp    $0x0,%rax
jne    1244 <main+0xd4>
cmpl   $0x2,-0x2b4(%rbp)
jle    1244 <main+0xd4>
mov    $0x0,%al
call   1060 <ft_print_error@plt>
mov    %eax,-0x4(%rbp)
jmp    1270 <main+0x100>
jmp    1249 <main+0xd9>
mov    -0x2b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2b4(%rbp)
jmp    11b5 <main+0x45>
lea    -0x160(%rbp),%rdi
call   1070 <ft_print_sudoku@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x298,%rsp
mov    %rsi,%r14
call   1080 <ft_error@plt>
test   %rax,%rax
je     11ef <main+0x7f>
mov    $0x1,%ebp
mov    %rsp,%rbx
lea    0x150(%rsp),%r15
jmp    11ad <main+0x3d>
nopl   0x0(%rax)
call   1050 <ft_copy@plt>
add    $0x1,%ebp
cmp    $0xa,%ebp
je     11e7 <main+0x77>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1090 <ft_initial@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <ft_check_sudoku@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
cmp    $0x2,%ebp
je     11a0 <main+0x30>
call   1040 <ft_diff@plt>
test   %rax,%rax
jne    11a5 <main+0x35>
cmp    $0x3,%ebp
jb     11a5 <main+0x35>
xor    %eax,%eax
call   1060 <ft_print_error@plt>
jmp    11f1 <main+0x81>
mov    %rsp,%rdi
call   1070 <ft_print_sudoku@plt>
xor    %eax,%eax
add    $0x298,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x [9 x i32]]
%7 = alloca [9 x [9 x i32]]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i64 @ft_error(i32 %9, i8** %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %55
14: ; preds = %2
store i32 1, i32* %8
br label %15
15: ; preds = %48, %14
%16 = load i32, i32* %8
%17 = icmp sle i32 %16, 9
br i1 %17, label %18, label %51
18: ; preds = %15
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%21 = bitcast [9 x i32]* %20 to i32**
%22 = call i32 @ft_initial(i8** %19, i32** %21)
%23 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%24 = bitcast [9 x i32]* %23 to i32**
%25 = load i32, i32* %8
%26 = call i32 @ft_check_sudoku(i32** %24, i32 0, i32 %25)
%27 = load i32, i32* %8
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %35
29: ; preds = %18
%30 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%31 = bitcast [9 x i32]* %30 to i32**
%32 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %7, i64 0, i64 0
%33 = bitcast [9 x i32]* %32 to i32**
%34 = call i32 @ft_copy(i32** %31, i32** %33)
br label %48
35: ; preds = %18
%36 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%37 = bitcast [9 x i32]* %36 to i32**
%38 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %7, i64 0, i64 0
%39 = bitcast [9 x i32]* %38 to i32**
%40 = call i64 @ft_diff(i32** %37, i32** %39)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %47
42: ; preds = %35
%43 = load i32, i32* %8
%44 = icmp sgt i32 %43, 2
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = call i32 (...) @ft_print_error()
store i32 %46, i32* %3
br label %55
47: ; preds = %42, %35
br label %48
48: ; preds = %47, %29
%49 = load i32, i32* %8
%50 = add nsw i32 %49, 1
store i32 %50, i32* %8
br label %15
51: ; preds = %15
%52 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %6, i64 0, i64 0
%53 = bitcast [9 x i32]* %52 to i32**
%54 = call i32 @ft_print_sudoku(i32** %53)
store i32 0, i32* %3
br label %55
55: ; preds = %51, %45, %13
%56 = load i32, i32* %3
ret i32 %56
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [9 x [9 x i32]]
%4 = alloca [9 x [9 x i32]]
%5 = bitcast [9 x [9 x i32]]* %3 to i8*
%6 = bitcast [9 x [9 x i32]]* %4 to i8*
%7 = tail call i64 @ft_error(i32 %0, i8** %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %31, label %9
9: ; preds = %2
%10 = bitcast [9 x [9 x i32]]* %3 to i32**
%11 = bitcast [9 x [9 x i32]]* %4 to i32**
br label %12
12: ; preds = %9, %26
%13 = phi i32 [ 1, %9 ], [ %27, %26 ]
%14 = call i32 @ft_initial(i8** %1, i32** %10)
%15 = call i32 @ft_check_sudoku(i32** %10, i32 0, i32 %13)
%16 = icmp eq i32 %13, 2
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = call i32 @ft_copy(i32** %10, i32** %11)
br label %26
19: ; preds = %12
%20 = call i64 @ft_diff(i32** %10, i32** %11)
%21 = icmp eq i64 %20, 0
%22 = icmp ugt i32 %13, 2
%23 = select i1 %21, i1 %22, i1 false
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = call i32 (...) @ft_print_error()
br label %31
26: ; preds = %19, %17
%27 = add nuw nsw i32 %13, 1
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %12
29: ; preds = %26
%30 = call i32 @ft_print_sudoku(i32** %10)
br label %31
31: ; preds = %2, %29, %24
%32 = phi i32 [ %25, %24 ], [ 0, %29 ], [ 0, %2 ]
ret i32 %32
}