#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, double);
void print_value(int n_arr, double *arreglo) {
  int i;
  for (i = 0; i < n_arr; i++) {
    if ((i % 2) == 1) {
      printf("Fila= %d Valor= %f\n", i, *(arreglo + i));
    }
  }
}


x86 assembly (clang, -O0):
<print_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1175 <print_value+0x65>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1162 <print_value+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1167 <print_value+0x57>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_value+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_value>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1150 <print_value+0x40>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
jmp    1139 <print_value+0x29>
nopl   (%rax)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1150 <print_value+0x40>
test   $0x1,%bl
je     1130 <print_value+0x20>
movsd  (%r14,%rbx,8),%xmm0
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    1130 <print_value+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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