#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*/ clear();
int /*<<< orphan*/ print();
int /*<<< orphan*/ printf(char *);
int queenDigui();
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;
    count = queenDigui();
  }
  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     11ff <main+0x7f>
mov    $0x0,%al
call   1090 <clear@plt>
mov    $0x0,%al
call   10a0 <rand@plt>
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    $0x0,%al
call   10a0 <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   1040 <queenDigui@plt>
mov    %eax,-0x24(%rbp)
jmp    11ad <main+0x2d>
mov    $0x0,%al
call   1050 <print@plt>
lea    0xdf3(%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>
nop
xor    %eax,%eax
call   1090 <clear@plt>
xor    %eax,%eax
call   10a0 <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   10a0 <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   1040 <queenDigui@plt>
cmp    $0x7,%eax
jne    1190 <main+0x10>
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 = %16, %2
%14 = load i32, i32* %10
%15 = icmp ne i32 %14, 7
br i1 %15, label %16, label %24
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
%23 = call i32 (...) @queenDigui()
store i32 %23, i32* %10
br label %13
24: ; preds = %13
%25 = call i32 (...) @print()
%26 = 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 %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @clear()
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 8
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 8
%11 = tail call i32 @setBoard(i32 %8, i32 %10)
%12 = tail call i32 (...) @queenDigui()
%13 = icmp eq i32 %12, 7
br i1 %13, label %14, label %5
14: ; preds = %5
%15 = tail call i32 (...) @print()
%16 = tail call i32 @putchar(i32 10)
ret i32 0
}