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>

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);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	idx
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.text
	.globl	c
	.type	c, @function
c:
.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
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	t(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	c, .-c
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	$0, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	idx(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	idx(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -12(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	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
	.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:

#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);
}

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 unoptimized 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);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	idx
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.text
	.globl	c
	.type	c, @function
c:
.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
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	t(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	c, .-c
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	$0, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	idx(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	idx(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -12(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 400040
s:
	.zero	400040
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 400040
t:
	.zero	400040
	.globl	idx
	.align 32
	.type	idx, @object
	.size	idx, 400040
idx:
	.zero	400040
	.text
	.globl	c
	.type	c, @function
c:
.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
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	t(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	jge	.L2
	movl	$-1, %eax
	jmp	.L3
.L2:
	movl	$1, %eax
.L3:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	c, .-c
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L5
.L6:
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	addq	%rax, %rdx
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	s(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -28(%rbp)
.L5:
	movl	-32(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L6
	movl	$0, -24(%rbp)
	jmp	.L7
.L8:
	movl	-24(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	idx(%rip), %rdx
	movl	-24(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	addl	$1, -24(%rbp)
.L7:
	movl	-32(%rbp), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L8
	movl	-32(%rbp), %eax
	cltq
	leaq	c(%rip), %rdx
	movq	%rdx, %rcx
	movl	$4, %edx
	movq	%rax, %rsi
	leaq	idx(%rip), %rax
	movq	%rax, %rdi
	call	qsort@PLT
	movl	$0, -20(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	jmp	.L9
.L11:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	s(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, -16(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	idx(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -16(%rbp)
	addl	$1, -20(%rbp)
.L10:
	addl	$1, -12(%rbp)
.L9:
	movl	-32(%rbp), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L11
	movl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
