#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*/ read_matrix(int, int, int **);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ verifica(int, int, int **);
int main(int argc, const char *argv[]) {
  int a[100][100], m, n;
  printf("Informe o valor de m: ");
  scanf("%d", &m);
  printf("Informe o valor de n: ");
  scanf("%d", &n);
  read_matrix(m, n, a);
  if (verifica(m, n, a)) {
    printf("Existe elementos repetidos.\n");
  } else {
    printf("Nao existe 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    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0xeab(%rip),%rdi
lea    -0x9c54(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
lea    -0x9c58(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x9c54(%rbp),%edi
mov    -0x9c58(%rbp),%esi
lea    -0x9c50(%rbp),%rdx
call   1050 <read_matrix@plt>
mov    -0x9c54(%rbp),%edi
mov    -0x9c58(%rbp),%esi
lea    -0x9c50(%rbp),%rdx
call   1040 <verifica@plt>
cmp    $0x0,%rax
je     11e2 <main+0xa2>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    11ee <main+0xae>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x9c50,%rsp
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
lea    0xeac(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdx
call   1060 <read_matrix@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    %rbx,%rdx
call   1050 <verifica@plt>
test   %rax,%rax
lea    0xe71(%rip),%rax
lea    0xe8a(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x9c50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Informe o valor de m: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Informe o valor de n: \00"
@.str.3 = [29 x i8] c"Existe elementos repetidos.\0A\00"
@.str.4 = [33 x i8] c"Nao existe 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 ([23 x i8], [23 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 ([23 x i8], [23 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 @read_matrix(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 i64 @verifica(i32 %18, i32 %19, i32** %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %2
%25 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %28
26: ; preds = %2
%27 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Informe o valor de m: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [23 x i8] c"Informe o valor de n: \00"
@str = [32 x i8] c"Nao existe elementos repetidos.\00"
@str.5 = [28 x i8] c"Existe 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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* %5)
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = bitcast [100 x [100 x i32]]* %3 to i32**
%16 = call i32 @read_matrix(i32 %13, i32 %14, i32** %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = call i64 @verifica(i32 %17, i32 %18, i32** %15)
%20 = icmp eq i64 %19, 0
%21 = select i1 %20, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @str.5, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
ret i32 0
}