#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int funcion1(int n) {
  int i = 0;
  int a[10];
  int b = 18;
  int bb = 19;
  int bbb = 20;
  printf("funcion1\n");
  for (i = 0; i < 10; i++) {
    a[i] = 5;
  }
  a[89] = a[89] + 5;
  ;
  if (n == 0) {
    for (i = 0; i < 100; i++) {
      printf("%d - \t%p %i\n", i, &(a[i]), a[i]);
    }
  } else
    funcion1(n - 1);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<funcion1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x12,-0x44(%rbp)
movl   $0x13,-0x48(%rbp)
movl   $0x14,-0x4c(%rbp)
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1190 <funcion1+0x60>
movslq -0xc(%rbp),%rax
movl   $0x5,-0x40(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116c <funcion1+0x3c>
mov    0x124(%rbp),%eax
add    $0x5,%eax
mov    %eax,0x124(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    11f5 <funcion1+0xc5>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    11f0 <funcion1+0xc0>
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
lea    -0x40(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
movslq -0xc(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b0 <funcion1+0x80>
jmp    1200 <funcion1+0xd0>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1050 <funcion1@plt>
mov    0x2dd9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcion1>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %edi,%ebx
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
movaps 0xea2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movabs $0x500000005,%rax
mov    %rax,0x20(%rsp)
test   %ebx,%ebx
je     1186 <funcion1+0x46>
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1060 <funcion1@plt>
jmp    11d0 <funcion1+0x90>
lea    0xe83(%rip),%r14
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x5,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%r15
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15),%ecx
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
add    $0x4,%r15
cmp    $0x64,%rbx
jne    11b0 <funcion1+0x70>
mov    0x2e09(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"funcion1\0A\00"
@.str.1 = [13 x i8] c"%d - \09%p %i\0A\00"
@stdout = global i32 0
define i32 @funcion1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
store i32 18, i32* %6
store i32 19, i32* %7
store i32 20, i32* %8
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %10
10: ; preds = %17, %1
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 10
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 %15
store i32 5, i32* %16
br label %17
17: ; preds = %13
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %10
20: ; preds = %10
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 89
%22 = load i32, i32* %21
%23 = add nsw i32 %22, 5
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 89
store i32 %23, i32* %24
%25 = load i32, i32* %3
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %45
27: ; preds = %20
store i32 0, i32* %4
br label %28
28: ; preds = %41, %27
%29 = load i32, i32* %4
%30 = icmp slt i32 %29, 100
br i1 %30, label %31, label %44
31: ; preds = %28
%32 = load i32, i32* %4
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 %34
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32* %35, i32 %39)
br label %41
41: ; preds = %31
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %28
44: ; preds = %28
br label %49
45: ; preds = %20
%46 = load i32, i32* %3
%47 = sub nsw i32 %46, 1
%48 = call i32 @funcion1(i32 %47)
br label %49
49: ; preds = %45, %44
%50 = load i32, i32* @stdout
%51 = call i32 @fflush(i32 %50)
%52 = load i32, i32* %2
ret i32 %52
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%d - \09%p %i\0A\00"
@stdout = global i32 0
@str = [9 x i8] c"funcion1\00"
define i32 @funcion1(i32 %0) {
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %2 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%5 = bitcast [10 x i32]* %2 to <4 x i32>*
store <4 x i32> <i32 5, i32 5, i32 5, i32 5>, <4 x i32>* %5
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 4
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 5, i32 5, i32 5, i32 5>, <4 x i32>* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 8
store i32 5, i32* %8
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 9
store i32 5, i32* %9
%10 = icmp eq i32 %0, 0
br i1 %10, label %11, label %23
11: ; preds = %1
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* %12, i32 5)
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 1, %11 ], [ %21, %14 ]
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %15
%17 = load i32, i32* %16
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %15
%19 = trunc i64 %15 to i32
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32* %18, i32 %17)
%21 = add nuw nsw i64 %15, 1
%22 = icmp eq i64 %21, 100
br i1 %22, label %26, label %14
23: ; preds = %1
%24 = add nsw i32 %0, -1
%25 = tail call i32 @funcion1(i32 %24)
br label %26
26: ; preds = %14, %23
%27 = load i32, i32* @stdout
%28 = call i32 @fflush(i32 %27)
ret i32 undef
}