#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 print(double aug_matrix[][10 * 10 + 1], int n) {
  int i, j;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n + 1; j++)
      printf(" %6.2lf", aug_matrix[i][j]);
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print>:
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    119d <print+0x8d>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1181 <print+0x71>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe94(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <print+0x29>
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1192 <print+0x72>
mov    %esi,%r14d
mov    %rdi,%rbx
mov    %esi,%r12d
add    $0x1,%r14d
xor    %r13d,%r13d
lea    0xeba(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rbx,%rbp,8),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1160 <print+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
add    $0x328,%rbx
cmp    %r12,%r13
jne    1150 <print+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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