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

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

typedef long long int int64;

int cmp(const void *a,const void *b){
  int64 p=*(int64 *)a;
  int64 q=*(int64 *)b;
  return p==q?0:p-q<0?-1:1;
}

void run(void){
  int n,p;
  scanf("%d%d",&n,&p);
  int64 *d=(int64 *)calloc(n,sizeof(int64));
  int64 sumW=0;
  int64 sum=0;
  int i;
  for(i=0;i<n;i++){
    int64 w,b;
    scanf("%lld%lld",&w,&b);
    sumW+=(100-p)*w;
    d[i]=(100-p)*w+p*b;
    sum+=d[i];
  }
  qsort(d,n,sizeof(int64),cmp);
  int k=0;
  while(sum>sumW){
    sum-=d[n-1-k++];
  }
  printf("%d\n",k);
}

int main(void){
  run();
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %r12
	movl	$8, %esi
	movq	%r12, %rdi
	call	calloc@PLT
	movq	%rax, 8(%rsp)
	testl	%r12d, %r12d
	jle	.L7
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movl	$100, %edx
	movq	8(%rsp), %rcx
	movslq	16(%rsp), %rsi
	subl	%eax, %edx
	imulq	32(%rsp), %rax
	movslq	%edx, %rdx
	imulq	24(%rsp), %rdx
	addq	%rdx, %rax
	addq	%rdx, %rbx
	movq	%rax, (%rcx,%rbp,8)
	addq	$1, %rbp
	addq	%rax, %r15
	cmpl	%ebp, %esi
	jg	.L8
	movq	%rcx, %r14
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	%r15, %rbx
	jge	.L12
	movl	16(%rsp), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	leaq	(%r14,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	subq	(%rax), %r15
	addl	$1, %edx
	subq	$8, %rax
	cmpq	%rbx, %r15
	jg	.L10
.L9:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movl	$8, %edx
	movq	%rax, %rdi
	leaq	cmp(%rip), %rcx
	movq	%r12, %rsi
	call	qsort@PLT
	xorl	%edx, %edx
	jmp	.L9
.L12:
	xorl	%edx, %edx
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %r12
	movl	$8, %esi
	movq	%r12, %rdi
	call	calloc@PLT
	movq	%rax, 8(%rsp)
	testl	%r12d, %r12d
	jle	.L7
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movl	$100, %edx
	movq	8(%rsp), %rcx
	movslq	16(%rsp), %rsi
	subl	%eax, %edx
	imulq	32(%rsp), %rax
	movslq	%edx, %rdx
	imulq	24(%rsp), %rdx
	addq	%rdx, %rax
	addq	%rdx, %rbx
	movq	%rax, (%rcx,%rbp,8)
	addq	$1, %rbp
	addq	%rax, %r15
	cmpl	%ebp, %esi
	jg	.L8
	movq	%rcx, %r14
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	%r15, %rbx
	jge	.L12
	movl	16(%rsp), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	leaq	(%r14,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	subq	(%rax), %r15
	addl	$1, %edx
	subq	$8, %rax
	cmpq	%rbx, %r15
	jg	.L10
.L9:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movl	$8, %edx
	movq	%rax, %rdi
	leaq	cmp(%rip), %rcx
	movq	%r12, %rsi
	call	qsort@PLT
	xorl	%edx, %edx
	jmp	.L9
.L12:
	xorl	%edx, %edx
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %r12
	movl	$8, %esi
	movq	%r12, %rdi
	call	calloc@PLT
	movq	%rax, 8(%rsp)
	testl	%r12d, %r12d
	jle	.L7
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movl	$100, %edx
	movq	8(%rsp), %rcx
	movslq	16(%rsp), %rsi
	subl	%eax, %edx
	imulq	32(%rsp), %rax
	movslq	%edx, %rdx
	imulq	24(%rsp), %rdx
	addq	%rdx, %rax
	addq	%rdx, %rbx
	movq	%rax, (%rcx,%rbp,8)
	addq	$1, %rbp
	addq	%rax, %r15
	cmpl	%ebp, %esi
	jg	.L8
	movq	%rcx, %r14
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	%r15, %rbx
	jge	.L12
	movl	16(%rsp), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	leaq	(%r14,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	subq	(%rax), %r15
	addl	$1, %edx
	subq	$8, %rax
	cmpq	%rbx, %r15
	jg	.L10
.L9:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movl	$8, %edx
	movq	%rax, %rdi
	leaq	cmp(%rip), %rcx
	movq	%r12, %rsi
	call	qsort@PLT
	xorl	%edx, %edx
	jmp	.L9
.L12:
	xorl	%edx, %edx
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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:
```
```c
#include<stdio.h>
#include<stdlib.h>

typedef long long int int64;

int cmp(const void *a,const void *b){
  int64 p=*(int64 *)a;
  int64 q=*(int64 *)b;
  return p==q?0:p-q<0?-1:1;
}

void run(void){
  int n,p;
  scanf("%d%d",&n,&p);
  int64 *d=(int64 *)calloc(n,sizeof(int64));
  int64 sumW=0;
  int64 sum=0;
  int i;
  for(i=0;i<n;i++){
    int64 w,b;
    scanf("%lld%lld",&w,&b);
    sumW+=(100-p)*w;
    d[i]=(100-p)*w+p*b;
    sum+=d[i];
  }
  qsort(d,n,sizeof(int64),cmp);
  int k=0;
  while(sum>sumW){
    sum-=d[n-1-k++];
  }
  printf("%d\n",k);
}

int main(void){
  run();
  return 0;
}
```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

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

typedef long long int int64;

int cmp(const void *a,const void *b){
  int64 p=*(int64 *)a;
  int64 q=*(int64 *)b;
  return p==q?0:p-q<0?-1:1;
}

void run(void){
  int n,p;
  scanf("%d%d",&n,&p);
  int64 *d=(int64 *)calloc(n,sizeof(int64));
  int64 sumW=0;
  int64 sum=0;
  int i;
  for(i=0;i<n;i++){
    int64 w,b;
    scanf("%lld%lld",&w,&b);
    sumW+=(100-p)*w;
    d[i]=(100-p)*w+p*b;
    sum+=d[i];
  }
  qsort(d,n,sizeof(int64),cmp);
  int k=0;
  while(sum>sumW){
    sum-=d[n-1-k++];
  }
  printf("%d\n",k);
}

int main(void){
  run();
  return 0;
}
```

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.
Optimized Assembly Code:

5 60
6 3
5 9
3 4
7 0
4 7
 4 17
1 1
1 1
1 1
000 1
 4 75
1 1
1 1
1 1
000 2
 2 93
8 3
8 8
3 3
7 8
4 7
 5 87
6 3
5 9
3 4
7 8
4 7
 4 75
1 1
1 1
1 1
000 1
 5 60
11 3
5 9
3 4
7 0
4 7
 5 60
11 3
5 9
3 4
13 0
4 7
 4 17
1 1
1 1
1 1
001 1
 1 60
11 3
5 9
3 4
13 0
4 7

3
 1
 4
 2
 5
 3
 3
 3
 1
 1

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

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

typedef long long int int64;

int cmp(const void *a,const void *b){
  int64 p=*(int64 *)a;
  int64 q=*(int64 *)b;
  return p==q?0:p-q<0?-1:1;
}

void run(void){
  int n,p;
  scanf("%d%d",&n,&p);
  int64 *d=(int64 *)calloc(n,sizeof(int64));
  int64 sumW=0;
  int64 sum=0;
  int i;
  for(i=0;i<n;i++){
    int64 w,b;
    scanf("%lld%lld",&w,&b);
    sumW+=(100-p)*w;
    d[i]=(100-p)*w+p*b;
    sum+=d[i];
  }
  qsort(d,n,sizeof(int64),cmp);
  int k=0;
  while(sum>sumW){
    sum-=d[n-1-k++];
  }
  printf("%d\n",k);
}

int main(void){
  run();
  return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %r12
	movl	$8, %esi
	movq	%r12, %rdi
	call	calloc@PLT
	movq	%rax, 8(%rsp)
	testl	%r12d, %r12d
	jle	.L7
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movl	$100, %edx
	movq	8(%rsp), %rcx
	movslq	16(%rsp), %rsi
	subl	%eax, %edx
	imulq	32(%rsp), %rax
	movslq	%edx, %rdx
	imulq	24(%rsp), %rdx
	addq	%rdx, %rax
	addq	%rdx, %rbx
	movq	%rax, (%rcx,%rbp,8)
	addq	$1, %rbp
	addq	%rax, %r15
	cmpl	%ebp, %esi
	jg	.L8
	movq	%rcx, %r14
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	%r15, %rbx
	jge	.L12
	movl	16(%rsp), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	leaq	(%r14,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	subq	(%rax), %r15
	addl	$1, %edx
	subq	$8, %rax
	cmpq	%rbx, %r15
	jg	.L10
.L9:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movl	$8, %edx
	movq	%rax, %rdi
	leaq	cmp(%rip), %rcx
	movq	%r12, %rsi
	call	qsort@PLT
	xorl	%edx, %edx
	jmp	.L9
.L12:
	xorl	%edx, %edx
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB39:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, (%rdi)
	je	.L1
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
.L1:
	ret
	.cfi_endproc
.LFE39:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%lld%lld"
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	run
	.type	run, @function
run:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rdx
	leaq	16(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	16(%rsp), %r12
	movl	$8, %esi
	movq	%r12, %rdi
	call	calloc@PLT
	movq	%rax, 8(%rsp)
	testl	%r12d, %r12d
	jle	.L7
	xorl	%ebp, %ebp
	xorl	%r15d, %r15d
	leaq	32(%rsp), %r14
	xorl	%ebx, %ebx
	leaq	24(%rsp), %r13
	leaq	.LC1(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	20(%rsp), %rax
	movl	$100, %edx
	movq	8(%rsp), %rcx
	movslq	16(%rsp), %rsi
	subl	%eax, %edx
	imulq	32(%rsp), %rax
	movslq	%edx, %rdx
	imulq	24(%rsp), %rdx
	addq	%rdx, %rax
	addq	%rdx, %rbx
	movq	%rax, (%rcx,%rbp,8)
	addq	$1, %rbp
	addq	%rax, %r15
	cmpl	%ebp, %esi
	jg	.L8
	movq	%rcx, %r14
	movl	$8, %edx
	leaq	cmp(%rip), %rcx
	movq	%r14, %rdi
	call	qsort@PLT
	cmpq	%r15, %rbx
	jge	.L12
	movl	16(%rsp), %eax
	xorl	%edx, %edx
	subl	$1, %eax
	cltq
	leaq	(%r14,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L10:
	subq	(%rax), %r15
	addl	$1, %edx
	subq	$8, %rax
	cmpq	%rbx, %r15
	jg	.L10
.L9:
	xorl	%eax, %eax
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movl	$8, %edx
	movq	%rax, %rdi
	leaq	cmp(%rip), %rcx
	movq	%r12, %rsi
	call	qsort@PLT
	xorl	%edx, %edx
	jmp	.L9
.L12:
	xorl	%edx, %edx
	jmp	.L9
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE40:
	.size	run, .-run
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB41:
	.cfi_startproc
	endbr64
	subq	$8, %rsp
	.cfi_def_cfa_offset 16
	call	run
	xorl	%eax, %eax
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
	ret
	.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:
```