#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*/ affichage(int **);
int /*<<< orphan*/ estValide(int **, int /*<<< orphan*/);
int sprintf(char *, char *, int);
int /*<<< orphan*/ writeThat(char *);
int main(int argc, char **argv) {
  int otherGrid[9][9];
  if (argc != 10) {
    writeThat("Need more parameters!\n");
  } else {
    int argX = 0;
    int argY = 0;
    int argcX2 = argc * 2;
    for (argX = 0; argX < argc; argX++) {
      for (argY = 0; argY < (argc); argY++) {
        if ((int)argY % 2 == 0) {
          char stuffToWrite[4];
          int formatedStuff;
          formatedStuff = sprintf(stuffToWrite, "%d", (int)argY);
        } else {
        }
      }
    }
  }
  writeThat("\n\n");
  int grille[9][9] = {{9, 0, 0, 1, 0, 0, 0, 0, 5}, {0, 0, 5, 0, 9, 0, 2, 0, 1},
                      {8, 0, 0, 0, 4, 0, 0, 0, 0}, {0, 0, 0, 0, 8, 0, 0, 0, 0},
                      {0, 0, 0, 7, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 2, 6, 0, 0, 9},
                      {2, 0, 0, 3, 0, 0, 0, 0, 6}, {0, 0, 0, 2, 0, 0, 9, 0, 0},
                      {0, 0, 1, 9, 0, 4, 5, 7, 0}};
  writeThat("Grille avant\n");
  affichage(grille);
  estValide(grille, 0);
  writeThat("Grille apres\n");
  affichage(grille);
  writeThat("Like it ? Loving it! \n");
}


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)
cmpl   $0xa,-0x8(%rbp)
je     1184 <main+0x34>
lea    0xe86(%rip),%rdi
call   1040 <writeThat@plt>
jmp    124d <main+0xfd>
movl   $0x0,-0x164(%rbp)
movl   $0x0,-0x168(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x16c(%rbp)
movl   $0x0,-0x164(%rbp)
mov    -0x164(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1248 <main+0xf8>
movl   $0x0,-0x168(%rbp)
mov    -0x168(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    122f <main+0xdf>
mov    -0x168(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1211 <main+0xc1>
lea    -0x170(%rbp),%rdi
mov    -0x168(%rbp),%edx
lea    0xe16(%rip),%rsi
call   1060 <sprintf@plt>
mov    %eax,-0x174(%rbp)
jmp    1216 <main+0xc6>
jmp    1216 <main+0xc6>
jmp    121b <main+0xcb>
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    11c7 <main+0x77>
jmp    1234 <main+0xe4>
mov    -0x164(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x164(%rbp)
jmp    11ae <main+0x5e>
jmp    124d <main+0xfd>
lea    0xdc6(%rip),%rdi
call   1040 <writeThat@plt>
lea    -0x2c0(%rbp),%rdi
lea    0xde9(%rip),%rsi
mov    $0x144,%edx
call   1030 <memcpy@plt>
lea    0xda5(%rip),%rdi
call   1040 <writeThat@plt>
lea    -0x2c0(%rbp),%rdi
call   1050 <affichage@plt>
lea    -0x2c0(%rbp),%rdi
xor    %esi,%esi
call   1070 <estValide@plt>
lea    0xd8d(%rip),%rdi
call   1040 <writeThat@plt>
lea    -0x2c0(%rbp),%rdi
call   1050 <affichage@plt>
lea    0xd83(%rip),%rdi
call   1040 <writeThat@plt>
mov    -0x4(%rbp),%eax
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x150,%rsp
cmp    $0xa,%edi
jne    11c4 <main+0x74>
mov    $0xa,%ebp
lea    0xeab(%rip),%r14
mov    %rsp,%rbx
nop
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x6,%edx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1060 <sprintf@plt>
add    $0xffffffff,%ebp
jne    1170 <main+0x20>
jmp    11d0 <main+0x80>
lea    0xe35(%rip),%rdi
call   1040 <writeThat@plt>
lea    0xe43(%rip),%rdi
call   1040 <writeThat@plt>
lea    0xe6d(%rip),%rsi
mov    %rsp,%rbx
mov    $0x144,%edx
mov    %rbx,%rdi
call   1030 <memcpy@plt>
lea    0xe23(%rip),%rdi
call   1040 <writeThat@plt>
mov    %rbx,%rdi
call   1050 <affichage@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1070 <estValide@plt>
lea    0xe13(%rip),%rdi
call   1040 <writeThat@plt>
mov    %rbx,%rdi
call   1050 <affichage@plt>
lea    0xe0d(%rip),%rdi
call   1040 <writeThat@plt>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Need more parameters!\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@__const.main.grille = [9 x [9 x i32]] [[9 x i32] [i32 9, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 5], [9 x i32] [i32 0, i32 0, i32 5, i32 0, i32 9, i32 0, i32 2, i32 0, i32 1], [9 x i32] [i32 8, i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 0, i32 2, i32 6, i32 0, i32 0, i32 9], [9 x i32] [i32 2, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 6], [9 x i32] [i32 0, i32 0, i32 0, i32 2, i32 0, i32 0, i32 9, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 1, i32 9, i32 0, i32 4, i32 5, i32 7, i32 0]]
@.str.3 = [14 x i8] c"Grille avant\0A\00"
@.str.4 = [14 x i8] c"Grille apres\0A\00"
@.str.5 = [23 x i8] c"Like it ? Loving it! \0A\00"
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 i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [4 x i8]
%11 = alloca i32
%12 = alloca [9 x [9 x i32]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 10
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 @writeThat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %47
17: ; preds = %2
store i32 0, i32* %7
store i32 0, i32* %8
%18 = load i32, i32* %4
%19 = mul nsw i32 %18, 2
store i32 %19, i32* %9
store i32 0, i32* %7
br label %20
20: ; preds = %43, %17
%21 = load i32, i32* %7
%22 = load i32, i32* %4
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %46
24: ; preds = %20
store i32 0, i32* %8
br label %25
25: ; preds = %39, %24
%26 = load i32, i32* %8
%27 = load i32, i32* %4
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %42
29: ; preds = %25
%30 = load i32, i32* %8
%31 = srem i32 %30, 2
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %37
33: ; preds = %29
%34 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%35 = load i32, i32* %8
%36 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %35)
store i32 %36, i32* %11
br label %38
37: ; preds = %29
br label %38
38: ; preds = %37, %33
br label %39
39: ; preds = %38
%40 = load i32, i32* %8
%41 = add nsw i32 %40, 1
store i32 %41, i32* %8
br label %25
42: ; preds = %25
br label %43
43: ; preds = %42
%44 = load i32, i32* %7
%45 = add nsw i32 %44, 1
store i32 %45, i32* %7
br label %20
46: ; preds = %20
br label %47
47: ; preds = %46, %15
%48 = call i32 @writeThat(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%49 = bitcast [9 x [9 x i32]]* %12 to i8*
%50 = call i32 @writeThat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%51 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %12, i64 0, i64 0
%52 = bitcast [9 x i32]* %51 to i32**
%53 = call i32 @affichage(i32** %52)
%54 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %12, i64 0, i64 0
%55 = bitcast [9 x i32]* %54 to i32**
%56 = call i32 @estValide(i32** %55, i32 0)
%57 = call i32 @writeThat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%58 = getelementptr inbounds [9 x [9 x i32]], [9 x [9 x i32]]* %12, i64 0, i64 0
%59 = bitcast [9 x i32]* %58 to i32**
%60 = call i32 @affichage(i32** %59)
%61 = call i32 @writeThat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%62 = load i32, i32* %3
ret i32 %62
}

LLVM IR (-O2):
@.str = [23 x i8] c"Need more parameters!\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@__const.main.grille = [9 x [9 x i32]] [[9 x i32] [i32 9, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 5], [9 x i32] [i32 0, i32 0, i32 5, i32 0, i32 9, i32 0, i32 2, i32 0, i32 1], [9 x i32] [i32 8, i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 7, i32 0, i32 0, i32 0, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 0, i32 0, i32 2, i32 6, i32 0, i32 0, i32 9], [9 x i32] [i32 2, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 6], [9 x i32] [i32 0, i32 0, i32 0, i32 2, i32 0, i32 0, i32 9, i32 0, i32 0], [9 x i32] [i32 0, i32 0, i32 1, i32 9, i32 0, i32 4, i32 5, i32 7, i32 0]]
@.str.3 = [14 x i8] c"Grille avant\0A\00"
@.str.4 = [14 x i8] c"Grille apres\0A\00"
@.str.5 = [23 x i8] c"Like it ? Loving it! \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8]
%4 = alloca [9 x [9 x i32]]
%5 = icmp eq i32 %0, 10
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
br label %10
8: ; preds = %2
%9 = tail call i32 @writeThat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %19
10: ; preds = %10, %6
%11 = phi i32 [ 0, %6 ], [ %17, %10 ]
%12 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 0)
%13 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%14 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 4)
%15 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 6)
%16 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 8)
%17 = add nuw nsw i32 %11, 1
%18 = icmp eq i32 %17, 10
br i1 %18, label %19, label %10
19: ; preds = %10, %8
%20 = tail call i32 @writeThat(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = bitcast [9 x [9 x i32]]* %4 to i8*
%22 = tail call i32 @writeThat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%23 = bitcast [9 x [9 x i32]]* %4 to i32**
%24 = call i32 @affichage(i32** %23)
%25 = call i32 @estValide(i32** %23, i32 0)
%26 = call i32 @writeThat(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%27 = call i32 @affichage(i32** %23)
%28 = call i32 @writeThat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}