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

```c
// AOJ 1380 Medical Checkup
// 2018.2.6 bal4u

#include <stdio.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int main()
{
	int n, t, h, p;
	long long a, b;

	n = in(), t = in();
	b = 0, p = 0;
	while (n--) {
		h = in();
		if (p < h) p = h;
		a = (t-b)/p + ((t-b)%p >= h);
		if (a < 0) a = 0;
		printf("%lld\n", a+1);
		b += h;
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB23:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	testl	%ebp, %ebp
	je	.L24
	movslq	%eax, %r13
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L26
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L15:
	xorl	%r15d, %r15d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L18
.L17:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L19:
	leal	(%r15,%r15,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r15d
	cmpq	%rcx, %rdx
	jb	.L16
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L18
	movq	stdin(%rip), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %ebx
	movq	%r13, %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cmovl	%r15d, %ebx
	subq	%r12, %rax
	movslq	%r15d, %r15
	cqto
	movslq	%ebx, %rcx
	idivq	%rcx
	cmpq	%r15, %rdx
	setge	%dl
	movzbl	%dl, %edx
	addq	%rdx, %rax
	movl	$0, %edx
	cmovs	%rdx, %rax
	addq	%r15, %r12
	leaq	1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %ebp
	jne	.L20
.L24:
	addq	$8, %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
.L26:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L15
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB23:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	testl	%ebp, %ebp
	je	.L24
	movslq	%eax, %r13
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L26
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L15:
	xorl	%r15d, %r15d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L18
.L17:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L19:
	leal	(%r15,%r15,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r15d
	cmpq	%rcx, %rdx
	jb	.L16
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L18
	movq	stdin(%rip), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %ebx
	movq	%r13, %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cmovl	%r15d, %ebx
	subq	%r12, %rax
	movslq	%r15d, %r15
	cqto
	movslq	%ebx, %rcx
	idivq	%rcx
	cmpq	%r15, %rdx
	setge	%dl
	movzbl	%dl, %edx
	addq	%rdx, %rax
	movl	$0, %edx
	cmovs	%rdx, %rax
	addq	%r15, %r12
	leaq	1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %ebp
	jne	.L20
.L24:
	addq	$8, %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
.L26:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L15
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB23:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	testl	%ebp, %ebp
	je	.L24
	movslq	%eax, %r13
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L26
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L15:
	xorl	%r15d, %r15d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L18
.L17:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L19:
	leal	(%r15,%r15,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r15d
	cmpq	%rcx, %rdx
	jb	.L16
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L18
	movq	stdin(%rip), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %ebx
	movq	%r13, %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cmovl	%r15d, %ebx
	subq	%r12, %rax
	movslq	%r15d, %r15
	cqto
	movslq	%ebx, %rcx
	idivq	%rcx
	cmpq	%r15, %rdx
	setge	%dl
	movzbl	%dl, %edx
	addq	%rdx, %rax
	movl	$0, %edx
	cmovs	%rdx, %rax
	addq	%r15, %r12
	leaq	1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %ebp
	jne	.L20
.L24:
	addq	$8, %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
.L26:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L15
	.cfi_endproc
.LFE24:
	.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
// AOJ 1380 Medical Checkup
// 2018.2.6 bal4u

#include <stdio.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int main()
{
	int n, t, h, p;
	long long a, b;

	n = in(), t = in();
	b = 0, p = 0;
	while (n--) {
		h = in();
		if (p < h) p = h;
		a = (t-b)/p + ((t-b)%p >= h);
		if (a < 0) a = 0;
		printf("%lld\n", a+1);
		b += h;
	}
	return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// AOJ 1380 Medical Checkup
// 2018.2.6 bal4u

#include <stdio.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int main()
{
	int n, t, h, p;
	long long a, b;

	n = in(), t = in();
	b = 0, p = 0;
	while (n--) {
		h = in();
		if (p < h) p = h;
		a = (t-b)/p + ((t-b)%p >= h);
		if (a < 0) a = 0;
		printf("%lld\n", a+1);
		b += h;
	}
	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 20
5
11
3
 3 20
5
11
6
 3 20
1
11
6
 3 20
1
3
6
 3 20
1
3
3
 3 25
1
3
3
 3 35
1
3
3
 3 35
1
3
4
 3 55
1
3
4
 3 55
1
3
0

5
2
2
 5
2
1
 21
2
2
 21
7
3
 21
7
6
 26
9
8
 36
12
11
 36
12
8
 56
19
13
 56
19
19

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

```c
// AOJ 1380 Medical Checkup
// 2018.2.6 bal4u

#include <stdio.h>

//#define getchar_unlocked()  getchar()
int in()
{
	int n = 0;
	int c = getchar_unlocked();
	do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked();
	while (c >= '0');
	return n;
}

int main()
{
	int n, t, h, p;
	long long a, b;

	n = in(), t = in();
	b = 0, p = 0;
	while (n--) {
		h = in();
		if (p < h) p = h;
		a = (t-b)/p + ((t-b)%p >= h);
		if (a < 0) a = 0;
		printf("%lld\n", a+1);
		b += h;
	}
	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB23:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	testl	%ebp, %ebp
	je	.L24
	movslq	%eax, %r13
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L26
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L15:
	xorl	%r15d, %r15d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L18
.L17:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L19:
	leal	(%r15,%r15,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r15d
	cmpq	%rcx, %rdx
	jb	.L16
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L18
	movq	stdin(%rip), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %ebx
	movq	%r13, %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cmovl	%r15d, %ebx
	subq	%r12, %rax
	movslq	%r15d, %r15
	cqto
	movslq	%ebx, %rcx
	idivq	%rcx
	cmpq	%r15, %rdx
	setge	%dl
	movzbl	%dl, %edx
	addq	%rdx, %rax
	movl	$0, %edx
	cmovs	%rdx, %rax
	addq	%r15, %r12
	leaq	1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %ebp
	jne	.L20
.L24:
	addq	$8, %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
.L26:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L15
	.cfi_endproc
.LFE24:
	.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
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB23:
	.cfi_startproc
	endbr64
	movq	stdin(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L11
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L3:
	xorl	%r12d, %r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L5:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L7:
	leal	(%r12,%r12,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r12d
	cmpq	%rcx, %rdx
	jb	.L4
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L1:
	movl	%r12d, %eax
	popq	%r12
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L3
	.cfi_endproc
.LFE23:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	call	in
	movl	%eax, %ebp
	xorl	%eax, %eax
	call	in
	testl	%ebp, %ebp
	je	.L24
	movslq	%eax, %r13
	xorl	%r12d, %r12d
	leaq	.LC0(%rip), %r14
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L20:
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	cmpq	%rcx, %rax
	jnb	.L26
	leaq	1(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
.L15:
	xorl	%r15d, %r15d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L18
.L17:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
.L19:
	leal	(%r15,%r15,4), %esi
	andl	$15, %eax
	leal	(%rax,%rsi,2), %r15d
	cmpq	%rcx, %rdx
	jb	.L16
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L18
	movq	stdin(%rip), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %ebx
	movq	%r13, %rax
	movq	%r14, %rsi
	movl	$1, %edi
	cmovl	%r15d, %ebx
	subq	%r12, %rax
	movslq	%r15d, %r15
	cqto
	movslq	%ebx, %rcx
	idivq	%rcx
	cmpq	%r15, %rdx
	setge	%dl
	movzbl	%dl, %edx
	addq	%rdx, %rax
	movl	$0, %edx
	cmovs	%rdx, %rax
	addq	%r15, %r12
	leaq	1(%rax), %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	subl	$1, %ebp
	jne	.L20
.L24:
	addq	$8, %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
.L26:
	.cfi_restore_state
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rcx
	jmp	.L15
	.cfi_endproc
.LFE24:
	.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:
```