#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*/ access();
int /*<<< orphan*/ clear();
scalar_t__ counter();
int min();
int /*<<< orphan*/ print();
int /*<<< orphan*/ printf(char *);
int rand();
int /*<<< orphan*/ setBoard(int, int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char const *argv[]) {
  int x, y, m, i, count = 0;
  srand(time(NULL));
  while (count != 7) {
    clear();
    setBoard(rand() % 8, rand() % 8);
    count = 0;
    while (counter() != 0) {
      access();
      m = min();
      setBoard(m / 10, m % 10);
      count++;
    }
  }
  print();
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
cmpl   $0x7,-0x24(%rbp)
je     1264 <main+0xc4>
mov    $0x0,%al
call   10b0 <clear@plt>
mov    $0x0,%al
call   10c0 <rand@plt>
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    $0x0,%al
call   10c0 <rand@plt>
mov    -0x28(%rbp),%edi
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   1070 <setBoard@plt>
movl   $0x0,-0x24(%rbp)
mov    $0x0,%al
call   1090 <counter@plt>
cmp    $0x0,%rax
je     125f <main+0xbf>
mov    $0x0,%al
call   10a0 <access@plt>
mov    $0x0,%al
call   1040 <min@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x1c(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
call   1070 <setBoard@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1210 <main+0x70>
jmp    11cd <main+0x2d>
mov    $0x0,%al
call   1050 <print@plt>
lea    0xd8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
jmp    11c9 <main+0x29>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x7,%ebx
je     1266 <main+0xc6>
xor    %eax,%eax
call   10b0 <clear@plt>
xor    %eax,%eax
call   10c0 <rand@plt>
mov    %eax,%ebx
lea    0x7(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xfffffff8,%eax
sub    %eax,%ebx
xor    %eax,%eax
call   10c0 <rand@plt>
lea    0x7(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%eax
mov    %ebx,%edi
mov    %eax,%esi
call   1070 <setBoard@plt>
xor    %eax,%eax
call   1090 <counter@plt>
mov    $0x0,%ebx
test   %rax,%rax
je     11c0 <main+0x20>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   10a0 <access@plt>
xor    %eax,%eax
call   1040 <min@plt>
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x22,%rdi
add    %eax,%edi
lea    (%rdi,%rdi,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
call   1070 <setBoard@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1090 <counter@plt>
test   %rax,%rax
jne    1220 <main+0x80>
jmp    11c0 <main+0x20>
xor    %eax,%eax
call   1050 <print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\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 i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
%11 = call i32 @time(i32* null)
%12 = call i32 @srand(i32 %11)
br label %13
13: ; preds = %36, %2
%14 = load i32, i32* %10
%15 = icmp ne i32 %14, 7
br i1 %15, label %16, label %37
16: ; preds = %13
%17 = call i32 (...) @clear()
%18 = call i32 (...) @rand()
%19 = srem i32 %18, 8
%20 = call i32 (...) @rand()
%21 = srem i32 %20, 8
%22 = call i32 @setBoard(i32 %19, i32 %21)
store i32 0, i32* %10
br label %23
23: ; preds = %26, %16
%24 = call i64 (...) @counter()
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %36
26: ; preds = %23
%27 = call i32 (...) @access()
%28 = call i32 (...) @min()
store i32 %28, i32* %8
%29 = load i32, i32* %8
%30 = sdiv i32 %29, 10
%31 = load i32, i32* %8
%32 = srem i32 %31, 10
%33 = call i32 @setBoard(i32 %30, i32 %32)
%34 = load i32, i32* %10
%35 = add nsw i32 %34, 1
store i32 %35, i32* %10
br label %23
36: ; preds = %23
br label %13
37: ; preds = %13
%38 = call i32 (...) @print()
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
br label %8
5: ; preds = %17, %8
%6 = phi i32 [ 0, %8 ], [ %24, %17 ]
%7 = icmp eq i32 %6, 7
br i1 %7, label %27, label %8
8: ; preds = %2, %5
%9 = tail call i32 (...) @clear()
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 8
%12 = tail call i32 (...) @rand()
%13 = srem i32 %12, 8
%14 = tail call i32 @setBoard(i32 %11, i32 %13)
%15 = tail call i64 (...) @counter()
%16 = icmp eq i64 %15, 0
br i1 %16, label %5, label %17
17: ; preds = %8, %17
%18 = phi i32 [ %24, %17 ], [ 0, %8 ]
%19 = tail call i32 (...) @access()
%20 = tail call i32 (...) @min()
%21 = sdiv i32 %20, 10
%22 = srem i32 %20, 10
%23 = tail call i32 @setBoard(i32 %21, i32 %22)
%24 = add nuw nsw i32 %18, 1
%25 = tail call i64 (...) @counter()
%26 = icmp eq i64 %25, 0
br i1 %26, label %5, label %17
27: ; preds = %5
%28 = tail call i32 (...) @print()
%29 = tail call i32 @putchar(i32 10)
ret i32 0
}