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

```c
q,m,d,b;main(n){for(;scanf("%d%d",&n,&q)*n;printf("%d\n",b)){int c[100]={b=0};for(;n--;)for(scanf("%d",&m);m--;++c[d]>=q&&(c[d]-c[b])*100>d-b?b=d:0)scanf("%d",&d);}}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	q(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	d(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L23
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	movl	$0, b(%rip)
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 12(%rsp)
	testl	%esi, %esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L24
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	d(%rip), %rdx
	movl	16(%rsp,%rdx,4), %eax
	movq	%rdx, %rcx
	addl	$1, %eax
	cmpl	q(%rip), %eax
	movl	%eax, 16(%rsp,%rdx,4)
	jl	.L21
	movslq	b(%rip), %rsi
	subl	16(%rsp,%rsi,4), %eax
	movq	%rsi, %rdx
	movl	%ecx, %esi
	imull	$100, %eax, %eax
	subl	%edx, %esi
	cmpl	%esi, %eax
	jle	.L21
	movl	%ecx, b(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L5
	movl	b(%rip), %esi
.L3:
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L23:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$440, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.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:
```

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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	q(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	d(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L23
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	movl	$0, b(%rip)
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 12(%rsp)
	testl	%esi, %esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L24
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	d(%rip), %rdx
	movl	16(%rsp,%rdx,4), %eax
	movq	%rdx, %rcx
	addl	$1, %eax
	cmpl	q(%rip), %eax
	movl	%eax, 16(%rsp,%rdx,4)
	jl	.L21
	movslq	b(%rip), %rsi
	subl	16(%rsp,%rsi,4), %eax
	movq	%rsi, %rdx
	movl	%ecx, %esi
	imull	$100, %eax, %eax
	subl	%edx, %esi
	cmpl	%esi, %eax
	jle	.L21
	movl	%ecx, b(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L5
	movl	b(%rip), %esi
.L3:
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L23:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$440, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	q(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	d(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L23
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	movl	$0, b(%rip)
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 12(%rsp)
	testl	%esi, %esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L24
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	d(%rip), %rdx
	movl	16(%rsp,%rdx,4), %eax
	movq	%rdx, %rcx
	addl	$1, %eax
	cmpl	q(%rip), %eax
	movl	%eax, 16(%rsp,%rdx,4)
	jl	.L21
	movslq	b(%rip), %rsi
	subl	16(%rsp,%rsi,4), %eax
	movq	%rsi, %rdx
	movl	%ecx, %esi
	imull	$100, %eax, %eax
	subl	%edx, %esi
	cmpl	%esi, %eax
	jle	.L21
	movl	%ecx, b(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L5
	movl	b(%rip), %esi
.L3:
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L23:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$440, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.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:
```
```c
q,m,d,b;main(n){for(;scanf("%d%d",&n,&q)*n;printf("%d\n",b)){int c[100]={b=0};for(;n--;)for(scanf("%d",&m);m--;++c[d]>=q&&(c[d]-c[b])*100>d-b?b=d:0)scanf("%d",&d);}}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
q,m,d,b;main(n){for(;scanf("%d%d",&n,&q)*n;printf("%d\n",b)){int c[100]={b=0};for(;n--;)for(scanf("%d",&m);m--;++c[d]>=q&&(c[d]-c[b])*100>d-b?b=d:0)scanf("%d",&d);}}```

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
q,m,d,b;main(n){for(;scanf("%d%d",&n,&q)*n;printf("%d\n",b)){int c[100]={b=0};for(;n--;)for(scanf("%d",&m);m--;++c[d]>=q&&(c[d]-c[b])*100>d-b?b=d:0)scanf("%d",&d);}}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	q(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	d(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L23
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	movl	$0, b(%rip)
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 12(%rsp)
	testl	%esi, %esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L24
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	d(%rip), %rdx
	movl	16(%rsp,%rdx,4), %eax
	movq	%rdx, %rcx
	addl	$1, %eax
	cmpl	q(%rip), %eax
	movl	%eax, 16(%rsp,%rdx,4)
	jl	.L21
	movslq	b(%rip), %rsi
	subl	16(%rsp,%rsi,4), %eax
	movq	%rsi, %rdx
	movl	%ecx, %esi
	imull	$100, %eax, %eax
	subl	%edx, %esi
	cmpl	%esi, %eax
	jle	.L21
	movl	%ecx, b(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L5
	movl	b(%rip), %esi
.L3:
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L23:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$440, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.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:
```

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"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	leaq	q(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	m(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	d(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$440, %rsp
	.cfi_def_cfa_offset 496
	movl	%edi, 12(%rsp)
	leaq	12(%rsp), %r15
	movq	%fs:40, %rax
	movq	%rax, 424(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	12(%rsp), %esi
	imull	%esi, %eax
	testl	%eax, %eax
	je	.L23
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movl	$50, %ecx
	movl	$0, b(%rip)
	rep stosq
	leal	-1(%rsi), %eax
	movl	%eax, 12(%rsp)
	testl	%esi, %esi
	je	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	.p2align 4,,10
	.p2align 3
.L21:
	movl	m(%rip), %eax
	leal	-1(%rax), %edx
	movl	%edx, m(%rip)
	testl	%eax, %eax
	je	.L24
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	call	scanf@PLT
	movslq	d(%rip), %rdx
	movl	16(%rsp,%rdx,4), %eax
	movq	%rdx, %rcx
	addl	$1, %eax
	cmpl	q(%rip), %eax
	movl	%eax, 16(%rsp,%rdx,4)
	jl	.L21
	movslq	b(%rip), %rsi
	subl	16(%rsp,%rsi,4), %eax
	movq	%rsi, %rdx
	movl	%ecx, %esi
	imull	$100, %eax, %eax
	subl	%edx, %esi
	cmpl	%esi, %eax
	jle	.L21
	movl	%ecx, b(%rip)
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L5
	movl	b(%rip), %esi
.L3:
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	printf@PLT
	jmp	.L2
.L23:
	movq	424(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$440, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	b
	.bss
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 4
	.type	d, @object
	.size	d, 4
d:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	q
	.align 4
	.type	q, @object
	.size	q, 4
q:
	.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:
```