#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;
  }
  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>
cmpl   $0x0,-0x8(%rbp)
jne    11e6 <funcion1+0xb6>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    11e1 <funcion1+0xb1>
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    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a1 <funcion1+0x71>
jmp    11f1 <funcion1+0xc1>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1050 <funcion1@plt>
mov    0x2de8(%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 = load i32, i32* %3
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %41
23: ; preds = %20
store i32 0, i32* %4
br label %24
24: ; preds = %37, %23
%25 = load i32, i32* %4
%26 = icmp slt i32 %25, 100
br i1 %26, label %27, label %40
27: ; preds = %24
%28 = load i32, i32* %4
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 %30
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %5, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %28, i32* %31, i32 %35)
br label %37
37: ; preds = %27
%38 = load i32, i32* %4
%39 = add nsw i32 %38, 1
store i32 %39, i32* %4
br label %24
40: ; preds = %24
br label %45
41: ; preds = %20
%42 = load i32, i32* %3
%43 = sub nsw i32 %42, 1
%44 = call i32 @funcion1(i32 %43)
br label %45
45: ; preds = %41, %40
%46 = load i32, i32* @stdout
%47 = call i32 @fflush(i32 %46)
%48 = load i32, i32* %2
ret i32 %48
}

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
}