#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*/ impresionMapa(int **, int, int, int, int);
int /*<<< orphan*/ system(char *);
void salto_adelante(int posicioHorizontalMario, int posicionVerticalMario,
                    int nivel1[14][212], int posicionHorizontalMarioRelativa) {
  int i, j;
  for (i = 0; i < 2; ++i) {
    system("clear");
    system("cls");
    posicionVerticalMario--;
    posicionVerticalMario--;
    posicioHorizontalMario++;
    if (posicionHorizontalMarioRelativa < 39)
      posicionHorizontalMarioRelativa++;
    posicionHorizontalMarioRelativa++;
    impresionMapa(nivel1, 40, posicioHorizontalMario, posicionVerticalMario,
                  posicionHorizontalMarioRelativa);
    for (int j = 0; j < 100000000; ++j) {
    }
  }
  for (i = 0; i < 2; ++i) {
    system("clear");
    system("cls");
    posicionVerticalMario++;
    posicionVerticalMario++;
    posicioHorizontalMario++;
    if (posicionHorizontalMarioRelativa < 39)
      posicionHorizontalMarioRelativa++;
    impresionMapa(nivel1, 40, posicioHorizontalMario, posicionVerticalMario,
                  posicionHorizontalMarioRelativa);
    for (int j = 0; j < 100000000; ++j) {
    }
  }
}


x86 assembly (clang, -O0):
<salto_adelante>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
jge    11e7 <salto_adelante+0xc7>
lea    0xeb3(%rip),%rdi
call   1030 <system@plt>
lea    0xead(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x27,-0x14(%rbp)
jge    118c <salto_adelante+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x28,%esi
call   1040 <impresionMapa@plt>
movl   $0x0,-0x20(%rbp)
cmpl   $0x5f5e100,-0x20(%rbp)
jge    11d4 <salto_adelante+0xb4>
jmp    11c6 <salto_adelante+0xa6>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b4 <salto_adelante+0x94>
jmp    11d9 <salto_adelante+0xb9>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113c <salto_adelante+0x1c>
movl   $0x0,-0x18(%rbp)
cmpl   $0x2,-0x18(%rbp)
jge    1290 <salto_adelante+0x170>
lea    0xe01(%rip),%rdi
call   1030 <system@plt>
lea    0xdfb(%rip),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x27,-0x14(%rbp)
jge    123e <salto_adelante+0x11e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    $0x28,%esi
call   1040 <impresionMapa@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x5f5e100,-0x24(%rbp)
jge    127d <salto_adelante+0x15d>
jmp    126f <salto_adelante+0x14f>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    125d <salto_adelante+0x13d>
jmp    1282 <salto_adelante+0x162>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ee <salto_adelante+0xce>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<salto_adelante>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %esi,%ebx
mov    %edi,%r13d
lea    0xec1(%rip),%rdi
call   1030 <system@plt>
lea    0xebb(%rip),%r14
mov    %r14,%rdi
call   1030 <system@plt>
lea    -0x2(%rbx),%ecx
mov    %ecx,0xc(%rsp)
mov    %rbx,0x10(%rsp)
lea    0x1(%r13),%edx
xor    %eax,%eax
cmp    $0x27,%ebp
setl   %al
mov    %ebp,%r12d
add    %eax,%r12d
add    %eax,%ebp
add    $0x1,%ebp
mov    %r15,%rdi
mov    $0x28,%esi
mov    %ebp,%r8d
call   1040 <impresionMapa@plt>
lea    0xe73(%rip),%rdi
call   1030 <system@plt>
mov    %r14,%rdi
call   1030 <system@plt>
lea    -0x4(%rbx),%ecx
lea    0x2(%r13),%edx
xor    %eax,%eax
cmp    $0x27,%ebp
setl   %al
lea    (%rax,%r12,1),%r14d
add    $0x1,%r14d
lea    0x2(%rax,%r12,1),%ebp
mov    %r15,%rdi
mov    $0x28,%esi
mov    %ebp,%r8d
call   1040 <impresionMapa@plt>
lea    0xe33(%rip),%rbx
mov    %rbx,%rdi
call   1030 <system@plt>
lea    0xe2a(%rip),%r12
mov    %r12,%rdi
call   1030 <system@plt>
lea    0x3(%r13),%edx
xor    %eax,%eax
cmp    $0x27,%ebp
setl   %al
lea    (%rax,%r14,1),%ebp
add    $0x1,%ebp
mov    %r15,%rdi
mov    $0x28,%esi
mov    0xc(%rsp),%ecx
mov    %ebp,%r8d
call   1040 <impresionMapa@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
mov    %r12,%rdi
call   1030 <system@plt>
add    $0x4,%r13d
xor    %r8d,%r8d
cmp    $0x27,%ebp
setl   %r8b
add    %ebp,%r8d
mov    %r15,%rdi
mov    $0x28,%esi
mov    %r13d,%edx
mov    0x10(%rsp),%rcx
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <impresionMapa@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [4 x i8] c"cls\00"
define void @salto_adelante(i32 %0, i32 %1, [212 x i32]* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca [212 x i32]*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store [212 x i32]* %2, [212 x i32]** %7
store i32 %3, i32* %8
store i32 0, i32* %9
br label %13
13: ; preds = %47, %4
%14 = load i32, i32* %9
%15 = icmp slt i32 %14, 2
br i1 %15, label %16, label %50
16: ; preds = %13
%17 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %6
%20 = add nsw i32 %19, -1
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = add nsw i32 %21, -1
store i32 %22, i32* %6
%23 = load i32, i32* %5
%24 = add nsw i32 %23, 1
store i32 %24, i32* %5
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 39
br i1 %26, label %27, label %30
27: ; preds = %16
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %30
30: ; preds = %27, %16
%31 = load i32, i32* %8
%32 = add nsw i32 %31, 1
store i32 %32, i32* %8
%33 = load [212 x i32]*, [212 x i32]** %7
%34 = bitcast [212 x i32]* %33 to i32**
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = load i32, i32* %8
%38 = call i32 @impresionMapa(i32** %34, i32 40, i32 %35, i32 %36, i32 %37)
store i32 0, i32* %11
br label %39
39: ; preds = %43, %30
%40 = load i32, i32* %11
%41 = icmp slt i32 %40, 100000000
br i1 %41, label %42, label %46
42: ; preds = %39
br label %43
43: ; preds = %42
%44 = load i32, i32* %11
%45 = add nsw i32 %44, 1
store i32 %45, i32* %11
br label %39
46: ; preds = %39
br label %47
47: ; preds = %46
%48 = load i32, i32* %9
%49 = add nsw i32 %48, 1
store i32 %49, i32* %9
br label %13
50: ; preds = %13
store i32 0, i32* %9
br label %51
51: ; preds = %83, %50
%52 = load i32, i32* %9
%53 = icmp slt i32 %52, 2
br i1 %53, label %54, label %86
54: ; preds = %51
%55 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%56 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
%61 = load i32, i32* %5
%62 = add nsw i32 %61, 1
store i32 %62, i32* %5
%63 = load i32, i32* %8
%64 = icmp slt i32 %63, 39
br i1 %64, label %65, label %68
65: ; preds = %54
%66 = load i32, i32* %8
%67 = add nsw i32 %66, 1
store i32 %67, i32* %8
br label %68
68: ; preds = %65, %54
%69 = load [212 x i32]*, [212 x i32]** %7
%70 = bitcast [212 x i32]* %69 to i32**
%71 = load i32, i32* %5
%72 = load i32, i32* %6
%73 = load i32, i32* %8
%74 = call i32 @impresionMapa(i32** %70, i32 40, i32 %71, i32 %72, i32 %73)
store i32 0, i32* %12
br label %75
75: ; preds = %79, %68
%76 = load i32, i32* %12
%77 = icmp slt i32 %76, 100000000
br i1 %77, label %78, label %82
78: ; preds = %75
br label %79
79: ; preds = %78
%80 = load i32, i32* %12
%81 = add nsw i32 %80, 1
store i32 %81, i32* %12
br label %75
82: ; preds = %75
br label %83
83: ; preds = %82
%84 = load i32, i32* %9
%85 = add nsw i32 %84, 1
store i32 %85, i32* %9
br label %51
86: ; preds = %51
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [4 x i8] c"cls\00"
define void @salto_adelante(i32 %0, i32 %1, [212 x i32]* %2, i32 %3) {
%5 = bitcast [212 x i32]* %2 to i32**
%6 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = add nsw i32 %1, -2
%9 = add nsw i32 %0, 1
%10 = icmp slt i32 %3, 39
%11 = zext i1 %10 to i32
%12 = add i32 %3, 1
%13 = add i32 %12, %11
%14 = tail call i32 @impresionMapa(i32** %5, i32 40, i32 %9, i32 %8, i32 %13)
%15 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%17 = add nsw i32 %1, -4
%18 = add nsw i32 %0, 2
%19 = icmp slt i32 %13, 39
%20 = zext i1 %19 to i32
%21 = add i32 %13, 1
%22 = add i32 %21, %20
%23 = tail call i32 @impresionMapa(i32** %5, i32 40, i32 %18, i32 %17, i32 %22)
%24 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%25 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%26 = add nsw i32 %0, 3
%27 = icmp slt i32 %22, 39
%28 = zext i1 %27 to i32
%29 = add nsw i32 %22, %28
%30 = tail call i32 @impresionMapa(i32** %5, i32 40, i32 %26, i32 %8, i32 %29)
%31 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%32 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%33 = add nsw i32 %0, 4
%34 = icmp slt i32 %29, 39
%35 = zext i1 %34 to i32
%36 = add nsw i32 %29, %35
%37 = tail call i32 @impresionMapa(i32** %5, i32 40, i32 %33, i32 %1, i32 %36)
ret void
}