#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 *, ...);
void main() {
  float vet[5] = {1.1, 2.2, 3.3, 4.4, 5.5};
  float *f;
  int i;
  f = vet;
  printf("contador/valor/valor/endereco/endereco");
  for (i = 0; i <= 4; i++) {
    printf("\ni = %d", i);
    printf("   vet[%d] = %.1f", i, vet[i]);
    printf("   *(f + %d) = %.1f", i, *(f + i));
    printf("   &vet[%d] = %p", i, &vet[i]);
    printf("   (f + %d) = %p", i, f + i);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jg     11fe <main+0xee>
mov    -0x2c(%rbp),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
movslq -0x2c(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xebc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeac(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
movslq -0x2c(%rbp),%rax
lea    -0x20(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%rdx
movslq -0x2c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1154 <main+0x44>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0xeec(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef3(%rip),%r13
mov    %r13,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xe8d(%rip),%xmm0
xor    %esi,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee2(%rip),%r12
mov    %r12,%rdi
xor    %esi,%esi
movsd  0xe70(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xedb(%rip),%r15
mov    %rsp,%r14
mov    %r15,%rdi
xor    %esi,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rbx
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe68(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rbx
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x2,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x2,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rbx
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x3,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x3,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r15,%rdi
mov    $0x4,%esi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.vet = [5 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00]
@.str = [39 x i8] c"contador/valor/valor/endereco/endereco\00"
@.str.1 = [8 x i8] c"\0Ai = %d\00"
@.str.2 = [18 x i8] c" vet[%d] = %.1f\00"
@.str.3 = [20 x i8] c" *(f + %d) = %.1f\00"
@.str.4 = [17 x i8] c" &vet[%d] = %p\00"
@.str.5 = [17 x i8] c" (f + %d) = %p\00"
@.str.6 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [5 x float]
%2 = alloca float*
%3 = alloca i32
%4 = bitcast [5 x float]* %1 to i8*
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
store float* %5, float** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %7
7: ; preds = %39, %0
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 4
br i1 %9, label %10, label %42
10: ; preds = %7
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 %15
%17 = load float, float* %16
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %13, double %18)
%20 = load i32, i32* %3
%21 = load float*, float** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
%25 = load float, float* %24
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %20, double %26)
%28 = load i32, i32* %3
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %28, float* %31)
%33 = load i32, i32* %3
%34 = load float*, float** %2
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds float, float* %34, i64 %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %33, float* %37)
br label %39
39: ; preds = %10
%40 = load i32, i32* %3
%41 = add nsw i32 %40, 1
store i32 %41, i32* %3
br label %7
42: ; preds = %7
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.main.vet = [5 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00]
@.str = [39 x i8] c"contador/valor/valor/endereco/endereco\00"
@.str.1 = [8 x i8] c"\0Ai = %d\00"
@.str.2 = [18 x i8] c" vet[%d] = %.1f\00"
@.str.3 = [20 x i8] c" *(f + %d) = %.1f\00"
@.str.4 = [17 x i8] c" &vet[%d] = %p\00"
@.str.5 = [17 x i8] c" (f + %d) = %p\00"
define void @main() {
%1 = alloca [5 x float]
%2 = bitcast [5 x float]* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 0)
%5 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 0, double 0x3FF19999A0000000)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 0, double 0x3FF19999A0000000)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 0, float* %5)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 0, float* %5)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 1)
%11 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%12 = load float, float* %11
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 1, double %13)
%15 = load float, float* %11
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 1, double %16)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 1, float* %11)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 1, float* %11)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 2)
%21 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%22 = load float, float* %21
%23 = fpext float %22 to double
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 2, double %23)
%25 = load float, float* %21
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 2, double %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 2, float* %21)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 2, float* %21)
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 3)
%31 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%32 = load float, float* %31
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 3, double %33)
%35 = load float, float* %31
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 3, double %36)
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 3, float* %31)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 3, float* %31)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 4)
%41 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%42 = load float, float* %41
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4, double %43)
%45 = load float, float* %41
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 4, double %46)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 4, float* %41)
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 4, float* %41)
%50 = call i32 @putchar(i32 10)
ret void
}