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 a[1010];
int t[1010];
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int q;
	scanf("%d",&q);
	while(q--){
		//[b,e)をe-m個右へrotate
		int b,m,e;
		scanf("%d%d%d",&b,&m,&e);
		m=e-m;
		for(int i=0;i<e-b;i++)t[i]=a[b+i];
		for(int i=0;i<e-b;i++)a[b+(i+m)%(e-b)]=t[i];
	}
	for(int i=0;i<n;i++)printf("%d%c",a[i],i==n-1?10:32);
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%c"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 20(%rsp)
	jg	.L3
.L2:
	leaq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	28(%rsp), %r9d
	movl	%ecx, %r15d
	subl	%r9d, %ecx
	subl	32(%rsp), %r15d
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rdx
	movslq	%r9d, %rax
	leaq	t(%rip), %rdi
	movl	%ecx, 12(%rsp)
	leaq	(%r14,%rax,4), %rsi
	salq	$2, %rdx
	movl	%r9d, 8(%rsp)
	call	memcpy@PLT
	movl	12(%rsp), %ecx
	movl	8(%rsp), %r9d
	leaq	t(%rip), %rsi
	leal	(%rcx,%r15), %edi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, %eax
	addl	$1, %r15d
	addq	$4, %rsi
	cltd
	idivl	%ecx
	movl	-4(%rsi), %eax
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%r15d, %edi
	jne	.L6
.L5:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L7
.L4:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	subl	$1, %eax
	movl	(%r12,%rbx,4), %edx
	movl	$32, %ecx
	cmpl	%ebx, %eax
	jne	.L20
	movl	$10, %ecx
.L20:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%ebx, %eax
	jg	.L11
.L8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 4040
t:
	.zero	4040
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4040
a:
	.zero	4040
	.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%d%d"
.LC2:
	.string	"%d%c"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 20(%rsp)
	jg	.L3
.L2:
	leaq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	28(%rsp), %r9d
	movl	%ecx, %r15d
	subl	%r9d, %ecx
	subl	32(%rsp), %r15d
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rdx
	movslq	%r9d, %rax
	leaq	t(%rip), %rdi
	movl	%ecx, 12(%rsp)
	leaq	(%r14,%rax,4), %rsi
	salq	$2, %rdx
	movl	%r9d, 8(%rsp)
	call	memcpy@PLT
	movl	12(%rsp), %ecx
	movl	8(%rsp), %r9d
	leaq	t(%rip), %rsi
	leal	(%rcx,%r15), %edi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, %eax
	addl	$1, %r15d
	addq	$4, %rsi
	cltd
	idivl	%ecx
	movl	-4(%rsi), %eax
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%r15d, %edi
	jne	.L6
.L5:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L7
.L4:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	subl	$1, %eax
	movl	(%r12,%rbx,4), %edx
	movl	$32, %ecx
	cmpl	%ebx, %eax
	jne	.L20
	movl	$10, %ecx
.L20:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%ebx, %eax
	jg	.L11
.L8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 4040
t:
	.zero	4040
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4040
a:
	.zero	4040
	.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%d%d"
.LC2:
	.string	"%d%c"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 20(%rsp)
	jg	.L3
.L2:
	leaq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	28(%rsp), %r9d
	movl	%ecx, %r15d
	subl	%r9d, %ecx
	subl	32(%rsp), %r15d
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rdx
	movslq	%r9d, %rax
	leaq	t(%rip), %rdi
	movl	%ecx, 12(%rsp)
	leaq	(%r14,%rax,4), %rsi
	salq	$2, %rdx
	movl	%r9d, 8(%rsp)
	call	memcpy@PLT
	movl	12(%rsp), %ecx
	movl	8(%rsp), %r9d
	leaq	t(%rip), %rsi
	leal	(%rcx,%r15), %edi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, %eax
	addl	$1, %r15d
	addq	$4, %rsi
	cltd
	idivl	%ecx
	movl	-4(%rsi), %eax
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%r15d, %edi
	jne	.L6
.L5:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L7
.L4:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	subl	$1, %eax
	movl	(%r12,%rbx,4), %edx
	movl	$32, %ecx
	cmpl	%ebx, %eax
	jne	.L20
	movl	$10, %ecx
.L20:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%ebx, %eax
	jg	.L11
.L8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 4040
t:
	.zero	4040
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4040
a:
	.zero	4040
	.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 a[1010];
int t[1010];
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int q;
	scanf("%d",&q);
	while(q--){
		//[b,e)をe-m個右へrotate
		int b,m,e;
		scanf("%d%d%d",&b,&m,&e);
		m=e-m;
		for(int i=0;i<e-b;i++)t[i]=a[b+i];
		for(int i=0;i<e-b;i++)a[b+(i+m)%(e-b)]=t[i];
	}
	for(int i=0;i<n;i++)printf("%d%c",a[i],i==n-1?10:32);
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int a[1010];
int t[1010];
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int q;
	scanf("%d",&q);
	while(q--){
		//[b,e)をe-m個右へrotate
		int b,m,e;
		scanf("%d%d%d",&b,&m,&e);
		m=e-m;
		for(int i=0;i<e-b;i++)t[i]=a[b+i];
		for(int i=0;i<e-b;i++)a[b+(i+m)%(e-b)]=t[i];
	}
	for(int i=0;i<n;i++)printf("%d%c",a[i],i==n-1?10:32);
}
```

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:

11
1 2 3 4 5 6 7 8 18 10 11
1
2 6 9
 11
1 2 3 4 5 6 7 8 18 10 11
1
4 6 9
 11
1 2 3 4 5 6 7 5 18 10 11
1
4 6 9
 11
1 2 3 4 5 6 7 5 18 10 10
1
4 6 9
 11
1 2 3 4 5 9 7 5 18 10 10
1
4 6 9
 11
2 2 3 4 5 9 7 5 18 10 10
1
4 6 9
 11
2 2 3 4 5 9 7 5 18 10 2
1
4 6 9
 11
2 2 1 4 5 9 7 5 18 10 2
1
4 6 9
 11
2 2 1 4 5 9 7 5 29 10 2
1
4 6 9
 11
2 2 1 4 5 9 7 5 29 10 1
1
4 6 9

1 2 7 8 18 3 4 5 6 10 11
 1 2 3 4 7 8 18 5 6 10 11
 1 2 3 4 7 5 18 5 6 10 11
 1 2 3 4 7 5 18 5 6 10 10
 1 2 3 4 7 5 18 5 9 10 10
 2 2 3 4 7 5 18 5 9 10 10
 2 2 3 4 7 5 18 5 9 10 2
 2 2 1 4 7 5 18 5 9 10 2
 2 2 1 4 7 5 29 5 9 10 2
 2 2 1 4 7 5 29 5 9 10 1

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 a[1010];
int t[1010];
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d",a+i);
	int q;
	scanf("%d",&q);
	while(q--){
		//[b,e)をe-m個右へrotate
		int b,m,e;
		scanf("%d%d%d",&b,&m,&e);
		m=e-m;
		for(int i=0;i<e-b;i++)t[i]=a[b+i];
		for(int i=0;i<e-b;i++)a[b+(i+m)%(e-b)]=t[i];
	}
	for(int i=0;i<n;i++)printf("%d%c",a[i],i==n-1?10:32);
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d%d"
.LC2:
	.string	"%d%c"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 20(%rsp)
	jg	.L3
.L2:
	leaq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	28(%rsp), %r9d
	movl	%ecx, %r15d
	subl	%r9d, %ecx
	subl	32(%rsp), %r15d
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rdx
	movslq	%r9d, %rax
	leaq	t(%rip), %rdi
	movl	%ecx, 12(%rsp)
	leaq	(%r14,%rax,4), %rsi
	salq	$2, %rdx
	movl	%r9d, 8(%rsp)
	call	memcpy@PLT
	movl	12(%rsp), %ecx
	movl	8(%rsp), %r9d
	leaq	t(%rip), %rsi
	leal	(%rcx,%r15), %edi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, %eax
	addl	$1, %r15d
	addq	$4, %rsi
	cltd
	idivl	%ecx
	movl	-4(%rsi), %eax
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%r15d, %edi
	jne	.L6
.L5:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L7
.L4:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	subl	$1, %eax
	movl	(%r12,%rbx,4), %edx
	movl	$32, %ecx
	cmpl	%ebx, %eax
	jne	.L20
	movl	$10, %ecx
.L20:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%ebx, %eax
	jg	.L11
.L8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 4040
t:
	.zero	4040
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4040
a:
	.zero	4040
	.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%d%d"
.LC2:
	.string	"%d%c"
	.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
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	leaq	a(%rip), %rbp
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	cmpl	%ebx, 20(%rsp)
	jg	.L3
.L2:
	leaq	24(%rsp), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	je	.L4
	leaq	36(%rsp), %r13
	leaq	32(%rsp), %r12
	leaq	28(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	leaq	a(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rcx
	movq	%r12, %rdx
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	36(%rsp), %ecx
	movl	28(%rsp), %r9d
	movl	%ecx, %r15d
	subl	%r9d, %ecx
	subl	32(%rsp), %r15d
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rdx
	movslq	%r9d, %rax
	leaq	t(%rip), %rdi
	movl	%ecx, 12(%rsp)
	leaq	(%r14,%rax,4), %rsi
	salq	$2, %rdx
	movl	%r9d, 8(%rsp)
	call	memcpy@PLT
	movl	12(%rsp), %ecx
	movl	8(%rsp), %r9d
	leaq	t(%rip), %rsi
	leal	(%rcx,%r15), %edi
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, %eax
	addl	$1, %r15d
	addq	$4, %rsi
	cltd
	idivl	%ecx
	movl	-4(%rsi), %eax
	addl	%r9d, %edx
	movslq	%edx, %rdx
	movl	%eax, (%r14,%rdx,4)
	cmpl	%r15d, %edi
	jne	.L6
.L5:
	movl	24(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 24(%rsp)
	testl	%eax, %eax
	jne	.L7
.L4:
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebx, %ebx
	leaq	a(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L11:
	subl	$1, %eax
	movl	(%r12,%rbx,4), %edx
	movl	$32, %ecx
	cmpl	%ebx, %eax
	jne	.L20
	movl	$10, %ecx
.L20:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	movl	20(%rsp), %eax
	cmpl	%ebx, %eax
	jg	.L11
.L8:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %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
	.globl	t
	.bss
	.align 32
	.type	t, @object
	.size	t, 4040
t:
	.zero	4040
	.globl	a
	.align 32
	.type	a, @object
	.size	a, 4040
a:
	.zero	4040
	.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:
```