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()
{
    int p[51];
    int i,j,n;

    while(scanf("%d",&n),n){

        for(i=0;i<51;i++) p[i]=0;

        for(i=0;i<n;i++){
            scanf("%d",&p[i]);
        }   

        for(i=0;i<n;i++){
            if(p[i]+1==p[i+1]){
                for(j=i;p[j]+1==p[j+1];j++);
                printf("%d-%d",p[i],p[j]);
                i=j;
            } else {
                printf("%d",p[i]);
            }   
            if(i!=n-1) printf(" ");
        }   
        puts("");
    }   
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"%d"
.LC2:
	.string	"%d-%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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$25, %ecx
	movq	%rbp, %rdi
	movl	$0, %eax
	movq	%rbp, %r14
	rep stosq
	movl	$0, %r15d
	movl	$0, (%rdi)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r14
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%r15d, %rax
	leal	1(%r15), %r14d
	movl	32(%rsp,%rax,4), %r11d
	movslq	%r14d, %rdx
	leal	1(%r11), %ecx
	cmpl	32(%rsp,%rdx,4), %ecx
	je	.L21
	movl	%r11d, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %r13d
	movl	%r14d, %r15d
.L8:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L9
	movl	$32, %edi
	call	putchar@PLT
	cmpl	28(%rsp), %r14d
	jl	.L11
.L5:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%r14d, %eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	0(%rbp,%rax,4), %rdx
	movl	(%rdx), %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %r14d
.L7:
	leal	1(%rax), %ecx
	movl	%eax, %r8d
	movl	4(%rdx), %eax
	movl	%r15d, %r13d
	addq	$4, %rdx
	movl	%r14d, %r15d
	cmpl	%eax, %ecx
	je	.L22
	movl	%r8d, %ecx
	movl	%r11d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L20:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$264, %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
.L23:
	.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	""
.LC1:
	.string	"%d"
.LC2:
	.string	"%d-%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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$25, %ecx
	movq	%rbp, %rdi
	movl	$0, %eax
	movq	%rbp, %r14
	rep stosq
	movl	$0, %r15d
	movl	$0, (%rdi)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r14
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%r15d, %rax
	leal	1(%r15), %r14d
	movl	32(%rsp,%rax,4), %r11d
	movslq	%r14d, %rdx
	leal	1(%r11), %ecx
	cmpl	32(%rsp,%rdx,4), %ecx
	je	.L21
	movl	%r11d, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %r13d
	movl	%r14d, %r15d
.L8:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L9
	movl	$32, %edi
	call	putchar@PLT
	cmpl	28(%rsp), %r14d
	jl	.L11
.L5:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%r14d, %eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	0(%rbp,%rax,4), %rdx
	movl	(%rdx), %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %r14d
.L7:
	leal	1(%rax), %ecx
	movl	%eax, %r8d
	movl	4(%rdx), %eax
	movl	%r15d, %r13d
	addq	$4, %rdx
	movl	%r14d, %r15d
	cmpl	%eax, %ecx
	je	.L22
	movl	%r8d, %ecx
	movl	%r11d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L20:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$264, %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
.L23:
	.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	""
.LC1:
	.string	"%d"
.LC2:
	.string	"%d-%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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$25, %ecx
	movq	%rbp, %rdi
	movl	$0, %eax
	movq	%rbp, %r14
	rep stosq
	movl	$0, %r15d
	movl	$0, (%rdi)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r14
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%r15d, %rax
	leal	1(%r15), %r14d
	movl	32(%rsp,%rax,4), %r11d
	movslq	%r14d, %rdx
	leal	1(%r11), %ecx
	cmpl	32(%rsp,%rdx,4), %ecx
	je	.L21
	movl	%r11d, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %r13d
	movl	%r14d, %r15d
.L8:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L9
	movl	$32, %edi
	call	putchar@PLT
	cmpl	28(%rsp), %r14d
	jl	.L11
.L5:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%r14d, %eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	0(%rbp,%rax,4), %rdx
	movl	(%rdx), %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %r14d
.L7:
	leal	1(%rax), %ecx
	movl	%eax, %r8d
	movl	4(%rdx), %eax
	movl	%r15d, %r13d
	addq	$4, %rdx
	movl	%r14d, %r15d
	cmpl	%eax, %ecx
	je	.L22
	movl	%r8d, %ecx
	movl	%r11d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L20:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$264, %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
.L23:
	.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()
{
    int p[51];
    int i,j,n;

    while(scanf("%d",&n),n){

        for(i=0;i<51;i++) p[i]=0;

        for(i=0;i<n;i++){
            scanf("%d",&p[i]);
        }   

        for(i=0;i<n;i++){
            if(p[i]+1==p[i+1]){
                for(j=i;p[j]+1==p[j+1];j++);
                printf("%d-%d",p[i],p[j]);
                i=j;
            } else {
                printf("%d",p[i]);
            }   
            if(i!=n-1) printf(" ");
        }   
        puts("");
    }   
    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()
{
    int p[51];
    int i,j,n;

    while(scanf("%d",&n),n){

        for(i=0;i<51;i++) p[i]=0;

        for(i=0;i<n;i++){
            scanf("%d",&p[i]);
        }   

        for(i=0;i<n;i++){
            if(p[i]+1==p[i+1]){
                for(j=i;p[j]+1==p[j+1];j++);
                printf("%d-%d",p[i],p[j]);
                i=j;
            } else {
                printf("%d",p[i]);
            }   
            if(i!=n-1) printf(" ");
        }   
        puts("");
    }   
    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:

5
1 1 3 5 6
3
7 8 9
0
 5
1 1 6 5 6
3
7 8 9
0
 5
1 1 6 4 6
3
7 8 9
0
 5
1 1 6 4 9
3
7 8 9
0
 5
1 1 2 4 9
3
7 8 9
0
 5
1 2 2 4 9
3
7 8 9
0
 5
1 2 2 4 9
3
7 14 9
0
 5
1 2 2 4 9
3
7 14 16
0
 5
1 2 1 4 9
3
7 14 16
0
 5
1 2 1 4 9
3
7 28 16
0

1 1 3 5-6
7-9
 1 1 6 5-6
7-9
 1 1 6 4 6
7-9
 1 1 6 4 9
7-9
 1 1-2 4 9
7-9
 1-2 2 4 9
7-9
 1-2 2 4 9
7 14 9
 1-2 2 4 9
7 14 16
 1-2 1 4 9
7 14 16
 1-2 1 4 9
7 28 16

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()
{
    int p[51];
    int i,j,n;

    while(scanf("%d",&n),n){

        for(i=0;i<51;i++) p[i]=0;

        for(i=0;i<n;i++){
            scanf("%d",&p[i]);
        }   

        for(i=0;i<n;i++){
            if(p[i]+1==p[i+1]){
                for(j=i;p[j]+1==p[j+1];j++);
                printf("%d-%d",p[i],p[j]);
                i=j;
            } else {
                printf("%d",p[i]);
            }   
            if(i!=n-1) printf(" ");
        }   
        puts("");
    }   
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"%d"
.LC2:
	.string	"%d-%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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$25, %ecx
	movq	%rbp, %rdi
	movl	$0, %eax
	movq	%rbp, %r14
	rep stosq
	movl	$0, %r15d
	movl	$0, (%rdi)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r14
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%r15d, %rax
	leal	1(%r15), %r14d
	movl	32(%rsp,%rax,4), %r11d
	movslq	%r14d, %rdx
	leal	1(%r11), %ecx
	cmpl	32(%rsp,%rdx,4), %ecx
	je	.L21
	movl	%r11d, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %r13d
	movl	%r14d, %r15d
.L8:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L9
	movl	$32, %edi
	call	putchar@PLT
	cmpl	28(%rsp), %r14d
	jl	.L11
.L5:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%r14d, %eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	0(%rbp,%rax,4), %rdx
	movl	(%rdx), %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %r14d
.L7:
	leal	1(%rax), %ecx
	movl	%eax, %r8d
	movl	4(%rdx), %eax
	movl	%r15d, %r13d
	addq	$4, %rdx
	movl	%r14d, %r15d
	cmpl	%eax, %ecx
	je	.L22
	movl	%r8d, %ecx
	movl	%r11d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L20:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$264, %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
.L23:
	.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	""
.LC1:
	.string	"%d"
.LC2:
	.string	"%d-%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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC1(%rip), %rbx
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	leaq	32(%rsp), %rbp
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	testl	%eax, %eax
	je	.L20
	movl	$25, %ecx
	movq	%rbp, %rdi
	movl	$0, %eax
	movq	%rbp, %r14
	rep stosq
	movl	$0, %r15d
	movl	$0, (%rdi)
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %eax
	addq	$4, %r14
	cmpl	%r15d, %eax
	jg	.L4
	testl	%eax, %eax
	jle	.L5
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L11:
	movslq	%r15d, %rax
	leal	1(%r15), %r14d
	movl	32(%rsp,%rax,4), %r11d
	movslq	%r14d, %rdx
	leal	1(%r11), %ecx
	cmpl	32(%rsp,%rdx,4), %ecx
	je	.L21
	movl	%r11d, %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %r13d
	movl	%r14d, %r15d
.L8:
	movl	28(%rsp), %eax
	leal	-1(%rax), %edx
	cmpl	%r13d, %edx
	je	.L9
	movl	$32, %edi
	call	putchar@PLT
	cmpl	28(%rsp), %r14d
	jl	.L11
.L5:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%r14d, %eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	0(%rbp,%rax,4), %rdx
	movl	(%rdx), %eax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	addl	$1, %r14d
.L7:
	leal	1(%rax), %ecx
	movl	%eax, %r8d
	movl	4(%rdx), %eax
	movl	%r15d, %r13d
	addq	$4, %rdx
	movl	%r14d, %r15d
	cmpl	%eax, %ecx
	je	.L22
	movl	%r8d, %ecx
	movl	%r11d, %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L8
.L20:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L23
	addq	$264, %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
.L23:
	.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:
```