#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 /*<<< orphan*/ scanf(char *, float *);
void main(void) {
  int c, positivos, negativos;
  float entrada;
  positivos = 0;
  negativos = 0;
  for (c = 0; c <= 9; c++) {
    printf("Insira a Entrada: ");
    scanf("%f", &entrada);
    if (entrada >= 0)
      positivos++;
    else
      negativos++;
  }
  printf("N: %i P: %i ", negativos, positivos);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jg     11a0 <main+0x80>
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1184 <main+0x64>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118d <main+0x6d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1192 <main+0x72>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <main+0x1d>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
lea    0xecd(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%r12
lea    0xc(%rsp),%r15
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,0x20(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps 0x20(%rsp),%xmm0
movlhps %xmm1,%xmm0
movaps %xmm0,0x20(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,0x10(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps 0x10(%rsp),%xmm2
movlhps %xmm1,%xmm2
movaps %xmm2,0x10(%rsp)
xorps  %xmm0,%xmm0
cmpnleps 0x20(%rsp),%xmm0
xorps  %xmm1,%xmm1
cmpnleps %xmm2,%xmm1
packssdw %xmm1,%xmm0
packsswb %xmm0,%xmm0
pmovmskb %xmm0,%esi
mov    %esi,%edi
shr    $0x7,%dil
mov    %esi,%r8d
and    $0x40,%r8b
shr    $0x6,%r8b
mov    %esi,%r9d
and    $0x20,%r9b
shr    $0x5,%r9b
mov    %esi,%ebx
and    $0x10,%bl
shr    $0x4,%bl
mov    %esi,%eax
and    $0x8,%al
shr    $0x3,%al
mov    %esi,%ecx
and    $0x4,%cl
shr    $0x2,%cl
mov    %esi,%edx
and    $0x2,%dl
shr    %dl
and    $0x1,%esi
movzbl %dl,%edx
add    %esi,%edx
movzbl %cl,%ecx
add    %edx,%ecx
movzbl %al,%eax
add    %ecx,%eax
movzbl %bl,%ecx
add    %eax,%ecx
movzbl %r9b,%eax
add    %ecx,%eax
movzbl %r8b,%ecx
add    %eax,%ecx
movzbl %dil,%ebp
add    %ecx,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
xorps  %xmm3,%xmm3
adc    $0x0,%ebp
xorps  %xmm1,%xmm1
cmpleps 0x20(%rsp),%xmm1
xorps  %xmm2,%xmm2
cmpleps 0x10(%rsp),%xmm2
packssdw %xmm2,%xmm1
packsswb %xmm1,%xmm1
pmovmskb %xmm1,%eax
mov    %eax,%ecx
shr    %cl
and    $0x55,%cl
sub    %cl,%al
mov    %eax,%ecx
and    $0x33,%cl
shr    $0x2,%al
and    $0x33,%al
add    %cl,%al
mov    %eax,%ecx
shr    $0x4,%cl
add    %al,%cl
and    $0xf,%cl
ucomiss %xmm3,%xmm0
movzbl %cl,%ebx
sbb    $0xffffffff,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
pxor   %xmm1,%xmm1
ucomiss %xmm1,%xmm0
sbb    $0xffffffff,%ebx
ucomiss %xmm1,%xmm0
adc    $0x0,%ebp
lea    0xc89(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Insira a Entrada: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [13 x i8] c"N: %i P: %i \00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %1
br label %5
5: ; preds = %20, %0
%6 = load i32, i32* %1
%7 = icmp sle i32 %6, 9
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%11 = load float, float* %4
%12 = fcmp oge float %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %19
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %13
br label %20
20: ; preds = %19
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %5
23: ; preds = %5
%24 = load i32, i32* %3
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Insira a Entrada: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [13 x i8] c"N: %i P: %i \00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%8 = load float, float* %1
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%11 = load float, float* %1
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%14 = load float, float* %1
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%17 = load float, float* %1
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%20 = load float, float* %1
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%22 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%23 = load float, float* %1
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%26 = load float, float* %1
%27 = insertelement <8 x float> poison, float %5, i64 0
%28 = insertelement <8 x float> %27, float %8, i64 1
%29 = insertelement <8 x float> %28, float %11, i64 2
%30 = insertelement <8 x float> %29, float %14, i64 3
%31 = insertelement <8 x float> %30, float %17, i64 4
%32 = insertelement <8 x float> %31, float %20, i64 5
%33 = insertelement <8 x float> %32, float %23, i64 6
%34 = insertelement <8 x float> %33, float %26, i64 7
%35 = fcmp ult <8 x float> %34, zeroinitializer
%36 = extractelement <8 x i1> %35, i64 0
%37 = zext i1 %36 to i32
%38 = xor <8 x i1> %35, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
%39 = extractelement <8 x i1> %35, i64 1
%40 = zext i1 %39 to i32
%41 = add nuw nsw i32 %37, %40
%42 = extractelement <8 x i1> %35, i64 2
%43 = zext i1 %42 to i32
%44 = add nuw nsw i32 %41, %43
%45 = extractelement <8 x i1> %35, i64 3
%46 = zext i1 %45 to i32
%47 = add nuw nsw i32 %44, %46
%48 = extractelement <8 x i1> %35, i64 4
%49 = zext i1 %48 to i32
%50 = add nuw nsw i32 %47, %49
%51 = extractelement <8 x i1> %35, i64 5
%52 = zext i1 %51 to i32
%53 = add nuw nsw i32 %50, %52
%54 = extractelement <8 x i1> %35, i64 6
%55 = zext i1 %54 to i32
%56 = add nuw nsw i32 %53, %55
%57 = extractelement <8 x i1> %35, i64 7
%58 = zext i1 %57 to i32
%59 = add nuw nsw i32 %56, %58
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%61 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%62 = load float, float* %1
%63 = fcmp ult float %62, 0.000000e+00
%64 = xor i1 %63, true
%65 = zext i1 %64 to i32
%66 = zext i1 %63 to i32
%67 = add nuw nsw i32 %59, %66
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%69 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%70 = load float, float* %1
%71 = fcmp ult float %70, 0.000000e+00
%72 = xor i1 %71, true
%73 = zext i1 %72 to i32
%74 = bitcast <8 x i1> %38 to i8
%75 = call i8 @llvm.ctpop.i8(i8 %74)
%76 = zext i8 %75 to i32
%77 = add nuw nsw i32 %76, %65
%78 = add nuw nsw i32 %77, %73
%79 = zext i1 %71 to i32
%80 = add nuw nsw i32 %67, %79
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %80, i32 %78)
ret void
}