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>
int main()
{
	int n,k,h[100001];
	int i,j,x=0,y[100001];
	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++) scanf("%d",&h[i]);
	for(i=0;i<=n;i++) y[i]=1000000000;
	y[0]=0;
	for(i=0;i<n-1;i++){
		for(j=1;j<=k;j++){
			x=h[i]-h[i+j];
			if(x<0) x=-x;
			if(i+j<n){
				if(y[i+j]>x+y[i]){
					y[i+j]=x+y[i];
				}
			}
		}
	}
	printf("%d\n",y[n-1]);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798752
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1328, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	testl	%r9d, %r9d
	js	.L4
	leal	1(%r9), %ecx
	cmpl	$2, %r9d
	jle	.L16
	movl	%ecx, %edx
	movdqa	.LC2(%rip), %xmm0
	leaq	400032(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	400048(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L7
.L5:
	movslq	%eax, %rdx
	movl	$1000000000, 400032(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r9d
	jl	.L4
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 400032(%rsp,%rdx,4)
	cmpl	%eax, %r9d
	jl	.L4
	cltq
	movl	$1000000000, 400032(%rsp,%rax,4)
.L7:
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
.L14:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leaq	16(%rsp), %r11
	leaq	400032(%rsp), %r8
	xorl	%r10d, %r10d
	leal	1(%rax), %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r11,%rax,4), %ecx
	movl	%esi, %edx
	movl	%ecx, %edi
	subl	%esi, %edi
	subl	%ecx, %edx
	leal	(%r10,%rax), %ecx
	cmovs	%edi, %edx
	cmpl	%ecx, %r9d
	jle	.L12
	addl	(%r8), %edx
	cmpl	%edx, (%r8,%rax,4)
	jle	.L12
	movl	%edx, (%r8,%rax,4)
.L12:
	addq	$1, %rax
	cmpq	%rbx, %rax
	jne	.L13
	addl	$1, %r10d
	addq	$4, %r11
	addq	$4, %r8
	cmpl	%ebp, %r10d
	jne	.L10
.L9:
	movslq	%ebp, %rbp
	xorl	%eax, %eax
	movl	$1, %edi
	movl	400032(%rsp,%rbp,4), %edx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$800048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
	testl	%ebp, %ebp
	jg	.L14
	jmp	.L9
.L16:
	xorl	%eax, %eax
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798752
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1328, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	testl	%r9d, %r9d
	js	.L4
	leal	1(%r9), %ecx
	cmpl	$2, %r9d
	jle	.L16
	movl	%ecx, %edx
	movdqa	.LC2(%rip), %xmm0
	leaq	400032(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	400048(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L7
.L5:
	movslq	%eax, %rdx
	movl	$1000000000, 400032(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r9d
	jl	.L4
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 400032(%rsp,%rdx,4)
	cmpl	%eax, %r9d
	jl	.L4
	cltq
	movl	$1000000000, 400032(%rsp,%rax,4)
.L7:
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
.L14:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leaq	16(%rsp), %r11
	leaq	400032(%rsp), %r8
	xorl	%r10d, %r10d
	leal	1(%rax), %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r11,%rax,4), %ecx
	movl	%esi, %edx
	movl	%ecx, %edi
	subl	%esi, %edi
	subl	%ecx, %edx
	leal	(%r10,%rax), %ecx
	cmovs	%edi, %edx
	cmpl	%ecx, %r9d
	jle	.L12
	addl	(%r8), %edx
	cmpl	%edx, (%r8,%rax,4)
	jle	.L12
	movl	%edx, (%r8,%rax,4)
.L12:
	addq	$1, %rax
	cmpq	%rbx, %rax
	jne	.L13
	addl	$1, %r10d
	addq	$4, %r11
	addq	$4, %r8
	cmpl	%ebp, %r10d
	jne	.L10
.L9:
	movslq	%ebp, %rbp
	xorl	%eax, %eax
	movl	$1, %edi
	movl	400032(%rsp,%rbp,4), %edx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$800048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
	testl	%ebp, %ebp
	jg	.L14
	jmp	.L9
.L16:
	xorl	%eax, %eax
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798752
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1328, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	testl	%r9d, %r9d
	js	.L4
	leal	1(%r9), %ecx
	cmpl	$2, %r9d
	jle	.L16
	movl	%ecx, %edx
	movdqa	.LC2(%rip), %xmm0
	leaq	400032(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	400048(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L7
.L5:
	movslq	%eax, %rdx
	movl	$1000000000, 400032(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r9d
	jl	.L4
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 400032(%rsp,%rdx,4)
	cmpl	%eax, %r9d
	jl	.L4
	cltq
	movl	$1000000000, 400032(%rsp,%rax,4)
.L7:
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
.L14:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leaq	16(%rsp), %r11
	leaq	400032(%rsp), %r8
	xorl	%r10d, %r10d
	leal	1(%rax), %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r11,%rax,4), %ecx
	movl	%esi, %edx
	movl	%ecx, %edi
	subl	%esi, %edi
	subl	%ecx, %edx
	leal	(%r10,%rax), %ecx
	cmovs	%edi, %edx
	cmpl	%ecx, %r9d
	jle	.L12
	addl	(%r8), %edx
	cmpl	%edx, (%r8,%rax,4)
	jle	.L12
	movl	%edx, (%r8,%rax,4)
.L12:
	addq	$1, %rax
	cmpq	%rbx, %rax
	jne	.L13
	addl	$1, %r10d
	addq	$4, %r11
	addq	$4, %r8
	cmpl	%ebp, %r10d
	jne	.L10
.L9:
	movslq	%ebp, %rbp
	xorl	%eax, %eax
	movl	$1, %edi
	movl	400032(%rsp,%rbp,4), %edx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$800048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
	testl	%ebp, %ebp
	jg	.L14
	jmp	.L9
.L16:
	xorl	%eax, %eax
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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>
int main()
{
	int n,k,h[100001];
	int i,j,x=0,y[100001];
	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++) scanf("%d",&h[i]);
	for(i=0;i<=n;i++) y[i]=1000000000;
	y[0]=0;
	for(i=0;i<n-1;i++){
		for(j=1;j<=k;j++){
			x=h[i]-h[i+j];
			if(x<0) x=-x;
			if(i+j<n){
				if(y[i+j]>x+y[i]){
					y[i+j]=x+y[i];
				}
			}
		}
	}
	printf("%d\n",y[n-1]);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main()
{
	int n,k,h[100001];
	int i,j,x=0,y[100001];
	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++) scanf("%d",&h[i]);
	for(i=0;i<=n;i++) y[i]=1000000000;
	y[0]=0;
	for(i=0;i<n-1;i++){
		for(j=1;j<=k;j++){
			x=h[i]-h[i+j];
			if(x<0) x=-x;
			if(i+j<n){
				if(y[i+j]>x+y[i]){
					y[i+j]=x+y[i];
				}
			}
		}
	}
	printf("%d\n",y[n-1]);
	return 0;
}```

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:

2 100
10 9
 5 3
10 30 40 50 24
 3 4
40 10 20 70 80 10 20 70 80 60
 3 1
0 20 10
 3 4
40 10 17 70 80 10 20 70 80 60
 2 100
7 10
 10 4
40 9 20 70 80 10 20 70 80 60
 3 1
9 20 10
 2 100
17 9
 3 4
40 10 34 70 80 10 20 70 80 60

1
 26
 20
 30
 23
 3
 40
 21
 8
 6

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>
int main()
{
	int n,k,h[100001];
	int i,j,x=0,y[100001];
	scanf("%d %d",&n,&k);
	for(i=0;i<n;i++) scanf("%d",&h[i]);
	for(i=0;i<=n;i++) y[i]=1000000000;
	y[0]=0;
	for(i=0;i<n-1;i++){
		for(j=1;j<=k;j++){
			x=h[i]-h[i+j];
			if(x<0) x=-x;
			if(i+j<n){
				if(y[i+j]>x+y[i]){
					y[i+j]=x+y[i];
				}
			}
		}
	}
	printf("%d\n",y[n-1]);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798752
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1328, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	testl	%r9d, %r9d
	js	.L4
	leal	1(%r9), %ecx
	cmpl	$2, %r9d
	jle	.L16
	movl	%ecx, %edx
	movdqa	.LC2(%rip), %xmm0
	leaq	400032(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	400048(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L7
.L5:
	movslq	%eax, %rdx
	movl	$1000000000, 400032(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r9d
	jl	.L4
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 400032(%rsp,%rdx,4)
	cmpl	%eax, %r9d
	jl	.L4
	cltq
	movl	$1000000000, 400032(%rsp,%rax,4)
.L7:
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
.L14:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leaq	16(%rsp), %r11
	leaq	400032(%rsp), %r8
	xorl	%r10d, %r10d
	leal	1(%rax), %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r11,%rax,4), %ecx
	movl	%esi, %edx
	movl	%ecx, %edi
	subl	%esi, %edi
	subl	%ecx, %edx
	leal	(%r10,%rax), %ecx
	cmovs	%edi, %edx
	cmpl	%ecx, %r9d
	jle	.L12
	addl	(%r8), %edx
	cmpl	%edx, (%r8,%rax,4)
	jle	.L12
	movl	%edx, (%r8,%rax,4)
.L12:
	addq	$1, %rax
	cmpq	%rbx, %rax
	jne	.L13
	addl	$1, %r10d
	addq	$4, %r11
	addq	$4, %r8
	cmpl	%ebp, %r10d
	jne	.L10
.L9:
	movslq	%ebp, %rbp
	xorl	%eax, %eax
	movl	$1, %edi
	movl	400032(%rsp,%rbp,4), %edx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$800048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
	testl	%ebp, %ebp
	jg	.L14
	jmp	.L9
.L16:
	xorl	%eax, %eax
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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"
.LC3:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798752
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1328, %rsp
	.cfi_def_cfa_offset 800080
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 800040(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	16(%rsp), %rbp
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %r9d
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	testl	%r9d, %r9d
	js	.L4
	leal	1(%r9), %ecx
	cmpl	$2, %r9d
	jle	.L16
	movl	%ecx, %edx
	movdqa	.LC2(%rip), %xmm0
	leaq	400032(%rsp), %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	400048(%rsp,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L6:
	movaps	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L6
	movl	%ecx, %eax
	andl	$-4, %eax
	andl	$3, %ecx
	je	.L7
.L5:
	movslq	%eax, %rdx
	movl	$1000000000, 400032(%rsp,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %r9d
	jl	.L4
	movslq	%edx, %rdx
	addl	$2, %eax
	movl	$1000000000, 400032(%rsp,%rdx,4)
	cmpl	%eax, %r9d
	jl	.L4
	cltq
	movl	$1000000000, 400032(%rsp,%rax,4)
.L7:
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
.L14:
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L9
	leaq	16(%rsp), %r11
	leaq	400032(%rsp), %r8
	xorl	%r10d, %r10d
	leal	1(%rax), %ebx
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r11), %esi
	movl	$1, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	movl	(%r11,%rax,4), %ecx
	movl	%esi, %edx
	movl	%ecx, %edi
	subl	%esi, %edi
	subl	%ecx, %edx
	leal	(%r10,%rax), %ecx
	cmovs	%edi, %edx
	cmpl	%ecx, %r9d
	jle	.L12
	addl	(%r8), %edx
	cmpl	%edx, (%r8,%rax,4)
	jle	.L12
	movl	%edx, (%r8,%rax,4)
.L12:
	addq	$1, %rax
	cmpq	%rbx, %rax
	jne	.L13
	addl	$1, %r10d
	addq	$4, %r11
	addq	$4, %r8
	cmpl	%ebp, %r10d
	jne	.L10
.L9:
	movslq	%ebp, %rbp
	xorl	%eax, %eax
	movl	$1, %edi
	movl	400032(%rsp,%rbp,4), %edx
	leaq	.LC3(%rip), %rsi
	call	__printf_chk@PLT
	movq	800040(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$800048, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	movl	$0, 400032(%rsp)
	leal	-1(%r9), %ebp
	testl	%ebp, %ebp
	jg	.L14
	jmp	.L9
.L16:
	xorl	%eax, %eax
	jmp	.L5
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.long	1000000000
	.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:
```