#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 *, ...);
void print2(float **a, int n) {
  int i, j;
  for (i = 0; i < n; i++) {
    printf("\n\t");
    for (j = 0; j < n; j++)
      printf("%.6f ", a[i][j]);
  }
  printf("\n\n");
}


x86 assembly (clang, -O0):
<print2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    119b <print2+0x8b>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1188 <print2+0x78>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe90(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <print2+0x37>
jmp    118d <print2+0x7d>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print2+0x16>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1189 <print2+0x69>
mov    %rdi,%r12
mov    %esi,%r13d
lea    0xec4(%rip),%r14
lea    0xec0(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%r12,%rbx,8),%rax
movss  (%rax,%rbp,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1160 <print2+0x40>
add    $0x1,%rbx
cmp    %r13,%rbx
jne    1150 <print2+0x30>
lea    0xe79(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\09\00"
@.str.1 = [6 x i8] c"%.6f \00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @print2(float** %0, i32 %1) {
%3 = alloca float**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float** %0, float*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %33, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %36
11: ; preds = %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %13
13: ; preds = %29, %11
%14 = load i32, i32* %6
%15 = load i32, i32* %4
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %32
17: ; preds = %13
%18 = load float**, float*** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds float*, float** %18, i64 %20
%22 = load float*, float** %21
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds float, float* %22, i64 %24
%26 = load float, float* %25
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %27)
br label %29
29: ; preds = %17
%30 = load i32, i32* %6
%31 = add nsw i32 %30, 1
store i32 %31, i32* %6
br label %13
32: ; preds = %13
br label %33
33: ; preds = %32
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %7
36: ; preds = %7
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0A\09\00"
@.str.1 = [6 x i8] c"%.6f \00"
@str = [2 x i8] c"\0A\00"
define void @print2(float** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %22
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %19, %4
%7 = phi i64 [ 0, %4 ], [ %20, %19 ]
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds float*, float** %0, i64 %7
br label %10
10: ; preds = %6, %10
%11 = phi i64 [ 0, %6 ], [ %17, %10 ]
%12 = load float*, float** %9
%13 = getelementptr inbounds float, float* %12, i64 %11
%14 = load float, float* %13
%15 = fpext float %14 to double
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %15)
%17 = add nuw nsw i64 %11, 1
%18 = icmp eq i64 %17, %5
br i1 %18, label %19, label %10
19: ; preds = %10
%20 = add nuw nsw i64 %7, 1
%21 = icmp eq i64 %20, %5
br i1 %21, label %22, label %6
22: ; preds = %19, %2
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}