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

```c
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#define rep(i,l,r) for(int i=l;i<r;i++)

typedef long long ll;

ll max(ll x, ll y) { return (x > y) ? x : y; }

int dsc(const void* a, const void* b) { return -*(int*)a + *(int*)b; }

int main() {
    ll n, a[100000],b[100000];
    scanf("%lld", &n);
    ll sum = 0;
    rep(i, 0, n) {
        scanf("%lld", &a[i]);
        if (i % 2 == 0) sum += a[i];
        else sum -= a[i];
    }
    b[0] = sum;
    rep(i, 1, n) {
        b[i] = 2*a[i - 1] - b[i - 1];
    }

    rep(i,0,n) printf("%lld ",b[i]);

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dsc, .-dsc
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600024(%rbp)
	movl	$0, -1600044(%rbp)
	jmp	.L6
.L9:
	leaq	-1600016(%rbp), %rdx
	movl	-1600044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -1600024(%rbp)
	jmp	.L8
.L7:
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	subq	%rax, -1600024(%rbp)
.L8:
	addl	$1, -1600044(%rbp)
.L6:
	movl	-1600044(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-1600024(%rbp), %rax
	movq	%rax, -800016(%rbp)
	movl	$1, -1600040(%rbp)
	jmp	.L10
.L11:
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	(%rax,%rax), %rdx
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	%rax, %rdx
	movl	-1600040(%rbp), %eax
	cltq
	movq	%rdx, -800016(%rbp,%rax,8)
	addl	$1, -1600040(%rbp)
.L10:
	movl	-1600040(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movl	$0, -1600036(%rbp)
	jmp	.L12
.L13:
	movl	-1600036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1600036(%rbp)
.L12:
	movl	-1600036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	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
.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	max
	.type	max, @function
max:
.LFB39:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	max, .-max
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	dsc, .-dsc
	.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:
.LFB41:
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597480
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2600, %rsp
	.cfi_def_cfa_offset 1600080
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 8(%rsp)
	jle	.L5
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	movq	8(%rsp), %rax
	addq	(%r12,%rbx,8), %rbp
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jle	.L22
.L8:
	xorl	%eax, %eax
	leaq	(%r12,%rbx,8), %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	testb	$1, %bl
	je	.L23
	movq	8(%rsp), %rax
	subq	(%r12,%rbx,8), %rbp
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jg	.L8
.L22:
	movq	%rbp, 800016(%rsp)
	cmpq	$1, %rax
	jle	.L24
	leaq	-8(,%rax,8), %rsi
	leaq	800024(%rsp), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%r12,%rax), %rdi
	leaq	(%rdi,%rdi), %rdx
	subq	%rbp, %rdx
	movq	%rdx, (%rcx,%rax)
	addq	$8, %rax
	movq	%rdx, %rbp
	cmpq	%rax, %rsi
	jne	.L11
.L10:
	xorl	%ebx, %ebx
	leaq	800016(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L12:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 8(%rsp)
	jg	.L12
.L5:
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$1600040, %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
.L24:
	.cfi_restore_state
	jne	.L5
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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	max
	.type	max, @function
max:
.LFB39:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE39:
	.size	max, .-max
	.p2align 4
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB40:
	.cfi_startproc
	endbr64
	movl	(%rsi), %eax
	subl	(%rdi), %eax
	ret
	.cfi_endproc
.LFE40:
	.size	dsc, .-dsc
	.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:
.LFB41:
	.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	-1597440(%rsp), %r11
	.cfi_def_cfa 11, 1597480
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2600, %rsp
	.cfi_def_cfa_offset 1600080
	leaq	.LC0(%rip), %r13
	movq	%r13, %rdi
	movq	%fs:40, %rax
	movq	%rax, 1600024(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rsi
	call	__isoc99_scanf@PLT
	cmpq	$0, 8(%rsp)
	jle	.L5
	xorl	%ebx, %ebx
	xorl	%ebp, %ebp
	leaq	16(%rsp), %r12
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L23:
	movq	8(%rsp), %rax
	addq	(%r12,%rbx,8), %rbp
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jle	.L22
.L8:
	xorl	%eax, %eax
	leaq	(%r12,%rbx,8), %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	testb	$1, %bl
	je	.L23
	movq	8(%rsp), %rax
	subq	(%r12,%rbx,8), %rbp
	addq	$1, %rbx
	cmpq	%rbx, %rax
	jg	.L8
.L22:
	movq	%rbp, 800016(%rsp)
	cmpq	$1, %rax
	jle	.L24
	leaq	-8(,%rax,8), %rsi
	leaq	800024(%rsp), %rcx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L11:
	movq	(%r12,%rax), %rdi
	leaq	(%rdi,%rdi), %rdx
	subq	%rbp, %rdx
	movq	%rdx, (%rcx,%rax)
	addq	$8, %rax
	movq	%rdx, %rbp
	cmpq	%rax, %rsi
	jne	.L11
.L10:
	xorl	%ebx, %ebx
	leaq	800016(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L12:
	movq	(%r12,%rbx,8), %rdx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addq	$1, %rbx
	call	__printf_chk@PLT
	cmpq	%rbx, 8(%rsp)
	jg	.L12
.L5:
	movq	1600024(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$1600040, %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
.L24:
	.cfi_restore_state
	jne	.L5
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE41:
	.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>
#include<stdlib.h>
#include<stdbool.h>
#define rep(i,l,r) for(int i=l;i<r;i++)

typedef long long ll;

ll max(ll x, ll y) { return (x > y) ? x : y; }

int dsc(const void* a, const void* b) { return -*(int*)a + *(int*)b; }

int main() {
    ll n, a[100000],b[100000];
    scanf("%lld", &n);
    ll sum = 0;
    rep(i, 0, n) {
        scanf("%lld", &a[i]);
        if (i % 2 == 0) sum += a[i];
        else sum -= a[i];
    }
    b[0] = sum;
    rep(i, 1, n) {
        b[i] = 2*a[i - 1] - b[i - 1];
    }

    rep(i,0,n) printf("%lld ",b[i]);

    return 0;
}

3
1000000000 1000100000 0
 3
2 0 4
 3
1000000000 1001100000 0
 3
1000000000 1011100000 0
 3
1000000000 1011101000 0
 3
1010000000 1011101000 0
 3
1010100000 1011101000 0
 3
1000000000 1010000000 0
 3
1000000000 1100100000 0
 3
1000001000 1011101000 0

-100000 2000100000 100000  6 -2 2  -1100000 2001100000 1100000  -11100000 2011100000 11100000  -11101000 2011101000 11101000  -1101000 2021101000 1101000  -1001000 2021201000 1001000  -10000000 2010000000 10000000  -100100000 2100100000 100100000  -11100000 2011102000 11100000 
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#define rep(i,l,r) for(int i=l;i<r;i++)

typedef long long ll;

ll max(ll x, ll y) { return (x > y) ? x : y; }

int dsc(const void* a, const void* b) { return -*(int*)a + *(int*)b; }

int main() {
    ll n, a[100000],b[100000];
    scanf("%lld", &n);
    ll sum = 0;
    rep(i, 0, n) {
        scanf("%lld", &a[i]);
        if (i % 2 == 0) sum += a[i];
        else sum -= a[i];
    }
    b[0] = sum;
    rep(i, 1, n) {
        b[i] = 2*a[i - 1] - b[i - 1];
    }

    rep(i,0,n) printf("%lld ",b[i]);

    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dsc, .-dsc
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600024(%rbp)
	movl	$0, -1600044(%rbp)
	jmp	.L6
.L9:
	leaq	-1600016(%rbp), %rdx
	movl	-1600044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -1600024(%rbp)
	jmp	.L8
.L7:
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	subq	%rax, -1600024(%rbp)
.L8:
	addl	$1, -1600044(%rbp)
.L6:
	movl	-1600044(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-1600024(%rbp), %rax
	movq	%rax, -800016(%rbp)
	movl	$1, -1600040(%rbp)
	jmp	.L10
.L11:
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	(%rax,%rax), %rdx
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	%rax, %rdx
	movl	-1600040(%rbp), %eax
	cltq
	movq	%rdx, -800016(%rbp,%rax,8)
	addl	$1, -1600040(%rbp)
.L10:
	movl	-1600040(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movl	$0, -1600036(%rbp)
	jmp	.L12
.L13:
	movl	-1600036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1600036(%rbp)
.L12:
	movl	-1600036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	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
.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	max
	.type	max, @function
max:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	max, .-max
	.globl	dsc
	.type	dsc, @function
dsc:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rax
	movl	(%rax), %edx
	movq	-8(%rbp), %rax
	movl	(%rax), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dsc, .-dsc
	.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
	leaq	-1597440(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2608, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1600032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -1600024(%rbp)
	movl	$0, -1600044(%rbp)
	jmp	.L6
.L9:
	leaq	-1600016(%rbp), %rdx
	movl	-1600044(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1600044(%rbp), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	addq	%rax, -1600024(%rbp)
	jmp	.L8
.L7:
	movl	-1600044(%rbp), %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	subq	%rax, -1600024(%rbp)
.L8:
	addl	$1, -1600044(%rbp)
.L6:
	movl	-1600044(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L9
	movq	-1600024(%rbp), %rax
	movq	%rax, -800016(%rbp)
	movl	$1, -1600040(%rbp)
	jmp	.L10
.L11:
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-1600016(%rbp,%rax,8), %rax
	leaq	(%rax,%rax), %rdx
	movl	-1600040(%rbp), %eax
	subl	$1, %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	subq	%rax, %rdx
	movl	-1600040(%rbp), %eax
	cltq
	movq	%rdx, -800016(%rbp,%rax,8)
	addl	$1, -1600040(%rbp)
.L10:
	movl	-1600040(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L11
	movl	$0, -1600036(%rbp)
	jmp	.L12
.L13:
	movl	-1600036(%rbp), %eax
	cltq
	movq	-800016(%rbp,%rax,8), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1600036(%rbp)
.L12:
	movl	-1600036(%rbp), %eax
	movslq	%eax, %rdx
	movq	-1600032(%rbp), %rax
	cmpq	%rax, %rdx
	jl	.L13
	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
.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:
