#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 subsInit(int A[126][9]) {
  int j, k, t;
  for (j = 0; j < 126; j++)
    for (k = 0; k < 9; k++) {
      scanf("%d", &t);
      A[j][k] = t;
    }
}


x86 assembly (clang, -O0):
<subsInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x7e,-0xc(%rbp)
jge    1188 <subsInit+0x78>
movl   $0x0,-0x10(%rbp)
cmpl   $0x9,-0x10(%rbp)
jge    1175 <subsInit+0x65>
lea    0xebb(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x24,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <subsInit+0x24>
jmp    117a <subsInit+0x6a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <subsInit+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subsInit>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
mov    $0x20,%ebx
lea    0xed9(%rip),%r14
lea    0x4(%rsp),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x20(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x1c(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x18(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x14(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x10(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0xc(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x8(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,-0x4(%r12,%rbx,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,(%r12,%rbx,1)
add    $0x24,%rbx
cmp    $0x11d8,%rbx
jne    1130 <subsInit+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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