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

```c
/*
 * main.c
 *
 *  Created on: 2019/02/20
 *      Author: family
 */

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

typedef struct {
	int p;
	int year;
	int no;
	int seq_num;
} city_data_t;

city_data_t data[100001] = {0};

int sort_inc_year(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->year;
	int dtb = ((city_data_t*)b)->year;
	//printf("%llu %llu\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_no(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->no;
	int dtb = ((city_data_t*)b)->no;
	//printf("%d %d\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_pref(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->p;
	int dtb = ((city_data_t*)b)->p;
	//printf("%d %d\n",dta, dtb);
	if (dta == dtb) {
		dta = ((city_data_t*)a)->year;
		dtb = ((city_data_t*)b)->year;
	}
	return (dta - dtb);
}

void printdata(int m)
{
	int i = 0;
	for(i = 0; i < m; i++) {
		printf("p=%d,y=%llu,n=%d\n", data[i].p, data[i].year, data[i].no);
	}
}

int main()
{
	int n_pref = 0;
	int m_city = 0;
	int i = 0;
	int v = 1;
	int pref_no = 0;
	scanf("%d %d", &n_pref, &m_city);
	for(i = 0; i < m_city; i++) {
		int a = 0;
		unsigned long long int b = 0;
		scanf("%d %llu", &a, &b);
		data[i].p = a;
		data[i].year = b;
		data[i].no = i;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_pref);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		if(pref_no != data[i].p) {
			v = 1;
			pref_no = data[i].p;
		}
		data[i].seq_num = v++;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_no);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		printf("%06d%06d\n",data[i].p,data[i].seq_num);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 1600016
data:
	.zero	1600016
	.text
	.globl	sort_inc_year
	.type	sort_inc_year, @function
sort_inc_year:
.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
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sort_inc_year, .-sort_inc_year
	.globl	sort_inc_no
	.type	sort_inc_no, @function
sort_inc_no:
.LFB7:
	.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	8(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_inc_no, .-sort_inc_no
	.globl	sort_inc_pref
	.type	sort_inc_pref, @function
sort_inc_pref:
.LFB8:
	.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	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L6
	movq	-24(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
.L6:
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sort_inc_pref, .-sort_inc_pref
	.section	.rodata
.LC0:
	.string	"p=%d,y=%llu,n=%d\n"
	.text
	.globl	printdata
	.type	printdata, @function
printdata:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+data(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printdata, .-printdata
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %llu"
.LC3:
	.string	"%06d%06d\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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L12
.L13:
	movl	$0, -32(%rbp)
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+data(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L13
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_pref(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L14
.L16:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	je	.L15
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
.L15:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	12+data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_no(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L17
.L18:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	data(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L17:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	sort_inc_no
	.type	sort_inc_no, @function
sort_inc_no:
.LFB52:
	.cfi_startproc
	endbr64
	movl	8(%rdi), %eax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	sort_inc_no, .-sort_inc_no
	.p2align 4
	.globl	sort_inc_pref
	.type	sort_inc_pref, @function
sort_inc_pref:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	movl	(%rsi), %edx
	cmpl	%edx, %eax
	jne	.L4
	movl	4(%rdi), %eax
	movl	4(%rsi), %edx
.L4:
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	sort_inc_pref, .-sort_inc_pref
	.p2align 4
	.globl	sort_inc_year
	.type	sort_inc_year, @function
sort_inc_year:
.LFB51:
	.cfi_startproc
	endbr64
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	sort_inc_year, .-sort_inc_year
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"p=%d,y=%llu,n=%d\n"
	.text
	.p2align 4
	.globl	printdata
	.type	printdata, @function
printdata:
.LFB54:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	jle	.L11
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	data(%rip), %rbx
	salq	$4, %rbp
	leaq	16(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movl	4(%rbx), %ecx
	movl	8(%rbx), %r8d
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx), %edx
	xorl	%eax, %eax
	addq	$16, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L8
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE54:
	.size	printdata, .-printdata
	.section	.rodata.str1.1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %llu"
.LC3:
	.string	"%06d%06d\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
	leaq	.LC1(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	data(%rip), %r14
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	leaq	8(%rsp), %rdx
	movl	$0, 4(%rsp)
	movl	$0, 8(%rsp)
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L15
	movq	%r14, %rbp
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	movl	$0, 12(%rsp)
	addq	$16, %rbp
	movq	$0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movd	12(%rsp), %xmm0
	movd	16(%rsp), %xmm1
	movl	%ebx, -8(%rbp)
	addl	$1, %ebx
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -16(%rbp)
	movslq	8(%rsp), %rsi
	cmpl	%ebx, %esi
	jg	.L16
.L15:
	leaq	sort_inc_pref(%rip), %rcx
	movl	$16, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L22
	leaq	data(%rip), %rax
	leal	-1(%rsi), %r8d
	xorl	%ecx, %ecx
	movl	$1, %edi
	leaq	16(%rax), %rdx
	salq	$4, %r8
	addq	%rdx, %r8
	movl	(%rax), %edx
	cmpl	%ecx, %edx
	je	.L33
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, 12(%rax)
	addq	$16, %rax
	cmpq	%rax, %r8
	je	.L22
	movl	$2, %edi
	movl	%edx, %ecx
.L34:
	movl	(%rax), %edx
	cmpl	%ecx, %edx
	jne	.L20
.L33:
	movl	%edi, 12(%rax)
	addq	$16, %rax
	leal	1(%rdi), %ecx
	cmpq	%rax, %r8
	je	.L22
	movl	%ecx, %edi
	movl	%edx, %ecx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	sort_inc_no(%rip), %rcx
	movl	$16, %edx
	movq	%r14, %rdi
	xorl	%ebp, %ebp
	call	qsort@PLT
	movl	8(%rsp), %eax
	leaq	data(%rip), %rbx
	leaq	.LC3(%rip), %r12
	testl	%eax, %eax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rbx), %ecx
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$16, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 8(%rsp)
	jg	.L24
.L19:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 1600016
data:
	.zero	1600016
	.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	sort_inc_no
	.type	sort_inc_no, @function
sort_inc_no:
.LFB52:
	.cfi_startproc
	endbr64
	movl	8(%rdi), %eax
	subl	8(%rsi), %eax
	ret
	.cfi_endproc
.LFE52:
	.size	sort_inc_no, .-sort_inc_no
	.p2align 4
	.globl	sort_inc_pref
	.type	sort_inc_pref, @function
sort_inc_pref:
.LFB53:
	.cfi_startproc
	endbr64
	movl	(%rdi), %eax
	movl	(%rsi), %edx
	cmpl	%edx, %eax
	jne	.L4
	movl	4(%rdi), %eax
	movl	4(%rsi), %edx
.L4:
	subl	%edx, %eax
	ret
	.cfi_endproc
.LFE53:
	.size	sort_inc_pref, .-sort_inc_pref
	.p2align 4
	.globl	sort_inc_year
	.type	sort_inc_year, @function
sort_inc_year:
.LFB51:
	.cfi_startproc
	endbr64
	movl	4(%rdi), %eax
	subl	4(%rsi), %eax
	ret
	.cfi_endproc
.LFE51:
	.size	sort_inc_year, .-sort_inc_year
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"p=%d,y=%llu,n=%d\n"
	.text
	.p2align 4
	.globl	printdata
	.type	printdata, @function
printdata:
.LFB54:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	jle	.L11
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leal	-1(%rdi), %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	leaq	data(%rip), %rbx
	salq	$4, %rbp
	leaq	16(%rbx), %rax
	addq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L8:
	movl	4(%rbx), %ecx
	movl	8(%rbx), %r8d
	movq	%r12, %rsi
	movl	$1, %edi
	movl	(%rbx), %edx
	xorl	%eax, %eax
	addq	$16, %rbx
	call	__printf_chk@PLT
	cmpq	%rbp, %rbx
	jne	.L8
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	ret
	.cfi_endproc
.LFE54:
	.size	printdata, .-printdata
	.section	.rodata.str1.1
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %llu"
.LC3:
	.string	"%06d%06d\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
	leaq	.LC1(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	data(%rip), %r14
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	leaq	8(%rsp), %rdx
	movl	$0, 4(%rsp)
	movl	$0, 8(%rsp)
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L15
	movq	%r14, %rbp
	leaq	16(%rsp), %r15
	leaq	12(%rsp), %r13
	xorl	%ebx, %ebx
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	movl	$0, 12(%rsp)
	addq	$16, %rbp
	movq	$0, 16(%rsp)
	call	__isoc99_scanf@PLT
	movd	12(%rsp), %xmm0
	movd	16(%rsp), %xmm1
	movl	%ebx, -8(%rbp)
	addl	$1, %ebx
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, -16(%rbp)
	movslq	8(%rsp), %rsi
	cmpl	%ebx, %esi
	jg	.L16
.L15:
	leaq	sort_inc_pref(%rip), %rcx
	movl	$16, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movslq	8(%rsp), %rsi
	testl	%esi, %esi
	jle	.L22
	leaq	data(%rip), %rax
	leal	-1(%rsi), %r8d
	xorl	%ecx, %ecx
	movl	$1, %edi
	leaq	16(%rax), %rdx
	salq	$4, %r8
	addq	%rdx, %r8
	movl	(%rax), %edx
	cmpl	%ecx, %edx
	je	.L33
	.p2align 4,,10
	.p2align 3
.L20:
	movl	$1, 12(%rax)
	addq	$16, %rax
	cmpq	%rax, %r8
	je	.L22
	movl	$2, %edi
	movl	%edx, %ecx
.L34:
	movl	(%rax), %edx
	cmpl	%ecx, %edx
	jne	.L20
.L33:
	movl	%edi, 12(%rax)
	addq	$16, %rax
	leal	1(%rdi), %ecx
	cmpq	%rax, %r8
	je	.L22
	movl	%ecx, %edi
	movl	%edx, %ecx
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L22:
	leaq	sort_inc_no(%rip), %rcx
	movl	$16, %edx
	movq	%r14, %rdi
	xorl	%ebp, %ebp
	call	qsort@PLT
	movl	8(%rsp), %eax
	leaq	data(%rip), %rbx
	leaq	.LC3(%rip), %r12
	testl	%eax, %eax
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L24:
	movl	12(%rbx), %ecx
	movl	(%rbx), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebp
	addq	$16, %rbx
	call	__printf_chk@PLT
	cmpl	%ebp, 8(%rsp)
	jg	.L24
.L19:
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L35
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L35:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 1600016
data:
	.zero	1600016
	.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:

/*
 * main.c
 *
 *  Created on: 2019/02/20
 *      Author: family
 */

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

typedef struct {
	int p;
	int year;
	int no;
	int seq_num;
} city_data_t;

city_data_t data[100001] = {0};

int sort_inc_year(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->year;
	int dtb = ((city_data_t*)b)->year;
	//printf("%llu %llu\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_no(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->no;
	int dtb = ((city_data_t*)b)->no;
	//printf("%d %d\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_pref(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->p;
	int dtb = ((city_data_t*)b)->p;
	//printf("%d %d\n",dta, dtb);
	if (dta == dtb) {
		dta = ((city_data_t*)a)->year;
		dtb = ((city_data_t*)b)->year;
	}
	return (dta - dtb);
}

void printdata(int m)
{
	int i = 0;
	for(i = 0; i < m; i++) {
		printf("p=%d,y=%llu,n=%d\n", data[i].p, data[i].year, data[i].no);
	}
}

int main()
{
	int n_pref = 0;
	int m_city = 0;
	int i = 0;
	int v = 1;
	int pref_no = 0;
	scanf("%d %d", &n_pref, &m_city);
	for(i = 0; i < m_city; i++) {
		int a = 0;
		unsigned long long int b = 0;
		scanf("%d %llu", &a, &b);
		data[i].p = a;
		data[i].year = b;
		data[i].no = i;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_pref);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		if(pref_no != data[i].p) {
			v = 1;
			pref_no = data[i].p;
		}
		data[i].seq_num = v++;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_no);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		printf("%06d%06d\n",data[i].p,data[i].seq_num);
	}
	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
/*
 * main.c
 *
 *  Created on: 2019/02/20
 *      Author: family
 */

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

typedef struct {
	int p;
	int year;
	int no;
	int seq_num;
} city_data_t;

city_data_t data[100001] = {0};

int sort_inc_year(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->year;
	int dtb = ((city_data_t*)b)->year;
	//printf("%llu %llu\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_no(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->no;
	int dtb = ((city_data_t*)b)->no;
	//printf("%d %d\n",dta, dtb);
	return (dta - dtb);
}

int sort_inc_pref(const void *a, const void *b)
{
	int dta = ((city_data_t*)a)->p;
	int dtb = ((city_data_t*)b)->p;
	//printf("%d %d\n",dta, dtb);
	if (dta == dtb) {
		dta = ((city_data_t*)a)->year;
		dtb = ((city_data_t*)b)->year;
	}
	return (dta - dtb);
}

void printdata(int m)
{
	int i = 0;
	for(i = 0; i < m; i++) {
		printf("p=%d,y=%llu,n=%d\n", data[i].p, data[i].year, data[i].no);
	}
}

int main()
{
	int n_pref = 0;
	int m_city = 0;
	int i = 0;
	int v = 1;
	int pref_no = 0;
	scanf("%d %d", &n_pref, &m_city);
	for(i = 0; i < m_city; i++) {
		int a = 0;
		unsigned long long int b = 0;
		scanf("%d %llu", &a, &b);
		data[i].p = a;
		data[i].year = b;
		data[i].no = i;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_pref);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		if(pref_no != data[i].p) {
			v = 1;
			pref_no = data[i].p;
		}
		data[i].seq_num = v++;
	}
	qsort(data, m_city, sizeof(city_data_t), sort_inc_no);
	//printdata(m_city);
	for(i = 0; i < m_city; i++) {
		printf("%06d%06d\n",data[i].p,data[i].seq_num);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 1600016
data:
	.zero	1600016
	.text
	.globl	sort_inc_year
	.type	sort_inc_year, @function
sort_inc_year:
.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
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sort_inc_year, .-sort_inc_year
	.globl	sort_inc_no
	.type	sort_inc_no, @function
sort_inc_no:
.LFB7:
	.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	8(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_inc_no, .-sort_inc_no
	.globl	sort_inc_pref
	.type	sort_inc_pref, @function
sort_inc_pref:
.LFB8:
	.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	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L6
	movq	-24(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
.L6:
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sort_inc_pref, .-sort_inc_pref
	.section	.rodata
.LC0:
	.string	"p=%d,y=%llu,n=%d\n"
	.text
	.globl	printdata
	.type	printdata, @function
printdata:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+data(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printdata, .-printdata
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %llu"
.LC3:
	.string	"%06d%06d\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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L12
.L13:
	movl	$0, -32(%rbp)
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+data(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L13
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_pref(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L14
.L16:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	je	.L15
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
.L15:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	12+data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_no(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L17
.L18:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	data(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L17:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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.
train
	.file	"temp.c"
	.text
	.globl	data
	.bss
	.align 32
	.type	data, @object
	.size	data, 1600016
data:
	.zero	1600016
	.text
	.globl	sort_inc_year
	.type	sort_inc_year, @function
sort_inc_year:
.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
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sort_inc_year, .-sort_inc_year
	.globl	sort_inc_no
	.type	sort_inc_no, @function
sort_inc_no:
.LFB7:
	.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	8(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sort_inc_no, .-sort_inc_no
	.globl	sort_inc_pref
	.type	sort_inc_pref, @function
sort_inc_pref:
.LFB8:
	.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	(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %eax
	cmpl	-4(%rbp), %eax
	jne	.L6
	movq	-24(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -8(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
.L6:
	movl	-8(%rbp), %eax
	subl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sort_inc_pref, .-sort_inc_pref
	.section	.rodata
.LC0:
	.string	"p=%d,y=%llu,n=%d\n"
	.text
	.globl	printdata
	.type	printdata, @function
printdata:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	$0, -4(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L9
.L10:
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	8+data(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -4(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	-20(%rbp), %eax
	jl	.L10
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	printdata, .-printdata
	.section	.rodata
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d %llu"
.LC3:
	.string	"%06d%06d\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
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	movl	$0, -36(%rbp)
	movl	$0, -28(%rbp)
	movl	$1, -24(%rbp)
	movl	$0, -20(%rbp)
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L12
.L13:
	movl	$0, -32(%rbp)
	movq	$0, -16(%rbp)
	leaq	-16(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movq	-16(%rbp), %rax
	movl	%eax, %ecx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	4+data(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	8+data(%rip), %rdx
	movl	-28(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L12:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L13
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_pref(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L14
.L16:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -20(%rbp)
	je	.L15
	movl	$1, -24(%rbp)
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	data(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -20(%rbp)
.L15:
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -24(%rbp)
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	movq	%rdx, %rcx
	salq	$4, %rcx
	leaq	12+data(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	addl	$1, -28(%rbp)
.L14:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L16
	movl	-36(%rbp), %eax
	cltq
	leaq	sort_inc_no(%rip), %rdx
	movq	%rdx, %rcx
	movl	$16, %edx
	movq	%rax, %rsi
	leaq	data(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -28(%rbp)
	jmp	.L17
.L18:
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rdx
	leaq	12+data(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	salq	$4, %rax
	movq	%rax, %rcx
	leaq	data(%rip), %rax
	movl	(%rcx,%rax), %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -28(%rbp)
.L17:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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:
