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

```c
#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

//abc163E
void swap(long long *a, long long *b) {
  long long temp=*a;
  *a=*b, *b=temp;
}

void QuickSort(long long A[], long long B[], long long left, long long right) { //クイックソート//
  int Left=left, Right=right, pivot=A[(left + right) / 2];
  while(1){ // ソーティング
    while(A[Left] < pivot)
      Left++; // 基準より小さい値を左から見つけていく
    while(pivot < A[Right])
      Right--; // 基準より大きい値を右から見つけていく
    if(Left >= Right) break; // 見つかった値の順序が逆になったら終了
    swap(&A[Left], &A[Right]); // 値を交換
    swap(&B[Left], &B[Right]);
    Left++, Right--; // 次の値に移動
  }
  if(left < Left - 1) QuickSort(A, B, left, Left - 1); //左群を対象として再帰
  if(Right + 1 < right) QuickSort(A, B, Right + 1, right); //右群を対象として再帰
}

int main(void) {
  long long n, k, i, mod=1000000007, dpl, dpr, dpmax=0;
  scanf(" %lld", &n);
  long long a[n], b[n], dp[n + 1][n + 1]; //dp[左寄せの数][同右]
  for(i=0; i < n; i++){
    scanf(" %lld", &a[i]);
    b[i]=i;
  }
  QuickSort(a, b, 0, n - 1);

  dp[1][0]=a[n - 1] * b[n - 1], dp[0][1]=a[n - 1] * (n - 1 - b[n - 1]);
  for(i=2; i <= n; i++){
    for(k=0; k <= i; k++){
      if(k == 0) dp[i][0]=dp[i - 1][0] + abs(i - b[n - i] - 1) * a[n - i];
      else if(k == i) dp[0][i]=dp[0][i - 1] + abs(n - i - b[n - i]) * a[n - i];
      else{
        dpl=dp[i - k - 1][k] + abs(i - k - 1 - b[n - i]) * a[n - i];
        dpr=dp[i - k][k - 1] + abs(n - k - b[n - i]) * a[n - i];
        dp[i - k][k]=dpl > dpr ? dpl : dpr;
      }
    }
  }
  for(i=0; i <= n; i++) if(dpmax < dp[i][n - i]) dpmax=dp[i][n - i];

  printf("%lld", dpmax);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	QuickSort
	.type	QuickSort, @function
QuickSort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-40(%rbp), %rax
	movl	%eax, -12(%rbp)
	movq	-48(%rbp), %rax
	movl	%eax, -8(%rbp)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L13:
	nop
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	QuickSort, .-QuickSort
	.section	.rodata
.LC0:
	.string	" %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -296(%rbp)
	movq	$1000000007, -136(%rbp)
	movq	$0, -144(%rbp)
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L16:
	cmpq	%rcx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L18
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L19:
	cmpq	%rdx, %rsp
	je	.L20
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L19
.L20:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L21
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L21:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rcx, %rax
	leaq	0(,%rax,8), %rbx
	leaq	-1(%rsi), %rax
	movq	%rax, -88(%rbp)
	movq	%rcx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rsi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rsi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rsi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L22:
	cmpq	%rdx, %rsp
	je	.L23
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L22
.L23:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L24
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L24:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -152(%rbp)
	jmp	.L25
.L26:
	movq	-152(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-104(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	addq	$1, -152(%rbp)
.L25:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L26
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-104(%rbp), %rsi
	movq	-120(%rbp), %rax
	movq	%rdx, %rcx
	movl	$0, %edx
	movq	%rax, %rdi
	call	QuickSort
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	movq	%rbx, %rcx
	shrq	$3, %rcx
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	$2, -152(%rbp)
	jmp	.L27
.L33:
	movq	$0, -160(%rbp)
	jmp	.L28
.L32:
	cmpq	$0, -160(%rbp)
	jne	.L29
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	movq	%rbx, %rdx
	shrq	$3, %rdx
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L29:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jne	.L31
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-152(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L31:
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rdx, %rcx
	movq	-160(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -72(%rbp)
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rdx
	movq	-160(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -64(%rbp)
	movq	%rbx, %rsi
	shrq	$3, %rsi
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	cmovl	%rax, %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rsi
	movq	-160(%rbp), %rcx
	addq	%rsi, %rcx
	movq	%rdx, (%rax,%rcx,8)
.L30:
	addq	$1, -160(%rbp)
.L28:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jle	.L32
	addq	$1, -152(%rbp)
.L27:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L33
	movq	$0, -152(%rbp)
	jmp	.L34
.L36:
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -144(%rbp)
	jge	.L35
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -144(%rbp)
.L35:
	addq	$1, -152(%rbp)
.L34:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L36
	movq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-296(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	QuickSort
	.type	QuickSort, @function
QuickSort:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %rax
	movq	%rdx, %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rax, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rax, 8(%rsp)
.L10:
	leaq	(%r8,%r12), %rdx
	movslq	%r8d, %r10
	movl	%r8d, %r11d
	movl	%r13d, %ebx
	movq	%rdx, %rax
	salq	$3, %r10
	shrq	$63, %rax
	addq	%rdx, %rax
	movq	8(%rsp), %rdx
	sarq	%rax
	movslq	0(%rbp,%rax,8), %r9
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(,%rdx,8), %rsi
	movq	0(%rbp,%r10), %r15
	leaq	0(%rbp,%rsi), %rdi
	movq	(%rdi), %rcx
	cmpq	%r9, %r15
	jl	.L5
	cmpq	%rcx, %r9
	jge	.L6
	leal	-1(%rbx), %eax
	leaq	-8(%rbp,%rdx,8), %rdx
	cltq
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %rcx
	movl	%eax, %ebx
	leaq	0(,%rax,8), %rsi
	movq	%rdx, %rdi
	subq	$1, %rax
	subq	$8, %rdx
	cmpq	%r9, %rcx
	jg	.L7
.L6:
	cmpl	%ebx, %r11d
	jge	.L8
	addq	%r14, %rsi
	movq	%rcx, 0(%rbp,%r10)
	subl	$1, %ebx
	movq	%r15, (%rdi)
	movq	(%rsi), %rdx
	movq	(%r14,%r10), %rax
	movq	%rdx, (%r14,%r10)
	movslq	%ebx, %rdx
	movq	%rax, (%rsi)
.L5:
	addl	$1, %r11d
	addq	$8, %r10
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%r11), %ecx
	movslq	%ecx, %rcx
	cmpq	%r8, %rcx
	jg	.L14
.L9:
	addl	$1, %ebx
	movslq	%ebx, %r8
	cmpq	%r12, %r8
	jl	.L10
	addq	$24, %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
.L14:
	.cfi_restore_state
	movq	%r8, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	QuickSort
	jmp	.L9
	.cfi_endproc
.LFE52:
	.size	QuickSort, .-QuickSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%rsp, %rdi
	leaq	0(,%rax,8), %rsi
	leaq	15(%rsi), %rdx
	movq	%rdx, %r8
	movq	%rdx, %rcx
	andq	$-4096, %r8
	andq	$-16, %rcx
	subq	%r8, %rdi
	cmpq	%rdi, %rsp
	je	.L17
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L52
.L17:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L53
.L18:
	movq	%rsp, -72(%rbp)
	movq	%rdx, %rcx
	movq	%rsp, %rdi
	andq	$-4096, %rdx
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L19:
	cmpq	%rdi, %rsp
	je	.L20
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L19
.L53:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L18
.L20:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L54
.L21:
	leaq	1(%rax), %rdx
	leaq	8(%rsi), %rbx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	imulq	%rdx, %rdx
	movq	%rbx, -80(%rbp)
	leaq	15(,%rdx,8), %rcx
	movq	%rcx, %rdx
	andq	$-4096, %rcx
	andq	$-16, %rdx
	subq	%rcx, %rsi
.L22:
	cmpq	%rsi, %rsp
	je	.L23
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L22
.L54:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L21
.L23:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L24
	orq	$0, -8(%rsp,%rdx)
.L24:
	leaq	7(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-8, %rbx
	shrq	$3, %rdi
	movq	%rdi, -88(%rbp)
	testq	%rax, %rax
	jle	.L25
	movq	-72(%rbp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %r14
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%r15, (%r12,%r15,8)
	addq	$1, %r15
	cmpq	%r15, %rax
	jg	.L26
.L25:
	movq	-72(%rbp), %r15
	leaq	-1(%rax), %rcx
	xorl	%edx, %edx
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	QuickSort
	movq	-64(%rbp), %r11
	movq	%r15, %rdi
	leaq	-1(%r11), %rax
	movq	%r11, -128(%rbp)
	movq	(%r15,%rax,8), %rdx
	movq	(%r12,%rax,8), %rcx
	movq	-80(%rbp), %r15
	movq	%rdx, %rsi
	subq	%rcx, %rax
	imulq	%rcx, %rsi
	shrq	$3, %r15
	imulq	%rdx, %rax
	movq	%rsi, (%rbx,%r15,8)
	movq	-88(%rbp), %rsi
	movq	%rax, 8(,%rsi,8)
	cmpq	$1, %r11
	jle	.L27
	leaq	-16(,%r11,8), %rax
	movl	%r11d, -116(%rbp)
	movl	$2, %r14d
	leaq	(%r12,%rax), %rsi
	addq	%rdi, %rax
	movl	$1, %r12d
	movq	%rax, -104(%rbp)
	leaq	1(%r11), %rax
	movq	%rsi, -96(%rbp)
	movq	%rax, -112(%rbp)
	.p2align 4,,10
	.p2align 3
.L34:
	movq	-104(%rbp), %rdi
	movq	-96(%rbp), %rax
	leal	-1(%r14), %r10d
	movq	%r15, %rsi
	leaq	-1(%r14), %r11
	movq	(%rdi), %r8
	movl	-116(%rbp), %edi
	movq	(%rax), %rax
	movl	%edi, %edx
	subl	%r14d, %edx
	movl	%eax, %ecx
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movl	%r12d, %edx
	subl	%ecx, %edi
	subl	%ecx, %r10d
	subl	%ecx, %edx
	movl	%edi, %r13d
	movq	%r15, %rdi
	cltq
	imulq	%r14, %rdi
	movl	%edx, %r9d
	imulq	%r8, %rax
	movq	%rdi, -72(%rbp)
	movq	%rax, -88(%rbp)
	xorl	%eax, %eax
	negl	%r9d
	cmovs	%edx, %r9d
	imulq	%r12, %rsi
	movslq	%r9d, %r9
	imulq	%r8, %r9
	movq	%rsi, -80(%rbp)
	.p2align 4,,10
	.p2align 3
.L33:
	testq	%rax, %rax
	je	.L55
	cmpq	%rax, %r14
	je	.L56
	movq	%r14, %rsi
	movl	%r10d, %ecx
	movl	%r13d, %edi
	subq	%rax, %rsi
	subl	%eax, %ecx
	imulq	%r15, %rsi
	movl	%ecx, %edx
	addq	%rax, %rsi
	negl	%edx
	cmovs	%ecx, %edx
	movq	%r11, %rcx
	subl	%eax, %edi
	subq	%rax, %rcx
	imulq	%r15, %rcx
	movslq	%edx, %rdx
	imulq	%r8, %rdx
	addq	%rax, %rcx
	addq	(%rbx,%rcx,8), %rdx
	movl	%edi, %ecx
	negl	%ecx
	cmovs	%edi, %ecx
	movslq	%ecx, %rcx
	imulq	%r8, %rcx
	addq	-8(%rbx,%rsi,8), %rcx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	movq	%rdx, (%rbx,%rsi,8)
.L31:
	addq	$1, %rax
	cmpq	%rax, %r14
	jge	.L33
	subq	$8, -96(%rbp)
	addq	$1, %r14
	addq	$1, %r12
	subq	$8, -104(%rbp)
	cmpq	%r14, -112(%rbp)
	jne	.L34
.L36:
	movq	-128(%rbp), %rcx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r15, %rdx
	movq	%rcx, %rsi
	imulq	%rax, %rdx
	subq	%rax, %rsi
	addq	%rsi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$1, %rax
	cmpq	%rax, %rcx
	jge	.L35
.L37:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L57
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	movq	-80(%rbp), %rdi
	movq	(%rbx,%rdi,8), %rax
	movq	-72(%rbp), %rdi
	addq	%r9, %rax
	movq	%rax, (%rbx,%rdi,8)
	movl	$1, %eax
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L56:
	movq	-88(%rbp), %rdx
	addq	(%rbx,%r12,8), %rdx
	movq	%rdx, (%rbx,%r14,8)
	jmp	.L31
.L27:
	cmpq	$0, -128(%rbp)
	jns	.L36
	xorl	%r8d, %r8d
	jmp	.L37
.L57:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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	swap
	.type	swap, @function
swap:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rdi), %rax
	movq	(%rsi), %rdx
	movq	%rdx, (%rdi)
	movq	%rax, (%rsi)
	ret
	.cfi_endproc
.LFE51:
	.size	swap, .-swap
	.p2align 4
	.globl	QuickSort
	.type	QuickSort, @function
QuickSort:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%ecx, %rax
	movq	%rdx, %r8
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rax, %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rax, 8(%rsp)
.L10:
	leaq	(%r8,%r12), %rdx
	movslq	%r8d, %r10
	movl	%r8d, %r11d
	movl	%r13d, %ebx
	movq	%rdx, %rax
	salq	$3, %r10
	shrq	$63, %rax
	addq	%rdx, %rax
	movq	8(%rsp), %rdx
	sarq	%rax
	movslq	0(%rbp,%rax,8), %r9
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(,%rdx,8), %rsi
	movq	0(%rbp,%r10), %r15
	leaq	0(%rbp,%rsi), %rdi
	movq	(%rdi), %rcx
	cmpq	%r9, %r15
	jl	.L5
	cmpq	%rcx, %r9
	jge	.L6
	leal	-1(%rbx), %eax
	leaq	-8(%rbp,%rdx,8), %rdx
	cltq
	.p2align 4,,10
	.p2align 3
.L7:
	movq	(%rdx), %rcx
	movl	%eax, %ebx
	leaq	0(,%rax,8), %rsi
	movq	%rdx, %rdi
	subq	$1, %rax
	subq	$8, %rdx
	cmpq	%r9, %rcx
	jg	.L7
.L6:
	cmpl	%ebx, %r11d
	jge	.L8
	addq	%r14, %rsi
	movq	%rcx, 0(%rbp,%r10)
	subl	$1, %ebx
	movq	%r15, (%rdi)
	movq	(%rsi), %rdx
	movq	(%r14,%r10), %rax
	movq	%rdx, (%r14,%r10)
	movslq	%ebx, %rdx
	movq	%rax, (%rsi)
.L5:
	addl	$1, %r11d
	addq	$8, %r10
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-1(%r11), %ecx
	movslq	%ecx, %rcx
	cmpq	%r8, %rcx
	jg	.L14
.L9:
	addl	$1, %ebx
	movslq	%ebx, %r8
	cmpq	%r12, %r8
	jl	.L10
	addq	$24, %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
.L14:
	.cfi_restore_state
	movq	%r8, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	QuickSort
	jmp	.L9
	.cfi_endproc
.LFE52:
	.size	QuickSort, .-QuickSort
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC0(%rip), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%rsp, %rdi
	leaq	0(,%rax,8), %rsi
	leaq	15(%rsi), %rdx
	movq	%rdx, %r8
	movq	%rdx, %rcx
	andq	$-4096, %r8
	andq	$-16, %rcx
	subq	%r8, %rdi
	cmpq	%rdi, %rsp
	je	.L17
.L52:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rdi, %rsp
	jne	.L52
.L17:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L53
.L18:
	movq	%rsp, -72(%rbp)
	movq	%rdx, %rcx
	movq	%rsp, %rdi
	andq	$-4096, %rdx
	andq	$-16, %rcx
	subq	%rdx, %rdi
.L19:
	cmpq	%rdi, %rsp
	je	.L20
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L19
.L53:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L18
.L20:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L54
.L21:
	leaq	1(%rax), %rdx
	leaq	8(%rsi), %rbx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	imulq	%rdx, %rdx
	movq	%rbx, -80(%rbp)
	leaq	15(,%rdx,8), %rcx
	movq	%rcx, %rdx
	andq	$-4096, %rcx
	andq	$-16, %rdx
	subq	%rcx, %rsi
.L22:
	cmpq	%rsi, %rsp
	je	.L23
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L22
.L54:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L21
.L23:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L24
	orq	$0, -8(%rsp,%rdx)
.L24:
	leaq	7(%rsp), %rbx
	movq	%rbx, %rdi
	andq	$-8, %rbx
	shrq	$3, %rdi
	movq	%rdi, -88(%rbp)
	testq	%rax, %rax
	jle	.L25
	movq	-72(%rbp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L26:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$8, %r14
	call	__isoc99_scanf@PLT
	movq	-64(%rbp), %rax
	movq	%r15, (%r12,%r15,8)
	addq	$1, %r15
	cmpq	%r15, %rax
	jg	.L26
.L25:
	movq	-72(%rbp), %r15
	leaq	-1(%rax), %rcx
	xorl	%edx, %edx
	movq	%r12, %rsi
	movq	%r15, %rdi
	call	QuickSort
	movq	-64(%rbp), %r11
	movq	%r15, %rdi
	leaq	-1(%r11), %rax
	movq	%r11, -128(%rbp)
	movq	(%r15,%rax,8), %rdx
	movq	(%r12,%rax,8), %rcx
	movq	-80(%rbp), %r15
	movq	%rdx, %rsi
	subq	%rcx, %rax
	imulq	%rcx, %rsi
	shrq	$3, %r15
	imulq	%rdx, %rax
	movq	%rsi, (%rbx,%r15,8)
	movq	-88(%rbp), %rsi
	movq	%rax, 8(,%rsi,8)
	cmpq	$1, %r11
	jle	.L27
	leaq	-16(,%r11,8), %rax
	movl	%r11d, -116(%rbp)
	movl	$2, %r14d
	leaq	(%r12,%rax), %rsi
	addq	%rdi, %rax
	movl	$1, %r12d
	movq	%rax, -104(%rbp)
	leaq	1(%r11), %rax
	movq	%rsi, -96(%rbp)
	movq	%rax, -112(%rbp)
	.p2align 4,,10
	.p2align 3
.L34:
	movq	-104(%rbp), %rdi
	movq	-96(%rbp), %rax
	leal	-1(%r14), %r10d
	movq	%r15, %rsi
	leaq	-1(%r14), %r11
	movq	(%rdi), %r8
	movl	-116(%rbp), %edi
	movq	(%rax), %rax
	movl	%edi, %edx
	subl	%r14d, %edx
	movl	%eax, %ecx
	subl	%eax, %edx
	movl	%edx, %eax
	negl	%eax
	cmovs	%edx, %eax
	movl	%r12d, %edx
	subl	%ecx, %edi
	subl	%ecx, %r10d
	subl	%ecx, %edx
	movl	%edi, %r13d
	movq	%r15, %rdi
	cltq
	imulq	%r14, %rdi
	movl	%edx, %r9d
	imulq	%r8, %rax
	movq	%rdi, -72(%rbp)
	movq	%rax, -88(%rbp)
	xorl	%eax, %eax
	negl	%r9d
	cmovs	%edx, %r9d
	imulq	%r12, %rsi
	movslq	%r9d, %r9
	imulq	%r8, %r9
	movq	%rsi, -80(%rbp)
	.p2align 4,,10
	.p2align 3
.L33:
	testq	%rax, %rax
	je	.L55
	cmpq	%rax, %r14
	je	.L56
	movq	%r14, %rsi
	movl	%r10d, %ecx
	movl	%r13d, %edi
	subq	%rax, %rsi
	subl	%eax, %ecx
	imulq	%r15, %rsi
	movl	%ecx, %edx
	addq	%rax, %rsi
	negl	%edx
	cmovs	%ecx, %edx
	movq	%r11, %rcx
	subl	%eax, %edi
	subq	%rax, %rcx
	imulq	%r15, %rcx
	movslq	%edx, %rdx
	imulq	%r8, %rdx
	addq	%rax, %rcx
	addq	(%rbx,%rcx,8), %rdx
	movl	%edi, %ecx
	negl	%ecx
	cmovs	%edi, %ecx
	movslq	%ecx, %rcx
	imulq	%r8, %rcx
	addq	-8(%rbx,%rsi,8), %rcx
	cmpq	%rcx, %rdx
	cmovl	%rcx, %rdx
	movq	%rdx, (%rbx,%rsi,8)
.L31:
	addq	$1, %rax
	cmpq	%rax, %r14
	jge	.L33
	subq	$8, -96(%rbp)
	addq	$1, %r14
	addq	$1, %r12
	subq	$8, -104(%rbp)
	cmpq	%r14, -112(%rbp)
	jne	.L34
.L36:
	movq	-128(%rbp), %rcx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r15, %rdx
	movq	%rcx, %rsi
	imulq	%rax, %rdx
	subq	%rax, %rsi
	addq	%rsi, %rdx
	movq	(%rbx,%rdx,8), %rdx
	cmpq	%rdx, %r8
	cmovl	%rdx, %r8
	addq	$1, %rax
	cmpq	%rax, %rcx
	jge	.L35
.L37:
	xorl	%eax, %eax
	movq	%r8, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L57
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	movq	-80(%rbp), %rdi
	movq	(%rbx,%rdi,8), %rax
	movq	-72(%rbp), %rdi
	addq	%r9, %rax
	movq	%rax, (%rbx,%rdi,8)
	movl	$1, %eax
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L56:
	movq	-88(%rbp), %rdx
	addq	(%rbx,%r12,8), %rdx
	movq	%rdx, (%rbx,%r14,8)
	jmp	.L31
.L27:
	cmpq	$0, -128(%rbp)
	jns	.L36
	xorl	%r8d, %r8d
	jmp	.L37
.L57:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE53:
	.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 <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

//abc163E
void swap(long long *a, long long *b) {
  long long temp=*a;
  *a=*b, *b=temp;
}

void QuickSort(long long A[], long long B[], long long left, long long right) { //クイックソート//
  int Left=left, Right=right, pivot=A[(left + right) / 2];
  while(1){ // ソーティング
    while(A[Left] < pivot)
      Left++; // 基準より小さい値を左から見つけていく
    while(pivot < A[Right])
      Right--; // 基準より大きい値を右から見つけていく
    if(Left >= Right) break; // 見つかった値の順序が逆になったら終了
    swap(&A[Left], &A[Right]); // 値を交換
    swap(&B[Left], &B[Right]);
    Left++, Right--; // 次の値に移動
  }
  if(left < Left - 1) QuickSort(A, B, left, Left - 1); //左群を対象として再帰
  if(Right + 1 < right) QuickSort(A, B, Right + 1, right); //右群を対象として再帰
}

int main(void) {
  long long n, k, i, mod=1000000007, dpl, dpr, dpmax=0;
  scanf(" %lld", &n);
  long long a[n], b[n], dp[n + 1][n + 1]; //dp[左寄せの数][同右]
  for(i=0; i < n; i++){
    scanf(" %lld", &a[i]);
    b[i]=i;
  }
  QuickSort(a, b, 0, n - 1);

  dp[1][0]=a[n - 1] * b[n - 1], dp[0][1]=a[n - 1] * (n - 1 - b[n - 1]);
  for(i=2; i <= n; i++){
    for(k=0; k <= i; k++){
      if(k == 0) dp[i][0]=dp[i - 1][0] + abs(i - b[n - i] - 1) * a[n - i];
      else if(k == i) dp[0][i]=dp[0][i - 1] + abs(n - i - b[n - i]) * a[n - i];
      else{
        dpl=dp[i - k - 1][k] + abs(i - k - 1 - b[n - i]) * a[n - i];
        dpr=dp[i - k][k - 1] + abs(n - k - b[n - i]) * a[n - i];
        dp[i - k][k]=dpl > dpr ? dpl : dpr;
      }
    }
  }
  for(i=0; i <= n; i++) if(dpmax < dp[i][n - i]) dpmax=dp[i][n - i];

  printf("%lld", dpmax);
  return 0;
}
4
1 4 4 2
 6
8 6 11 1 2 1
 6
5 5 6 0 1 1
 4
1 8 4 2
 6
8 6 22 1 2 1
 6
5 5 9 0 1 1
 4
2 8 4 2
 6
8 6 22 1 1 1
 6
5 0 9 0 1 1
 6
8 6 33 1 1 1

22 90 58 30 123 65 32 119 55 152
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

//abc163E
void swap(long long *a, long long *b) {
  long long temp=*a;
  *a=*b, *b=temp;
}

void QuickSort(long long A[], long long B[], long long left, long long right) { //クイックソート//
  int Left=left, Right=right, pivot=A[(left + right) / 2];
  while(1){ // ソーティング
    while(A[Left] < pivot)
      Left++; // 基準より小さい値を左から見つけていく
    while(pivot < A[Right])
      Right--; // 基準より大きい値を右から見つけていく
    if(Left >= Right) break; // 見つかった値の順序が逆になったら終了
    swap(&A[Left], &A[Right]); // 値を交換
    swap(&B[Left], &B[Right]);
    Left++, Right--; // 次の値に移動
  }
  if(left < Left - 1) QuickSort(A, B, left, Left - 1); //左群を対象として再帰
  if(Right + 1 < right) QuickSort(A, B, Right + 1, right); //右群を対象として再帰
}

int main(void) {
  long long n, k, i, mod=1000000007, dpl, dpr, dpmax=0;
  scanf(" %lld", &n);
  long long a[n], b[n], dp[n + 1][n + 1]; //dp[左寄せの数][同右]
  for(i=0; i < n; i++){
    scanf(" %lld", &a[i]);
    b[i]=i;
  }
  QuickSort(a, b, 0, n - 1);

  dp[1][0]=a[n - 1] * b[n - 1], dp[0][1]=a[n - 1] * (n - 1 - b[n - 1]);
  for(i=2; i <= n; i++){
    for(k=0; k <= i; k++){
      if(k == 0) dp[i][0]=dp[i - 1][0] + abs(i - b[n - i] - 1) * a[n - i];
      else if(k == i) dp[0][i]=dp[0][i - 1] + abs(n - i - b[n - i]) * a[n - i];
      else{
        dpl=dp[i - k - 1][k] + abs(i - k - 1 - b[n - i]) * a[n - i];
        dpr=dp[i - k][k - 1] + abs(n - k - b[n - i]) * a[n - i];
        dp[i - k][k]=dpl > dpr ? dpl : dpr;
      }
    }
  }
  for(i=0; i <= n; i++) if(dpmax < dp[i][n - i]) dpmax=dp[i][n - i];

  printf("%lld", dpmax);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	QuickSort
	.type	QuickSort, @function
QuickSort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-40(%rbp), %rax
	movl	%eax, -12(%rbp)
	movq	-48(%rbp), %rax
	movl	%eax, -8(%rbp)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L13:
	nop
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	QuickSort, .-QuickSort
	.section	.rodata
.LC0:
	.string	" %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -296(%rbp)
	movq	$1000000007, -136(%rbp)
	movq	$0, -144(%rbp)
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L16:
	cmpq	%rcx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L18
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L19:
	cmpq	%rdx, %rsp
	je	.L20
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L19
.L20:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L21
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L21:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rcx, %rax
	leaq	0(,%rax,8), %rbx
	leaq	-1(%rsi), %rax
	movq	%rax, -88(%rbp)
	movq	%rcx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rsi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rsi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rsi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L22:
	cmpq	%rdx, %rsp
	je	.L23
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L22
.L23:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L24
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L24:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -152(%rbp)
	jmp	.L25
.L26:
	movq	-152(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-104(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	addq	$1, -152(%rbp)
.L25:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L26
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-104(%rbp), %rsi
	movq	-120(%rbp), %rax
	movq	%rdx, %rcx
	movl	$0, %edx
	movq	%rax, %rdi
	call	QuickSort
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	movq	%rbx, %rcx
	shrq	$3, %rcx
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	$2, -152(%rbp)
	jmp	.L27
.L33:
	movq	$0, -160(%rbp)
	jmp	.L28
.L32:
	cmpq	$0, -160(%rbp)
	jne	.L29
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	movq	%rbx, %rdx
	shrq	$3, %rdx
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L29:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jne	.L31
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-152(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L31:
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rdx, %rcx
	movq	-160(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -72(%rbp)
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rdx
	movq	-160(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -64(%rbp)
	movq	%rbx, %rsi
	shrq	$3, %rsi
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	cmovl	%rax, %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rsi
	movq	-160(%rbp), %rcx
	addq	%rsi, %rcx
	movq	%rdx, (%rax,%rcx,8)
.L30:
	addq	$1, -160(%rbp)
.L28:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jle	.L32
	addq	$1, -152(%rbp)
.L27:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L33
	movq	$0, -152(%rbp)
	jmp	.L34
.L36:
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -144(%rbp)
	jge	.L35
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -144(%rbp)
.L35:
	addq	$1, -152(%rbp)
.L34:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L36
	movq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-296(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	swap
	.type	swap, @function
swap:
.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, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-32(%rbp), %rax
	movq	(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-32(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, (%rax)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	swap, .-swap
	.globl	QuickSort
	.type	QuickSort, @function
QuickSort:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	movq	%rcx, -48(%rbp)
	movq	-40(%rbp), %rax
	movl	%eax, -12(%rbp)
	movq	-48(%rbp), %rax
	movl	%eax, -8(%rbp)
	movq	-40(%rbp), %rdx
	movq	-48(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rax
	movl	%eax, -4(%rbp)
	jmp	.L3
.L4:
	addl	$1, -12(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	(%rax), %rdx
	movl	-4(%rbp), %eax
	cltq
	cmpq	%rax, %rdx
	jl	.L4
	jmp	.L5
.L6:
	subl	$1, -8(%rbp)
.L5:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L13
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-24(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-32(%rbp), %rax
	addq	%rax, %rdx
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	swap
	addl	$1, -12(%rbp)
	subl	$1, -8(%rbp)
	jmp	.L3
.L13:
	nop
	movl	-12(%rbp), %eax
	subl	$1, %eax
	cltq
	cmpq	%rax, -40(%rbp)
	jge	.L10
	movl	-12(%rbp), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L10:
	movl	-8(%rbp), %eax
	addl	$1, %eax
	cltq
	cmpq	%rax, -48(%rbp)
	jle	.L14
	movl	-8(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movq	-48(%rbp), %rcx
	movq	-32(%rbp), %rsi
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	QuickSort
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	QuickSort, .-QuickSort
	.section	.rodata
.LC0:
	.string	" %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$264, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, -296(%rbp)
	movq	$1000000007, -136(%rbp)
	movq	$0, -144(%rbp)
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -128(%rbp)
	movq	%rdx, %rax
	movq	%rax, -224(%rbp)
	movq	$0, -216(%rbp)
	movq	%rdx, %rax
	movq	%rax, -240(%rbp)
	movq	$0, -232(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rdx
	movq	%rdx, %rax
	andq	$-4096, %rax
	movq	%rsp, %rcx
	subq	%rax, %rcx
.L16:
	cmpq	%rcx, %rsp
	je	.L17
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L16
.L17:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	movq	%rdx, %rax
	andl	$4095, %eax
	testq	%rax, %rax
	je	.L18
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L18:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -120(%rbp)
	movq	-168(%rbp), %rdx
	leaq	-1(%rdx), %rax
	movq	%rax, -112(%rbp)
	movq	%rdx, %rax
	movq	%rax, -256(%rbp)
	movq	$0, -248(%rbp)
	movq	%rdx, %rax
	movq	%rax, -272(%rbp)
	movq	$0, -264(%rbp)
	movq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %ebx
	movl	$0, %edx
	divq	%rbx
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L19:
	cmpq	%rdx, %rsp
	je	.L20
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L19
.L20:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L21
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L21:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -104(%rbp)
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	-168(%rbp), %rax
	leaq	1(%rax), %rsi
	leaq	-1(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%rcx, %rax
	movq	%rax, -288(%rbp)
	movq	$0, -280(%rbp)
	movq	%rcx, %rax
	leaq	0(,%rax,8), %rbx
	leaq	-1(%rsi), %rax
	movq	%rax, -88(%rbp)
	movq	%rcx, %rax
	movq	%rax, -192(%rbp)
	movq	$0, -184(%rbp)
	movq	%rsi, %rax
	movq	%rax, -208(%rbp)
	movq	$0, -200(%rbp)
	movq	-192(%rbp), %r8
	movq	-184(%rbp), %r9
	movq	%r9, %rdx
	movq	-208(%rbp), %r10
	movq	-200(%rbp), %r11
	imulq	%r10, %rdx
	movq	%r11, %rax
	imulq	%r8, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r8, %rax
	mulq	%r10
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	movq	%rsi, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	movq	%r15, %rdx
	imulq	%r12, %rdx
	movq	%r13, %rax
	imulq	%r14, %rax
	leaq	(%rdx,%rax), %rdi
	movq	%r14, %rax
	mulq	%r12
	addq	%rdx, %rdi
	movq	%rdi, %rdx
	movq	%rcx, %rdx
	movq	%rsi, %rax
	imulq	%rdx, %rax
	leaq	0(,%rax,8), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L22:
	cmpq	%rdx, %rsp
	je	.L23
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L22
.L23:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L24
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L24:
	movq	%rsp, %rax
	addq	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -80(%rbp)
	movq	$0, -152(%rbp)
	jmp	.L25
.L26:
	movq	-152(%rbp), %rax
	leaq	0(,%rax,8), %rdx
	movq	-120(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-104(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	-152(%rbp), %rcx
	movq	%rcx, (%rax,%rdx,8)
	addq	$1, -152(%rbp)
.L25:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jl	.L26
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-104(%rbp), %rsi
	movq	-120(%rbp), %rax
	movq	%rdx, %rcx
	movl	$0, %edx
	movq	%rax, %rdi
	call	QuickSort
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rax
	movq	%rbx, %rcx
	shrq	$3, %rcx
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, (%rax,%rcx,8)
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rdx
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-168(%rbp), %rax
	leaq	-1(%rax), %rcx
	movq	-104(%rbp), %rax
	movq	(%rax,%rcx,8), %rcx
	movq	%rsi, %rax
	subq	%rcx, %rax
	imulq	%rax, %rdx
	movq	-80(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	$2, -152(%rbp)
	jmp	.L27
.L33:
	movq	$0, -160(%rbp)
	jmp	.L28
.L32:
	cmpq	$0, -160(%rbp)
	jne	.L29
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	movq	%rbx, %rdx
	shrq	$3, %rdx
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L29:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jne	.L31
	movq	-152(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-152(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	leaq	(%rsi,%rax), %rcx
	movq	-80(%rbp), %rax
	movq	-152(%rbp), %rdx
	movq	%rcx, (%rax,%rdx,8)
	jmp	.L30
.L31:
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	-80(%rbp), %rax
	imulq	%rdx, %rcx
	movq	-160(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-152(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	subl	$1, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -72(%rbp)
	movq	%rbx, %rcx
	shrq	$3, %rcx
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rdx
	movq	-160(%rbp), %rax
	leaq	-1(%rax), %rsi
	movq	-80(%rbp), %rax
	imulq	%rcx, %rdx
	addq	%rsi, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-168(%rbp), %rax
	movl	%eax, %edx
	movq	-160(%rbp), %rax
	movl	%edx, %ecx
	subl	%eax, %ecx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-104(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	movl	%eax, %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %edx
	negl	%edx
	cmovns	%edx, %eax
	movslq	%eax, %rcx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rdx
	movq	-120(%rbp), %rax
	movq	(%rax,%rdx,8), %rax
	imulq	%rcx, %rax
	addq	%rsi, %rax
	movq	%rax, -64(%rbp)
	movq	%rbx, %rsi
	shrq	$3, %rsi
	movq	-152(%rbp), %rax
	subq	-160(%rbp), %rax
	movq	%rax, %rcx
	movq	-64(%rbp), %rdx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rdx
	cmovl	%rax, %rdx
	movq	-80(%rbp), %rax
	imulq	%rcx, %rsi
	movq	-160(%rbp), %rcx
	addq	%rsi, %rcx
	movq	%rdx, (%rax,%rcx,8)
.L30:
	addq	$1, -160(%rbp)
.L28:
	movq	-160(%rbp), %rax
	cmpq	-152(%rbp), %rax
	jle	.L32
	addq	$1, -152(%rbp)
.L27:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L33
	movq	$0, -152(%rbp)
	jmp	.L34
.L36:
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, -144(%rbp)
	jge	.L35
	movq	%rbx, %rdx
	shrq	$3, %rdx
	movq	-168(%rbp), %rax
	subq	-152(%rbp), %rax
	movq	%rax, %rcx
	movq	-80(%rbp), %rax
	imulq	-152(%rbp), %rdx
	addq	%rcx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -144(%rbp)
.L35:
	addq	$1, -152(%rbp)
.L34:
	movq	-168(%rbp), %rax
	cmpq	%rax, -152(%rbp)
	jle	.L36
	movq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-296(%rbp), %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
