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

```c
// ABC 147-D
// 2019.12.23 bal4u

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

typedef long long ll;

#define gc() getchar_unlocked()

ll in() {   // 非負整数の入力
	ll n = 0; int c;
	do c = gc();
	while (isspace(c));
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

#define M 1000000007
int N;
int f[64];

int main()
{
	int i, n;
	ll A, ans, b;
	
	N = (int)in();
	n = N; while (n--) {
		A = in();
		for (i = 0; A; A >>= 1, ++i) {
			if (A & 1) ++f[i];
		}
	}
	ans = 0, i = 61, b = 1LL << i;
	for ( ; i >= 0; b >>= 1, --i) if (f[i]) {
		ans = (ans + b % M * ((ll)f[i]*(N-f[i]) % M)) % M;
	}
	printf("%d\n", (int)ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB0:
	.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	$0, -8(%rbp)
.L2:
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L2
.L3:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	andl	$15, %eax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	cmpl	$47, -12(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 256
f:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L10:
	movl	$0, %eax
	call	in
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	sarq	-24(%rbp)
	addl	$1, -32(%rbp)
.L7:
	cmpq	$0, -24(%rbp)
	jne	.L9
.L6:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L10
	movq	$0, -16(%rbp)
	movl	$61, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	salq	%cl, %rdx
	movq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L11
.L13:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	N(%rip), %eax
	movl	-32(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rdi
	leaq	f(%rip), %rcx
	movl	(%rdi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rdx
	movq	-16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L12:
	sarq	-8(%rbp)
	subl	$1, -32(%rbp)
.L11:
	cmpl	$0, -32(%rbp)
	jns	.L13
	movq	-16(%rbp), %rax
	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
.LFE1:
	.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	in
	.type	in, @function
in:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	call	__ctype_b_loc@PLT
	movq	stdin(%rip), %rdi
	movq	%rax, %r12
	movq	16(%rdi), %rsi
	movq	8(%rdi), %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	1(%rax), %rdx
	movq	(%r12), %r8
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
	testb	$32, 1(%r8,%rax,2)
	je	.L4
.L3:
	movq	%rdx, %rax
.L5:
	cmpq	%rsi, %rax
	jb	.L2
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	(%r12), %rcx
	movslq	%eax, %r8
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	testb	$32, 1(%rcx,%r8,2)
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r12d, %r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L7:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
.L9:
	leaq	(%r12,%r12,4), %rcx
	andl	$15, %eax
	leaq	(%rax,%rcx,2), %r12
	cmpq	%rsi, %rdx
	jb	.L6
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L1:
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	f(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	in
	movl	%eax, N(%rip)
	testl	%eax, %eax
	je	.L17
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	call	in
	testq	%rax, %rax
	je	.L18
	leaq	f(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	testb	$1, %al
	je	.L19
	addl	$1, (%rdx)
.L19:
	addq	$4, %rdx
	sarq	%rax
	jne	.L20
.L18:
	subl	$1, %ebp
	jne	.L21
.L17:
	movl	N(%rip), %r9d
	leaq	244+f(%rip), %rdi
	xorl	%ecx, %ecx
	movabsq	$2305843009213693952, %rsi
	movabsq	$-8543223828751151131, %r8
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rax, %rdi
.L23:
	movslq	(%rdi), %rax
	testl	%eax, %eax
	je	.L22
	movl	%r9d, %r10d
	subl	%eax, %r10d
	movslq	%r10d, %r10
	imulq	%rax, %r10
	movq	%r10, %rax
	imulq	%r8
	movq	%r10, %rax
	sarq	$63, %rax
	addq	%r10, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r10
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rax
	imulq	%rax, %r10
	addq	%rcx, %r10
	movq	%r10, %rax
	imulq	%r8
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r10), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%r10, %rcx
	subq	%rax, %rcx
.L22:
	sarq	%rsi
	leaq	-4(%rdi), %rax
	cmpq	%rdi, %rbx
	jne	.L24
	movl	%ecx, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	f
	.bss
	.align 32
	.type	f, @object
	.size	f, 256
f:
	.zero	256
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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	in
	.type	in, @function
in:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	call	__ctype_b_loc@PLT
	movq	stdin(%rip), %rdi
	movq	%rax, %r12
	movq	16(%rdi), %rsi
	movq	8(%rdi), %rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	1(%rax), %rdx
	movq	(%r12), %r8
	movq	%rdx, 8(%rdi)
	movzbl	(%rax), %eax
	testb	$32, 1(%r8,%rax,2)
	je	.L4
.L3:
	movq	%rdx, %rax
.L5:
	cmpq	%rsi, %rax
	jb	.L2
	call	__uflow@PLT
	movq	stdin(%rip), %rdi
	movq	(%r12), %rcx
	movslq	%eax, %r8
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
	testb	$32, 1(%rcx,%r8,2)
	jne	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r12d, %r12d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	leaq	1(%rdx), %rax
	movq	%rax, 8(%rdi)
	movzbl	(%rdx), %eax
	cmpl	$47, %eax
	jle	.L1
.L7:
	movq	8(%rdi), %rdx
	movq	16(%rdi), %rsi
.L9:
	leaq	(%r12,%r12,4), %rcx
	andl	$15, %eax
	leaq	(%rax,%rcx,2), %r12
	cmpq	%rsi, %rdx
	jb	.L6
	call	__uflow@PLT
	cmpl	$47, %eax
	jle	.L1
	movq	stdin(%rip), %rdi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L1:
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	in, .-in
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB26:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	f(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	call	in
	movl	%eax, N(%rip)
	testl	%eax, %eax
	je	.L17
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L21:
	xorl	%eax, %eax
	call	in
	testq	%rax, %rax
	je	.L18
	leaq	f(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L20:
	testb	$1, %al
	je	.L19
	addl	$1, (%rdx)
.L19:
	addq	$4, %rdx
	sarq	%rax
	jne	.L20
.L18:
	subl	$1, %ebp
	jne	.L21
.L17:
	movl	N(%rip), %r9d
	leaq	244+f(%rip), %rdi
	xorl	%ecx, %ecx
	movabsq	$2305843009213693952, %rsi
	movabsq	$-8543223828751151131, %r8
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	movq	%rax, %rdi
.L23:
	movslq	(%rdi), %rax
	testl	%eax, %eax
	je	.L22
	movl	%r9d, %r10d
	subl	%eax, %r10d
	movslq	%r10d, %r10
	imulq	%rax, %r10
	movq	%r10, %rax
	imulq	%r8
	movq	%r10, %rax
	sarq	$63, %rax
	addq	%r10, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %r10
	imulq	%r8
	movq	%rsi, %rax
	sarq	$63, %rax
	addq	%rsi, %rdx
	sarq	$29, %rdx
	subq	%rax, %rdx
	movq	%rsi, %rax
	imulq	$1000000007, %rdx, %rdx
	subq	%rdx, %rax
	imulq	%rax, %r10
	addq	%rcx, %r10
	movq	%r10, %rax
	imulq	%r8
	movq	%r10, %rax
	sarq	$63, %rax
	leaq	(%rdx,%r10), %rcx
	sarq	$29, %rcx
	subq	%rax, %rcx
	imulq	$1000000007, %rcx, %rax
	movq	%r10, %rcx
	subq	%rax, %rcx
.L22:
	sarq	%rsi
	leaq	-4(%rdi), %rax
	cmpq	%rdi, %rbx
	jne	.L24
	movl	%ecx, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE26:
	.size	main, .-main
	.globl	f
	.bss
	.align 32
	.type	f, @object
	.size	f, 256
f:
	.zero	256
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.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:

// ABC 147-D
// 2019.12.23 bal4u

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

typedef long long ll;

#define gc() getchar_unlocked()

ll in() {   // 非負整数の入力
	ll n = 0; int c;
	do c = gc();
	while (isspace(c));
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

#define M 1000000007
int N;
int f[64];

int main()
{
	int i, n;
	ll A, ans, b;
	
	N = (int)in();
	n = N; while (n--) {
		A = in();
		for (i = 0; A; A >>= 1, ++i) {
			if (A & 1) ++f[i];
		}
	}
	ans = 0, i = 61, b = 1LL << i;
	for ( ; i >= 0; b >>= 1, --i) if (f[i]) {
		ans = (ans + b % M * ((ll)f[i]*(N-f[i]) % M)) % M;
	}
	printf("%d\n", (int)ans);
	return 0;
}

3
1 2 1
 10
1 14 159 2653 58979 323846 2643383 27950288 419716939 9375105820
 10
3 1 4 1 5 9 2 6 5 6
 3
1 4 1
 10
1 14 159 2653 58979 376446 2643383 27950288 419716939 9375105820
 10
3 1 4 1 5 9 2 6 5 2
 10
1 14 159 2653 58979 376446 2643383 33596518 419716939 9375105820
 10
3 1 4 1 6 9 2 6 5 2
 10
1 3 159 2653 58979 376446 2643383 33596518 419716939 9375105820
 10
1 3 159 2653 58979 376446 2643383 40072772 419716939 9375105820

6
 103715608
 244
 10
 104328928
 240
 144630974
 243
 144630991
 190239349

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

```c
// ABC 147-D
// 2019.12.23 bal4u

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

typedef long long ll;

#define gc() getchar_unlocked()

ll in() {   // 非負整数の入力
	ll n = 0; int c;
	do c = gc();
	while (isspace(c));
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

#define M 1000000007
int N;
int f[64];

int main()
{
	int i, n;
	ll A, ans, b;
	
	N = (int)in();
	n = N; while (n--) {
		A = in();
		for (i = 0; A; A >>= 1, ++i) {
			if (A & 1) ++f[i];
		}
	}
	ans = 0, i = 61, b = 1LL << i;
	for ( ; i >= 0; b >>= 1, --i) if (f[i]) {
		ans = (ans + b % M * ((ll)f[i]*(N-f[i]) % M)) % M;
	}
	printf("%d\n", (int)ans);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	in
	.type	in, @function
in:
.LFB0:
	.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	$0, -8(%rbp)
.L2:
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L2
.L3:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	andl	$15, %eax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	cmpl	$47, -12(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 256
f:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L10:
	movl	$0, %eax
	call	in
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	sarq	-24(%rbp)
	addl	$1, -32(%rbp)
.L7:
	cmpq	$0, -24(%rbp)
	jne	.L9
.L6:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L10
	movq	$0, -16(%rbp)
	movl	$61, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	salq	%cl, %rdx
	movq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L11
.L13:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	N(%rip), %eax
	movl	-32(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rdi
	leaq	f(%rip), %rcx
	movl	(%rdi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rdx
	movq	-16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L12:
	sarq	-8(%rbp)
	subl	$1, -32(%rbp)
.L11:
	cmpl	$0, -32(%rbp)
	jns	.L13
	movq	-16(%rbp), %rax
	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
.LFE1:
	.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	in
	.type	in, @function
in:
.LFB0:
	.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	$0, -8(%rbp)
.L2:
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movl	-12(%rbp), %eax
	cltq
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$8192, %eax
	testl	%eax, %eax
	jne	.L2
.L3:
	movq	-8(%rbp), %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	movq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	andl	$15, %eax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	call	getchar_unlocked@PLT
	movl	%eax, -12(%rbp)
	cmpl	$47, -12(%rbp)
	jg	.L3
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	in, .-in
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	f
	.align 32
	.type	f, @object
	.size	f, 256
f:
	.zero	256
	.section	.rodata
.LC0:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	$0, %eax
	call	in
	movl	%eax, N(%rip)
	movl	N(%rip), %eax
	movl	%eax, -28(%rbp)
	jmp	.L6
.L10:
	movl	$0, %eax
	call	in
	movq	%rax, -24(%rbp)
	movl	$0, -32(%rbp)
	jmp	.L7
.L9:
	movq	-24(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	%ecx, (%rdx,%rax)
.L8:
	sarq	-24(%rbp)
	addl	$1, -32(%rbp)
.L7:
	cmpq	$0, -24(%rbp)
	jne	.L9
.L6:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -28(%rbp)
	testl	%eax, %eax
	jne	.L10
	movq	$0, -16(%rbp)
	movl	$61, -32(%rbp)
	movl	-32(%rbp), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	salq	%cl, %rdx
	movq	%rdx, %rax
	movq	%rax, -8(%rbp)
	jmp	.L11
.L13:
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L12
	movq	-8(%rbp), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, %rsi
	imulq	$1000000007, %rsi, %rax
	movq	%rcx, %rsi
	subq	%rax, %rsi
	movl	-32(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	f(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	N(%rip), %eax
	movl	-32(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rdi
	leaq	f(%rip), %rcx
	movl	(%rdi,%rcx), %ecx
	subl	%ecx, %eax
	cltq
	movq	%rdx, %rcx
	imulq	%rax, %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	imulq	%rax, %rsi
	movq	%rsi, %rdx
	movq	-16(%rbp), %rax
	leaq	(%rdx,%rax), %rcx
	movabsq	$-8543223828751151131, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	leaq	(%rdx,%rcx), %rax
	sarq	$29, %rax
	movq	%rcx, %rdx
	sarq	$63, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	movq	-16(%rbp), %rax
	imulq	$1000000007, %rax, %rdx
	movq	%rcx, %rax
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
.L12:
	sarq	-8(%rbp)
	subl	$1, -32(%rbp)
.L11:
	cmpl	$0, -32(%rbp)
	jns	.L13
	movq	-16(%rbp), %rax
	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
.LFE1:
	.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:
