#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*/ check_subarray(int *, int *, int, int);
int /*<<< orphan*/ read_into_array(int *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n1, n2;
  scanf("%d", &n1);
  int A1[n1];
  read_into_array(A1, n1);
  scanf("%d", &n2);
  int A2[n2];
  read_into_array(A2, n2);
  check_subarray(A1, A2, n1, n2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    %rdi,-0x40(%rbp)
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x38(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%esi
call   1030 <read_into_array@plt>
mov    -0x40(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0xc(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%esi
call   1030 <read_into_array@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1040 <check_subarray@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xeba(%rip),%r14
lea    -0x24(%rbp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    %rsp,%r12
mov    -0x24(%rbp),%eax
mov    %rsp,%r15
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x24(%rbp),%esi
mov    %r15,%rdi
call   1030 <read_into_array@plt>
lea    -0x28(%rbp),%rsi
mov    %r14,%rdi
call   1050 <scanf@plt>
mov    -0x28(%rbp),%esi
mov    %rsp,%rbx
lea    0xf(,%rsi,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1030 <read_into_array@plt>
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <check_subarray@plt>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
store i8* %10, i8** %4
%11 = alloca i32, i64 %9
store i64 %9, i64* %5
%12 = load i32, i32* %2
%13 = call i32 @read_into_array(i32* %11, i32 %12)
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%15 = load i32, i32* %3
%16 = zext i32 %15 to i64
%17 = alloca i32, i64 %16
store i64 %16, i64* %6
%18 = load i32, i32* %3
%19 = call i32 @read_into_array(i32* %17, i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = call i32 @check_subarray(i32* %11, i32* %17, i32 %20, i32 %21)
store i32 0, i32* %1
%23 = load i8*, i8** %4
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = alloca i32, i64 %7
%10 = load i32, i32* %1
%11 = call i32 @read_into_array(i32* %9, i32 %10)
%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 = zext i32 %13 to i64
%15 = alloca i32, i64 %14
%16 = call i32 @read_into_array(i32* %15, i32 %13)
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = call i32 @check_subarray(i32* %9, i32* %15, i32 %17, i32 %18)
ret i32 0
}