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 yakusimaruhiroko(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, M;
int X[114514];

int yosinagasayuri[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
	}
	if (N >= M) {
		puts("0");
	} else {
		int horieyui = 0;
		qsort(X, M, sizeof(*X), yakusimaruhiroko);
		for (i = 1; i < M; i++) {
			yosinagasayuri[i - 1] = X[i] - X[i - 1];
		}
		qsort(yosinagasayuri, M - 1, sizeof(*yosinagasayuri), yakusimaruhiroko);
		for (i = 0; i < M - N; i++) {
			horieyui += yosinagasayuri[i];
		}
		printf("%d\n", horieyui);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	yakusimaruhiroko
	.type	yakusimaruhiroko, @function
yakusimaruhiroko:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	yakusimaruhiroko, .-yakusimaruhiroko
	.globl	N
	.bss
	.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	X
	.align 32
	.type	X, @object
	.size	X, 458056
X:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\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	$16, %rsp
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -8(%rbp)
	jmp	.L8
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	addl	$1, -8(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	N(%rip), %edx
	movl	M(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	$0, -4(%rbp)
	movl	M(%rip), %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %esi
	movl	-8(%rbp), %edx
	subl	$1, %edx
	subl	%esi, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L14
	movl	M(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	yosinagasayuri(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L15:
	movl	M(%rip), %eax
	movl	N(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L7:
	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	yakusimaruhiroko
	.type	yakusimaruhiroko, @function
yakusimaruhiroko:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	yakusimaruhiroko, .-yakusimaruhiroko
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	M(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L9
	movslq	M(%rip), %rsi
	testl	%esi, %esi
	jle	.L8
	leaq	X(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	M(%rip), %rsi
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %esi
	jle	.L8
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L34
.L9:
	movl	$1, %eax
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	cmpl	%esi, N(%rip)
	jge	.L35
	leaq	yakusimaruhiroko(%rip), %r12
	leaq	X(%rip), %rbp
	movl	$4, %edx
	movq	%rbp, %rdi
	movq	%r12, %rcx
	leaq	yosinagasayuri(%rip), %rbx
	call	qsort@PLT
	movl	M(%rip), %edi
	leal	-1(%rdi), %esi
	cmpl	$1, %edi
	jle	.L12
	leal	-2(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L22
	movl	%esi, %r8d
	movq	%rbp, %rdx
	leaq	yosinagasayuri(%rip), %rbx
	xorl	%eax, %eax
	shrl	$2, %r8d
.L14:
	movdqu	4(%rdx), %xmm0
	movq	%rax, %rcx
	psubd	(%rdx), %xmm0
	addq	$1, %rax
	salq	$4, %rcx
	addq	$16, %rdx
	movaps	%xmm0, (%rbx,%rcx)
	cmpl	%eax, %r8d
	ja	.L14
	movl	%esi, %eax
	andl	$-4, %eax
	leal	1(%rax), %edx
	cmpl	%eax, %esi
	je	.L12
.L13:
	subl	%eax, %edi
	leal	-1(%rdi), %r8d
	cmpl	$2, %edi
	je	.L16
	leal	1(%rax), %ecx
	leaq	0(,%rcx,4), %rax
	movq	0(%rbp,%rcx,4), %xmm0
	movq	-4(%rbp,%rax), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, -4(%rbx,%rax)
	movl	%r8d, %eax
	andl	$-2, %eax
	addl	%eax, %edx
	cmpl	%eax, %r8d
	je	.L12
.L16:
	leal	-1(%rdx), %eax
	movslq	%edx, %rdx
	cltq
	movl	0(%rbp,%rdx,4), %edx
	subl	0(%rbp,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
.L12:
	movq	%r12, %rcx
	movslq	%esi, %rsi
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	M(%rip), %ecx
	subl	N(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L23
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%ecx, %esi
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
.L20:
	movq	%rax, %rdx
	addq	$1, %rax
	salq	$4, %rdx
	paddd	(%rbx,%rdx), %xmm0
	cmpl	%eax, %esi
	ja	.L20
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	testb	$3, %cl
	je	.L18
.L19:
	movslq	%eax, %rsi
	addl	(%rbx,%rsi,4), %edx
	leal	1(%rax), %esi
	cmpl	%ecx, %esi
	jge	.L18
	movslq	%esi, %rsi
	addl	$2, %eax
	addl	(%rbx,%rsi,4), %edx
	cmpl	%eax, %ecx
	jle	.L18
	cltq
	addl	(%rbx,%rax,4), %edx
.L18:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L5
.L35:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L5
.L23:
	xorl	%edx, %edx
	jmp	.L18
.L22:
	xorl	%eax, %eax
	movl	$1, %edx
	leaq	yosinagasayuri(%rip), %rbx
	jmp	.L13
.L24:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L19
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	yosinagasayuri
	.bss
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 458056
X:
	.zero	458056
	.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
	.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	yakusimaruhiroko
	.type	yakusimaruhiroko, @function
yakusimaruhiroko:
.LFB39:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	cmpl	%eax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	yakusimaruhiroko, .-yakusimaruhiroko
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xorl	%eax, %eax
	leaq	M(%rip), %rdx
	leaq	N(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L9
	movslq	M(%rip), %rsi
	testl	%esi, %esi
	jle	.L8
	leaq	X(%rip), %rbx
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L34:
	movslq	M(%rip), %rsi
	addl	$1, %ebp
	addq	$4, %rbx
	cmpl	%ebp, %esi
	jle	.L8
.L10:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L34
.L9:
	movl	$1, %eax
.L5:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	cmpl	%esi, N(%rip)
	jge	.L35
	leaq	yakusimaruhiroko(%rip), %r12
	leaq	X(%rip), %rbp
	movl	$4, %edx
	movq	%rbp, %rdi
	movq	%r12, %rcx
	leaq	yosinagasayuri(%rip), %rbx
	call	qsort@PLT
	movl	M(%rip), %edi
	leal	-1(%rdi), %esi
	cmpl	$1, %edi
	jle	.L12
	leal	-2(%rdi), %eax
	cmpl	$2, %eax
	jbe	.L22
	movl	%esi, %r8d
	movq	%rbp, %rdx
	leaq	yosinagasayuri(%rip), %rbx
	xorl	%eax, %eax
	shrl	$2, %r8d
.L14:
	movdqu	4(%rdx), %xmm0
	movq	%rax, %rcx
	psubd	(%rdx), %xmm0
	addq	$1, %rax
	salq	$4, %rcx
	addq	$16, %rdx
	movaps	%xmm0, (%rbx,%rcx)
	cmpl	%eax, %r8d
	ja	.L14
	movl	%esi, %eax
	andl	$-4, %eax
	leal	1(%rax), %edx
	cmpl	%eax, %esi
	je	.L12
.L13:
	subl	%eax, %edi
	leal	-1(%rdi), %r8d
	cmpl	$2, %edi
	je	.L16
	leal	1(%rax), %ecx
	leaq	0(,%rcx,4), %rax
	movq	0(%rbp,%rcx,4), %xmm0
	movq	-4(%rbp,%rax), %xmm1
	psubd	%xmm1, %xmm0
	movq	%xmm0, -4(%rbx,%rax)
	movl	%r8d, %eax
	andl	$-2, %eax
	addl	%eax, %edx
	cmpl	%eax, %r8d
	je	.L12
.L16:
	leal	-1(%rdx), %eax
	movslq	%edx, %rdx
	cltq
	movl	0(%rbp,%rdx,4), %edx
	subl	0(%rbp,%rax,4), %edx
	movl	%edx, (%rbx,%rax,4)
.L12:
	movq	%r12, %rcx
	movslq	%esi, %rsi
	movl	$4, %edx
	movq	%rbx, %rdi
	call	qsort@PLT
	movl	M(%rip), %ecx
	subl	N(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L23
	leal	-1(%rcx), %eax
	cmpl	$2, %eax
	jbe	.L24
	movl	%ecx, %esi
	xorl	%eax, %eax
	pxor	%xmm0, %xmm0
	shrl	$2, %esi
.L20:
	movq	%rax, %rdx
	addq	$1, %rax
	salq	$4, %rdx
	paddd	(%rbx,%rdx), %xmm0
	cmpl	%eax, %esi
	ja	.L20
	movdqa	%xmm0, %xmm1
	movl	%ecx, %eax
	psrldq	$8, %xmm1
	andl	$-4, %eax
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	testb	$3, %cl
	je	.L18
.L19:
	movslq	%eax, %rsi
	addl	(%rbx,%rsi,4), %edx
	leal	1(%rax), %esi
	cmpl	%ecx, %esi
	jge	.L18
	movslq	%esi, %rsi
	addl	$2, %eax
	addl	(%rbx,%rsi,4), %edx
	cmpl	%eax, %ecx
	jle	.L18
	cltq
	addl	(%rbx,%rax,4), %edx
.L18:
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L5
.L35:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L5
.L23:
	xorl	%edx, %edx
	jmp	.L18
.L22:
	xorl	%eax, %eax
	movl	$1, %edx
	leaq	yosinagasayuri(%rip), %rbx
	jmp	.L13
.L24:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L19
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	yosinagasayuri
	.bss
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 458056
X:
	.zero	458056
	.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
	.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 yakusimaruhiroko(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, M;
int X[114514];

int yosinagasayuri[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
	}
	if (N >= M) {
		puts("0");
	} else {
		int horieyui = 0;
		qsort(X, M, sizeof(*X), yakusimaruhiroko);
		for (i = 1; i < M; i++) {
			yosinagasayuri[i - 1] = X[i] - X[i - 1];
		}
		qsort(yosinagasayuri, M - 1, sizeof(*yosinagasayuri), yakusimaruhiroko);
		for (i = 0; i < M - N; i++) {
			horieyui += yosinagasayuri[i];
		}
		printf("%d\n", horieyui);
	}
	return 0;
}

3 7
-10 -1 0 9 -100 2 17
 100 1
-151489
 3 7
-8 -1 0 9 -100 2 17
 3 7
-10 -3 0 9 -100 2 18
 2 5
10 12 1 4 14
 6 7
-8 -1 0 9 -100 2 17
 2 5
10 12 1 4 21
 2 7
-8 -1 0 9 -100 2 17
 3 7
-10 -3 0 9 -5 0 17
 3 7
-8 -1 0 9 -100 0 17

18
 0
 17
 19
 7
 1
 11
 25
 10
 16

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 yakusimaruhiroko(const void* x, const void* y) {
	int a = *(const int*)x, b = *(const int*)y;
	return a < b ? -1 : a > b;
}

int N, M;
int X[114514];

int yosinagasayuri[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d", &X[i]) != 1) return 1;
	}
	if (N >= M) {
		puts("0");
	} else {
		int horieyui = 0;
		qsort(X, M, sizeof(*X), yakusimaruhiroko);
		for (i = 1; i < M; i++) {
			yosinagasayuri[i - 1] = X[i] - X[i - 1];
		}
		qsort(yosinagasayuri, M - 1, sizeof(*yosinagasayuri), yakusimaruhiroko);
		for (i = 0; i < M - N; i++) {
			horieyui += yosinagasayuri[i];
		}
		printf("%d\n", horieyui);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	yakusimaruhiroko
	.type	yakusimaruhiroko, @function
yakusimaruhiroko:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	yakusimaruhiroko, .-yakusimaruhiroko
	.globl	N
	.bss
	.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	X
	.align 32
	.type	X, @object
	.size	X, 458056
X:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\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	$16, %rsp
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -8(%rbp)
	jmp	.L8
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	addl	$1, -8(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	N(%rip), %edx
	movl	M(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	$0, -4(%rbp)
	movl	M(%rip), %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %esi
	movl	-8(%rbp), %edx
	subl	$1, %edx
	subl	%esi, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L14
	movl	M(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	yosinagasayuri(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L15:
	movl	M(%rip), %eax
	movl	N(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L7:
	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	yakusimaruhiroko
	.type	yakusimaruhiroko, @function
yakusimaruhiroko:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	yakusimaruhiroko, .-yakusimaruhiroko
	.globl	N
	.bss
	.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	X
	.align 32
	.type	X, @object
	.size	X, 458056
X:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"0"
.LC3:
	.string	"%d\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	$16, %rsp
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -8(%rbp)
	jmp	.L8
.L10:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	addl	$1, -8(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L10
	movl	N(%rip), %edx
	movl	M(%rip), %eax
	cmpl	%eax, %edx
	jl	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	$0, -4(%rbp)
	movl	M(%rip), %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	X(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$1, -8(%rbp)
	jmp	.L13
.L14:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	X(%rip), %rdx
	movl	(%rcx,%rdx), %esi
	movl	-8(%rbp), %edx
	subl	$1, %edx
	subl	%esi, %eax
	movl	%eax, %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L14
	movl	M(%rip), %eax
	subl	$1, %eax
	cltq
	leaq	yakusimaruhiroko(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	yosinagasayuri(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -8(%rbp)
	jmp	.L15
.L16:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -4(%rbp)
	addl	$1, -8(%rbp)
.L15:
	movl	M(%rip), %eax
	movl	N(%rip), %edx
	subl	%edx, %eax
	cmpl	%eax, -8(%rbp)
	jl	.L16
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
.L7:
	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:
