#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 arg1, int arg2) {
  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, arg1, arg2);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<funcion1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x12,-0x44(%rbp)
movl   $0x13,-0x48(%rbp)
movl   $0x14,-0x4c(%rbp)
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1196 <funcion1+0x66>
movslq -0x14(%rbp),%rax
movl   $0x5,-0x40(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1172 <funcion1+0x42>
cmpl   $0x0,-0x8(%rbp)
jne    11ec <funcion1+0xbc>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    11e7 <funcion1+0xb7>
mov    -0x14(%rbp),%esi
movslq -0x14(%rbp),%rax
lea    -0x40(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
movslq -0x14(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%ecx
lea    0xe38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a7 <funcion1+0x77>
jmp    11fd <funcion1+0xcd>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <funcion1@plt>
mov    0x2ddc(%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   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
movaps 0xe9c(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movabs $0x500000005,%rax
mov    %rax,0x20(%rsp)
test   %ebx,%ebx
je     1191 <funcion1+0x51>
add    $0xffffffff,%ebx
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1060 <funcion1@plt>
jmp    11e0 <funcion1+0xa0>
lea    0xe78(%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
cs nopw 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    11c0 <funcion1+0x80>
mov    0x2df9(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
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, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [10 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 0, i32* %8
store i32 18, i32* %10
store i32 19, i32* %11
store i32 20, i32* %12
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %8
br label %14
14: ; preds = %21, %3
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %19
store i32 5, i32* %20
br label %21
21: ; preds = %17
%22 = load i32, i32* %8
%23 = add nsw i32 %22, 1
store i32 %23, i32* %8
br label %14
24: ; preds = %14
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 0
br i1 %26, label %27, label %45
27: ; preds = %24
store i32 0, i32* %8
br label %28
28: ; preds = %41, %27
%29 = load i32, i32* %8
%30 = icmp slt i32 %29, 100
br i1 %30, label %31, label %44
31: ; preds = %28
%32 = load i32, i32* %8
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %34
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %9, 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* %8
%43 = add nsw i32 %42, 1
store i32 %43, i32* %8
br label %28
44: ; preds = %28
br label %51
45: ; preds = %24
%46 = load i32, i32* %5
%47 = sub nsw i32 %46, 1
%48 = load i32, i32* %6
%49 = load i32, i32* %7
%50 = call i32 @funcion1(i32 %47, i32 %48, i32 %49)
br label %51
51: ; preds = %45, %44
%52 = load i32, i32* @stdout
%53 = call i32 @fflush(i32 %52)
%54 = load i32, i32* %4
ret i32 %54
}

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