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>

typedef struct {
	long number;
	long prefecture;
  long year;
  long id;
} S_CITY;

int cmpAscPre(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->prefecture > ((S_CITY *)n2)->prefecture) {
		return 1;
	}
	else if (((S_CITY *)n1)->prefecture < ((S_CITY *)n2)->prefecture) {
		return -1;
	}
	else {
		if (((S_CITY *)n1)->year > ((S_CITY *)n2)->year) {
      return 1;
    }
    else if (((S_CITY *)n1)->year < ((S_CITY *)n2)->year) {
      return -1;
    }
    else {
      return 0;
    }
	}
}

int cmpAscNum(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->number > ((S_CITY *)n2)->number) {
		return 1;
	}
	else if (((S_CITY *)n1)->number < ((S_CITY *)n2)->number) {
		return -1;
	}
	else {
		return 0;
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_CITY cities[m];
  for (long i = 0; i < m; i++) {
    cities[i].number = i;
    scanf("%ld %ld", &cities[i].prefecture, &cities[i].year);
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscPre);
  long latter = 1;
  cities[0].id = 1;
  for (long i = 1; i < m; i++) {
    if (cities[i].prefecture == cities[i-1].prefecture) {
      latter++;
    } else {
      latter = 1;
    }
    cities[i].id = latter;
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscNum);
  int id_12[12];
  long former;
  for (long i = 0; i < m; i++) {
    former = cities[i].prefecture;
    latter = cities[i].id;
    for (int j = 5; j >= 0; j--) {
      id_12[j] = former%10;
      former /= 10;
    }
    for (int j = 11; j >= 6; j--) {
      id_12[j] = latter%10;
      latter /= 10;
    }
    for (int j = 0; j < 12; j++) {
      printf("%d", id_12[j]);
    }
    printf("\n");
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpAscPre
	.type	cmpAscPre, @function
cmpAscPre:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscPre, .-cmpAscPre
	.globl	cmpAscNum
	.type	cmpAscNum, @function
cmpAscNum:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmpAscNum, .-cmpAscNum
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-176(%rbp), %rdx
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-176(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$5, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	$0, -168(%rbp)
	jmp	.L15
.L16:
	movq	-120(%rbp), %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-168(%rbp), %rax
	salq	$5, %rax
	leaq	16(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -168(%rbp)
.L15:
	movq	-176(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L16
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscPre(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -160(%rbp)
	movq	-120(%rbp), %rax
	movq	$1, 24(%rax)
	movq	$1, -152(%rbp)
	jmp	.L17
.L20:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-152(%rbp), %rax
	subq	$1, %rax
	movq	-120(%rbp), %rcx
	salq	$5, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L18
	addq	$1, -160(%rbp)
	jmp	.L19
.L18:
	movq	$1, -160(%rbp)
.L19:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	24(%rax), %rdx
	movq	-160(%rbp), %rax
	movq	%rax, (%rdx)
	addq	$1, -152(%rbp)
.L17:
	movq	-176(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L20
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscNum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -136(%rbp)
	jmp	.L21
.L28:
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -144(%rbp)
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$24, %rax
	movq	(%rax), %rax
	movq	%rax, -160(%rbp)
	movl	$5, -196(%rbp)
	jmp	.L22
.L23:
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-196(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	subl	$1, -196(%rbp)
.L22:
	cmpl	$0, -196(%rbp)
	jns	.L23
	movl	$11, -192(%rbp)
	jmp	.L24
.L25:
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-192(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -160(%rbp)
	subl	$1, -192(%rbp)
.L24:
	cmpl	$5, -192(%rbp)
	jg	.L25
	movl	$0, -188(%rbp)
	jmp	.L26
.L27:
	movl	-188(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -188(%rbp)
.L26:
	cmpl	$11, -188(%rbp)
	jle	.L27
	movl	$10, %edi
	call	putchar@PLT
	addq	$1, -136(%rbp)
.L21:
	movq	-176(%rbp), %rax
	cmpq	%rax, -136(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	cmpAscNum
	.type	cmpAscNum, @function
cmpAscNum:
.LFB40:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	cmpAscNum, .-cmpAscNum
	.p2align 4
	.globl	cmpAscPre
	.type	cmpAscPre, @function
cmpAscPre:
.LFB39:
	.cfi_startproc
	endbr64
	movq	8(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, 8(%rdi)
	jg	.L5
	movl	$-1, %eax
	jl	.L5
	movq	16(%rsi), %rcx
	movl	$1, %eax
	cmpq	%rcx, 16(%rdi)
	jg	.L5
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpAscPre, .-cmpAscPre
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-120(%rbp), %rdx
	leaq	-128(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$5, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L12
.L42:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L42
.L12:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L43
.L13:
	leaq	7(%rsp), %r14
	movq	%r14, %r15
	andq	$-8, %r14
	shrq	$3, %r15
	testq	%rsi, %rsi
	jle	.L14
	leaq	8(%r14), %rbx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, -8(%rbx)
	movq	%rbx, %rsi
	leaq	8(%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rsi
	cmpq	%r12, %rsi
	jg	.L15
.L14:
	leaq	cmpAscPre(%rip), %rcx
	movl	$32, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-120(%rbp), %rsi
	movq	$1, 24(,%r15,8)
	cmpq	$1, %rsi
	jle	.L26
	cmpq	$3, %rsi
	jle	.L31
	leaq	-4(%rsi), %rdx
	leaq	40(%r14), %rax
	movl	$1, %edi
	movq	8(,%r15,8), %r8
	andq	$-2, %rdx
	movl	$1, %ecx
	movl	$1, %r10d
	addq	$3, %rdx
.L23:
	movq	(%rax), %r9
	addq	$1, %rcx
	cmpq	%r9, %r8
	movq	32(%rax), %r8
	cmovne	%r10, %rcx
	movq	%rcx, 16(%rax)
	cmpq	%r9, %r8
	je	.L44
	addq	$2, %rdi
	addq	$64, %rax
	movl	$1, %ecx
	movq	$1, -16(%rax)
	cmpq	%rdx, %rdi
	jne	.L23
.L19:
	movq	%rdx, %rax
	salq	$5, %rax
	addq	%r14, %rax
	.p2align 4,,10
	.p2align 3
.L27:
	movq	8(%rax), %rbx
	cmpq	%rbx, -24(%rax)
	je	.L45
.L24:
	addq	$1, %rdx
	movq	$1, 24(%rax)
	addq	$32, %rax
	cmpq	%rsi, %rdx
	jge	.L26
	movq	8(%rax), %rbx
	movl	$1, %ecx
	cmpq	%rbx, -24(%rax)
	jne	.L24
.L45:
	addq	$1, %rcx
	addq	$1, %rdx
	addq	$32, %rax
	movq	%rcx, -8(%rax)
	cmpq	%rsi, %rdx
	jl	.L27
.L26:
	leaq	cmpAscNum(%rip), %rcx
	movl	$32, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	$0, -120(%rbp)
	jle	.L18
	leaq	-112(%rbp), %rax
	addq	$8, %r14
	leaq	-64(%rbp), %r12
	movq	$0, -136(%rbp)
	movq	%rax, -144(%rbp)
	leaq	.LC1(%rip), %rbx
	movabsq	$7378697629483820647, %r13
	.p2align 4,,10
	.p2align 3
.L29:
	movq	(%r14), %r8
	movq	16(%r14), %rdi
	movq	-144(%rbp), %r15
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r9
	imulq	%r13
	movq	%r9, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rcx
	movq	%r9, %rdx
	subq	%rax, %rcx
	leaq	(%rcx,%rcx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdx
	movq	%rcx, %rax
	movl	%edx, -96(%rbp)
	imulq	%r13
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r10
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r11
	imulq	%r13
	movq	%r11, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,4), %rax
	movq	%r11, %rdx
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%r11,%r11,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm0
	movq	%r10, %rdx
	subq	%rax, %rdx
	leaq	(%r10,%r10,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm2
	movq	%rsi, %rdx
	subq	%rax, %rdx
	leaq	(%rsi,%rsi,4), %rax
	punpcklqdq	%xmm2, %xmm0
	addq	%rax, %rax
	movq	%rdx, %xmm1
	subq	%rax, %rcx
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	movq	%rcx, %xmm3
	sarq	$63, %rax
	punpcklqdq	%xmm3, %xmm1
	shufps	$136, %xmm1, %xmm0
	movaps	%xmm0, -112(%rbp)
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	leaq	(%rsi,%rsi,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	movl	%edi, -68(%rbp)
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rcx
	movq	%rdi, %rdx
	subq	%rax, %rcx
	leaq	(%rcx,%rcx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%rdi,%rdi,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm0
	subq	%rax, %rsi
	movq	%rcx, %rax
	imulq	%r13
	movq	%rcx, %rax
	movd	%esi, %xmm4
	sarq	$63, %rax
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, -76(%rbp)
	sarq	$2, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	leaq	(%r9,%r9,4), %rax
	addq	%rax, %rax
	subq	%rax, %r8
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	movq	%r8, %xmm0
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$2, %rdx
	sarq	$63, %rax
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,4), %rax
	movq	%rsi, %rdx
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%rsi,%rsi,4), %rax
	movq	%rdi, %rsi
	addq	%rax, %rax
	movq	%rdx, %xmm5
	subq	%rax, %rsi
	leaq	(%rdi,%rdi,4), %rax
	punpcklqdq	%xmm5, %xmm0
	addq	%rax, %rax
	movq	%rsi, %xmm1
	subq	%rax, %rcx
	movq	%rcx, %xmm6
	punpcklqdq	%xmm6, %xmm1
	shufps	$136, %xmm1, %xmm0
	movups	%xmm0, -92(%rbp)
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%r15), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__printf_chk@PLT
	cmpq	%r12, %r15
	jne	.L28
	movl	$10, %edi
	addq	$32, %r14
	call	putchar@PLT
	addq	$1, -136(%rbp)
	movq	-136(%rbp), %rax
	cmpq	%rax, -120(%rbp)
	jg	.L29
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L46
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L44:
	.cfi_restore_state
	addq	$1, %rcx
	addq	$2, %rdi
	addq	$64, %rax
	movq	%rcx, -16(%rax)
	cmpq	%rdx, %rdi
	jne	.L23
	jmp	.L19
.L43:
	orq	$0, -8(%rsp,%rax)
	jmp	.L13
.L31:
	movl	$1, %edx
	movl	$1, %ecx
	jmp	.L19
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmpAscNum
	.type	cmpAscNum, @function
cmpAscNum:
.LFB40:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jg	.L1
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L1:
	ret
	.cfi_endproc
.LFE40:
	.size	cmpAscNum, .-cmpAscNum
	.p2align 4
	.globl	cmpAscPre
	.type	cmpAscPre, @function
cmpAscPre:
.LFB39:
	.cfi_startproc
	endbr64
	movq	8(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, 8(%rdi)
	jg	.L5
	movl	$-1, %eax
	jl	.L5
	movq	16(%rsi), %rcx
	movl	$1, %eax
	cmpq	%rcx, 16(%rdi)
	jg	.L5
	setl	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE39:
	.size	cmpAscPre, .-cmpAscPre
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-120(%rbp), %rdx
	leaq	-128(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rsi
	movq	%rsp, %rdx
	movq	%rsi, %rax
	salq	$5, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	subq	%rcx, %rdx
	cmpq	%rdx, %rsp
	je	.L12
.L42:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdx, %rsp
	jne	.L42
.L12:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L43
.L13:
	leaq	7(%rsp), %r14
	movq	%r14, %r15
	andq	$-8, %r14
	shrq	$3, %r15
	testq	%rsi, %rsi
	jle	.L14
	leaq	8(%r14), %rbx
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r12, -8(%rbx)
	movq	%rbx, %rsi
	leaq	8(%rbx), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$1, %r12
	addq	$32, %rbx
	call	__isoc99_scanf@PLT
	movq	-120(%rbp), %rsi
	cmpq	%r12, %rsi
	jg	.L15
.L14:
	leaq	cmpAscPre(%rip), %rcx
	movl	$32, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	movq	-120(%rbp), %rsi
	movq	$1, 24(,%r15,8)
	cmpq	$1, %rsi
	jle	.L26
	cmpq	$3, %rsi
	jle	.L31
	leaq	-4(%rsi), %rdx
	leaq	40(%r14), %rax
	movl	$1, %edi
	movq	8(,%r15,8), %r8
	andq	$-2, %rdx
	movl	$1, %ecx
	movl	$1, %r10d
	addq	$3, %rdx
.L23:
	movq	(%rax), %r9
	addq	$1, %rcx
	cmpq	%r9, %r8
	movq	32(%rax), %r8
	cmovne	%r10, %rcx
	movq	%rcx, 16(%rax)
	cmpq	%r9, %r8
	je	.L44
	addq	$2, %rdi
	addq	$64, %rax
	movl	$1, %ecx
	movq	$1, -16(%rax)
	cmpq	%rdx, %rdi
	jne	.L23
.L19:
	movq	%rdx, %rax
	salq	$5, %rax
	addq	%r14, %rax
	.p2align 4,,10
	.p2align 3
.L27:
	movq	8(%rax), %rbx
	cmpq	%rbx, -24(%rax)
	je	.L45
.L24:
	addq	$1, %rdx
	movq	$1, 24(%rax)
	addq	$32, %rax
	cmpq	%rsi, %rdx
	jge	.L26
	movq	8(%rax), %rbx
	movl	$1, %ecx
	cmpq	%rbx, -24(%rax)
	jne	.L24
.L45:
	addq	$1, %rcx
	addq	$1, %rdx
	addq	$32, %rax
	movq	%rcx, -8(%rax)
	cmpq	%rsi, %rdx
	jl	.L27
.L26:
	leaq	cmpAscNum(%rip), %rcx
	movl	$32, %edx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	$0, -120(%rbp)
	jle	.L18
	leaq	-112(%rbp), %rax
	addq	$8, %r14
	leaq	-64(%rbp), %r12
	movq	$0, -136(%rbp)
	movq	%rax, -144(%rbp)
	leaq	.LC1(%rip), %rbx
	movabsq	$7378697629483820647, %r13
	.p2align 4,,10
	.p2align 3
.L29:
	movq	(%r14), %r8
	movq	16(%r14), %rdi
	movq	-144(%rbp), %r15
	movq	%r8, %rax
	imulq	%r13
	movq	%r8, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r9
	imulq	%r13
	movq	%r9, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rcx
	movq	%r9, %rdx
	subq	%rax, %rcx
	leaq	(%rcx,%rcx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdx
	movq	%rcx, %rax
	movl	%edx, -96(%rbp)
	imulq	%r13
	movq	%rcx, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r10
	imulq	%r13
	movq	%r10, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	movq	%rdx, %rax
	movq	%rdx, %r11
	imulq	%r13
	movq	%r11, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,4), %rax
	movq	%r11, %rdx
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%r11,%r11,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm0
	movq	%r10, %rdx
	subq	%rax, %rdx
	leaq	(%r10,%r10,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm2
	movq	%rsi, %rdx
	subq	%rax, %rdx
	leaq	(%rsi,%rsi,4), %rax
	punpcklqdq	%xmm2, %xmm0
	addq	%rax, %rax
	movq	%rdx, %xmm1
	subq	%rax, %rcx
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	movq	%rcx, %xmm3
	sarq	$63, %rax
	punpcklqdq	%xmm3, %xmm1
	shufps	$136, %xmm1, %xmm0
	movaps	%xmm0, -112(%rbp)
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	leaq	(%rsi,%rsi,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	movl	%edi, -68(%rbp)
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rcx
	movq	%rdi, %rdx
	subq	%rax, %rcx
	leaq	(%rcx,%rcx,4), %rax
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%rdi,%rdi,4), %rax
	addq	%rax, %rax
	movq	%rdx, %xmm0
	subq	%rax, %rsi
	movq	%rcx, %rax
	imulq	%r13
	movq	%rcx, %rax
	movd	%esi, %xmm4
	sarq	$63, %rax
	punpckldq	%xmm4, %xmm0
	movq	%xmm0, -76(%rbp)
	sarq	$2, %rdx
	movq	%rdx, %rdi
	subq	%rax, %rdi
	leaq	(%r9,%r9,4), %rax
	addq	%rax, %rax
	subq	%rax, %r8
	movq	%rdi, %rax
	imulq	%r13
	movq	%rdi, %rax
	movq	%r8, %xmm0
	sarq	$63, %rax
	sarq	$2, %rdx
	movq	%rdx, %rsi
	subq	%rax, %rsi
	movq	%rsi, %rax
	imulq	%r13
	movq	%rsi, %rax
	sarq	$2, %rdx
	sarq	$63, %rax
	subq	%rax, %rdx
	leaq	(%rdx,%rdx,4), %rax
	movq	%rsi, %rdx
	addq	%rax, %rax
	subq	%rax, %rdx
	leaq	(%rsi,%rsi,4), %rax
	movq	%rdi, %rsi
	addq	%rax, %rax
	movq	%rdx, %xmm5
	subq	%rax, %rsi
	leaq	(%rdi,%rdi,4), %rax
	punpcklqdq	%xmm5, %xmm0
	addq	%rax, %rax
	movq	%rsi, %xmm1
	subq	%rax, %rcx
	movq	%rcx, %xmm6
	punpcklqdq	%xmm6, %xmm1
	shufps	$136, %xmm1, %xmm0
	movups	%xmm0, -92(%rbp)
	.p2align 4,,10
	.p2align 3
.L28:
	movl	(%r15), %edx
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$4, %r15
	call	__printf_chk@PLT
	cmpq	%r12, %r15
	jne	.L28
	movl	$10, %edi
	addq	$32, %r14
	call	putchar@PLT
	addq	$1, -136(%rbp)
	movq	-136(%rbp), %rax
	cmpq	%rax, -120(%rbp)
	jg	.L29
.L18:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L46
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L44:
	.cfi_restore_state
	addq	$1, %rcx
	addq	$2, %rdi
	addq	$64, %rax
	movq	%rcx, -16(%rax)
	cmpq	%rdx, %rdi
	jne	.L23
	jmp	.L19
.L43:
	orq	$0, -8(%rsp,%rax)
	jmp	.L13
.L31:
	movl	$1, %edx
	movl	$1, %ecx
	jmp	.L19
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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:

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

typedef struct {
	long number;
	long prefecture;
  long year;
  long id;
} S_CITY;

int cmpAscPre(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->prefecture > ((S_CITY *)n2)->prefecture) {
		return 1;
	}
	else if (((S_CITY *)n1)->prefecture < ((S_CITY *)n2)->prefecture) {
		return -1;
	}
	else {
		if (((S_CITY *)n1)->year > ((S_CITY *)n2)->year) {
      return 1;
    }
    else if (((S_CITY *)n1)->year < ((S_CITY *)n2)->year) {
      return -1;
    }
    else {
      return 0;
    }
	}
}

int cmpAscNum(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->number > ((S_CITY *)n2)->number) {
		return 1;
	}
	else if (((S_CITY *)n1)->number < ((S_CITY *)n2)->number) {
		return -1;
	}
	else {
		return 0;
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_CITY cities[m];
  for (long i = 0; i < m; i++) {
    cities[i].number = i;
    scanf("%ld %ld", &cities[i].prefecture, &cities[i].year);
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscPre);
  long latter = 1;
  cities[0].id = 1;
  for (long i = 1; i < m; i++) {
    if (cities[i].prefecture == cities[i-1].prefecture) {
      latter++;
    } else {
      latter = 1;
    }
    cities[i].id = latter;
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscNum);
  int id_12[12];
  long former;
  for (long i = 0; i < m; i++) {
    former = cities[i].prefecture;
    latter = cities[i].id;
    for (int j = 5; j >= 0; j--) {
      id_12[j] = former%10;
      former /= 10;
    }
    for (int j = 11; j >= 6; j--) {
      id_12[j] = latter%10;
      latter /= 10;
    }
    for (int j = 0; j < 12; j++) {
      printf("%d", id_12[j]);
    }
    printf("\n");
  }

  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>

typedef struct {
	long number;
	long prefecture;
  long year;
  long id;
} S_CITY;

int cmpAscPre(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->prefecture > ((S_CITY *)n2)->prefecture) {
		return 1;
	}
	else if (((S_CITY *)n1)->prefecture < ((S_CITY *)n2)->prefecture) {
		return -1;
	}
	else {
		if (((S_CITY *)n1)->year > ((S_CITY *)n2)->year) {
      return 1;
    }
    else if (((S_CITY *)n1)->year < ((S_CITY *)n2)->year) {
      return -1;
    }
    else {
      return 0;
    }
	}
}

int cmpAscNum(const void * n1, const void * n2) {
	if (((S_CITY *)n1)->number > ((S_CITY *)n2)->number) {
		return 1;
	}
	else if (((S_CITY *)n1)->number < ((S_CITY *)n2)->number) {
		return -1;
	}
	else {
		return 0;
	}
}

int main(void) {

  long n,m;
  scanf("%ld %ld", &n, &m);
  S_CITY cities[m];
  for (long i = 0; i < m; i++) {
    cities[i].number = i;
    scanf("%ld %ld", &cities[i].prefecture, &cities[i].year);
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscPre);
  long latter = 1;
  cities[0].id = 1;
  for (long i = 1; i < m; i++) {
    if (cities[i].prefecture == cities[i-1].prefecture) {
      latter++;
    } else {
      latter = 1;
    }
    cities[i].id = latter;
  }
  qsort(cities, m, sizeof(S_CITY), cmpAscNum);
  int id_12[12];
  long former;
  for (long i = 0; i < m; i++) {
    former = cities[i].prefecture;
    latter = cities[i].id;
    for (int j = 5; j >= 0; j--) {
      id_12[j] = former%10;
      former /= 10;
    }
    for (int j = 11; j >= 6; j--) {
      id_12[j] = latter%10;
      latter /= 10;
    }
    for (int j = 0; j < 12; j++) {
      printf("%d", id_12[j]);
    }
    printf("\n");
  }

  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	cmpAscPre
	.type	cmpAscPre, @function
cmpAscPre:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscPre, .-cmpAscPre
	.globl	cmpAscNum
	.type	cmpAscNum, @function
cmpAscNum:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmpAscNum, .-cmpAscNum
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-176(%rbp), %rdx
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-176(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$5, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	$0, -168(%rbp)
	jmp	.L15
.L16:
	movq	-120(%rbp), %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-168(%rbp), %rax
	salq	$5, %rax
	leaq	16(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -168(%rbp)
.L15:
	movq	-176(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L16
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscPre(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -160(%rbp)
	movq	-120(%rbp), %rax
	movq	$1, 24(%rax)
	movq	$1, -152(%rbp)
	jmp	.L17
.L20:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-152(%rbp), %rax
	subq	$1, %rax
	movq	-120(%rbp), %rcx
	salq	$5, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L18
	addq	$1, -160(%rbp)
	jmp	.L19
.L18:
	movq	$1, -160(%rbp)
.L19:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	24(%rax), %rdx
	movq	-160(%rbp), %rax
	movq	%rax, (%rdx)
	addq	$1, -152(%rbp)
.L17:
	movq	-176(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L20
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscNum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -136(%rbp)
	jmp	.L21
.L28:
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -144(%rbp)
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$24, %rax
	movq	(%rax), %rax
	movq	%rax, -160(%rbp)
	movl	$5, -196(%rbp)
	jmp	.L22
.L23:
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-196(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	subl	$1, -196(%rbp)
.L22:
	cmpl	$0, -196(%rbp)
	jns	.L23
	movl	$11, -192(%rbp)
	jmp	.L24
.L25:
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-192(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -160(%rbp)
	subl	$1, -192(%rbp)
.L24:
	cmpl	$5, -192(%rbp)
	jg	.L25
	movl	$0, -188(%rbp)
	jmp	.L26
.L27:
	movl	-188(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -188(%rbp)
.L26:
	cmpl	$11, -188(%rbp)
	jle	.L27
	movl	$10, %edi
	call	putchar@PLT
	addq	$1, -136(%rbp)
.L21:
	movq	-176(%rbp), %rax
	cmpq	%rax, -136(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	cmpAscPre
	.type	cmpAscPre, @function
cmpAscPre:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L2
	movl	$1, %eax
	jmp	.L3
.L2:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	8(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L4
	movl	$-1, %eax
	jmp	.L3
.L4:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	16(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L6
	movl	$-1, %eax
	jmp	.L3
.L6:
	movl	$0, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	cmpAscPre, .-cmpAscPre
	.globl	cmpAscNum
	.type	cmpAscNum, @function
cmpAscNum:
.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, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L8
	movl	$1, %eax
	jmp	.L9
.L8:
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jge	.L10
	movl	$-1, %eax
	jmp	.L9
.L10:
	movl	$0, %eax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cmpAscNum, .-cmpAscNum
	.section	.rodata
.LC0:
	.string	"%ld %ld"
.LC1:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$168, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-176(%rbp), %rdx
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-176(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -128(%rbp)
	movq	%rax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movq	%rax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	salq	$5, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L12:
	cmpq	%rdx, %rsp
	je	.L13
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L12
.L13:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L14
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L14:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	$0, -168(%rbp)
	jmp	.L15
.L16:
	movq	-120(%rbp), %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	movq	%rax, (%rdx)
	movq	-168(%rbp), %rax
	salq	$5, %rax
	leaq	16(%rax), %rdx
	movq	-120(%rbp), %rax
	addq	%rax, %rdx
	movq	-168(%rbp), %rax
	salq	$5, %rax
	movq	%rax, %rcx
	movq	-120(%rbp), %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -168(%rbp)
.L15:
	movq	-176(%rbp), %rax
	cmpq	%rax, -168(%rbp)
	jl	.L16
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscPre(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$1, -160(%rbp)
	movq	-120(%rbp), %rax
	movq	$1, 24(%rax)
	movq	$1, -152(%rbp)
	jmp	.L17
.L20:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rdx
	movq	-152(%rbp), %rax
	subq	$1, %rax
	movq	-120(%rbp), %rcx
	salq	$5, %rax
	addq	%rcx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jne	.L18
	addq	$1, -160(%rbp)
	jmp	.L19
.L18:
	movq	$1, -160(%rbp)
.L19:
	movq	-120(%rbp), %rdx
	movq	-152(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	leaq	24(%rax), %rdx
	movq	-160(%rbp), %rax
	movq	%rax, (%rdx)
	addq	$1, -152(%rbp)
.L17:
	movq	-176(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L20
	movq	-176(%rbp), %rax
	movq	%rax, %rsi
	movq	-120(%rbp), %rax
	leaq	cmpAscNum(%rip), %rdx
	movq	%rdx, %rcx
	movl	$32, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	movq	$0, -136(%rbp)
	jmp	.L21
.L28:
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, -144(%rbp)
	movq	-120(%rbp), %rdx
	movq	-136(%rbp), %rax
	salq	$5, %rax
	addq	%rdx, %rax
	addq	$24, %rax
	movq	(%rax), %rax
	movq	%rax, -160(%rbp)
	movl	$5, -196(%rbp)
	jmp	.L22
.L23:
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-196(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-144(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -144(%rbp)
	subl	$1, -196(%rbp)
.L22:
	cmpl	$0, -196(%rbp)
	jns	.L23
	movl	$11, -192(%rbp)
	jmp	.L24
.L25:
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	movq	%rcx, %rsi
	sarq	$63, %rsi
	subq	%rsi, %rax
	movq	%rax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	subq	%rax, %rcx
	movq	%rcx, %rdx
	movl	-192(%rbp), %eax
	cltq
	movl	%edx, -112(%rbp,%rax,4)
	movq	-160(%rbp), %rcx
	movabsq	$7378697629483820647, %rdx
	movq	%rcx, %rax
	imulq	%rdx
	movq	%rdx, %rax
	sarq	$2, %rax
	sarq	$63, %rcx
	movq	%rcx, %rdx
	subq	%rdx, %rax
	movq	%rax, -160(%rbp)
	subl	$1, -192(%rbp)
.L24:
	cmpl	$5, -192(%rbp)
	jg	.L25
	movl	$0, -188(%rbp)
	jmp	.L26
.L27:
	movl	-188(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -188(%rbp)
.L26:
	cmpl	$11, -188(%rbp)
	jle	.L27
	movl	$10, %edi
	call	putchar@PLT
	addq	$1, -136(%rbp)
.L21:
	movq	-176(%rbp), %rax
	cmpq	%rax, -136(%rbp)
	jl	.L28
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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:
