#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*/ comparar(int, int, int **, int **);
int /*<<< orphan*/ introduce(int, int, int **);
int /*<<< orphan*/ printf(char *);
int **reservar(int, int);
int /*<<< orphan*/ scanf_s(char *, int *);
int /*<<< orphan*/ system(char *);
int main() {
  int filas, colum;
  int **m1;
  int **m2;
  printf("introduce el numero de filas: ");
  scanf_s("%i", &filas);
  printf("introduce el numero de columnas: ");
  scanf_s("%i", &colum);
  m1 = reservar(filas, colum);
  m2 = reservar(filas, colum);
  introduce(filas, colum, m1);
  introduce(filas, colum, m2);
  comparar(filas, colum, m1, m2);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1060 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1080 <scanf_s@plt>
lea    0xe90(%rip),%rdi
call   1060 <printf@plt>
lea    0xe81(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1080 <scanf_s@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <reservar@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <reservar@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1070 <introduce@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1070 <introduce@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <comparar@plt>
lea    0xe47(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xe95(%rip),%rdi
call   1060 <printf@plt>
lea    0xea8(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1080 <scanf_s@plt>
lea    0xe97(%rip),%rdi
call   1060 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1080 <scanf_s@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <reservar@plt>
mov    %rax,%r14
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1030 <reservar@plt>
mov    %rax,%rbx
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    %r14,%rdx
call   1070 <introduce@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    %rbx,%rdx
call   1070 <introduce@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <comparar@plt>
lea    0xe54(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"introduce el numero de filas: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [34 x i8] c"introduce el numero de columnas: \00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32**
%5 = alloca i32**
store i32 0, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32** @reservar(i32 %10, i32 %11)
store i32** %12, i32*** %4
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = call i32** @reservar(i32 %13, i32 %14)
store i32** %15, i32*** %5
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = load i32**, i32*** %4
%19 = call i32 @introduce(i32 %16, i32 %17, i32** %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32**, i32*** %5
%23 = call i32 @introduce(i32 %20, i32 %21, i32** %22)
%24 = load i32, i32* %2
%25 = load i32, i32* %3
%26 = load i32**, i32*** %4
%27 = load i32**, i32*** %5
%28 = call i32 @comparar(i32 %24, i32 %25, i32** %26, i32** %27)
%29 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"introduce el numero de filas: \00"
@.str.1 = [3 x i8] c"%i\00"
@.str.2 = [34 x i8] c"introduce el numero de columnas: \00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = call i32** @reservar(i32 %9, i32 %10)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = call i32** @reservar(i32 %12, i32 %13)
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = call i32 @introduce(i32 %15, i32 %16, i32** %11)
%18 = load i32, i32* %1
%19 = load i32, i32* %2
%20 = call i32 @introduce(i32 %18, i32 %19, i32** %14)
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = call i32 @comparar(i32 %21, i32 %22, i32** %11, i32** %14)
%24 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}