#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int i = 0;
  scanf("%d", &i);
  printf("%d\n", i);
  char va[i];
  for (int j = 0; j < i; j++)
    va[j] = j;
  for (int j = 0; j < i; j++)
    printf("%d ", va[j]);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ae <main+0x8e>
mov    -0x28(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %cl,%dl
movslq -0x1c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1184 <main+0x64>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e9 <main+0xc9>
mov    -0x28(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b5 <main+0x95>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0x0,-0x24(%rbp)
lea    0xf43(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x24(%rbp),%esi
lea    0xf33(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%r14
mov    -0x24(%rbp),%eax
mov    %rsp,%r12
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    -0x24(%rbp),%eax
test   %eax,%eax
jle    133c <main+0x20c>
cmp    $0x20,%eax
jae    1195 <main+0x65>
xor    %ecx,%ecx
jmp    1300 <main+0x1d0>
mov    %eax,%ecx
and    $0xffffffe0,%ecx
lea    -0x20(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x5,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0x60,%rdi
jae    11c3 <main+0x93>
movdqa 0xe44(%rip),%xmm0
xor    %edi,%edi
jmp    12a0 <main+0x170>
and    $0xfffffffffffffffc,%rsi
movdqa 0xe31(%rip),%xmm0
xor    %edi,%edi
movdqa 0xe36(%rip),%xmm8
movdqa 0xe3d(%rip),%xmm9
movdqa 0xe44(%rip),%xmm10
movdqa 0xe4c(%rip),%xmm4
movdqa 0xe54(%rip),%xmm5
movdqa 0xe5c(%rip),%xmm6
movdqa 0xe64(%rip),%xmm7
movdqa 0xe6c(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm0,%xmm2
paddb  %xmm8,%xmm2
movdqa %xmm0,(%r12,%rdi,1)
movdqa %xmm2,0x10(%r12,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm10,%xmm3
movdqa %xmm2,0x20(%r12,%rdi,1)
movdqa %xmm3,0x30(%r12,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm5,%xmm3
movdqa %xmm2,0x40(%r12,%rdi,1)
movdqa %xmm3,0x50(%r12,%rdi,1)
movdqa %xmm0,%xmm2
paddb  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddb  %xmm7,%xmm3
movdqa %xmm2,0x60(%r12,%rdi,1)
movdqa %xmm3,0x70(%r12,%rdi,1)
sub    $0xffffffffffffff80,%rdi
pxor   %xmm1,%xmm0
add    $0xfffffffffffffffc,%rsi
jne    1220 <main+0xf0>
test   %rdx,%rdx
je     12f0 <main+0x1c0>
lea    (%rdi,%r12,1),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
movdqa 0xd55(%rip),%xmm1
movdqa 0xd5d(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqa %xmm0,%xmm3
paddb  %xmm1,%xmm3
movdqa %xmm0,-0x10(%rsi,%rdi,1)
movdqa %xmm3,(%rsi,%rdi,1)
paddb  %xmm2,%xmm0
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    12d0 <main+0x1a0>
cmp    %rax,%rcx
je     130d <main+0x1dd>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %cl,(%r12,%rcx,1)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1300 <main+0x1d0>
test   %eax,%eax
jle    133c <main+0x20c>
lea    0xd7f(%rip),%r15
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r12,%rbx,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq -0x24(%rbp),%rax
cmp    %rax,%rbx
jl     1320 <main+0x1f0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rsp
xor    %eax,%eax
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = alloca i8, i64 %7
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %86
12: ; preds = %0
%13 = zext i32 %10 to i64
%14 = icmp ult i32 %10, 32
br i1 %14, label %77, label %15
15: ; preds = %12
%16 = and i64 %13, 4294967264
%17 = add nsw i64 %16, -32
%18 = lshr exact i64 %17, 5
%19 = add nuw nsw i64 %18, 1
%20 = and i64 %19, 3
%21 = icmp ult i64 %17, 96
br i1 %21, label %58, label %22
22: ; preds = %15
%23 = and i64 %19, 1152921504606846972
br label %24
24: ; preds = %24, %22
%25 = phi i64 [ 0, %22 ], [ %54, %24 ]
%26 = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %22 ], [ %55, %24 ]
%27 = phi i64 [ 0, %22 ], [ %56, %24 ]
%28 = add <16 x i8> %26, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
%29 = getelementptr inbounds i8, i8* %9, i64 %25
%30 = bitcast i8* %29 to <16 x i8>*
store <16 x i8> %26, <16 x i8>* %30
%31 = getelementptr inbounds i8, i8* %29, i64 16
%32 = bitcast i8* %31 to <16 x i8>*
store <16 x i8> %28, <16 x i8>* %32
%33 = or i64 %25, 32
%34 = add <16 x i8> %26, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%35 = add <16 x i8> %26, <i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48, i8 48>
%36 = getelementptr inbounds i8, i8* %9, i64 %33
%37 = bitcast i8* %36 to <16 x i8>*
store <16 x i8> %34, <16 x i8>* %37
%38 = getelementptr inbounds i8, i8* %36, i64 16
%39 = bitcast i8* %38 to <16 x i8>*
store <16 x i8> %35, <16 x i8>* %39
%40 = or i64 %25, 64
%41 = add <16 x i8> %26, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
%42 = add <16 x i8> %26, <i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80, i8 80>
%43 = getelementptr inbounds i8, i8* %9, i64 %40
%44 = bitcast i8* %43 to <16 x i8>*
store <16 x i8> %41, <16 x i8>* %44
%45 = getelementptr inbounds i8, i8* %43, i64 16
%46 = bitcast i8* %45 to <16 x i8>*
store <16 x i8> %42, <16 x i8>* %46
%47 = or i64 %25, 96
%48 = add <16 x i8> %26, <i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96, i8 96>
%49 = add <16 x i8> %26, <i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112, i8 112>
%50 = getelementptr inbounds i8, i8* %9, i64 %47
%51 = bitcast i8* %50 to <16 x i8>*
store <16 x i8> %48, <16 x i8>* %51
%52 = getelementptr inbounds i8, i8* %50, i64 16
%53 = bitcast i8* %52 to <16 x i8>*
store <16 x i8> %49, <16 x i8>* %53
%54 = add nuw i64 %25, 128
%55 = xor <16 x i8> %26, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>
%56 = add i64 %27, 4
%57 = icmp eq i64 %56, %23
br i1 %57, label %58, label %24
58: ; preds = %24, %15
%59 = phi i64 [ 0, %15 ], [ %54, %24 ]
%60 = phi <16 x i8> [ <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, %15 ], [ %55, %24 ]
%61 = icmp eq i64 %20, 0
br i1 %61, label %75, label %62
62: ; preds = %58, %62
%63 = phi i64 [ %71, %62 ], [ %59, %58 ]
%64 = phi <16 x i8> [ %72, %62 ], [ %60, %58 ]
%65 = phi i64 [ %73, %62 ], [ 0, %58 ]
%66 = add <16 x i8> %64, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
%67 = getelementptr inbounds i8, i8* %9, i64 %63
%68 = bitcast i8* %67 to <16 x i8>*
store <16 x i8> %64, <16 x i8>* %68
%69 = getelementptr inbounds i8, i8* %67, i64 16
%70 = bitcast i8* %69 to <16 x i8>*
store <16 x i8> %66, <16 x i8>* %70
%71 = add nuw i64 %63, 32
%72 = add <16 x i8> %64, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%73 = add i64 %65, 1
%74 = icmp eq i64 %73, %20
br i1 %74, label %75, label %62
75: ; preds = %62, %58
%76 = icmp eq i64 %16, %13
br i1 %76, label %79, label %77
77: ; preds = %12, %75
%78 = phi i64 [ 0, %12 ], [ %16, %75 ]
br label %80
79: ; preds = %80, %75
br i1 %11, label %88, label %86
80: ; preds = %77, %80
%81 = phi i64 [ %84, %80 ], [ %78, %77 ]
%82 = trunc i64 %81 to i8
%83 = getelementptr inbounds i8, i8* %9, i64 %81
store i8 %82, i8* %83
%84 = add nuw nsw i64 %81, 1
%85 = icmp eq i64 %84, %13
br i1 %85, label %79, label %80
86: ; preds = %88, %0, %79
%87 = call i32 @putchar(i32 10)
ret i32 0
88: ; preds = %79, %88
%89 = phi i64 [ %94, %88 ], [ 0, %79 ]
%90 = getelementptr inbounds i8, i8* %9, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %92)
%94 = add nuw nsw i64 %89, 1
%95 = load i32, i32* %1
%96 = sext i32 %95 to i64
%97 = icmp slt i64 %94, %96
br i1 %97, label %88, label %86
}