Given the following C code and 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;
}```

Assembly Code:

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

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

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:

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

Assembly Code:

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

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