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>

main(){
  int n, q, committee[50][100], quorum[100], i, j, temp, max, date[101], ans;

  while(1){
    scanf("%d %d", &n, &q);
    if(n==0 && q==0) break;

    for(i=0;i<n;i++){
      scanf("%d", &temp);
      if(temp==0){
	committee[i][0]=-1;
	continue;
      }

      for(j=0;j<temp;j++){
	scanf("%d", &committee[i][j]);
      }
      committee[i][j]=-1;
    }

    for(i=0;i<101;i++){
      date[i]=0;
    }

    for(i=0;i<n;i++){
      for(j=0;;j++){
	if(committee[i][j]==-1) break;
	date[committee[i][j]]++;
      }
    }

    max=-1;
    ans=0;
    for(i=0;i<101;i++){
      if(max<date[i]){
	max=date[i];
	ans=i;
      }
    }
    if(max>=q) printf("%d\n", ans);
    else printf("0\n");
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"0"
	.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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L22:
	leaq	-20456(%rbp), %rdx
	leaq	-20460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20460(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20456(%rbp), %eax
	testl	%eax, %eax
	je	.L27
.L2:
	movl	$0, -20448(%rbp)
	jmp	.L4
.L9:
	leaq	-20452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20452(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$20016, %rax
	movl	$-1, (%rax)
	jmp	.L6
.L5:
	movl	$0, -20444(%rbp)
	jmp	.L7
.L8:
	leaq	-20016(%rbp), %rcx
	movl	-20444(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20444(%rbp)
.L7:
	movl	-20452(%rbp), %eax
	cmpl	%eax, -20444(%rbp)
	jl	.L8
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$-1, -20016(%rbp,%rax,4)
.L6:
	addl	$1, -20448(%rbp)
.L4:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L9
	movl	$0, -20448(%rbp)
	jmp	.L10
.L11:
	movl	-20448(%rbp), %eax
	cltq
	movl	$0, -20432(%rbp,%rax,4)
	addl	$1, -20448(%rbp)
.L10:
	cmpl	$100, -20448(%rbp)
	jle	.L11
	movl	$0, -20448(%rbp)
	jmp	.L12
.L16:
	movl	$0, -20444(%rbp)
.L15:
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L28
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-20432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -20432(%rbp,%rax,4)
	addl	$1, -20444(%rbp)
	jmp	.L15
.L28:
	nop
	addl	$1, -20448(%rbp)
.L12:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L16
	movl	$-1, -20440(%rbp)
	movl	$0, -20436(%rbp)
	movl	$0, -20448(%rbp)
	jmp	.L17
.L19:
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	cmpl	%eax, -20440(%rbp)
	jge	.L18
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	movl	%eax, -20440(%rbp)
	movl	-20448(%rbp), %eax
	movl	%eax, -20436(%rbp)
.L18:
	addl	$1, -20448(%rbp)
.L17:
	cmpl	$100, -20448(%rbp)
	jle	.L19
	movl	-20456(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L20
	movl	-20436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L22
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"0"
	.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
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-20480(%rsp), %r11
	.cfi_def_cfa 11, 20536
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$8, %rsp
	.cfi_def_cfa_offset 20544
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 20472(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edx
	testl	%edx, %edx
	jne	.L35
	movl	40(%rsp), %esi
	testl	%esi, %esi
	je	.L36
.L7:
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
.L14:
	xorl	%eax, %eax
	xorl	%r9d, %r9d
	movl	$-1, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movl	(%r14,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L18
	movl	%eax, %r9d
	movl	%edx, %ecx
.L18:
	addq	$1, %rax
	cmpq	$101, %rax
	jne	.L19
	cmpl	%esi, %ecx
	jl	.L20
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L35:
	jle	.L37
	leaq	44(%rsp), %rax
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	movq	%rax, 8(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	movl	36(%rsp), %edx
	addl	$1, %ebp
	movl	$-1, 464(%rsp,%r12,4)
	addq	$100, %r12
	cmpl	%ebp, %edx
	jle	.L38
.L4:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	jle	.L39
	leaq	464(%rsp,%r12,4), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r15d, 44(%rsp)
	jg	.L12
.L10:
	movslq	%ebp, %rax
	movslq	%r15d, %rdx
	addl	$1, %ebp
	addq	$100, %r12
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rax
	movl	36(%rsp), %edx
	movl	$-1, 464(%rsp,%rax,4)
	cmpl	%ebp, %edx
	jg	.L4
.L38:
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r14, %rdi
	movl	40(%rsp), %esi
	rep stosq
	movl	$0, (%rdi)
	testl	%edx, %edx
	jle	.L14
	leal	-1(%rdx), %eax
	leaq	468(%rsp), %rcx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$4, %rax
	leaq	868(%rsp,%rax), %rdi
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	-4(%rcx), %rax
	cmpl	$-1, %eax
	je	.L17
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$4, %rdx
	addl	$1, 48(%rsp,%rax,4)
	movslq	-4(%rdx), %rax
	cmpl	$-1, %eax
	jne	.L16
.L17:
	addq	$400, %rcx
	cmpq	%rdi, %rcx
	jne	.L15
	jmp	.L14
.L20:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L39:
	xorl	%r15d, %r15d
	jmp	.L10
.L36:
	movq	20472(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$20488, %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
.L37:
	.cfi_restore_state
	movl	40(%rsp), %esi
	jmp	.L7
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"0"
	.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
	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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	-20480(%rsp), %r11
	.cfi_def_cfa 11, 20536
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$8, %rsp
	.cfi_def_cfa_offset 20544
	leaq	.LC1(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 20472(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	48(%rsp), %r14
	movq	%rax, 24(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	24(%rsp), %rdx
	movq	16(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %edx
	testl	%edx, %edx
	jne	.L35
	movl	40(%rsp), %esi
	testl	%esi, %esi
	je	.L36
.L7:
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r14, %rdi
	rep stosq
	movl	$0, (%rdi)
.L14:
	xorl	%eax, %eax
	xorl	%r9d, %r9d
	movl	$-1, %ecx
	.p2align 4,,10
	.p2align 3
.L19:
	movl	(%r14,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L18
	movl	%eax, %r9d
	movl	%edx, %ecx
.L18:
	addq	$1, %rax
	cmpq	$101, %rax
	jne	.L19
	cmpl	%esi, %ecx
	jl	.L20
	movl	%r9d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L35:
	jle	.L37
	leaq	44(%rsp), %rax
	xorl	%r12d, %r12d
	xorl	%ebp, %ebp
	movq	%rax, 8(%rsp)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	movl	36(%rsp), %edx
	addl	$1, %ebp
	movl	$-1, 464(%rsp,%r12,4)
	addq	$100, %r12
	cmpl	%ebp, %edx
	jle	.L38
.L4:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	jle	.L39
	leaq	464(%rsp,%r12,4), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r15d, 44(%rsp)
	jg	.L12
.L10:
	movslq	%ebp, %rax
	movslq	%r15d, %rdx
	addl	$1, %ebp
	addq	$100, %r12
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rax
	movl	36(%rsp), %edx
	movl	$-1, 464(%rsp,%rax,4)
	cmpl	%ebp, %edx
	jg	.L4
.L38:
	movl	$50, %ecx
	xorl	%eax, %eax
	movq	%r14, %rdi
	movl	40(%rsp), %esi
	rep stosq
	movl	$0, (%rdi)
	testl	%edx, %edx
	jle	.L14
	leal	-1(%rdx), %eax
	leaq	468(%rsp), %rcx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	salq	$4, %rax
	leaq	868(%rsp,%rax), %rdi
	.p2align 4,,10
	.p2align 3
.L15:
	movslq	-4(%rcx), %rax
	cmpl	$-1, %eax
	je	.L17
	movq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$4, %rdx
	addl	$1, 48(%rsp,%rax,4)
	movslq	-4(%rdx), %rax
	cmpl	$-1, %eax
	jne	.L16
.L17:
	addq	$400, %rcx
	cmpq	%rdi, %rcx
	jne	.L15
	jmp	.L14
.L20:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L2
.L39:
	xorl	%r15d, %r15d
	jmp	.L10
.L36:
	movq	20472(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$20488, %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
.L37:
	.cfi_restore_state
	movl	40(%rsp), %esi
	jmp	.L7
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

main(){
  int n, q, committee[50][100], quorum[100], i, j, temp, max, date[101], ans;

  while(1){
    scanf("%d %d", &n, &q);
    if(n==0 && q==0) break;

    for(i=0;i<n;i++){
      scanf("%d", &temp);
      if(temp==0){
	committee[i][0]=-1;
	continue;
      }

      for(j=0;j<temp;j++){
	scanf("%d", &committee[i][j]);
      }
      committee[i][j]=-1;
    }

    for(i=0;i<101;i++){
      date[i]=0;
    }

    for(i=0;i<n;i++){
      for(j=0;;j++){
	if(committee[i][j]==-1) break;
	date[committee[i][j]]++;
      }
    }

    max=-1;
    ans=0;
    for(i=0;i<101;i++){
      if(max<date[i]){
	max=date[i];
	ans=i;
      }
    }
    if(max>=q) printf("%d\n", ans);
    else printf("0\n");
  }
  return 0;
}
3 2
2 1 2
0
3 3 4 8
3 2
4 1 5 8 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 2
3 1 2 9
2 2 4
0 0
 3 2
2 1 4
0
3 3 4 8
3 2
4 1 5 8 9
3 2 5 9
5 1 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 2
3 1 2 9
2 2 4
0 0
 3 2
2 1 2
0
3 3 4 8
3 2
4 1 5 2 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 2
3 1 2 9
2 2 4
0 0
 3 2
2 1 2
0
3 3 4 8
3 2
4 1 5 2 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 1
3 1 2 9
2 2 4
0 0
 3 2
2 1 2
0
3 3 4 8
3 2
4 1 5 0 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 1
3 1 2 9
2 2 4
0 0
 3 2
2 1 2
0
3 3 4 8
3 2
4 1 9 2 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 2
3 1 2 9
2 2 4
0 0
 3 2
2 2 2
0
3 3 4 8
3 2
4 1 5 2 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 1 1
3 1 2 9
2 2 4
0 0
 3 2
2 1 2
0
3 3 4 8
3 2
4 1 5 0 9
3 2 5 9
5 2 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 4
3 3
2 0 1
3 1 2 9
2 2 4
0 0
 3 2
2 1 3
0
3 3 4 8
3 2
4 1 5 8 9
3 2 5 9
5 1 4 5 7 9
3 3
2 1 4
3 2 5 9
2 2 7
3 3
2 1 2
3 1 2 9
2 2 4
0 0
 3 2
2 1 3
0
3 3 4 8
3 2
4 1 5 8 9
3 2 5 9
5 1 4 5 7 9
3 1
2 1 4
3 2 5 9
2 2 7
3 3
2 1 2
3 1 2 9
2 2 4
0 0

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

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>

main(){
  int n, q, committee[50][100], quorum[100], i, j, temp, max, date[101], ans;

  while(1){
    scanf("%d %d", &n, &q);
    if(n==0 && q==0) break;

    for(i=0;i<n;i++){
      scanf("%d", &temp);
      if(temp==0){
	committee[i][0]=-1;
	continue;
      }

      for(j=0;j<temp;j++){
	scanf("%d", &committee[i][j]);
      }
      committee[i][j]=-1;
    }

    for(i=0;i<101;i++){
      date[i]=0;
    }

    for(i=0;i<n;i++){
      for(j=0;;j++){
	if(committee[i][j]==-1) break;
	date[committee[i][j]]++;
      }
    }

    max=-1;
    ans=0;
    for(i=0;i<101;i++){
      if(max<date[i]){
	max=date[i];
	ans=i;
      }
    }
    if(max>=q) printf("%d\n", ans);
    else printf("0\n");
  }
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"0"
	.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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L22:
	leaq	-20456(%rbp), %rdx
	leaq	-20460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20460(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20456(%rbp), %eax
	testl	%eax, %eax
	je	.L27
.L2:
	movl	$0, -20448(%rbp)
	jmp	.L4
.L9:
	leaq	-20452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20452(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$20016, %rax
	movl	$-1, (%rax)
	jmp	.L6
.L5:
	movl	$0, -20444(%rbp)
	jmp	.L7
.L8:
	leaq	-20016(%rbp), %rcx
	movl	-20444(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20444(%rbp)
.L7:
	movl	-20452(%rbp), %eax
	cmpl	%eax, -20444(%rbp)
	jl	.L8
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$-1, -20016(%rbp,%rax,4)
.L6:
	addl	$1, -20448(%rbp)
.L4:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L9
	movl	$0, -20448(%rbp)
	jmp	.L10
.L11:
	movl	-20448(%rbp), %eax
	cltq
	movl	$0, -20432(%rbp,%rax,4)
	addl	$1, -20448(%rbp)
.L10:
	cmpl	$100, -20448(%rbp)
	jle	.L11
	movl	$0, -20448(%rbp)
	jmp	.L12
.L16:
	movl	$0, -20444(%rbp)
.L15:
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L28
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-20432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -20432(%rbp,%rax,4)
	addl	$1, -20444(%rbp)
	jmp	.L15
.L28:
	nop
	addl	$1, -20448(%rbp)
.L12:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L16
	movl	$-1, -20440(%rbp)
	movl	$0, -20436(%rbp)
	movl	$0, -20448(%rbp)
	jmp	.L17
.L19:
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	cmpl	%eax, -20440(%rbp)
	jge	.L18
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	movl	%eax, -20440(%rbp)
	movl	-20448(%rbp), %eax
	movl	%eax, -20436(%rbp)
.L18:
	addl	$1, -20448(%rbp)
.L17:
	cmpl	$100, -20448(%rbp)
	jle	.L19
	movl	-20456(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L20
	movl	-20436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L22
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"0"
	.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
	leaq	-16384(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$4080, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L22:
	leaq	-20456(%rbp), %rdx
	leaq	-20460(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20460(%rbp), %eax
	testl	%eax, %eax
	jne	.L2
	movl	-20456(%rbp), %eax
	testl	%eax, %eax
	je	.L27
.L2:
	movl	$0, -20448(%rbp)
	jmp	.L4
.L9:
	leaq	-20452(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-20452(%rbp), %eax
	testl	%eax, %eax
	jne	.L5
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rbp, %rax
	subq	$20016, %rax
	movl	$-1, (%rax)
	jmp	.L6
.L5:
	movl	$0, -20444(%rbp)
	jmp	.L7
.L8:
	leaq	-20016(%rbp), %rcx
	movl	-20444(%rbp), %eax
	movslq	%eax, %rsi
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -20444(%rbp)
.L7:
	movl	-20452(%rbp), %eax
	cmpl	%eax, -20444(%rbp)
	jl	.L8
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	$-1, -20016(%rbp,%rax,4)
.L6:
	addl	$1, -20448(%rbp)
.L4:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L9
	movl	$0, -20448(%rbp)
	jmp	.L10
.L11:
	movl	-20448(%rbp), %eax
	cltq
	movl	$0, -20432(%rbp,%rax,4)
	addl	$1, -20448(%rbp)
.L10:
	cmpl	$100, -20448(%rbp)
	jle	.L11
	movl	$0, -20448(%rbp)
	jmp	.L12
.L16:
	movl	$0, -20444(%rbp)
.L15:
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L28
	movl	-20444(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20448(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movl	-20016(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-20432(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -20432(%rbp,%rax,4)
	addl	$1, -20444(%rbp)
	jmp	.L15
.L28:
	nop
	addl	$1, -20448(%rbp)
.L12:
	movl	-20460(%rbp), %eax
	cmpl	%eax, -20448(%rbp)
	jl	.L16
	movl	$-1, -20440(%rbp)
	movl	$0, -20436(%rbp)
	movl	$0, -20448(%rbp)
	jmp	.L17
.L19:
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	cmpl	%eax, -20440(%rbp)
	jge	.L18
	movl	-20448(%rbp), %eax
	cltq
	movl	-20432(%rbp,%rax,4), %eax
	movl	%eax, -20440(%rbp)
	movl	-20448(%rbp), %eax
	movl	%eax, -20436(%rbp)
.L18:
	addl	$1, -20448(%rbp)
.L17:
	cmpl	$100, -20448(%rbp)
	jle	.L19
	movl	-20456(%rbp), %eax
	cmpl	%eax, -20440(%rbp)
	jl	.L20
	movl	-20436(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L22
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L27:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	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:
