#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*/ arg_ok(int, char **);
int /*<<< orphan*/ base_ok(int **);
int **ft_extract(char **);
int /*<<< orphan*/ ft_printsudoku(int **);
int /*<<< orphan*/ ft_putstr(char *);
scalar_t__ ft_resolve(int **, int /*<<< orphan*/);
scalar_t__ malloc(int);
int main(int ac, char **av) {
  int i;
  int **tab;
  if (!arg_ok(ac, av))
    return (0);
  i = 0;
  tab = (int **)malloc(sizeof(int **) * 9);
  while (i < 9)
    tab[i++] = (int *)malloc(sizeof(int *) * 9);
  tab = ft_extract(av + 1);
  if (!base_ok(tab))
    return (0);
  if (ft_resolve(tab, 0))
    ft_printsudoku(tab);
  else
    ft_putstr("Erreur\n");
  return (0);
}


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <arg_ok@plt>
cmp    $0x0,%eax
jne    11a7 <main+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1253 <main+0xe3>
movl   $0x0,-0x14(%rbp)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x9,-0x14(%rbp)
jge    11ee <main+0x7e>
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x14(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    11bc <main+0x4c>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
call   1030 <ft_extract@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <base_ok@plt>
cmp    $0x0,%eax
jne    121d <main+0xad>
movl   $0x0,-0x4(%rbp)
jmp    1253 <main+0xe3>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   1040 <ft_resolve@plt>
cmp    $0x0,%rax
je     1240 <main+0xd0>
mov    -0x20(%rbp),%rdi
call   1050 <ft_printsudoku@plt>
jmp    124c <main+0xdc>
lea    0xdb9(%rip),%rdi
call   1080 <ft_putstr@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1090 <arg_ok@plt>
test   %eax,%eax
je     124e <main+0xde>
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x8(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x18(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x20(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x28(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x30(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x38(%rbx)
mov    $0x48,%edi
call   1070 <malloc@plt>
mov    %rax,0x40(%rbx)
add    $0x8,%r14
mov    %r14,%rdi
call   1030 <ft_extract@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <base_ok@plt>
test   %eax,%eax
je     124e <main+0xde>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <ft_resolve@plt>
test   %rax,%rax
je     1242 <main+0xd2>
mov    %rbx,%rdi
call   1050 <ft_printsudoku@plt>
jmp    124e <main+0xde>
lea    0xdb7(%rip),%rdi
call   1080 <ft_putstr@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Erreur\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @arg_ok(i32 %8, i8** %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 0, i32* %3
br label %45
13: ; preds = %2
store i32 0, i32* %6
%14 = call i64 @malloc(i32 72)
%15 = inttoptr i64 %14 to i32**
store i32** %15, i32*** %7
br label %16
16: ; preds = %19, %13
%17 = load i32, i32* %6
%18 = icmp slt i32 %17, 9
br i1 %18, label %19, label %27
19: ; preds = %16
%20 = call i64 @malloc(i32 72)
%21 = inttoptr i64 %20 to i32*
%22 = load i32**, i32*** %7
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds i32*, i32** %22, i64 %25
store i32* %21, i32** %26
br label %16
27: ; preds = %16
%28 = load i8**, i8*** %5
%29 = getelementptr inbounds i8*, i8** %28, i64 1
%30 = call i32** @ft_extract(i8** %29)
store i32** %30, i32*** %7
%31 = load i32**, i32*** %7
%32 = call i32 @base_ok(i32** %31)
%33 = icmp ne i32 %32, 0
br i1 %33, label %35, label %34
34: ; preds = %27
store i32 0, i32* %3
br label %45
35: ; preds = %27
%36 = load i32**, i32*** %7
%37 = call i64 @ft_resolve(i32** %36, i32 0)
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %35
%40 = load i32**, i32*** %7
%41 = call i32 @ft_printsudoku(i32** %40)
br label %44
42: ; preds = %35
%43 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %44
44: ; preds = %42, %39
store i32 0, i32* %3
br label %45
45: ; preds = %44, %34, %12
%46 = load i32, i32* %3
ret i32 %46
}

LLVM IR (-O2):
@.str = [8 x i8] c"Erreur\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @arg_ok(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %45, label %5
5: ; preds = %2
%6 = tail call i64 @malloc(i32 72)
%7 = inttoptr i64 %6 to i32**
%8 = tail call i64 @malloc(i32 72)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %7
%10 = tail call i64 @malloc(i32 72)
%11 = inttoptr i64 %10 to i32*
%12 = getelementptr inbounds i32*, i32** %7, i64 1
store i32* %11, i32** %12
%13 = tail call i64 @malloc(i32 72)
%14 = inttoptr i64 %13 to i32*
%15 = getelementptr inbounds i32*, i32** %7, i64 2
store i32* %14, i32** %15
%16 = tail call i64 @malloc(i32 72)
%17 = inttoptr i64 %16 to i32*
%18 = getelementptr inbounds i32*, i32** %7, i64 3
store i32* %17, i32** %18
%19 = tail call i64 @malloc(i32 72)
%20 = inttoptr i64 %19 to i32*
%21 = getelementptr inbounds i32*, i32** %7, i64 4
store i32* %20, i32** %21
%22 = tail call i64 @malloc(i32 72)
%23 = inttoptr i64 %22 to i32*
%24 = getelementptr inbounds i32*, i32** %7, i64 5
store i32* %23, i32** %24
%25 = tail call i64 @malloc(i32 72)
%26 = inttoptr i64 %25 to i32*
%27 = getelementptr inbounds i32*, i32** %7, i64 6
store i32* %26, i32** %27
%28 = tail call i64 @malloc(i32 72)
%29 = inttoptr i64 %28 to i32*
%30 = getelementptr inbounds i32*, i32** %7, i64 7
store i32* %29, i32** %30
%31 = tail call i64 @malloc(i32 72)
%32 = inttoptr i64 %31 to i32*
%33 = getelementptr inbounds i32*, i32** %7, i64 8
store i32* %32, i32** %33
%34 = getelementptr inbounds i8*, i8** %1, i64 1
%35 = tail call i32** @ft_extract(i8** %34)
%36 = tail call i32 @base_ok(i32** %35)
%37 = icmp eq i32 %36, 0
br i1 %37, label %45, label %38
38: ; preds = %5
%39 = tail call i64 @ft_resolve(i32** %35, i32 0)
%40 = icmp eq i64 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = tail call i32 @ft_printsudoku(i32** %35)
br label %45
43: ; preds = %38
%44 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %45
45: ; preds = %41, %43, %5, %2
ret i32 0
}