#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*/ scanf(char *, char *);
void import_maze(char maze[23][30]) {
  int i, j;
  printf("Importando matriz\n");
  for (i = 0; i < 23; i++) {
    for (j = 0; j < 30; j++) {
      scanf("%c", &maze[i][j]);
      printf("%c", maze[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<import_maze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x17,-0xc(%rbp)
jge    11c4 <import_maze+0xa4>
movl   $0x0,-0x10(%rbp)
cmpl   $0x1e,-0x10(%rbp)
jge    11b1 <import_maze+0x91>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
imul   $0x1e,%rax,%rax
add    %rax,%rsi
movslq -0x10(%rbp),%rax
add    %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x1e,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <import_maze+0x32>
jmp    11b6 <import_maze+0x96>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <import_maze+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<import_maze>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
xor    %r15d,%r15d
lea    0xeaf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r12,%rbx,1),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
movsbl (%r12,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x1e,%rbx
jne    1170 <import_maze+0x40>
add    $0x1,%r15
add    $0x1e,%r12
cmp    $0x17,%r15
jne    1160 <import_maze+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@str = [18 x i8] c"Importando matriz\00"
define void @import_maze([30 x i8]* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %1, %14
%4 = phi i64 [ 0, %1 ], [ %15, %14 ]
br label %5
5: ; preds = %3, %5
%6 = phi i64 [ 0, %3 ], [ %12, %5 ]
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %0, i64 %4, i64 %6
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = add nuw nsw i64 %6, 1
%13 = icmp eq i64 %12, 30
br i1 %13, label %14, label %5
14: ; preds = %5
%15 = add nuw nsw i64 %4, 1
%16 = icmp eq i64 %15, 23
br i1 %16, label %17, label %3
17: ; preds = %14
ret void
}