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>
#define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0)

void quick(int array[], int left, int right){
  int pl = left, pr = right, x = array[(left + right) / 2];
  do{
    while(array[pl] < x)  pl++;
    while(array[pr] > x)  pr--;
    if(pl <= pr){
      swap(int, array[pl], array[pr]);
      pl++, pr--;
    }
  }while(pl <= pr);
  if(pl < right)  quick(array, pl, right);
  if(pr > left)  quick(array, left, pr);
}

int main(){
  int n;  scanf("%d", &n);
  int a[100002];
  for(int i=0; i<n; i++)  scanf("%d", &a[i]);

  quick(a, 0, n-1);

  int ans = a[n/2] - a[n/2-1];
  printf("%d\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quick
	.type	quick, @function
quick:
.LFB0:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L3
	jmp	.L4
.L5:
	subl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L2
	movl	-16(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L8
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L8:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L10
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quick, .-quick
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L12
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L12:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L13
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400028(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	quick
	.type	quick, @function
quick:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movq	%rdi, %r15
	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
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rax, %rbx
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movl	%eax, 92(%rsp)
	leaq	(%rdi,%rax,4), %rax
	movq	%rax, 96(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 136(%rsp)
.L8:
	movl	92(%rsp), %edi
	movl	136(%rsp), %r9d
	movq	96(%rsp), %r8
	movl	%edi, %edx
	addl	%ebp, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
.L2:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%esi, %r11d
	jl	.L3
	cmpl	%ecx, %esi
	jge	.L4
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%esi, %ecx
	jg	.L5
.L4:
	cmpl	%edx, %edi
	jle	.L104
.L6:
	movl	%ebx, 36(%rsp)
	movl	%edx, 68(%rsp)
	cmpl	%ebx, %ebp
	jg	.L7
.L17:
	movl	68(%rsp), %ebx
	cmpl	%ebx, 92(%rsp)
	jge	.L105
	movl	%ebx, %ebp
	jmp	.L8
.L104:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L6
	movslq	%edx, %rax
.L3:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L2
.L7:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 104(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 140(%rsp)
.L16:
	movl	36(%rsp), %edi
	movl	%ebp, %edx
	movq	104(%rsp), %r8
	movl	140(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L11
	cmpl	%ecx, %esi
	jge	.L12
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L13
.L12:
	cmpl	%edx, %edi
	jle	.L106
.L14:
	movl	%ebx, 40(%rsp)
	movl	%edx, 72(%rsp)
	cmpl	%ebx, %ebp
	jg	.L15
.L25:
	movl	72(%rsp), %ebx
	cmpl	%ebx, 36(%rsp)
	jge	.L17
	movl	%ebx, %ebp
	jmp	.L16
.L106:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L14
	movslq	%edx, %rax
.L11:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L10
.L15:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 112(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 144(%rsp)
.L24:
	movl	40(%rsp), %edi
	movl	%ebp, %edx
	movq	112(%rsp), %r8
	movl	144(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L19
	cmpl	%ecx, %esi
	jge	.L20
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L21
.L20:
	cmpl	%edx, %edi
	jle	.L107
.L22:
	movl	%ebx, 44(%rsp)
	movl	%edx, 76(%rsp)
	cmpl	%ebx, %ebp
	jg	.L23
.L33:
	movl	76(%rsp), %ebx
	cmpl	%ebx, 40(%rsp)
	jge	.L25
	movl	%ebx, %ebp
	jmp	.L24
.L107:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L22
	movslq	%edx, %rax
.L19:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L18
.L23:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 120(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 132(%rsp)
.L32:
	movl	44(%rsp), %edi
	movl	%ebp, %edx
	movq	120(%rsp), %r8
	movl	132(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L27
	cmpl	%ecx, %esi
	jge	.L28
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L29
.L28:
	cmpl	%edx, %edi
	jle	.L108
.L30:
	movl	%ebx, 20(%rsp)
	movl	%edx, 88(%rsp)
	cmpl	%ebx, %ebp
	jg	.L31
.L41:
	movl	88(%rsp), %ebx
	cmpl	%ebx, 44(%rsp)
	jge	.L33
	movl	%ebx, %ebp
	jmp	.L32
.L108:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L30
	movslq	%edx, %rax
.L27:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L26
.L31:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 80(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 128(%rsp)
.L40:
	movl	20(%rsp), %edi
	movl	%ebp, %edx
	movq	80(%rsp), %r8
	movl	%ebp, %r14d
	movl	128(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L34:
	movl	(%r8), %r10d
	leaq	(%r15,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L35
	cmpl	%edx, %esi
	jge	.L36
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r14d
	cmpl	%edx, %esi
	jl	.L37
.L36:
	cmpl	%r14d, %edi
	jle	.L109
.L38:
	movl	%r11d, 4(%rsp)
	cmpl	%r11d, %ebp
	jg	.L39
.L49:
	cmpl	%r14d, 20(%rsp)
	jge	.L41
	movl	%r14d, %ebp
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L109:
	subl	$1, %r14d
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%r14d, %r9d
	jg	.L38
	movslq	%r14d, %rax
.L35:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L34
.L39:
	movslq	%r11d, %rax
	movl	%r14d, 148(%rsp)
	movq	%rax, %rbx
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 48(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 56(%rsp)
.L48:
	movl	4(%rsp), %edi
	movl	%ebp, %edx
	movl	56(%rsp), %r9d
	movl	%ebp, %r14d
	movq	48(%rsp), %r8
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L42:
	movl	(%r8), %r10d
	leaq	(%r15,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L43
	cmpl	%edx, %esi
	jge	.L44
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r14d
	cmpl	%edx, %esi
	jl	.L45
.L44:
	cmpl	%edi, %r14d
	jge	.L110
.L46:
	movl	%r11d, (%rsp)
	cmpl	%r11d, %ebp
	jg	.L47
	cmpl	%r14d, 4(%rsp)
	jge	.L111
.L79:
	movl	%r14d, %ebp
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L110:
	subl	$1, %r14d
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%r14d, %r9d
	jg	.L46
	movslq	%r14d, %rax
.L43:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L42
.L47:
	movslq	%r11d, %rax
	movl	%r14d, 152(%rsp)
	movq	%r15, %r14
	movq	%rax, %rbx
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 24(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 32(%rsp)
.L56:
	movl	(%rsp), %edi
	movl	%ebp, %edx
	movl	32(%rsp), %r9d
	movl	%ebp, %r12d
	movq	24(%rsp), %r8
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r15d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L51
	cmpl	%edx, %esi
	jge	.L52
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r12d
	cmpl	%edx, %esi
	jl	.L53
.L52:
	cmpl	%r12d, %edi
	jle	.L112
.L54:
	cmpl	%r15d, %ebp
	jg	.L55
	cmpl	%r12d, (%rsp)
	jge	.L113
.L80:
	movl	%r12d, %ebp
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L112:
	subl	$1, %r12d
	movl	%edx, (%r8)
	movl	%r9d, %r15d
	movl	%r10d, (%rcx)
	cmpl	%r12d, %r9d
	jg	.L54
	movslq	%r12d, %rax
.L51:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L50
.L55:
	movslq	%r15d, %rax
	movl	%r12d, 156(%rsp)
	movl	%ebp, %r13d
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 8(%rsp)
	leal	1(%r15), %eax
	movl	%eax, 16(%rsp)
.L64:
	leal	0(%r13,%r15), %edx
	movl	16(%rsp), %r9d
	movl	%r15d, %edi
	movl	%r13d, %ebp
	movl	%edx, %eax
	movq	8(%rsp), %r8
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%r13d, %rax
	.p2align 4,,10
	.p2align 3
.L58:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r12d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L59
	cmpl	%edx, %esi
	jge	.L60
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L61:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebp
	cmpl	%edx, %esi
	jl	.L61
.L60:
	cmpl	%ebp, %edi
	jle	.L114
.L62:
	cmpl	%r12d, %r13d
	jg	.L63
	cmpl	%ebp, %r15d
	jge	.L115
.L81:
	movl	%ebp, %r13d
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L114:
	subl	$1, %ebp
	movl	%edx, (%r8)
	movl	%r9d, %r12d
	movl	%r10d, (%rcx)
	cmpl	%ebp, %r9d
	jg	.L62
	movslq	%ebp, %rax
.L59:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L58
.L63:
	movslq	%r12d, %rax
	leal	1(%r12), %ebx
	movl	%r15d, 60(%rsp)
	leaq	(%r14,%rax,4), %rax
	movl	%ebp, 64(%rsp)
	movl	%ebx, %r15d
	movq	%rax, %rbp
.L72:
	leal	0(%r13,%r12), %edx
	movl	%r15d, %r9d
	movl	%r12d, %edi
	movq	%rbp, %r8
	movl	%edx, %eax
	movl	%r13d, %ebx
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%r13d, %rax
	.p2align 4,,10
	.p2align 3
.L66:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L67
	cmpl	%edx, %esi
	jge	.L68
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebx
	cmpl	%edx, %esi
	jl	.L69
.L68:
	cmpl	%edi, %ebx
	jge	.L116
.L70:
	cmpl	%r11d, %r13d
	jg	.L117
.L71:
	cmpl	%ebx, %r12d
	jge	.L118
	movl	%ebx, %r13d
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L116:
	subl	$1, %ebx
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%ebx, %r9d
	jg	.L70
	movslq	%ebx, %rax
.L67:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L66
.L118:
	movl	60(%rsp), %r15d
	movl	64(%rsp), %ebp
	cmpl	%ebp, %r15d
	jl	.L81
.L115:
	movl	156(%rsp), %r12d
	cmpl	%r12d, (%rsp)
	jl	.L80
.L113:
	movq	%r14, %r15
	movl	152(%rsp), %r14d
	cmpl	%r14d, 4(%rsp)
	jl	.L79
.L111:
	movl	148(%rsp), %r14d
	jmp	.L49
.L117:
	movl	%r13d, %edx
	movl	%r11d, %esi
	movq	%r14, %rdi
	call	quick
	jmp	.L71
.L105:
	addq	$168, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	quick, .-quick
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L120
	.p2align 4,,10
	.p2align 3
.L121:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L121
.L120:
	subl	$1, %edx
	xorl	%esi, %esi
	movq	%r13, %rdi
	call	quick
	movl	12(%rsp), %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	subl	$1, %eax
	cltq
	movl	16(%rsp,%rdx,4), %edx
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L127
	addq	$400040, %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
.L127:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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	quick
	.type	quick, @function
quick:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movq	%rdi, %r15
	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
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rax, %rbx
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	movl	%eax, 92(%rsp)
	leaq	(%rdi,%rax,4), %rax
	movq	%rax, 96(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 136(%rsp)
.L8:
	movl	92(%rsp), %edi
	movl	136(%rsp), %r9d
	movq	96(%rsp), %r8
	movl	%edi, %edx
	addl	%ebp, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
.L2:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%esi, %r11d
	jl	.L3
	cmpl	%ecx, %esi
	jge	.L4
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%esi, %ecx
	jg	.L5
.L4:
	cmpl	%edx, %edi
	jle	.L104
.L6:
	movl	%ebx, 36(%rsp)
	movl	%edx, 68(%rsp)
	cmpl	%ebx, %ebp
	jg	.L7
.L17:
	movl	68(%rsp), %ebx
	cmpl	%ebx, 92(%rsp)
	jge	.L105
	movl	%ebx, %ebp
	jmp	.L8
.L104:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L6
	movslq	%edx, %rax
.L3:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L2
.L7:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 104(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 140(%rsp)
.L16:
	movl	36(%rsp), %edi
	movl	%ebp, %edx
	movq	104(%rsp), %r8
	movl	140(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L10:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L11
	cmpl	%ecx, %esi
	jge	.L12
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L13
.L12:
	cmpl	%edx, %edi
	jle	.L106
.L14:
	movl	%ebx, 40(%rsp)
	movl	%edx, 72(%rsp)
	cmpl	%ebx, %ebp
	jg	.L15
.L25:
	movl	72(%rsp), %ebx
	cmpl	%ebx, 36(%rsp)
	jge	.L17
	movl	%ebx, %ebp
	jmp	.L16
.L106:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L14
	movslq	%edx, %rax
.L11:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L10
.L15:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 112(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 144(%rsp)
.L24:
	movl	40(%rsp), %edi
	movl	%ebp, %edx
	movq	112(%rsp), %r8
	movl	144(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L18:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L19
	cmpl	%ecx, %esi
	jge	.L20
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L21:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L21
.L20:
	cmpl	%edx, %edi
	jle	.L107
.L22:
	movl	%ebx, 44(%rsp)
	movl	%edx, 76(%rsp)
	cmpl	%ebx, %ebp
	jg	.L23
.L33:
	movl	76(%rsp), %ebx
	cmpl	%ebx, 40(%rsp)
	jge	.L25
	movl	%ebx, %ebp
	jmp	.L24
.L107:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L22
	movslq	%edx, %rax
.L19:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L18
.L23:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 120(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 132(%rsp)
.L32:
	movl	44(%rsp), %edi
	movl	%ebp, %edx
	movq	120(%rsp), %r8
	movl	132(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	movl	%ebp, %edx
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L26:
	movl	(%r8), %r11d
	leaq	(%r15,%rax,4), %r10
	movl	%edi, %ebx
	movl	(%r10), %ecx
	cmpl	%r11d, %esi
	jg	.L27
	cmpl	%ecx, %esi
	jge	.L28
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%rax, %r10
	movl	(%rax), %ecx
	subq	$4, %rax
	subl	$1, %edx
	cmpl	%ecx, %esi
	jl	.L29
.L28:
	cmpl	%edx, %edi
	jle	.L108
.L30:
	movl	%ebx, 20(%rsp)
	movl	%edx, 88(%rsp)
	cmpl	%ebx, %ebp
	jg	.L31
.L41:
	movl	88(%rsp), %ebx
	cmpl	%ebx, 44(%rsp)
	jge	.L33
	movl	%ebx, %ebp
	jmp	.L32
.L108:
	subl	$1, %edx
	movl	%ecx, (%r8)
	movl	%r9d, %ebx
	movl	%r11d, (%r10)
	cmpl	%edx, %r9d
	jg	.L30
	movslq	%edx, %rax
.L27:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L26
.L31:
	movslq	%ebx, %rax
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 80(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 128(%rsp)
.L40:
	movl	20(%rsp), %edi
	movl	%ebp, %edx
	movq	80(%rsp), %r8
	movl	%ebp, %r14d
	movl	128(%rsp), %r9d
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L34:
	movl	(%r8), %r10d
	leaq	(%r15,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L35
	cmpl	%edx, %esi
	jge	.L36
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L37:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r14d
	cmpl	%edx, %esi
	jl	.L37
.L36:
	cmpl	%r14d, %edi
	jle	.L109
.L38:
	movl	%r11d, 4(%rsp)
	cmpl	%r11d, %ebp
	jg	.L39
.L49:
	cmpl	%r14d, 20(%rsp)
	jge	.L41
	movl	%r14d, %ebp
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L109:
	subl	$1, %r14d
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%r14d, %r9d
	jg	.L38
	movslq	%r14d, %rax
.L35:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L34
.L39:
	movslq	%r11d, %rax
	movl	%r14d, 148(%rsp)
	movq	%rax, %rbx
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 48(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 56(%rsp)
.L48:
	movl	4(%rsp), %edi
	movl	%ebp, %edx
	movl	56(%rsp), %r9d
	movl	%ebp, %r14d
	movq	48(%rsp), %r8
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r15,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L42:
	movl	(%r8), %r10d
	leaq	(%r15,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L43
	cmpl	%edx, %esi
	jge	.L44
	leaq	-4(%r15,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r14d
	cmpl	%edx, %esi
	jl	.L45
.L44:
	cmpl	%edi, %r14d
	jge	.L110
.L46:
	movl	%r11d, (%rsp)
	cmpl	%r11d, %ebp
	jg	.L47
	cmpl	%r14d, 4(%rsp)
	jge	.L111
.L79:
	movl	%r14d, %ebp
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L110:
	subl	$1, %r14d
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%r14d, %r9d
	jg	.L46
	movslq	%r14d, %rax
.L43:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L42
.L47:
	movslq	%r11d, %rax
	movl	%r14d, 152(%rsp)
	movq	%r15, %r14
	movq	%rax, %rbx
	leaq	(%r15,%rax,4), %rax
	movq	%rax, 24(%rsp)
	leal	1(%rbx), %eax
	movl	%eax, 32(%rsp)
.L56:
	movl	(%rsp), %edi
	movl	%ebp, %edx
	movl	32(%rsp), %r9d
	movl	%ebp, %r12d
	movq	24(%rsp), %r8
	addl	%edi, %edx
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%ebp, %rax
	.p2align 4,,10
	.p2align 3
.L50:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r15d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L51
	cmpl	%edx, %esi
	jge	.L52
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L53:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %r12d
	cmpl	%edx, %esi
	jl	.L53
.L52:
	cmpl	%r12d, %edi
	jle	.L112
.L54:
	cmpl	%r15d, %ebp
	jg	.L55
	cmpl	%r12d, (%rsp)
	jge	.L113
.L80:
	movl	%r12d, %ebp
	jmp	.L56
	.p2align 4,,10
	.p2align 3
.L112:
	subl	$1, %r12d
	movl	%edx, (%r8)
	movl	%r9d, %r15d
	movl	%r10d, (%rcx)
	cmpl	%r12d, %r9d
	jg	.L54
	movslq	%r12d, %rax
.L51:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L50
.L55:
	movslq	%r15d, %rax
	movl	%r12d, 156(%rsp)
	movl	%ebp, %r13d
	leaq	(%r14,%rax,4), %rax
	movq	%rax, 8(%rsp)
	leal	1(%r15), %eax
	movl	%eax, 16(%rsp)
.L64:
	leal	0(%r13,%r15), %edx
	movl	16(%rsp), %r9d
	movl	%r15d, %edi
	movl	%r13d, %ebp
	movl	%edx, %eax
	movq	8(%rsp), %r8
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%r13d, %rax
	.p2align 4,,10
	.p2align 3
.L58:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r12d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L59
	cmpl	%edx, %esi
	jge	.L60
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L61:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebp
	cmpl	%edx, %esi
	jl	.L61
.L60:
	cmpl	%ebp, %edi
	jle	.L114
.L62:
	cmpl	%r12d, %r13d
	jg	.L63
	cmpl	%ebp, %r15d
	jge	.L115
.L81:
	movl	%ebp, %r13d
	jmp	.L64
	.p2align 4,,10
	.p2align 3
.L114:
	subl	$1, %ebp
	movl	%edx, (%r8)
	movl	%r9d, %r12d
	movl	%r10d, (%rcx)
	cmpl	%ebp, %r9d
	jg	.L62
	movslq	%ebp, %rax
.L59:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L58
.L63:
	movslq	%r12d, %rax
	leal	1(%r12), %ebx
	movl	%r15d, 60(%rsp)
	leaq	(%r14,%rax,4), %rax
	movl	%ebp, 64(%rsp)
	movl	%ebx, %r15d
	movq	%rax, %rbp
.L72:
	leal	0(%r13,%r12), %edx
	movl	%r15d, %r9d
	movl	%r12d, %edi
	movq	%rbp, %r8
	movl	%edx, %eax
	movl	%r13d, %ebx
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	(%r14,%rax,4), %esi
	movslq	%r13d, %rax
	.p2align 4,,10
	.p2align 3
.L66:
	movl	(%r8), %r10d
	leaq	(%r14,%rax,4), %rcx
	movl	%edi, %r11d
	movl	(%rcx), %edx
	cmpl	%r10d, %esi
	jg	.L67
	cmpl	%edx, %esi
	jge	.L68
	leaq	-4(%r14,%rax,4), %rax
	.p2align 4,,10
	.p2align 3
.L69:
	movq	%rax, %rcx
	movl	(%rax), %edx
	subq	$4, %rax
	subl	$1, %ebx
	cmpl	%edx, %esi
	jl	.L69
.L68:
	cmpl	%edi, %ebx
	jge	.L116
.L70:
	cmpl	%r11d, %r13d
	jg	.L117
.L71:
	cmpl	%ebx, %r12d
	jge	.L118
	movl	%ebx, %r13d
	jmp	.L72
	.p2align 4,,10
	.p2align 3
.L116:
	subl	$1, %ebx
	movl	%edx, (%r8)
	movl	%r9d, %r11d
	movl	%r10d, (%rcx)
	cmpl	%ebx, %r9d
	jg	.L70
	movslq	%ebx, %rax
.L67:
	addq	$4, %r8
	addl	$1, %r9d
	addl	$1, %edi
	jmp	.L66
.L118:
	movl	60(%rsp), %r15d
	movl	64(%rsp), %ebp
	cmpl	%ebp, %r15d
	jl	.L81
.L115:
	movl	156(%rsp), %r12d
	cmpl	%r12d, (%rsp)
	jl	.L80
.L113:
	movq	%r14, %r15
	movl	152(%rsp), %r14d
	cmpl	%r14d, 4(%rsp)
	jl	.L79
.L111:
	movl	148(%rsp), %r14d
	jmp	.L49
.L117:
	movl	%r13d, %edx
	movl	%r11d, %esi
	movq	%r14, %rdi
	call	quick
	jmp	.L71
.L105:
	addq	$168, %rsp
	.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
	.cfi_endproc
.LFE23:
	.size	quick, .-quick
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397352
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2728, %rsp
	.cfi_def_cfa_offset 400080
	leaq	.LC0(%rip), %r12
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movq	%fs:40, %rax
	movq	%rax, 400024(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %r13
	movq	%r13, %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L120
	.p2align 4,,10
	.p2align 3
.L121:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %edx
	addq	$4, %rbp
	cmpl	%ebx, %edx
	jg	.L121
.L120:
	subl	$1, %edx
	xorl	%esi, %esi
	movq	%r13, %rdi
	call	quick
	movl	12(%rsp), %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	movslq	%eax, %rdx
	subl	$1, %eax
	cltq
	movl	16(%rsp,%rdx,4), %edx
	subl	16(%rsp,%rax,4), %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	400024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L127
	addq	$400040, %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
.L127:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.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>
#define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0)

void quick(int array[], int left, int right){
  int pl = left, pr = right, x = array[(left + right) / 2];
  do{
    while(array[pl] < x)  pl++;
    while(array[pr] > x)  pr--;
    if(pl <= pr){
      swap(int, array[pl], array[pr]);
      pl++, pr--;
    }
  }while(pl <= pr);
  if(pl < right)  quick(array, pl, right);
  if(pr > left)  quick(array, left, pr);
}

int main(){
  int n;  scanf("%d", &n);
  int a[100002];
  for(int i=0; i<n; i++)  scanf("%d", &a[i]);

  quick(a, 0, n-1);

  int ans = a[n/2] - a[n/2-1];
  printf("%d\n", ans);
  return 0;
}

8
9 1 14 5 3 4 4 14
 6
9 0 4 4 6 7
 14
99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 0
 8
0 1 14 5 3 4 4 14
 14
99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 51211 80835 100000 0
 14
99592 10342 29105 78532 83018 11639 92015 127350 30914 21912 51211 93284 100000 0
 8
0 1 26 5 0 4 4 0
 14
99592 10342 29105 78532 83018 11639 57149 127350 30914 39830 51211 93284 100000 0
 14
99592 15139 4240 78532 83018 5810 57149 127350 30914 39830 51211 47114 101000 -1
 14
99592 15139 530 106285 83018 8967 57149 127350 30914 67320 51211 82530 101010 -1

1
 2
 42685
 0
 25993
 27321
 3
 5938
 4097
 10171

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>
#define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0)

void quick(int array[], int left, int right){
  int pl = left, pr = right, x = array[(left + right) / 2];
  do{
    while(array[pl] < x)  pl++;
    while(array[pr] > x)  pr--;
    if(pl <= pr){
      swap(int, array[pl], array[pr]);
      pl++, pr--;
    }
  }while(pl <= pr);
  if(pl < right)  quick(array, pl, right);
  if(pr > left)  quick(array, left, pr);
}

int main(){
  int n;  scanf("%d", &n);
  int a[100002];
  for(int i=0; i<n; i++)  scanf("%d", &a[i]);

  quick(a, 0, n-1);

  int ans = a[n/2] - a[n/2-1];
  printf("%d\n", ans);
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	quick
	.type	quick, @function
quick:
.LFB0:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L3
	jmp	.L4
.L5:
	subl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L2
	movl	-16(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L8
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L8:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L10
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quick, .-quick
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L12
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L12:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L13
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400028(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	quick
	.type	quick, @function
quick:
.LFB0:
	.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	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -12(%rbp)
	movl	-28(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	jmp	.L2
.L3:
	addl	$1, -16(%rbp)
.L2:
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L3
	jmp	.L4
.L5:
	subl	$1, -12(%rbp)
.L4:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L5
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jg	.L6
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	addl	$1, -16(%rbp)
	subl	$1, -12(%rbp)
.L6:
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jle	.L2
	movl	-16(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L8
	movl	-32(%rbp), %edx
	movl	-16(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L8:
	movl	-12(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jle	.L10
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	quick, .-quick
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2720, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400028(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -400024(%rbp)
	jmp	.L12
.L13:
	leaq	-400016(%rbp), %rdx
	movl	-400024(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -400024(%rbp)
.L12:
	movl	-400028(%rbp), %eax
	cmpl	%eax, -400024(%rbp)
	jl	.L13
	movl	-400028(%rbp), %eax
	leal	-1(%rax), %edx
	leaq	-400016(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-400028(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	cltq
	movl	-400016(%rbp,%rax,4), %edx
	movl	-400028(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	sarl	%eax
	subl	$1, %eax
	cltq
	movl	-400016(%rbp,%rax,4), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -400020(%rbp)
	movl	-400020(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
