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 <inttypes.h>

#define INF INT64_C(77777777777777777)

int64_t kugyu(int64_t sakura, int64_t oonisi) {
	int64_t nadukakaori = sakura + oonisi;
	if (nadukakaori > INF) nadukakaori = INF;
	if (nadukakaori < -INF) nadukakaori = -INF;
	return nadukakaori;
}

int N, M, P;
int A[7777], B[7777], C[7777];

int64_t hanazawakana[7777];
char hayamisaori[7777];
int64_t igutiyuka[7777];


int main(void) {
	int i;
	if (scanf("%d%d%d", &N, &M, &P) != 3) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d%d", &A[i], &B[i], &C[i]) != 3) return 1;
		C[i] -= P;
	}
	/* 最大スコア探索と、ゴールに行けるか判定 */
	for (i = 1; i <= N; i++) {
		hanazawakana[i] = -INF;
		hayamisaori[i] = 0;
	}
	hanazawakana[1] = 0;
	hayamisaori[N] = 1;
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
			if (hayamisaori[B[j]]) hayamisaori[A[j]] = 1;
		}
	}
	/* この時点での最大スコアを保存して */
	for (i = 1; i <= N; i++) igutiyuka[i] = hanazawakana[i];
	/* スコアがもっと伸びるかをチェックする */
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
		}
	}
	for (i = 1; i <= N; i++) {
		if (hayamisaori[i] && hanazawakana[i] > igutiyuka[i]) {
			puts("-1");
			return 0;
		}
	}
	printf("%" PRId64 "\n", hanazawakana[N] < 0 ? 0 : hanazawakana[N]);
	return 0;
}

/*

3 4 0
1 3 100000
1 2 1
2 2 1
2 3 1

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	kugyu
	.type	kugyu, @function
kugyu:
.LFB0:
	.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	$77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jle	.L2
	movabsq	$77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L2:
	movabsq	$-77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jge	.L3
	movabsq	$-77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	kugyu, .-kugyu
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	P
	.align 4
	.type	P, @object
	.size	P, 4
P:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 31108
A:
	.zero	31108
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 31108
B:
	.zero	31108
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 31108
C:
	.zero	31108
	.globl	hanazawakana
	.align 32
	.type	hanazawakana, @object
	.size	hanazawakana, 62216
hanazawakana:
	.zero	62216
	.globl	hayamisaori
	.align 32
	.type	hayamisaori, @object
	.size	hayamisaori, 7777
hayamisaori:
	.zero	7777
	.globl	igutiyuka
	.align 32
	.type	igutiyuka, @object
	.size	igutiyuka, 62216
igutiyuka:
	.zero	62216
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%ld\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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	P(%rip), %rax
	movq	%rax, %rcx
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -28(%rbp)
	jmp	.L8
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	A(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	P(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L10
	movl	$1, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movabsq	$-77777777777777777, %rbx
	movq	%rbx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L11:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movq	$0, 8+hanazawakana(%rip)
	movl	N(%rip), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L13
.L18:
	movl	$0, -24(%rbp)
	jmp	.L14
.L17:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-24(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L15:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L16:
	addl	$1, -24(%rbp)
.L14:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
	addl	$1, -28(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$1, -28(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	igutiyuka(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	$0, -28(%rbp)
	jmp	.L21
.L25:
	movl	$0, -20(%rbp)
	jmp	.L22
.L24:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L23:
	addl	$1, -20(%rbp)
.L22:
	movl	M(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L24
	addl	$1, -28(%rbp)
.L21:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L25
	movl	$1, -28(%rbp)
	jmp	.L26
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L27
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	igutiyuka(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L27:
	addl	$1, -28(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L28
	movl	N(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$0, %edx
	testq	%rax, %rax
	cmovs	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rbx
	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	kugyu
	.type	kugyu, @function
kugyu:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-77777777777777777, %rdx
	leaq	(%rdi,%rsi), %rax
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	movabsq	$77777777777777777, %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	kugyu, .-kugyu
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%ld\n"
.LC3:
	.string	"-1"
	.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
	leaq	P(%rip), %rcx
	leaq	M(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	N(%rip), %rsi
	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
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	jne	.L7
	movl	M(%rip), %r12d
	testl	%r12d, %r12d
	jle	.L6
	leaq	C(%rip), %r14
	xorl	%r15d, %r15d
	leaq	B(%rip), %r13
	leaq	A(%rip), %rbp
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L46:
	movl	M(%rip), %r12d
	addq	$1, %r15
	movl	P(%rip), %eax
	subl	%eax, (%r14)
	addq	$4, %r14
	cmpl	%r15d, %r12d
	jle	.L45
.L8:
	leaq	0(,%r15,4), %rsi
	xorl	%eax, %eax
	movq	%r14, %rcx
	movq	%rbx, %rdi
	leaq	0(%r13,%rsi), %rdx
	addq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L46
.L7:
	movl	$1, %eax
.L3:
	addq	$24, %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
.L45:
	.cfi_restore_state
	movl	N(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L47
.L27:
	testl	%r15d, %r15d
	movl	$1, %ecx
	cmovg	%r15d, %ecx
	cmpl	$1, %r15d
	je	.L32
	movl	%ecx, %edx
	leaq	8+hanazawakana(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	shrl	%edx
	leaq	16(%rax), %rsi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L11
	movl	%ecx, %eax
	leaq	hanazawakana(%rip), %rbx
	orl	$1, %eax
	andb	$1, %cl
	je	.L12
.L10:
	leaq	hanazawakana(%rip), %rbx
	cltq
	movabsq	$-77777777777777777, %rsi
	movq	%rsi, (%rbx,%rax,8)
.L12:
	movslq	%r15d, %rax
	testl	%r15d, %r15d
	movl	$1, %edx
	cmovg	%rax, %rdx
	leaq	1+hayamisaori(%rip), %rdi
	xorl	%esi, %esi
	movq	%rax, 8(%rsp)
	call	memset@PLT
.L9:
	movq	8(%rsp), %rax
	leaq	hayamisaori(%rip), %r14
	movq	$0, 8+hanazawakana(%rip)
	movb	$1, (%r14,%rax)
	testl	%r12d, %r12d
	jle	.L13
	xorl	%r11d, %r11d
	leaq	B(%rip), %r13
	movslq	%r12d, %r9
	movabsq	$-77777777777777776, %r8
	leaq	A(%rip), %rbp
	leaq	C(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	0(%rbp,%rax,4), %rsi
	movslq	0(%r13,%rax,4), %rcx
	movq	(%rbx,%rsi,8), %rdi
	cmpq	%r8, %rdi
	jl	.L14
	movslq	(%r10,%rax,4), %rdx
	addq	%rdi, %rdx
	movabsq	$-77777777777777777, %rdi
	cmpq	%rdi, %rdx
	cmovl	%rdi, %rdx
	movabsq	$77777777777777777, %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	cmpq	%rdx, (%rbx,%rcx,8)
	jge	.L14
	movq	%rdx, (%rbx,%rcx,8)
.L14:
	cmpb	$0, (%r14,%rcx)
	je	.L15
	movb	$1, (%r14,%rsi)
.L15:
	addq	$1, %rax
	cmpq	%rax, %r9
	jne	.L16
	addl	$1, %r11d
	cmpl	%r11d, %r12d
	jne	.L17
	testl	%r15d, %r15d
	jle	.L29
	movq	8(%rsp), %rax
	leaq	8+hanazawakana(%rip), %rsi
	leaq	8+igutiyuka(%rip), %rdi
	leaq	0(,%rax,8), %rdx
	call	memcpy@PLT
.L29:
	xorl	%r8d, %r8d
	leaq	C(%rip), %rdi
	movabsq	$-77777777777777776, %rsi
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	0(%rbp,%rdx,4), %rax
	movq	(%rbx,%rax,8), %rcx
	cmpq	%rsi, %rcx
	jl	.L21
	movslq	(%rdi,%rdx,4), %rax
	addq	%rcx, %rax
	movabsq	$-77777777777777777, %rcx
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movabsq	$77777777777777777, %rcx
	cmpq	%rcx, %rax
	cmovg	%rcx, %rax
	movslq	0(%r13,%rdx,4), %rcx
	cmpq	%rax, (%rbx,%rcx,8)
	jge	.L21
	movq	%rax, (%rbx,%rcx,8)
.L21:
	addq	$1, %rdx
	cmpl	%edx, %r12d
	jg	.L22
	addl	$1, %r8d
	cmpl	%r8d, %r12d
	jg	.L20
	testl	%r15d, %r15d
	jle	.L26
.L19:
	movl	$1, %eax
	leaq	igutiyuka(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	cmpb	$0, (%r14,%rax)
	je	.L24
	movq	(%rdx,%rax,8), %rsi
	cmpq	%rsi, (%rbx,%rax,8)
	jg	.L48
.L24:
	addq	$1, %rax
	cmpl	%eax, %r15d
	jge	.L25
.L26:
	movq	8(%rsp), %rax
	xorl	%edx, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movq	(%rbx,%rax,8), %rax
	testq	%rax, %rax
	cmovns	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L3
.L48:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L3
.L6:
	movl	N(%rip), %r15d
	testl	%r15d, %r15d
	jg	.L27
	movq	$0, 8+hanazawakana(%rip)
	movslq	%r15d, %rax
	movq	%rax, %rbx
	movq	%rax, 8(%rsp)
	leaq	hayamisaori(%rip), %rax
	movb	$1, (%rax,%rbx)
	leaq	hanazawakana(%rip), %rbx
	jmp	.L26
.L47:
	movslq	%r15d, %rax
	leaq	hanazawakana(%rip), %rbx
	movq	%rax, 8(%rsp)
	jmp	.L9
.L13:
	testl	%r15d, %r15d
	jle	.L26
	movq	8(%rsp), %rax
	leaq	8+hanazawakana(%rip), %rsi
	leaq	8+igutiyuka(%rip), %rdi
	leaq	0(,%rax,8), %rdx
	call	memcpy@PLT
	jmp	.L19
.L32:
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	igutiyuka
	.bss
	.align 32
	.type	igutiyuka, @object
	.size	igutiyuka, 62216
igutiyuka:
	.zero	62216
	.globl	hayamisaori
	.align 32
	.type	hayamisaori, @object
	.size	hayamisaori, 7777
hayamisaori:
	.zero	7777
	.globl	hanazawakana
	.align 32
	.type	hanazawakana, @object
	.size	hanazawakana, 62216
hanazawakana:
	.zero	62216
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 31108
C:
	.zero	31108
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 31108
B:
	.zero	31108
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 31108
A:
	.zero	31108
	.globl	P
	.align 4
	.type	P, @object
	.size	P, 4
P:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.quad	-77777777777777777
	.quad	-77777777777777777
	.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	kugyu
	.type	kugyu, @function
kugyu:
.LFB23:
	.cfi_startproc
	endbr64
	movabsq	$-77777777777777777, %rdx
	leaq	(%rdi,%rsi), %rax
	cmpq	%rdx, %rax
	cmovl	%rdx, %rax
	movabsq	$77777777777777777, %rdx
	cmpq	%rdx, %rax
	cmovg	%rdx, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	kugyu, .-kugyu
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d%d"
.LC2:
	.string	"%ld\n"
.LC3:
	.string	"-1"
	.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
	leaq	P(%rip), %rcx
	leaq	M(%rip), %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	N(%rip), %rsi
	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
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	jne	.L7
	movl	M(%rip), %r12d
	testl	%r12d, %r12d
	jle	.L6
	leaq	C(%rip), %r14
	xorl	%r15d, %r15d
	leaq	B(%rip), %r13
	leaq	A(%rip), %rbp
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L46:
	movl	M(%rip), %r12d
	addq	$1, %r15
	movl	P(%rip), %eax
	subl	%eax, (%r14)
	addq	$4, %r14
	cmpl	%r15d, %r12d
	jle	.L45
.L8:
	leaq	0(,%r15,4), %rsi
	xorl	%eax, %eax
	movq	%r14, %rcx
	movq	%rbx, %rdi
	leaq	0(%r13,%rsi), %rdx
	addq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L46
.L7:
	movl	$1, %eax
.L3:
	addq	$24, %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
.L45:
	.cfi_restore_state
	movl	N(%rip), %r15d
	testl	%r15d, %r15d
	jle	.L47
.L27:
	testl	%r15d, %r15d
	movl	$1, %ecx
	cmovg	%r15d, %ecx
	cmpl	$1, %r15d
	je	.L32
	movl	%ecx, %edx
	leaq	8+hanazawakana(%rip), %rax
	movdqa	.LC1(%rip), %xmm0
	shrl	%edx
	leaq	16(%rax), %rsi
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rsi, %rdx
	.p2align 4,,10
	.p2align 3
.L11:
	movups	%xmm0, (%rax)
	addq	$16, %rax
	cmpq	%rdx, %rax
	jne	.L11
	movl	%ecx, %eax
	leaq	hanazawakana(%rip), %rbx
	orl	$1, %eax
	andb	$1, %cl
	je	.L12
.L10:
	leaq	hanazawakana(%rip), %rbx
	cltq
	movabsq	$-77777777777777777, %rsi
	movq	%rsi, (%rbx,%rax,8)
.L12:
	movslq	%r15d, %rax
	testl	%r15d, %r15d
	movl	$1, %edx
	cmovg	%rax, %rdx
	leaq	1+hayamisaori(%rip), %rdi
	xorl	%esi, %esi
	movq	%rax, 8(%rsp)
	call	memset@PLT
.L9:
	movq	8(%rsp), %rax
	leaq	hayamisaori(%rip), %r14
	movq	$0, 8+hanazawakana(%rip)
	movb	$1, (%r14,%rax)
	testl	%r12d, %r12d
	jle	.L13
	xorl	%r11d, %r11d
	leaq	B(%rip), %r13
	movslq	%r12d, %r9
	movabsq	$-77777777777777776, %r8
	leaq	A(%rip), %rbp
	leaq	C(%rip), %r10
	.p2align 4,,10
	.p2align 3
.L17:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	0(%rbp,%rax,4), %rsi
	movslq	0(%r13,%rax,4), %rcx
	movq	(%rbx,%rsi,8), %rdi
	cmpq	%r8, %rdi
	jl	.L14
	movslq	(%r10,%rax,4), %rdx
	addq	%rdi, %rdx
	movabsq	$-77777777777777777, %rdi
	cmpq	%rdi, %rdx
	cmovl	%rdi, %rdx
	movabsq	$77777777777777777, %rdi
	cmpq	%rdi, %rdx
	cmovg	%rdi, %rdx
	cmpq	%rdx, (%rbx,%rcx,8)
	jge	.L14
	movq	%rdx, (%rbx,%rcx,8)
.L14:
	cmpb	$0, (%r14,%rcx)
	je	.L15
	movb	$1, (%r14,%rsi)
.L15:
	addq	$1, %rax
	cmpq	%rax, %r9
	jne	.L16
	addl	$1, %r11d
	cmpl	%r11d, %r12d
	jne	.L17
	testl	%r15d, %r15d
	jle	.L29
	movq	8(%rsp), %rax
	leaq	8+hanazawakana(%rip), %rsi
	leaq	8+igutiyuka(%rip), %rdi
	leaq	0(,%rax,8), %rdx
	call	memcpy@PLT
.L29:
	xorl	%r8d, %r8d
	leaq	C(%rip), %rdi
	movabsq	$-77777777777777776, %rsi
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L22:
	movslq	0(%rbp,%rdx,4), %rax
	movq	(%rbx,%rax,8), %rcx
	cmpq	%rsi, %rcx
	jl	.L21
	movslq	(%rdi,%rdx,4), %rax
	addq	%rcx, %rax
	movabsq	$-77777777777777777, %rcx
	cmpq	%rcx, %rax
	cmovl	%rcx, %rax
	movabsq	$77777777777777777, %rcx
	cmpq	%rcx, %rax
	cmovg	%rcx, %rax
	movslq	0(%r13,%rdx,4), %rcx
	cmpq	%rax, (%rbx,%rcx,8)
	jge	.L21
	movq	%rax, (%rbx,%rcx,8)
.L21:
	addq	$1, %rdx
	cmpl	%edx, %r12d
	jg	.L22
	addl	$1, %r8d
	cmpl	%r8d, %r12d
	jg	.L20
	testl	%r15d, %r15d
	jle	.L26
.L19:
	movl	$1, %eax
	leaq	igutiyuka(%rip), %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	cmpb	$0, (%r14,%rax)
	je	.L24
	movq	(%rdx,%rax,8), %rsi
	cmpq	%rsi, (%rbx,%rax,8)
	jg	.L48
.L24:
	addq	$1, %rax
	cmpl	%eax, %r15d
	jge	.L25
.L26:
	movq	8(%rsp), %rax
	xorl	%edx, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	movq	(%rbx,%rax,8), %rax
	testq	%rax, %rax
	cmovns	%rax, %rdx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	jmp	.L3
.L48:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	xorl	%eax, %eax
	jmp	.L3
.L6:
	movl	N(%rip), %r15d
	testl	%r15d, %r15d
	jg	.L27
	movq	$0, 8+hanazawakana(%rip)
	movslq	%r15d, %rax
	movq	%rax, %rbx
	movq	%rax, 8(%rsp)
	leaq	hayamisaori(%rip), %rax
	movb	$1, (%rax,%rbx)
	leaq	hanazawakana(%rip), %rbx
	jmp	.L26
.L47:
	movslq	%r15d, %rax
	leaq	hanazawakana(%rip), %rbx
	movq	%rax, 8(%rsp)
	jmp	.L9
.L13:
	testl	%r15d, %r15d
	jle	.L26
	movq	8(%rsp), %rax
	leaq	8+hanazawakana(%rip), %rsi
	leaq	8+igutiyuka(%rip), %rdi
	leaq	0(,%rax,8), %rdx
	call	memcpy@PLT
	jmp	.L19
.L32:
	movl	$1, %eax
	jmp	.L10
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	igutiyuka
	.bss
	.align 32
	.type	igutiyuka, @object
	.size	igutiyuka, 62216
igutiyuka:
	.zero	62216
	.globl	hayamisaori
	.align 32
	.type	hayamisaori, @object
	.size	hayamisaori, 7777
hayamisaori:
	.zero	7777
	.globl	hanazawakana
	.align 32
	.type	hanazawakana, @object
	.size	hanazawakana, 62216
hanazawakana:
	.zero	62216
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 31108
C:
	.zero	31108
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 31108
B:
	.zero	31108
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 31108
A:
	.zero	31108
	.globl	P
	.align 4
	.type	P, @object
	.size	P, 4
P:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	N
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.quad	-77777777777777777
	.quad	-77777777777777777
	.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 <inttypes.h>

#define INF INT64_C(77777777777777777)

int64_t kugyu(int64_t sakura, int64_t oonisi) {
	int64_t nadukakaori = sakura + oonisi;
	if (nadukakaori > INF) nadukakaori = INF;
	if (nadukakaori < -INF) nadukakaori = -INF;
	return nadukakaori;
}

int N, M, P;
int A[7777], B[7777], C[7777];

int64_t hanazawakana[7777];
char hayamisaori[7777];
int64_t igutiyuka[7777];


int main(void) {
	int i;
	if (scanf("%d%d%d", &N, &M, &P) != 3) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d%d", &A[i], &B[i], &C[i]) != 3) return 1;
		C[i] -= P;
	}
	/* 最大スコア探索と、ゴールに行けるか判定 */
	for (i = 1; i <= N; i++) {
		hanazawakana[i] = -INF;
		hayamisaori[i] = 0;
	}
	hanazawakana[1] = 0;
	hayamisaori[N] = 1;
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
			if (hayamisaori[B[j]]) hayamisaori[A[j]] = 1;
		}
	}
	/* この時点での最大スコアを保存して */
	for (i = 1; i <= N; i++) igutiyuka[i] = hanazawakana[i];
	/* スコアがもっと伸びるかをチェックする */
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
		}
	}
	for (i = 1; i <= N; i++) {
		if (hayamisaori[i] && hanazawakana[i] > igutiyuka[i]) {
			puts("-1");
			return 0;
		}
	}
	printf("%" PRId64 "\n", hanazawakana[N] < 0 ? 0 : hanazawakana[N]);
	return 0;
}

/*

3 4 0
1 3 100000
1 2 1
2 2 1
2 3 1

*/

4 5 10
1 2 1
1 4 1
2 4 1
2 2 100
3 3 100
 2 1 10
1 2 100
2 2 100
 4 5 10
1 2 1
1 4 1
3 4 1
2 2 101
3 3 100
 3 3 10
1 2 20
2 3 56
1 3 45
 4 5 10
2 2 2
1 4 -1
3 4 0
1 4 101
3 3 100
 4 1 2
1 4 3
2 2 1
2 1 1
2 1 100
3 3 100
 4 5 10
1 3 2
2 4 1
2 1 1
2 1 100
3 4 110
 3 3 10
1 2 20
2 3 86
1 3 45
 4 5 10
1 2 1
1 4 1
3 1 1
2 4 100
3 3 100
 3 3 10
1 2 20
1 3 86
1 3 45

-1
 90
 0
 56
 91
 1
 92
 86
 81
 76

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 <inttypes.h>

#define INF INT64_C(77777777777777777)

int64_t kugyu(int64_t sakura, int64_t oonisi) {
	int64_t nadukakaori = sakura + oonisi;
	if (nadukakaori > INF) nadukakaori = INF;
	if (nadukakaori < -INF) nadukakaori = -INF;
	return nadukakaori;
}

int N, M, P;
int A[7777], B[7777], C[7777];

int64_t hanazawakana[7777];
char hayamisaori[7777];
int64_t igutiyuka[7777];


int main(void) {
	int i;
	if (scanf("%d%d%d", &N, &M, &P) != 3) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d%d", &A[i], &B[i], &C[i]) != 3) return 1;
		C[i] -= P;
	}
	/* 最大スコア探索と、ゴールに行けるか判定 */
	for (i = 1; i <= N; i++) {
		hanazawakana[i] = -INF;
		hayamisaori[i] = 0;
	}
	hanazawakana[1] = 0;
	hayamisaori[N] = 1;
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
			if (hayamisaori[B[j]]) hayamisaori[A[j]] = 1;
		}
	}
	/* この時点での最大スコアを保存して */
	for (i = 1; i <= N; i++) igutiyuka[i] = hanazawakana[i];
	/* スコアがもっと伸びるかをチェックする */
	for (i = 0; i < M; i++) {
		int j;
		for (j = 0; j < M; j++) {
			if (hanazawakana[A[j]] > -INF && kugyu(hanazawakana[A[j]], C[j]) > hanazawakana[B[j]]) {
				hanazawakana[B[j]] = kugyu(hanazawakana[A[j]], C[j]);
			}
		}
	}
	for (i = 1; i <= N; i++) {
		if (hayamisaori[i] && hanazawakana[i] > igutiyuka[i]) {
			puts("-1");
			return 0;
		}
	}
	printf("%" PRId64 "\n", hanazawakana[N] < 0 ? 0 : hanazawakana[N]);
	return 0;
}

/*

3 4 0
1 3 100000
1 2 1
2 2 1
2 3 1

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	kugyu
	.type	kugyu, @function
kugyu:
.LFB0:
	.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	$77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jle	.L2
	movabsq	$77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L2:
	movabsq	$-77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jge	.L3
	movabsq	$-77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	kugyu, .-kugyu
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	P
	.align 4
	.type	P, @object
	.size	P, 4
P:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 31108
A:
	.zero	31108
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 31108
B:
	.zero	31108
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 31108
C:
	.zero	31108
	.globl	hanazawakana
	.align 32
	.type	hanazawakana, @object
	.size	hanazawakana, 62216
hanazawakana:
	.zero	62216
	.globl	hayamisaori
	.align 32
	.type	hayamisaori, @object
	.size	hayamisaori, 7777
hayamisaori:
	.zero	7777
	.globl	igutiyuka
	.align 32
	.type	igutiyuka, @object
	.size	igutiyuka, 62216
igutiyuka:
	.zero	62216
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%ld\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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	P(%rip), %rax
	movq	%rax, %rcx
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -28(%rbp)
	jmp	.L8
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	A(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	P(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L10
	movl	$1, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movabsq	$-77777777777777777, %rbx
	movq	%rbx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L11:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movq	$0, 8+hanazawakana(%rip)
	movl	N(%rip), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L13
.L18:
	movl	$0, -24(%rbp)
	jmp	.L14
.L17:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-24(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L15:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L16:
	addl	$1, -24(%rbp)
.L14:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
	addl	$1, -28(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$1, -28(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	igutiyuka(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	$0, -28(%rbp)
	jmp	.L21
.L25:
	movl	$0, -20(%rbp)
	jmp	.L22
.L24:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L23:
	addl	$1, -20(%rbp)
.L22:
	movl	M(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L24
	addl	$1, -28(%rbp)
.L21:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L25
	movl	$1, -28(%rbp)
	jmp	.L26
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L27
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	igutiyuka(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L27:
	addl	$1, -28(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L28
	movl	N(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$0, %edx
	testq	%rax, %rax
	cmovs	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rbx
	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	kugyu
	.type	kugyu, @function
kugyu:
.LFB0:
	.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	$77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jle	.L2
	movabsq	$77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L2:
	movabsq	$-77777777777777777, %rax
	cmpq	%rax, -8(%rbp)
	jge	.L3
	movabsq	$-77777777777777777, %rax
	movq	%rax, -8(%rbp)
.L3:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	kugyu, .-kugyu
	.globl	N
	.bss
	.align 4
	.type	N, @object
	.size	N, 4
N:
	.zero	4
	.globl	M
	.align 4
	.type	M, @object
	.size	M, 4
M:
	.zero	4
	.globl	P
	.align 4
	.type	P, @object
	.size	P, 4
P:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 31108
A:
	.zero	31108
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 31108
B:
	.zero	31108
	.globl	C
	.align 32
	.type	C, @object
	.size	C, 31108
C:
	.zero	31108
	.globl	hanazawakana
	.align 32
	.type	hanazawakana, @object
	.size	hanazawakana, 62216
hanazawakana:
	.zero	62216
	.globl	hayamisaori
	.align 32
	.type	hayamisaori, @object
	.size	hayamisaori, 7777
hayamisaori:
	.zero	7777
	.globl	igutiyuka
	.align 32
	.type	igutiyuka, @object
	.size	igutiyuka, 62216
igutiyuka:
	.zero	62216
	.section	.rodata
.LC0:
	.string	"%d%d%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%ld\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
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	P(%rip), %rax
	movq	%rax, %rcx
	leaq	M(%rip), %rax
	movq	%rax, %rdx
	leaq	N(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -28(%rbp)
	jmp	.L8
.L10:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	leaq	(%rdx,%rax), %rcx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	A(%rip), %rax
	addq	%rsi, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$3, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	P(%rip), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -28(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L10
	movl	$1, -28(%rbp)
	jmp	.L11
.L12:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movabsq	$-77777777777777777, %rbx
	movq	%rbx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -28(%rbp)
.L11:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L12
	movq	$0, 8+hanazawakana(%rip)
	movl	N(%rip), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L13
.L18:
	movl	$0, -24(%rbp)
	jmp	.L14
.L17:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-24(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L15
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-24(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L15:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L16
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movb	$1, (%rax,%rdx)
.L16:
	addl	$1, -24(%rbp)
.L14:
	movl	M(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L17
	addl	$1, -28(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$1, -28(%rbp)
	jmp	.L19
.L20:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	igutiyuka(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L19:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L20
	movl	$0, -28(%rbp)
	jmp	.L21
.L25:
	movl	$0, -20(%rbp)
	jmp	.L22
.L24:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movabsq	$-77777777777777776, %rdx
	cmpq	%rdx, %rax
	jl	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	(%rcx,%rdx), %rdx
	cmpq	%rdx, %rax
	jle	.L23
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	C(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	hanazawakana(%rip), %rax
	movq	(%rcx,%rax), %rax
	movl	-20(%rbp), %ecx
	movslq	%ecx, %rcx
	leaq	0(,%rcx,4), %rsi
	leaq	B(%rip), %rcx
	movl	(%rsi,%rcx), %ebx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	kugyu
	movslq	%ebx, %rdx
	leaq	0(,%rdx,8), %rcx
	leaq	hanazawakana(%rip), %rdx
	movq	%rax, (%rcx,%rdx)
.L23:
	addl	$1, -20(%rbp)
.L22:
	movl	M(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L24
	addl	$1, -28(%rbp)
.L21:
	movl	M(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L25
	movl	$1, -28(%rbp)
	jmp	.L26
.L28:
	movl	-28(%rbp), %eax
	cltq
	leaq	hayamisaori(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	je	.L27
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	leaq	igutiyuka(%rip), %rax
	movq	(%rcx,%rax), %rax
	cmpq	%rax, %rdx
	jle	.L27
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L7
.L27:
	addl	$1, -28(%rbp)
.L26:
	movl	N(%rip), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L28
	movl	N(%rip), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	leaq	hanazawakana(%rip), %rax
	movq	(%rdx,%rax), %rax
	movl	$0, %edx
	testq	%rax, %rax
	cmovs	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rbx
	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:
