#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 *);
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,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jg     119d <Doit+0x7d>
cmpl   $0x1,-0x8(%rbp)
jl     115c <Doit+0x3c>
cmpl   $0x8,-0x8(%rbp)
jg     115c <Doit+0x3c>
movslq -0x8(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
cmpl   $0x2,-0x8(%rbp)
jl     1172 <Doit+0x52>
movslq -0x8(%rbp),%rax
movl   $0x1,-0x80(%rbp,%rax,4)
cmpl   $0x7,-0x8(%rbp)
jg     118f <Doit+0x6f>
mov    -0x8(%rbp),%eax
add    $0x7,%eax
cltq
movl   $0x1,-0xc0(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%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    -0xc(%rbp),%rsi
call   1040 <Try@plt>
cmpl   $0x0,-0xc(%rbp)
jne    11d7 <Doit+0xb7>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
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 i32 @Doit() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [9 x i32]
%5 = alloca [17 x i32]
%6 = alloca [15 x i32]
%7 = alloca [9 x i32]
store i32 -7, i32* %2
br label %8
8: ; preds = %36, %0
%9 = load i32, i32* %2
%10 = icmp sle i32 %9, 16
br i1 %10, label %11, label %39
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sge i32 %12, 1
br i1 %13, label %14, label %21
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 8
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 %19
store i32 1, i32* %20
br label %21
21: ; preds = %17, %14, %11
%22 = load i32, i32* %2
%23 = icmp sge i32 %22, 2
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load i32, i32* %2
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [17 x i32], [17 x i32]* %5, i64 0, i64 %26
store i32 1, i32* %27
br label %28
28: ; preds = %24, %21
%29 = load i32, i32* %2
%30 = icmp sle i32 %29, 7
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [15 x i32], [15 x i32]* %6, i64 0, i64 %34
store i32 1, i32* %35
br label %36
36: ; preds = %31, %28
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %8
39: ; preds = %8
%40 = getelementptr inbounds [17 x i32], [17 x i32]* %5, i64 0, i64 0
%41 = getelementptr inbounds [9 x i32], [9 x i32]* %4, i64 0, i64 0
%42 = getelementptr inbounds [15 x i32], [15 x i32]* %6, i64 0, i64 0
%43 = getelementptr inbounds [9 x i32], [9 x i32]* %7, i64 0, i64 0
%44 = call i32 @Try(i32 1, i32* %3, i32* %40, i32* %41, i32* %42, i32* %43)
%45 = load i32, i32* %3
%46 = icmp ne i32 %45, 0
br i1 %46, label %49, label %47
47: ; preds = %39
%48 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %49
49: ; preds = %47, %39
%50 = load i32, i32* %1
ret i32 %50
}

LLVM IR (-O2):
@str = [18 x i8] c" Error in Queens.\00"
define i32 @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 i32 undef
}