#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*/ maker_matriz(int, int, int **);
int /*<<< orphan*/ print(int, int, int **);
int /*<<< orphan*/ printf(char *);
scalar_t__ repeat(int, int, int **);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int matriz[100][100], m, n;
  printf("Informe o numero de linhas da matriz:\n");
  scanf("%d", &m);
  printf("Informe o numero de colunas da matriz:\n");
  scanf("%d", &n);
  maker_matriz(m, n, matriz);
  print(m, n, matriz);
  if (repeat(m, n, matriz)) {
    printf("\n");
    printf("Existem elementos repetidos.\n");
  } else {
    printf("\n");
    printf("Nao existem elementos repetidos.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x9c54(%rbp),%rsi
call   1070 <scanf@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdi
lea    -0x9c58(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x9c54(%rbp),%edi
mov    -0x9c58(%rbp),%esi
lea    -0x9c50(%rbp),%rdx
call   1060 <maker_matriz@plt>
mov    -0x9c54(%rbp),%edi
mov    -0x9c58(%rbp),%esi
lea    -0x9c50(%rbp),%rdx
call   1050 <print@plt>
mov    -0x9c54(%rbp),%edi
mov    -0x9c58(%rbp),%esi
lea    -0x9c50(%rbp),%rdx
call   1030 <repeat@plt>
cmp    $0x0,%rax
je     1216 <main+0xc6>
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
jmp    122e <main+0xde>
lea    0xe51(%rip),%rdi
call   1040 <printf@plt>
lea    0xe47(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x9c50,%rsp
lea    0xe94(%rip),%rdi
call   1040 <puts@plt>
lea    0xe85(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <scanf@plt>
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdx
call   1070 <maker_matriz@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    %rbx,%rdx
call   1060 <print@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    %rbx,%rdx
call   1050 <repeat@plt>
mov    %rax,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %rbx,%rbx
lea    0xe63(%rip),%rax
lea    0xe7d(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x9c50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Informe o numero de linhas da matriz:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [40 x i8] c"Informe o numero de colunas da matriz:\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [30 x i8] c"Existem elementos repetidos.\0A\00"
@.str.5 = [34 x i8] c"Nao existem elementos repetidos.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x [100 x i32]]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 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), i32* %7)
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 0
%16 = bitcast [100 x i32]* %15 to i32**
%17 = call i32 @maker_matriz(i32 %13, i32 %14, i32** %16)
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 0
%21 = bitcast [100 x i32]* %20 to i32**
%22 = call i32 @print(i32 %18, i32 %19, i32** %21)
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %6, i64 0, i64 0
%26 = bitcast [100 x i32]* %25 to i32**
%27 = call i64 @repeat(i32 %23, i32 %24, i32** %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %2
%30 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
br label %35
32: ; preds = %2
%33 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %35
35: ; preds = %32, %29
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [38 x i8] c"Informe o numero de linhas da matriz:\00"
@str.6 = [39 x i8] c"Informe o numero de colunas da matriz:\00"
@str.7 = [33 x i8] c"Nao existem elementos repetidos.\00"
@str.8 = [29 x i8] c"Existem elementos repetidos.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x [100 x i32]]
%4 = alloca i32
%5 = alloca i32
%6 = bitcast [100 x [100 x i32]]* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 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), i32* %4)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.6, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = bitcast [100 x [100 x i32]]* %3 to i32**
%16 = call i32 @maker_matriz(i32 %13, i32 %14, i32** %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i32 @print(i32 %17, i32 %18, i32** %15)
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = call i64 @repeat(i32 %20, i32 %21, i32** %15)
%23 = icmp eq i64 %22, 0
%24 = call i32 @putchar(i32 10)
%25 = select i1 %23, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str.8, i64 0, i64 0)
%26 = call i32 @puts(i8* dereferenceable(1) %25)
ret i32 0
}