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

```c
#pragma GCC optimize("Ofast")
#include<stdio.h>
int main(void)
{
    int n = 0, a = 0, b;
    int d[200000];
    char c=getchar_unlocked();
    while(c<='9'&&c>='0') {n=(n<<1)+(n<<3)+c-'0'; c=getchar_unlocked();}
    int* e = d + n;
    do
    {
        d[n] = 0;
        c=getchar_unlocked();
        while(c<='9'&&c>='0') {d[n]=(d[n]<<1)+(d[n]<<3)+c-'0'; c=getchar_unlocked();}
        a ^= d[n];
    } while(--n);
    while(d != e)
    {
        printf("%d ", a ^ *e);
        --e;
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1304, %rsp
	.cfi_def_cfa_offset 800080
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800008(%rsp)
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%r12,%r12,4), %eax
	leal	-48(%rdx,%rax,2), %r12d
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L3
.L2:
	movslq	%r12d, %rax
	movq	%rsp, %r14
	salq	$2, %rax
	leaq	(%r14,%rax), %rbp
	leaq	-4(%rsp,%rax), %r13
	leal	-1(%r12), %eax
	movq	%rbp, %rbx
	xorl	%r12d, %r12d
	salq	$2, %rax
	subq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$0, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L4
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r15,%r15,4), %eax
	leal	-48(%rdx,%rax,2), %r15d
	movl	%r15d, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L5
	xorl	%r15d, %r12d
.L4:
	subq	$4, %rbx
	cmpq	%rbx, %r13
	jne	.L6
	leaq	.LC0(%rip), %rbx
	cmpq	%r14, %rbp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	subq	$4, %rbp
	xorl	%r12d, %esi
	call	printf@PLT
	cmpq	%r14, %rbp
	jne	.L7
.L8:
	movq	800008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$800024, %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
.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 "
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1304, %rsp
	.cfi_def_cfa_offset 800080
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	movq	%fs:40, %rax
	movq	%rax, 800008(%rsp)
	xorl	%eax, %eax
	cmpq	%rsi, %rdx
	jnb	.L29
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %ecx
	movl	%ecx, %edx
.L3:
	subl	$48, %edx
	cmpb	$9, %dl
	ja	.L20
	xorl	%ebp, %ebp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %ecx
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L4
.L6:
	movq	%rdx, %rax
.L7:
	leal	0(%rbp,%rbp,4), %edx
	movsbl	%cl, %ecx
	leal	-48(%rcx,%rdx,2), %ebp
	cmpq	%rsi, %rax
	jb	.L5
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ecx
	subl	$48, %eax
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	cmpb	$9, %al
	jbe	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%ebp, %rax
	movq	%rsp, %r13
	salq	$2, %rax
	leaq	0(%r13,%rax), %rbx
	leaq	-4(%rsp,%rax), %r12
	leal	-1(%rbp), %eax
	movq	%rbx, %r15
	xorl	%ebp, %ebp
	salq	$2, %rax
	movl	$0, (%r15)
	subq	%rax, %r12
	cmpq	%rsi, %rdx
	jnb	.L30
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %edx
	movl	%edx, %eax
.L9:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L10
	xorl	%r14d, %r14d
.L27:
	movq	stdin(%rip), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L13
.L14:
	leal	(%r14,%r14,4), %eax
	movsbl	%dl, %edx
	leal	-48(%rdx,%rax,2), %r14d
	movq	8(%rdi), %rax
	movl	%r14d, (%r15)
	cmpq	16(%rdi), %rax
	jb	.L11
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L27
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r14d, %ebp
.L10:
	subq	$4, %r15
	cmpq	%r15, %r12
	je	.L15
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	movl	$0, (%r15)
	cmpq	%rsi, %rdx
	jb	.L8
.L30:
	call	__uflow@PLT
	movl	%eax, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	.LC0(%rip), %r12
	cmpq	%r13, %rbx
	je	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	xorl	%ebp, %edx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L17
.L18:
	movq	800008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$800024, %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
	movq	%rax, %rdx
	xorl	%ebp, %ebp
	jmp	.L4
.L29:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ecx
	movl	%eax, %edx
	movq	16(%rdi), %rsi
	movq	8(%rdi), %rax
	jmp	.L3
.L31:
	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 "
	.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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1304, %rsp
	.cfi_def_cfa_offset 800080
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	movq	%fs:40, %rax
	movq	%rax, 800008(%rsp)
	xorl	%eax, %eax
	cmpq	%rsi, %rdx
	jnb	.L29
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %ecx
	movl	%ecx, %edx
.L3:
	subl	$48, %edx
	cmpb	$9, %dl
	ja	.L20
	xorl	%ebp, %ebp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %ecx
	leal	-48(%rcx), %eax
	cmpb	$9, %al
	ja	.L4
.L6:
	movq	%rdx, %rax
.L7:
	leal	0(%rbp,%rbp,4), %edx
	movsbl	%cl, %ecx
	leal	-48(%rcx,%rdx,2), %ebp
	cmpq	%rsi, %rax
	jb	.L5
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ecx
	subl	$48, %eax
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	cmpb	$9, %al
	jbe	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	movslq	%ebp, %rax
	movq	%rsp, %r13
	salq	$2, %rax
	leaq	0(%r13,%rax), %rbx
	leaq	-4(%rsp,%rax), %r12
	leal	-1(%rbp), %eax
	movq	%rbx, %r15
	xorl	%ebp, %ebp
	salq	$2, %rax
	movl	$0, (%r15)
	subq	%rax, %r12
	cmpq	%rsi, %rdx
	jnb	.L30
	.p2align 4,,10
	.p2align 3
.L8:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %edx
	movl	%edx, %eax
.L9:
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L10
	xorl	%r14d, %r14d
.L27:
	movq	stdin(%rip), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %edx
	leal	-48(%rdx), %eax
	cmpb	$9, %al
	ja	.L13
.L14:
	leal	(%r14,%r14,4), %eax
	movsbl	%dl, %edx
	leal	-48(%rdx,%rax,2), %r14d
	movq	8(%rdi), %rax
	movl	%r14d, (%r15)
	cmpq	16(%rdi), %rax
	jb	.L11
	call	__uflow@PLT
	movl	%eax, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L27
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r14d, %ebp
.L10:
	subq	$4, %r15
	cmpq	%r15, %r12
	je	.L15
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	movl	$0, (%r15)
	cmpq	%rsi, %rdx
	jb	.L8
.L30:
	call	__uflow@PLT
	movl	%eax, %edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	.LC0(%rip), %r12
	cmpq	%r13, %rbx
	je	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subq	$4, %rbx
	xorl	%ebp, %edx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L17
.L18:
	movq	800008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$800024, %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
	movq	%rax, %rdx
	xorl	%ebp, %ebp
	jmp	.L4
.L29:
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movl	%eax, %ecx
	movl	%eax, %edx
	movq	16(%rdi), %rsi
	movq	8(%rdi), %rax
	jmp	.L3
.L31:
	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:

#pragma GCC optimize("Ofast")
#include<stdio.h>
int main(void)
{
    int n = 0, a = 0, b;
    int d[200000];
    char c=getchar_unlocked();
    while(c<='9'&&c>='0') {n=(n<<1)+(n<<3)+c-'0'; c=getchar_unlocked();}
    int* e = d + n;
    do
    {
        d[n] = 0;
        c=getchar_unlocked();
        while(c<='9'&&c>='0') {d[n]=(d[n]<<1)+(d[n]<<3)+c-'0'; c=getchar_unlocked();}
        a ^= d[n];
    } while(--n);
    while(d != e)
    {
        printf("%d ", a ^ *e);
        --e;
    }
    return 0;
}

4
5 11 9 24
 4
5 11 10 24
 4
0 11 10 24
 4
1 11 10 24
 4
1 11 10 29
 4
1 11 0 29
 4
1 11 0 49
 4
1 2 0 49
 4
2 2 0 49
 4
2 0 0 49

26 20 22 7  25 23 22 4  25 18 19 1  25 19 18 0  28 22 23 0  22 28 23 10  58 48 59 10  51 48 50 3  51 51 49 0  49 51 51 2 
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#pragma GCC optimize("Ofast")
#include<stdio.h>
int main(void)
{
    int n = 0, a = 0, b;
    int d[200000];
    char c=getchar_unlocked();
    while(c<='9'&&c>='0') {n=(n<<1)+(n<<3)+c-'0'; c=getchar_unlocked();}
    int* e = d + n;
    do
    {
        d[n] = 0;
        c=getchar_unlocked();
        while(c<='9'&&c>='0') {d[n]=(d[n]<<1)+(d[n]<<3)+c-'0'; c=getchar_unlocked();}
        a ^= d[n];
    } while(--n);
    while(d != e)
    {
        printf("%d ", a ^ *e);
        --e;
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1304, %rsp
	.cfi_def_cfa_offset 800080
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800008(%rsp)
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%r12,%r12,4), %eax
	leal	-48(%rdx,%rax,2), %r12d
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L3
.L2:
	movslq	%r12d, %rax
	movq	%rsp, %r14
	salq	$2, %rax
	leaq	(%r14,%rax), %rbp
	leaq	-4(%rsp,%rax), %r13
	leal	-1(%r12), %eax
	movq	%rbp, %rbx
	xorl	%r12d, %r12d
	salq	$2, %rax
	subq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$0, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L4
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r15,%r15,4), %eax
	leal	-48(%rdx,%rax,2), %r15d
	movl	%r15d, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L5
	xorl	%r15d, %r12d
.L4:
	subq	$4, %rbx
	cmpq	%rbx, %r13
	jne	.L6
	leaq	.LC0(%rip), %rbx
	cmpq	%r14, %rbp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	subq	$4, %rbp
	xorl	%r12d, %esi
	call	printf@PLT
	cmpq	%r14, %rbp
	jne	.L7
.L8:
	movq	800008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$800024, %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
.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.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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
	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	-798720(%rsp), %r11
	.cfi_def_cfa 11, 798776
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1304, %rsp
	.cfi_def_cfa_offset 800080
	xorl	%r12d, %r12d
	movq	%fs:40, %rax
	movq	%rax, 800008(%rsp)
	xorl	%eax, %eax
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%r12,%r12,4), %eax
	leal	-48(%rdx,%rax,2), %r12d
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L3
.L2:
	movslq	%r12d, %rax
	movq	%rsp, %r14
	salq	$2, %rax
	leaq	(%r14,%rax), %rbp
	leaq	-4(%rsp,%rax), %r13
	leal	-1(%r12), %eax
	movq	%rbp, %rbx
	xorl	%r12d, %r12d
	salq	$2, %rax
	subq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$0, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	ja	.L4
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L5:
	leal	(%r15,%r15,4), %eax
	leal	-48(%rdx,%rax,2), %r15d
	movl	%r15d, (%rbx)
	call	getchar_unlocked@PLT
	movsbl	%al, %edx
	subl	$48, %eax
	cmpb	$9, %al
	jbe	.L5
	xorl	%r15d, %r12d
.L4:
	subq	$4, %rbx
	cmpq	%rbx, %r13
	jne	.L6
	leaq	.LC0(%rip), %rbx
	cmpq	%r14, %rbp
	je	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movl	0(%rbp), %esi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	subq	$4, %rbp
	xorl	%r12d, %esi
	call	printf@PLT
	cmpq	%r14, %rbp
	jne	.L7
.L8:
	movq	800008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$800024, %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
.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:
