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

```c
/*
 ============================================================================
 Name        : ABC166-B.c
 Author      : soya
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>
int N,K,cnt;
int A[101][101];
int d[101], snuke[101];
int main(void) {
	scanf("%d %d", &N, &K);
	for(int j = 0; j < K; j++){
		scanf("%d", &d[j]);
		for(int i = 0; i < d[j]; i++){
			scanf("%d", &A[j][i]);
			int tmp = A[j][i];
			snuke[tmp]++;
		}
	}

	/*for(int j = 0; j < K; j++){
		for(int i = 0; i < d[j]; i++){
			int tmp = A[j][i];
			snuke[tmp]++;
		}

	}*/

	for(int l = 1; l <= N; l++){
		if(snuke[l] == 0){
			cnt++;
		}
	}

	printf("%d", cnt);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 40804
A:
	.zero	40804
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 404
d:
	.zero	404
	.globl	snuke
	.align 32
	.type	snuke, @object
	.size	snuke, 404
snuke:
	.zero	404
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	K(%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, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	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
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L4
	addl	$1, -16(%rbp)
.L2:
	movl	K(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L7
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L7:
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L8
	movl	cnt(%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
.LFE6:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	K(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L21
	movq	$0, (%rsp)
	leaq	d(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	movl	$0, 12(%rsp)
	leaq	snuke(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %r8d
	leaq	A(%rip), %r13
	subq	%r12, %r13
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdx
	leaq	0(%r13,%r12), %rax
	addq	$4, %r13
	movslq	(%rax,%rdx), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%r14d, 0(%rbp)
	jg	.L8
.L9:
	addl	$1, 12(%rsp)
	addq	$4, %rbp
	movl	12(%rsp), %eax
	subq	$404, %r12
	addq	$404, (%rsp)
	cmpl	%eax, K(%rip)
	jg	.L6
.L7:
	movl	cnt(%rip), %r9d
	movl	N(%rip), %ecx
	movl	%r9d, %edx
	testl	%ecx, %ecx
	jle	.L4
	leaq	4+snuke(%rip), %rax
	leal	-1(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rsi,4), %rcx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %edi
	testl	%edi, %edi
	jne	.L10
	addl	$1, %edx
	movl	$1, %esi
.L10:
	addq	$4, %rax
	cmpq	%rax, %rcx
	jne	.L11
	testb	%sil, %sil
	je	.L4
	movl	%edx, cnt(%rip)
	movl	%edx, %r9d
.L4:
	movq	%r15, %rsi
	movl	%r9d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L21:
	.cfi_restore_state
	leaq	.LC1(%rip), %r15
	jmp	.L7
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	snuke
	.bss
	.align 32
	.type	snuke, @object
	.size	snuke, 404
snuke:
	.zero	404
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 404
d:
	.zero	404
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 40804
A:
	.zero	40804
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.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"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	K(%rip), %rdx
	leaq	N(%rip), %rsi
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %rdi
	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
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movl	K(%rip), %r9d
	testl	%r9d, %r9d
	jle	.L21
	movq	$0, (%rsp)
	leaq	d(%rip), %rbp
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	movl	$0, 12(%rsp)
	leaq	snuke(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%rbp, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__isoc99_scanf@PLT
	movl	0(%rbp), %r8d
	leaq	A(%rip), %r13
	subq	%r12, %r13
	testl	%r8d, %r8d
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdx
	leaq	0(%r13,%r12), %rax
	addq	$4, %r13
	movslq	(%rax,%rdx), %rax
	addl	$1, (%rbx,%rax,4)
	cmpl	%r14d, 0(%rbp)
	jg	.L8
.L9:
	addl	$1, 12(%rsp)
	addq	$4, %rbp
	movl	12(%rsp), %eax
	subq	$404, %r12
	addq	$404, (%rsp)
	cmpl	%eax, K(%rip)
	jg	.L6
.L7:
	movl	cnt(%rip), %r9d
	movl	N(%rip), %ecx
	movl	%r9d, %edx
	testl	%ecx, %ecx
	jle	.L4
	leaq	4+snuke(%rip), %rax
	leal	-1(%rcx), %esi
	leaq	4(%rax), %rcx
	leaq	(%rcx,%rsi,4), %rcx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rax), %edi
	testl	%edi, %edi
	jne	.L10
	addl	$1, %edx
	movl	$1, %esi
.L10:
	addq	$4, %rax
	cmpq	%rax, %rcx
	jne	.L11
	testb	%sil, %sil
	je	.L4
	movl	%edx, cnt(%rip)
	movl	%edx, %r9d
.L4:
	movq	%r15, %rsi
	movl	%r9d, %edx
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L21:
	.cfi_restore_state
	leaq	.LC1(%rip), %r15
	jmp	.L7
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	snuke
	.bss
	.align 32
	.type	snuke, @object
	.size	snuke, 404
snuke:
	.zero	404
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 404
d:
	.zero	404
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 40804
A:
	.zero	40804
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.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:

/*
 ============================================================================
 Name        : ABC166-B.c
 Author      : soya
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>
int N,K,cnt;
int A[101][101];
int d[101], snuke[101];
int main(void) {
	scanf("%d %d", &N, &K);
	for(int j = 0; j < K; j++){
		scanf("%d", &d[j]);
		for(int i = 0; i < d[j]; i++){
			scanf("%d", &A[j][i]);
			int tmp = A[j][i];
			snuke[tmp]++;
		}
	}

	/*for(int j = 0; j < K; j++){
		for(int i = 0; i < d[j]; i++){
			int tmp = A[j][i];
			snuke[tmp]++;
		}

	}*/

	for(int l = 1; l <= N; l++){
		if(snuke[l] == 0){
			cnt++;
		}
	}

	printf("%d", cnt);

	return 0;
}

3 1
2
1 3
1
3
 5 1
2
1 3
1
3
 3 3
0
3
1
3
1
3
 0 -1
2
1 2
5
-1
 6 -2
1
0 0
0
-1
 12 -2
1
0 0
0
-1
 4 -8
-2
1 0
0
0
 7 -14
-2
1 0
0
0
 21 -2
0
0 0
0
-2
 5 -2
1
0 1
0
-1

1 3 1 0 6 12 4 7 21 5
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
/*
 ============================================================================
 Name        : ABC166-B.c
 Author      : soya
 Version     :
 Copyright   : Your copyright notice
 Description : Hello World in C, Ansi-style
 ============================================================================
 */

#include <stdio.h>
#include <stdlib.h>
int N,K,cnt;
int A[101][101];
int d[101], snuke[101];
int main(void) {
	scanf("%d %d", &N, &K);
	for(int j = 0; j < K; j++){
		scanf("%d", &d[j]);
		for(int i = 0; i < d[j]; i++){
			scanf("%d", &A[j][i]);
			int tmp = A[j][i];
			snuke[tmp]++;
		}
	}

	/*for(int j = 0; j < K; j++){
		for(int i = 0; i < d[j]; i++){
			int tmp = A[j][i];
			snuke[tmp]++;
		}

	}*/

	for(int l = 1; l <= N; l++){
		if(snuke[l] == 0){
			cnt++;
		}
	}

	printf("%d", cnt);

	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 40804
A:
	.zero	40804
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 404
d:
	.zero	404
	.globl	snuke
	.align 32
	.type	snuke, @object
	.size	snuke, 404
snuke:
	.zero	404
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	K(%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, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	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
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L4
	addl	$1, -16(%rbp)
.L2:
	movl	K(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L7
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L7:
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L8
	movl	cnt(%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
.LFE6:
	.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	K
	.align 4
	.type	K, @object
	.size	K, 4
K:
	.zero	4
	.globl	cnt
	.align 4
	.type	cnt, @object
	.size	cnt, 4
cnt:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 40804
A:
	.zero	40804
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 404
d:
	.zero	404
	.globl	snuke
	.align 32
	.type	snuke, @object
	.size	snuke, 404
snuke:
	.zero	404
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	K(%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, -16(%rbp)
	jmp	.L2
.L5:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L3
.L4:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	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
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L3:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L4
	addl	$1, -16(%rbp)
.L2:
	movl	K(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L5
	movl	$1, -8(%rbp)
	jmp	.L6
.L8:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	snuke(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L7
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L7:
	addl	$1, -8(%rbp)
.L6:
	movl	N(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jle	.L8
	movl	cnt(%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
.LFE6:
	.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:
