#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 */
typedef int /*<<< orphan*/ nums;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int array[50];
  int nums[] = {1, 2, 3, 4, 5, 6};
  int nums_length = sizeof(nums) / sizeof(int);
  assert(nums_length == 6);
  assert(sizeof(nums) == sizeof(int) * 6);
  int i;
  for (i = 0; i < nums_length; i++) {
    printf("%d\n", nums[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0xe0(%rbp)
movl   $0x6,-0xf4(%rbp)
cmpl   $0x6,-0xf4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
movl   $0x0,-0xf8(%rbp)
mov    -0xf8(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jge    11ce <main+0xae>
movslq -0xf8(%rbp),%rax
mov    -0xf0(%rbp,%rax,4),%esi
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    118e <main+0x6e>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.nums = [6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i32]
%3 = alloca [6 x i32]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [6 x i32]* %3 to i8*
store i32 6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 6
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @assert(i32 1)
store i32 0, i32* %5
br label %12
12: ; preds = %22, %0
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [6 x i32], [6 x i32]* %3, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %22
22: ; preds = %16
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
br label %12
25: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}