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>
#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;
}```

Assembly Code:

```assembly
	.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:
```

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"
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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"
	.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:
```