#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 *, ...);
print(int a[][2], int size) {
  printf("\nArray is\n");
  int i;
  for (i = 0; i < size; i++)
    printf("%d %d\n", a[i][0], a[i][1]);
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1173 <print+0x63>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%esi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    0x4(%rax,%rcx,8),%edx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <print+0x24>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
test   %ebp,%ebp
jle    116a <print+0x4a>
mov    %ebp,%r15d
lea    0xeba(%rip),%r14
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%esi
mov    0x4(%rbx,%rbp,8),%edx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1150 <print+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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