Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


int x,y;
int sx[200],sy[200],gx[1000],gy[1000],m,n,ss;
void Ssort(){
	int a,b,c;
	for(a=0;a<m-1;a++){
		for(b=a;b<m;b++){
			if(sy[a]>sy[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
			if(sy[a]==sy[b] && sx[a]>sx[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
		}
	}
}
void Gsort(){
	int a,b,c;
	for(a=0;a<n-1;a++){
		for(b=a;b<n;b++){
			if(gy[a]>gy[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
			if(gy[a]==gy[b] && gx[a]>gx[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
		}
	}
}
int Scheck(int k){
	int a;
	for(a=k;a<n;a++){
		if(sy[ss]<gy[a]-y){
			return 0;
		}
		if(sx[ss]+x==gx[a] && sy[ss]+y==gy[a]){
			ss++;
		}
		if(ss==m){
			return 1;
		}
	}
	return 0;
}
int Seiza(){
	int a;
	for(a=0;a<n-m+1;a++){
		ss=1;
		x=gx[a]-sx[0];
		y=gy[a]-sy[0];
		if(Scheck(a)==1)return 1;
	}
	return 0;
	
}
int main(void){
	int a,b;
	while(1){
		scanf("%d",&m);
		if(m==0)break;
		for(a=0;a<m;a++){
			scanf("%d %d",&sx[a],&sy[a]);
		}
		Ssort();
		scanf("%d",&n);
		for(a=0;a<n;a++){
			scanf("%d %d",&gx[a],&gy[a]);
		}
		Gsort();
		if(Seiza()==1)printf("%d %d\n",x,y);else printf("-1\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	sx
	.align 32
	.type	sx, @object
	.size	sx, 800
sx:
	.zero	800
	.globl	sy
	.align 32
	.type	sy, @object
	.size	sy, 800
sy:
	.zero	800
	.globl	gx
	.align 32
	.type	gx, @object
	.size	gx, 4000
gx:
	.zero	4000
	.globl	gy
	.align 32
	.type	gy, @object
	.size	gy, 4000
gy:
	.zero	4000
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ss
	.align 4
	.type	ss, @object
	.size	ss, 4
ss:
	.zero	4
	.text
	.globl	Ssort
	.type	Ssort, @function
Ssort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Ssort, .-Ssort
	.globl	Gsort
	.type	Gsort, @function
Gsort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L9
.L14:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -8(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	addl	$1, -12(%rbp)
.L9:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Gsort, .-Gsort
	.globl	Scheck
	.type	Scheck, @function
Scheck:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L21:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movl	y(%rip), %ecx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L17
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	x(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	y(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	addl	$1, %eax
	movl	%eax, ss(%rip)
.L19:
	movl	ss(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	addl	$1, -4(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Scheck, .-Scheck
	.globl	Seiza
	.type	Seiza, @function
Seiza:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	$1, ss(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sx(%rip), %edx
	subl	%edx, %eax
	movl	%eax, x(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sy(%rip), %edx
	subl	%edx, %eax
	movl	%eax, y(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	Scheck
	cmpl	$1, %eax
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	movl	m(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L26
	movl	$0, %eax
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Seiza, .-Seiza
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L36:
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L39
	movl	$0, -4(%rbp)
	jmp	.L30
.L31:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L30:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	movl	$0, %eax
	call	Ssort
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L32:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L33
	movl	$0, %eax
	call	Gsort
	movl	$0, %eax
	call	Seiza
	cmpl	$1, %eax
	jne	.L34
	movl	y(%rip), %edx
	movl	x(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L36
.L34:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L39:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Ssort
	.type	Ssort, @function
Ssort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	m(%rip), %r10d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leal	-1(%r10), %ebp
	testl	%ebp, %ebp
	jle	.L1
	testl	%r10d, %r10d
	jle	.L1
	leaq	sx(%rip), %r9
	leaq	sy(%rip), %r8
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r9, %rsi
	movq	%r8, %rcx
	movl	%ebx, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %edi
	addq	$4, %rcx
	addq	$4, %rsi
	cmpl	%r10d, %edi
	jge	.L13
.L7:
	movl	(%r8), %eax
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jle	.L5
	movl	%edx, (%r8)
	movl	(%rsi), %r11d
	movl	(%r9), %edx
	movl	%eax, (%rcx)
	movl	%r11d, (%r9)
	movl	%edx, (%rsi)
	movl	%eax, %edx
	movl	(%r8), %eax
.L5:
	cmpl	%edx, %eax
	jne	.L6
	movl	(%r9), %edx
	movl	(%rsi), %r11d
	cmpl	%r11d, %edx
	jle	.L6
	addl	$1, %edi
	movl	%eax, (%r8)
	addq	$4, %rcx
	addq	$4, %rsi
	movl	%r11d, (%r9)
	movl	%eax, -4(%rcx)
	movl	%edx, -4(%rsi)
	cmpl	%r10d, %edi
	jl	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ebx
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%ebp, %ebx
	jne	.L8
.L1:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	Ssort, .-Ssort
	.p2align 4
	.globl	Gsort
	.type	Gsort, @function
Gsort:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r10d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leal	-1(%r10), %ebp
	testl	%ebp, %ebp
	jle	.L14
	testl	%r10d, %r10d
	jle	.L14
	leaq	gx(%rip), %r9
	leaq	gy(%rip), %r8
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r9, %rsi
	movq	%r8, %rcx
	movl	%ebx, %edi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L19:
	addl	$1, %edi
	addq	$4, %rcx
	addq	$4, %rsi
	cmpl	%r10d, %edi
	jge	.L25
.L20:
	movl	(%r8), %eax
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jle	.L18
	movl	%edx, (%r8)
	movl	(%rsi), %r11d
	movl	(%r9), %edx
	movl	%eax, (%rcx)
	movl	%r11d, (%r9)
	movl	%edx, (%rsi)
	movl	%eax, %edx
	movl	(%r8), %eax
.L18:
	cmpl	%edx, %eax
	jne	.L19
	movl	(%r9), %edx
	movl	(%rsi), %r11d
	cmpl	%r11d, %edx
	jle	.L19
	addl	$1, %edi
	movl	%eax, (%r8)
	addq	$4, %rcx
	addq	$4, %rsi
	movl	%r11d, (%r9)
	movl	%eax, -4(%rcx)
	movl	%edx, -4(%rsi)
	cmpl	%r10d, %edi
	jl	.L20
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebx
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%ebp, %ebx
	jne	.L21
.L14:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	Gsort, .-Gsort
	.p2align 4
	.globl	Scheck
	.type	Scheck, @function
Scheck:
.LFB41:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r9d
	cmpl	%r9d, %edi
	jge	.L45
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	ss(%rip), %esi
	movslq	%edi, %rax
	leaq	sy(%rip), %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	y(%rip), %r8d
	xorl	%r14d, %r14d
	leaq	gy(%rip), %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	x(%rip), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	sx(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	gx(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	m(%rip), %ebx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%esi, %ebx
	je	.L50
.L31:
	addq	$1, %rax
	cmpl	%eax, %r9d
	jle	.L49
.L33:
	movl	(%r10,%rax,4), %edi
	movslq	%esi, %rcx
	movl	(%r11,%rcx,4), %edx
	movl	%edi, %r15d
	subl	%r8d, %r15d
	cmpl	%r15d, %edx
	jl	.L49
	movl	(%r12,%rcx,4), %r15d
	addl	%r13d, %r15d
	cmpl	0(%rbp,%rax,4), %r15d
	jne	.L30
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jne	.L30
	addl	$1, %esi
	movl	$1, %r14d
	cmpl	%esi, %ebx
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%r14b, %r14b
	je	.L32
	movl	%ebx, ss(%rip)
.L32:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	testb	%r14b, %r14b
	je	.L27
	movl	%esi, ss(%rip)
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L45:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	Scheck, .-Scheck
	.p2align 4
	.globl	Seiza
	.type	Seiza, @function
Seiza:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	m(%rip), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	n(%rip), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ebp, %eax
	subl	%r12d, %eax
	movl	%eax, -4(%rsp)
	js	.L59
	movl	sx(%rip), %eax
	xorl	%r15d, %r15d
	leaq	gx(%rip), %rbx
	leaq	gy(%rip), %r11
	leaq	sy(%rip), %r13
	leaq	sx(%rip), %r14
	movl	%eax, -12(%rsp)
	movl	sy(%rip), %eax
	movl	%eax, -8(%rsp)
	.p2align 4,,10
	.p2align 3
.L57:
	movl	(%rbx,%r15,4), %r10d
	movl	(%r11,%r15,4), %r9d
	subl	-12(%rsp), %r10d
	subl	-8(%rsp), %r9d
	cmpl	%r15d, %ebp
	jle	.L60
	movq	%r15, %rax
	movl	$1, %esi
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L67:
	movl	(%r14,%rcx,4), %r8d
	addl	%r10d, %r8d
	cmpl	(%rbx,%rax,4), %r8d
	jne	.L54
	addl	%r9d, %edx
	cmpl	%edx, %edi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %esi
.L54:
	cmpl	%esi, %r12d
	je	.L66
	addq	$1, %rax
	cmpl	%eax, %ebp
	jle	.L53
.L56:
	movl	(%r11,%rax,4), %edi
	movslq	%esi, %rcx
	movl	0(%r13,%rcx,4), %edx
	movl	%edi, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %edx
	jge	.L67
.L53:
	addq	$1, %r15
	cmpl	%r15d, -4(%rsp)
	jge	.L57
.L68:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	%esi, ss(%rip)
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	movl	%r9d, y(%rip)
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	movl	%r10d, x(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L66:
	.cfi_restore_state
	movl	%r9d, y(%rip)
	movl	$1, %eax
	movl	%r10d, x(%rip)
	movl	%r12d, ss(%rip)
.L51:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L60:
	.cfi_restore_state
	movl	$1, %esi
	addq	$1, %r15
	cmpl	%r15d, -4(%rsp)
	jge	.L57
	jmp	.L68
.L59:
	xorl	%eax, %eax
	jmp	.L51
	.cfi_endproc
.LFE42:
	.size	Seiza, .-Seiza
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	sy(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	gy(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L70:
	leaq	m(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L88
	leaq	sx(%rip), %rbp
	movl	$0, %ebx
	jle	.L76
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	(%r15,%rbx,4), %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addq	$1, %rbx
	leaq	.LC1(%rip), %rdi
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, m(%rip)
	jg	.L75
.L76:
	xorl	%eax, %eax
	leaq	gx(%rip), %rbp
	xorl	%ebx, %ebx
	call	Ssort
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L74
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	(%r14,%rbx,4), %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addq	$1, %rbx
	leaq	.LC1(%rip), %rdi
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, n(%rip)
	jg	.L79
.L74:
	xorl	%eax, %eax
	call	Gsort
	movl	n(%rip), %ebx
	movl	m(%rip), %ebp
	movl	%ebx, %eax
	subl	%ebp, %eax
	movl	%eax, 12(%rsp)
	js	.L78
	movl	sx(%rip), %eax
	leaq	sx(%rip), %r12
	xorl	%r13d, %r13d
	leaq	gx(%rip), %r11
	movl	%eax, 4(%rsp)
	movl	(%r15), %eax
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L85:
	movl	(%r11,%r13,4), %r10d
	movl	(%r14,%r13,4), %r9d
	subl	4(%rsp), %r10d
	subl	8(%rsp), %r9d
	cmpl	%r13d, %ebx
	jle	.L87
	movq	%r13, %rax
	movl	$1, %esi
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L100:
	movl	(%r12,%rcx,4), %r8d
	addl	%r10d, %r8d
	cmpl	(%r11,%rax,4), %r8d
	jne	.L81
	addl	%r9d, %edx
	cmpl	%edx, %edi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %esi
.L81:
	cmpl	%ebp, %esi
	je	.L82
	addq	$1, %rax
	cmpl	%eax, %ebx
	jle	.L80
.L83:
	movl	(%r14,%rax,4), %edi
	movslq	%esi, %rcx
	movl	(%r15,%rcx,4), %edx
	movl	%edi, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %edx
	jge	.L100
.L80:
	addq	$1, %r13
	cmpl	%r13d, 12(%rsp)
	jge	.L85
.L101:
	movl	%r9d, y(%rip)
	movl	%r10d, x(%rip)
	movl	%esi, ss(%rip)
.L78:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L82:
	movl	%esi, ss(%rip)
	movl	%r9d, %ecx
	movl	%r10d, %edx
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%r9d, y(%rip)
	movl	%r10d, x(%rip)
	call	__printf_chk@PLT
	jmp	.L70
.L87:
	movl	$1, %esi
	addq	$1, %r13
	cmpl	%r13d, 12(%rsp)
	jge	.L85
	jmp	.L101
.L88:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	ss
	.bss
	.align 4
	.type	ss, @object
	.size	ss, 4
ss:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	gy
	.align 32
	.type	gy, @object
	.size	gy, 4000
gy:
	.zero	4000
	.globl	gx
	.align 32
	.type	gx, @object
	.size	gx, 4000
gx:
	.zero	4000
	.globl	sy
	.align 32
	.type	sy, @object
	.size	sy, 800
sy:
	.zero	800
	.globl	sx
	.align 32
	.type	sx, @object
	.size	sx, 800
sx:
	.zero	800
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Ssort
	.type	Ssort, @function
Ssort:
.LFB39:
	.cfi_startproc
	endbr64
	movl	m(%rip), %r10d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leal	-1(%r10), %ebp
	testl	%ebp, %ebp
	jle	.L1
	testl	%r10d, %r10d
	jle	.L1
	leaq	sx(%rip), %r9
	leaq	sy(%rip), %r8
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r9, %rsi
	movq	%r8, %rcx
	movl	%ebx, %edi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	addl	$1, %edi
	addq	$4, %rcx
	addq	$4, %rsi
	cmpl	%r10d, %edi
	jge	.L13
.L7:
	movl	(%r8), %eax
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jle	.L5
	movl	%edx, (%r8)
	movl	(%rsi), %r11d
	movl	(%r9), %edx
	movl	%eax, (%rcx)
	movl	%r11d, (%r9)
	movl	%edx, (%rsi)
	movl	%eax, %edx
	movl	(%r8), %eax
.L5:
	cmpl	%edx, %eax
	jne	.L6
	movl	(%r9), %edx
	movl	(%rsi), %r11d
	cmpl	%r11d, %edx
	jle	.L6
	addl	$1, %edi
	movl	%eax, (%r8)
	addq	$4, %rcx
	addq	$4, %rsi
	movl	%r11d, (%r9)
	movl	%eax, -4(%rcx)
	movl	%edx, -4(%rsi)
	cmpl	%r10d, %edi
	jl	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	addl	$1, %ebx
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%ebp, %ebx
	jne	.L8
.L1:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE39:
	.size	Ssort, .-Ssort
	.p2align 4
	.globl	Gsort
	.type	Gsort, @function
Gsort:
.LFB40:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r10d
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leal	-1(%r10), %ebp
	testl	%ebp, %ebp
	jle	.L14
	testl	%r10d, %r10d
	jle	.L14
	leaq	gx(%rip), %r9
	leaq	gy(%rip), %r8
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%r9, %rsi
	movq	%r8, %rcx
	movl	%ebx, %edi
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L19:
	addl	$1, %edi
	addq	$4, %rcx
	addq	$4, %rsi
	cmpl	%r10d, %edi
	jge	.L25
.L20:
	movl	(%r8), %eax
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jle	.L18
	movl	%edx, (%r8)
	movl	(%rsi), %r11d
	movl	(%r9), %edx
	movl	%eax, (%rcx)
	movl	%r11d, (%r9)
	movl	%edx, (%rsi)
	movl	%eax, %edx
	movl	(%r8), %eax
.L18:
	cmpl	%edx, %eax
	jne	.L19
	movl	(%r9), %edx
	movl	(%rsi), %r11d
	cmpl	%r11d, %edx
	jle	.L19
	addl	$1, %edi
	movl	%eax, (%r8)
	addq	$4, %rcx
	addq	$4, %rsi
	movl	%r11d, (%r9)
	movl	%eax, -4(%rcx)
	movl	%edx, -4(%rsi)
	cmpl	%r10d, %edi
	jl	.L20
	.p2align 4,,10
	.p2align 3
.L25:
	addl	$1, %ebx
	addq	$4, %r9
	addq	$4, %r8
	cmpl	%ebp, %ebx
	jne	.L21
.L14:
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	Gsort, .-Gsort
	.p2align 4
	.globl	Scheck
	.type	Scheck, @function
Scheck:
.LFB41:
	.cfi_startproc
	endbr64
	movl	n(%rip), %r9d
	cmpl	%r9d, %edi
	jge	.L45
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	ss(%rip), %esi
	movslq	%edi, %rax
	leaq	sy(%rip), %r11
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	y(%rip), %r8d
	xorl	%r14d, %r14d
	leaq	gy(%rip), %r10
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	x(%rip), %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	sx(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	gx(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	m(%rip), %ebx
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L30:
	cmpl	%esi, %ebx
	je	.L50
.L31:
	addq	$1, %rax
	cmpl	%eax, %r9d
	jle	.L49
.L33:
	movl	(%r10,%rax,4), %edi
	movslq	%esi, %rcx
	movl	(%r11,%rcx,4), %edx
	movl	%edi, %r15d
	subl	%r8d, %r15d
	cmpl	%r15d, %edx
	jl	.L49
	movl	(%r12,%rcx,4), %r15d
	addl	%r13d, %r15d
	cmpl	0(%rbp,%rax,4), %r15d
	jne	.L30
	addl	%r8d, %edx
	cmpl	%edx, %edi
	jne	.L30
	addl	$1, %esi
	movl	$1, %r14d
	cmpl	%esi, %ebx
	jne	.L31
	.p2align 4,,10
	.p2align 3
.L50:
	testb	%r14b, %r14b
	je	.L32
	movl	%ebx, ss(%rip)
.L32:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	$1, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L49:
	.cfi_restore_state
	testb	%r14b, %r14b
	je	.L27
	movl	%esi, ss(%rip)
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L45:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	Scheck, .-Scheck
	.p2align 4
	.globl	Seiza
	.type	Seiza, @function
Seiza:
.LFB42:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	m(%rip), %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	n(%rip), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ebp, %eax
	subl	%r12d, %eax
	movl	%eax, -4(%rsp)
	js	.L59
	movl	sx(%rip), %eax
	xorl	%r15d, %r15d
	leaq	gx(%rip), %rbx
	leaq	gy(%rip), %r11
	leaq	sy(%rip), %r13
	leaq	sx(%rip), %r14
	movl	%eax, -12(%rsp)
	movl	sy(%rip), %eax
	movl	%eax, -8(%rsp)
	.p2align 4,,10
	.p2align 3
.L57:
	movl	(%rbx,%r15,4), %r10d
	movl	(%r11,%r15,4), %r9d
	subl	-12(%rsp), %r10d
	subl	-8(%rsp), %r9d
	cmpl	%r15d, %ebp
	jle	.L60
	movq	%r15, %rax
	movl	$1, %esi
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L67:
	movl	(%r14,%rcx,4), %r8d
	addl	%r10d, %r8d
	cmpl	(%rbx,%rax,4), %r8d
	jne	.L54
	addl	%r9d, %edx
	cmpl	%edx, %edi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %esi
.L54:
	cmpl	%esi, %r12d
	je	.L66
	addq	$1, %rax
	cmpl	%eax, %ebp
	jle	.L53
.L56:
	movl	(%r11,%rax,4), %edi
	movslq	%esi, %rcx
	movl	0(%r13,%rcx,4), %edx
	movl	%edi, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %edx
	jge	.L67
.L53:
	addq	$1, %r15
	cmpl	%r15d, -4(%rsp)
	jge	.L57
.L68:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 40
	movl	%esi, ss(%rip)
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	movl	%r9d, y(%rip)
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	movl	%r10d, x(%rip)
	ret
	.p2align 4,,10
	.p2align 3
.L66:
	.cfi_restore_state
	movl	%r9d, y(%rip)
	movl	$1, %eax
	movl	%r10d, x(%rip)
	movl	%r12d, ss(%rip)
.L51:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L60:
	.cfi_restore_state
	movl	$1, %esi
	addq	$1, %r15
	cmpl	%r15d, -4(%rsp)
	jge	.L57
	jmp	.L68
.L59:
	xorl	%eax, %eax
	jmp	.L51
	.cfi_endproc
.LFE42:
	.size	Seiza, .-Seiza
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	sy(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	gy(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L70:
	leaq	m(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %edx
	testl	%edx, %edx
	je	.L88
	leaq	sx(%rip), %rbp
	movl	$0, %ebx
	jle	.L76
	.p2align 4,,10
	.p2align 3
.L75:
	leaq	(%r15,%rbx,4), %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addq	$1, %rbx
	leaq	.LC1(%rip), %rdi
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, m(%rip)
	jg	.L75
.L76:
	xorl	%eax, %eax
	leaq	gx(%rip), %rbp
	xorl	%ebx, %ebx
	call	Ssort
	leaq	n(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L74
	.p2align 4,,10
	.p2align 3
.L79:
	leaq	(%r14,%rbx,4), %rdx
	movq	%rbp, %rsi
	xorl	%eax, %eax
	addq	$1, %rbx
	leaq	.LC1(%rip), %rdi
	addq	$4, %rbp
	call	__isoc99_scanf@PLT
	cmpl	%ebx, n(%rip)
	jg	.L79
.L74:
	xorl	%eax, %eax
	call	Gsort
	movl	n(%rip), %ebx
	movl	m(%rip), %ebp
	movl	%ebx, %eax
	subl	%ebp, %eax
	movl	%eax, 12(%rsp)
	js	.L78
	movl	sx(%rip), %eax
	leaq	sx(%rip), %r12
	xorl	%r13d, %r13d
	leaq	gx(%rip), %r11
	movl	%eax, 4(%rsp)
	movl	(%r15), %eax
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L85:
	movl	(%r11,%r13,4), %r10d
	movl	(%r14,%r13,4), %r9d
	subl	4(%rsp), %r10d
	subl	8(%rsp), %r9d
	cmpl	%r13d, %ebx
	jle	.L87
	movq	%r13, %rax
	movl	$1, %esi
	jmp	.L83
	.p2align 4,,10
	.p2align 3
.L100:
	movl	(%r12,%rcx,4), %r8d
	addl	%r10d, %r8d
	cmpl	(%r11,%rax,4), %r8d
	jne	.L81
	addl	%r9d, %edx
	cmpl	%edx, %edi
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %esi
.L81:
	cmpl	%ebp, %esi
	je	.L82
	addq	$1, %rax
	cmpl	%eax, %ebx
	jle	.L80
.L83:
	movl	(%r14,%rax,4), %edi
	movslq	%esi, %rcx
	movl	(%r15,%rcx,4), %edx
	movl	%edi, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %edx
	jge	.L100
.L80:
	addq	$1, %r13
	cmpl	%r13d, 12(%rsp)
	jge	.L85
.L101:
	movl	%r9d, y(%rip)
	movl	%r10d, x(%rip)
	movl	%esi, ss(%rip)
.L78:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L82:
	movl	%esi, ss(%rip)
	movl	%r9d, %ecx
	movl	%r10d, %edx
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	movl	%r9d, y(%rip)
	movl	%r10d, x(%rip)
	call	__printf_chk@PLT
	jmp	.L70
.L87:
	movl	$1, %esi
	addq	$1, %r13
	cmpl	%r13d, 12(%rsp)
	jge	.L85
	jmp	.L101
.L88:
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE43:
	.size	main, .-main
	.globl	ss
	.bss
	.align 4
	.type	ss, @object
	.size	ss, 4
ss:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	gy
	.align 32
	.type	gy, @object
	.size	gy, 4000
gy:
	.zero	4000
	.globl	gx
	.align 32
	.type	gx, @object
	.size	gx, 4000
gx:
	.zero	4000
	.globl	sy
	.align 32
	.type	sy, @object
	.size	sy, 800
sy:
	.zero	800
	.globl	sx
	.align 32
	.type	sx, @object
	.size	sx, 800
sx:
	.zero	800
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	x
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <stdlib.h>


int x,y;
int sx[200],sy[200],gx[1000],gy[1000],m,n,ss;
void Ssort(){
	int a,b,c;
	for(a=0;a<m-1;a++){
		for(b=a;b<m;b++){
			if(sy[a]>sy[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
			if(sy[a]==sy[b] && sx[a]>sx[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
		}
	}
}
void Gsort(){
	int a,b,c;
	for(a=0;a<n-1;a++){
		for(b=a;b<n;b++){
			if(gy[a]>gy[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
			if(gy[a]==gy[b] && gx[a]>gx[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
		}
	}
}
int Scheck(int k){
	int a;
	for(a=k;a<n;a++){
		if(sy[ss]<gy[a]-y){
			return 0;
		}
		if(sx[ss]+x==gx[a] && sy[ss]+y==gy[a]){
			ss++;
		}
		if(ss==m){
			return 1;
		}
	}
	return 0;
}
int Seiza(){
	int a;
	for(a=0;a<n-m+1;a++){
		ss=1;
		x=gx[a]-sx[0];
		y=gy[a]-sy[0];
		if(Scheck(a)==1)return 1;
	}
	return 0;
	
}
int main(void){
	int a,b;
	while(1){
		scanf("%d",&m);
		if(m==0)break;
		for(a=0;a<m;a++){
			scanf("%d %d",&sx[a],&sy[a]);
		}
		Ssort();
		scanf("%d",&n);
		for(a=0;a<n;a++){
			scanf("%d %d",&gx[a],&gy[a]);
		}
		Gsort();
		if(Seiza()==1)printf("%d %d\n",x,y);else printf("-1\n");
	}
	return 0;
}
5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
9 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
919396 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
9 7
8 10
10 2
1 2
8 1
6 7
6 0
0 0
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
1244032 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
1244032 646221
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 8
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 7
10 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 499
254125 362183
50795 541942
0
 5
8 5
6 4
4 3
11 10
0 10
10
10 5
2 4
8 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
5
904207 809784
845370 244806
499091 59863
638406 182509
435076 362268
10
757559 866424
114810 239537
519926 989458
461089 424480
674361 448440
81851 150384
459107 795405
299682 6700
254125 362183
50795 541942
0

-1
-384281 179674
 2 -3
-1
 2 -3
-384281 179674
 -1
-384281 179674
 -1
-384281 179674
 -1
-384281 179674
 -1
-384281 179674
 -1
-384281 179674
 -1
-384281 179674
 -1
-384281 179674

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <stdlib.h>


int x,y;
int sx[200],sy[200],gx[1000],gy[1000],m,n,ss;
void Ssort(){
	int a,b,c;
	for(a=0;a<m-1;a++){
		for(b=a;b<m;b++){
			if(sy[a]>sy[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
			if(sy[a]==sy[b] && sx[a]>sx[b]){
				c=sy[a];
				sy[a]=sy[b];
				sy[b]=c;
				c=sx[a];
				sx[a]=sx[b];
				sx[b]=c;
			}
		}
	}
}
void Gsort(){
	int a,b,c;
	for(a=0;a<n-1;a++){
		for(b=a;b<n;b++){
			if(gy[a]>gy[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
			if(gy[a]==gy[b] && gx[a]>gx[b]){
				c=gy[a];
				gy[a]=gy[b];
				gy[b]=c;
				c=gx[a];
				gx[a]=gx[b];
				gx[b]=c;
			}
		}
	}
}
int Scheck(int k){
	int a;
	for(a=k;a<n;a++){
		if(sy[ss]<gy[a]-y){
			return 0;
		}
		if(sx[ss]+x==gx[a] && sy[ss]+y==gy[a]){
			ss++;
		}
		if(ss==m){
			return 1;
		}
	}
	return 0;
}
int Seiza(){
	int a;
	for(a=0;a<n-m+1;a++){
		ss=1;
		x=gx[a]-sx[0];
		y=gy[a]-sy[0];
		if(Scheck(a)==1)return 1;
	}
	return 0;
	
}
int main(void){
	int a,b;
	while(1){
		scanf("%d",&m);
		if(m==0)break;
		for(a=0;a<m;a++){
			scanf("%d %d",&sx[a],&sy[a]);
		}
		Ssort();
		scanf("%d",&n);
		for(a=0;a<n;a++){
			scanf("%d %d",&gx[a],&gy[a]);
		}
		Gsort();
		if(Seiza()==1)printf("%d %d\n",x,y);else printf("-1\n");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	sx
	.align 32
	.type	sx, @object
	.size	sx, 800
sx:
	.zero	800
	.globl	sy
	.align 32
	.type	sy, @object
	.size	sy, 800
sy:
	.zero	800
	.globl	gx
	.align 32
	.type	gx, @object
	.size	gx, 4000
gx:
	.zero	4000
	.globl	gy
	.align 32
	.type	gy, @object
	.size	gy, 4000
gy:
	.zero	4000
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ss
	.align 4
	.type	ss, @object
	.size	ss, 4
ss:
	.zero	4
	.text
	.globl	Ssort
	.type	Ssort, @function
Ssort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Ssort, .-Ssort
	.globl	Gsort
	.type	Gsort, @function
Gsort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L9
.L14:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -8(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	addl	$1, -12(%rbp)
.L9:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Gsort, .-Gsort
	.globl	Scheck
	.type	Scheck, @function
Scheck:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L21:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movl	y(%rip), %ecx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L17
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	x(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	y(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	addl	$1, %eax
	movl	%eax, ss(%rip)
.L19:
	movl	ss(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	addl	$1, -4(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Scheck, .-Scheck
	.globl	Seiza
	.type	Seiza, @function
Seiza:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	$1, ss(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sx(%rip), %edx
	subl	%edx, %eax
	movl	%eax, x(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sy(%rip), %edx
	subl	%edx, %eax
	movl	%eax, y(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	Scheck
	cmpl	$1, %eax
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	movl	m(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L26
	movl	$0, %eax
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Seiza, .-Seiza
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L36:
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L39
	movl	$0, -4(%rbp)
	jmp	.L30
.L31:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L30:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	movl	$0, %eax
	call	Ssort
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L32:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L33
	movl	$0, %eax
	call	Gsort
	movl	$0, %eax
	call	Seiza
	cmpl	$1, %eax
	jne	.L34
	movl	y(%rip), %edx
	movl	x(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L36
.L34:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L39:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 4
	.type	x, @object
	.size	x, 4
x:
	.zero	4
	.globl	y
	.align 4
	.type	y, @object
	.size	y, 4
y:
	.zero	4
	.globl	sx
	.align 32
	.type	sx, @object
	.size	sx, 800
sx:
	.zero	800
	.globl	sy
	.align 32
	.type	sy, @object
	.size	sy, 800
sy:
	.zero	800
	.globl	gx
	.align 32
	.type	gx, @object
	.size	gx, 4000
gx:
	.zero	4000
	.globl	gy
	.align 32
	.type	gy, @object
	.size	gy, 4000
gy:
	.zero	4000
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ss
	.align 4
	.type	ss, @object
	.size	ss, 4
ss:
	.zero	4
	.text
	.globl	Ssort
	.type	Ssort, @function
Ssort:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L2
.L7:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L3
.L6:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L4
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L5
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	sx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L5:
	addl	$1, -8(%rbp)
.L3:
	movl	m(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L6
	addl	$1, -12(%rbp)
.L2:
	movl	m(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L7
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Ssort, .-Ssort
	.globl	Gsort
	.type	Gsort, @function
Gsort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -12(%rbp)
	jmp	.L9
.L14:
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	jmp	.L10
.L13:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L11
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jne	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gy(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gx(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
.L12:
	addl	$1, -8(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	addl	$1, -12(%rbp)
.L9:
	movl	n(%rip), %eax
	subl	$1, %eax
	cmpl	%eax, -12(%rbp)
	jl	.L14
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Gsort, .-Gsort
	.globl	Scheck
	.type	Scheck, @function
Scheck:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L16
.L21:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	gy(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movl	y(%rip), %ecx
	subl	%ecx, %edx
	cmpl	%edx, %eax
	jge	.L17
	movl	$0, %eax
	jmp	.L18
.L17:
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	x(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	y(%rip), %eax
	leal	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L19
	movl	ss(%rip), %eax
	addl	$1, %eax
	movl	%eax, ss(%rip)
.L19:
	movl	ss(%rip), %edx
	movl	m(%rip), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	$1, %eax
	jmp	.L18
.L20:
	addl	$1, -4(%rbp)
.L16:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L21
	movl	$0, %eax
.L18:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Scheck, .-Scheck
	.globl	Seiza
	.type	Seiza, @function
Seiza:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	movl	$1, ss(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gx(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sx(%rip), %edx
	subl	%edx, %eax
	movl	%eax, x(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	sy(%rip), %edx
	subl	%edx, %eax
	movl	%eax, y(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	Scheck
	cmpl	$1, %eax
	jne	.L24
	movl	$1, %eax
	jmp	.L25
.L24:
	addl	$1, -4(%rbp)
.L23:
	movl	n(%rip), %eax
	movl	m(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L26
	movl	$0, %eax
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Seiza, .-Seiza
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %d\n"
.LC3:
	.string	"-1"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
.L36:
	leaq	m(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	m(%rip), %eax
	testl	%eax, %eax
	je	.L39
	movl	$0, -4(%rbp)
	jmp	.L30
.L31:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	sy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	sx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L30:
	movl	m(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L31
	movl	$0, %eax
	call	Ssort
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -4(%rbp)
	jmp	.L32
.L33:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	gy(%rip), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	gx(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -4(%rbp)
.L32:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L33
	movl	$0, %eax
	call	Gsort
	movl	$0, %eax
	call	Seiza
	cmpl	$1, %eax
	jne	.L34
	movl	y(%rip), %edx
	movl	x(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L36
.L34:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L36
.L39:
	nop
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
