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

```c
// Aizu Vol-1 0184: Tsuruga Castle
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	register int n = 0;
	//	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int cnt[15];

int main()
{
	int i, n, k;

	while (1) {
		gets(p = buf);
		if (!(n = getInt())) break;
		memset(cnt, 0, sizeof(cnt));
		i = n;
		while (i--) {
			gets(p = buf);
			k = *p++ - '0';
			if (*p >= '0') {
				if (*++p < '0') cnt[k]++;
			} else cnt[0]++;
		}
		for (i = k = 0; i < 6; i++) printf("%d\n", cnt[i]), k += cnt[i];
		printf("%d\n", n - k);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	$0, %ebx
	jmp	.L2
.L3:
	movl	%ebx, %eax
	sall	$2, %eax
	addl	%ebx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	leal	(%rcx,%rax), %ebx
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L3
	movl	%ebx, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	cnt
	.bss
	.align 32
	.type	cnt, @object
	.size	cnt, 60
cnt:
	.zero	60
	.section	.rodata
.LC0:
	.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	$16, %rsp
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L16
	movl	$60, %edx
	movl	$0, %esi
	leaq	cnt(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L9
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L8
.L9:
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L8:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L10
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L11:
	cmpl	$5, -12(%rbp)
	jle	.L12
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	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
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB53:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	testb	$8, 1(%rdi,%rdx,2)
	je	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %esi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rsi,2), %r8d
	testb	$8, 1(%rdi,%rdx,2)
	jne	.L3
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	cnt(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__ctype_b_loc@PLT
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	movq	8(%rsp), %rax
	movq	(%rax), %rdi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	testb	$8, 1(%rdi,%rdx,2)
	je	.L9
	addq	$1, %rax
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r14,%r14,4), %esi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rsi,2), %r14d
	testb	$8, 1(%rdi,%rdx,2)
	jne	.L10
	testl	%r14d, %r14d
	je	.L9
	pxor	%xmm0, %xmm0
	movl	%r14d, %ebx
	movq	$0, 48+cnt(%rip)
	movl	$0, 56+cnt(%rip)
	movaps	%xmm0, cnt(%rip)
	movaps	%xmm0, 16+cnt(%rip)
	movaps	%xmm0, 32+cnt(%rip)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	2(%rax), %rsi
	movq	%rsi, p(%rip)
	cmpb	$47, 2(%rax)
	jg	.L12
	subl	$48, %edx
	movslq	%edx, %rdx
	addl	$1, (%r12,%rdx,4)
.L12:
	subl	$1, %ebx
	je	.L26
.L13:
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	cmpb	$47, 1(%rax)
	movsbl	(%rax), %edx
	jg	.L27
	addl	$1, (%r12)
	subl	$1, %ebx
	jne	.L13
.L26:
	leaq	cnt(%rip), %rbx
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%rbx), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	leaq	24+cnt(%rip), %rax
	addl	-4(%rbx), %r15d
	cmpq	%rax, %rbx
	jne	.L14
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subl	%r15d, %edx
	call	__printf_chk@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	cnt
	.bss
	.align 32
	.type	cnt, @object
	.size	cnt, 60
cnt:
	.zero	60
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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
	.p2align 4
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB53:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	testb	$8, 1(%rdi,%rdx,2)
	je	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r8,%r8,4), %esi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rsi,2), %r8d
	testb	$8, 1(%rdi,%rdx,2)
	jne	.L3
	movl	%r8d, %eax
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	xorl	%r8d, %r8d
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	getInt, .-getInt
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB54:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	cnt(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__ctype_b_loc@PLT
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	movq	8(%rsp), %rax
	movq	(%rax), %rdi
	movq	p(%rip), %rax
	movsbq	(%rax), %rdx
	testb	$8, 1(%rdi,%rdx,2)
	je	.L9
	addq	$1, %rax
	xorl	%r14d, %r14d
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%rax, %rdx
	movq	%rax, p(%rip)
	movsbl	-1(%rax), %ecx
	leal	(%r14,%r14,4), %esi
	movsbq	(%rdx), %rdx
	addq	$1, %rax
	leal	-48(%rcx,%rsi,2), %r14d
	testb	$8, 1(%rdi,%rdx,2)
	jne	.L10
	testl	%r14d, %r14d
	je	.L9
	pxor	%xmm0, %xmm0
	movl	%r14d, %ebx
	movq	$0, 48+cnt(%rip)
	movl	$0, 56+cnt(%rip)
	movaps	%xmm0, cnt(%rip)
	movaps	%xmm0, 16+cnt(%rip)
	movaps	%xmm0, 32+cnt(%rip)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L27:
	leaq	2(%rax), %rsi
	movq	%rsi, p(%rip)
	cmpb	$47, 2(%rax)
	jg	.L12
	subl	$48, %edx
	movslq	%edx, %rdx
	addl	$1, (%r12,%rdx,4)
.L12:
	subl	$1, %ebx
	je	.L26
.L13:
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	gets@PLT
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	cmpb	$47, 1(%rax)
	movsbl	(%rax), %edx
	jg	.L27
	addl	$1, (%r12)
	subl	$1, %ebx
	jne	.L13
.L26:
	leaq	cnt(%rip), %rbx
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L14:
	movl	(%rbx), %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__printf_chk@PLT
	leaq	24+cnt(%rip), %rax
	addl	-4(%rbx), %r15d
	cmpq	%rax, %rbx
	jne	.L14
	movl	%r14d, %edx
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	subl	%r15d, %edx
	call	__printf_chk@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE54:
	.size	main, .-main
	.globl	cnt
	.bss
	.align 32
	.type	cnt, @object
	.size	cnt, 60
cnt:
	.zero	60
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.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:

// Aizu Vol-1 0184: Tsuruga Castle
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	register int n = 0;
	//	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int cnt[15];

int main()
{
	int i, n, k;

	while (1) {
		gets(p = buf);
		if (!(n = getInt())) break;
		memset(cnt, 0, sizeof(cnt));
		i = n;
		while (i--) {
			gets(p = buf);
			k = *p++ - '0';
			if (*p >= '0') {
				if (*++p < '0') cnt[k]++;
			} else cnt[0]++;
		}
		for (i = k = 0; i < 6; i++) printf("%d\n", cnt[i]), k += cnt[i];
		printf("%d\n", n - k);
	}
	return 0;
}
8
71
34
65
11
41
39
3
5
4
67
81
78
65
0
 8
71
34
65
11
12
39
6
5
4
67
81
78
65
0
 8
71
34
65
0
41
39
3
5
4
67
81
78
65
0
 8
71
34
65
11
12
39
6
5
4
16
81
78
65
0
 8
71
34
65
0
41
39
3
5
4
67
81
78
21
0
 8
71
34
65
11
1
39
6
5
4
16
81
78
65
0
 8
71
67
65
0
41
39
3
5
4
67
81
78
21
0
 8
71
34
65
11
37
39
6
5
4
67
81
78
65
0
 8
71
34
65
0
41
39
3
5
4
67
13
78
21
0
 8
71
67
65
0
41
7
3
5
4
67
81
78
21
0

2
1
0
2
1
0
2
0
0
0
0
0
0
4
 2
2
0
2
0
0
2
0
0
0
0
0
0
4
 3
0
0
2
1
0
2
0
0
0
0
0
0
4
 2
2
0
2
0
0
2
0
1
0
0
0
0
3
 3
0
0
2
1
0
2
0
0
1
0
0
0
3
 3
1
0
2
0
0
2
0
1
0
0
0
0
3
 3
0
0
1
1
0
3
0
0
1
0
0
0
3
 2
1
0
3
0
0
2
0
0
0
0
0
0
4
 3
0
0
2
1
0
2
0
1
1
0
0
0
2
 4
0
0
0
1
0
3
0
0
1
0
0
0
3

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

```c
// Aizu Vol-1 0184: Tsuruga Castle
// 2017.8.2

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

char *gets(char *);
char buf[100], *p;

int getInt(void)
{
	register int n = 0;
	//	while (isspace(*p)) p++;
	while (isdigit(*p)) n = 10 * n + (*p++ - '0');
	return n;
}

int cnt[15];

int main()
{
	int i, n, k;

	while (1) {
		gets(p = buf);
		if (!(n = getInt())) break;
		memset(cnt, 0, sizeof(cnt));
		i = n;
		while (i--) {
			gets(p = buf);
			k = *p++ - '0';
			if (*p >= '0') {
				if (*++p < '0') cnt[k]++;
			} else cnt[0]++;
		}
		for (i = k = 0; i < 6; i++) printf("%d\n", cnt[i]), k += cnt[i];
		printf("%d\n", n - k);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	$0, %ebx
	jmp	.L2
.L3:
	movl	%ebx, %eax
	sall	$2, %eax
	addl	%ebx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	leal	(%rcx,%rax), %ebx
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L3
	movl	%ebx, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	cnt
	.bss
	.align 32
	.type	cnt, @object
	.size	cnt, 60
cnt:
	.zero	60
	.section	.rodata
.LC0:
	.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	$16, %rsp
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L16
	movl	$60, %edx
	movl	$0, %esi
	leaq	cnt(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L9
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L8
.L9:
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L8:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L10
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L11:
	cmpl	$5, -12(%rbp)
	jle	.L12
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	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
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 100
buf:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getInt
	.type	getInt, @function
getInt:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$8, %rsp
	.cfi_offset 3, -24
	movl	$0, %ebx
	jmp	.L2
.L3:
	movl	%ebx, %eax
	sall	$2, %eax
	addl	%ebx, %eax
	addl	%eax, %eax
	movl	%eax, %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	leal	(%rcx,%rax), %ebx
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	movsbq	%al, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$2048, %eax
	testl	%eax, %eax
	jne	.L3
	movl	%ebx, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	getInt, .-getInt
	.globl	cnt
	.bss
	.align 32
	.type	cnt, @object
	.size	cnt, 60
cnt:
	.zero	60
	.section	.rodata
.LC0:
	.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	$16, %rsp
.L13:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	call	getInt
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	je	.L16
	movl	$60, %edx
	movl	$0, %esi
	leaq	cnt(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-4(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L8
.L10:
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movq	%rax, %rdi
	call	gets@PLT
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$48, %eax
	movl	%eax, -8(%rbp)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jle	.L9
	movq	p(%rip), %rax
	addq	$1, %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L8
.L9:
	movl	cnt(%rip), %eax
	addl	$1, %eax
	movl	%eax, cnt(%rip)
.L8:
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -12(%rbp)
	testl	%eax, %eax
	jne	.L10
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -12(%rbp)
	jmp	.L11
.L12:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	cnt(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	%eax, -8(%rbp)
	addl	$1, -12(%rbp)
.L11:
	cmpl	$5, -12(%rbp)
	jle	.L12
	movl	-4(%rbp), %eax
	subl	-8(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L13
.L16:
	nop
	movl	$0, %eax
	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:
