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>

int s[100010],t[100010],idx[100010];
int c(const void*p,const void*q){
	if(t[*(int*)p]<t[*(int*)q])return -1;
	return 1;
}
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d%d",s+i,t+i);
	for(int i=0;i<n;i++)idx[i]=i;
	qsort(idx,n,sizeof(int),c);
	int ans=0,time=0;
	for(int i=0;i<n;i++){
		if(time<s[idx[i]]){
			time=t[idx[i]];
			ans++;
		}
	}
	printf("%d\n",ans);
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	c
	.type	c, @function
c:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rcx
	movslq	(%rsi), %rdx
	leaq	t(%rip), %rax
	movl	(%rax,%rdx,4), %edx
	cmpl	%edx, (%rax,%rcx,4)
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	c, .-c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	leaq	idx(%rip), %rdi
	testl	%esi, %esi
	jle	.L6
	leaq	s(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	t(%rip), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	leaq	0(%r13,%rbx,4), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%esi, %edx
	leaq	idx(%rip), %rdi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rdi), %rcx
	movq	%rdi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L6
.L8:
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L6
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rdi,%rcx,4)
	cmpl	%eax, %esi
	jle	.L6
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
.L6:
	movl	$4, %edx
	leaq	c(%rip), %rcx
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leaq	idx(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	leaq	4(%rax), %rdx
	leaq	s(%rip), %rsi
	leaq	(%rdx,%rcx,4), %rdi
	leaq	t(%rip), %r9
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rax), %rdx
	cmpl	%ecx, (%rsi,%rdx,4)
	jle	.L13
	movl	(%r9,%rdx,4), %ecx
	addl	$1, %r8d
.L13:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L14
.L12:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L12
.L16:
	xorl	%eax, %eax
	leaq	idx(%rip), %rdi
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
.L25:
	leaq	idx(%rip), %rdi
	jmp	.L6
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	idx
	.bss
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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	c
	.type	c, @function
c:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rcx
	movslq	(%rsi), %rdx
	leaq	t(%rip), %rax
	movl	(%rax,%rdx,4), %edx
	cmpl	%edx, (%rax,%rcx,4)
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	c, .-c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	leaq	idx(%rip), %rdi
	testl	%esi, %esi
	jle	.L6
	leaq	s(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	t(%rip), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	leaq	0(%r13,%rbx,4), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%esi, %edx
	leaq	idx(%rip), %rdi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rdi), %rcx
	movq	%rdi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L6
.L8:
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L6
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rdi,%rcx,4)
	cmpl	%eax, %esi
	jle	.L6
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
.L6:
	movl	$4, %edx
	leaq	c(%rip), %rcx
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leaq	idx(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	leaq	4(%rax), %rdx
	leaq	s(%rip), %rsi
	leaq	(%rdx,%rcx,4), %rdi
	leaq	t(%rip), %r9
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rax), %rdx
	cmpl	%ecx, (%rsi,%rdx,4)
	jle	.L13
	movl	(%r9,%rdx,4), %ecx
	addl	$1, %r8d
.L13:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L14
.L12:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L12
.L16:
	xorl	%eax, %eax
	leaq	idx(%rip), %rdi
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
.L25:
	leaq	idx(%rip), %rdi
	jmp	.L6
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	idx
	.bss
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	c
	.type	c, @function
c:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rcx
	movslq	(%rsi), %rdx
	leaq	t(%rip), %rax
	movl	(%rax,%rdx,4), %edx
	cmpl	%edx, (%rax,%rcx,4)
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	c, .-c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	leaq	idx(%rip), %rdi
	testl	%esi, %esi
	jle	.L6
	leaq	s(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	t(%rip), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	leaq	0(%r13,%rbx,4), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%esi, %edx
	leaq	idx(%rip), %rdi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rdi), %rcx
	movq	%rdi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L6
.L8:
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L6
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rdi,%rcx,4)
	cmpl	%eax, %esi
	jle	.L6
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
.L6:
	movl	$4, %edx
	leaq	c(%rip), %rcx
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leaq	idx(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	leaq	4(%rax), %rdx
	leaq	s(%rip), %rsi
	leaq	(%rdx,%rcx,4), %rdi
	leaq	t(%rip), %r9
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rax), %rdx
	cmpl	%ecx, (%rsi,%rdx,4)
	jle	.L13
	movl	(%r9,%rdx,4), %ecx
	addl	$1, %r8d
.L13:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L14
.L12:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L12
.L16:
	xorl	%eax, %eax
	leaq	idx(%rip), %rdi
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
.L25:
	leaq	idx(%rip), %rdi
	jmp	.L6
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	idx
	.bss
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>
#include <stdlib.h>

int s[100010],t[100010],idx[100010];
int c(const void*p,const void*q){
	if(t[*(int*)p]<t[*(int*)q])return -1;
	return 1;
}
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d%d",s+i,t+i);
	for(int i=0;i<n;i++)idx[i]=i;
	qsort(idx,n,sizeof(int),c);
	int ans=0,time=0;
	for(int i=0;i<n;i++){
		if(time<s[idx[i]]){
			time=t[idx[i]];
			ans++;
		}
	}
	printf("%d\n",ans);
}
```
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>

int s[100010],t[100010],idx[100010];
int c(const void*p,const void*q){
	if(t[*(int*)p]<t[*(int*)q])return -1;
	return 1;
}
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d%d",s+i,t+i);
	for(int i=0;i<n;i++)idx[i]=i;
	qsort(idx,n,sizeof(int),c);
	int ans=0,time=0;
	for(int i=0;i<n;i++){
		if(time<s[idx[i]]){
			time=t[idx[i]];
			ans++;
		}
	}
	printf("%d\n",ans);
}
```

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
2 2
3 9
3 5
5 9
6 8
 3
1 1
2 3
3 4
 3
0 5
3 4
2 5
 5
3 2
5 5
4 3
0 3
6 8
 5
2 2
3 9
4 5
5 9
6 8
 3
1 1
2 4
3 4
 3
-1 5
3 4
2 5
 5
2 2
3 9
4 5
1 9
6 8
 3
1 1
2 4
3 3
 3
-1 5
3 4
2 7

3
 2
 1
 4
 3
 2
 1
 3
 2
 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>

int s[100010],t[100010],idx[100010];
int c(const void*p,const void*q){
	if(t[*(int*)p]<t[*(int*)q])return -1;
	return 1;
}
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)scanf("%d%d",s+i,t+i);
	for(int i=0;i<n;i++)idx[i]=i;
	qsort(idx,n,sizeof(int),c);
	int ans=0,time=0;
	for(int i=0;i<n;i++){
		if(time<s[idx[i]]){
			time=t[idx[i]];
			ans++;
		}
	}
	printf("%d\n",ans);
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	c
	.type	c, @function
c:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rcx
	movslq	(%rsi), %rdx
	leaq	t(%rip), %rax
	movl	(%rax,%rdx,4), %edx
	cmpl	%edx, (%rax,%rcx,4)
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	c, .-c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	leaq	idx(%rip), %rdi
	testl	%esi, %esi
	jle	.L6
	leaq	s(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	t(%rip), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	leaq	0(%r13,%rbx,4), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%esi, %edx
	leaq	idx(%rip), %rdi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rdi), %rcx
	movq	%rdi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L6
.L8:
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L6
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rdi,%rcx,4)
	cmpl	%eax, %esi
	jle	.L6
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
.L6:
	movl	$4, %edx
	leaq	c(%rip), %rcx
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leaq	idx(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	leaq	4(%rax), %rdx
	leaq	s(%rip), %rsi
	leaq	(%rdx,%rcx,4), %rdi
	leaq	t(%rip), %r9
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rax), %rdx
	cmpl	%ecx, (%rsi,%rdx,4)
	jle	.L13
	movl	(%r9,%rdx,4), %ecx
	addl	$1, %r8d
.L13:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L14
.L12:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L12
.L16:
	xorl	%eax, %eax
	leaq	idx(%rip), %rdi
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
.L25:
	leaq	idx(%rip), %rdi
	jmp	.L6
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	idx
	.bss
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

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	c
	.type	c, @function
c:
.LFB39:
	.cfi_startproc
	endbr64
	movslq	(%rdi), %rcx
	movslq	(%rsi), %rdx
	leaq	t(%rip), %rax
	movl	(%rax,%rdx,4), %edx
	cmpl	%edx, (%rax,%rcx,4)
	setge	%al
	movzbl	%al, %eax
	leal	-1(%rax,%rax), %eax
	ret
	.cfi_endproc
.LFE39:
	.size	c, .-c
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d%d"
.LC4:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB40:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	leaq	idx(%rip), %rdi
	testl	%esi, %esi
	jle	.L6
	leaq	s(%rip), %rbp
	xorl	%ebx, %ebx
	leaq	t(%rip), %r13
	leaq	.LC2(%rip), %r12
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbp, %rsi
	leaq	0(%r13,%rbx,4), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rsi
	addq	$1, %rbx
	addq	$4, %rbp
	cmpl	%ebx, %esi
	jg	.L7
	testl	%esi, %esi
	jle	.L25
	leal	-1(%rsi), %eax
	cmpl	$2, %eax
	jbe	.L16
	movl	%esi, %edx
	leaq	idx(%rip), %rdi
	movdqa	.LC0(%rip), %xmm0
	movdqa	.LC3(%rip), %xmm2
	shrl	$2, %edx
	leaq	16(%rdi), %rcx
	movq	%rdi, %rax
	subl	$1, %edx
	salq	$4, %rdx
	addq	%rcx, %rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	%xmm0, %xmm1
	addq	$16, %rax
	paddd	%xmm2, %xmm0
	movaps	%xmm1, -16(%rax)
	cmpq	%rdx, %rax
	jne	.L9
	movl	%esi, %eax
	andl	$-4, %eax
	testb	$3, %sil
	je	.L6
.L8:
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
	leal	1(%rax), %edx
	cmpl	%edx, %esi
	jle	.L6
	movslq	%edx, %rcx
	addl	$2, %eax
	movl	%edx, (%rdi,%rcx,4)
	cmpl	%eax, %esi
	jle	.L6
	movslq	%eax, %rdx
	movl	%eax, (%rdi,%rdx,4)
.L6:
	movl	$4, %edx
	leaq	c(%rip), %rcx
	call	qsort@PLT
	movl	4(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leaq	idx(%rip), %rax
	leal	-1(%rdx), %ecx
	xorl	%r8d, %r8d
	leaq	4(%rax), %rdx
	leaq	s(%rip), %rsi
	leaq	(%rdx,%rcx,4), %rdi
	leaq	t(%rip), %r9
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L14:
	movslq	(%rax), %rdx
	cmpl	%ecx, (%rsi,%rdx,4)
	jle	.L13
	movl	(%r9,%rdx,4), %ecx
	addl	$1, %r8d
.L13:
	addq	$4, %rax
	cmpq	%rdi, %rax
	jne	.L14
.L12:
	xorl	%eax, %eax
	movl	%r8d, %edx
	movl	$1, %edi
	leaq	.LC4(%rip), %rsi
	call	__printf_chk@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L17:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L12
.L16:
	xorl	%eax, %eax
	leaq	idx(%rip), %rdi
	jmp	.L8
.L26:
	call	__stack_chk_fail@PLT
.L25:
	leaq	idx(%rip), %rdi
	jmp	.L6
	.cfi_endproc
.LFE40:
	.size	main, .-main
	.globl	idx
	.bss
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.long	0
	.long	1
	.long	2
	.long	3
	.align 16
.LC3:
	.long	4
	.long	4
	.long	4
	.long	4
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```