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>

int main(void){
	int a[100],b[100],t,i,n,m;
	scanf("%d",&m);
	while(m!=0){
	scanf("%d",&n);
	for(t=0;t<n;t++){
		scanf("%d",&a[t]);
	}
	for(t=1;t<n;t++){
		b[t]=a[t-1]-a[t];
	}
	for(i=1;i<n;i++){
		for(t=2;t<n;t++){
			if(b[t-1]>b[t]){
				a[0]=b[t-1];
				b[t-1]=b[t];
				b[t]=a[0];
			}
		}
	}
		if(n==2){
			if(b[1]>0){
				printf("0 %d\n",b[1]);
			}
			if(b[1]<0){
				printf("%d 0\n",-b[1]);
			}
		}
		else{
			if(b[1]>0){
				b[1]=0;
			}
			if(b[n-1]<0){
				b[n-1]=0;
			}
		printf("%d %d\n",-b[1],b[n-1]);
		}
		m--;
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0 %d\n"
.LC2:
	.string	"%d 0\n"
.LC3:
	.string	"%d %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	$832, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L17:
	leaq	-832(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L3
.L4:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L3:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L4
	movl	$1, -824(%rbp)
	jmp	.L5
.L6:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -824(%rbp)
.L5:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L6
	movl	$1, -820(%rbp)
	jmp	.L7
.L11:
	movl	$2, -824(%rbp)
	jmp	.L8
.L10:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -816(%rbp)
	movl	-824(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-816(%rbp), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
.L9:
	addl	$1, -824(%rbp)
.L8:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L10
	addl	$1, -820(%rbp)
.L7:
	movl	-832(%rbp), %eax
	cmpl	%eax, -820(%rbp)
	jl	.L11
	movl	-832(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L13
	movl	-412(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jns	.L14
	movl	-412(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L12:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L15
	movl	$0, -412(%rbp)
.L15:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L16
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
.L16:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-412(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L14:
	movl	-828(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -828(%rbp)
.L2:
	movl	-828(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"0 %d\n"
.LC2:
	.string	"%d 0\n"
.LC3:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$840, %rsp
	.cfi_def_cfa_offset 896
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	8(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L22
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	testl	%edi, %edi
	jle	.L6
	leaq	16(%rsp), %r14
	xorl	%r15d, %r15d
	movq	%r14, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r12
	cmpl	%r15d, %edi
	jg	.L4
	cmpl	$1, %edi
	jle	.L6
	leal	-2(%rdi), %eax
	leal	-1(%rdi), %esi
	cmpl	$2, %eax
	jbe	.L24
	movl	%esi, %ecx
	movq	%r14, %rax
	leaq	420(%rsp), %rdx
	shrl	$2, %ecx
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	32(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	(%rax), %xmm0
	movdqu	4(%rax), %xmm3
	addq	$16, %rax
	addq	$16, %rdx
	psubd	%xmm3, %xmm0
	movups	%xmm0, -16(%rdx)
	cmpq	%rcx, %rax
	jne	.L8
	movl	%esi, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%esi, %edx
	je	.L9
.L7:
	movl	%edi, %ecx
	subl	%edx, %ecx
	leal	-1(%rcx), %esi
	cmpl	$2, %ecx
	je	.L10
	salq	$2, %rdx
	movq	20(%rsp,%rdx), %xmm1
	movq	16(%rsp,%rdx), %xmm0
	psubd	%xmm1, %xmm0
	movq	%xmm0, 420(%rsp,%rdx)
	movl	%esi, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %esi
	je	.L9
.L10:
	movslq	%eax, %rdx
	subl	$1, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdx,4), %eax
	movl	%eax, 416(%rsp,%rdx,4)
.L9:
	leal	-3(%rdi), %eax
	xorl	%r8d, %r8d
	movl	$1, %r9d
	leaq	424(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	420(%rsp), %rdx
	cmpl	$2, %edi
	je	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%ecx, %eax
	jge	.L13
	movq	%xmm1, (%rdx)
	movd	%xmm0, %r13d
	movl	$1, %r8d
.L13:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L14
.L17:
	addl	$1, %r9d
	cmpl	%r9d, %edi
	jne	.L12
	testb	%r8b, %r8b
	je	.L6
	movl	%r13d, 16(%rsp)
.L6:
	movl	420(%rsp), %edx
	cmpl	$2, %edi
	je	.L45
	xorl	%eax, %eax
	testl	%edx, %edx
	leaq	.LC3(%rip), %rsi
	cmovg	%eax, %edx
	leal	-1(%rdi), %eax
	movl	$1, %edi
	cltq
	movl	%edx, 420(%rsp)
	movl	416(%rsp,%rax,4), %ecx
	xorl	%edx, %edx
	testl	%ecx, %ecx
	cmovs	%edx, %ecx
	movl	%ecx, 416(%rsp,%rax,4)
	movl	420(%rsp), %edx
	xorl	%eax, %eax
	negl	%edx
	call	__printf_chk@PLT
.L21:
	subl	$1, 12(%rsp)
	jne	.L2
.L22:
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$840, %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
.L45:
	.cfi_restore_state
	testl	%edx, %edx
	jg	.L47
	je	.L21
	negl	%edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L21
.L47:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L21
.L24:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L7
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"0 %d\n"
.LC2:
	.string	"%d 0\n"
.LC3:
	.string	"%d %d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$840, %rsp
	.cfi_def_cfa_offset 896
	movq	%fs:40, %rax
	movq	%rax, 824(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	8(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L22
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rdi
	movq	%rbp, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	testl	%edi, %edi
	jle	.L6
	leaq	16(%rsp), %r14
	xorl	%r15d, %r15d
	movq	%r14, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %edi
	addq	$4, %r12
	cmpl	%r15d, %edi
	jg	.L4
	cmpl	$1, %edi
	jle	.L6
	leal	-2(%rdi), %eax
	leal	-1(%rdi), %esi
	cmpl	$2, %eax
	jbe	.L24
	movl	%esi, %ecx
	movq	%r14, %rax
	leaq	420(%rsp), %rdx
	shrl	$2, %ecx
	subl	$1, %ecx
	salq	$4, %rcx
	leaq	32(%rsp,%rcx), %rcx
	.p2align 4,,10
	.p2align 3
.L8:
	movdqa	(%rax), %xmm0
	movdqu	4(%rax), %xmm3
	addq	$16, %rax
	addq	$16, %rdx
	psubd	%xmm3, %xmm0
	movups	%xmm0, -16(%rdx)
	cmpq	%rcx, %rax
	jne	.L8
	movl	%esi, %edx
	andl	$-4, %edx
	leal	1(%rdx), %eax
	cmpl	%esi, %edx
	je	.L9
.L7:
	movl	%edi, %ecx
	subl	%edx, %ecx
	leal	-1(%rcx), %esi
	cmpl	$2, %ecx
	je	.L10
	salq	$2, %rdx
	movq	20(%rsp,%rdx), %xmm1
	movq	16(%rsp,%rdx), %xmm0
	psubd	%xmm1, %xmm0
	movq	%xmm0, 420(%rsp,%rdx)
	movl	%esi, %edx
	andl	$-2, %edx
	addl	%edx, %eax
	cmpl	%edx, %esi
	je	.L9
.L10:
	movslq	%eax, %rdx
	subl	$1, %eax
	cltq
	movl	16(%rsp,%rax,4), %eax
	subl	16(%rsp,%rdx,4), %eax
	movl	%eax, 416(%rsp,%rdx,4)
.L9:
	leal	-3(%rdi), %eax
	xorl	%r8d, %r8d
	movl	$1, %r9d
	leaq	424(%rsp,%rax,4), %rsi
	.p2align 4,,10
	.p2align 3
.L12:
	leaq	420(%rsp), %rdx
	cmpl	$2, %edi
	je	.L17
	.p2align 4,,10
	.p2align 3
.L14:
	movq	(%rdx), %xmm0
	pshufd	$0xe5, %xmm0, %xmm2
	movd	%xmm0, %ecx
	movd	%xmm2, %eax
	pshufd	$225, %xmm0, %xmm1
	cmpl	%ecx, %eax
	jge	.L13
	movq	%xmm1, (%rdx)
	movd	%xmm0, %r13d
	movl	$1, %r8d
.L13:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jne	.L14
.L17:
	addl	$1, %r9d
	cmpl	%r9d, %edi
	jne	.L12
	testb	%r8b, %r8b
	je	.L6
	movl	%r13d, 16(%rsp)
.L6:
	movl	420(%rsp), %edx
	cmpl	$2, %edi
	je	.L45
	xorl	%eax, %eax
	testl	%edx, %edx
	leaq	.LC3(%rip), %rsi
	cmovg	%eax, %edx
	leal	-1(%rdi), %eax
	movl	$1, %edi
	cltq
	movl	%edx, 420(%rsp)
	movl	416(%rsp,%rax,4), %ecx
	xorl	%edx, %edx
	testl	%ecx, %ecx
	cmovs	%edx, %ecx
	movl	%ecx, 416(%rsp,%rax,4)
	movl	420(%rsp), %edx
	xorl	%eax, %eax
	negl	%edx
	call	__printf_chk@PLT
.L21:
	subl	$1, 12(%rsp)
	jne	.L2
.L22:
	movq	824(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$840, %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
.L45:
	.cfi_restore_state
	testl	%edx, %edx
	jg	.L47
	je	.L21
	negl	%edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L21
.L47:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L21
.L24:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L7
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void){
	int a[100],b[100],t,i,n,m;
	scanf("%d",&m);
	while(m!=0){
	scanf("%d",&n);
	for(t=0;t<n;t++){
		scanf("%d",&a[t]);
	}
	for(t=1;t<n;t++){
		b[t]=a[t-1]-a[t];
	}
	for(i=1;i<n;i++){
		for(t=2;t<n;t++){
			if(b[t-1]>b[t]){
				a[0]=b[t-1];
				b[t-1]=b[t];
				b[t]=a[0];
			}
		}
	}
		if(n==2){
			if(b[1]>0){
				printf("0 %d\n",b[1]);
			}
			if(b[1]<0){
				printf("%d 0\n",-b[1]);
			}
		}
		else{
			if(b[1]>0){
				b[1]=0;
			}
			if(b[n-1]<0){
				b[n-1]=0;
			}
		printf("%d %d\n",-b[1],b[n-1]);
		}
		m--;
	}
	return 0;
}
5
5
10 70 30 50 177
2
20 100
2
100 30
3
50 50 50
7
123 45 678 901 234 567 890
 5
5
10 70 5 50 177
2
20 100
2
100 30
3
50 50 50
7
123 45 678 901 234 567 890
 5
5
10 70 5 50 206
2
20 100
2
100 30
3
50 50 50
7
123 45 678 901 234 567 890
 5
5
10 70 30 50 90
2
20 100
2
100 30
3
52 50 50
7
123 45 678 901 234 567 890
 5
5
10 70 5 50 177
2
20 110
2
100 30
3
50 50 50
7
123 45 678 901 234 567 890
 5
5
10 70 5 50 206
2
20 100
2
100 30
3
50 50 50
7
123 82 678 901 234 567 890
 5
5
10 101 5 50 206
2
20 100
2
100 30
3
50 50 50
7
123 82 678 901 234 567 890
 5
5
10 70 30 50 90
2
20 100
2
100 30
3
52 50 50
7
123 65 678 901 234 567 955
 5
5
10 101 5 50 206
2
20 100
2
100 30
3
22 50 50
7
123 82 678 901 234 567 890
 5
5
10 101 5 50 390
2
20 100
2
100 30
3
22 50 50
7
123 82 678 901 234 567 890

127 40
80 0
0 70
0 0
633 667
 127 65
80 0
0 70
0 0
633 667
 156 65
80 0
0 70
0 0
633 667
 60 40
80 0
0 70
0 2
633 667
 127 65
90 0
0 70
0 0
633 667
 156 65
80 0
0 70
0 0
596 667
 156 96
80 0
0 70
0 0
596 667
 60 40
80 0
0 70
0 2
613 667
 156 96
80 0
0 70
28 0
596 667
 340 96
80 0
0 70
28 0
596 667

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>

int main(void){
	int a[100],b[100],t,i,n,m;
	scanf("%d",&m);
	while(m!=0){
	scanf("%d",&n);
	for(t=0;t<n;t++){
		scanf("%d",&a[t]);
	}
	for(t=1;t<n;t++){
		b[t]=a[t-1]-a[t];
	}
	for(i=1;i<n;i++){
		for(t=2;t<n;t++){
			if(b[t-1]>b[t]){
				a[0]=b[t-1];
				b[t-1]=b[t];
				b[t]=a[0];
			}
		}
	}
		if(n==2){
			if(b[1]>0){
				printf("0 %d\n",b[1]);
			}
			if(b[1]<0){
				printf("%d 0\n",-b[1]);
			}
		}
		else{
			if(b[1]>0){
				b[1]=0;
			}
			if(b[n-1]<0){
				b[n-1]=0;
			}
		printf("%d %d\n",-b[1],b[n-1]);
		}
		m--;
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0 %d\n"
.LC2:
	.string	"%d 0\n"
.LC3:
	.string	"%d %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	$832, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L17:
	leaq	-832(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L3
.L4:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L3:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L4
	movl	$1, -824(%rbp)
	jmp	.L5
.L6:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -824(%rbp)
.L5:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L6
	movl	$1, -820(%rbp)
	jmp	.L7
.L11:
	movl	$2, -824(%rbp)
	jmp	.L8
.L10:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -816(%rbp)
	movl	-824(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-816(%rbp), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
.L9:
	addl	$1, -824(%rbp)
.L8:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L10
	addl	$1, -820(%rbp)
.L7:
	movl	-832(%rbp), %eax
	cmpl	%eax, -820(%rbp)
	jl	.L11
	movl	-832(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L13
	movl	-412(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jns	.L14
	movl	-412(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L12:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L15
	movl	$0, -412(%rbp)
.L15:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L16
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
.L16:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-412(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L14:
	movl	-828(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -828(%rbp)
.L2:
	movl	-828(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"0 %d\n"
.LC2:
	.string	"%d 0\n"
.LC3:
	.string	"%d %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	$832, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-828(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L17:
	leaq	-832(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -824(%rbp)
	jmp	.L3
.L4:
	leaq	-816(%rbp), %rdx
	movl	-824(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -824(%rbp)
.L3:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L4
	movl	$1, -824(%rbp)
	jmp	.L5
.L6:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-816(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-816(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
	addl	$1, -824(%rbp)
.L5:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L6
	movl	$1, -820(%rbp)
	jmp	.L7
.L11:
	movl	$2, -824(%rbp)
	jmp	.L8
.L10:
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jle	.L9
	movl	-824(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	%eax, -816(%rbp)
	movl	-824(%rbp), %eax
	leal	-1(%rax), %ecx
	movl	-824(%rbp), %eax
	cltq
	movl	-416(%rbp,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%edx, -416(%rbp,%rax,4)
	movl	-816(%rbp), %edx
	movl	-824(%rbp), %eax
	cltq
	movl	%edx, -416(%rbp,%rax,4)
.L9:
	addl	$1, -824(%rbp)
.L8:
	movl	-832(%rbp), %eax
	cmpl	%eax, -824(%rbp)
	jl	.L10
	addl	$1, -820(%rbp)
.L7:
	movl	-832(%rbp), %eax
	cmpl	%eax, -820(%rbp)
	jl	.L11
	movl	-832(%rbp), %eax
	cmpl	$2, %eax
	jne	.L12
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L13
	movl	-412(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L13:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jns	.L14
	movl	-412(%rbp), %eax
	negl	%eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L12:
	movl	-412(%rbp), %eax
	testl	%eax, %eax
	jle	.L15
	movl	$0, -412(%rbp)
.L15:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jns	.L16
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -416(%rbp,%rax,4)
.L16:
	movl	-832(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	-416(%rbp,%rax,4), %eax
	movl	-412(%rbp), %edx
	movl	%edx, %ecx
	negl	%ecx
	movl	%eax, %edx
	movl	%ecx, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L14:
	movl	-828(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -828(%rbp)
.L2:
	movl	-828(%rbp), %eax
	testl	%eax, %eax
	jne	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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:
