#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 */
scalar_t__ pow(float, int);
int /*<<< orphan*/ printf(char *, ...);
double sqrt(scalar_t__);
void imprimeModulo(float dadosImp[], int tamVet) {
  int posicao;
  for (posicao = 0; posicao < tamVet; posicao = posicao + 2) {
    printf("%f ",
           sqrt(pow(dadosImp[posicao], 2) + pow(dadosImp[posicao + 1], 2)));
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<imprimeModulo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b1 <imprimeModulo+0x81>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1050 <sqrt@plt>
lea    0xe64(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
jmp    1146 <imprimeModulo+0x16>
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimeModulo>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %esi,%esi
jle    11a2 <imprimeModulo+0x62>
mov    %esi,%r15d
mov    %rdi,%r12
xor    %ebx,%ebx
lea    0xea5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movss  (%r12,%rbx,4),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
mov    %rax,%rbp
movss  0x4(%r12,%rbx,4),%xmm0
mov    $0x2,%edi
call   1050 <pow@plt>
add    %rax,%rbp
mov    %rbp,%rdi
call   1060 <sqrt@plt>
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x2,%rbx
cmp    %r15d,%ebx
jl     1160 <imprimeModulo+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f \00"
define void @imprimeModulo(float* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %19
4: ; preds = %2, %4
%5 = phi i64 [ %16, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds float, float* %0, i64 %5
%7 = load float, float* %6
%8 = tail call i64 @pow(float %7, i32 2)
%9 = or i64 %5, 1
%10 = getelementptr inbounds float, float* %0, i64 %9
%11 = load float, float* %10
%12 = tail call i64 @pow(float %11, i32 2)
%13 = add nsw i64 %12, %8
%14 = tail call double @sqrt(i64 %13)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %14)
%16 = add nuw i64 %5, 2
%17 = trunc i64 %16 to i32
%18 = icmp slt i32 %17, %1
br i1 %18, label %4, label %19
19: ; preds = %4, %2
%20 = tail call i32 @putchar(i32 10)
ret void
}