#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*/ Try(int, int *, int *, int *, int *, int *);
int /*<<< orphan*/ printf(char *);
void Doit() {
  int i, q;
  int a[9], b[17], c[15], x[9];
  i = 0 - 7;
  while (i <= 16) {
    if ((i >= 1) && (i <= 8))
      a[i] = 1;
    if (i >= 2)
      b[i] = 1;
    if (i <= 7)
      c[i + 7] = 1;
    i = i + 1;
  }
  Try(1, &q, b, a, c, x);
  if (!q)
    printf(" Error in Queens.\n");
}


x86 assembly (clang, -O0):
<Doit>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0xfffffff9,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jg     119d <Doit+0x7d>
cmpl   $0x1,-0x4(%rbp)
jl     115c <Doit+0x3c>
cmpl   $0x8,-0x4(%rbp)
jg     115c <Doit+0x3c>
movslq -0x4(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
cmpl   $0x2,-0x4(%rbp)
jl     1172 <Doit+0x52>
movslq -0x4(%rbp),%rax
movl   $0x1,-0x80(%rbp,%rax,4)
cmpl   $0x7,-0x4(%rbp)
jg     118f <Doit+0x6f>
mov    -0x4(%rbp),%eax
add    $0x7,%eax
cltq
movl   $0x1,-0xc0(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <Doit+0x12>
lea    -0x80(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0xc0(%rbp),%r8
lea    -0xf0(%rbp),%r9
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
call   1040 <Try@plt>
cmpl   $0x0,-0x8(%rbp)
jne    11d7 <Doit+0xb7>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Doit>:
sub    $0xf8,%rsp
xor    %eax,%eax
jmp    1142 <Doit+0x22>
nopl   0x0(%rax,%rax,1)
movl   $0x1,0x40(%rsp,%rax,4)
add    $0x1,%rax
cmp    $0x18,%rax
je     1173 <Doit+0x53>
lea    -0x7(%rax),%rcx
lea    -0x8(%rax),%edx
cmp    $0x7,%edx
ja     1158 <Doit+0x38>
mov    %ecx,%edx
movl   $0x1,0x10(%rsp,%rdx,4)
cmp    $0x2,%rcx
jl     1130 <Doit+0x10>
mov    %ecx,%edx
movl   $0x1,0x80(%rsp,%rdx,4)
cmp    $0x7,%rcx
jbe    1130 <Doit+0x10>
jmp    1138 <Doit+0x18>
lea    0xc(%rsp),%rsi
lea    0x80(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x40(%rsp),%r8
lea    0xd0(%rsp),%r9
mov    $0x1,%edi
call   1040 <Try@plt>
cmpl   $0x0,0xc(%rsp)
je     11ab <Doit+0x8b>
add    $0xf8,%rsp
ret
lea    0xe4e(%rip),%rdi
call   1030 <puts@plt>
add    $0xf8,%rsp
ret

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

LLVM IR (-O2):
@str = [18 x i8] c" Error in Queens.\00"
define void @Doit() {
%1 = alloca i32
%2 = alloca [9 x i32]
%3 = alloca [17 x i32]
%4 = alloca [15 x i32]
%5 = alloca [9 x i32]
%6 = bitcast i32* %1 to i8*
%7 = bitcast [9 x i32]* %2 to i8*
%8 = bitcast [17 x i32]* %3 to i8*
%9 = bitcast [15 x i32]* %4 to i8*
%10 = bitcast [9 x i32]* %5 to i8*
br label %11
11: ; preds = %0, %28
%12 = phi i64 [ -7, %0 ], [ %29, %28 ]
%13 = trunc i64 %12 to i32
%14 = add i32 %13, -1
%15 = icmp ult i32 %14, 8
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = and i64 %12, 4294967295
%18 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 %17
store i32 1, i32* %18
br label %19
19: ; preds = %16, %11
%20 = icmp sgt i64 %12, 1
br i1 %20, label %21, label %25
21: ; preds = %19
%22 = and i64 %12, 4294967295
%23 = getelementptr inbounds [17 x i32], [17 x i32]* %3, i64 0, i64 %22
store i32 1, i32* %23
%24 = icmp ult i64 %12, 8
br i1 %24, label %25, label %28
25: ; preds = %19, %21
%26 = add nsw i64 %12, 7
%27 = getelementptr inbounds [15 x i32], [15 x i32]* %4, i64 0, i64 %26
store i32 1, i32* %27
br label %28
28: ; preds = %25, %21
%29 = add nsw i64 %12, 1
%30 = icmp eq i64 %29, 17
br i1 %30, label %31, label %11
31: ; preds = %28
%32 = getelementptr inbounds [17 x i32], [17 x i32]* %3, i64 0, i64 0
%33 = getelementptr inbounds [9 x i32], [9 x i32]* %2, i64 0, i64 0
%34 = getelementptr inbounds [15 x i32], [15 x i32]* %4, i64 0, i64 0
%35 = getelementptr inbounds [9 x i32], [9 x i32]* %5, i64 0, i64 0
%36 = call i32 @Try(i32 1, i32* %1, i32* %32, i32* %33, i32* %34, i32* %35)
%37 = load i32, i32* %1
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %31
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %41
41: ; preds = %39, %31
ret void
}