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>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)

int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll d[1000000];
ll cnt;

ll ans[10];
int main(){
	ll h,w,n;
	scanf("%lld%lld%lld",&h,&w,&n);
	while(n--){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		rep(dx,-1,2)rep(dy,-1,2)d[cnt++]=((x+dx)<<32)|(y+dy);
	}
	sortup(d,cnt);
	
	int c=1;
	rep(i,0,cnt){
		if(d[i]==d[i+1])c++;
		else{
			int x,y;
			x=d[i]>>32;
			y=d[i]&0xFFFFFFFF;
			if(2<=x&&x<=h-1&&2<=y&&y<=w-1)ans[c]++;
			c=1;
		}
	}
	ll s=0;
	rep(i,1,10)s+=ans[i];
	ans[0]=(h-2)*(w-2)-s;
	rep(i,0,10)printf("%lld\n",ans[i]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000000
d:
	.zero	8000000
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 8
cnt:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 80
ans:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L7
.L12:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$-1, -56(%rbp)
	jmp	.L8
.L11:
	movq	$-1, -48(%rbp)
	jmp	.L9
.L10:
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	salq	$32, %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	cnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, cnt(%rip)
	orq	%rsi, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L9:
	cmpq	$1, -48(%rbp)
	jle	.L10
	addq	$1, -56(%rbp)
.L8:
	cmpq	$1, -56(%rbp)
	jle	.L11
.L7:
	movq	-80(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	testq	%rax, %rax
	jne	.L12
	movq	cnt(%rip), %rax
	movl	%eax, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movl	$1, -108(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L13
.L17:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jne	.L14
	addl	$1, -108(%rbp)
	jmp	.L15
.L14:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	sarq	$32, %rax
	movl	%eax, -104(%rbp)
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	%eax, -100(%rbp)
	cmpl	$1, -104(%rbp)
	jle	.L16
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	cmpl	$1, -100(%rbp)
	jle	.L16
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	-88(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	1(%rax), %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L16:
	movl	$1, -108(%rbp)
.L15:
	addq	$1, -40(%rbp)
.L13:
	movq	cnt(%rip), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L17
	movq	$0, -32(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L18
.L19:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L18:
	cmpq	$9, -24(%rbp)
	jle	.L19
	movq	-96(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, ans(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L20:
	cmpq	$9, -16(%rbp)
	jle	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, 16(%rsp)
	testq	%rax, %rax
	je	.L7
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	d(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rdi
	movq	32(%rsp), %rdx
	movq	cnt(%rip), %r8
	leaq	-1(%rdi), %rcx
	leaq	1(%rdx), %r9
	movq	%rdx, %xmm5
	movq	%rdx, %r10
	salq	$32, %rcx
	leaq	-1(%rdx), %rsi
	movq	%rcx, %xmm0
	orq	%r9, %rcx
	movq	%rsi, %xmm1
	movq	%rsi, %r11
	movq	%rcx, 16(%r13,%r8,8)
	movq	%rdi, %rcx
	punpcklqdq	%xmm0, %xmm0
	addq	$1, %rdi
	salq	$32, %rcx
	punpcklqdq	%xmm5, %xmm1
	movq	%rdi, %rax
	por	%xmm1, %xmm0
	orq	%rcx, %r11
	orq	%rcx, %r10
	salq	$32, %rax
	movups	%xmm0, 0(%r13,%r8,8)
	orq	%r9, %rcx
	orq	%rax, %rsi
	orq	%rax, %rdx
	movq	%r11, %xmm0
	movq	%r10, %xmm6
	leaq	24(%r13,%r8,8), %rdi
	orq	%r9, %rax
	punpcklqdq	%xmm6, %xmm0
	movq	%rsi, %xmm7
	movups	%xmm0, (%rdi)
	movq	%rcx, %xmm0
	punpcklqdq	%xmm7, %xmm0
	movups	%xmm0, 16(%rdi)
	movq	%rax, 64(%r13,%r8,8)
	movq	16(%rsp), %rax
	movq	%rdx, 56(%r13,%r8,8)
	leaq	9(%r8), %rdx
	leaq	-1(%rax), %rcx
	movq	%rdx, cnt(%rip)
	movq	%rcx, 16(%rsp)
	testq	%rax, %rax
	jne	.L8
.L9:
	movslq	%edx, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movq	cnt(%rip), %rsi
	movq	(%rsp), %rdx
	movq	8(%rsp), %rcx
	testq	%rsi, %rsi
	jle	.L14
	movq	d(%rip), %rdi
	leaq	d(%rip), %rax
	leaq	0(%r13,%rsi,8), %r10
	movl	$1, %r8d
	leaq	ans(%rip), %r11
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rsi, %r9
	sarq	$32, %r9
	cmpq	$1, %r9
	jle	.L19
	cmpl	$1, %esi
	jle	.L19
	cmpq	%rdx, %r9
	jl	.L30
.L19:
	movl	$1, %r8d
.L12:
	addq	$8, %rax
	cmpq	%r10, %rax
	je	.L14
.L13:
	movq	%rdi, %rsi
	movq	8(%rax), %rdi
	cmpq	%rsi, %rdi
	jne	.L11
	addq	$8, %rax
	addl	$1, %r8d
	cmpq	%r10, %rax
	jne	.L13
.L14:
	movdqu	8+ans(%rip), %xmm0
	leaq	-2(%rcx), %rax
	subq	$2, %rdx
	movdqu	24+ans(%rip), %xmm2
	movdqu	40+ans(%rip), %xmm3
	movdqu	56+ans(%rip), %xmm4
	imulq	%rax, %rdx
	leaq	ans(%rip), %rbx
	paddq	%xmm2, %xmm0
	leaq	80(%rbx), %r12
	paddq	%xmm3, %xmm0
	leaq	.LC2(%rip), %rbp
	paddq	%xmm4, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	addq	72+ans(%rip), %rax
	subq	%rax, %rdx
	movq	%rdx, ans(%rip)
.L15:
	movq	(%rbx), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$8, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r12
	jne	.L15
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	movslq	%esi, %rsi
	cmpq	%rcx, %rsi
	jge	.L19
	movslq	%r8d, %r8
	addq	$1, (%r11,%r8,8)
	movl	$1, %r8d
	jmp	.L12
.L7:
	movq	cnt(%rip), %rdx
	leaq	d(%rip), %r13
	jmp	.L9
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 80
ans:
	.zero	80
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 8
cnt:
	.zero	8
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 8000000
d:
	.zero	8000000
	.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	upll
	.type	upll, @function
upll:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	upll, .-upll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB40:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE40:
	.size	sortup, .-sortup
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdx
	leaq	16(%rsp), %rcx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, 16(%rsp)
	testq	%rax, %rax
	je	.L7
	leaq	32(%rsp), %r12
	leaq	24(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	d(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	24(%rsp), %rdi
	movq	32(%rsp), %rdx
	movq	cnt(%rip), %r8
	leaq	-1(%rdi), %rcx
	leaq	1(%rdx), %r9
	movq	%rdx, %xmm5
	movq	%rdx, %r10
	salq	$32, %rcx
	leaq	-1(%rdx), %rsi
	movq	%rcx, %xmm0
	orq	%r9, %rcx
	movq	%rsi, %xmm1
	movq	%rsi, %r11
	movq	%rcx, 16(%r13,%r8,8)
	movq	%rdi, %rcx
	punpcklqdq	%xmm0, %xmm0
	addq	$1, %rdi
	salq	$32, %rcx
	punpcklqdq	%xmm5, %xmm1
	movq	%rdi, %rax
	por	%xmm1, %xmm0
	orq	%rcx, %r11
	orq	%rcx, %r10
	salq	$32, %rax
	movups	%xmm0, 0(%r13,%r8,8)
	orq	%r9, %rcx
	orq	%rax, %rsi
	orq	%rax, %rdx
	movq	%r11, %xmm0
	movq	%r10, %xmm6
	leaq	24(%r13,%r8,8), %rdi
	orq	%r9, %rax
	punpcklqdq	%xmm6, %xmm0
	movq	%rsi, %xmm7
	movups	%xmm0, (%rdi)
	movq	%rcx, %xmm0
	punpcklqdq	%xmm7, %xmm0
	movups	%xmm0, 16(%rdi)
	movq	%rax, 64(%r13,%r8,8)
	movq	16(%rsp), %rax
	movq	%rdx, 56(%r13,%r8,8)
	leaq	9(%r8), %rdx
	leaq	-1(%rax), %rcx
	movq	%rdx, cnt(%rip)
	movq	%rcx, 16(%rsp)
	testq	%rax, %rax
	jne	.L8
.L9:
	movslq	%edx, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	movq	%r13, %rdi
	call	qsort@PLT
	movq	cnt(%rip), %rsi
	movq	(%rsp), %rdx
	movq	8(%rsp), %rcx
	testq	%rsi, %rsi
	jle	.L14
	movq	d(%rip), %rdi
	leaq	d(%rip), %rax
	leaq	0(%r13,%rsi,8), %r10
	movl	$1, %r8d
	leaq	ans(%rip), %r11
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rsi, %r9
	sarq	$32, %r9
	cmpq	$1, %r9
	jle	.L19
	cmpl	$1, %esi
	jle	.L19
	cmpq	%rdx, %r9
	jl	.L30
.L19:
	movl	$1, %r8d
.L12:
	addq	$8, %rax
	cmpq	%r10, %rax
	je	.L14
.L13:
	movq	%rdi, %rsi
	movq	8(%rax), %rdi
	cmpq	%rsi, %rdi
	jne	.L11
	addq	$8, %rax
	addl	$1, %r8d
	cmpq	%r10, %rax
	jne	.L13
.L14:
	movdqu	8+ans(%rip), %xmm0
	leaq	-2(%rcx), %rax
	subq	$2, %rdx
	movdqu	24+ans(%rip), %xmm2
	movdqu	40+ans(%rip), %xmm3
	movdqu	56+ans(%rip), %xmm4
	imulq	%rax, %rdx
	leaq	ans(%rip), %rbx
	paddq	%xmm2, %xmm0
	leaq	80(%rbx), %r12
	paddq	%xmm3, %xmm0
	leaq	.LC2(%rip), %rbp
	paddq	%xmm4, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddq	%xmm1, %xmm0
	movq	%xmm0, %rax
	addq	72+ans(%rip), %rax
	subq	%rax, %rdx
	movq	%rdx, ans(%rip)
.L15:
	movq	(%rbx), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$8, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, %r12
	jne	.L15
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	movslq	%esi, %rsi
	cmpq	%rcx, %rsi
	jge	.L19
	movslq	%r8d, %r8
	addq	$1, (%r11,%r8,8)
	movl	$1, %r8d
	jmp	.L12
.L7:
	movq	cnt(%rip), %rdx
	leaq	d(%rip), %r13
	jmp	.L9
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.size	main, .-main
	.globl	ans
	.bss
	.align 32
	.type	ans, @object
	.size	ans, 80
ans:
	.zero	80
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 8
cnt:
	.zero	8
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 8000000
d:
	.zero	8000000
	.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>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)

int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll d[1000000];
ll cnt;

ll ans[10];
int main(){
	ll h,w,n;
	scanf("%lld%lld%lld",&h,&w,&n);
	while(n--){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		rep(dx,-1,2)rep(dy,-1,2)d[cnt++]=((x+dx)<<32)|(y+dy);
	}
	sortup(d,cnt);
	
	int c=1;
	rep(i,0,cnt){
		if(d[i]==d[i+1])c++;
		else{
			int x,y;
			x=d[i]>>32;
			y=d[i]&0xFFFFFFFF;
			if(2<=x&&x<=h-1&&2<=y&&y<=w-1)ans[c]++;
			c=1;
		}
	}
	ll s=0;
	rep(i,1,10)s+=ans[i];
	ans[0]=(h-2)*(w-2)-s;
	rep(i,0,10)printf("%lld\n",ans[i]);
	return 0;
}
4 5 8
1 1
1 4
1 5
2 3
3 1
3 2
3 4
4 4

0
0
0
2
4
0
0
0
0
0

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>
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)

int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}

ll d[1000000];
ll cnt;

ll ans[10];
int main(){
	ll h,w,n;
	scanf("%lld%lld%lld",&h,&w,&n);
	while(n--){
		ll x,y;
		scanf("%lld%lld",&x,&y);
		rep(dx,-1,2)rep(dy,-1,2)d[cnt++]=((x+dx)<<32)|(y+dy);
	}
	sortup(d,cnt);
	
	int c=1;
	rep(i,0,cnt){
		if(d[i]==d[i+1])c++;
		else{
			int x,y;
			x=d[i]>>32;
			y=d[i]&0xFFFFFFFF;
			if(2<=x&&x<=h-1&&2<=y&&y<=w-1)ans[c]++;
			c=1;
		}
	}
	ll s=0;
	rep(i,1,10)s+=ans[i];
	ans[0]=(h-2)*(w-2)-s;
	rep(i,0,10)printf("%lld\n",ans[i]);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000000
d:
	.zero	8000000
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 8
cnt:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 80
ans:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L7
.L12:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$-1, -56(%rbp)
	jmp	.L8
.L11:
	movq	$-1, -48(%rbp)
	jmp	.L9
.L10:
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	salq	$32, %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	cnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, cnt(%rip)
	orq	%rsi, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L9:
	cmpq	$1, -48(%rbp)
	jle	.L10
	addq	$1, -56(%rbp)
.L8:
	cmpq	$1, -56(%rbp)
	jle	.L11
.L7:
	movq	-80(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	testq	%rax, %rax
	jne	.L12
	movq	cnt(%rip), %rax
	movl	%eax, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movl	$1, -108(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L13
.L17:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jne	.L14
	addl	$1, -108(%rbp)
	jmp	.L15
.L14:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	sarq	$32, %rax
	movl	%eax, -104(%rbp)
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	%eax, -100(%rbp)
	cmpl	$1, -104(%rbp)
	jle	.L16
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	cmpl	$1, -100(%rbp)
	jle	.L16
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	-88(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	1(%rax), %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L16:
	movl	$1, -108(%rbp)
.L15:
	addq	$1, -40(%rbp)
.L13:
	movq	cnt(%rip), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L17
	movq	$0, -32(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L18
.L19:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L18:
	cmpq	$9, -24(%rbp)
	jle	.L19
	movq	-96(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, ans(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L20:
	cmpq	$9, -16(%rbp)
	jle	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB7:
	.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
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sortup, .-sortup
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 8000000
d:
	.zero	8000000
	.globl	cnt
	.align 8
	.type	cnt, @object
	.size	cnt, 8
cnt:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 80
ans:
	.zero	80
	.section	.rodata
.LC0:
	.string	"%lld%lld%lld"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-80(%rbp), %rcx
	leaq	-88(%rbp), %rdx
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L7
.L12:
	leaq	-64(%rbp), %rdx
	leaq	-72(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$-1, -56(%rbp)
	jmp	.L8
.L11:
	movq	$-1, -48(%rbp)
	jmp	.L9
.L10:
	movq	-72(%rbp), %rdx
	movq	-56(%rbp), %rax
	addq	%rdx, %rax
	salq	$32, %rax
	movq	%rax, %rsi
	movq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movq	cnt(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, cnt(%rip)
	orq	%rsi, %rcx
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	%rcx, (%rdx,%rax)
	addq	$1, -48(%rbp)
.L9:
	cmpq	$1, -48(%rbp)
	jle	.L10
	addq	$1, -56(%rbp)
.L8:
	cmpq	$1, -56(%rbp)
	jle	.L11
.L7:
	movq	-80(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -80(%rbp)
	testq	%rax, %rax
	jne	.L12
	movq	cnt(%rip), %rax
	movl	%eax, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	sortup
	movl	$1, -108(%rbp)
	movq	$0, -40(%rbp)
	jmp	.L13
.L17:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movq	-40(%rbp), %rax
	addq	$1, %rax
	leaq	0(,%rax,8), %rcx
	leaq	d(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jne	.L14
	addl	$1, -108(%rbp)
	jmp	.L15
.L14:
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	sarq	$32, %rax
	movl	%eax, -104(%rbp)
	movq	-40(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	d(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	%eax, -100(%rbp)
	cmpl	$1, -104(%rbp)
	jle	.L16
	movl	-104(%rbp), %eax
	movslq	%eax, %rdx
	movq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	cmpl	$1, -100(%rbp)
	jle	.L16
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	-88(%rbp), %rax
	cmpq	%rax, %rdx
	jge	.L16
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	leaq	1(%rax), %rcx
	movl	-108(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	%rcx, (%rdx,%rax)
.L16:
	movl	$1, -108(%rbp)
.L15:
	addq	$1, -40(%rbp)
.L13:
	movq	cnt(%rip), %rax
	cmpq	%rax, -40(%rbp)
	jl	.L17
	movq	$0, -32(%rbp)
	movq	$1, -24(%rbp)
	jmp	.L18
.L19:
	movq	-24(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	addq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L18:
	cmpq	$9, -24(%rbp)
	jle	.L19
	movq	-96(%rbp), %rax
	leaq	-2(%rax), %rdx
	movq	-88(%rbp), %rax
	subq	$2, %rax
	imulq	%rdx, %rax
	subq	-32(%rbp), %rax
	movq	%rax, ans(%rip)
	movq	$0, -16(%rbp)
	jmp	.L20
.L21:
	movq	-16(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	leaq	ans(%rip), %rax
	movq	(%rdx,%rax), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addq	$1, -16(%rbp)
.L20:
	cmpq	$9, -16(%rbp)
	jle	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
