#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 main() {
  int array_size = 50;
  int a[array_size];
  for (int i = 0; i < array_size; i++) {
    a[i] = i * 10;
  }
  for (int i = 0; i < array_size; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%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    117d <main+0x6d>
mov    -0x28(%rbp),%rax
imul   $0xa,-0x1c(%rbp),%edx
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1154 <main+0x44>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b7 <main+0xa7>
mov    -0x28(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1184 <main+0x74>
lea    0xe46(%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   %r14
push   %rbx
sub    $0xc8,%rsp
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movabs $0x1ea000001e0,%rax
mov    %rax,0xc0(%rsp)
lea    0xee2(%rip),%r14
xor    %ebx,%ebx
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x32,%rbx
jne    11e0 <main+0xc0>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [50 x i32]
%2 = bitcast [50 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 10, i32 20, i32 30>, <4 x i32>* %2
%3 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 40, i32 50, i32 60, i32 70>, <4 x i32>* %4
%5 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 80, i32 90, i32 100, i32 110>, <4 x i32>* %6
%7 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 120, i32 130, i32 140, i32 150>, <4 x i32>* %8
%9 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 16
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 160, i32 170, i32 180, i32 190>, <4 x i32>* %10
%11 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 20
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 200, i32 210, i32 220, i32 230>, <4 x i32>* %12
%13 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 24
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 240, i32 250, i32 260, i32 270>, <4 x i32>* %14
%15 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 28
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 280, i32 290, i32 300, i32 310>, <4 x i32>* %16
%17 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 32
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 320, i32 330, i32 340, i32 350>, <4 x i32>* %18
%19 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 36
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 360, i32 370, i32 380, i32 390>, <4 x i32>* %20
%21 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 40
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 400, i32 410, i32 420, i32 430>, <4 x i32>* %22
%23 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 44
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 440, i32 450, i32 460, i32 470>, <4 x i32>* %24
%25 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 48
store i32 480, i32* %25
%26 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 49
store i32 490, i32* %26
br label %29
27: ; preds = %29
%28 = tail call i32 @putchar(i32 10)
ret i32 0
29: ; preds = %0, %29
%30 = phi i64 [ %34, %29 ], [ 0, %0 ]
%31 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
%34 = add nuw nsw i64 %30, 1
%35 = icmp eq i64 %34, 50
br i1 %35, label %27, label %29
}