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>

struct si_t {
	int P, Y;
	int idx;
};

int kitaeri(const void* x, const void* y) {
	int a = ((const struct si_t*)x)->Y, b = ((const struct si_t*)y)->Y;
	return a < b ? -1 : a > b;
}

int N, M;
struct si_t si[114514];

int yakusimaruhiroko[114514];
int yosinagasayuri[114514];
int takagireni[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d", &si[i].P, &si[i].Y) != 2) return 1;
		si[i].idx = i;
	}
	qsort(si, M, sizeof(*si), kitaeri);
	for (i = 0; i < M; i++) {
		yosinagasayuri[si[i].idx] = ++yakusimaruhiroko[si[i].P];
		takagireni[si[i].idx] = si[i].P;
	}
	for (i = 0; i < M; i++) {
		printf("%06d%06d\n", takagireni[i], yosinagasayuri[i]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	kitaeri
	.type	kitaeri, @function
kitaeri:
.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), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	kitaeri, .-kitaeri
	.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	si
	.align 32
	.type	si, @object
	.size	si, 1374168
si:
	.zero	1374168
	.globl	yakusimaruhiroko
	.align 32
	.type	yakusimaruhiroko, @object
	.size	yakusimaruhiroko, 458056
yakusimaruhiroko:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	takagireni
	.align 32
	.type	takagireni, @object
	.size	takagireni, 458056
takagireni:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%06d%06d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	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	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	movl	M(%rip), %eax
	cltq
	leaq	kitaeri(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	si(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	%esi, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	yosinagasayuri(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+si(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	takagireni(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L11:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	takagireni(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	kitaeri
	.type	kitaeri, @function
kitaeri:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	cmpl	%eax, 4(%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	kitaeri, .-kitaeri
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%06d%06d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	xorl	%eax, %eax
	leaq	M(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	N(%rip), %rsi
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L9
	movslq	M(%rip), %rsi
	leaq	si(%rip), %r12
	xorl	%ebp, %ebp
	movq	%r12, %rbx
	testl	%esi, %esi
	jg	.L10
.L8:
	movl	$12, %edx
	leaq	kitaeri(%rip), %rcx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	jle	.L14
	leal	-1(%rdx), %r8d
	leaq	si(%rip), %rax
	imulq	$12, %r8, %r8
	leaq	12(%rax), %rdx
	leaq	yakusimaruhiroko(%rip), %rdi
	leaq	yosinagasayuri(%rip), %rbp
	leaq	takagireni(%rip), %r12
	addq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	(%rax), %rcx
	addq	$12, %rax
	movl	(%rdi,%rcx,4), %ebx
	movq	%rcx, %rsi
	leal	1(%rbx), %edx
	movl	%edx, (%rdi,%rcx,4)
	movslq	-4(%rax), %rcx
	movl	%edx, 0(%rbp,%rcx,4)
	movl	%esi, (%r12,%rcx,4)
	cmpq	%r8, %rax
	jne	.L12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%rbp,%rbx,4), %ecx
	movl	(%r12,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, M(%rip)
	jg	.L13
.L14:
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	M(%rip), %rsi
	movl	%ebp, 8(%rbx)
	addl	$1, %ebp
	addq	$12, %rbx
	cmpl	%ebp, %esi
	jle	.L8
.L10:
	xorl	%eax, %eax
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L21
.L9:
	movl	$1, %eax
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	takagireni
	.bss
	.align 32
	.type	takagireni, @object
	.size	takagireni, 458056
takagireni:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	yakusimaruhiroko
	.align 32
	.type	yakusimaruhiroko, @object
	.size	yakusimaruhiroko, 458056
yakusimaruhiroko:
	.zero	458056
	.globl	si
	.align 32
	.type	si, @object
	.size	si, 1374168
si:
	.zero	1374168
	.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
	.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	kitaeri
	.type	kitaeri, @function
kitaeri:
.LFB39:
	.cfi_startproc
	endbr64
	movl	4(%rsi), %eax
	cmpl	%eax, 4(%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	kitaeri, .-kitaeri
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%06d%06d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC0(%rip), %r13
	xorl	%eax, %eax
	leaq	M(%rip), %rdx
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	N(%rip), %rsi
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L9
	movslq	M(%rip), %rsi
	leaq	si(%rip), %r12
	xorl	%ebp, %ebp
	movq	%r12, %rbx
	testl	%esi, %esi
	jg	.L10
.L8:
	movl	$12, %edx
	leaq	kitaeri(%rip), %rcx
	movq	%r12, %rdi
	call	qsort@PLT
	movl	M(%rip), %edx
	testl	%edx, %edx
	jle	.L14
	leal	-1(%rdx), %r8d
	leaq	si(%rip), %rax
	imulq	$12, %r8, %r8
	leaq	12(%rax), %rdx
	leaq	yakusimaruhiroko(%rip), %rdi
	leaq	yosinagasayuri(%rip), %rbp
	leaq	takagireni(%rip), %r12
	addq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movslq	(%rax), %rcx
	addq	$12, %rax
	movl	(%rdi,%rcx,4), %ebx
	movq	%rcx, %rsi
	leal	1(%rbx), %edx
	movl	%edx, (%rdi,%rcx,4)
	movslq	-4(%rax), %rcx
	movl	%edx, 0(%rbp,%rcx,4)
	movl	%esi, (%r12,%rcx,4)
	cmpq	%r8, %rax
	jne	.L12
	xorl	%ebx, %ebx
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L13:
	movl	0(%rbp,%rbx,4), %ecx
	movl	(%r12,%rbx,4), %edx
	xorl	%eax, %eax
	movq	%r13, %rsi
	movl	$1, %edi
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpl	%ebx, M(%rip)
	jg	.L13
.L14:
	xorl	%eax, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L21:
	movslq	M(%rip), %rsi
	movl	%ebp, 8(%rbx)
	addl	$1, %ebp
	addq	$12, %rbx
	cmpl	%ebp, %esi
	jle	.L8
.L10:
	xorl	%eax, %eax
	leaq	4(%rbx), %rdx
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L21
.L9:
	movl	$1, %eax
.L5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	takagireni
	.bss
	.align 32
	.type	takagireni, @object
	.size	takagireni, 458056
takagireni:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	yakusimaruhiroko
	.align 32
	.type	yakusimaruhiroko, @object
	.size	yakusimaruhiroko, 458056
yakusimaruhiroko:
	.zero	458056
	.globl	si
	.align 32
	.type	si, @object
	.size	si, 1374168
si:
	.zero	1374168
	.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
	.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>

struct si_t {
	int P, Y;
	int idx;
};

int kitaeri(const void* x, const void* y) {
	int a = ((const struct si_t*)x)->Y, b = ((const struct si_t*)y)->Y;
	return a < b ? -1 : a > b;
}

int N, M;
struct si_t si[114514];

int yakusimaruhiroko[114514];
int yosinagasayuri[114514];
int takagireni[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d", &si[i].P, &si[i].Y) != 2) return 1;
		si[i].idx = i;
	}
	qsort(si, M, sizeof(*si), kitaeri);
	for (i = 0; i < M; i++) {
		yosinagasayuri[si[i].idx] = ++yakusimaruhiroko[si[i].P];
		takagireni[si[i].idx] = si[i].P;
	}
	for (i = 0; i < M; i++) {
		printf("%06d%06d\n", takagireni[i], yosinagasayuri[i]);
	}
	return 0;
}

2 3
1 55
2 77
2 99
 2 3
2 32
2 63
1 12
 2 1
2 55
2 77
2 99
 2 2
2 55
2 77
2 99
 2 3
2 55
2 77
2 195
 2 3
1 32
2 63
1 6
 2 3
2 39
2 16
1 12
 2 2
2 55
2 29
2 195
 2 3
2 96
2 77
2 195
 2 1
1 16
2 77
2 195

000001000001
000002000001
000002000002
 000002000001
000002000002
000001000001
 000002000001
 000002000001
000002000002
 000002000001
000002000002
000002000003
 000001000002
000002000001
000001000001
 000002000002
000002000001
000001000001
 000002000002
000002000001
 000002000002
000002000001
000002000003
 000001000001

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>

struct si_t {
	int P, Y;
	int idx;
};

int kitaeri(const void* x, const void* y) {
	int a = ((const struct si_t*)x)->Y, b = ((const struct si_t*)y)->Y;
	return a < b ? -1 : a > b;
}

int N, M;
struct si_t si[114514];

int yakusimaruhiroko[114514];
int yosinagasayuri[114514];
int takagireni[114514];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &M) != 2) return 1;
	for (i = 0; i < M; i++) {
		if (scanf("%d%d", &si[i].P, &si[i].Y) != 2) return 1;
		si[i].idx = i;
	}
	qsort(si, M, sizeof(*si), kitaeri);
	for (i = 0; i < M; i++) {
		yosinagasayuri[si[i].idx] = ++yakusimaruhiroko[si[i].P];
		takagireni[si[i].idx] = si[i].P;
	}
	for (i = 0; i < M; i++) {
		printf("%06d%06d\n", takagireni[i], yosinagasayuri[i]);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	kitaeri
	.type	kitaeri, @function
kitaeri:
.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), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	kitaeri, .-kitaeri
	.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	si
	.align 32
	.type	si, @object
	.size	si, 1374168
si:
	.zero	1374168
	.globl	yakusimaruhiroko
	.align 32
	.type	yakusimaruhiroko, @object
	.size	yakusimaruhiroko, 458056
yakusimaruhiroko:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	takagireni
	.align 32
	.type	takagireni, @object
	.size	takagireni, 458056
takagireni:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%06d%06d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	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	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	movl	M(%rip), %eax
	cltq
	leaq	kitaeri(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	si(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	%esi, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	yosinagasayuri(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+si(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	takagireni(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L11:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	takagireni(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	kitaeri
	.type	kitaeri, @function
kitaeri:
.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), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jl	.L2
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	kitaeri, .-kitaeri
	.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	si
	.align 32
	.type	si, @object
	.size	si, 1374168
si:
	.zero	1374168
	.globl	yakusimaruhiroko
	.align 32
	.type	yakusimaruhiroko, @object
	.size	yakusimaruhiroko, 458056
yakusimaruhiroko:
	.zero	458056
	.globl	yosinagasayuri
	.align 32
	.type	yosinagasayuri, @object
	.size	yosinagasayuri, 458056
yosinagasayuri:
	.zero	458056
	.globl	takagireni
	.align 32
	.type	takagireni, @object
	.size	takagireni, 458056
takagireni:
	.zero	458056
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%06d%06d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	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	$2, %eax
	je	.L6
	movl	$1, %eax
	jmp	.L7
.L6:
	movl	$0, -4(%rbp)
	jmp	.L8
.L10:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rdx
	addq	%rdx, %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	leaq	si(%rip), %rcx
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L9
	movl	$1, %eax
	jmp	.L7
.L9:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L8:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L10
	movl	M(%rip), %eax
	cltq
	leaq	kitaeri(%rip), %rdx
	movq	%rdx, %rcx
	movl	$12, %edx
	movq	%rax, %rsi
	leaq	si(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %esi
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	%esi, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+si(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	yakusimaruhiroko(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	yosinagasayuri(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+si(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	si(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%ecx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	takagireni(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -4(%rbp)
.L11:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	yosinagasayuri(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	takagireni(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L13:
	movl	M(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L14
	movl	$0, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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:
