#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 main(void) {
  char a[4];
  char *pa;
  int b[4];
  int *pb;
  double c[4];
  double *pc;
  int i = 0;
  pa = a;
  pb = b;
  pc = c;
  printf("%6s %14s %14s %14s\n", "index", "char", "int", "double");
  for (i = 0; i < 4; i++) {
    printf("%6d %p %p %p\n", i, pa++, pb++, pc++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x5c(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xebb(%rip),%rdi
lea    0xec8(%rip),%rsi
lea    0xec7(%rip),%rdx
lea    0xec5(%rip),%rcx
lea    0xec2(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x5c(%rbp)
cmpl   $0x4,-0x5c(%rbp)
jge    11c5 <main+0xb5>
mov    -0x5c(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    %rdx,%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x28(%rbp),%rcx
mov    %rcx,%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%r8
mov    %r8,%rax
add    $0x8,%rax
mov    %rax,-0x58(%rbp)
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    116f <main+0x5f>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xedb(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee7(%rip),%rdx
lea    0xee5(%rip),%rcx
lea    0xee2(%rip),%r8
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd(%rsp),%r14
lea    0x14(%rsp),%rbp
lea    0x28(%rsp),%r12
lea    0xecc(%rip),%rbx
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x20(%rsp),%r8
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe(%rsp),%r13
lea    0x18(%rsp),%r15
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf(%rsp),%rbp
lea    0x1c(%rsp),%r12
lea    0x38(%rsp),%r14
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %r13,%rdx
mov    %r15,%rcx
lea    0x30(%rsp),%r8
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %rbp,%rdx
mov    %r12,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%6s %14s %14s %14s\0A\00"
@.str.1 = [6 x i8] c"index\00"
@.str.2 = [5 x i8] c"char\00"
@.str.3 = [4 x i8] c"int\00"
@.str.4 = [7 x i8] c"double\00"
@.str.5 = [14 x i8] c"%6d %p %p %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8*
%4 = alloca [4 x i32]
%5 = alloca i32*
%6 = alloca [4 x double]
%7 = alloca double*
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
store i8* %9, i8** %3
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
store i32* %10, i32** %5
%11 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
store double* %11, double** %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %8
br label %13
13: ; preds = %25, %0
%14 = load i32, i32* %8
%15 = icmp slt i32 %14, 4
br i1 %15, label %16, label %28
16: ; preds = %13
%17 = load i32, i32* %8
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %3
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i32 1
store i32* %21, i32** %5
%22 = load double*, double** %7
%23 = getelementptr inbounds double, double* %22, i32 1
store double* %23, double** %7
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %17, i8* %18, i32* %20, double* %22)
br label %25
25: ; preds = %16
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
br label %13
28: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%6s %14s %14s %14s\0A\00"
@.str.1 = [6 x i8] c"index\00"
@.str.2 = [5 x i8] c"char\00"
@.str.3 = [4 x i8] c"int\00"
@.str.4 = [7 x i8] c"double\00"
@.str.5 = [14 x i8] c"%6d %p %p %p\0A\00"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = alloca [4 x i32]
%3 = alloca [4 x double]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = bitcast [4 x i32]* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%8 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 1
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 1
%12 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 0, i8* %4, i32* %7, double* %8)
%14 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 2
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 2
%16 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 1, i8* %10, i32* %11, double* %12)
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 3
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 3
%20 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 3
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 2, i8* %14, i32* %15, double* %16)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 3, i8* %18, i32* %19, double* %20)
ret i32 0
}