#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 *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double i = 0, cont = 0, X;
  while (i < 6) {
    scanf(" %lf", &X);
    if (X > 0)
      cont++;
    i++;
  }
  printf("%0.0lf valores positivos\n", cont);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    119d <main+0x7d>
lea    0xeb7(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1186 <main+0x66>
movsd  0xe8c(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe7a(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113f <main+0x1f>
movsd  -0x18(%rbp),%xmm0
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xeda(%rip),%rbx
lea    0x8(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movsd  0xeba(%rip),%xmm0
xorpd  %xmm1,%xmm1
cmpltsd 0x8(%rsp),%xmm1
andpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
xorpd  %xmm2,%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xe7d(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
xorpd  %xmm2,%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xe3b(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
xorpd  %xmm2,%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xdf9(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
xorpd  %xmm2,%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xdb7(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movapd 0x10(%rsp),%xmm3
movapd %xmm3,%xmm0
xorpd  %xmm2,%xmm2
cmpltsd 0x8(%rsp),%xmm2
movsd  0xd75(%rip),%xmm1
addsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
andnpd %xmm3,%xmm1
andpd  %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,%xmm0
lea    0xd63(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [26 x i8] c"%0.0lf valores positivos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
br label %5
5: ; preds = %15, %0
%6 = load double, double* %2
%7 = fcmp olt double %6, 6.000000e+00
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %4)
%10 = load double, double* %4
%11 = fcmp ogt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load double, double* %3
%14 = fadd double %13, 1.000000e+00
store double %14, double* %3
br label %15
15: ; preds = %12, %8
%16 = load double, double* %2
%17 = fadd double %16, 1.000000e+00
store double %17, double* %2
br label %5
18: ; preds = %5
%19 = load double, double* %3
%20 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [26 x i8] c"%0.0lf valores positivos\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fcmp ogt double %4, 0.000000e+00
%6 = select i1 %5, double 1.000000e+00, double 0.000000e+00
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%8 = load double, double* %1
%9 = fcmp ogt double %8, 0.000000e+00
%10 = fadd double %6, 1.000000e+00
%11 = select i1 %9, double %10, double %6
%12 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%13 = load double, double* %1
%14 = fcmp ogt double %13, 0.000000e+00
%15 = fadd double %11, 1.000000e+00
%16 = select i1 %14, double %15, double %11
%17 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%18 = load double, double* %1
%19 = fcmp ogt double %18, 0.000000e+00
%20 = fadd double %16, 1.000000e+00
%21 = select i1 %19, double %20, double %16
%22 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%23 = load double, double* %1
%24 = fcmp ogt double %23, 0.000000e+00
%25 = fadd double %21, 1.000000e+00
%26 = select i1 %24, double %25, double %21
%27 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%28 = load double, double* %1
%29 = fcmp ogt double %28, 0.000000e+00
%30 = fadd double %26, 1.000000e+00
%31 = select i1 %29, double %30, double %26
%32 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), double %31)
ret i32 0
}