#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 *, ...);
imprimir_matrices(float **e, float **w, int **root, int N) {
  int row, columns;
  printf("\nMatriz e\n");
  for (row = 0; row < N + 1; row++) {
    for (columns = 0; columns < N + 1; columns++)
      printf("%f ", e[row][columns]);
    printf("\n");
  }
  printf("\nMatriz raiz\n");
  for (row = 0; row < N; row++) {
    for (columns = 0; columns < N; columns++)
      printf("%d ", root[row][columns]);
    printf("\n");
  }
  printf("\nMatriz w\n");
  for (row = 0; row < N + 1; row++) {
    for (columns = 0; columns < N + 1; columns++)
      printf("%f ", w[row][columns]);
    printf("\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<imprimir_matrices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11b6 <imprimir_matrices+0xa6>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    119a <imprimir_matrices+0x8a>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe86(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1154 <imprimir_matrices+0x44>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    113c <imprimir_matrices+0x2c>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1235 <imprimir_matrices+0x125>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1219 <imprimir_matrices+0x109>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11de <imprimir_matrices+0xce>
lea    0xde9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11cb <imprimir_matrices+0xbb>
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12c4 <imprimir_matrices+0x1b4>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12a8 <imprimir_matrices+0x198>
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd78(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1262 <imprimir_matrices+0x152>
lea    0xd5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    124a <imprimir_matrices+0x13a>
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir_matrices>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
test   %ebp,%ebp
js     1295 <imprimir_matrices+0x165>
mov    %r15,0x10(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbp,(%rsp)
lea    0x1(%rbp),%r12d
xor    %r14d,%r14d
lea    0xe87(%rip),%r13
nopl   0x0(%rax)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx,%r14,8),%rax
movss  (%rax,%r15,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r13,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%r15
cmp    %r15,%r12
jne    1190 <imprimir_matrices+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
cmp    %r12,%r14
jne    1180 <imprimir_matrices+0x50>
lea    0xe47(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,(%rsp)
jle    122d <imprimir_matrices+0xfd>
mov    (%rsp),%r14d
lea    0xe23(%rip),%r13
xor    %ebx,%ebx
mov    0x10(%rsp),%r15
nopl   0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rax
mov    (%rax,%rbp,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1200 <imprimir_matrices+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r14,%rbx
jne    11f0 <imprimir_matrices+0xc0>
lea    0xdeb(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,(%rsp)
mov    0x8(%rsp),%r15
js     12ad <imprimir_matrices+0x17d>
xor    %ebx,%ebx
lea    0xdb3(%rip),%r14
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rax
movss  (%rax,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r12
jne    1260 <imprimir_matrices+0x130>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %r12,%rbx
jne    1250 <imprimir_matrices+0x120>
jmp    12ad <imprimir_matrices+0x17d>
lea    0xd76(%rip),%rdi
call   1040 <puts@plt>
lea    0xd77(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\0AMatriz e\0A\00"
@.str.1 = [4 x i8] c"%f \00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [14 x i8] c"\0AMatriz raiz\0A\00"
@.str.4 = [4 x i8] c"%d \00"
@.str.5 = [11 x i8] c"\0AMatriz w\0A\00"
define i32 @imprimir_matrices(float** %0, float** %1, i32** %2, i32 %3) {
%5 = alloca i32
%6 = alloca float**
%7 = alloca float**
%8 = alloca i32**
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store float** %0, float*** %6
store float** %1, float*** %7
store i32** %2, i32*** %8
store i32 %3, i32* %9
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %10
br label %13
13: ; preds = %41, %4
%14 = load i32, i32* %10
%15 = load i32, i32* %9
%16 = add nsw i32 %15, 1
%17 = icmp slt i32 %14, %16
br i1 %17, label %18, label %44
18: ; preds = %13
store i32 0, i32* %11
br label %19
19: ; preds = %36, %18
%20 = load i32, i32* %11
%21 = load i32, i32* %9
%22 = add nsw i32 %21, 1
%23 = icmp slt i32 %20, %22
br i1 %23, label %24, label %39
24: ; preds = %19
%25 = load float**, float*** %6
%26 = load i32, i32* %10
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float*, float** %25, i64 %27
%29 = load float*, float** %28
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds float, float* %29, i64 %31
%33 = load float, float* %32
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %34)
br label %36
36: ; preds = %24
%37 = load i32, i32* %11
%38 = add nsw i32 %37, 1
store i32 %38, i32* %11
br label %19
39: ; preds = %19
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %41
41: ; preds = %39
%42 = load i32, i32* %10
%43 = add nsw i32 %42, 1
store i32 %43, i32* %10
br label %13
44: ; preds = %13
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %10
br label %46
46: ; preds = %71, %44
%47 = load i32, i32* %10
%48 = load i32, i32* %9
%49 = icmp slt i32 %47, %48
br i1 %49, label %50, label %74
50: ; preds = %46
store i32 0, i32* %11
br label %51
51: ; preds = %66, %50
%52 = load i32, i32* %11
%53 = load i32, i32* %9
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %69
55: ; preds = %51
%56 = load i32**, i32*** %8
%57 = load i32, i32* %10
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32*, i32** %56, i64 %58
%60 = load i32*, i32** %59
%61 = load i32, i32* %11
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i32, i32* %60, i64 %62
%64 = load i32, i32* %63
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %55
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 1
store i32 %68, i32* %11
br label %51
69: ; preds = %51
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %71
71: ; preds = %69
%72 = load i32, i32* %10
%73 = add nsw i32 %72, 1
store i32 %73, i32* %10
br label %46
74: ; preds = %46
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %10
br label %76
76: ; preds = %104, %74
%77 = load i32, i32* %10
%78 = load i32, i32* %9
%79 = add nsw i32 %78, 1
%80 = icmp slt i32 %77, %79
br i1 %80, label %81, label %107
81: ; preds = %76
store i32 0, i32* %11
br label %82
82: ; preds = %99, %81
%83 = load i32, i32* %11
%84 = load i32, i32* %9
%85 = add nsw i32 %84, 1
%86 = icmp slt i32 %83, %85
br i1 %86, label %87, label %102
87: ; preds = %82
%88 = load float**, float*** %7
%89 = load i32, i32* %10
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds float*, float** %88, i64 %90
%92 = load float*, float** %91
%93 = load i32, i32* %11
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds float, float* %92, i64 %94
%96 = load float, float* %95
%97 = fpext float %96 to double
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %97)
br label %99
99: ; preds = %87
%100 = load i32, i32* %11
%101 = add nsw i32 %100, 1
store i32 %101, i32* %11
br label %82
102: ; preds = %82
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %104
104: ; preds = %102
%105 = load i32, i32* %10
%106 = add nsw i32 %105, 1
store i32 %106, i32* %10
br label %76
107: ; preds = %76
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%109 = load i32, i32* %5
ret i32 %109
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%f \00"
@.str.4 = [4 x i8] c"%d \00"
@str = [10 x i8] c"\0AMatriz e\00"
@str.6 = [13 x i8] c"\0AMatriz raiz\00"
@str.7 = [10 x i8] c"\0AMatriz w\00"
define i32 @imprimir_matrices(float** nocapture %0, float** nocapture %1, i32** nocapture %2, i32 %3) {
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%6 = icmp slt i32 %3, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0))
br label %70
10: ; preds = %4
%11 = add nuw i32 %3, 1
%12 = zext i32 %11 to i64
br label %13
13: ; preds = %25, %10
%14 = phi i64 [ 0, %10 ], [ %27, %25 ]
%15 = getelementptr inbounds float*, float** %0, i64 %14
br label %16
16: ; preds = %13, %16
%17 = phi i64 [ 0, %13 ], [ %23, %16 ]
%18 = load float*, float** %15
%19 = getelementptr inbounds float, float* %18, i64 %17
%20 = load float, float* %19
%21 = fpext float %20 to double
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %21)
%23 = add nuw nsw i64 %17, 1
%24 = icmp eq i64 %23, %12
br i1 %24, label %25, label %16
25: ; preds = %16
%26 = tail call i32 @putchar(i32 10)
%27 = add nuw nsw i64 %14, 1
%28 = icmp eq i64 %27, %12
br i1 %28, label %29, label %13
29: ; preds = %25
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
%31 = icmp sgt i32 %3, 0
br i1 %31, label %32, label %49
32: ; preds = %29
%33 = zext i32 %3 to i64
br label %34
34: ; preds = %45, %32
%35 = phi i64 [ 0, %32 ], [ %47, %45 ]
%36 = getelementptr inbounds i32*, i32** %2, i64 %35
br label %37
37: ; preds = %34, %37
%38 = phi i64 [ 0, %34 ], [ %43, %37 ]
%39 = load i32*, i32** %36
%40 = getelementptr inbounds i32, i32* %39, i64 %38
%41 = load i32, i32* %40
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %41)
%43 = add nuw nsw i64 %38, 1
%44 = icmp eq i64 %43, %33
br i1 %44, label %45, label %37
45: ; preds = %37
%46 = tail call i32 @putchar(i32 10)
%47 = add nuw nsw i64 %35, 1
%48 = icmp eq i64 %47, %33
br i1 %48, label %49, label %34
49: ; preds = %45, %29
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0))
br i1 %6, label %70, label %51
51: ; preds = %49
%52 = add nuw i32 %3, 1
%53 = zext i32 %52 to i64
br label %54
54: ; preds = %66, %51
%55 = phi i64 [ 0, %51 ], [ %68, %66 ]
%56 = getelementptr inbounds float*, float** %1, i64 %55
br label %57
57: ; preds = %54, %57
%58 = phi i64 [ 0, %54 ], [ %64, %57 ]
%59 = load float*, float** %56
%60 = getelementptr inbounds float, float* %59, i64 %58
%61 = load float, float* %60
%62 = fpext float %61 to double
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %62)
%64 = add nuw nsw i64 %58, 1
%65 = icmp eq i64 %64, %53
br i1 %65, label %66, label %57
66: ; preds = %57
%67 = tail call i32 @putchar(i32 10)
%68 = add nuw nsw i64 %55, 1
%69 = icmp eq i64 %68, %53
br i1 %69, label %70, label %54
70: ; preds = %66, %7, %49
%71 = tail call i32 @putchar(i32 10)
ret i32 undef
}