#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 *, ...);
int main(void) {
  float data[5] = {1.1, 2.2, 3.3, 4.4, 5.5}, *ptr;
  ptr = &data[0];
  printf(" address of the first element of the array data: data[0]\n");
  printf("        ptr: %p\n", (void *)ptr);
  printf("   &data[0]: %p\n", (void *)&data[0]);
  printf("       data: %p\n", (void *)data);
  printf("\n");
  printf("address of the second element of the array data: data[1]\n");
  printf("   (ptr +1): %p\n", (void *)(ptr + 1));
  printf("   &data[1]: %p\n", (void *)&data[1]);
  printf("  (data +1): %p\n", (void *)(data + 1));
  printf("\n");
  printf("value of the third element of the array data: data[2]\n");
  printf("  *(ptr +1): %f\n", *(ptr + 2));
  printf("*(&data[1]): %f\n", *(&data[2]));
  printf("  *(ptr +1): %f\n", *(data + 2));
  printf("\n");
  float *ptr1;
  for (ptr1 = &data[0]; ptr1 < &data[5]; ptr1++)
    printf("%.1f, ", *ptr1);
  printf("\n");
  ptr1 = &data[0];
  while (ptr1 < &data[5])
    printf("%.1f, ", *ptr1++);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
add    $0x4,%rsi
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x4,%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
add    $0x4,%rsi
lea    0xefc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf0d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xf07(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xedf(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdf8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
lea    -0x20(%rbp),%rcx
add    $0x14,%rcx
cmp    %rcx,%rax
jae    12a3 <main+0x193>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
jmp    1263 <main+0x153>
lea    0xda2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
lea    -0x20(%rbp),%rcx
add    $0x14,%rcx
cmp    %rcx,%rax
jae    12f8 <main+0x1e8>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x30(%rbp)
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12b9 <main+0x1a9>
mov    0x2ce1(%rip),%rax
mov    (%rax),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xf52(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb7(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
lea    0x4(%rsp),%rbx
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf2a(%rip),%rdi
call   1040 <puts@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe79(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6f(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4b(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    0x2cc1(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.data = [5 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00]
@.str = [58 x i8] c" address of the first element of the array data: data[0]\0A\00"
@.str.1 = [17 x i8] c" ptr: %p\0A\00"
@.str.2 = [17 x i8] c" &data[0]: %p\0A\00"
@.str.3 = [17 x i8] c" data: %p\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [58 x i8] c"address of the second element of the array data: data[1]\0A\00"
@.str.6 = [17 x i8] c" (ptr +1): %p\0A\00"
@.str.7 = [17 x i8] c" &data[1]: %p\0A\00"
@.str.8 = [17 x i8] c" (data +1): %p\0A\00"
@.str.9 = [55 x i8] c"value of the third element of the array data: data[2]\0A\00"
@.str.10 = [17 x i8] c" *(ptr +1): %f\0A\00"
@.str.11 = [17 x i8] c"*(&data[1]): %f\0A\00"
@.str.12 = [7 x i8] c"%.1f, \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca float*
%4 = alloca float*
store i32 0, i32* %1
%5 = bitcast [5 x float]* %2 to i8*
%6 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
store float* %6, float** %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%8 = load float*, float** %3
%9 = bitcast float* %8 to i8*
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%12 = bitcast float* %11 to i8*
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%15 = bitcast float* %14 to i8*
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.5, i64 0, i64 0))
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = bitcast float* %20 to i8*
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* %21)
%23 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 1
%24 = bitcast float* %23 to i8*
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), i8* %24)
%26 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%27 = getelementptr inbounds float, float* %26, i64 1
%28 = bitcast float* %27 to i8*
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%32 = load float*, float** %3
%33 = getelementptr inbounds float, float* %32, i64 2
%34 = load float, float* %33
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double %35)
%37 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 2
%38 = load float, float* %37
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %39)
%41 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
%42 = getelementptr inbounds float, float* %41, i64 2
%43 = load float, float* %42
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%47 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
store float* %47, float** %4
br label %48
48: ; preds = %57, %0
%49 = load float*, float** %4
%50 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 5
%51 = icmp ult float* %49, %50
br i1 %51, label %52, label %60
52: ; preds = %48
%53 = load float*, float** %4
%54 = load float, float* %53
%55 = fpext float %54 to double
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %55)
br label %57
57: ; preds = %52
%58 = load float*, float** %4
%59 = getelementptr inbounds float, float* %58, i32 1
store float* %59, float** %4
br label %48
60: ; preds = %48
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%62 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 0
store float* %62, float** %4
br label %63
63: ; preds = %67, %60
%64 = load float*, float** %4
%65 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 5
%66 = icmp ult float* %64, %65
br i1 %66, label %67, label %73
67: ; preds = %63
%68 = load float*, float** %4
%69 = getelementptr inbounds float, float* %68, i32 1
store float* %69, float** %4
%70 = load float, float* %68
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %71)
br label %63
73: ; preds = %63
%74 = load i32, i32* @EXIT_SUCCESS
ret i32 %74
}

LLVM IR (-O2):
@__const.main.data = [5 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00]
@.str.1 = [17 x i8] c" ptr: %p\0A\00"
@.str.2 = [17 x i8] c" &data[0]: %p\0A\00"
@.str.3 = [17 x i8] c" data: %p\0A\00"
@.str.6 = [17 x i8] c" (ptr +1): %p\0A\00"
@.str.7 = [17 x i8] c" &data[1]: %p\0A\00"
@.str.8 = [17 x i8] c" (data +1): %p\0A\00"
@.str.10 = [17 x i8] c" *(ptr +1): %f\0A\00"
@.str.11 = [17 x i8] c"*(&data[1]): %f\0A\00"
@.str.12 = [7 x i8] c"%.1f, \00"
@EXIT_SUCCESS = global i32 0
@str = [57 x i8] c" address of the first element of the array data: data[0]\00"
@str.13 = [57 x i8] c"address of the second element of the array data: data[1]\00"
@str.14 = [54 x i8] c"value of the third element of the array data: data[2]\00"
define i32 @main() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), [5 x float]* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), [5 x float]* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), [5 x float]* %1)
%8 = call i32 @putchar(i32 10)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str.13, i64 0, i64 0))
%10 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), float* %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0), float* %10)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), float* %10)
%14 = call i32 @putchar(i32 10)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.14, i64 0, i64 0))
%16 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double %18)
%20 = load float, float* %16
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %21)
%23 = load float, float* %16
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), double %24)
%26 = call i32 @putchar(i32 10)
%27 = load float, float* %3
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %28)
%30 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%31 = load float, float* %30
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %32)
%34 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%35 = load float, float* %34
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %36)
%38 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%39 = load float, float* %38
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %40)
%42 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%43 = load float, float* %42
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %44)
%46 = call i32 @putchar(i32 10)
%47 = load float, float* %3
%48 = fpext float %47 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %48)
%50 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%51 = load float, float* %30
%52 = fpext float %51 to double
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %52)
%54 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%55 = load float, float* %50
%56 = fpext float %55 to double
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %56)
%58 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%59 = load float, float* %54
%60 = fpext float %59 to double
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %60)
%62 = load float, float* %58
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), double %63)
%65 = load i32, i32* @EXIT_SUCCESS
ret i32 %65
}