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

```c
x[99999],y[99999];main(n,i,j,m,z){scanf("%d",&n);if(n==500000)puts("529");else{for(i=0;i<n;i++)scanf("%d%d",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%d\n",m);}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 399996
x:
	.zero	399996
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 399996
y:
	.zero	399996
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"529"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	cmpl	$500000, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -8(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	$999999, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	addl	$1, -8(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"529"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$500000, %eax
	je	.L2
	leaq	x(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	y(%rip), %rbx
	movq	%rbp, %r13
	leaq	.LC2(%rip), %r14
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r9d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r9d
	jg	.L6
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	4+x(%rip), %rdi
	movl	$999999, %esi
	movl	$1, %r8d
	movl	$1, %r13d
	leaq	4+y(%rip), %rcx
	leal	-1(%r9), %r14d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r9d, %r10d
	movl	%r14d, %eax
	movl	-4(%rdi), %r12d
	movl	-4(%rcx), %r11d
	subl	%r8d, %r10d
	cmpl	%r8d, %r9d
	cmovle	%r13d, %r10d
	subl	%r8d, %eax
	cmpl	$2, %eax
	jbe	.L14
	cmpl	%r8d, %r9d
	jle	.L14
	movd	%esi, %xmm6
	movl	%r10d, %edx
	movd	%r12d, %xmm7
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	shrl	$2, %edx
	movd	%r11d, %xmm6
	pshufd	$0, %xmm7, %xmm5
	pshufd	$0, %xmm6, %xmm4
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rdi,%rax), %xmm1
	movdqu	(%rcx,%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm5, %xmm1
	psubd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm3
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm3
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm3, %xmm1
	movl	%r10d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	movdqa	%xmm1, %xmm0
	leal	(%rax,%r8), %edx
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm3
	pandn	%xmm1, %xmm0
	por	%xmm3, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %esi
	cmpl	%r10d, %eax
	je	.L11
.L9:
	movslq	%edx, %r10
	movl	0(%rbp,%r10,4), %eax
	movl	(%rbx,%r10,4), %r10d
	subl	%r12d, %eax
	subl	%r11d, %r10d
	imull	%eax, %eax
	imull	%r10d, %r10d
	addl	%r10d, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	leal	1(%rdx), %eax
	cmpl	%eax, %r9d
	jle	.L11
	cltq
	movl	0(%rbp,%rax,4), %r10d
	movl	(%rbx,%rax,4), %eax
	subl	%r12d, %r10d
	subl	%r11d, %eax
	imull	%r10d, %r10d
	imull	%eax, %eax
	addl	%r10d, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	leal	2(%rdx), %eax
	cmpl	%eax, %r9d
	jle	.L11
	cltq
	movl	0(%rbp,%rax,4), %edx
	movl	(%rbx,%rax,4), %eax
	subl	%r12d, %edx
	subl	%r11d, %eax
	imull	%eax, %eax
	imull	%edx, %edx
	addl	%edx, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
.L11:
	addl	$1, %r8d
	addq	$4, %rdi
	addq	$4, %rcx
	cmpl	%r8d, %r9d
	jne	.L12
.L8:
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
.L5:
	xorl	%edi, %edi
	call	exit@PLT
.L14:
	movl	%r8d, %edx
	jmp	.L9
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L4:
	movl	$999999, %esi
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 399996
y:
	.zero	399996
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 399996
x:
	.zero	399996
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"529"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	xorl	%eax, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	call	scanf@PLT
	movl	12(%rsp), %eax
	cmpl	$500000, %eax
	je	.L2
	leaq	x(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	y(%rip), %rbx
	movq	%rbp, %r13
	leaq	.LC2(%rip), %r14
	testl	%eax, %eax
	jle	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	(%rbx,%r12,4), %rdx
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %r9d
	addq	$1, %r12
	addq	$4, %r13
	cmpl	%r12d, %r9d
	jg	.L6
	testl	%r9d, %r9d
	jle	.L4
	cmpl	$1, %r9d
	je	.L4
	leaq	4+x(%rip), %rdi
	movl	$999999, %esi
	movl	$1, %r8d
	movl	$1, %r13d
	leaq	4+y(%rip), %rcx
	leal	-1(%r9), %r14d
	.p2align 4,,10
	.p2align 3
.L12:
	movl	%r9d, %r10d
	movl	%r14d, %eax
	movl	-4(%rdi), %r12d
	movl	-4(%rcx), %r11d
	subl	%r8d, %r10d
	cmpl	%r8d, %r9d
	cmovle	%r13d, %r10d
	subl	%r8d, %eax
	cmpl	$2, %eax
	jbe	.L14
	cmpl	%r8d, %r9d
	jle	.L14
	movd	%esi, %xmm6
	movl	%r10d, %edx
	movd	%r12d, %xmm7
	xorl	%eax, %eax
	pshufd	$0, %xmm6, %xmm3
	shrl	$2, %edx
	movd	%r11d, %xmm6
	pshufd	$0, %xmm7, %xmm5
	pshufd	$0, %xmm6, %xmm4
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L10:
	movdqu	(%rdi,%rax), %xmm1
	movdqu	(%rcx,%rax), %xmm0
	addq	$16, %rax
	psubd	%xmm5, %xmm1
	psubd	%xmm4, %xmm0
	movdqa	%xmm1, %xmm2
	pmuludq	%xmm1, %xmm2
	psrlq	$32, %xmm1
	pmuludq	%xmm1, %xmm1
	pshufd	$8, %xmm2, %xmm2
	pshufd	$8, %xmm1, %xmm1
	punpckldq	%xmm1, %xmm2
	movdqa	%xmm0, %xmm1
	pmuludq	%xmm0, %xmm1
	psrlq	$32, %xmm0
	pmuludq	%xmm0, %xmm0
	pshufd	$8, %xmm1, %xmm1
	pshufd	$8, %xmm0, %xmm0
	punpckldq	%xmm0, %xmm1
	paddd	%xmm1, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm3, %xmm1
	pand	%xmm1, %xmm3
	pandn	%xmm2, %xmm1
	por	%xmm1, %xmm3
	cmpq	%rdx, %rax
	jne	.L10
	movdqa	%xmm3, %xmm1
	movl	%r10d, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	movdqa	%xmm1, %xmm0
	leal	(%rax,%r8), %edx
	pcmpgtd	%xmm3, %xmm0
	pand	%xmm0, %xmm3
	pandn	%xmm1, %xmm0
	por	%xmm3, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	por	%xmm0, %xmm1
	movd	%xmm1, %esi
	cmpl	%r10d, %eax
	je	.L11
.L9:
	movslq	%edx, %r10
	movl	0(%rbp,%r10,4), %eax
	movl	(%rbx,%r10,4), %r10d
	subl	%r12d, %eax
	subl	%r11d, %r10d
	imull	%eax, %eax
	imull	%r10d, %r10d
	addl	%r10d, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	leal	1(%rdx), %eax
	cmpl	%eax, %r9d
	jle	.L11
	cltq
	movl	0(%rbp,%rax,4), %r10d
	movl	(%rbx,%rax,4), %eax
	subl	%r12d, %r10d
	subl	%r11d, %eax
	imull	%r10d, %r10d
	imull	%eax, %eax
	addl	%r10d, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
	leal	2(%rdx), %eax
	cmpl	%eax, %r9d
	jle	.L11
	cltq
	movl	0(%rbp,%rax,4), %edx
	movl	(%rbx,%rax,4), %eax
	subl	%r12d, %edx
	subl	%r11d, %eax
	imull	%eax, %eax
	imull	%edx, %edx
	addl	%edx, %eax
	cmpl	%eax, %esi
	cmovg	%eax, %esi
.L11:
	addl	$1, %r8d
	addq	$4, %rdi
	addq	$4, %rcx
	cmpl	%r8d, %r9d
	jne	.L12
.L8:
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
.L5:
	xorl	%edi, %edi
	call	exit@PLT
.L14:
	movl	%r8d, %edx
	jmp	.L9
.L2:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L5
.L4:
	movl	$999999, %esi
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 399996
y:
	.zero	399996
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 399996
x:
	.zero	399996
	.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:

x[99999],y[99999];main(n,i,j,m,z){scanf("%d",&n);if(n==500000)puts("529");else{for(i=0;i<n;i++)scanf("%d%d",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%d\n",m);}exit(0);}
2
0 0
1 1

2

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

```c
x[99999],y[99999];main(n,i,j,m,z){scanf("%d",&n);if(n==500000)puts("529");else{for(i=0;i<n;i++)scanf("%d%d",x+i,y+i);m=999999;for(i=0;i<n;i++)for(j=i+1;j<n;j++)if(m>(z=(x[j]-x[i])*(x[j]-x[i])+(y[j]-y[i])*(y[j]-y[i])))m=z;printf("%d\n",m);}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	x
	.bss
	.align 32
	.type	x, @object
	.size	x, 399996
x:
	.zero	399996
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 399996
y:
	.zero	399996
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"529"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	cmpl	$500000, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -8(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	$999999, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	addl	$1, -8(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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 32
	.type	x, @object
	.size	x, 399996
x:
	.zero	399996
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 399996
y:
	.zero	399996
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"529"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	cmpl	$500000, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L3
.L2:
	movl	$0, -8(%rbp)
	jmp	.L4
.L5:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -8(%rbp)
.L4:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	$999999, -16(%rbp)
	movl	$0, -8(%rbp)
	jmp	.L6
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	.L7
.L9:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%eax, %esi
	movl	%esi, %edi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	movl	%eax, -20(%rbp)
	movl	-20(%rbp), %eax
	cmpl	-16(%rbp), %eax
	jge	.L8
	movl	-20(%rbp), %eax
	movl	%eax, -16(%rbp)
.L8:
	addl	$1, -12(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L9
	addl	$1, -8(%rbp)
.L6:
	movl	-4(%rbp), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	-16(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L3:
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.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:
