#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int vet[20];
  int contador = 0;
  for (int i = 0; i < 20; i++) {
    printf("Digite o valor %i:", i + 1);
    scanf("%i", &vet[i]);
    if (vet[i] > 10)
      contador++;
  }
  for (int i = 0; i < 20; i++)
    if (vet[i] > 10)
      printf("Estes são os valores maiores que 10: %d\n", vet[i]);
  printf("Há este total de numeros maiores que 10: %d", contador);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
cmpl   $0x14,-0x68(%rbp)
jge    119f <main+0x7f>
mov    -0x68(%rbp),%esi
add    $0x1,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movslq -0x68(%rbp),%rax
lea    -0x60(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea4(%rip),%rdi
call   1040 <scanf@plt>
movslq -0x68(%rbp),%rax
cmpl   $0xa,-0x60(%rbp,%rax,4)
jle    118c <main+0x6c>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1191 <main+0x71>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    113d <main+0x1d>
movl   $0x0,-0x6c(%rbp)
cmpl   $0x14,-0x6c(%rbp)
jge    11e6 <main+0xc6>
movslq -0x6c(%rbp),%rax
cmpl   $0xa,-0x60(%rbp,%rax,4)
jle    11d3 <main+0xb3>
movslq -0x6c(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
jmp    11d8 <main+0xb8>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11a6 <main+0x86>
mov    -0x64(%rbp),%esi
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x50,%rsp
xor    %r12d,%r12d
mov    %rsp,%rbx
mov    $0xffffffffffffffec,%rbp
lea    0xec0(%rip),%r14
lea    0xecc(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x15(%rbp),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmpl   $0xb,(%rbx)
setge  %al
add    %eax,%r12d
add    $0x4,%rbx
inc    %rbp
jne    1150 <main+0x30>
xor    %ebp,%ebp
lea    0xe93(%rip),%rbx
jmp    119a <main+0x7a>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    $0x14,%rbp
je     11ac <main+0x8c>
mov    (%rsp,%rbp,4),%esi
cmp    $0xb,%esi
jl     1190 <main+0x70>
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x70>
lea    0xe8d(%rip),%rdi
mov    %r12d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Digite o valor %i:\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [42 x i8] c"Estes s\C3\A3o os valores maiores que 10: %d\0A\00"
@.str.3 = [45 x i8] c"H\C3\A1 este total de numeros maiores que 10: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %4
br label %6
6: ; preds = %26, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 20
br i1 %8, label %9, label %29
9: ; preds = %6
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = icmp sgt i32 %20, 10
br i1 %21, label %22, label %25
22: ; preds = %9
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %25
25: ; preds = %22, %9
br label %26
26: ; preds = %25
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %6
29: ; preds = %6
store i32 0, i32* %5
br label %30
30: ; preds = %46, %29
%31 = load i32, i32* %5
%32 = icmp slt i32 %31, 20
br i1 %32, label %33, label %49
33: ; preds = %30
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %35
%37 = load i32, i32* %36
%38 = icmp sgt i32 %37, 10
br i1 %38, label %39, label %45
39: ; preds = %33
%40 = load i32, i32* %5
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 %41
%43 = load i32, i32* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %39, %33
br label %46
46: ; preds = %45
%47 = load i32, i32* %5
%48 = add nsw i32 %47, 1
store i32 %48, i32* %5
br label %30
49: ; preds = %30
%50 = load i32, i32* %3
%51 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %1
ret i32 %52
}

LLVM IR (-O2):
@.str = [19 x i8] c"Digite o valor %i:\00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [42 x i8] c"Estes s\C3\A3o os valores maiores que 10: %d\0A\00"
@.str.3 = [45 x i8] c"H\C3\A1 este total de numeros maiores que 10: %d\00"
define i32 @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %6, %3 ]
%5 = phi i32 [ 0, %0 ], [ %14, %3 ]
%6 = add nuw nsw i64 %4, 1
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %4
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%11 = load i32, i32* %9
%12 = icmp sgt i32 %11, 10
%13 = zext i1 %12 to i32
%14 = add nuw nsw i32 %5, %13
%15 = icmp eq i64 %6, 20
br i1 %15, label %18, label %3
16: ; preds = %25
%17 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0), i32 %14)
ret i32 0
18: ; preds = %3, %25
%19 = phi i64 [ %26, %25 ], [ 0, %3 ]
%20 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = icmp sgt i32 %21, 10
br i1 %22, label %23, label %25
23: ; preds = %18
%24 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %25
25: ; preds = %18, %23
%26 = add nuw nsw i64 %19, 1
%27 = icmp eq i64 %26, 20
br i1 %27, label %16, label %18
}