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


x86 assembly (clang, -O0):
<printAugmentedMatrix>:
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    1197 <printAugmentedMatrix+0x87>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    117b <printAugmentedMatrix+0x6b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe9a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <printAugmentedMatrix+0x29>
lea    0xe83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printAugmentedMatrix+0x16>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%lf\09\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printAugmentedMatrix(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store double** %0, double*** %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
store i32 0, i32* %6
br label %12
12: ; preds = %28, %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 %31
17: ; preds = %12
%18 = load double**, double*** %3
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds double*, double** %18, i64 %20
%22 = load double*, double** %21
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double, double* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %26)
br label %28
28: ; preds = %17
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %12
31: ; preds = %12
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31
%34 = load i32, i32* %5
%35 = add nsw i32 %34, 1
store i32 %35, i32* %5
br label %7
36: ; preds = %7
ret void
}

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