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

```c
#include <stdio.h>
#define max(p,q)((p)>(q)?(p):(q))

int a[200010];
int main(){
	int k,n;
	scanf("%d%d",&k,&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int ans=a[0]+k-a[n-1];
	for(int i=0;i<n-1;i++)ans=max(ans,a[i+1]-a[i]);
	printf("%d",k-ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movl	(%rsp), %edx
	movl	a(%rip), %eax
	leal	-1(%rcx), %edi
	movslq	%edi, %rsi
	addl	%edx, %eax
	subl	(%r12,%rsi,4), %eax
	testl	%edi, %edi
	jle	.L4
	leal	-2(%rcx), %r9d
	cmpl	$2, %r9d
	jbe	.L12
	movl	%edi, %esi
	movd	%eax, %xmm3
	leaq	a(%rip), %rax
	shrl	$2, %esi
	leaq	16(%rax), %r8
	pshufd	$0, %xmm3, %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	addq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	4(%rax), %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm1
	movl	%edi, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	testb	$3, %dil
	je	.L4
.L5:
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
	leaq	(%r12,%r10,4), %r11
	cmpl	%r9d, %r8d
	jge	.L9
	cmpl	$-2147483647, %ecx
	je	.L9
	leal	2(%rsi), %ecx
	movl	(%r11), %r10d
	leaq	-4+a(%rip), %rbp
	movslq	%ecx, %rcx
.L10:
	movl	0(%rbp,%rcx,4), %ebx
	movl	%ecx, %esi
	movl	%ebx, %r11d
	subl	%r10d, %r11d
	movl	(%r12,%rcx,4), %r10d
	movl	%r10d, %r8d
	subl	%ebx, %r8d
	cmpl	%r11d, %r8d
	cmovl	%r11d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	addq	$2, %rcx
	leal	-1(%rcx), %r8d
	cmpl	%r8d, %r9d
	jg	.L10
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
.L9:
	movslq	%r8d, %rcx
	movl	(%r12,%rcx,4), %r9d
	movl	%r9d, %ecx
	subl	(%r12,%r10,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	cmpl	%r8d, %edi
	jle	.L4
	leal	2(%rsi), %ecx
	movslq	%ecx, %r8
	movl	(%r12,%r8,4), %r10d
	movl	%r10d, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L4
	addl	$3, %esi
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
.L4:
	subl	%eax, %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %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
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800040
a:
	.zero	800040
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movl	(%rsp), %edx
	movl	a(%rip), %eax
	leal	-1(%rcx), %edi
	movslq	%edi, %rsi
	addl	%edx, %eax
	subl	(%r12,%rsi,4), %eax
	testl	%edi, %edi
	jle	.L4
	leal	-2(%rcx), %r9d
	cmpl	$2, %r9d
	jbe	.L12
	movl	%edi, %esi
	movd	%eax, %xmm3
	leaq	a(%rip), %rax
	shrl	$2, %esi
	leaq	16(%rax), %r8
	pshufd	$0, %xmm3, %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	addq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	4(%rax), %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm1
	movl	%edi, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	testb	$3, %dil
	je	.L4
.L5:
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
	leaq	(%r12,%r10,4), %r11
	cmpl	%r9d, %r8d
	jge	.L9
	cmpl	$-2147483647, %ecx
	je	.L9
	leal	2(%rsi), %ecx
	movl	(%r11), %r10d
	leaq	-4+a(%rip), %rbp
	movslq	%ecx, %rcx
.L10:
	movl	0(%rbp,%rcx,4), %ebx
	movl	%ecx, %esi
	movl	%ebx, %r11d
	subl	%r10d, %r11d
	movl	(%r12,%rcx,4), %r10d
	movl	%r10d, %r8d
	subl	%ebx, %r8d
	cmpl	%r11d, %r8d
	cmovl	%r11d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	addq	$2, %rcx
	leal	-1(%rcx), %r8d
	cmpl	%r8d, %r9d
	jg	.L10
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
.L9:
	movslq	%r8d, %rcx
	movl	(%r12,%rcx,4), %r9d
	movl	%r9d, %ecx
	subl	(%r12,%r10,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	cmpl	%r8d, %edi
	jle	.L4
	leal	2(%rsi), %ecx
	movslq	%ecx, %r8
	movl	(%r12,%r8,4), %r10d
	movl	%r10d, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L4
	addl	$3, %esi
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
.L4:
	subl	%eax, %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %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
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800040
a:
	.zero	800040
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movl	(%rsp), %edx
	movl	a(%rip), %eax
	leal	-1(%rcx), %edi
	movslq	%edi, %rsi
	addl	%edx, %eax
	subl	(%r12,%rsi,4), %eax
	testl	%edi, %edi
	jle	.L4
	leal	-2(%rcx), %r9d
	cmpl	$2, %r9d
	jbe	.L12
	movl	%edi, %esi
	movd	%eax, %xmm3
	leaq	a(%rip), %rax
	shrl	$2, %esi
	leaq	16(%rax), %r8
	pshufd	$0, %xmm3, %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	addq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	4(%rax), %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm1
	movl	%edi, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	testb	$3, %dil
	je	.L4
.L5:
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
	leaq	(%r12,%r10,4), %r11
	cmpl	%r9d, %r8d
	jge	.L9
	cmpl	$-2147483647, %ecx
	je	.L9
	leal	2(%rsi), %ecx
	movl	(%r11), %r10d
	leaq	-4+a(%rip), %rbp
	movslq	%ecx, %rcx
.L10:
	movl	0(%rbp,%rcx,4), %ebx
	movl	%ecx, %esi
	movl	%ebx, %r11d
	subl	%r10d, %r11d
	movl	(%r12,%rcx,4), %r10d
	movl	%r10d, %r8d
	subl	%ebx, %r8d
	cmpl	%r11d, %r8d
	cmovl	%r11d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	addq	$2, %rcx
	leal	-1(%rcx), %r8d
	cmpl	%r8d, %r9d
	jg	.L10
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
.L9:
	movslq	%r8d, %rcx
	movl	(%r12,%rcx,4), %r9d
	movl	%r9d, %ecx
	subl	(%r12,%r10,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	cmpl	%r8d, %edi
	jle	.L4
	leal	2(%rsi), %ecx
	movslq	%ecx, %r8
	movl	(%r12,%r8,4), %r10d
	movl	%r10d, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L4
	addl	$3, %esi
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
.L4:
	subl	%eax, %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %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
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800040
a:
	.zero	800040
	.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:
```
```c
#include <stdio.h>
#define max(p,q)((p)>(q)?(p):(q))

int a[200010];
int main(){
	int k,n;
	scanf("%d%d",&k,&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int ans=a[0]+k-a[n-1];
	for(int i=0;i<n-1;i++)ans=max(ans,a[i+1]-a[i]);
	printf("%d",k-ans);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define max(p,q)((p)>(q)?(p):(q))

int a[200010];
int main(){
	int k,n;
	scanf("%d%d",&k,&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int ans=a[0]+k-a[n-1];
	for(int i=0;i<n-1;i++)ans=max(ans,a[i+1]-a[i]);
	printf("%d",k-ans);
}```

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.
Optimized Assembly Code:

20 3
5 11 15
 27 3
1 5 15
 20 3
2 11 15
 27 3
1 5 29
 20 3
3 11 15
 20 3
1 5 17
 19 3
0 5 15
 27 3
1 6 29
 20 3
3 11 29
 31 3
3 11 29

10 14 11 3 12 8 9 4 2 13
Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#define max(p,q)((p)>(q)?(p):(q))

int a[200010];
int main(){
	int k,n;
	scanf("%d%d",&k,&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int ans=a[0]+k-a[n-1];
	for(int i=0;i<n-1;i++)ans=max(ans,a[i+1]-a[i]);
	printf("%d",k-ans);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movl	(%rsp), %edx
	movl	a(%rip), %eax
	leal	-1(%rcx), %edi
	movslq	%edi, %rsi
	addl	%edx, %eax
	subl	(%r12,%rsi,4), %eax
	testl	%edi, %edi
	jle	.L4
	leal	-2(%rcx), %r9d
	cmpl	$2, %r9d
	jbe	.L12
	movl	%edi, %esi
	movd	%eax, %xmm3
	leaq	a(%rip), %rax
	shrl	$2, %esi
	leaq	16(%rax), %r8
	pshufd	$0, %xmm3, %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	addq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	4(%rax), %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm1
	movl	%edi, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	testb	$3, %dil
	je	.L4
.L5:
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
	leaq	(%r12,%r10,4), %r11
	cmpl	%r9d, %r8d
	jge	.L9
	cmpl	$-2147483647, %ecx
	je	.L9
	leal	2(%rsi), %ecx
	movl	(%r11), %r10d
	leaq	-4+a(%rip), %rbp
	movslq	%ecx, %rcx
.L10:
	movl	0(%rbp,%rcx,4), %ebx
	movl	%ecx, %esi
	movl	%ebx, %r11d
	subl	%r10d, %r11d
	movl	(%r12,%rcx,4), %r10d
	movl	%r10d, %r8d
	subl	%ebx, %r8d
	cmpl	%r11d, %r8d
	cmovl	%r11d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	addq	$2, %rcx
	leal	-1(%rcx), %r8d
	cmpl	%r8d, %r9d
	jg	.L10
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
.L9:
	movslq	%r8d, %rcx
	movl	(%r12,%rcx,4), %r9d
	movl	%r9d, %ecx
	subl	(%r12,%r10,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	cmpl	%r8d, %edi
	jle	.L4
	leal	2(%rsi), %ecx
	movslq	%ecx, %r8
	movl	(%r12,%r8,4), %r10d
	movl	%r10d, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L4
	addl	$3, %esi
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
.L4:
	subl	%eax, %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %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
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800040
a:
	.zero	800040
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	a(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	testl	%ecx, %ecx
	jle	.L2
	movq	%r12, %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %ecx
	addq	$4, %rbp
	cmpl	%ebx, %ecx
	jg	.L3
.L2:
	movl	(%rsp), %edx
	movl	a(%rip), %eax
	leal	-1(%rcx), %edi
	movslq	%edi, %rsi
	addl	%edx, %eax
	subl	(%r12,%rsi,4), %eax
	testl	%edi, %edi
	jle	.L4
	leal	-2(%rcx), %r9d
	cmpl	$2, %r9d
	jbe	.L12
	movl	%edi, %esi
	movd	%eax, %xmm3
	leaq	a(%rip), %rax
	shrl	$2, %esi
	leaq	16(%rax), %r8
	pshufd	$0, %xmm3, %xmm2
	subl	$1, %esi
	salq	$4, %rsi
	addq	%r8, %rsi
	.p2align 4,,10
	.p2align 3
.L6:
	movdqu	4(%rax), %xmm0
	psubd	(%rax), %xmm0
	addq	$16, %rax
	movdqa	%xmm0, %xmm1
	pcmpgtd	%xmm2, %xmm1
	pand	%xmm1, %xmm0
	pandn	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	por	%xmm0, %xmm2
	cmpq	%rsi, %rax
	jne	.L6
	movdqa	%xmm2, %xmm1
	movl	%edi, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm2, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movd	%xmm1, %eax
	testb	$3, %dil
	je	.L4
.L5:
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
	leaq	(%r12,%r10,4), %r11
	cmpl	%r9d, %r8d
	jge	.L9
	cmpl	$-2147483647, %ecx
	je	.L9
	leal	2(%rsi), %ecx
	movl	(%r11), %r10d
	leaq	-4+a(%rip), %rbp
	movslq	%ecx, %rcx
.L10:
	movl	0(%rbp,%rcx,4), %ebx
	movl	%ecx, %esi
	movl	%ebx, %r11d
	subl	%r10d, %r11d
	movl	(%r12,%rcx,4), %r10d
	movl	%r10d, %r8d
	subl	%ebx, %r8d
	cmpl	%r11d, %r8d
	cmovl	%r11d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	addq	$2, %rcx
	leal	-1(%rcx), %r8d
	cmpl	%r8d, %r9d
	jg	.L10
	movslq	%esi, %r10
	leal	1(%rsi), %r8d
.L9:
	movslq	%r8d, %rcx
	movl	(%r12,%rcx,4), %r9d
	movl	%r9d, %ecx
	subl	(%r12,%r10,4), %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	cmpl	%r8d, %edi
	jle	.L4
	leal	2(%rsi), %ecx
	movslq	%ecx, %r8
	movl	(%r12,%r8,4), %r10d
	movl	%r10d, %r8d
	subl	%r9d, %r8d
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	cmpl	%ecx, %edi
	jle	.L4
	addl	$3, %esi
	movslq	%esi, %rsi
	movl	(%r12,%rsi,4), %ecx
	subl	%r10d, %ecx
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
.L4:
	subl	%eax, %edx
	movq	%r13, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$24, %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
.L12:
	.cfi_restore_state
	xorl	%esi, %esi
	jmp	.L5
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 800040
a:
	.zero	800040
	.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:
```