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

```c
// AOJ 2799: Yamanote-line Game
// 2017.11.29 bal4u@uu

#include <stdio.h>

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

int main()
{
	int n, d, v, ans;

    fgets(bp=buf, 20, stdin);
	n = getint(), bp++, d = getint();
	fgets(bp=buf, sizeof(buf), stdin);
	ans = 0;
	while (n--) {
		v = getint() - d, bp++;
		if (v > 0) ans += v;
	}
	if (!ans) puts("kusoge");
	else printf("%d\n", ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	getint
	.type	getint, @function
getint:
.LFB23:
	.cfi_startproc
	endbr64
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, bp(%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	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	getint, .-getint
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kusoge"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %r12
	movl	$20, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	leaq	1(%rax), %rdx
	jle	.L8
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, bp(%rip)
	movzbl	-1(%rdx), %ecx
	movq	%rdx, %rax
	addq	$1, %rdx
	leal	0(%rbp,%rbp,4), %esi
	andl	$15, %ecx
	cmpb	$47, -1(%rdx)
	leal	(%rcx,%rsi,2), %ebp
	jg	.L9
	movq	%rdx, bp(%rip)
	cmpb	$47, 1(%rax)
	jle	.L23
.L21:
	addq	$2, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rax, bp(%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	.L11
.L10:
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rsi
	leal	-1(%rbp), %edi
	xorl	%r8d, %r8d
	testl	%ebp, %ebp
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	cmpb	$47, (%rsi)
	leaq	1(%rsi), %rax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, bp(%rip)
	leal	(%rdx,%rdx,4), %ecx
	movzbl	-1(%rax), %edx
	movq	%rax, %rsi
	addq	$1, %rax
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %edx
	jg	.L15
.L19:
	subl	%ebx, %edx
	addq	$1, %rsi
	leal	(%r8,%rdx), %eax
	testl	%edx, %edx
	movq	%rsi, bp(%rip)
	cmovg	%eax, %r8d
	subl	$1, %edi
	jnb	.L14
	testl	%r8d, %r8d
	je	.L20
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L33:
	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
.L8:
	.cfi_restore_state
	movq	%rdx, bp(%rip)
	xorl	%ebp, %ebp
	cmpb	$47, 1(%rax)
	jg	.L21
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
.L20:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L33
.L23:
	xorl	%ebx, %ebx
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	bp
	.bss
	.align 8
	.type	bp, @object
	.size	bp, 8
bp:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 5003
buf:
	.zero	5003
	.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	getint
	.type	getint, @function
getint:
.LFB23:
	.cfi_startproc
	endbr64
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, bp(%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	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	getint, .-getint
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kusoge"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %r12
	movl	$20, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	leaq	1(%rax), %rdx
	jle	.L8
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, bp(%rip)
	movzbl	-1(%rdx), %ecx
	movq	%rdx, %rax
	addq	$1, %rdx
	leal	0(%rbp,%rbp,4), %esi
	andl	$15, %ecx
	cmpb	$47, -1(%rdx)
	leal	(%rcx,%rsi,2), %ebp
	jg	.L9
	movq	%rdx, bp(%rip)
	cmpb	$47, 1(%rax)
	jle	.L23
.L21:
	addq	$2, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rax, bp(%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	.L11
.L10:
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rsi
	leal	-1(%rbp), %edi
	xorl	%r8d, %r8d
	testl	%ebp, %ebp
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	cmpb	$47, (%rsi)
	leaq	1(%rsi), %rax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, bp(%rip)
	leal	(%rdx,%rdx,4), %ecx
	movzbl	-1(%rax), %edx
	movq	%rax, %rsi
	addq	$1, %rax
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %edx
	jg	.L15
.L19:
	subl	%ebx, %edx
	addq	$1, %rsi
	leal	(%r8,%rdx), %eax
	testl	%edx, %edx
	movq	%rsi, bp(%rip)
	cmovg	%eax, %r8d
	subl	$1, %edi
	jnb	.L14
	testl	%r8d, %r8d
	je	.L20
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L33:
	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
.L8:
	.cfi_restore_state
	movq	%rdx, bp(%rip)
	xorl	%ebp, %ebp
	cmpb	$47, 1(%rax)
	jg	.L21
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
.L20:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L33
.L23:
	xorl	%ebx, %ebx
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	bp
	.bss
	.align 8
	.type	bp, @object
	.size	bp, 8
bp:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 5003
buf:
	.zero	5003
	.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	getint
	.type	getint, @function
getint:
.LFB23:
	.cfi_startproc
	endbr64
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, bp(%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	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	getint, .-getint
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kusoge"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %r12
	movl	$20, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	leaq	1(%rax), %rdx
	jle	.L8
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, bp(%rip)
	movzbl	-1(%rdx), %ecx
	movq	%rdx, %rax
	addq	$1, %rdx
	leal	0(%rbp,%rbp,4), %esi
	andl	$15, %ecx
	cmpb	$47, -1(%rdx)
	leal	(%rcx,%rsi,2), %ebp
	jg	.L9
	movq	%rdx, bp(%rip)
	cmpb	$47, 1(%rax)
	jle	.L23
.L21:
	addq	$2, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rax, bp(%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	.L11
.L10:
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rsi
	leal	-1(%rbp), %edi
	xorl	%r8d, %r8d
	testl	%ebp, %ebp
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	cmpb	$47, (%rsi)
	leaq	1(%rsi), %rax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, bp(%rip)
	leal	(%rdx,%rdx,4), %ecx
	movzbl	-1(%rax), %edx
	movq	%rax, %rsi
	addq	$1, %rax
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %edx
	jg	.L15
.L19:
	subl	%ebx, %edx
	addq	$1, %rsi
	leal	(%r8,%rdx), %eax
	testl	%edx, %edx
	movq	%rsi, bp(%rip)
	cmovg	%eax, %r8d
	subl	$1, %edi
	jnb	.L14
	testl	%r8d, %r8d
	je	.L20
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L33:
	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
.L8:
	.cfi_restore_state
	movq	%rdx, bp(%rip)
	xorl	%ebp, %ebp
	cmpb	$47, 1(%rax)
	jg	.L21
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
.L20:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L33
.L23:
	xorl	%ebx, %ebx
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	bp
	.bss
	.align 8
	.type	bp, @object
	.size	bp, 8
bp:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 5003
buf:
	.zero	5003
	.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 2799: Yamanote-line Game
// 2017.11.29 bal4u@uu

#include <stdio.h>

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

int main()
{
	int n, d, v, ans;

    fgets(bp=buf, 20, stdin);
	n = getint(), bp++, d = getint();
	fgets(bp=buf, sizeof(buf), stdin);
	ans = 0;
	while (n--) {
		v = getint() - d, bp++;
		if (v > 0) ans += v;
	}
	if (!ans) puts("kusoge");
	else 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 2799: Yamanote-line Game
// 2017.11.29 bal4u@uu

#include <stdio.h>

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

int main()
{
	int n, d, v, ans;

    fgets(bp=buf, 20, stdin);
	n = getint(), bp++, d = getint();
	fgets(bp=buf, sizeof(buf), stdin);
	ans = 0;
	while (n--) {
		v = getint() - d, bp++;
		if (v > 0) ans += v;
	}
	if (!ans) puts("kusoge");
	else 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:

5 130
130 170 100 122 140
 3 130
130 170 100 122 140
 1 130
130 170 100 122 86
 1 58
60 60 010 102 86
 1 58
68 60 010 102 166
 6 130
130 170 100 120 140
 5 130
130 170 100 138 140
 1 48
68 5 100 72 104
 1 53
68 4 100 72 104
 6 130
130 170 100 171 140

50
 40
 kusoge
 2
 10
 50
 58
 20
 15
 91

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

```c
// AOJ 2799: Yamanote-line Game
// 2017.11.29 bal4u@uu

#include <stdio.h>

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

int main()
{
	int n, d, v, ans;

    fgets(bp=buf, 20, stdin);
	n = getint(), bp++, d = getint();
	fgets(bp=buf, sizeof(buf), stdin);
	ans = 0;
	while (n--) {
		v = getint() - d, bp++;
		if (v > 0) ans += v;
	}
	if (!ans) puts("kusoge");
	else printf("%d\n", ans);
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	getint
	.type	getint, @function
getint:
.LFB23:
	.cfi_startproc
	endbr64
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, bp(%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	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	getint, .-getint
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kusoge"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %r12
	movl	$20, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	leaq	1(%rax), %rdx
	jle	.L8
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, bp(%rip)
	movzbl	-1(%rdx), %ecx
	movq	%rdx, %rax
	addq	$1, %rdx
	leal	0(%rbp,%rbp,4), %esi
	andl	$15, %ecx
	cmpb	$47, -1(%rdx)
	leal	(%rcx,%rsi,2), %ebp
	jg	.L9
	movq	%rdx, bp(%rip)
	cmpb	$47, 1(%rax)
	jle	.L23
.L21:
	addq	$2, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rax, bp(%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	.L11
.L10:
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rsi
	leal	-1(%rbp), %edi
	xorl	%r8d, %r8d
	testl	%ebp, %ebp
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	cmpb	$47, (%rsi)
	leaq	1(%rsi), %rax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, bp(%rip)
	leal	(%rdx,%rdx,4), %ecx
	movzbl	-1(%rax), %edx
	movq	%rax, %rsi
	addq	$1, %rax
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %edx
	jg	.L15
.L19:
	subl	%ebx, %edx
	addq	$1, %rsi
	leal	(%r8,%rdx), %eax
	testl	%edx, %edx
	movq	%rsi, bp(%rip)
	cmovg	%eax, %r8d
	subl	$1, %edi
	jnb	.L14
	testl	%r8d, %r8d
	je	.L20
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L33:
	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
.L8:
	.cfi_restore_state
	movq	%rdx, bp(%rip)
	xorl	%ebp, %ebp
	cmpb	$47, 1(%rax)
	jg	.L21
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
.L20:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L33
.L23:
	xorl	%ebx, %ebx
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	bp
	.bss
	.align 8
	.type	bp, @object
	.size	bp, 8
bp:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 5003
buf:
	.zero	5003
	.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	getint
	.type	getint, @function
getint:
.LFB23:
	.cfi_startproc
	endbr64
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	jle	.L4
	addq	$1, %rax
	xorl	%r8d, %r8d
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rax, bp(%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	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	getint, .-getint
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kusoge"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	stdin(%rip), %rdx
	leaq	buf(%rip), %r12
	movl	$20, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rax
	cmpb	$47, (%rax)
	leaq	1(%rax), %rdx
	jle	.L8
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rdx, bp(%rip)
	movzbl	-1(%rdx), %ecx
	movq	%rdx, %rax
	addq	$1, %rdx
	leal	0(%rbp,%rbp,4), %esi
	andl	$15, %ecx
	cmpb	$47, -1(%rdx)
	leal	(%rcx,%rsi,2), %ebp
	jg	.L9
	movq	%rdx, bp(%rip)
	cmpb	$47, 1(%rax)
	jle	.L23
.L21:
	addq	$2, %rax
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%rax, bp(%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	.L11
.L10:
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
	movq	bp(%rip), %rsi
	leal	-1(%rbp), %edi
	xorl	%r8d, %r8d
	testl	%ebp, %ebp
	je	.L20
	.p2align 4,,10
	.p2align 3
.L14:
	xorl	%edx, %edx
	cmpb	$47, (%rsi)
	leaq	1(%rsi), %rax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%rax, bp(%rip)
	leal	(%rdx,%rdx,4), %ecx
	movzbl	-1(%rax), %edx
	movq	%rax, %rsi
	addq	$1, %rax
	andl	$15, %edx
	cmpb	$47, -1(%rax)
	leal	(%rdx,%rcx,2), %edx
	jg	.L15
.L19:
	subl	%ebx, %edx
	addq	$1, %rsi
	leal	(%r8,%rdx), %eax
	testl	%edx, %edx
	movq	%rsi, bp(%rip)
	cmovg	%eax, %r8d
	subl	$1, %edi
	jnb	.L14
	testl	%r8d, %r8d
	je	.L20
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L33:
	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
.L8:
	.cfi_restore_state
	movq	%rdx, bp(%rip)
	xorl	%ebp, %ebp
	cmpb	$47, 1(%rax)
	jg	.L21
	movq	stdin(%rip), %rdx
	movl	$5003, %esi
	movq	%r12, %rdi
	movq	%r12, bp(%rip)
	call	fgets@PLT
.L20:
	leaq	.LC0(%rip), %rdi
	call	puts@PLT
	jmp	.L33
.L23:
	xorl	%ebx, %ebx
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	bp
	.bss
	.align 8
	.type	bp, @object
	.size	bp, 8
bp:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 5003
buf:
	.zero	5003
	.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:
```