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

```c
#include<stdio.h>

int main(void){
  int i,j;
  int n,q;
  int m,d,a[100];
  int max,ans;
  
  while(1){
    scanf("%d %d ",&n,&q);
    if(!n && !q)break;

    for(i=0;i<100;i++)a[i] = 0;
    
    for(i=0;i<n;i++){
      scanf("%d ",&m);
      
      for(j=0;j<m;j++){
	scanf("%d ",&d);
	a[d]++;
      }
    }
      
    ans = 0;
    max = q-1;
    for(i=0;i<100;i++){
      if(max < a[i]){
	max = a[i];
	ans = i;
      }
    }

    printf("%d\n",ans);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%d "
.LC2:
	.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
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	orl	%edx, %eax
	je	.L2
	movl	$50, %ecx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	rep stosq
	testl	%esi, %esi
	jle	.L3
	xorl	%r13d, %r13d
	leaq	24(%rsp), %r14
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r15d, 24(%rsp)
	jg	.L4
.L7:
	addl	$1, %r13d
	cmpl	%r13d, 16(%rsp)
	jg	.L5
	movl	20(%rsp), %edx
.L3:
	leal	-1(%rdx), %ecx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L8
	movl	%eax, %r8d
	movl	%edx, %ecx
.L8:
	addq	$1, %rax
	cmpq	$100, %rax
	jne	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$456, %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
.L20:
	.cfi_restore_state
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%d "
.LC2:
	.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
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	orl	%edx, %eax
	je	.L2
	movl	$50, %ecx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	rep stosq
	testl	%esi, %esi
	jle	.L3
	xorl	%r13d, %r13d
	leaq	24(%rsp), %r14
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r15d, 24(%rsp)
	jg	.L4
.L7:
	addl	$1, %r13d
	cmpl	%r13d, 16(%rsp)
	jg	.L5
	movl	20(%rsp), %edx
.L3:
	leal	-1(%rdx), %ecx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L8
	movl	%eax, %r8d
	movl	%edx, %ecx
.L8:
	addq	$1, %rax
	cmpq	$100, %rax
	jne	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$456, %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
.L20:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%d "
.LC2:
	.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
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	orl	%edx, %eax
	je	.L2
	movl	$50, %ecx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	rep stosq
	testl	%esi, %esi
	jle	.L3
	xorl	%r13d, %r13d
	leaq	24(%rsp), %r14
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r15d, 24(%rsp)
	jg	.L4
.L7:
	addl	$1, %r13d
	cmpl	%r13d, 16(%rsp)
	jg	.L5
	movl	20(%rsp), %edx
.L3:
	leal	-1(%rdx), %ecx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L8
	movl	%eax, %r8d
	movl	%edx, %ecx
.L8:
	addq	$1, %rax
	cmpq	$100, %rax
	jne	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$456, %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
.L20:
	.cfi_restore_state
	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:
```
```c
#include<stdio.h>

int main(void){
  int i,j;
  int n,q;
  int m,d,a[100];
  int max,ans;
  
  while(1){
    scanf("%d %d ",&n,&q);
    if(!n && !q)break;

    for(i=0;i<100;i++)a[i] = 0;
    
    for(i=0;i<n;i++){
      scanf("%d ",&m);
      
      for(j=0;j<m;j++){
	scanf("%d ",&d);
	a[d]++;
      }
    }
      
    ans = 0;
    max = q-1;
    for(i=0;i<100;i++){
      if(max < a[i]){
	max = a[i];
	ans = i;
      }
    }

    printf("%d\n",ans);
  }
  return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(void){
  int i,j;
  int n,q;
  int m,d,a[100];
  int max,ans;
  
  while(1){
    scanf("%d %d ",&n,&q);
    if(!n && !q)break;

    for(i=0;i<100;i++)a[i] = 0;
    
    for(i=0;i<n;i++){
      scanf("%d ",&m);
      
      for(j=0;j<m;j++){
	scanf("%d ",&d);
	a[d]++;
      }
    }
      
    ans = 0;
    max = q-1;
    for(i=0;i<100;i++){
      if(max < a[i]){
	max = a[i];
	ans = i;
      }
    }

    printf("%d\n",ans);
  }
  return 0;
}```

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.
Optimized Assembly Code:

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 assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

int main(void){
  int i,j;
  int n,q;
  int m,d,a[100];
  int max,ans;
  
  while(1){
    scanf("%d %d ",&n,&q);
    if(!n && !q)break;

    for(i=0;i<100;i++)a[i] = 0;
    
    for(i=0;i<n;i++){
      scanf("%d ",&m);
      
      for(j=0;j<m;j++){
	scanf("%d ",&d);
	a[d]++;
      }
    }
      
    ans = 0;
    max = q-1;
    for(i=0;i<100;i++){
      if(max < a[i]){
	max = a[i];
	ans = i;
      }
    }

    printf("%d\n",ans);
  }
  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%d "
.LC2:
	.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
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	orl	%edx, %eax
	je	.L2
	movl	$50, %ecx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	rep stosq
	testl	%esi, %esi
	jle	.L3
	xorl	%r13d, %r13d
	leaq	24(%rsp), %r14
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r15d, 24(%rsp)
	jg	.L4
.L7:
	addl	$1, %r13d
	cmpl	%r13d, 16(%rsp)
	jg	.L5
	movl	20(%rsp), %edx
.L3:
	leal	-1(%rdx), %ecx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L8
	movl	%eax, %r8d
	movl	%edx, %ecx
.L8:
	addq	$1, %rax
	cmpq	$100, %rax
	jne	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$456, %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
.L20:
	.cfi_restore_state
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d "
.LC1:
	.string	"%d "
.LC2:
	.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
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$456, %rsp
	.cfi_def_cfa_offset 512
	movq	%fs:40, %rax
	movq	%rax, 440(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rax
	leaq	32(%rsp), %rbx
	movq	%rax, 8(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, (%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rdx
	movq	(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
	movl	%esi, %eax
	orl	%edx, %eax
	je	.L2
	movl	$50, %ecx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	rep stosq
	testl	%esi, %esi
	jle	.L3
	xorl	%r13d, %r13d
	leaq	24(%rsp), %r14
	leaq	28(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r15d, 24(%rsp)
	jg	.L4
.L7:
	addl	$1, %r13d
	cmpl	%r13d, 16(%rsp)
	jg	.L5
	movl	20(%rsp), %edx
.L3:
	leal	-1(%rdx), %ecx
	xorl	%eax, %eax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%rbx,%rax,4), %edx
	cmpl	%ecx, %edx
	jle	.L8
	movl	%eax, %r8d
	movl	%edx, %ecx
.L8:
	addq	$1, %rax
	cmpq	$100, %rax
	jne	.L9
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L10
.L2:
	movq	440(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$456, %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
.L20:
	.cfi_restore_state
	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:
```