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>
#define min(p,q)((p)<(q)?(p):(q))
#define max(p,q)((p)>(q)?(p):(q))

int n,p,dp[110][110],x[110],y[110];
int main(){
	scanf("%d%d",&n,&p);
	for(int i=0;i<n;i++)scanf("%d%d",x+i,y+i);
	for(int k=n-1;k>=0;k--)for(int m=0;m<=n-k;m++){
		int ans=1e9,s=0,pre=0;
		for(int i=k;i<=min(n,k+m);i++){
			if(m+k<n||i==n)ans=min(ans,dp[i+1][m-(i-k)]+s);
			s+=pre=max(0,y[i]-max(0,x[i]-pre));
		}
		dp[k][m]=ans;
	}
	while(dp[0][n]>p)n--;
	printf("%d\n",n);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 48400
dp:
	.zero	48400
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 440
x:
	.zero	440
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 440
y:
	.zero	440
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%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	$32, %rsp
	leaq	p(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L11:
	movl	$0, -20(%rbp)
	jmp	.L5
.L10:
	movl	$1000000000, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$110, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -16(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	subl	-8(%rbp), %eax
	movl	$0, %ecx
	testl	%eax, %eax
	cmovns	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	$0, %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -4(%rbp)
.L6:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L9
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L5:
	movl	n(%rip), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	subl	$1, -24(%rbp)
.L4:
	cmpl	$0, -24(%rbp)
	jns	.L11
	jmp	.L12
.L13:
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, n(%rip)
.L12:
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	p(%rip), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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%d"
.LC1:
	.string	"%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
	leaq	p(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	y(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r9d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	movl	%r9d, %r15d
	subl	$1, %r15d
	movl	%r15d, 28(%rsp)
	js	.L4
	movslq	%r15d, %rax
	leaq	dp(%rip), %rbx
	movl	$2, 24(%rsp)
	leaq	y(%rip), %r11
	movq	%rax, 8(%rsp)
	imulq	$440, %rax, %rax
	addq	%rbx, %rax
	leaq	x(%rip), %rbx
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %r13
	movl	%r15d, %r12d
	xorl	%r14d, %r14d
	cmpl	%r15d, %r9d
	js	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%r9d, %r12d
	movl	%r9d, %r10d
	movl	$1000000000, %r8d
	cmovle	%r12d, %r10d
	cmpl	%r15d, %r10d
	jl	.L11
	cmpl	%r9d, %r12d
	movq	8(%rsp), %rcx
	movq	%r13, %rdi
	movl	$1000000000, %r8d
	setl	%bpl
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%ecx, %r9d
	je	.L16
	testb	%bpl, %bpl
	je	.L6
.L16:
	movl	440(%rdi), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
.L6:
	movl	(%rbx,%rcx,4), %edx
	subl	%eax, %edx
	movl	$0, %eax
	cmovs	%eax, %edx
	movl	(%r11,%rcx,4), %eax
	subl	%edx, %eax
	movl	$0, %edx
	cmovs	%edx, %eax
	addq	$1, %rcx
	addq	$436, %rdi
	addl	%eax, %esi
	cmpl	%ecx, %r10d
	jge	.L8
.L11:
	movl	%r8d, 0(%r13)
	addl	$1, %r14d
	addl	$1, %r12d
	addq	$4, %r13
	cmpl	24(%rsp), %r14d
	jne	.L12
.L9:
	subl	$1, %r15d
	addl	$1, 24(%rsp)
	subq	$440, 16(%rsp)
	subq	$1, 8(%rsp)
	cmpl	$-1, %r15d
	jne	.L5
.L4:
	movslq	%r9d, %rax
	leaq	dp(%rip), %rbx
	movl	p(%rip), %edx
	cmpl	%edx, (%rbx,%rax,4)
	jle	.L13
	movslq	28(%rsp), %rax
	leaq	4(%rbx), %rcx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r9d
	subq	$1, %rax
	cmpl	%edx, (%rcx,%rax,4)
	jg	.L14
	movl	%r9d, n(%rip)
.L13:
	movl	%r9d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 440
y:
	.zero	440
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 440
x:
	.zero	440
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 48400
dp:
	.zero	48400
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%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
	leaq	p(%rip), %rdx
	leaq	n(%rip), %rsi
	xorl	%eax, %eax
	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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L2
	leaq	x(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	y(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	leaq	0(%r13,%rbx,4), %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r9d
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %r9d
	jg	.L3
.L2:
	movl	%r9d, %r15d
	subl	$1, %r15d
	movl	%r15d, 28(%rsp)
	js	.L4
	movslq	%r15d, %rax
	leaq	dp(%rip), %rbx
	movl	$2, 24(%rsp)
	leaq	y(%rip), %r11
	movq	%rax, 8(%rsp)
	imulq	$440, %rax, %rax
	addq	%rbx, %rax
	leaq	x(%rip), %rbx
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L5:
	movq	16(%rsp), %r13
	movl	%r15d, %r12d
	xorl	%r14d, %r14d
	cmpl	%r15d, %r9d
	js	.L9
	.p2align 4,,10
	.p2align 3
.L12:
	cmpl	%r9d, %r12d
	movl	%r9d, %r10d
	movl	$1000000000, %r8d
	cmovle	%r12d, %r10d
	cmpl	%r15d, %r10d
	jl	.L11
	cmpl	%r9d, %r12d
	movq	8(%rsp), %rcx
	movq	%r13, %rdi
	movl	$1000000000, %r8d
	setl	%bpl
	xorl	%eax, %eax
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpl	%ecx, %r9d
	je	.L16
	testb	%bpl, %bpl
	je	.L6
.L16:
	movl	440(%rdi), %edx
	addl	%esi, %edx
	cmpl	%edx, %r8d
	cmovg	%edx, %r8d
.L6:
	movl	(%rbx,%rcx,4), %edx
	subl	%eax, %edx
	movl	$0, %eax
	cmovs	%eax, %edx
	movl	(%r11,%rcx,4), %eax
	subl	%edx, %eax
	movl	$0, %edx
	cmovs	%edx, %eax
	addq	$1, %rcx
	addq	$436, %rdi
	addl	%eax, %esi
	cmpl	%ecx, %r10d
	jge	.L8
.L11:
	movl	%r8d, 0(%r13)
	addl	$1, %r14d
	addl	$1, %r12d
	addq	$4, %r13
	cmpl	24(%rsp), %r14d
	jne	.L12
.L9:
	subl	$1, %r15d
	addl	$1, 24(%rsp)
	subq	$440, 16(%rsp)
	subq	$1, 8(%rsp)
	cmpl	$-1, %r15d
	jne	.L5
.L4:
	movslq	%r9d, %rax
	leaq	dp(%rip), %rbx
	movl	p(%rip), %edx
	cmpl	%edx, (%rbx,%rax,4)
	jle	.L13
	movslq	28(%rsp), %rax
	leaq	4(%rbx), %rcx
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%eax, %r9d
	subq	$1, %rax
	cmpl	%edx, (%rcx,%rax,4)
	jg	.L14
	movl	%r9d, n(%rip)
.L13:
	movl	%r9d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$40, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	y
	.bss
	.align 32
	.type	y, @object
	.size	y, 440
y:
	.zero	440
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 440
x:
	.zero	440
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 48400
dp:
	.zero	48400
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.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>
#define min(p,q)((p)<(q)?(p):(q))
#define max(p,q)((p)>(q)?(p):(q))

int n,p,dp[110][110],x[110],y[110];
int main(){
	scanf("%d%d",&n,&p);
	for(int i=0;i<n;i++)scanf("%d%d",x+i,y+i);
	for(int k=n-1;k>=0;k--)for(int m=0;m<=n-k;m++){
		int ans=1e9,s=0,pre=0;
		for(int i=k;i<=min(n,k+m);i++){
			if(m+k<n||i==n)ans=min(ans,dp[i+1][m-(i-k)]+s);
			s+=pre=max(0,y[i]-max(0,x[i]-pre));
		}
		dp[k][m]=ans;
	}
	while(dp[0][n]>p)n--;
	printf("%d\n",n);
}

6 5
1 1
1 2
1 2
1 3
1 3
 3 10
1 9
5 10
0 5
 3 7
1 9
5 10
0 5
 6 5
0 1
1 2
1 2
2 3
1 3
 3 18
1 6
5 5
0 5
 0 8
1 2
5 20
0 5
 6 6
0 0
1 2
2 0
0 3
2 2
 6 5
1 1
1 2
1 2
2 3
1 3
 3 7
1 9
5 10
0 2
 6 9
0 1
1 2
1 2
2 3
1 3

5
 2
 1
 4
 3
 0
 6
 5
 2
 5

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>
#define min(p,q)((p)<(q)?(p):(q))
#define max(p,q)((p)>(q)?(p):(q))

int n,p,dp[110][110],x[110],y[110];
int main(){
	scanf("%d%d",&n,&p);
	for(int i=0;i<n;i++)scanf("%d%d",x+i,y+i);
	for(int k=n-1;k>=0;k--)for(int m=0;m<=n-k;m++){
		int ans=1e9,s=0,pre=0;
		for(int i=k;i<=min(n,k+m);i++){
			if(m+k<n||i==n)ans=min(ans,dp[i+1][m-(i-k)]+s);
			s+=pre=max(0,y[i]-max(0,x[i]-pre));
		}
		dp[k][m]=ans;
	}
	while(dp[0][n]>p)n--;
	printf("%d\n",n);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 48400
dp:
	.zero	48400
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 440
x:
	.zero	440
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 440
y:
	.zero	440
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%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	$32, %rsp
	leaq	p(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L11:
	movl	$0, -20(%rbp)
	jmp	.L5
.L10:
	movl	$1000000000, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$110, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -16(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	subl	-8(%rbp), %eax
	movl	$0, %ecx
	testl	%eax, %eax
	cmovns	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	$0, %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -4(%rbp)
.L6:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L9
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L5:
	movl	n(%rip), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	subl	$1, -24(%rbp)
.L4:
	cmpl	$0, -24(%rbp)
	jns	.L11
	jmp	.L12
.L13:
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, n(%rip)
.L12:
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	p(%rip), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	p
	.align 4
	.type	p, @object
	.size	p, 4
p:
	.zero	4
	.globl	dp
	.align 32
	.type	dp, @object
	.size	dp, 48400
dp:
	.zero	48400
	.globl	x
	.align 32
	.type	x, @object
	.size	x, 440
x:
	.zero	440
	.globl	y
	.align 32
	.type	y, @object
	.size	y, 440
y:
	.zero	440
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%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	$32, %rsp
	leaq	p(%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
	movl	$0, -28(%rbp)
	jmp	.L2
.L3:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L2:
	movl	n(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L3
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	.L4
.L11:
	movl	$0, -20(%rbp)
	jmp	.L5
.L10:
	movl	$1000000000, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	-24(%rbp), %eax
	movl	%eax, -4(%rbp)
	jmp	.L6
.L9:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jne	.L8
.L7:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	subl	%ecx, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$110, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-12(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, -16(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	y(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	x(%rip), %rax
	movl	(%rcx,%rax), %eax
	subl	-8(%rbp), %eax
	movl	$0, %ecx
	testl	%eax, %eax
	cmovns	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	$0, %edx
	testl	%eax, %eax
	cmovs	%edx, %eax
	movl	%eax, -8(%rbp)
	movl	-8(%rbp), %eax
	addl	%eax, -12(%rbp)
	addl	$1, -4(%rbp)
.L6:
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	n(%rip), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	cmpl	%eax, -4(%rbp)
	jle	.L9
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	imulq	$110, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	dp(%rip), %rdx
	movl	-16(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -20(%rbp)
.L5:
	movl	n(%rip), %eax
	subl	-24(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jle	.L10
	subl	$1, -24(%rbp)
.L4:
	cmpl	$0, -24(%rbp)
	jns	.L11
	jmp	.L12
.L13:
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, n(%rip)
.L12:
	movl	n(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dp(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	p(%rip), %eax
	cmpl	%eax, %edx
	jg	.L13
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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:
