#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);
int /*<<< orphan*/ scanf(char *, int *);
int vlr_igual(int **, int);
void main() {
  int A[15][5];
  for (int i = 0; i < 15; i++) {
    for (int j = 0; j < 5; j++) {
      printf("Informe [%d][%d]: ", i, j);
      scanf("%d", &A[i][j]);
    }
  }
  for (int i = 0; i < 15; i++) {
    for (int j = 0; j < 5; j++) {
      printf("%d aparece %d vezes!\n", A[i][j], vlr_igual(A, A[i][j]));
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x134(%rbp)
cmpl   $0xf,-0x134(%rbp)
jge    11dd <main+0xad>
movl   $0x0,-0x138(%rbp)
cmpl   $0x5,-0x138(%rbp)
jge    11c4 <main+0x94>
mov    -0x134(%rbp),%esi
mov    -0x138(%rbp),%edx
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
movslq -0x134(%rbp),%rax
lea    -0x130(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
movslq -0x138(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe68(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x138(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x138(%rbp)
jmp    115c <main+0x2c>
jmp    11c9 <main+0x99>
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    1145 <main+0x15>
movl   $0x0,-0x13c(%rbp)
cmpl   $0xf,-0x13c(%rbp)
jge    129c <main+0x16c>
movl   $0x0,-0x140(%rbp)
cmpl   $0x5,-0x140(%rbp)
jge    1283 <main+0x153>
movslq -0x13c(%rbp),%rcx
lea    -0x130(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x140(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x144(%rbp)
lea    -0x130(%rbp),%rdi
movslq -0x13c(%rbp),%rcx
lea    -0x130(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
movslq -0x140(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <vlr_igual@plt>
mov    -0x144(%rbp),%esi
mov    %eax,%edx
lea    0xdac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x140(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x140(%rbp)
jmp    11fe <main+0xce>
jmp    1288 <main+0x158>
mov    -0x13c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x13c(%rbp)
jmp    11e7 <main+0xb7>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x138,%rsp
xor    %ebx,%ebx
lea    0xeba(%rip),%r14
lea    0xec6(%rip),%r15
xor    %ebp,%ebp
nop
mov    %r14,%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x4,%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x8,%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x3,%edx
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0xc,%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
call   1040 <printf@plt>
lea    (%rsp,%rbx,1),%rsi
add    $0x10,%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
add    $0x1,%ebp
add    $0x14,%rbx
cmp    $0x12c,%rbx
jne    1150 <main+0x20>
mov    $0x10,%ebx
mov    %rsp,%r14
lea    0xe0f(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    -0x10(%rsp,%rbx,1),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <vlr_igual@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    -0xc(%rsp,%rbx,1),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <vlr_igual@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    -0x8(%rsp,%rbx,1),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <vlr_igual@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    -0x4(%rsp,%rbx,1),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <vlr_igual@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    (%rsp,%rbx,1),%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <vlr_igual@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
add    $0x14,%rbx
cmp    $0x13c,%rbx
jne    1210 <main+0xe0>
add    $0x138,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Informe [%d][%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"%d aparece %d vezes!\0A\00"
define void @main() {
%1 = alloca [15 x [5 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %2
br label %6
6: ; preds = %28, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 15
br i1 %8, label %9, label %31
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %24, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 5
br i1 %12, label %13, label %27
13: ; preds = %10
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15)
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %18
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %19, i64 0, i64 %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %22)
br label %24
24: ; preds = %13
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %10
27: ; preds = %10
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %6
31: ; preds = %6
store i32 0, i32* %4
br label %32
32: ; preds = %62, %31
%33 = load i32, i32* %4
%34 = icmp slt i32 %33, 15
br i1 %34, label %35, label %65
35: ; preds = %32
store i32 0, i32* %5
br label %36
36: ; preds = %58, %35
%37 = load i32, i32* %5
%38 = icmp slt i32 %37, 5
br i1 %38, label %39, label %61
39: ; preds = %36
%40 = load i32, i32* %4
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %41
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5 x i32], [5 x i32]* %42, i64 0, i64 %44
%46 = load i32, i32* %45
%47 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 0
%48 = bitcast [5 x i32]* %47 to i32**
%49 = load i32, i32* %4
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %50
%52 = load i32, i32* %5
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [5 x i32], [5 x i32]* %51, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = call i32 @vlr_igual(i32** %48, i32 %55)
%57 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %46, i32 %56)
br label %58
58: ; preds = %39
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 1
store i32 %60, i32* %5
br label %36
61: ; preds = %36
br label %62
62: ; preds = %61
%63 = load i32, i32* %4
%64 = add nsw i32 %63, 1
store i32 %64, i32* %4
br label %32
65: ; preds = %32
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Informe [%d][%d]: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"%d aparece %d vezes!\0A\00"
define void @main() {
%1 = alloca [15 x [5 x i32]]
%2 = bitcast [15 x [5 x i32]]* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %21, %3 ]
%5 = trunc i64 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 0)
%7 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %4, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 1)
%10 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %4, i64 1
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 2)
%13 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %4, i64 2
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 3)
%16 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %4, i64 3
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 4)
%19 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %4, i64 4
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = add nuw nsw i64 %4, 1
%22 = icmp eq i64 %21, 15
br i1 %22, label %23, label %3
23: ; preds = %3
%24 = bitcast [15 x [5 x i32]]* %1 to i32**
br label %25
25: ; preds = %23, %25
%26 = phi i64 [ 0, %23 ], [ %47, %25 ]
%27 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %26, i64 0
%28 = load i32, i32* %27
%29 = call i32 @vlr_igual(i32** %24, i32 %28)
%30 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %28, i32 %29)
%31 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %26, i64 1
%32 = load i32, i32* %31
%33 = call i32 @vlr_igual(i32** %24, i32 %32)
%34 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %32, i32 %33)
%35 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %26, i64 2
%36 = load i32, i32* %35
%37 = call i32 @vlr_igual(i32** %24, i32 %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %36, i32 %37)
%39 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %26, i64 3
%40 = load i32, i32* %39
%41 = call i32 @vlr_igual(i32** %24, i32 %40)
%42 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %40, i32 %41)
%43 = getelementptr inbounds [15 x [5 x i32]], [15 x [5 x i32]]* %1, i64 0, i64 %26, i64 4
%44 = load i32, i32* %43
%45 = call i32 @vlr_igual(i32** %24, i32 %44)
%46 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %44, i32 %45)
%47 = add nuw nsw i64 %26, 1
%48 = icmp eq i64 %47, 15
br i1 %48, label %49, label %25
49: ; preds = %25
ret void
}