#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*/ DisplayBoard(int **);
int atoi(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setBoard(int **, int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  int number;
  int row;
  int col;
  int guess;
  int board[10][10];
  srand(time(NULL));
  if (argv[1] == NULL) {
    printf("Error:Please Enter Number");
    return 0;
  }
  number = atoi(argv[1]);
  setBoard(board, number);
  DisplayBoard(board);
  printf("Enter a row :");
  scanf("%d", &row);
  printf("Enter a Col:");
  scanf("%d", &col);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    -0x10(%rbp),%rax
cmpq   $0x0,0x8(%rax)
jne    11c0 <main+0x50>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    122a <main+0xba>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1090 <atoi@plt>
mov    %eax,-0x14(%rbp)
lea    -0x1b0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <setBoard@plt>
lea    -0x1b0(%rbp),%rdi
call   1060 <DisplayBoard@plt>
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
lea    0xe2a(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1080 <scanf@plt>
lea    0xe1d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0e(%rip),%rdi
lea    -0x1c(%rbp),%rsi
call   1080 <scanf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1a0,%rsp
mov    %rsi,%rbx
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    0x8(%rbx),%rdi
test   %rdi,%rdi
je     11e9 <main+0x79>
call   1090 <atoi@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <setBoard@plt>
mov    %rbx,%rdi
call   1060 <DisplayBoard@plt>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
lea    0xe67(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <scanf@plt>
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <scanf@plt>
jmp    11f5 <main+0x85>
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Error:Please Enter Number\00"
@.str.1 = [14 x i8] c"Enter a row :\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [13 x i8] c"Enter a Col:\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [10 x [10 x i32]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i32 @time(i32* null)
%12 = call i32 @srand(i32 %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %35
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @atoi(i8* %22)
store i32 %23, i32* %6
%24 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %10, i64 0, i64 0
%25 = bitcast [10 x i32]* %24 to i32**
%26 = load i32, i32* %6
%27 = call i32 @setBoard(i32** %25, i32 %26)
%28 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %10, i64 0, i64 0
%29 = bitcast [10 x i32]* %28 to i32**
%30 = call i32 @DisplayBoard(i32** %29)
%31 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%33 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %8)
store i32 0, i32* %3
br label %35
35: ; preds = %19, %17
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
@.str = [26 x i8] c"Error:Please Enter Number\00"
@.str.1 = [14 x i8] c"Enter a row :\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [13 x i8] c"Enter a Col:\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x [10 x i32]]
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast [10 x [10 x i32]]* %5 to i8*
%9 = tail call i32 @time(i32* null)
%10 = tail call i32 @srand(i32 %9)
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %25
16: ; preds = %2
%17 = tail call i32 @atoi(i8* %12)
%18 = bitcast [10 x [10 x i32]]* %5 to i32**
%19 = call i32 @setBoard(i32** %18, i32 %17)
%20 = call i32 @DisplayBoard(i32** %18)
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%23 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
br label %25
25: ; preds = %16, %14
ret i32 0
}