#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*/ printf(char *, int, ...);
int main(int argc, char *argv[]) {
  long nums[] = {15L, 25L, 35L, 45L};
  unsigned long int i = 0;
  for (i = 0; i < sizeof(nums) / sizeof(nums[0]); ++i) {
    printf("nums[%ld] = %ld, address is %ld\n", i, nums[i], (long)&nums[i]);
  }
  printf("The long occupies %ld bytes.\n", sizeof(long));
  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    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x38(%rbp)
cmpq   $0x4,-0x38(%rbp)
jae    11aa <main+0x9a>
mov    -0x38(%rbp),%rax
mov    %eax,%esi
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rdx
mov    -0x38(%rbp),%rax
lea    -0x30(%rbp),%rcx
shl    $0x3,%rax
add    %rax,%rcx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1162 <main+0x52>
lea    0xe90(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r14
lea    0xee6(%rip),%rbx
mov    %rsp,%rcx
mov    $0xf,%edx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rcx
mov    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rcx
mov    0x18(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.nums = [4 x i64] [i64 15, i64 25, i64 35, i64 45]
@.str = [33 x i8] c"nums[%ld] = %ld, address is %ld\0A\00"
@.str.1 = [30 x i8] c"The long occupies %ld bytes.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i64]
%7 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i64]* %6 to i8*
store i64 0, i64* %7
store i64 0, i64* %7
br label %9
9: ; preds = %22, %2
%10 = load i64, i64* %7
%11 = icmp ult i64 %10, 4
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i64, i64* %7
%14 = trunc i64 %13 to i32
%15 = load i64, i64* %7
%16 = getelementptr inbounds [4 x i64], [4 x i64]* %6, i64 0, i64 %15
%17 = load i64, i64* %16
%18 = load i64, i64* %7
%19 = getelementptr inbounds [4 x i64], [4 x i64]* %6, i64 0, i64 %18
%20 = ptrtoint i64* %19 to i64
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %14, i64 %17, i64 %20)
br label %22
22: ; preds = %12
%23 = load i64, i64* %7
%24 = add i64 %23, 1
store i64 %24, i64* %7
br label %9
25: ; preds = %9
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [4 x i64] [i64 15, i64 25, i64 35, i64 45]
@.str = [33 x i8] c"nums[%ld] = %ld, address is %ld\0A\00"
@.str.1 = [30 x i8] c"The long occupies %ld bytes.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i64]
%4 = bitcast [4 x i64]* %3 to i8*
%5 = ptrtoint [4 x i64]* %3 to i64
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i64 15, i64 %5)
%7 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 1
%8 = load i64, i64* %7
%9 = ptrtoint i64* %7 to i64
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 1, i64 %8, i64 %9)
%11 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 2
%12 = load i64, i64* %11
%13 = ptrtoint i64* %11 to i64
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 2, i64 %12, i64 %13)
%15 = getelementptr inbounds [4 x i64], [4 x i64]* %3, i64 0, i64 3
%16 = load i64, i64* %15
%17 = ptrtoint i64* %15 to i64
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 3, i64 %16, i64 %17)
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 8)
ret i32 0
}