#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_s(char *, int *);
void introduce(int filas, int colum, int **mat) {
  int i, j;
  for (i = 0; i < filas; i++) {
    for (j = 0; j < colum; j++) {
      printf("Introduce el valor para el elemento [%i][%i]: ", i, j);
      scanf_s("%i", &mat[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<introduce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11ae <introduce+0x8e>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119b <introduce+0x7b>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xea7(%rip),%rdi
call   1040 <scanf_s@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114c <introduce+0x2c>
jmp    11a0 <introduce+0x80>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <introduce+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<introduce>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,0xc(%rsp)
test   %edi,%edi
jle    11ae <introduce+0x8e>
mov    %rdx,%r13
mov    %edi,%eax
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%r14d
shl    $0x2,%r14
xor    %ebp,%ebp
lea    0xeae(%rip),%r12
jmp    116b <introduce+0x4b>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rbp
cmp    0x10(%rsp),%rbp
je     11ae <introduce+0x8e>
cmpl   $0x0,0xc(%rsp)
jle    1160 <introduce+0x40>
xor    %r15d,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    0x0(%r13,%rbp,8),%rsi
add    %r15,%rsi
lea    0xe94(%rip),%rdi
call   1040 <scanf_s@plt>
add    $0x1,%ebx
add    $0x4,%r15
cmp    %r15,%r14
jne    1180 <introduce+0x60>
jmp    1160 <introduce+0x40>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"Introduce el valor para el elemento [%i][%i]: \00"
@.str.1 = [3 x i8] c"%i\00"
define void @introduce(i32 %0, i32 %1, i32** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32**
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32** %2, i32*** %6
store i32 0, i32* %7
br label %9
9: ; preds = %35, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %38
13: ; preds = %9
store i32 0, i32* %8
br label %14
14: ; preds = %31, %13
%15 = load i32, i32* %8
%16 = load i32, i32* %5
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = load i32, i32* %7
%20 = load i32, i32* %8
%21 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20)
%22 = load i32**, i32*** %6
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32*, i32** %22, i64 %24
%26 = load i32*, i32** %25
%27 = load i32, i32* %8
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %26, i64 %28
%30 = call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %29)
br label %31
31: ; preds = %18
%32 = load i32, i32* %8
%33 = add nsw i32 %32, 1
store i32 %33, i32* %8
br label %14
34: ; preds = %14
br label %35
35: ; preds = %34
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
br label %9
38: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Introduce el valor para el elemento [%i][%i]: \00"
@.str.1 = [3 x i8] c"%i\00"
define void @introduce(i32 %0, i32 %1, i32** nocapture %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %26
5: ; preds = %3
%6 = icmp sgt i32 %1, 0
%7 = zext i32 %0 to i64
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %5, %23
%10 = phi i64 [ 0, %5 ], [ %24, %23 ]
br i1 %6, label %11, label %23
11: ; preds = %9
%12 = getelementptr inbounds i32*, i32** %2, i64 %10
%13 = trunc i64 %10 to i32
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 0, %11 ], [ %21, %14 ]
%16 = trunc i64 %15 to i32
%17 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %16)
%18 = load i32*, i32** %12
%19 = getelementptr inbounds i32, i32* %18, i64 %15
%20 = tail call i32 @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = add nuw nsw i64 %15, 1
%22 = icmp eq i64 %21, %8
br i1 %22, label %23, label %14
23: ; preds = %14, %9
%24 = add nuw nsw i64 %10, 1
%25 = icmp eq i64 %24, %7
br i1 %25, label %26, label %9
26: ; preds = %23, %3
ret void
}