#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(int argc, char const *argv[]) {
  short dates[4];
  short *pti;
  short index;
  double bills[4];
  double *ptf;
  pti = dates;
  ptf = bills;
  printf("%23s %15s \n", "short", "double");
  for (index = 0; index < 4; index++) {
    printf("pointers + %d: %10p %10p\n", index, pti + index, ptf + index);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xec3(%rip),%rdi
lea    0xec8(%rip),%rsi
lea    0xec7(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0x22(%rbp)
movswl -0x22(%rbp),%eax
cmp    $0x4,%eax
jge    11aa <main+0x9a>
movswl -0x22(%rbp),%esi
mov    -0x20(%rbp),%rdx
movswl -0x22(%rbp),%eax
cltq
shl    $0x1,%rax
add    %rax,%rdx
mov    -0x58(%rbp),%rcx
movswl -0x22(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x22(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x22(%rbp)
jmp    1158 <main+0x48>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xee4(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xee8(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rbx
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xa(%rsp),%rdx
lea    0x18(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xc(%rsp),%rdx
lea    0x20(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe(%rsp),%rdx
lea    0x28(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%23s %15s \0A\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [7 x i8] c"double\00"
@.str.3 = [26 x i8] c"pointers + %d: %10p %10p\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i16]
%7 = alloca i16*
%8 = alloca i16
%9 = alloca [4 x double]
%10 = alloca double*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = getelementptr inbounds [4 x i16], [4 x i16]* %6, i64 0, i64 0
store i16* %11, i16** %7
%12 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
store double* %12, double** %10
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 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 ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i16 0, i16* %8
br label %14
14: ; preds = %32, %2
%15 = load i16, i16* %8
%16 = sext i16 %15 to i32
%17 = icmp slt i32 %16, 4
br i1 %17, label %18, label %35
18: ; preds = %14
%19 = load i16, i16* %8
%20 = sext i16 %19 to i32
%21 = load i16*, i16** %7
%22 = load i16, i16* %8
%23 = sext i16 %22 to i32
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i16, i16* %21, i64 %24
%26 = load double*, double** %10
%27 = load i16, i16* %8
%28 = sext i16 %27 to i32
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %26, i64 %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %20, i16* %25, double* %30)
br label %32
32: ; preds = %18
%33 = load i16, i16* %8
%34 = add i16 %33, 1
store i16 %34, i16* %8
br label %14
35: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%23s %15s \0A\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [7 x i8] c"double\00"
@.str.3 = [26 x i8] c"pointers + %d: %10p %10p\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i16]
%4 = alloca [4 x double]
%5 = bitcast [4 x i16]* %3 to i8*
%6 = bitcast [4 x double]* %4 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 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 ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [4 x i16], [4 x i16]* %3, i64 0, i64 0
%9 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 0, i16* %8, double* %9)
%11 = getelementptr inbounds [4 x i16], [4 x i16]* %3, i64 0, i64 1
%12 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 1
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 1, i16* %11, double* %12)
%14 = getelementptr inbounds [4 x i16], [4 x i16]* %3, i64 0, i64 2
%15 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 2, i16* %14, double* %15)
%17 = getelementptr inbounds [4 x i16], [4 x i16]* %3, i64 0, i64 3
%18 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 3
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 3, i16* %17, double* %18)
ret i32 0
}