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

```c
// Aizu 0580: Fish
// 2017.10.25 bal4u@uu
// ???????????????????????±?????¨?????????????¨????

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

#define MAX  52
#define MAX2 104

typedef struct { int x1, y1, d1, x2, y2, d2; } PP;
PP p[MAX];
int x[MAX2], y[MAX2], d[MAX2], sz;

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
	int n, k, i, xx, yy, dd, c;
	long long ans;

	scanf("%d%d", &n, &k);
	for (sz = 0, i = 0; i < n; i++) {
		scanf("%d%d%d%d%d%d", &p[i].x1, &p[i].y1, &p[i].d1, &p[i].x2, &p[i].y2, &p[i].d2);
		x[sz] = p[i].x1, x[sz+1] = p[i].x2;
		y[sz] = p[i].y1, y[sz+1] = p[i].y2;
		d[sz] = p[i].d1, d[sz+1] = p[i].d2;
		sz += 2;
	}
	qsort(x, sz, sizeof(int), cmp);
	qsort(y, sz, sizeof(int), cmp);
	qsort(d, sz, sizeof(int), cmp);

	ans = 0;
	for (xx = 1; xx < sz; xx++) for (yy = 1; yy < sz; yy++) for (dd = 1; dd < sz; dd++) {
		c = 0;
		for (i = 0; i < n; i++) {
          if (p[i].x1 <= x[xx-1] && x[xx] <= p[i].x2 &&
              p[i].y1 <= y[yy-1] && y[yy] <= p[i].y2 &&
              p[i].d1 <= d[dd-1] && d[dd] <= p[i].d2) c++;
        }
        if (c >= k) ans += (long long)(x[xx]-x[xx-1]) * (y[yy]-y[yy-1]) * (d[dd]-d[dd-1]);
	}
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 1248
p:
	.zero	1248
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 416
x:
	.zero	416
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 416
y:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 416
d:
	.zero	416
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d%d%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, sz(%rip)
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdi
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	leaq	(%rdx,%rax), %r9
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	12(%rax), %r8
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	8(%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	leaq	p(%rip), %rsi
	addq	%rsi, %rax
	subq	$8, %rsp
	pushq	%rdi
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	addl	$2, %eax
	movl	%eax, sz(%rip)
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	y(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -16(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L6
.L15:
	movl	$1, -28(%rbp)
	jmp	.L7
.L14:
	movl	$1, -24(%rbp)
	jmp	.L8
.L13:
	movl	$0, -20(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L11
	movl	-40(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L12
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movslq	%eax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-28(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	y(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-24(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	d(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -16(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	sz(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L13
	addl	$1, -28(%rbp)
.L7:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	addl	$1, -32(%rbp)
.L6:
	movl	sz(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L15
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	leaq	20(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	$0, sz(%rip)
	testl	%esi, %esi
	jle	.L18
	leaq	y(%rip), %rax
	leaq	p(%rip), %rbp
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	.LC1(%rip), %r14
	leaq	x(%rip), %r13
	leaq	d(%rip), %rbx
.L5:
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	leaq	20(%rbp), %rax
	leaq	8(%rbp), %rcx
	movq	%rbp, %rsi
	pushq	%rax
	.cfi_def_cfa_offset 112
	leaq	4(%rbp), %rdx
	leaq	16(%rbp), %r9
	movq	%r14, %rdi
	leaq	12(%rbp), %r8
	xorl	%eax, %eax
	addl	$1, %r12d
	addq	$24, %rbp
	call	__isoc99_scanf@PLT
	movd	-24(%rbp), %xmm0
	movd	-12(%rbp), %xmm1
	movslq	sz(%rip), %rdx
	movq	16(%rsp), %rdi
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 0(%r13,%rdx,4)
	movd	-20(%rbp), %xmm0
	movd	-8(%rbp), %xmm2
	movq	%rdx, %rax
	addl	$2, %eax
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, (%rdi,%rdx,4)
	movd	-16(%rbp), %xmm0
	movd	-4(%rbp), %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%rbx,%rdx,4)
	popq	%rdx
	.cfi_def_cfa_offset 104
	popq	%rcx
	.cfi_def_cfa_offset 96
	movl	%eax, sz(%rip)
	cmpl	%r12d, 16(%rsp)
	jg	.L5
.L4:
	leaq	cmp(%rip), %r12
	movslq	%eax, %rsi
	movl	$4, %edx
	movq	%r13, %rdi
	movq	%r12, %rcx
	call	qsort@PLT
	movslq	sz(%rip), %rsi
	movq	(%rsp), %rdi
	movq	%r12, %rcx
	movl	$4, %edx
	call	qsort@PLT
	movq	%r12, %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	movslq	sz(%rip), %rsi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cmpl	$1, %eax
	jle	.L19
	leaq	x(%rip), %rsi
	subl	$2, %eax
	movl	16(%rsp), %ebp
	leaq	4+y(%rip), %r15
	salq	$2, %rax
	leaq	4(%rsi), %rdx
	movl	20(%rsp), %r12d
	xorl	%r10d, %r10d
	leaq	(%rdx,%rax), %rdi
	leaq	4+d(%rip), %r11
	addq	%rax, %r15
	addq	%rax, %r11
	leaq	p(%rip), %r13
	leal	-1(%rbp), %eax
	movq	%rdi, 8(%rsp)
	leaq	(%rax,%rax,2), %rdx
	leaq	24(%r13), %rax
	leaq	(%rax,%rdx,8), %rcx
.L7:
	movq	(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbx, %rdi
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%r9d, %r9d
	testl	%ebp, %ebp
	jle	.L13
	movl	(%rsi), %edx
	movq	%r13, %rax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%edx, (%rax)
	jg	.L8
	movl	12(%rax), %r14d
	cmpl	%r14d, 4(%rsi)
	jg	.L8
	movl	(%r8), %r14d
	cmpl	%r14d, 4(%rax)
	jg	.L8
	movl	16(%rax), %r14d
	cmpl	%r14d, 4(%r8)
	jg	.L8
	movl	(%rdi), %r14d
	cmpl	%r14d, 8(%rax)
	jg	.L8
	movl	20(%rax), %r14d
	cmpl	%r14d, 4(%rdi)
	setle	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$24, %rax
	cmpq	%rax, %rcx
	jne	.L9
.L13:
	cmpl	%r9d, %r12d
	jg	.L10
	movl	4(%rsi), %eax
	movl	4(%r8), %edx
	subl	(%rsi), %eax
	subl	(%r8), %edx
	movslq	%edx, %rdx
	cltq
	imulq	%rdx, %rax
	movl	4(%rdi), %edx
	subl	(%rdi), %edx
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	addq	%rax, %r10
.L10:
	addq	$4, %rdi
	cmpq	%r11, %rdi
	jne	.L15
	addq	$4, %r8
	cmpq	%r15, %r8
	jne	.L16
	addq	$4, %rsi
	cmpq	8(%rsp), %rsi
	jne	.L7
.L6:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$40, %rsp
	.cfi_remember_state
	.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
.L18:
	.cfi_restore_state
	leaq	y(%rip), %rbx
	xorl	%eax, %eax
	leaq	x(%rip), %r13
	movq	%rbx, (%rsp)
	leaq	d(%rip), %rbx
	jmp	.L4
.L19:
	xorl	%r10d, %r10d
	jmp	.L6
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	sz
	.bss
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 416
d:
	.zero	416
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 416
y:
	.zero	416
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 416
x:
	.zero	416
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 1248
p:
	.zero	1248
	.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	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	subl	(%rsi), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d%d%d"
.LC2:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	leaq	20(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	$0, sz(%rip)
	testl	%esi, %esi
	jle	.L18
	leaq	y(%rip), %rax
	leaq	p(%rip), %rbp
	xorl	%r12d, %r12d
	movq	%rax, (%rsp)
	leaq	.LC1(%rip), %r14
	leaq	x(%rip), %r13
	leaq	d(%rip), %rbx
.L5:
	subq	$8, %rsp
	.cfi_def_cfa_offset 104
	leaq	20(%rbp), %rax
	leaq	8(%rbp), %rcx
	movq	%rbp, %rsi
	pushq	%rax
	.cfi_def_cfa_offset 112
	leaq	4(%rbp), %rdx
	leaq	16(%rbp), %r9
	movq	%r14, %rdi
	leaq	12(%rbp), %r8
	xorl	%eax, %eax
	addl	$1, %r12d
	addq	$24, %rbp
	call	__isoc99_scanf@PLT
	movd	-24(%rbp), %xmm0
	movd	-12(%rbp), %xmm1
	movslq	sz(%rip), %rdx
	movq	16(%rsp), %rdi
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 0(%r13,%rdx,4)
	movd	-20(%rbp), %xmm0
	movd	-8(%rbp), %xmm2
	movq	%rdx, %rax
	addl	$2, %eax
	punpckldq	%xmm2, %xmm0
	movq	%xmm0, (%rdi,%rdx,4)
	movd	-16(%rbp), %xmm0
	movd	-4(%rbp), %xmm3
	punpckldq	%xmm3, %xmm0
	movq	%xmm0, (%rbx,%rdx,4)
	popq	%rdx
	.cfi_def_cfa_offset 104
	popq	%rcx
	.cfi_def_cfa_offset 96
	movl	%eax, sz(%rip)
	cmpl	%r12d, 16(%rsp)
	jg	.L5
.L4:
	leaq	cmp(%rip), %r12
	movslq	%eax, %rsi
	movl	$4, %edx
	movq	%r13, %rdi
	movq	%r12, %rcx
	call	qsort@PLT
	movslq	sz(%rip), %rsi
	movq	(%rsp), %rdi
	movq	%r12, %rcx
	movl	$4, %edx
	call	qsort@PLT
	movq	%r12, %rcx
	movl	$4, %edx
	movq	%rbx, %rdi
	movslq	sz(%rip), %rsi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cmpl	$1, %eax
	jle	.L19
	leaq	x(%rip), %rsi
	subl	$2, %eax
	movl	16(%rsp), %ebp
	leaq	4+y(%rip), %r15
	salq	$2, %rax
	leaq	4(%rsi), %rdx
	movl	20(%rsp), %r12d
	xorl	%r10d, %r10d
	leaq	(%rdx,%rax), %rdi
	leaq	4+d(%rip), %r11
	addq	%rax, %r15
	addq	%rax, %r11
	leaq	p(%rip), %r13
	leal	-1(%rbp), %eax
	movq	%rdi, 8(%rsp)
	leaq	(%rax,%rax,2), %rdx
	leaq	24(%r13), %rax
	leaq	(%rax,%rdx,8), %rcx
.L7:
	movq	(%rsp), %r8
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbx, %rdi
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%r9d, %r9d
	testl	%ebp, %ebp
	jle	.L13
	movl	(%rsi), %edx
	movq	%r13, %rax
	xorl	%r9d, %r9d
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%edx, (%rax)
	jg	.L8
	movl	12(%rax), %r14d
	cmpl	%r14d, 4(%rsi)
	jg	.L8
	movl	(%r8), %r14d
	cmpl	%r14d, 4(%rax)
	jg	.L8
	movl	16(%rax), %r14d
	cmpl	%r14d, 4(%r8)
	jg	.L8
	movl	(%rdi), %r14d
	cmpl	%r14d, 8(%rax)
	jg	.L8
	movl	20(%rax), %r14d
	cmpl	%r14d, 4(%rdi)
	setle	%r14b
	movzbl	%r14b, %r14d
	addl	%r14d, %r9d
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$24, %rax
	cmpq	%rax, %rcx
	jne	.L9
.L13:
	cmpl	%r9d, %r12d
	jg	.L10
	movl	4(%rsi), %eax
	movl	4(%r8), %edx
	subl	(%rsi), %eax
	subl	(%r8), %edx
	movslq	%edx, %rdx
	cltq
	imulq	%rdx, %rax
	movl	4(%rdi), %edx
	subl	(%rdi), %edx
	movslq	%edx, %rdx
	imulq	%rdx, %rax
	addq	%rax, %r10
.L10:
	addq	$4, %rdi
	cmpq	%r11, %rdi
	jne	.L15
	addq	$4, %r8
	cmpq	%r15, %r8
	jne	.L16
	addq	$4, %rsi
	cmpq	8(%rsp), %rsi
	jne	.L7
.L6:
	xorl	%eax, %eax
	movq	%r10, %rdx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L24
	addq	$40, %rsp
	.cfi_remember_state
	.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
.L18:
	.cfi_restore_state
	leaq	y(%rip), %rbx
	xorl	%eax, %eax
	leaq	x(%rip), %r13
	movq	%rbx, (%rsp)
	leaq	d(%rip), %rbx
	jmp	.L4
.L19:
	xorl	%r10d, %r10d
	jmp	.L6
.L24:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	sz
	.bss
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 416
d:
	.zero	416
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 416
y:
	.zero	416
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 416
x:
	.zero	416
	.globl	p
	.align 32
	.type	p, @object
	.size	p, 1248
p:
	.zero	1248
	.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:

// Aizu 0580: Fish
// 2017.10.25 bal4u@uu
// ???????????????????????±?????¨?????????????¨????

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

#define MAX  52
#define MAX2 104

typedef struct { int x1, y1, d1, x2, y2, d2; } PP;
PP p[MAX];
int x[MAX2], y[MAX2], d[MAX2], sz;

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
	int n, k, i, xx, yy, dd, c;
	long long ans;

	scanf("%d%d", &n, &k);
	for (sz = 0, i = 0; i < n; i++) {
		scanf("%d%d%d%d%d%d", &p[i].x1, &p[i].y1, &p[i].d1, &p[i].x2, &p[i].y2, &p[i].d2);
		x[sz] = p[i].x1, x[sz+1] = p[i].x2;
		y[sz] = p[i].y1, y[sz+1] = p[i].y2;
		d[sz] = p[i].d1, d[sz+1] = p[i].d2;
		sz += 2;
	}
	qsort(x, sz, sizeof(int), cmp);
	qsort(y, sz, sizeof(int), cmp);
	qsort(d, sz, sizeof(int), cmp);

	ans = 0;
	for (xx = 1; xx < sz; xx++) for (yy = 1; yy < sz; yy++) for (dd = 1; dd < sz; dd++) {
		c = 0;
		for (i = 0; i < n; i++) {
          if (p[i].x1 <= x[xx-1] && x[xx] <= p[i].x2 &&
              p[i].y1 <= y[yy-1] && y[yy] <= p[i].y2 &&
              p[i].d1 <= d[dd-1] && d[dd] <= p[i].d2) c++;
        }
        if (c >= k) ans += (long long)(x[xx]-x[xx-1]) * (y[yy]-y[yy-1]) * (d[dd]-d[dd-1]);
	}
	printf("%lld\n", ans);
	return 0;
}
3 2
10 50 0 50 70 100
10 20 20 70 90 60
40 60 20 90 90 70
 3 2
10 50 0 50 70 100
10 20 20 70 90 60
40 60 20 90 90 98
 3 2
10 50 0 50 70 000
10 20 20 70 90 60
40 60 20 90 90 98
 3 2
20 50 0 50 70 000
10 35 20 70 90 60
40 111 20 102 90 131
 3 2
30 50 0 50 70 100
8 20 20 70 90 60
40 60 20 90 90 70
 3 2
10 50 0 32 70 100
10 20 20 70 90 60
40 60 20 90 90 70
 3 2
20 50 0 50 70 000
10 35 20 70 90 60
61 60 20 102 90 131
 3 2
11 50 0 50 70 100
8 20 20 70 90 60
40 60 20 90 90 70
 3 2
10 53 0 32 70 100
10 20 20 70 90 60
40 60 20 90 90 70
 3 2
10 50 0 28 70 100
10 25 20 70 90 60
40 60 20 90 90 98

65000
 67800
 36000
 0
 49000
 53600
 10800
 64200
 50960
 50400

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

```c
// Aizu 0580: Fish
// 2017.10.25 bal4u@uu
// ???????????????????????±?????¨?????????????¨????

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

#define MAX  52
#define MAX2 104

typedef struct { int x1, y1, d1, x2, y2, d2; } PP;
PP p[MAX];
int x[MAX2], y[MAX2], d[MAX2], sz;

int cmp(int *a, int *b) { return *a - *b; }

int main()
{
	int n, k, i, xx, yy, dd, c;
	long long ans;

	scanf("%d%d", &n, &k);
	for (sz = 0, i = 0; i < n; i++) {
		scanf("%d%d%d%d%d%d", &p[i].x1, &p[i].y1, &p[i].d1, &p[i].x2, &p[i].y2, &p[i].d2);
		x[sz] = p[i].x1, x[sz+1] = p[i].x2;
		y[sz] = p[i].y1, y[sz+1] = p[i].y2;
		d[sz] = p[i].d1, d[sz+1] = p[i].d2;
		sz += 2;
	}
	qsort(x, sz, sizeof(int), cmp);
	qsort(y, sz, sizeof(int), cmp);
	qsort(d, sz, sizeof(int), cmp);

	ans = 0;
	for (xx = 1; xx < sz; xx++) for (yy = 1; yy < sz; yy++) for (dd = 1; dd < sz; dd++) {
		c = 0;
		for (i = 0; i < n; i++) {
          if (p[i].x1 <= x[xx-1] && x[xx] <= p[i].x2 &&
              p[i].y1 <= y[yy-1] && y[yy] <= p[i].y2 &&
              p[i].d1 <= d[dd-1] && d[dd] <= p[i].d2) c++;
        }
        if (c >= k) ans += (long long)(x[xx]-x[xx-1]) * (y[yy]-y[yy-1]) * (d[dd]-d[dd-1]);
	}
	printf("%lld\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 1248
p:
	.zero	1248
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 416
x:
	.zero	416
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 416
y:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 416
d:
	.zero	416
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d%d%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, sz(%rip)
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdi
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	leaq	(%rdx,%rax), %r9
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	12(%rax), %r8
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	8(%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	leaq	p(%rip), %rsi
	addq	%rsi, %rax
	subq	$8, %rsp
	pushq	%rdi
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	addl	$2, %eax
	movl	%eax, sz(%rip)
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	y(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -16(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L6
.L15:
	movl	$1, -28(%rbp)
	jmp	.L7
.L14:
	movl	$1, -24(%rbp)
	jmp	.L8
.L13:
	movl	$0, -20(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L11
	movl	-40(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L12
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movslq	%eax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-28(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	y(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-24(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	d(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -16(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	sz(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L13
	addl	$1, -28(%rbp)
.L7:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	addl	$1, -32(%rbp)
.L6:
	movl	sz(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L15
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 1248
p:
	.zero	1248
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 416
x:
	.zero	416
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 416
y:
	.zero	416
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 416
d:
	.zero	416
	.globl	sz
	.align 4
	.type	sz, @object
	.size	sz, 4
sz:
	.zero	4
	.text
	.globl	cmp
	.type	cmp, @function
cmp:
.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
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmp, .-cmp
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d%d%d%d%d%d"
.LC2:
	.string	"%lld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-40(%rbp), %rdx
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, sz(%rip)
	movl	$0, -36(%rbp)
	jmp	.L4
.L5:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	leaq	4(%rax), %rdi
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	16(%rax), %rdx
	leaq	p(%rip), %rax
	leaq	(%rdx,%rax), %r9
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	12(%rax), %r8
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	8(%rax), %rcx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	leaq	p(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movq	%rsi, %rax
	addq	%rax, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	leaq	p(%rip), %rsi
	addq	%rsi, %rax
	subq	$8, %rsp
	pushq	%rdi
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$16, %rsp
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	y(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	leal	1(%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	d(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	sz(%rip), %eax
	addl	$2, %eax
	movl	%eax, sz(%rip)
	addl	$1, -36(%rbp)
.L4:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L5
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	x(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	y(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	sz(%rip), %eax
	cltq
	leaq	cmp(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -16(%rbp)
	movl	$1, -32(%rbp)
	jmp	.L6
.L15:
	movl	$1, -28(%rbp)
	jmp	.L7
.L14:
	movl	$1, -24(%rbp)
	jmp	.L8
.L13:
	movl	$0, -20(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L9
.L11:
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-32(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	12+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	4+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	16+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	8+p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jg	.L10
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	movq	%rax, %rdx
	leaq	20+p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jg	.L10
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -36(%rbp)
.L9:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L11
	movl	-40(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L12
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	x(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-32(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	x(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movslq	%eax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	y(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-28(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	y(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	-24(%rbp), %ecx
	subl	$1, %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	d(%rip), %rcx
	movl	(%rsi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	imulq	%rdx, %rax
	addq	%rax, -16(%rbp)
.L12:
	addl	$1, -24(%rbp)
.L8:
	movl	sz(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L13
	addl	$1, -28(%rbp)
.L7:
	movl	sz(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L14
	addl	$1, -32(%rbp)
.L6:
	movl	sz(%rip), %eax
	cmpl	%eax, -32(%rbp)
	jl	.L15
	movq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
