main() {
  int ia[7] = {1, 2, 3, 4, 5, 6, 7};
  char ca[7] = "string";
  double da[7] = {1, 2, 3, 4, 5, 6, 7};
  void *ptr;
  int i;
  for (i = 0; i < 7; i++)
    printf("%X, ", &ia[i]);
  printf("\n");
  for (i = 0; i < 7; i++)
    printf("%X, ", &ca[i]);
  printf("\n");
  for (i = 0; i < 7; i++)
    printf("%X, ", &da[i]);
  printf("\n");
  ptr = (int *)ia;
  ptr = (int *)ptr + 1;
  printf("ptr=%X, data=%d\n", (int *)ptr, *(int *)ptr);
  ptr = (char *)ca;
  ptr = (char *)ptr + 1;
  printf("ptr=%X, data=%c\n", (char *)ptr, *(char *)ptr);
  ptr = (double *)da;
  ptr = (double *)ptr + 1;
  printf("ptr=%X, data=%f\n", (double *)ptr, *(double *)ptr);
  printf("\nPress any key to end...");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xee9(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xee3(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xedb(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe8f(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x7,-0x6c(%rbp)
jge    11d7 <main+0xa7>
movslq -0x6c(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11a2 <main+0x72>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x7,-0x6c(%rbp)
jge    121d <main+0xed>
movslq -0x6c(%rbp),%rax
lea    -0x27(%rbp),%rsi
add    %rax,%rsi
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11ec <main+0xbc>
lea    0xe60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x7,-0x6c(%rbp)
jge    1267 <main+0x137>
movslq -0x6c(%rbp),%rax
lea    -0x60(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1232 <main+0x102>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rsi
mov    -0x68(%rbp),%rax
mov    (%rax),%edx
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x27(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rsi
mov    -0x68(%rbp),%rax
movsbl (%rax),%edx
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rsi
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xd91(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movups 0xec7(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x1c(%rsp),%rbp
movl   $0x676e69,0xb(%rsp)
movl   $0x69727473,0x8(%rsp)
69
lea    0xb(%rsp),%r14
mov    0xed9(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xea1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe85(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
lea    0x40(%rsp),%r13
lea    0xeb3(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x14(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x9(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x38(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x50(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x58(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
lea    0x60(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x14(%rsp),%edx
lea    0xd51(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x9(%rsp),%edx
lea    0xd4c(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x38(%rsp),%xmm0
lea    0xd46(%rip),%rdi
mov    %rbp,%rsi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd46(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.ia = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@__const.main.ca = [7 x i8] c"string\00"
@__const.main.da = [7 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00]
@.str = [5 x i8] c"%X, \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [17 x i8] c"ptr=%X, data=%d\0A\00"
@.str.3 = [17 x i8] c"ptr=%X, data=%c\0A\00"
@.str.4 = [17 x i8] c"ptr=%X, data=%f\0A\00"
@.str.5 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
%3 = alloca [7 x i8]
%4 = alloca [7 x double]
%5 = alloca i8*
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [7 x i32]* %2 to i8*
%8 = bitcast [7 x i8]* %3 to i8*
%9 = bitcast [7 x double]* %4 to i8*
store i32 0, i32* %6
br label %10
10: ; preds = %18, %0
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 7
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %16)
br label %18
18: ; preds = %13
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %10
21: ; preds = %10
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %23
23: ; preds = %31, %21
%24 = load i32, i32* %6
%25 = icmp slt i32 %24, 7
br i1 %25, label %26, label %34
26: ; preds = %23
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %29)
br label %31
31: ; preds = %26
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %23
34: ; preds = %23
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %36
36: ; preds = %44, %34
%37 = load i32, i32* %6
%38 = icmp slt i32 %37, 7
br i1 %38, label %39, label %47
39: ; preds = %36
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [7 x double], [7 x double]* %4, i64 0, i64 %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %42)
br label %44
44: ; preds = %39
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %36
47: ; preds = %36
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%49 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%50 = bitcast i32* %49 to i8*
store i8* %50, i8** %5
%51 = load i8*, i8** %5
%52 = bitcast i8* %51 to i32*
%53 = getelementptr inbounds i32, i32* %52, i64 1
%54 = bitcast i32* %53 to i8*
store i8* %54, i8** %5
%55 = load i8*, i8** %5
%56 = bitcast i8* %55 to i32*
%57 = load i8*, i8** %5
%58 = bitcast i8* %57 to i32*
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32* %56, i32 %59)
%61 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
store i8* %61, i8** %5
%62 = load i8*, i8** %5
%63 = getelementptr inbounds i8, i8* %62, i64 1
store i8* %63, i8** %5
%64 = load i8*, i8** %5
%65 = load i8*, i8** %5
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %64, i32 %67)
%69 = getelementptr inbounds [7 x double], [7 x double]* %4, i64 0, i64 0
%70 = bitcast double* %69 to i8*
store i8* %70, i8** %5
%71 = load i8*, i8** %5
%72 = bitcast i8* %71 to double*
%73 = getelementptr inbounds double, double* %72, i64 1
%74 = bitcast double* %73 to i8*
store i8* %74, i8** %5
%75 = load i8*, i8** %5
%76 = bitcast i8* %75 to double*
%77 = load i8*, i8** %5
%78 = bitcast i8* %77 to double*
%79 = load double, double* %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double* %76, double %79)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%82 = call i32 (...) @getchar()
%83 = load i32, i32* %1
ret i32 %83
}

LLVM IR (-O2):
@__const.main.ia = [7 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7]
@__const.main.ca = [7 x i8] c"string\00"
@__const.main.da = [7 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00, double 5.000000e+00, double 6.000000e+00, double 7.000000e+00]
@.str = [5 x i8] c"%X, \00"
@.str.2 = [17 x i8] c"ptr=%X, data=%d\0A\00"
@.str.3 = [17 x i8] c"ptr=%X, data=%c\0A\00"
@.str.4 = [17 x i8] c"ptr=%X, data=%f\0A\00"
@.str.5 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = alloca [7 x i32]
%2 = alloca [7 x i8]
%3 = alloca [7 x double]
%4 = bitcast [7 x i32]* %1 to i8*
%5 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%6 = bitcast [7 x double]* %3 to i8*
%7 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 1
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %9)
%11 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 2
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %11)
%13 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 3
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %13)
%15 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 4
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %15)
%17 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 5
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %17)
%19 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 6
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %19)
%21 = call i32 @putchar(i32 10)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 1
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 2
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 3
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 4
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 5
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %31)
%33 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 6
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %33)
%35 = call i32 @putchar(i32 10)
%36 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 0
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %36)
%38 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 1
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %38)
%40 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 2
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %40)
%42 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 3
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %42)
%44 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 4
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %44)
%46 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 5
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %46)
%48 = getelementptr inbounds [7 x double], [7 x double]* %3, i64 0, i64 6
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %48)
%50 = call i32 @putchar(i32 10)
%51 = load i32, i32* %9
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32* %9, i32 %51)
%53 = load i8, i8* %23
%54 = sext i8 %53 to i32
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %23, i32 %54)
%56 = load double, double* %38
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), double* %38, double %56)
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%59 = call i32 (...) @getchar()
ret i32 0
}