#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*/ naive_printf(char *, int);
int /*<<< orphan*/ naive_scanf(char *, int *);
int /*<<< orphan*/ solve();
int program_main() {
  int n, i, t;
  naive_scanf("%d", &n);
  for (i = 0; i < n; i++) {
    naive_scanf("%d", &t);
    naive_printf("%d ", i + 1);
    solve();
  }
  return 0;
}


x86 assembly (clang, -O0):
<program_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <naive_scanf@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1192 <program_main+0x62>
lea    0xe9e(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <naive_scanf@plt>
mov    -0x8(%rbp),%esi
add    $0x1,%esi
lea    0xe8b(%rip),%rdi
call   1050 <naive_printf@plt>
mov    $0x0,%al
call   1030 <solve@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114f <program_main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<program_main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xec2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <naive_scanf@plt>
cmpl   $0x0,(%rsp)
jle    1194 <program_main+0x64>
lea    0xead(%rip),%r14
lea    0x4(%rsp),%r15
lea    0xea4(%rip),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <naive_scanf@plt>
add    $0x1,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <naive_printf@plt>
xor    %eax,%eax
call   1030 <solve@plt>
cmp    (%rsp),%ebp
jl     1170 <program_main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d \00"
define i32 @program_main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
store i32 0, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
%13 = call i32 @naive_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 (...) @solve()
br label %15
15: ; preds = %9
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d \00"
define i32 @program_main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %0, %8
%9 = phi i32 [ %11, %8 ], [ 0, %0 ]
%10 = call i32 @naive_scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%11 = add nuw nsw i32 %9, 1
%12 = call i32 @naive_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @solve()
%14 = load i32, i32* %1
%15 = icmp slt i32 %11, %14
br i1 %15, label %8, label %16
16: ; preds = %8, %0
ret i32 0
}