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()
{
	int data[51][105];
	int x=0,y=0,i,t, avg, sum[51];
         for(i=0;i<51;i++)
         sum[i]=0;
	while (1)
	{
		
		scanf("%d%d", &data[x][0],&data[x][1]);
		if (data[x][0] == 0 && data[x][1] == 0)break;
		for (y = 2; y <= data[x][0] + 1; y++)
			scanf("%d", &data[x][y]);
		x++;

	}
	
   for(i=0;i<x;i++)
   {avg=data[i][1]/data[i][0];
    for(t=2;t<=data[i][0]+1;t++)
      if(data[i][t]>=avg)sum[i]+=avg; else sum[i]+=data[i][t];
       printf("%d\n",sum[i]);
		}
 return 0;

}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.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	-20480(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -21668(%rbp)
	movl	$0, -21664(%rbp)
	movl	$0, -21660(%rbp)
	jmp	.L2
.L3:
	movl	-21660(%rbp), %eax
	cltq
	movl	$0, -21648(%rbp,%rax,4)
	addl	$1, -21660(%rbp)
.L2:
	cmpl	$50, -21660(%rbp)
	jle	.L3
.L8:
	leaq	-21440(%rbp), %rdx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	$4, %rax
	addq	%rax, %rdx
	leaq	-21440(%rbp), %rcx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L18
.L4:
	movl	$2, -21664(%rbp)
	jmp	.L6
.L7:
	leaq	-21440(%rbp), %rcx
	movl	-21664(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %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, -21664(%rbp)
.L6:
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21664(%rbp)
	jle	.L7
	addl	$1, -21668(%rbp)
	jmp	.L8
.L18:
	nop
	movl	$0, -21660(%rbp)
	jmp	.L9
.L14:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	movl	-21660(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$420, %rdx, %rdx
	addq	%rbp, %rdx
	subq	$21440, %rdx
	movl	(%rdx), %edi
	cltd
	idivl	%edi
	movl	%eax, -21652(%rbp)
	movl	$2, -21656(%rbp)
	jmp	.L10
.L13:
	movl	-21656(%rbp), %eax
	movslq	%eax, %rcx
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-21440(%rbp,%rax,4), %eax
	cmpl	%eax, -21652(%rbp)
	jg	.L11
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %edx
	movl	-21652(%rbp), %eax
	addl	%eax, %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
	jmp	.L12
.L11:
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %ecx
	movl	-21656(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-21440(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
.L12:
	addl	$1, -21656(%rbp)
.L10:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21656(%rbp)
	jle	.L13
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -21660(%rbp)
.L9:
	movl	-21660(%rbp), %eax
	cmpl	-21668(%rbp), %eax
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
	.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	$1192, %rsp
	.cfi_def_cfa_offset 21728
	movl	$25, %ecx
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 21656(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	rep stosq
	leaq	224(%rsp), %rax
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	movl	$0, (%rdi)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rbx), %eax
	testl	%eax, %eax
	je	.L21
.L5:
	addq	$1, %r12
	addq	$420, %rbx
.L4:
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rbx), %edx
	movl	%r12d, %r13d
	testl	%edx, %edx
	je	.L2
	jle	.L5
	leaq	8(%rbx), %r15
	movl	$2, %r13d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	%r13d, %eax
	addl	$1, %r13d
	cmpl	%eax, (%rbx)
	jge	.L7
	jmp	.L5
.L21:
	testl	%r12d, %r12d
	je	.L13
	movq	(%rsp), %r15
	leal	-1(%r13), %eax
	movq	8(%rsp), %r14
	leaq	232(%rsp), %r12
	leaq	20(%rsp,%rax,4), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	addq	$12, %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movl	-4(%r12), %eax
	movl	-8(%r12), %ecx
	cltd
	idivl	%ecx
	movl	(%r14), %edx
	testl	%ecx, %ecx
	jle	.L8
	subl	$1, %ecx
	addq	%r13, %rcx
	leaq	(%r15,%rcx,4), %r8
	movq	%r12, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rcx), %esi
	leal	(%rdx,%rax), %edi
	addl	%esi, %edx
	cmpl	%esi, %eax
	cmovle	%edi, %edx
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	.L11
	movl	%edx, (%r14)
.L8:
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__printf_chk@PLT
	addq	$420, %r12
	addq	$105, %r13
	cmpq	%r14, %rbp
	jne	.L12
.L13:
	movq	21656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$21672, %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
.L22:
	.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
	.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
	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	$1192, %rsp
	.cfi_def_cfa_offset 21728
	movl	$25, %ecx
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	leaq	.LC1(%rip), %rbp
	movq	%fs:40, %rax
	movq	%rax, 21656(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	rep stosq
	leaq	224(%rsp), %rax
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	movl	$0, (%rdi)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	movl	4(%rbx), %eax
	testl	%eax, %eax
	je	.L21
.L5:
	addq	$1, %r12
	addq	$420, %rbx
.L4:
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%rbx), %edx
	movl	%r12d, %r13d
	testl	%edx, %edx
	je	.L2
	jle	.L5
	leaq	8(%rbx), %r15
	movl	$2, %r13d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__isoc99_scanf@PLT
	movl	%r13d, %eax
	addl	$1, %r13d
	cmpl	%eax, (%rbx)
	jge	.L7
	jmp	.L5
.L21:
	testl	%r12d, %r12d
	je	.L13
	movq	(%rsp), %r15
	leal	-1(%r13), %eax
	movq	8(%rsp), %r14
	leaq	232(%rsp), %r12
	leaq	20(%rsp,%rax,4), %rbp
	xorl	%r13d, %r13d
	leaq	.LC2(%rip), %rbx
	addq	$12, %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movl	-4(%r12), %eax
	movl	-8(%r12), %ecx
	cltd
	idivl	%ecx
	movl	(%r14), %edx
	testl	%ecx, %ecx
	jle	.L8
	subl	$1, %ecx
	addq	%r13, %rcx
	leaq	(%r15,%rcx,4), %r8
	movq	%r12, %rcx
	.p2align 4,,10
	.p2align 3
.L11:
	movl	(%rcx), %esi
	leal	(%rdx,%rax), %edi
	addl	%esi, %edx
	cmpl	%esi, %eax
	cmovle	%edi, %edx
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	.L11
	movl	%edx, (%r14)
.L8:
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r14
	call	__printf_chk@PLT
	addq	$420, %r12
	addq	$105, %r13
	cmpq	%r14, %rbp
	jne	.L12
.L13:
	movq	21656(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$21672, %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
.L22:
	.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:

#include <stdio.h>
int main()
{
	int data[51][105];
	int x=0,y=0,i,t, avg, sum[51];
         for(i=0;i<51;i++)
         sum[i]=0;
	while (1)
	{
		
		scanf("%d%d", &data[x][0],&data[x][1]);
		if (data[x][0] == 0 && data[x][1] == 0)break;
		for (y = 2; y <= data[x][0] + 1; y++)
			scanf("%d", &data[x][y]);
		x++;

	}
	
   for(i=0;i<x;i++)
   {avg=data[i][1]/data[i][0];
    for(t=2;t<=data[i][0]+1;t++)
      if(data[i][t]>=avg)sum[i]+=avg; else sum[i]+=data[i][t];
       printf("%d\n",sum[i]);
		}
 return 0;

}

3 300
120 100 80
3 5
10 20 5
4 1000
100 200 300 400
5 5
2523 8430 3 4199 632
0 0
 3 300
120 100 80
3 5
10 20 5
4 1000
100 260 300 400
5 5
2523 8430 3 4199 632
0 0
 3 300
120 100 80
2 5
10 34 5
4 1000
100 200 300 400
5 5
2523 8430 3 4199 632
0 0
 3 300
120 101 80
3 5
10 34 5
4 1000
100 200 159 400
5 5
183 8430 3 4199 632
0 0
 3 276
120 101 80
3 5
10 34 10
4 1000
100 200 159 400
5 5
183 8430 3 4199 632
0 0
 3 276
120 101 93
3 5
10 34 10
4 1000
100 200 159 400
5 5
127 8430 3 4199 632
0 0
 3 276
120 101 93
3 5
10 34 10
4 1000
100 200 159 400
5 5
127 8430 0 4199 632
0 0
 3 300
120 010 80
2 5
12 34 5
4 0000
110 200 300 400
5 5
2523 8430 3 4199 201
0 0
 3 300
120 100 80
3 30
10 20 5
4 1000
100 200 300 400
5 5
2523 8430 3 4199 987
0 0
 3 300
120 101 80
3 5
10 34 5
4 1000
100 200 300 400
5 1
2523 8430 3 4199 632
0 0

280
3
800
5
 280
3
850
5
 280
4
0
5
 280
3
709
5
 264
3
709
5
 276
3
709
5
 276
3
709
4
 190
4
0
5
 280
25
800
5
 280
3
800
0

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()
{
	int data[51][105];
	int x=0,y=0,i,t, avg, sum[51];
         for(i=0;i<51;i++)
         sum[i]=0;
	while (1)
	{
		
		scanf("%d%d", &data[x][0],&data[x][1]);
		if (data[x][0] == 0 && data[x][1] == 0)break;
		for (y = 2; y <= data[x][0] + 1; y++)
			scanf("%d", &data[x][y]);
		x++;

	}
	
   for(i=0;i<x;i++)
   {avg=data[i][1]/data[i][0];
    for(t=2;t<=data[i][0]+1;t++)
      if(data[i][t]>=avg)sum[i]+=avg; else sum[i]+=data[i][t];
       printf("%d\n",sum[i]);
		}
 return 0;

}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.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	-20480(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -21668(%rbp)
	movl	$0, -21664(%rbp)
	movl	$0, -21660(%rbp)
	jmp	.L2
.L3:
	movl	-21660(%rbp), %eax
	cltq
	movl	$0, -21648(%rbp,%rax,4)
	addl	$1, -21660(%rbp)
.L2:
	cmpl	$50, -21660(%rbp)
	jle	.L3
.L8:
	leaq	-21440(%rbp), %rdx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	$4, %rax
	addq	%rax, %rdx
	leaq	-21440(%rbp), %rcx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L18
.L4:
	movl	$2, -21664(%rbp)
	jmp	.L6
.L7:
	leaq	-21440(%rbp), %rcx
	movl	-21664(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %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, -21664(%rbp)
.L6:
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21664(%rbp)
	jle	.L7
	addl	$1, -21668(%rbp)
	jmp	.L8
.L18:
	nop
	movl	$0, -21660(%rbp)
	jmp	.L9
.L14:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	movl	-21660(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$420, %rdx, %rdx
	addq	%rbp, %rdx
	subq	$21440, %rdx
	movl	(%rdx), %edi
	cltd
	idivl	%edi
	movl	%eax, -21652(%rbp)
	movl	$2, -21656(%rbp)
	jmp	.L10
.L13:
	movl	-21656(%rbp), %eax
	movslq	%eax, %rcx
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-21440(%rbp,%rax,4), %eax
	cmpl	%eax, -21652(%rbp)
	jg	.L11
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %edx
	movl	-21652(%rbp), %eax
	addl	%eax, %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
	jmp	.L12
.L11:
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %ecx
	movl	-21656(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-21440(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
.L12:
	addl	$1, -21656(%rbp)
.L10:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21656(%rbp)
	jle	.L13
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -21660(%rbp)
.L9:
	movl	-21660(%rbp), %eax
	cmpl	-21668(%rbp), %eax
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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"
	.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	-20480(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1200, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -21668(%rbp)
	movl	$0, -21664(%rbp)
	movl	$0, -21660(%rbp)
	jmp	.L2
.L3:
	movl	-21660(%rbp), %eax
	cltq
	movl	$0, -21648(%rbp,%rax,4)
	addl	$1, -21660(%rbp)
.L2:
	cmpl	$50, -21660(%rbp)
	jle	.L3
.L8:
	leaq	-21440(%rbp), %rdx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	$4, %rax
	addq	%rax, %rdx
	leaq	-21440(%rbp), %rcx
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	.L18
.L4:
	movl	$2, -21664(%rbp)
	jmp	.L6
.L7:
	leaq	-21440(%rbp), %rcx
	movl	-21664(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %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, -21664(%rbp)
.L6:
	movl	-21668(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21664(%rbp)
	jle	.L7
	addl	$1, -21668(%rbp)
	jmp	.L8
.L18:
	nop
	movl	$0, -21660(%rbp)
	jmp	.L9
.L14:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21436, %rax
	movl	(%rax), %eax
	movl	-21660(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$420, %rdx, %rdx
	addq	%rbp, %rdx
	subq	$21440, %rdx
	movl	(%rdx), %edi
	cltd
	idivl	%edi
	movl	%eax, -21652(%rbp)
	movl	$2, -21656(%rbp)
	jmp	.L10
.L13:
	movl	-21656(%rbp), %eax
	movslq	%eax, %rcx
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-21440(%rbp,%rax,4), %eax
	cmpl	%eax, -21652(%rbp)
	jg	.L11
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %edx
	movl	-21652(%rbp), %eax
	addl	%eax, %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
	jmp	.L12
.L11:
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %ecx
	movl	-21656(%rbp), %eax
	movslq	%eax, %rsi
	movl	-21660(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-21440(%rbp,%rax,4), %eax
	leal	(%rcx,%rax), %edx
	movl	-21660(%rbp), %eax
	cltq
	movl	%edx, -21648(%rbp,%rax,4)
.L12:
	addl	$1, -21656(%rbp)
.L10:
	movl	-21660(%rbp), %eax
	cltq
	imulq	$420, %rax, %rax
	addq	%rbp, %rax
	subq	$21440, %rax
	movl	(%rax), %eax
	addl	$1, %eax
	cmpl	%eax, -21656(%rbp)
	jle	.L13
	movl	-21660(%rbp), %eax
	cltq
	movl	-21648(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -21660(%rbp)
.L9:
	movl	-21660(%rbp), %eax
	cmpl	-21668(%rbp), %eax
	jl	.L14
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	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:
