#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 *, ...);
void main() {
  int a[5] = {1, 3, 5, 7, 9};
  printf("%d\n", sizeof(int));
  printf("%p,%p,%p\n", &a, &a[0], a);
  printf("%p,%p,%p\n", &a + 1, &a[0] + 1, a + 1);
}


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    0xed6(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    0xebf(%rip),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x14,%rsi
lea    -0x20(%rbp),%rdx
add    $0x4,%rdx
lea    -0x20(%rbp),%rcx
add    $0x4,%rcx
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xef5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeda(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xee3(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rbx
mov    %rsp,%rcx
mov    %rbx,%rdi
mov    %rcx,%rsi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9]
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [10 x i8] c"%p,%p,%p\0A\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 4)
%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 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), [5 x i32]* %1, i32* %4, i32* %5)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 1
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%9 = getelementptr inbounds i32, i32* %8, i64 1
%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 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), [5 x i32]* %7, i32* %9, i32* %11)
ret void
}

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