#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 *, int *, int *);
int main() {
  int a[5] = {10, 20, 30, 40, 50};
  printf("%p %p %p\n", &a[0], a, (a + 0));
  printf("%p %p %p\n", &a[1], a, (a + 1));
  printf("%p %p %p\n", &a[2], a, (a + 2));
  printf("%p %p %p\n", &a[3], a, (a + 3));
  printf("%p %p %p\n", &a[4], a, (a + 4));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x4,%rsi
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
add    $0x4,%rcx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x8,%rsi
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
add    $0x8,%rcx
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0xc,%rsi
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
add    $0xc,%rcx
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x10,%rsi
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
add    $0x10,%rcx
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%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),%r15
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
call   1030 <printf@plt>
lea    0x4(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
lea    0x8(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
lea    0xc(%rsp),%rcx
mov    %r15,%rdi
mov    %rcx,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50]
@.str = [10 x i8] c"%p %p %p\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %6)
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 1
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %8, i32* %9, i32* %11)
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%16 = getelementptr inbounds i32, i32* %15, i64 2
%17 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %13, i32* %14, i32* %16)
%18 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 3
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %18, i32* %19, i32* %21)
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
%24 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%26 = getelementptr inbounds i32, i32* %25, i64 4
%27 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %23, i32* %24, i32* %26)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50]
@.str = [10 x i8] c"%p %p %p\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %3, i32* %3)
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 1
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %3, i32* %5)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %3, i32* %7)
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 3
%10 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %9, i32* %3, i32* %9)
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
%12 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %11, i32* %3, i32* %11)
ret i32 0
}