#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_mat_llu(unsigned long long **mat) {
  int i, j;
  for (i = 0; i < (1024 * 2); i++) {
    for (j = 0; j < (1024 * 2); j++) {
      printf("%llu ", mat[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_mat_llu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x800,-0xc(%rbp)
jge    1190 <print_mat_llu+0x80>
movl   $0x0,-0x10(%rbp)
cmpl   $0x800,-0x10(%rbp)
jge    1174 <print_mat_llu+0x64>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1137 <print_mat_llu+0x27>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print_mat_llu+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mat_llu>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
lea    0xece(%rip),%r14
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%r12,8),%rax
mov    (%rax,%rbx,8),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x800,%rbx
jne    1150 <print_mat_llu+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12
cmp    $0x800,%r12
jne    1140 <print_mat_llu+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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