#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*/ 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, n1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    %rdi,-0x30(%rbp)
call   1040 <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,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%esi
call   1030 <read_into_array@plt>
mov    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%esi
call   1030 <read_into_array@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   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <read_into_array@plt>
mov    %r14,%rdi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1030 <read_into_array@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
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 = load i32, i32* %2
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %4
%12 = alloca i32, i64 %10
store i64 %10, i64* %5
%13 = load i32, i32* %2
%14 = call i32 @read_into_array(i32* %12, i32 %13)
%15 = load i32, i32* %3
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32, i32* %3
%18 = zext i32 %17 to i64
%19 = alloca i32, i64 %18
store i64 %18, i64* %6
%20 = load i32, i32* %2
%21 = call i32 @read_into_array(i32* %19, i32 %20)
store i32 0, i32* %1
%22 = load i8*, i8** %4
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [0 x i32]
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%3 = getelementptr inbounds [0 x i32], [0 x i32]* %1, i64 0, i64 0
%4 = call i32 @read_into_array(i32* %3, i32 undef)
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
%6 = call i32 @read_into_array(i32* %3, i32 undef)
ret i32 0
}