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>
#include <stdlib.h>
int num(){
    char s[11];
    int i, n;
    for(i=0; i<sizeof(s); i++){
        s[i] = getchar();
        if(s[i] == ' ' || s[i] == '\n'){
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}
int main(void){
    int n, m;
    int town[50] = {0};
    int i;
    
    n = num();
    m = num();
    for(i=0; i<m*2; i++){
        town[num()-1]++;
    }
    
    for(i=0; i<n; i++){
        printf("%d\n", town[i]);
    }
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	num
	.type	num, @function
num:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L4
.L3:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L5
.L4:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L6
.L5:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	num, .-num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, %eax
	call	num
	movl	%eax, -216(%rbp)
	movl	$0, %eax
	call	num
	movl	%eax, -212(%rbp)
	movl	$0, -220(%rbp)
	jmp	.L10
.L11:
	movl	$0, %eax
	call	num
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-208(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -208(%rbp,%rax,4)
	addl	$1, -220(%rbp)
.L10:
	movl	-212(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -220(%rbp)
	jl	.L11
	movl	$0, -220(%rbp)
	jmp	.L12
.L13:
	movl	-220(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -220(%rbp)
.L12:
	movl	-220(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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"
	.text
	.p2align 4
	.globl	num
	.type	num, @function
num:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	stdin(%rip), %rdi
	movslq	%ebx, %r12
	call	getc@PLT
	movb	%al, 0(%rbp,%rbx)
	cmpb	$32, %al
	je	.L7
	cmpb	$10, %al
	je	.L7
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L5
.L4:
	leaq	8(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	8(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movb	$0, 13(%rsp,%r12)
	jmp	.L4
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	num, .-num
	.section	.rodata.str1.1
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$25, %ecx
	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
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	rep stosq
	call	num
	movl	%eax, 4(%rsp)
	xorl	%eax, %eax
	call	num
	addl	%eax, %eax
	movl	%eax, (%rsp)
	testl	%eax, %eax
	jle	.L14
	xorl	%r12d, %r12d
	leaq	237(%rsp), %rbp
	leaq	28(%rsp), %r15
	leaq	.LC0(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L18:
	movq	stdin(%rip), %rdi
	movslq	%r13d, %rbx
	call	getc@PLT
	movb	%al, 0(%rbp,%r13)
	cmpb	$32, %al
	je	.L23
	cmpb	$10, %al
	je	.L23
	addq	$1, %r13
	cmpq	$11, %r13
	jne	.L18
.L17:
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r12d
	subl	$1, %eax
	cltq
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r12d, (%rsp)
	jne	.L13
.L14:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L19
	subl	$1, %eax
	movq	8(%rsp), %rbx
	leaq	.LC1(%rip), %rbp
	leaq	36(%rsp,%rax,4), %r12
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L20
.L19:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movb	$0, 237(%rsp,%rbx)
	jmp	.L17
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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"
	.text
	.p2align 4
	.globl	num
	.type	num, @function
num:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
	subq	$32, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	13(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L5:
	movq	stdin(%rip), %rdi
	movslq	%ebx, %r12
	call	getc@PLT
	movb	%al, 0(%rbp,%rbx)
	cmpb	$32, %al
	je	.L7
	cmpb	$10, %al
	je	.L7
	addq	$1, %rbx
	cmpq	$11, %rbx
	jne	.L5
.L4:
	leaq	8(%rsp), %rdx
	leaq	.LC0(%rip), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	8(%rsp), %eax
	movq	24(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L11
	addq	$32, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movb	$0, 13(%rsp,%r12)
	jmp	.L4
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	num, .-num
	.section	.rodata.str1.1
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$25, %ecx
	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
	subq	$264, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 248(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	rep stosq
	call	num
	movl	%eax, 4(%rsp)
	xorl	%eax, %eax
	call	num
	addl	%eax, %eax
	movl	%eax, (%rsp)
	testl	%eax, %eax
	jle	.L14
	xorl	%r12d, %r12d
	leaq	237(%rsp), %rbp
	leaq	28(%rsp), %r15
	leaq	.LC0(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L13:
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L18:
	movq	stdin(%rip), %rdi
	movslq	%r13d, %rbx
	call	getc@PLT
	movb	%al, 0(%rbp,%r13)
	cmpb	$32, %al
	je	.L23
	cmpb	$10, %al
	je	.L23
	addq	$1, %r13
	cmpq	$11, %r13
	jne	.L18
.L17:
	movq	%r15, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_sscanf@PLT
	movl	28(%rsp), %eax
	addl	$1, %r12d
	subl	$1, %eax
	cltq
	addl	$1, 32(%rsp,%rax,4)
	cmpl	%r12d, (%rsp)
	jne	.L13
.L14:
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L19
	subl	$1, %eax
	movq	8(%rsp), %rbx
	leaq	.LC1(%rip), %rbp
	leaq	36(%rsp,%rax,4), %r12
	.p2align 4,,10
	.p2align 3
.L20:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	cmpq	%r12, %rbx
	jne	.L20
.L19:
	movq	248(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	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
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	movb	$0, 237(%rsp,%rbx)
	jmp	.L17
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.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>
#include <stdlib.h>
int num(){
    char s[11];
    int i, n;
    for(i=0; i<sizeof(s); i++){
        s[i] = getchar();
        if(s[i] == ' ' || s[i] == '\n'){
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}
int main(void){
    int n, m;
    int town[50] = {0};
    int i;
    
    n = num();
    m = num();
    for(i=0; i<m*2; i++){
        town[num()-1]++;
    }
    
    for(i=0; i<n; i++){
        printf("%d\n", town[i]);
    }
    
    return 0;
}
3 5
1 2
2 1
1 2
2 1
1 2
 3 5
1 2
2 1
1 2
1 1
1 2
 8 7
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8
 8 7
1 3
3 4
1 5
2 8
3 7
5 2
4 1
6 8
 2 5
1 2
2 1
1 2
2 2
1 2
 8 7
1 3
3 4
1 5
2 8
3 7
5 2
5 1
6 8
 4 3
1 2
4 3
1 4
 8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 2
6 8
 3 5
1 2
2 1
1 3
2 1
1 2
 5 5
1 2
2 1
1 2
1 1
1 2

5
5
0
 6
4
0
 3
3
2
2
2
0
1
1
 3
2
3
2
2
0
1
1
 4
6
 3
2
3
1
3
0
1
1
 2
1
1
2
 2
4
2
2
2
1
1
2
 5
4
1
 6
4
0
0
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>
#include <stdlib.h>
int num(){
    char s[11];
    int i, n;
    for(i=0; i<sizeof(s); i++){
        s[i] = getchar();
        if(s[i] == ' ' || s[i] == '\n'){
            s[i] = '\0';
            break;
        }
    }
    sscanf(s, "%d", &n);
    return n;
}
int main(void){
    int n, m;
    int town[50] = {0};
    int i;
    
    n = num();
    m = num();
    for(i=0; i<m*2; i++){
        town[num()-1]++;
    }
    
    for(i=0; i<n; i++){
        printf("%d\n", town[i]);
    }
    
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	num
	.type	num, @function
num:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L4
.L3:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L5
.L4:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L6
.L5:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	num, .-num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, %eax
	call	num
	movl	%eax, -216(%rbp)
	movl	$0, %eax
	call	num
	movl	%eax, -212(%rbp)
	movl	$0, -220(%rbp)
	jmp	.L10
.L11:
	movl	$0, %eax
	call	num
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-208(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -208(%rbp,%rax,4)
	addl	$1, -220(%rbp)
.L10:
	movl	-212(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -220(%rbp)
	jl	.L11
	movl	$0, -220(%rbp)
	jmp	.L12
.L13:
	movl	-220(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -220(%rbp)
.L12:
	movl	-220(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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"
	.text
	.globl	num
	.type	num, @function
num:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	jmp	.L2
.L6:
	call	getchar@PLT
	movl	%eax, %edx
	movl	-24(%rbp), %eax
	cltq
	movb	%dl, -19(%rbp,%rax)
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$32, %al
	je	.L3
	movl	-24(%rbp), %eax
	cltq
	movzbl	-19(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L4
.L3:
	movl	-24(%rbp), %eax
	cltq
	movb	$0, -19(%rbp,%rax)
	jmp	.L5
.L4:
	addl	$1, -24(%rbp)
.L2:
	movl	-24(%rbp), %eax
	cmpl	$10, %eax
	jbe	.L6
.L5:
	leaq	-28(%rbp), %rdx
	leaq	-19(%rbp), %rax
	leaq	.LC0(%rip), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_sscanf@PLT
	movl	-28(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	num, .-num
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-208(%rbp), %rdx
	movl	$0, %eax
	movl	$25, %ecx
	movq	%rdx, %rdi
	rep stosq
	movl	$0, %eax
	call	num
	movl	%eax, -216(%rbp)
	movl	$0, %eax
	call	num
	movl	%eax, -212(%rbp)
	movl	$0, -220(%rbp)
	jmp	.L10
.L11:
	movl	$0, %eax
	call	num
	subl	$1, %eax
	movslq	%eax, %rdx
	movl	-208(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -208(%rbp,%rax,4)
	addl	$1, -220(%rbp)
.L10:
	movl	-212(%rbp), %eax
	addl	%eax, %eax
	cmpl	%eax, -220(%rbp)
	jl	.L11
	movl	$0, -220(%rbp)
	jmp	.L12
.L13:
	movl	-220(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -220(%rbp)
.L12:
	movl	-220(%rbp), %eax
	cmpl	-216(%rbp), %eax
	jl	.L13
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
