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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

/*
蟻本片手に学ぶアルゴリズム ~ローリングハッシュ~ - Qiita
https://qiita.com/hirominn/items/80464ee381c8d400725f
*/

#define MOD_BY UINT64_C(4129613490598809767)
#define MULT UINT64_C(2925597417967149787)

uint64_t add(uint64_t a, uint64_t b) {
	uint64_t r = a + b;
	if (r >= MOD_BY) r -= MOD_BY;
	return r;
}

uint64_t sub(uint64_t a, uint64_t b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

uint64_t mul(uint64_t a, uint64_t b) {
	uint64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

struct asumisu {
	int idx;
	uint64_t hash;
};

int hikaku(const void* x, const void* y) {
	struct asumisu a = *(const struct asumisu*)x, b = *(const struct asumisu*)y;
	if (a.hash != b.hash) return a.hash < b.hash ? -1 : 1;
	return a.idx < b.idx ? -1 : a.idx > b.idx;
}

int N;
char S[7777777];

uint64_t mofu[7777777];

struct asumisu nyan[7777777];

int main(void) {
	int yes , no;
	int i;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%7777775s", S + 1) != 1) return 1;
	mofu[0] = 1;
	for (i = 1; i <= N; i++) mofu[i] = mul(mofu[i - 1], MULT);
	yes = 0;
	no = N;
	while (yes + 1 < no) {
		int mid = yes + (no - yes) / 2;
		uint64_t hash = 0;
		int nyanSize = 0;
		int start;
		int found = 0;
		for (i = 1; i <= N; i++) {
			hash = add(mul(hash, MULT), (unsigned char)S[i]);
			if (i >= mid) {
				hash = sub(hash, mul((unsigned char)S[i - mid], mofu[mid]));
				nyan[nyanSize].idx = i - mid + 1;
				nyan[nyanSize].hash = hash;
				nyanSize++;
			}
		}
		qsort(nyan, nyanSize, sizeof(*nyan), hikaku);
		for (start = 0, i = 1; !found && i <= nyanSize; i++) {
			if (i >= nyanSize || nyan[start].hash != nyan[i].hash) {
				int j, k;
				for (j = start; !found && j < i; j++) {
					for (k = i - 1; k > j && nyan[j].idx + mid <= nyan[k].idx; k--) {
						if (strncmp(S + nyan[j].idx, S + nyan[k].idx, mid) == 0) {
							found = 1;
							break;
						}
					}
				}
				start = i;
			}
		}
		if (found) yes = mid; else no = mid;
	}
	printf("%d\n", yes);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movabsq	$4129613490598809766, %rax
	cmpq	%rax, -8(%rbp)
	jbe	.L2
	movabsq	$-4129613490598809767, %rax
	addq	%rax, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.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	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L5
	movabsq	$4129613490598809767, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	jmp	.L7
.L5:
	movq	-8(%rbp), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L9
.L11:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L10
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -8(%rbp)
.L10:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	shrq	-32(%rbp)
.L9:
	cmpq	$0, -32(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	hikaku
	.type	hikaku, @function
hikaku:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L14
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	jnb	.L15
	movl	$-1, %eax
	jmp	.L20
.L15:
	movl	$1, %eax
	jmp	.L20
.L14:
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L18
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L20
.L18:
	movl	$-1, %eax
.L20:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	hikaku, .-hikaku
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 7777777
S:
	.zero	7777777
	.globl	mofu
	.align 32
	.type	mofu, @object
	.size	mofu, 62222216
mofu:
	.zero	62222216
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 124444432
nyan:
	.zero	124444432
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%7777775s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	leaq	1+S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L24
	movl	$1, %eax
	jmp	.L23
.L24:
	movq	$1, mofu(%rip)
	movl	$1, -52(%rbp)
	jmp	.L25
.L26:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	mofu(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -52(%rbp)
.L25:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L26
	movl	$0, -60(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -56(%rbp)
	jmp	.L27
.L44:
	movl	-56(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-60(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L28
.L30:
	movl	-52(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %ebx
	movq	-24(%rbp), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L29
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movzbl	%al, %eax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	sub
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -48(%rbp)
.L29:
	addl	$1, -52(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L30
	movl	-48(%rbp), %eax
	cltq
	leaq	hikaku(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	nyan(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -44(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L31
.L42:
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L32
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+nyan(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	je	.L33
.L32:
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	jmp	.L34
.L40:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L38:
	movl	-28(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	leaq	(%rdx,%rcx), %rsi
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L36
	movl	$1, -40(%rbp)
	jmp	.L37
.L36:
	subl	$1, -32(%rbp)
.L35:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L37
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L38
.L37:
	addl	$1, -36(%rbp)
.L34:
	cmpl	$0, -40(%rbp)
	jne	.L39
	movl	-36(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L40
.L39:
	movl	-52(%rbp), %eax
	movl	%eax, -44(%rbp)
.L33:
	addl	$1, -52(%rbp)
.L31:
	cmpl	$0, -40(%rbp)
	jne	.L41
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jle	.L42
.L41:
	cmpl	$0, -40(%rbp)
	je	.L43
	movl	-28(%rbp), %eax
	movl	%eax, -60(%rbp)
	jmp	.L27
.L43:
	movl	-28(%rbp), %eax
	movl	%eax, -56(%rbp)
.L27:
	movl	-60(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -56(%rbp)
	jg	.L44
	movl	-60(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	hikaku
	.type	hikaku, @function
hikaku:
.LFB54:
	.cfi_startproc
	endbr64
	movq	8(%rsi), %rax
	cmpq	%rax, 8(%rdi)
	je	.L2
	sbbl	%eax, %eax
	orl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	(%rdi), %eax
	cmpl	%eax, (%rsi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	hikaku, .-hikaku
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB51:
	.cfi_startproc
	endbr64
	movabsq	$4129613490598809766, %rdx
	leaq	(%rdi,%rsi), %rax
	cmpq	%rdx, %rax
	jbe	.L7
	movabsq	$-4129613490598809767, %rdx
	addq	%rdx, %rax
.L7:
	ret
	.cfi_endproc
.LFE51:
	.size	add, .-add
	.p2align 4
	.globl	sub
	.type	sub, @function
sub:
.LFB52:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	testq	%rsi, %rsi
	je	.L10
	movabsq	$4129613490598809767, %rdx
	addq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rcx
	subq	%rdx, %rcx
	subq	$1, %rdx
	cmpq	%rdx, %rax
	cmova	%rcx, %rax
.L10:
	ret
	.cfi_endproc
.LFE52:
	.size	sub, .-sub
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB53:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	.L19
	movabsq	$4129613490598809766, %rdx
	movabsq	$-4129613490598809767, %r9
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %sil
	je	.L16
	addq	%rdi, %rax
	cmpq	%rdx, %rax
	leaq	(%rax,%r9), %r8
	cmova	%r8, %rax
.L16:
	addq	%rdi, %rdi
	cmpq	%rdx, %rdi
	movq	%rdi, %rcx
	leaq	(%rdi,%r9), %r8
	cmova	%r8, %rcx
	shrq	%rsi
	movq	%rcx, %rdi
	jne	.L18
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.cfi_endproc
.LFE53:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%7777775s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L25
.L27:
	movl	$1, %eax
.L24:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L25:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	1+S(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L27
	movl	N(%rip), %r15d
	movq	$1, mofu(%rip)
	movl	%r15d, 84(%rsp)
	testl	%r15d, %r15d
	jle	.L109
	leaq	mofu(%rip), %r11
	leal	-1(%r15), %eax
	movabsq	$4129613490598809766, %rdi
	movabsq	$-4129613490598809767, %r10
	leaq	8(%r11), %rdx
	leaq	(%rdx,%rax,8), %rbx
.L34:
	movq	(%r11), %rax
	movl	$62, %esi
	xorl	%edx, %edx
	movabsq	$2925597417967149787, %rcx
	.p2align 4,,10
	.p2align 3
.L33:
	testb	$1, %cl
	je	.L31
	addq	%rax, %rdx
	cmpq	%rdi, %rdx
	leaq	(%rdx,%r10), %r9
	cmova	%r9, %rdx
.L31:
	addq	%rax, %rax
	cmpq	%rdi, %rax
	leaq	(%rax,%r10), %r9
	cmova	%r9, %rax
	shrq	%rcx
	subl	$1, %esi
	jne	.L33
	movq	%rdx, 8(%r11)
	addq	$8, %r11
	cmpq	%rbx, %r11
	jne	.L34
	leaq	nyan(%rip), %rax
	movl	$0, 68(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rax, 72(%rsp)
	cmpl	$1, %r15d
	jle	.L29
	movl	%r15d, 12(%rsp)
	movl	%r15d, %ebx
.L30:
	movl	68(%rsp), %edi
	movl	84(%rsp), %edx
	subl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	addl	%edi, %eax
	movl	%eax, 40(%rsp)
	testl	%ebx, %ebx
	jle	.L36
	cmpl	$1, %eax
	jle	.L68
	leal	1(%rbx), %r12d
	movl	$1, %r9d
	leaq	1+S(%rip), %rbx
	movabsq	$4129613490598809766, %rcx
	movabsq	$-4129613490598809767, %r11
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movzbl	(%rbx), %ebp
	movl	$62, %edi
	xorl	%edx, %edx
	movabsq	$2925597417967149787, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	testb	$1, %sil
	je	.L38
	addq	%rax, %rdx
	cmpq	%rcx, %rdx
	leaq	(%rdx,%r11), %r10
	cmova	%r10, %rdx
.L38:
	addq	%rax, %rax
	cmpq	%rcx, %rax
	leaq	(%rax,%r11), %r10
	cmova	%r10, %rax
	shrq	%rsi
	subl	$1, %edi
	jne	.L40
	leaq	0(%rbp,%rdx), %rax
	cmpq	%rcx, %rax
	leaq	(%rax,%r11), %rsi
	cmova	%rsi, %rax
	addl	$1, %r9d
	addq	$1, %rbx
	cmpl	%r12d, %r9d
	jl	.L43
	cmpl	12(%rsp), %r9d
	jg	.L36
.L37:
	movslq	40(%rsp), %r15
	movl	%r9d, %ecx
	movslq	%r9d, %r11
	leaq	S(%rip), %r14
	leaq	nyan(%rip), %rbx
	movabsq	$4129613490598809766, %rdx
	movabsq	$-4129613490598809767, %r8
	subl	%r15d, %ecx
	movslq	%ecx, %rcx
	subq	%r11, %rcx
	leaq	(%r14,%rcx), %r12
	movl	$1, %ecx
	movl	%ecx, %r13d
	subl	%r9d, %ecx
	movl	%ecx, 16(%rsp)
	subl	%r15d, %r13d
	.p2align 4,,10
	.p2align 3
.L49:
	movzbl	(%r14,%r11), %ebp
	movl	$62, %edi
	xorl	%ecx, %ecx
	movabsq	$2925597417967149787, %rsi
	.p2align 4,,10
	.p2align 3
.L46:
	testb	$1, %sil
	je	.L44
	addq	%rax, %rcx
	cmpq	%rdx, %rcx
	leaq	(%rcx,%r8), %r10
	cmova	%r10, %rcx
.L44:
	addq	%rax, %rax
	cmpq	%rdx, %rax
	leaq	(%rax,%r8), %r10
	cmova	%r10, %rax
	shrq	%rsi
	subl	$1, %edi
	jne	.L46
	leaq	0(%rbp,%rcx), %rax
	leaq	mofu(%rip), %rdi
	movzbl	(%r12,%r11), %ecx
	cmpq	%rdx, %rax
	leaq	(%rax,%r8), %rsi
	cmova	%rsi, %rax
	movq	(%rdi,%r15,8), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	je	.L51
.L48:
	testb	$1, %sil
	je	.L52
	addq	%rcx, %rdi
	cmpq	%rdx, %rdi
	leaq	(%rdi,%r8), %r10
	cmova	%r10, %rdi
.L52:
	addq	%rcx, %rcx
	cmpq	%rdx, %rcx
	leaq	(%rcx,%r8), %r10
	cmova	%r10, %rcx
	shrq	%rsi
	jne	.L48
	testq	%rdi, %rdi
	je	.L51
	movabsq	$4129613490598809767, %rsi
	addq	%rsi, %rax
	subq	%rdi, %rax
	movq	%rax, %rcx
	subq	%rsi, %rcx
	cmpq	%rdx, %rax
	cmova	%rcx, %rax
.L51:
	leal	0(%r13,%r11), %ecx
	movq	%rax, 8(%rbx)
	addq	$16, %rbx
	movl	%ecx, -16(%rbx)
	movl	16(%rsp), %ecx
	addl	%r11d, %ecx
	addq	$1, %r11
	cmpl	%r11d, 12(%rsp)
	jge	.L49
	movq	72(%rsp), %rbx
	movl	%ecx, 60(%rsp)
	movslq	%ecx, %rsi
	movl	$16, %edx
	leaq	hikaku(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	leaq	nyan(%rip), %rax
	movq	%rbx, 88(%rsp)
	movq	%rax, 32(%rsp)
	movq	$1, 24(%rsp)
	movq	$0, 48(%rsp)
	movl	$0, 12(%rsp)
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L58:
	addq	$1, 48(%rsp)
	movl	60(%rsp), %ebx
	addq	$1, 24(%rsp)
	addq	$16, 32(%rsp)
	cmpl	%ebx, 64(%rsp)
	jg	.L55
.L65:
	movq	24(%rsp), %rbx
	movl	60(%rsp), %ecx
	leal	1(%rbx), %edi
	movl	%ebx, 80(%rsp)
	movl	%ebx, %eax
	movl	%edi, 64(%rsp)
	movl	%ebx, 44(%rsp)
	cmpl	%ecx, %ebx
	jge	.L59
	movslq	12(%rsp), %rdx
	movq	32(%rsp), %rbx
	movq	72(%rsp), %rdi
	salq	$4, %rdx
	movq	24(%rbx), %rcx
	cmpq	%rcx, 8(%rdi,%rdx)
	je	.L58
.L59:
	movslq	12(%rsp), %rdx
	subl	$2, %eax
	movl	%eax, 56(%rsp)
	movq	%rdx, %rbx
	salq	$4, %rdx
	addq	72(%rsp), %rdx
	movq	%rdx, 16(%rsp)
	cmpl	%ebx, 44(%rsp)
	jle	.L108
	.p2align 4,,10
	.p2align 3
.L64:
	movl	12(%rsp), %edi
	movl	48(%rsp), %eax
	cmpl	%eax, %edi
	jge	.L60
	movq	16(%rsp), %rax
	movq	24(%rsp), %rbp
	movq	32(%rsp), %r13
	movslq	(%rax), %rbx
	movl	40(%rsp), %eax
	leal	(%rbx,%rax), %r12d
	movl	56(%rsp), %eax
	addq	%r14, %rbx
	subl	%edi, %eax
	subq	%rax, %rbp
	leaq	-32+nyan(%rip), %rax
	salq	$4, %rbp
	addq	%rax, %rbp
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L63:
	addq	%r14, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L70
	subq	$16, %r13
	cmpq	%rbp, %r13
	je	.L60
.L61:
	movslq	0(%r13), %rsi
	cmpl	%esi, %r12d
	jle	.L63
.L60:
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	addq	$16, 16(%rsp)
	cmpl	%eax, 44(%rsp)
	jne	.L64
.L108:
	movl	80(%rsp), %eax
	movl	%eax, 12(%rsp)
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L70:
	movl	40(%rsp), %eax
	movl	%eax, 68(%rsp)
	addl	$1, %eax
	cmpl	84(%rsp), %eax
	jge	.L29
.L110:
	movl	N(%rip), %eax
	movl	%eax, 12(%rsp)
	movl	%eax, %ebx
	jmp	.L30
.L68:
	movl	$1, %r9d
	xorl	%eax, %eax
	jmp	.L37
.L36:
	movq	88(%rsp), %rdi
	leaq	hikaku(%rip), %rcx
	movl	$16, %edx
	xorl	%esi, %esi
	call	qsort@PLT
.L55:
	movl	40(%rsp), %eax
	movl	%eax, 84(%rsp)
	movl	68(%rsp), %eax
	addl	$1, %eax
	cmpl	84(%rsp), %eax
	jl	.L110
.L29:
	movl	68(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L24
.L109:
	movl	$0, 68(%rsp)
	jmp	.L29
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	nyan
	.bss
	.align 32
	.type	nyan, @object
	.size	nyan, 124444432
nyan:
	.zero	124444432
	.globl	mofu
	.align 32
	.type	mofu, @object
	.size	mofu, 62222216
mofu:
	.zero	62222216
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 7777777
S:
	.zero	7777777
	.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	hikaku
	.type	hikaku, @function
hikaku:
.LFB54:
	.cfi_startproc
	endbr64
	movq	8(%rsi), %rax
	cmpq	%rax, 8(%rdi)
	je	.L2
	sbbl	%eax, %eax
	orl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	movl	(%rdi), %eax
	cmpl	%eax, (%rsi)
	movl	$-1, %edx
	setl	%al
	movzbl	%al, %eax
	cmovg	%edx, %eax
	ret
	.cfi_endproc
.LFE54:
	.size	hikaku, .-hikaku
	.p2align 4
	.globl	add
	.type	add, @function
add:
.LFB51:
	.cfi_startproc
	endbr64
	movabsq	$4129613490598809766, %rdx
	leaq	(%rdi,%rsi), %rax
	cmpq	%rdx, %rax
	jbe	.L7
	movabsq	$-4129613490598809767, %rdx
	addq	%rdx, %rax
.L7:
	ret
	.cfi_endproc
.LFE51:
	.size	add, .-add
	.p2align 4
	.globl	sub
	.type	sub, @function
sub:
.LFB52:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	testq	%rsi, %rsi
	je	.L10
	movabsq	$4129613490598809767, %rdx
	addq	%rdx, %rax
	subq	%rsi, %rax
	movq	%rax, %rcx
	subq	%rdx, %rcx
	subq	$1, %rdx
	cmpq	%rdx, %rax
	cmova	%rcx, %rax
.L10:
	ret
	.cfi_endproc
.LFE52:
	.size	sub, .-sub
	.p2align 4
	.globl	mul
	.type	mul, @function
mul:
.LFB53:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	.L19
	movabsq	$4129613490598809766, %rdx
	movabsq	$-4129613490598809767, %r9
	.p2align 4,,10
	.p2align 3
.L18:
	testb	$1, %sil
	je	.L16
	addq	%rdi, %rax
	cmpq	%rdx, %rax
	leaq	(%rax,%r9), %r8
	cmova	%r8, %rax
.L16:
	addq	%rdi, %rdi
	cmpq	%rdx, %rdi
	movq	%rdi, %rcx
	leaq	(%rdi,%r9), %r8
	cmova	%r8, %rcx
	shrq	%rsi
	movq	%rcx, %rdi
	jne	.L18
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	ret
	.cfi_endproc
.LFE53:
	.size	mul, .-mul
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%7777775s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	leaq	N(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L25
.L27:
	movl	$1, %eax
.L24:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L25:
	.cfi_restore_state
	xorl	%eax, %eax
	leaq	1+S(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	subl	$1, %eax
	jne	.L27
	movl	N(%rip), %r15d
	movq	$1, mofu(%rip)
	movl	%r15d, 84(%rsp)
	testl	%r15d, %r15d
	jle	.L109
	leaq	mofu(%rip), %r11
	leal	-1(%r15), %eax
	movabsq	$4129613490598809766, %rdi
	movabsq	$-4129613490598809767, %r10
	leaq	8(%r11), %rdx
	leaq	(%rdx,%rax,8), %rbx
.L34:
	movq	(%r11), %rax
	movl	$62, %esi
	xorl	%edx, %edx
	movabsq	$2925597417967149787, %rcx
	.p2align 4,,10
	.p2align 3
.L33:
	testb	$1, %cl
	je	.L31
	addq	%rax, %rdx
	cmpq	%rdi, %rdx
	leaq	(%rdx,%r10), %r9
	cmova	%r9, %rdx
.L31:
	addq	%rax, %rax
	cmpq	%rdi, %rax
	leaq	(%rax,%r10), %r9
	cmova	%r9, %rax
	shrq	%rcx
	subl	$1, %esi
	jne	.L33
	movq	%rdx, 8(%r11)
	addq	$8, %r11
	cmpq	%rbx, %r11
	jne	.L34
	leaq	nyan(%rip), %rax
	movl	$0, 68(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rax, 72(%rsp)
	cmpl	$1, %r15d
	jle	.L29
	movl	%r15d, 12(%rsp)
	movl	%r15d, %ebx
.L30:
	movl	68(%rsp), %edi
	movl	84(%rsp), %edx
	subl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	addl	%edi, %eax
	movl	%eax, 40(%rsp)
	testl	%ebx, %ebx
	jle	.L36
	cmpl	$1, %eax
	jle	.L68
	leal	1(%rbx), %r12d
	movl	$1, %r9d
	leaq	1+S(%rip), %rbx
	movabsq	$4129613490598809766, %rcx
	movabsq	$-4129613490598809767, %r11
	cmpl	%eax, %r12d
	cmovg	%eax, %r12d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L43:
	movzbl	(%rbx), %ebp
	movl	$62, %edi
	xorl	%edx, %edx
	movabsq	$2925597417967149787, %rsi
	.p2align 4,,10
	.p2align 3
.L40:
	testb	$1, %sil
	je	.L38
	addq	%rax, %rdx
	cmpq	%rcx, %rdx
	leaq	(%rdx,%r11), %r10
	cmova	%r10, %rdx
.L38:
	addq	%rax, %rax
	cmpq	%rcx, %rax
	leaq	(%rax,%r11), %r10
	cmova	%r10, %rax
	shrq	%rsi
	subl	$1, %edi
	jne	.L40
	leaq	0(%rbp,%rdx), %rax
	cmpq	%rcx, %rax
	leaq	(%rax,%r11), %rsi
	cmova	%rsi, %rax
	addl	$1, %r9d
	addq	$1, %rbx
	cmpl	%r12d, %r9d
	jl	.L43
	cmpl	12(%rsp), %r9d
	jg	.L36
.L37:
	movslq	40(%rsp), %r15
	movl	%r9d, %ecx
	movslq	%r9d, %r11
	leaq	S(%rip), %r14
	leaq	nyan(%rip), %rbx
	movabsq	$4129613490598809766, %rdx
	movabsq	$-4129613490598809767, %r8
	subl	%r15d, %ecx
	movslq	%ecx, %rcx
	subq	%r11, %rcx
	leaq	(%r14,%rcx), %r12
	movl	$1, %ecx
	movl	%ecx, %r13d
	subl	%r9d, %ecx
	movl	%ecx, 16(%rsp)
	subl	%r15d, %r13d
	.p2align 4,,10
	.p2align 3
.L49:
	movzbl	(%r14,%r11), %ebp
	movl	$62, %edi
	xorl	%ecx, %ecx
	movabsq	$2925597417967149787, %rsi
	.p2align 4,,10
	.p2align 3
.L46:
	testb	$1, %sil
	je	.L44
	addq	%rax, %rcx
	cmpq	%rdx, %rcx
	leaq	(%rcx,%r8), %r10
	cmova	%r10, %rcx
.L44:
	addq	%rax, %rax
	cmpq	%rdx, %rax
	leaq	(%rax,%r8), %r10
	cmova	%r10, %rax
	shrq	%rsi
	subl	$1, %edi
	jne	.L46
	leaq	0(%rbp,%rcx), %rax
	leaq	mofu(%rip), %rdi
	movzbl	(%r12,%r11), %ecx
	cmpq	%rdx, %rax
	leaq	(%rax,%r8), %rsi
	cmova	%rsi, %rax
	movq	(%rdi,%r15,8), %rsi
	xorl	%edi, %edi
	testq	%rsi, %rsi
	je	.L51
.L48:
	testb	$1, %sil
	je	.L52
	addq	%rcx, %rdi
	cmpq	%rdx, %rdi
	leaq	(%rdi,%r8), %r10
	cmova	%r10, %rdi
.L52:
	addq	%rcx, %rcx
	cmpq	%rdx, %rcx
	leaq	(%rcx,%r8), %r10
	cmova	%r10, %rcx
	shrq	%rsi
	jne	.L48
	testq	%rdi, %rdi
	je	.L51
	movabsq	$4129613490598809767, %rsi
	addq	%rsi, %rax
	subq	%rdi, %rax
	movq	%rax, %rcx
	subq	%rsi, %rcx
	cmpq	%rdx, %rax
	cmova	%rcx, %rax
.L51:
	leal	0(%r13,%r11), %ecx
	movq	%rax, 8(%rbx)
	addq	$16, %rbx
	movl	%ecx, -16(%rbx)
	movl	16(%rsp), %ecx
	addl	%r11d, %ecx
	addq	$1, %r11
	cmpl	%r11d, 12(%rsp)
	jge	.L49
	movq	72(%rsp), %rbx
	movl	%ecx, 60(%rsp)
	movslq	%ecx, %rsi
	movl	$16, %edx
	leaq	hikaku(%rip), %rcx
	movq	%rbx, %rdi
	call	qsort@PLT
	leaq	nyan(%rip), %rax
	movq	%rbx, 88(%rsp)
	movq	%rax, 32(%rsp)
	movq	$1, 24(%rsp)
	movq	$0, 48(%rsp)
	movl	$0, 12(%rsp)
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L58:
	addq	$1, 48(%rsp)
	movl	60(%rsp), %ebx
	addq	$1, 24(%rsp)
	addq	$16, 32(%rsp)
	cmpl	%ebx, 64(%rsp)
	jg	.L55
.L65:
	movq	24(%rsp), %rbx
	movl	60(%rsp), %ecx
	leal	1(%rbx), %edi
	movl	%ebx, 80(%rsp)
	movl	%ebx, %eax
	movl	%edi, 64(%rsp)
	movl	%ebx, 44(%rsp)
	cmpl	%ecx, %ebx
	jge	.L59
	movslq	12(%rsp), %rdx
	movq	32(%rsp), %rbx
	movq	72(%rsp), %rdi
	salq	$4, %rdx
	movq	24(%rbx), %rcx
	cmpq	%rcx, 8(%rdi,%rdx)
	je	.L58
.L59:
	movslq	12(%rsp), %rdx
	subl	$2, %eax
	movl	%eax, 56(%rsp)
	movq	%rdx, %rbx
	salq	$4, %rdx
	addq	72(%rsp), %rdx
	movq	%rdx, 16(%rsp)
	cmpl	%ebx, 44(%rsp)
	jle	.L108
	.p2align 4,,10
	.p2align 3
.L64:
	movl	12(%rsp), %edi
	movl	48(%rsp), %eax
	cmpl	%eax, %edi
	jge	.L60
	movq	16(%rsp), %rax
	movq	24(%rsp), %rbp
	movq	32(%rsp), %r13
	movslq	(%rax), %rbx
	movl	40(%rsp), %eax
	leal	(%rbx,%rax), %r12d
	movl	56(%rsp), %eax
	addq	%r14, %rbx
	subl	%edi, %eax
	subq	%rax, %rbp
	leaq	-32+nyan(%rip), %rax
	salq	$4, %rbp
	addq	%rax, %rbp
	jmp	.L61
	.p2align 4,,10
	.p2align 3
.L63:
	addq	%r14, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	je	.L70
	subq	$16, %r13
	cmpq	%rbp, %r13
	je	.L60
.L61:
	movslq	0(%r13), %rsi
	cmpl	%esi, %r12d
	jle	.L63
.L60:
	addl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	addq	$16, 16(%rsp)
	cmpl	%eax, 44(%rsp)
	jne	.L64
.L108:
	movl	80(%rsp), %eax
	movl	%eax, 12(%rsp)
	jmp	.L58
	.p2align 4,,10
	.p2align 3
.L70:
	movl	40(%rsp), %eax
	movl	%eax, 68(%rsp)
	addl	$1, %eax
	cmpl	84(%rsp), %eax
	jge	.L29
.L110:
	movl	N(%rip), %eax
	movl	%eax, 12(%rsp)
	movl	%eax, %ebx
	jmp	.L30
.L68:
	movl	$1, %r9d
	xorl	%eax, %eax
	jmp	.L37
.L36:
	movq	88(%rsp), %rdi
	leaq	hikaku(%rip), %rcx
	movl	$16, %edx
	xorl	%esi, %esi
	call	qsort@PLT
.L55:
	movl	40(%rsp), %eax
	movl	%eax, 84(%rsp)
	movl	68(%rsp), %eax
	addl	$1, %eax
	cmpl	84(%rsp), %eax
	jl	.L110
.L29:
	movl	68(%rsp), %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L24
.L109:
	movl	$0, 68(%rsp)
	jmp	.L29
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	nyan
	.bss
	.align 32
	.type	nyan, @object
	.size	nyan, 124444432
nyan:
	.zero	124444432
	.globl	mofu
	.align 32
	.type	mofu, @object
	.size	mofu, 62222216
mofu:
	.zero	62222216
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 7777777
S:
	.zero	7777777
	.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:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

/*
蟻本片手に学ぶアルゴリズム ~ローリングハッシュ~ - Qiita
https://qiita.com/hirominn/items/80464ee381c8d400725f
*/

#define MOD_BY UINT64_C(4129613490598809767)
#define MULT UINT64_C(2925597417967149787)

uint64_t add(uint64_t a, uint64_t b) {
	uint64_t r = a + b;
	if (r >= MOD_BY) r -= MOD_BY;
	return r;
}

uint64_t sub(uint64_t a, uint64_t b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

uint64_t mul(uint64_t a, uint64_t b) {
	uint64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

struct asumisu {
	int idx;
	uint64_t hash;
};

int hikaku(const void* x, const void* y) {
	struct asumisu a = *(const struct asumisu*)x, b = *(const struct asumisu*)y;
	if (a.hash != b.hash) return a.hash < b.hash ? -1 : 1;
	return a.idx < b.idx ? -1 : a.idx > b.idx;
}

int N;
char S[7777777];

uint64_t mofu[7777777];

struct asumisu nyan[7777777];

int main(void) {
	int yes , no;
	int i;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%7777775s", S + 1) != 1) return 1;
	mofu[0] = 1;
	for (i = 1; i <= N; i++) mofu[i] = mul(mofu[i - 1], MULT);
	yes = 0;
	no = N;
	while (yes + 1 < no) {
		int mid = yes + (no - yes) / 2;
		uint64_t hash = 0;
		int nyanSize = 0;
		int start;
		int found = 0;
		for (i = 1; i <= N; i++) {
			hash = add(mul(hash, MULT), (unsigned char)S[i]);
			if (i >= mid) {
				hash = sub(hash, mul((unsigned char)S[i - mid], mofu[mid]));
				nyan[nyanSize].idx = i - mid + 1;
				nyan[nyanSize].hash = hash;
				nyanSize++;
			}
		}
		qsort(nyan, nyanSize, sizeof(*nyan), hikaku);
		for (start = 0, i = 1; !found && i <= nyanSize; i++) {
			if (i >= nyanSize || nyan[start].hash != nyan[i].hash) {
				int j, k;
				for (j = start; !found && j < i; j++) {
					for (k = i - 1; k > j && nyan[j].idx + mid <= nyan[k].idx; k--) {
						if (strncmp(S + nyan[j].idx, S + nyan[k].idx, mid) == 0) {
							found = 1;
							break;
						}
					}
				}
				start = i;
			}
		}
		if (found) yes = mid; else no = mid;
	}
	printf("%d\n", yes);
	return 0;
}

13
strangeoranfe
 2
wy
 5
`baba
 5
abac`
 13
efnaroegnarts
 2
vy
 5
abab`
 13
efnarotgnares
 2
yx
 13
serangtoranfe

3
 0
 2
 1
 3
 0
 2
 3
 0
 3

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

```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>

/*
蟻本片手に学ぶアルゴリズム ~ローリングハッシュ~ - Qiita
https://qiita.com/hirominn/items/80464ee381c8d400725f
*/

#define MOD_BY UINT64_C(4129613490598809767)
#define MULT UINT64_C(2925597417967149787)

uint64_t add(uint64_t a, uint64_t b) {
	uint64_t r = a + b;
	if (r >= MOD_BY) r -= MOD_BY;
	return r;
}

uint64_t sub(uint64_t a, uint64_t b) {
	return b == 0 ? a : add(a, MOD_BY - b);
}

uint64_t mul(uint64_t a, uint64_t b) {
	uint64_t r = 0;
	while (b > 0) {
		if (b & 1) r = add(r, a);
		a = add(a, a);
		b >>= 1;
	}
	return r;
}

struct asumisu {
	int idx;
	uint64_t hash;
};

int hikaku(const void* x, const void* y) {
	struct asumisu a = *(const struct asumisu*)x, b = *(const struct asumisu*)y;
	if (a.hash != b.hash) return a.hash < b.hash ? -1 : 1;
	return a.idx < b.idx ? -1 : a.idx > b.idx;
}

int N;
char S[7777777];

uint64_t mofu[7777777];

struct asumisu nyan[7777777];

int main(void) {
	int yes , no;
	int i;
	if (scanf("%d", &N) != 1) return 1;
	if (scanf("%7777775s", S + 1) != 1) return 1;
	mofu[0] = 1;
	for (i = 1; i <= N; i++) mofu[i] = mul(mofu[i - 1], MULT);
	yes = 0;
	no = N;
	while (yes + 1 < no) {
		int mid = yes + (no - yes) / 2;
		uint64_t hash = 0;
		int nyanSize = 0;
		int start;
		int found = 0;
		for (i = 1; i <= N; i++) {
			hash = add(mul(hash, MULT), (unsigned char)S[i]);
			if (i >= mid) {
				hash = sub(hash, mul((unsigned char)S[i - mid], mofu[mid]));
				nyan[nyanSize].idx = i - mid + 1;
				nyan[nyanSize].hash = hash;
				nyanSize++;
			}
		}
		qsort(nyan, nyanSize, sizeof(*nyan), hikaku);
		for (start = 0, i = 1; !found && i <= nyanSize; i++) {
			if (i >= nyanSize || nyan[start].hash != nyan[i].hash) {
				int j, k;
				for (j = start; !found && j < i; j++) {
					for (k = i - 1; k > j && nyan[j].idx + mid <= nyan[k].idx; k--) {
						if (strncmp(S + nyan[j].idx, S + nyan[k].idx, mid) == 0) {
							found = 1;
							break;
						}
					}
				}
				start = i;
			}
		}
		if (found) yes = mid; else no = mid;
	}
	printf("%d\n", yes);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movabsq	$4129613490598809766, %rax
	cmpq	%rax, -8(%rbp)
	jbe	.L2
	movabsq	$-4129613490598809767, %rax
	addq	%rax, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.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	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L5
	movabsq	$4129613490598809767, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	jmp	.L7
.L5:
	movq	-8(%rbp), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L9
.L11:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L10
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -8(%rbp)
.L10:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	shrq	-32(%rbp)
.L9:
	cmpq	$0, -32(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	hikaku
	.type	hikaku, @function
hikaku:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L14
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	jnb	.L15
	movl	$-1, %eax
	jmp	.L20
.L15:
	movl	$1, %eax
	jmp	.L20
.L14:
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L18
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L20
.L18:
	movl	$-1, %eax
.L20:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	hikaku, .-hikaku
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 7777777
S:
	.zero	7777777
	.globl	mofu
	.align 32
	.type	mofu, @object
	.size	mofu, 62222216
mofu:
	.zero	62222216
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 124444432
nyan:
	.zero	124444432
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%7777775s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	leaq	1+S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L24
	movl	$1, %eax
	jmp	.L23
.L24:
	movq	$1, mofu(%rip)
	movl	$1, -52(%rbp)
	jmp	.L25
.L26:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	mofu(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -52(%rbp)
.L25:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L26
	movl	$0, -60(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -56(%rbp)
	jmp	.L27
.L44:
	movl	-56(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-60(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L28
.L30:
	movl	-52(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %ebx
	movq	-24(%rbp), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L29
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movzbl	%al, %eax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	sub
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -48(%rbp)
.L29:
	addl	$1, -52(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L30
	movl	-48(%rbp), %eax
	cltq
	leaq	hikaku(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	nyan(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -44(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L31
.L42:
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L32
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+nyan(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	je	.L33
.L32:
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	jmp	.L34
.L40:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L38:
	movl	-28(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	leaq	(%rdx,%rcx), %rsi
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L36
	movl	$1, -40(%rbp)
	jmp	.L37
.L36:
	subl	$1, -32(%rbp)
.L35:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L37
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L38
.L37:
	addl	$1, -36(%rbp)
.L34:
	cmpl	$0, -40(%rbp)
	jne	.L39
	movl	-36(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L40
.L39:
	movl	-52(%rbp), %eax
	movl	%eax, -44(%rbp)
.L33:
	addl	$1, -52(%rbp)
.L31:
	cmpl	$0, -40(%rbp)
	jne	.L41
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jle	.L42
.L41:
	cmpl	$0, -40(%rbp)
	je	.L43
	movl	-28(%rbp), %eax
	movl	%eax, -60(%rbp)
	jmp	.L27
.L43:
	movl	-28(%rbp), %eax
	movl	%eax, -56(%rbp)
.L27:
	movl	-60(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -56(%rbp)
	jg	.L44
	movl	-60(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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.
val
	.file	"temp.c"
	.text
	.globl	add
	.type	add, @function
add:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, -8(%rbp)
	movabsq	$4129613490598809766, %rax
	cmpq	%rax, -8(%rbp)
	jbe	.L2
	movabsq	$-4129613490598809767, %rax
	addq	%rax, -8(%rbp)
.L2:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	add, .-add
	.globl	sub
	.type	sub, @function
sub:
.LFB7:
	.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	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	cmpq	$0, -16(%rbp)
	je	.L5
	movabsq	$4129613490598809767, %rax
	subq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	jmp	.L7
.L5:
	movq	-8(%rbp), %rax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sub, .-sub
	.globl	mul
	.type	mul, @function
mul:
.LFB8:
	.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
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	$0, -8(%rbp)
	jmp	.L9
.L11:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L10
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -8(%rbp)
.L10:
	movq	-24(%rbp), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	shrq	-32(%rbp)
.L9:
	cmpq	$0, -32(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mul, .-mul
	.globl	hikaku
	.type	hikaku, @function
hikaku:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -40(%rbp)
	movq	%rsi, -48(%rbp)
	movq	-40(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-48(%rbp), %rax
	movq	8(%rax), %rdx
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	movq	%rdx, -8(%rbp)
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	je	.L14
	movq	-24(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	jnb	.L15
	movl	$-1, %eax
	jmp	.L20
.L15:
	movl	$1, %eax
	jmp	.L20
.L14:
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jl	.L18
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	setg	%al
	movzbl	%al, %eax
	jmp	.L20
.L18:
	movl	$-1, %eax
.L20:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	hikaku, .-hikaku
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 7777777
S:
	.zero	7777777
	.globl	mofu
	.align 32
	.type	mofu, @object
	.size	mofu, 62222216
mofu:
	.zero	62222216
	.globl	nyan
	.align 32
	.type	nyan, @object
	.size	nyan, 124444432
nyan:
	.zero	124444432
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%7777775s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset 3, -24
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	leaq	1+S(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L24
	movl	$1, %eax
	jmp	.L23
.L24:
	movq	$1, mofu(%rip)
	movl	$1, -52(%rbp)
	jmp	.L25
.L26:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	mofu(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -52(%rbp)
.L25:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L26
	movl	$0, -60(%rbp)
	movl	N(%rip), %eax
	movl	%eax, -56(%rbp)
	jmp	.L27
.L44:
	movl	-56(%rbp), %eax
	subl	-60(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-60(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -28(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L28
.L30:
	movl	-52(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movzbl	%al, %ebx
	movq	-24(%rbp), %rax
	movabsq	$2925597417967149787, %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	add
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L29
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	mofu(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movzbl	%al, %eax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	mul
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	sub
	movq	%rax, -24(%rbp)
	movl	-52(%rbp), %eax
	subl	-28(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-48(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rdx
	movq	-24(%rbp), %rax
	movq	%rax, (%rcx,%rdx)
	addl	$1, -48(%rbp)
.L29:
	addl	$1, -52(%rbp)
.L28:
	movl	N(%rip), %eax
	cmpl	%eax, -52(%rbp)
	jle	.L30
	movl	-48(%rbp), %eax
	cltq
	leaq	hikaku(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	nyan(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -44(%rbp)
	movl	$1, -52(%rbp)
	jmp	.L31
.L42:
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jge	.L32
	movl	-44(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+nyan(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+nyan(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	je	.L33
.L32:
	movl	-44(%rbp), %eax
	movl	%eax, -36(%rbp)
	jmp	.L34
.L40:
	movl	-52(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -32(%rbp)
	jmp	.L35
.L38:
	movl	-28(%rbp), %eax
	cltq
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	leaq	(%rdx,%rcx), %rsi
	movl	-36(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	nyan(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	S(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movq	%rcx, %rdi
	call	strncmp@PLT
	testl	%eax, %eax
	jne	.L36
	movl	$1, -40(%rbp)
	jmp	.L37
.L36:
	subl	$1, -32(%rbp)
.L35:
	movl	-32(%rbp), %eax
	cmpl	-36(%rbp), %eax
	jle	.L37
	movl	-36(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	-32(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	nyan(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jle	.L38
.L37:
	addl	$1, -36(%rbp)
.L34:
	cmpl	$0, -40(%rbp)
	jne	.L39
	movl	-36(%rbp), %eax
	cmpl	-52(%rbp), %eax
	jl	.L40
.L39:
	movl	-52(%rbp), %eax
	movl	%eax, -44(%rbp)
.L33:
	addl	$1, -52(%rbp)
.L31:
	cmpl	$0, -40(%rbp)
	jne	.L41
	movl	-52(%rbp), %eax
	cmpl	-48(%rbp), %eax
	jle	.L42
.L41:
	cmpl	$0, -40(%rbp)
	je	.L43
	movl	-28(%rbp), %eax
	movl	%eax, -60(%rbp)
	jmp	.L27
.L43:
	movl	-28(%rbp), %eax
	movl	%eax, -56(%rbp)
.L27:
	movl	-60(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -56(%rbp)
	jg	.L44
	movl	-60(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L23:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
