#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(void) {
  int chaDeExemplo, cha, quantidadeQueSeRepete = 0, i;
  scanf("%d", &chaDeExemplo);
  for (i = 0; i < 5; i++) {
    scanf("%d", &cha);
    if (cha == chaDeExemplo) {
      quantidadeQueSeRepete++;
    }
  }
  printf("%d\n", quantidadeQueSeRepete);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    118f <main+0x6f>
lea    0xea2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    117c <main+0x5c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1181 <main+0x61>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <main+0x2d>
mov    -0x10(%rbp),%esi
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%r15
lea    0x4(%rsp),%rsi
mov    %r15,%rdi
call   1040 <scanf@plt>
mov    %rsp,%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %ebp,%ebp
cmp    0x4(%rsp),%eax
sete   %bpl
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %ebx,%ebx
cmp    0x4(%rsp),%eax
sete   %bl
add    %ebp,%ebx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %ebp,%ebp
cmp    0x4(%rsp),%eax
sete   %bpl
add    %ebx,%ebp
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %ebx,%ebx
cmp    0x4(%rsp),%eax
sete   %bl
add    %ebp,%ebx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%eax
xor    %esi,%esi
cmp    0x4(%rsp),%eax
sete   %sil
add    %ebx,%esi
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = load i32, i32* %1
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = add nuw nsw i32 %10, %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = load i32, i32* %1
%20 = icmp eq i32 %18, %19
%21 = zext i1 %20 to i32
%22 = add nuw nsw i32 %16, %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%24 = load i32, i32* %2
%25 = load i32, i32* %1
%26 = icmp eq i32 %24, %25
%27 = zext i1 %26 to i32
%28 = add nuw nsw i32 %22, %27
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%30 = load i32, i32* %2
%31 = load i32, i32* %1
%32 = icmp eq i32 %30, %31
%33 = zext i1 %32 to i32
%34 = add nuw nsw i32 %28, %33
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
ret i32 0
}