#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*/ numbers;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int numbers[5] = {1, 2, 3, 4, 5};
  int i = 0;
  printf("numbers = %p\n", numbers);
  do {
    printf("numbers[%u] = %p\n", i, (void *)(&numbers[i]));
    i++;
  } while (i < 5);
  printf("sizeof(numbers) = %lu\n", sizeof(numbers));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%esi
movslq -0x34(%rbp),%rax
lea    -0x30(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jl     115e <main+0x4e>
lea    0xe9c(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    0xef1(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r14
lea    0xeda(%rip),%rdi
mov    %rsp,%r15
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x4(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@__const.main.numbers = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
@.str = [14 x i8] c"numbers = %p\0A\00"
@.str.1 = [18 x i8] c"numbers[%u] = %p\0A\00"
@.str.2 = [23 x i8] c"sizeof(numbers) = %lu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* %5)
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 1, i32* %8)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 2
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 2, i32* %10)
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 3
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 3, i32* %12)
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 4, i32* %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i64 20)
ret i32 0
}