#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*/ good(int **, int, int);
int /*<<< orphan*/ inar(int **, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int ar[100][100];
  int r, c;
  scanf("%d%d", &r, &c);
  inar(ar, r, c);
  if (r == 1 && c == 1) {
    printf("1 1 1");
  } else
    good(ar, r, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
lea    -0x9c54(%rbp),%rsi
lea    -0x9c58(%rbp),%rdx
call   1060 <scanf@plt>
lea    -0x9c50(%rbp),%rdi
mov    -0x9c54(%rbp),%esi
mov    -0x9c58(%rbp),%edx
call   1050 <inar@plt>
cmpl   $0x1,-0x9c54(%rbp)
jne    11af <main+0x6f>
cmpl   $0x1,-0x9c58(%rbp)
jne    11af <main+0x6f>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
jmp    11c7 <main+0x87>
lea    -0x9c50(%rbp),%rdi
mov    -0x9c54(%rbp),%esi
mov    -0x9c58(%rbp),%edx
call   1030 <good@plt>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x9c58,%rsp
lea    0xeb2(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <scanf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0x10(%rsp),%rdi
call   1050 <inar@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
cmp    $0x1,%esi
jne    118f <main+0x4f>
cmp    $0x1,%edx
jne    118f <main+0x4f>
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
jmp    1199 <main+0x59>
lea    0x10(%rsp),%rdi
call   1030 <good@plt>
xor    %eax,%eax
add    $0x9c58,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"1 1 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x i32]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %2, i64 0, i64 0
%7 = bitcast [100 x i32]* %6 to i32**
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @inar(i32** %7, i32 %8, i32 %9)
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %0
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %24
18: ; preds = %13, %0
%19 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %2, i64 0, i64 0
%20 = bitcast [100 x i32]* %19 to i32**
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @good(i32** %20, i32 %21, i32 %22)
br label %24
24: ; preds = %18, %16
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [6 x i8] c"1 1 1\00"
define i32 @main() {
%1 = alloca [100 x [100 x i32]]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [100 x [100 x i32]]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = bitcast [100 x [100 x i32]]* %1 to i32**
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = call i32 @inar(i32** %8, i32 %9, i32 %10)
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 1
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 1
%16 = select i1 %13, i1 %15, i1 false
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %21
19: ; preds = %0
%20 = call i32 @good(i32** %8, i32 %12, i32 %14)
br label %21
21: ; preds = %19, %17
ret i32 0
}