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 a[100010];
void dfs(int n){
	int t=a[n];
	while(a[t]!=-1){
		int temp=a[t];
		a[t]=-1;
		t=temp;
	}
	return;
}
int main(){
	int n,k;
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)scanf("%d",a+i);
	if(n==k){
		int x=a[1]-1;
		int flag=1;
		for(int i=1;i<=n;i++)flag&=(a[i]-i+n)%n==x;
		puts(flag?"Yes":"No");
	}else{
		int cnt=0;
		for(int i=1;i<=n;i++)if(a[i]!=-1)dfs(i),cnt++;
		puts((n-cnt)%2&&k%2?"No":"Yes");
	}
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400040
a:
	.zero	400040
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -32(%rbp)
	jmp	.L6
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L7
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	4+a(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L10:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	-40(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	andl	%eax, -28(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	je	.L11
	leaq	.LC2(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC3(%rip), %rax
.L12:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L13
.L8:
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -20(%rbp)
.L15:
	addl	$1, -16(%rbp)
.L14:
	movl	-40(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L16
	movl	-40(%rbp), %eax
	subl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	leaq	.LC3(%rip), %rax
	jmp	.L18
.L17:
	leaq	.LC2(%rip), %rax
.L18:
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	a(%rip), %rsi
	movslq	%edi, %rdi
	movslq	(%rsi,%rdi,4), %rax
	movl	(%rsi,%rax,4), %edx
	cmpl	$-1, %edx
	jne	.L3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %edx
.L3:
	movl	$-1, (%rsi,%rax,4)
	movslq	%edx, %rax
	movl	(%rsi,%rax,4), %ecx
	movslq	%edx, %rax
	cmpl	$-1, %ecx
	jne	.L4
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	ret
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Yes"
.LC1:
	.string	"No"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC2(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L11
	leaq	4+a(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC3(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jge	.L12
	movl	4(%rsp), %r10d
	cmpl	%r10d, %esi
	je	.L13
	testl	%esi, %esi
	jle	.L44
	leaq	4+a(%rip), %rdi
	leal	-1(%rsi), %eax
	xorl	%r9d, %r9d
	leaq	4(%rdi), %rdx
	leaq	-4(%rdi), %rcx
	leaq	(%rdx,%rax,4), %r8
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L22:
	addq	$4, %rdi
	cmpq	%rdi, %r8
	je	.L15
.L25:
	movslq	(%rdi), %rax
	cmpl	$-1, %eax
	je	.L22
	movl	(%rcx,%rax,4), %edx
	cmpl	$-1, %edx
	je	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%edx, %rdx
	movl	$-1, (%rcx,%rax,4)
	movq	%rdx, %rax
	movl	(%rcx,%rdx,4), %edx
	cmpl	$-1, %edx
	jne	.L24
.L23:
	addq	$4, %rdi
	addl	$1, %r9d
	cmpq	%rdi, %r8
	jne	.L25
.L15:
	subl	%r9d, %esi
	leaq	.LC0(%rip), %rdi
	andb	$1, %sil
	jne	.L45
.L26:
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$16, %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
.L45:
	.cfi_restore_state
	andb	$1, %r10b
	leaq	.LC1(%rip), %rax
	cmovne	%rax, %rdi
	jmp	.L26
.L13:
	movl	4+a(%rip), %eax
	leal	-1(%rax), %r8d
	testl	%esi, %esi
	jle	.L20
	leal	1(%rsi), %r10d
	movl	$1, %ecx
	movl	$1, %edi
	leaq	a(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r9,%rcx,4), %eax
	addl	%esi, %eax
	subl	%ecx, %eax
	cltd
	idivl	%esi
	xorl	%eax, %eax
	cmpl	%r8d, %edx
	sete	%al
	addq	$1, %rcx
	andl	%eax, %edi
	cmpq	%rcx, %r10
	jne	.L17
	testl	%edi, %edi
	jne	.L20
	leaq	.LC1(%rip), %rdi
	jmp	.L26
.L20:
	leaq	.LC0(%rip), %rdi
	jmp	.L26
.L11:
	movl	4(%rsp), %r10d
	cmpl	%esi, %r10d
	je	.L20
.L44:
	xorl	%r9d, %r9d
	jmp	.L15
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400040
a:
	.zero	400040
	.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	dfs
	.type	dfs, @function
dfs:
.LFB23:
	.cfi_startproc
	endbr64
	leaq	a(%rip), %rsi
	movslq	%edi, %rdi
	movslq	(%rsi,%rdi,4), %rax
	movl	(%rsi,%rax,4), %edx
	cmpl	$-1, %edx
	jne	.L3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%ecx, %edx
.L3:
	movl	$-1, (%rsi,%rax,4)
	movslq	%edx, %rax
	movl	(%rsi,%rax,4), %ecx
	movslq	%edx, %rax
	cmpl	$-1, %ecx
	jne	.L4
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	ret
	.cfi_endproc
.LFE23:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Yes"
.LC1:
	.string	"No"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC2(%rip), %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	leaq	4(%rsp), %rdx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	testl	%esi, %esi
	jle	.L11
	leaq	4+a(%rip), %rbp
	movl	$1, %ebx
	leaq	.LC3(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %esi
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jge	.L12
	movl	4(%rsp), %r10d
	cmpl	%r10d, %esi
	je	.L13
	testl	%esi, %esi
	jle	.L44
	leaq	4+a(%rip), %rdi
	leal	-1(%rsi), %eax
	xorl	%r9d, %r9d
	leaq	4(%rdi), %rdx
	leaq	-4(%rdi), %rcx
	leaq	(%rdx,%rax,4), %r8
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L22:
	addq	$4, %rdi
	cmpq	%rdi, %r8
	je	.L15
.L25:
	movslq	(%rdi), %rax
	cmpl	$-1, %eax
	je	.L22
	movl	(%rcx,%rax,4), %edx
	cmpl	$-1, %edx
	je	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movslq	%edx, %rdx
	movl	$-1, (%rcx,%rax,4)
	movq	%rdx, %rax
	movl	(%rcx,%rdx,4), %edx
	cmpl	$-1, %edx
	jne	.L24
.L23:
	addq	$4, %rdi
	addl	$1, %r9d
	cmpq	%rdi, %r8
	jne	.L25
.L15:
	subl	%r9d, %esi
	leaq	.LC0(%rip), %rdi
	andb	$1, %sil
	jne	.L45
.L26:
	call	puts@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	addq	$16, %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
.L45:
	.cfi_restore_state
	andb	$1, %r10b
	leaq	.LC1(%rip), %rax
	cmovne	%rax, %rdi
	jmp	.L26
.L13:
	movl	4+a(%rip), %eax
	leal	-1(%rax), %r8d
	testl	%esi, %esi
	jle	.L20
	leal	1(%rsi), %r10d
	movl	$1, %ecx
	movl	$1, %edi
	leaq	a(%rip), %r9
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%r9,%rcx,4), %eax
	addl	%esi, %eax
	subl	%ecx, %eax
	cltd
	idivl	%esi
	xorl	%eax, %eax
	cmpl	%r8d, %edx
	sete	%al
	addq	$1, %rcx
	andl	%eax, %edi
	cmpq	%rcx, %r10
	jne	.L17
	testl	%edi, %edi
	jne	.L20
	leaq	.LC1(%rip), %rdi
	jmp	.L26
.L20:
	leaq	.LC0(%rip), %rdi
	jmp	.L26
.L11:
	movl	4(%rsp), %r10d
	cmpl	%esi, %r10d
	je	.L20
.L44:
	xorl	%r9d, %r9d
	jmp	.L15
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400040
a:
	.zero	400040
	.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 a[100010];
void dfs(int n){
	int t=a[n];
	while(a[t]!=-1){
		int temp=a[t];
		a[t]=-1;
		t=temp;
	}
	return;
}
int main(){
	int n,k;
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)scanf("%d",a+i);
	if(n==k){
		int x=a[1]-1;
		int flag=1;
		for(int i=1;i<=n;i++)flag&=(a[i]-i+n)%n==x;
		puts(flag?"Yes":"No");
	}else{
		int cnt=0;
		for(int i=1;i<=n;i++)if(a[i]!=-1)dfs(i),cnt++;
		puts((n-cnt)%2&&k%2?"No":"Yes");
	}
}


3 2
1 2 5
 3 1
3 2 1
 0 3
2 3 1
 0 4
2 3 1
 0 3
3 3 1
 3 2
2 2 3
 3 2
2 2 5
 0 3
4 3 1
 0 4
3 3 1
 0 3
3 0 1

Yes
 No
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes

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 a[100010];
void dfs(int n){
	int t=a[n];
	while(a[t]!=-1){
		int temp=a[t];
		a[t]=-1;
		t=temp;
	}
	return;
}
int main(){
	int n,k;
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)scanf("%d",a+i);
	if(n==k){
		int x=a[1]-1;
		int flag=1;
		for(int i=1;i<=n;i++)flag&=(a[i]-i+n)%n==x;
		puts(flag?"Yes":"No");
	}else{
		int cnt=0;
		for(int i=1;i<=n;i++)if(a[i]!=-1)dfs(i),cnt++;
		puts((n-cnt)%2&&k%2?"No":"Yes");
	}
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400040
a:
	.zero	400040
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -32(%rbp)
	jmp	.L6
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L7
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	4+a(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L10:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	-40(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	andl	%eax, -28(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	je	.L11
	leaq	.LC2(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC3(%rip), %rax
.L12:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L13
.L8:
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -20(%rbp)
.L15:
	addl	$1, -16(%rbp)
.L14:
	movl	-40(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L16
	movl	-40(%rbp), %eax
	subl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	leaq	.LC3(%rip), %rax
	jmp	.L18
.L17:
	leaq	.LC2(%rip), %rax
.L18:
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 400040
a:
	.zero	400040
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-4(%rbp), %eax
	movl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -32(%rbp)
	jmp	.L6
.L7:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -32(%rbp)
.L6:
	movl	-40(%rbp), %eax
	cmpl	%eax, -32(%rbp)
	jle	.L7
	movl	-40(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	4+a(%rip), %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -28(%rbp)
	movl	$1, -24(%rbp)
	jmp	.L9
.L10:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	subl	-24(%rbp), %eax
	movl	%eax, %edx
	movl	-40(%rbp), %eax
	addl	%edx, %eax
	movl	-40(%rbp), %ecx
	cltd
	idivl	%ecx
	movl	%edx, %eax
	cmpl	%eax, -12(%rbp)
	sete	%al
	movzbl	%al, %eax
	andl	%eax, -28(%rbp)
	addl	$1, -24(%rbp)
.L9:
	movl	-40(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jle	.L10
	cmpl	$0, -28(%rbp)
	je	.L11
	leaq	.LC2(%rip), %rax
	jmp	.L12
.L11:
	leaq	.LC3(%rip), %rax
.L12:
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L13
.L8:
	movl	$0, -20(%rbp)
	movl	$1, -16(%rbp)
	jmp	.L14
.L16:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	je	.L15
	movl	-16(%rbp), %eax
	movl	%eax, %edi
	call	dfs
	addl	$1, -20(%rbp)
.L15:
	addl	$1, -16(%rbp)
.L14:
	movl	-40(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L16
	movl	-40(%rbp), %eax
	subl	-20(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	movl	-36(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L17
	leaq	.LC3(%rip), %rax
	jmp	.L18
.L17:
	leaq	.LC2(%rip), %rax
.L18:
	movq	%rax, %rdi
	call	puts@PLT
.L13:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
