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

```c
// Aizu 0260: Salary for a Plumber
// 2017.9.8 bal4u@uu

#include <stdio.h>

#define max(a,b) ((a)>=(b)?(a):(b))
int j[65003];

int cmp(int *a, int *b) { return *b - *a; }

int main()
{
	int n, i, a;
    long long sum, ans;

	while (scanf("%d", &n) && n) {
        for (sum = i = 0; i < n; i++) scanf("%d", &a), sum += a;
        for (i = 0; i < n-1; i++) scanf("%d", j+i);
        qsort(j, n-1, sizeof(int), cmp);
        for (ans = sum*n, i = 0; i < n-1; i++) {
            sum += j[i];
            ans = max(ans, sum*(n-1-i));
        }
        printf("%lld\n", ans);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB23:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	j(%rip), %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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L10
	movl	(%rsp), %esi
	testl	%esi, %esi
	je	.L10
	movl	$0, %r13d
	movl	$0, %r14d
	leaq	4(%rsp), %rbp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %esi
	addq	%rax, %r13
	cmpl	%r14d, %esi
	jg	.L5
.L11:
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L6
	leaq	j(%rip), %r14
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %r14
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L7
.L6:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	qsort@PLT
	movslq	(%rsp), %rdx
	movq	%rdx, %rsi
	imulq	%r13, %rdx
	leal	-1(%rsi), %ecx
	testl	%ecx, %ecx
	jle	.L8
	leaq	j(%rip), %rax
	subl	$2, %esi
	movslq	%ecx, %rcx
	leaq	4(%rax), %rdi
	leaq	(%rdi,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rax), %rsi
	addq	%rsi, %r13
	movq	%rcx, %rsi
	imulq	%r13, %rsi
	cmpq	%rsi, %rdx
	cmovl	%rsi, %rdx
	addq	$4, %rax
	subq	$1, %rcx
	cmpq	%rax, %rdi
	jne	.L9
.L8:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 32
	.type	j, @object
	.size	j, 260012
j:
	.zero	260012
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB23:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	j(%rip), %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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L10
	movl	(%rsp), %esi
	testl	%esi, %esi
	je	.L10
	movl	$0, %r13d
	movl	$0, %r14d
	leaq	4(%rsp), %rbp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %esi
	addq	%rax, %r13
	cmpl	%r14d, %esi
	jg	.L5
.L11:
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L6
	leaq	j(%rip), %r14
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %r14
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L7
.L6:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	qsort@PLT
	movslq	(%rsp), %rdx
	movq	%rdx, %rsi
	imulq	%r13, %rdx
	leal	-1(%rsi), %ecx
	testl	%ecx, %ecx
	jle	.L8
	leaq	j(%rip), %rax
	subl	$2, %esi
	movslq	%ecx, %rcx
	leaq	4(%rax), %rdi
	leaq	(%rdi,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rax), %rsi
	addq	%rsi, %r13
	movq	%rcx, %rsi
	imulq	%r13, %rsi
	cmpq	%rsi, %rdx
	cmovl	%rsi, %rdx
	addq	$4, %rax
	subq	$1, %rcx
	cmpq	%rax, %rdi
	jne	.L9
.L8:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 32
	.type	j, @object
	.size	j, 260012
j:
	.zero	260012
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB23:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	j(%rip), %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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L10
	movl	(%rsp), %esi
	testl	%esi, %esi
	je	.L10
	movl	$0, %r13d
	movl	$0, %r14d
	leaq	4(%rsp), %rbp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %esi
	addq	%rax, %r13
	cmpl	%r14d, %esi
	jg	.L5
.L11:
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L6
	leaq	j(%rip), %r14
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %r14
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L7
.L6:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	qsort@PLT
	movslq	(%rsp), %rdx
	movq	%rdx, %rsi
	imulq	%r13, %rdx
	leal	-1(%rsi), %ecx
	testl	%ecx, %ecx
	jle	.L8
	leaq	j(%rip), %rax
	subl	$2, %esi
	movslq	%ecx, %rcx
	leaq	4(%rax), %rdi
	leaq	(%rdi,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rax), %rsi
	addq	%rsi, %r13
	movq	%rcx, %rsi
	imulq	%r13, %rsi
	cmpq	%rsi, %rdx
	cmovl	%rsi, %rdx
	addq	$4, %rax
	subq	$1, %rcx
	cmpq	%rax, %rdi
	jne	.L9
.L8:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 32
	.type	j, @object
	.size	j, 260012
j:
	.zero	260012
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
// Aizu 0260: Salary for a Plumber
// 2017.9.8 bal4u@uu

#include <stdio.h>

#define max(a,b) ((a)>=(b)?(a):(b))
int j[65003];

int cmp(int *a, int *b) { return *b - *a; }

int main()
{
	int n, i, a;
    long long sum, ans;

	while (scanf("%d", &n) && n) {
        for (sum = i = 0; i < n; i++) scanf("%d", &a), sum += a;
        for (i = 0; i < n-1; i++) scanf("%d", j+i);
        qsort(j, n-1, sizeof(int), cmp);
        for (ans = sum*n, i = 0; i < n-1; i++) {
            sum += j[i];
            ans = max(ans, sum*(n-1-i));
        }
        printf("%lld\n", ans);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// Aizu 0260: Salary for a Plumber
// 2017.9.8 bal4u@uu

#include <stdio.h>

#define max(a,b) ((a)>=(b)?(a):(b))
int j[65003];

int cmp(int *a, int *b) { return *b - *a; }

int main()
{
	int n, i, a;
    long long sum, ans;

	while (scanf("%d", &n) && n) {
        for (sum = i = 0; i < n; i++) scanf("%d", &a), sum += a;
        for (i = 0; i < n-1; i++) scanf("%d", j+i);
        qsort(j, n-1, sizeof(int), cmp);
        for (ans = sum*n, i = 0; i < n-1; i++) {
            sum += j[i];
            ans = max(ans, sum*(n-1-i));
        }
        printf("%lld\n", ans);
	}
	return 0;
}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

3
1 1 1
3 3
4
3 1 3 3
1 1 1
5
1 2 3 4 5
4 3 2 1
0
 3
1 1 1
3 3
4
3 1 3 3
1 1 1
5
1 2 3 4 5
3 3 2 1
0
 3
0 1 1
3 3
4
3 1 3 3
1 1 1
5
1 2 3 4 5
3 3 2 1
0
 3
0 1 1
3 3
4
3 1 5 3
1 1 1
5
1 2 3 4 5
3 3 2 1
0
 3
1 1 2
3 3
4
3 3 3 3
1 1 1
5
1 2 3 4 5
4 3 2 1
0
 3
0 1 1
3 3
4
3 1 3 3
1 1 1
5
1 1 3 4 5
3 3 2 1
0
 3
0 1 1
3 3
4
4 1 3 3
1 1 1
5
1 1 3 4 5
3 3 2 2
0
 3
0 1 1
3 3
4
0 1 3 3
1 1 1
5
1 1 3 4 5
3 3 2 2
0
 3
0 1 1
3 2
4
0 0 3 3
1 1 1
5
1 1 3 4 5
3 3 2 2
0
 3
1 1 1
3 5
4
3 3 3 3
1 1 1
5
1 2 3 4 5
4 3 2 1
0

12
40
76
 12
40
75
 10
40
75
 10
48
75
 14
48
76
 10
40
70
 10
44
70
 10
28
70
 10
24
70
 16
48
76

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

```c
// Aizu 0260: Salary for a Plumber
// 2017.9.8 bal4u@uu

#include <stdio.h>

#define max(a,b) ((a)>=(b)?(a):(b))
int j[65003];

int cmp(int *a, int *b) { return *b - *a; }

int main()
{
	int n, i, a;
    long long sum, ans;

	while (scanf("%d", &n) && n) {
        for (sum = i = 0; i < n; i++) scanf("%d", &a), sum += a;
        for (i = 0; i < n-1; i++) scanf("%d", j+i);
        qsort(j, n-1, sizeof(int), cmp);
        for (ans = sum*n, i = 0; i < n-1; i++) {
            sum += j[i];
            ans = max(ans, sum*(n-1-i));
        }
        printf("%lld\n", ans);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB23:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	j(%rip), %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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L10
	movl	(%rsp), %esi
	testl	%esi, %esi
	je	.L10
	movl	$0, %r13d
	movl	$0, %r14d
	leaq	4(%rsp), %rbp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %esi
	addq	%rax, %r13
	cmpl	%r14d, %esi
	jg	.L5
.L11:
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L6
	leaq	j(%rip), %r14
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %r14
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L7
.L6:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	qsort@PLT
	movslq	(%rsp), %rdx
	movq	%rdx, %rsi
	imulq	%r13, %rdx
	leal	-1(%rsi), %ecx
	testl	%ecx, %ecx
	jle	.L8
	leaq	j(%rip), %rax
	subl	$2, %esi
	movslq	%ecx, %rcx
	leaq	4(%rax), %rdi
	leaq	(%rdi,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rax), %rsi
	addq	%rsi, %r13
	movq	%rcx, %rsi
	imulq	%r13, %rsi
	cmpq	%rsi, %rdx
	cmovl	%rsi, %rdx
	addq	$4, %rax
	subq	$1, %rcx
	cmpq	%rax, %rdi
	jne	.L9
.L8:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 32
	.type	j, @object
	.size	j, 260012
j:
	.zero	260012
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	cmp
	.type	cmp, @function
cmp:
.LFB23:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE23:
	.size	cmp, .-cmp
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	j(%rip), %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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%eax, %eax
	movq	%r12, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	testl	%eax, %eax
	je	.L10
	movl	(%rsp), %esi
	testl	%esi, %esi
	je	.L10
	movl	$0, %r13d
	movl	$0, %r14d
	leaq	4(%rsp), %rbp
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movslq	4(%rsp), %rax
	movl	(%rsp), %esi
	addq	%rax, %r13
	cmpl	%r14d, %esi
	jg	.L5
.L11:
	subl	$1, %esi
	testl	%esi, %esi
	jle	.L6
	leaq	j(%rip), %r14
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %ebp
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	addq	$4, %r14
	leal	-1(%rax), %esi
	cmpl	%ebp, %esi
	jg	.L7
.L6:
	leaq	cmp(%rip), %rcx
	movl	$4, %edx
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	qsort@PLT
	movslq	(%rsp), %rdx
	movq	%rdx, %rsi
	imulq	%r13, %rdx
	leal	-1(%rsi), %ecx
	testl	%ecx, %ecx
	jle	.L8
	leaq	j(%rip), %rax
	subl	$2, %esi
	movslq	%ecx, %rcx
	leaq	4(%rax), %rdi
	leaq	(%rdi,%rsi,4), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movslq	(%rax), %rsi
	addq	%rsi, %r13
	movq	%rcx, %rsi
	imulq	%r13, %rsi
	cmpq	%rsi, %rdx
	cmovl	%rsi, %rdx
	addq	$4, %rax
	subq	$1, %rcx
	cmpq	%rax, %rdi
	jne	.L9
.L8:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L10:
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	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
.L26:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 32
	.type	j, @object
	.size	j, 260012
j:
	.zero	260012
	.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:
```