#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, long, long, ...);
int main(int argc, char **argv) {
  int arr1[] = {7, 2, 5, 3, 1, 6, -8, 16, 4};
  char arr2[] = {'m', 'q', 'k', 'z', '%', '>'};
  double arr3[] = {3.14, -2.718, 6.626, 0.529};
  long int addr10 = (long int)(&arr1[0]);
  long int addr11 = (long int)(&arr1[1]);
  long int addr12 = (long int)(&arr1[2]);
  printf("%ld, %ld, %ld\n", addr12, addr11, addr10);
  printf("%ld, %ld\n", addr12 - addr11, addr11 - addr10);
  long int addr20 = (long int)(&arr2[0]);
  long int addr21 = (long int)(&arr2[1]);
  long int addr22 = (long int)(&arr2[2]);
  printf("%ld, %ld, %ld\n", addr22, addr21, addr20);
  printf("%ld, %ld\n", addr22 - addr21, addr21 - addr20);
  long int addr30 = (long int)(&arr3[0]);
  long int addr31 = (long int)(&arr3[1]);
  long int addr32 = (long int)(&arr3[2]);
  printf("%ld, %ld, %ld\n", addr32, addr31, addr30);
  printf("%ld, %ld\n", addr32 - addr31, addr31 - addr30);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
mov    0xed0(%rip),%eax
mov    %eax,-0x46(%rbp)
mov    0xeca(%rip),%ax
mov    %ax,-0x42(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x40(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x80(%rbp)
lea    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rsi
mov    -0x80(%rbp),%rdx
mov    -0x78(%rbp),%rcx
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x88(%rbp),%rsi
sub    -0x80(%rbp),%rsi
mov    -0x80(%rbp),%rdx
sub    -0x78(%rbp),%rdx
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x46(%rbp),%rax
mov    %rax,-0x90(%rbp)
lea    -0x46(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
lea    -0x46(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    -0x90(%rbp),%rcx
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xa0(%rbp),%rsi
sub    -0x98(%rbp),%rsi
mov    -0x98(%rbp),%rdx
sub    -0x90(%rbp),%rdx
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x70(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x70(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0xb0(%rbp)
lea    -0x70(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
mov    -0xa8(%rbp),%rcx
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb8(%rbp),%rsi
sub    -0xb0(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
sub    -0xa8(%rbp),%rdx
lea    0xd81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    0xf01(%rip),%eax
mov    %eax,0x30(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movw   $0x3e25,0xc(%rsp)
movl   $0x7a6b716d,0x8(%rsp)
7a
movaps 0xeef(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0x50(%rsp),%r14
lea    0x14(%rsp),%rdx
lea    0x18(%rsp),%rsi
lea    0xed8(%rip),%r15
lea    0x10(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rbx
mov    $0x4,%esi
mov    $0x4,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x9(%rsp),%rdx
lea    0xa(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%esi
mov    $0x1,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x48(%rsp),%rdx
lea    0x40(%rsp),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x8,%esi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.arr1 = [9 x i32] [i32 7, i32 2, i32 5, i32 3, i32 1, i32 6, i32 -8, i32 16, i32 4]
@__const.main.arr2 = [6 x i8] c"mqkz%>"
@__const.main.arr3 = [4 x double] [double 3.140000e+00, double -2.718000e+00, double 6.626000e+00, double 5.290000e-01]
@.str = [15 x i8] c"%ld, %ld, %ld\0A\00"
@.str.1 = [10 x i8] c"%ld, %ld\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [9 x i32]
%7 = alloca [6 x i8]
%8 = alloca [4 x double]
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = bitcast [9 x i32]* %6 to i8*
%19 = bitcast [6 x i8]* %7 to i8*
%20 = bitcast [4 x double]* %8 to i8*
%21 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 0
%22 = ptrtoint i32* %21 to i64
store i64 %22, i64* %9
%23 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 1
%24 = ptrtoint i32* %23 to i64
store i64 %24, i64* %10
%25 = getelementptr inbounds [9 x i32], [9 x i32]* %6, i64 0, i64 2
%26 = ptrtoint i32* %25 to i64
store i64 %26, i64* %11
%27 = load i64, i64* %11
%28 = load i64, i64* %10
%29 = load i64, i64* %9
%30 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %27, i64 %28, i64 %29)
%31 = load i64, i64* %11
%32 = load i64, i64* %10
%33 = sub nsw i64 %31, %32
%34 = load i64, i64* %10
%35 = load i64, i64* %9
%36 = sub nsw i64 %34, %35
%37 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %33, i64 %36)
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%39 = ptrtoint i8* %38 to i64
store i64 %39, i64* %12
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 1
%41 = ptrtoint i8* %40 to i64
store i64 %41, i64* %13
%42 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 2
%43 = ptrtoint i8* %42 to i64
store i64 %43, i64* %14
%44 = load i64, i64* %14
%45 = load i64, i64* %13
%46 = load i64, i64* %12
%47 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %44, i64 %45, i64 %46)
%48 = load i64, i64* %14
%49 = load i64, i64* %13
%50 = sub nsw i64 %48, %49
%51 = load i64, i64* %13
%52 = load i64, i64* %12
%53 = sub nsw i64 %51, %52
%54 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %50, i64 %53)
%55 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%56 = ptrtoint double* %55 to i64
store i64 %56, i64* %15
%57 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 1
%58 = ptrtoint double* %57 to i64
store i64 %58, i64* %16
%59 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 2
%60 = ptrtoint double* %59 to i64
store i64 %60, i64* %17
%61 = load i64, i64* %17
%62 = load i64, i64* %16
%63 = load i64, i64* %15
%64 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %61, i64 %62, i64 %63)
%65 = load i64, i64* %17
%66 = load i64, i64* %16
%67 = sub nsw i64 %65, %66
%68 = load i64, i64* %16
%69 = load i64, i64* %15
%70 = sub nsw i64 %68, %69
%71 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 %67, i64 %70)
%72 = load i32, i32* @EXIT_SUCCESS
ret i32 %72
}

LLVM IR (-O2):
@__const.main.arr1 = [9 x i32] [i32 7, i32 2, i32 5, i32 3, i32 1, i32 6, i32 -8, i32 16, i32 4]
@__const.main.arr2 = [6 x i8] c"mqkz%>"
@__const.main.arr3 = [4 x double] [double 3.140000e+00, double -2.718000e+00, double 6.626000e+00, double 5.290000e-01]
@.str = [15 x i8] c"%ld, %ld, %ld\0A\00"
@.str.1 = [10 x i8] c"%ld, %ld\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [9 x i32]
%4 = alloca [6 x i8]
%5 = alloca [4 x double]
%6 = bitcast [9 x i32]* %3 to i8*
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%8 = bitcast [4 x double]* %5 to i8*
%9 = ptrtoint [9 x i32]* %3 to i64
%10 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 1
%11 = ptrtoint i32* %10 to i64
%12 = getelementptr inbounds [9 x i32], [9 x i32]* %3, i64 0, i64 2
%13 = ptrtoint i32* %12 to i64
%14 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %11, i64 %9)
%15 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 4, i64 4)
%16 = ptrtoint [6 x i8]* %4 to i64
%17 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%18 = ptrtoint i8* %17 to i64
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%20 = ptrtoint i8* %19 to i64
%21 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %20, i64 %18, i64 %16)
%22 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 1, i64 1)
%23 = ptrtoint [4 x double]* %5 to i64
%24 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%25 = ptrtoint double* %24 to i64
%26 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%27 = ptrtoint double* %26 to i64
%28 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64 %27, i64 %25, i64 %23)
%29 = call i32 (i8*, i64, i64, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i64 8, i64 8)
%30 = load i32, i32* @EXIT_SUCCESS
ret i32 %30
}