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 main(void){
	int n,m,k,a;
	int i,sum=0,b[30]={0};
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++){
		for(scanf("%d",&k);k;k--){
			scanf("%d",&a);
			b[a-1]++;
		}
	}
	for(i=0;i<30;i++){if(b[i]==n){sum++;}}
	printf("%d",sum);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L5:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L3
.L4:
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -144(%rbp)
.L3:
	movl	-144(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	addl	$1, -136(%rbp)
.L2:
	movl	-152(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L5
	movl	$0, -136(%rbp)
	jmp	.L6
.L8:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	addl	$1, -132(%rbp)
.L7:
	addl	$1, -136(%rbp)
.L6:
	cmpl	$29, -136(%rbp)
	jle	.L8
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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"
	.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
	movl	$15, %ecx
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	subl	$1, 8(%rsp)
	jne	.L4
.L3:
	movl	(%rsp), %eax
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jg	.L5
.L2:
	movd	%eax, %xmm3
	xorl	%ecx, %ecx
	cmpl	128(%rsp), %eax
	movq	%r13, %rsi
	pshufd	$0, %xmm3, %xmm1
	sete	%cl
	movl	$1, %edi
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	pcmpeqd	16(%rsp), %xmm2
	pcmpeqd	32(%rsp), %xmm0
	pand	.LC2(%rip), %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	48(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	64(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	80(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	96(%rsp), %xmm2
	pcmpeqd	112(%rsp), %xmm1
	psubd	%xmm2, %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%ecx, %edx
	cmpl	132(%rsp), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$152, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	movl	$15, %ecx
	leaq	.LC1(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$152, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	8(%rsp), %r12
	leaq	12(%rsp), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	8(%rsp), %eax
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	subl	$1, %eax
	cltq
	addl	$1, 16(%rsp,%rax,4)
	subl	$1, 8(%rsp)
	jne	.L4
.L3:
	movl	(%rsp), %eax
	addl	$1, %ebp
	cmpl	%ebp, %eax
	jg	.L5
.L2:
	movd	%eax, %xmm3
	xorl	%ecx, %ecx
	cmpl	128(%rsp), %eax
	movq	%r13, %rsi
	pshufd	$0, %xmm3, %xmm1
	sete	%cl
	movl	$1, %edi
	movdqa	%xmm1, %xmm2
	movdqa	%xmm1, %xmm0
	pcmpeqd	16(%rsp), %xmm2
	pcmpeqd	32(%rsp), %xmm0
	pand	.LC2(%rip), %xmm0
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	48(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	64(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	80(%rsp), %xmm2
	psubd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	pcmpeqd	96(%rsp), %xmm2
	pcmpeqd	112(%rsp), %xmm1
	psubd	%xmm2, %xmm0
	psubd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	addl	%ecx, %edx
	cmpl	132(%rsp), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$152, %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
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 main(void){
	int n,m,k,a;
	int i,sum=0,b[30]={0};
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++){
		for(scanf("%d",&k);k;k--){
			scanf("%d",&a);
			b[a-1]++;
		}
	}
	for(i=0;i<30;i++){if(b[i]==n){sum++;}}
	printf("%d",sum);
	return 0;
}
1 30
3 2 10 30
 3 7
2 1 3
3 1 2 3
2 3 2
 3 7
2 1 3
3 1 2 3
2 3 1
 3 7
2 1 3
3 0 2 3
2 5 1
 1 30
3 4 10 30
 1 30
5 4 10 30
 1 30
5 4 2 30
 1 30
6 4 2 30
 1 30
3 2 3 30
 1 30
3 4 20 30

3 1 2 1 3 2 2 2 3 3
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 main(void){
	int n,m,k,a;
	int i,sum=0,b[30]={0};
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++){
		for(scanf("%d",&k);k;k--){
			scanf("%d",&a);
			b[a-1]++;
		}
	}
	for(i=0;i<30;i++){if(b[i]==n){sum++;}}
	printf("%d",sum);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L5:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L3
.L4:
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -144(%rbp)
.L3:
	movl	-144(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	addl	$1, -136(%rbp)
.L2:
	movl	-152(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L5
	movl	$0, -136(%rbp)
	jmp	.L6
.L8:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	addl	$1, -132(%rbp)
.L7:
	addl	$1, -136(%rbp)
.L6:
	cmpl	$29, -136(%rbp)
	jle	.L8
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -132(%rbp)
	leaq	-128(%rbp), %rdx
	movl	$0, %eax
	movl	$15, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-148(%rbp), %rdx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L2
.L5:
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L3
.L4:
	leaq	-140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-140(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-128(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-144(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -144(%rbp)
.L3:
	movl	-144(%rbp), %eax
	testl	%eax, %eax
	jne	.L4
	addl	$1, -136(%rbp)
.L2:
	movl	-152(%rbp), %eax
	cmpl	%eax, -136(%rbp)
	jl	.L5
	movl	$0, -136(%rbp)
	jmp	.L6
.L8:
	movl	-136(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %edx
	movl	-152(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L7
	addl	$1, -132(%rbp)
.L7:
	addl	$1, -136(%rbp)
.L6:
	cmpl	$29, -136(%rbp)
	jle	.L8
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
