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

```c
// AOJ 0590: Available Areas
// 2017.10.1 bal4u@uu
// 2017.11.14

#include <stdio.h>

int check(int s)
{
	int x, u, v, w;

	for (u = 3, w = v = 4, x = -1; v <= s; x--, u += 2, w += 4, v += w) {
//printf("s %d, x %d, u %d, v %d\n", s, -x, u, v);
		if ((s + x) % u == 0) return 0;
	}
	return 1;
}

char buf[15], *p;
int getint()
{
	int n = 0;
	while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf);
	return n;
}

int main()
{
	int n, ans;

	fgets(p=buf, 15, stdin), n = getint();
	ans = 0; 
	while (n --) {
		fgets(p=buf, 15, stdin);
		if (check(getint())) ans++;
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$3, -12(%rbp)
	movl	$4, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$-1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	subl	$1, -16(%rbp)
	addl	$2, -12(%rbp)
	addl	$4, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L5
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.globl	buf
	.bss
	.align 8
	.type	buf, @object
	.size	buf, 15
buf:
	.zero	15
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getint
	.type	getint, @function
getint:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	$15, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getint, .-getint
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L11
	addl	$1, -4(%rbp)
.L11:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -8(%rbp)
	testl	%eax, %eax
	jne	.L12
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	check
	.type	check, @function
check:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$3, %edi
	jle	.L5
	leal	-1(%rdi), %edx
	movl	$2863311531, %ecx
	movq	%rdx, %rax
	imulq	%rcx, %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	je	.L1
	leal	-2(%rdi), %esi
	movl	$4, %r9d
	movl	$4, %r8d
	movl	$3, %ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	$1, %esi
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L3:
	addl	$4, %r9d
	addl	$2, %ecx
	addl	%r9d, %r8d
	cmpl	%r8d, %edi
	jge	.L4
.L5:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	check, .-check
	.p2align 4
	.globl	getint
	.type	getint, @function
getint:
.LFB24:
	.cfi_startproc
	endbr64
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L16
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%r8,%r8,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %r8d
	jg	.L15
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.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:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	fgets@PLT
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L19
	addq	$1, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%rbx,%rbx,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %ebx
	jg	.L20
	testl	%ebx, %ebx
	je	.L19
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L29:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	fgets@PLT
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L23
	addq	$1, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%rcx,%rcx,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %ecx
	jg	.L24
	cmpl	$3, %ecx
	jle	.L23
	leal	-1(%rcx), %eax
	imull	$-1431655765, %eax, %eax
	cmpl	$1431655765, %eax
	jbe	.L26
	leal	-2(%rcx), %edi
	movl	$4, %r9d
	movl	$4, %r8d
	movl	$3, %esi
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	movl	%edi, %eax
	subl	$1, %edi
	cltd
	idivl	%esi
	testl	%edx, %edx
	je	.L26
.L27:
	addl	$4, %r8d
	addl	$2, %esi
	addl	%r8d, %r9d
	cmpl	%ecx, %r9d
	jle	.L28
.L23:
	addl	$1, %r12d
.L26:
	subl	$1, %ebx
	jne	.L29
.L22:
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L22
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 8
	.type	buf, @object
	.size	buf, 15
buf:
	.zero	15
	.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	check
	.type	check, @function
check:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$3, %edi
	jle	.L5
	leal	-1(%rdi), %edx
	movl	$2863311531, %ecx
	movq	%rdx, %rax
	imulq	%rcx, %rdx
	shrq	$33, %rdx
	leal	(%rdx,%rdx,2), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	je	.L1
	leal	-2(%rdi), %esi
	movl	$4, %r9d
	movl	$4, %r8d
	movl	$3, %ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%esi, %eax
	subl	$1, %esi
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	.L1
.L3:
	addl	$4, %r9d
	addl	$2, %ecx
	addl	%r9d, %r8d
	cmpl	%r8d, %edi
	jge	.L4
.L5:
	movl	$1, %edx
.L1:
	movl	%edx, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	check, .-check
	.p2align 4
	.globl	getint
	.type	getint, @function
getint:
.LFB24:
	.cfi_startproc
	endbr64
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L16
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%r8,%r8,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %r8d
	jg	.L15
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE24:
	.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:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	buf(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	fgets@PLT
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L19
	addq	$1, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%rbx,%rbx,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %ebx
	jg	.L20
	testl	%ebx, %ebx
	je	.L19
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L29:
	movq	stdin(%rip), %rdx
	movl	$15, %esi
	movq	%rbp, %rdi
	movq	%rbp, p(%rip)
	call	fgets@PLT
	movq	p(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L23
	addq	$1, %rax
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rax, p(%rip)
	movzbl	-1(%rax), %edx
	addq	$1, %rax
	leal	(%rcx,%rcx,4), %ecx
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %ecx
	jg	.L24
	cmpl	$3, %ecx
	jle	.L23
	leal	-1(%rcx), %eax
	imull	$-1431655765, %eax, %eax
	cmpl	$1431655765, %eax
	jbe	.L26
	leal	-2(%rcx), %edi
	movl	$4, %r9d
	movl	$4, %r8d
	movl	$3, %esi
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L28:
	movl	%edi, %eax
	subl	$1, %edi
	cltd
	idivl	%esi
	testl	%edx, %edx
	je	.L26
.L27:
	addl	$4, %r8d
	addl	$2, %esi
	addl	%r8d, %r9d
	cmpl	%ecx, %r9d
	jle	.L28
.L23:
	addl	$1, %r12d
.L26:
	subl	$1, %ebx
	jne	.L29
.L22:
	movl	%r12d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L22
	.cfi_endproc
.LFE25:
	.size	main, .-main
	.globl	p
	.bss
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 8
	.type	buf, @object
	.size	buf, 15
buf:
	.zero	15
	.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:

// AOJ 0590: Available Areas
// 2017.10.1 bal4u@uu
// 2017.11.14

#include <stdio.h>

int check(int s)
{
	int x, u, v, w;

	for (u = 3, w = v = 4, x = -1; v <= s; x--, u += 2, w += 4, v += w) {
//printf("s %d, x %d, u %d, v %d\n", s, -x, u, v);
		if ((s + x) % u == 0) return 0;
	}
	return 1;
}

char buf[15], *p;
int getint()
{
	int n = 0;
	while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf);
	return n;
}

int main()
{
	int n, ans;

	fgets(p=buf, 15, stdin), n = getint();
	ans = 0; 
	while (n --) {
		fgets(p=buf, 15, stdin);
		if (check(getint())) ans++;
	}
	printf("%d\n", ans);
	return 0;
}
enoN
 10
4
7
9
10
12
13
20
17
19
20
 10
8
7
8
10
12
13
20
17
19
20
 10
8
0
8
10
12
13
20
17
19
20
 10
8
0
18
10
0
13
20
17
19
2
 10
8
0
18
10
0
13
3
3
19
3
 10
2
0
18
13
0
5
5
5
4
3
 emoN
 10
4
7
8
10
12
13
20
17
19
20
 fmoN

0
 3
 4
 5
 6
 7
 8
 0
 3
 7464

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

```c
// AOJ 0590: Available Areas
// 2017.10.1 bal4u@uu
// 2017.11.14

#include <stdio.h>

int check(int s)
{
	int x, u, v, w;

	for (u = 3, w = v = 4, x = -1; v <= s; x--, u += 2, w += 4, v += w) {
//printf("s %d, x %d, u %d, v %d\n", s, -x, u, v);
		if ((s + x) % u == 0) return 0;
	}
	return 1;
}

char buf[15], *p;
int getint()
{
	int n = 0;
	while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf);
	return n;
}

int main()
{
	int n, ans;

	fgets(p=buf, 15, stdin), n = getint();
	ans = 0; 
	while (n --) {
		fgets(p=buf, 15, stdin);
		if (check(getint())) ans++;
	}
	printf("%d\n", ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$3, -12(%rbp)
	movl	$4, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$-1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	subl	$1, -16(%rbp)
	addl	$2, -12(%rbp)
	addl	$4, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L5
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.globl	buf
	.bss
	.align 8
	.type	buf, @object
	.size	buf, 15
buf:
	.zero	15
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getint
	.type	getint, @function
getint:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	$15, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getint, .-getint
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L11
	addl	$1, -4(%rbp)
.L11:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -8(%rbp)
	testl	%eax, %eax
	jne	.L12
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	$3, -12(%rbp)
	movl	$4, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	$-1, -16(%rbp)
	jmp	.L2
.L5:
	movl	-20(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-12(%rbp)
	movl	%edx, %eax
	testl	%eax, %eax
	jne	.L3
	movl	$0, %eax
	jmp	.L4
.L3:
	subl	$1, -16(%rbp)
	addl	$2, -12(%rbp)
	addl	$4, -4(%rbp)
	movl	-4(%rbp), %eax
	addl	%eax, -8(%rbp)
.L2:
	movl	-8(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jle	.L5
	movl	$1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.globl	buf
	.bss
	.align 8
	.type	buf, @object
	.size	buf, 15
buf:
	.zero	15
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.text
	.globl	getint
	.type	getint, @function
getint:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -4(%rbp)
	jmp	.L7
.L8:
	movl	-4(%rbp), %eax
	leal	0(,%rax,8), %edx
	movl	-4(%rbp), %eax
	addl	%eax, %eax
	leal	(%rdx,%rax), %ecx
	movq	p(%rip), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, p(%rip)
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	andl	$15, %eax
	addl	%ecx, %eax
	movl	%eax, -4(%rbp)
.L7:
	movq	p(%rip), %rax
	movzbl	(%rax), %eax
	cmpb	$47, %al
	jg	.L8
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getint, .-getint
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.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
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %rax
	movq	%rax, p(%rip)
	movq	p(%rip), %rax
	movl	$15, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, %eax
	call	getint
	movl	%eax, %edi
	call	check
	testl	%eax, %eax
	je	.L11
	addl	$1, -4(%rbp)
.L11:
	movl	-8(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -8(%rbp)
	testl	%eax, %eax
	jne	.L12
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
