#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*/ scanf(char *, int *);
void inputMatrices(int arr[][4], size_t size) {
  for (int i = 0; i < size; i++)
    for (int j = 0; j < size; j++)
      scanf("%d", &arr[i][j]);
}


x86 assembly (clang, -O0):
<inputMatrices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1191 <inputMatrices+0x81>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    117e <inputMatrices+0x6e>
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rsi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe95(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113c <inputMatrices+0x2c>
jmp    1183 <inputMatrices+0x73>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <inputMatrices+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputMatrices>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     1162 <inputMatrices+0x52>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %r13d,%r13d
lea    0xed0(%rip),%r12
mov    %r14,%rbp
mov    %r15,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%rbp
jne    1140 <inputMatrices+0x30>
add    $0x1,%r13
add    $0x10,%r15
cmp    %r14,%r13
jne    1130 <inputMatrices+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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