#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) {
  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    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    0xeca(%rip),%rdi
lea    0xece(%rip),%rsi
lea    0xecd(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0x1a(%rbp)
movswl -0x1a(%rbp),%eax
cmp    $0x4,%eax
jge    11a3 <main+0x93>
movswl -0x1a(%rbp),%esi
mov    -0x18(%rbp),%rdx
movswl -0x1a(%rbp),%eax
cltq
shl    $0x1,%rax
add    %rax,%rdx
mov    -0x48(%rbp),%rcx
movswl -0x1a(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x1a(%rbp)
jmp    1151 <main+0x41>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xee4(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee7(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%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 = [11 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() {
%1 = alloca i32
%2 = alloca [4 x i16]
%3 = alloca i16*
%4 = alloca i16
%5 = alloca [4 x double]
%6 = alloca double*
store i32 0, i32* %1
%7 = getelementptr inbounds [4 x i16], [4 x i16]* %2, i64 0, i64 0
store i16* %7, i16** %3
%8 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
store double* %8, double** %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 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* %4
br label %10
10: ; preds = %28, %0
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
%13 = icmp slt i32 %12, 4
br i1 %13, label %14, label %31
14: ; preds = %10
%15 = load i16, i16* %4
%16 = sext i16 %15 to i32
%17 = load i16*, i16** %3
%18 = load i16, i16* %4
%19 = sext i16 %18 to i32
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i16, i16* %17, i64 %20
%22 = load double*, double** %6
%23 = load i16, i16* %4
%24 = sext i16 %23 to i32
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds double, double* %22, i64 %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %16, i16* %21, double* %26)
br label %28
28: ; preds = %14
%29 = load i16, i16* %4
%30 = add i16 %29, 1
store i16 %30, i16* %4
br label %10
31: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [11 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() {
%1 = alloca [4 x i16]
%2 = alloca [4 x double]
%3 = bitcast [4 x i16]* %1 to i8*
%4 = bitcast [4 x double]* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 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))
%6 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 0
%7 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 0, i16* %6, double* %7)
%9 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 1
%10 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 1, i16* %9, double* %10)
%12 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 2
%13 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 2, i16* %12, double* %13)
%15 = getelementptr inbounds [4 x i16], [4 x i16]* %1, i64 0, i64 3
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 3
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 3, i16* %15, double* %16)
ret i32 0
}