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

```c
#include <stdio.h>
#include <stdlib.h>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
typedef long long ll;

ll n;
ll a[2 * 100000 + 5];

int main()
{
	ll ans = (1ll << 60ll);

	scanf("%lld", &n);
	for (ll i = 1; i <= n; i++) {
		scanf("%lld", &a[i]);

		a[i] += a[i - 1];
	}

	for (ll i = 1; i < n; i++) {
		ans = min(ans, 
				llabs(a[n] - a[i] - a[i]));
	}

	printf("%lld\n", ans);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpq	$0, n(%rip)
	movabsq	$1152921504606846976, %r8
	jle	.L2
	leaq	8+a(%rip), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	-8(%rbx), %rax
	addq	%rax, (%rbx)
	addq	$8, %rbx
	movq	n(%rip), %rax
	cmpq	%rbp, %rax
	jge	.L3
	cmpq	$1, %rax
	jle	.L6
	leaq	a(%rip), %rdx
	movabsq	$1152921504606846976, %r8
	movq	(%rdx,%rax,8), %rdi
	leaq	8(%rdx), %rcx
	leaq	(%rdx,%rax,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rax
	subq	(%rcx), %rax
	subq	(%rcx), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	cmpq	%rax, %r8
	cmovg	%rax, %r8
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	.L4
.L2:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movabsq	$1152921504606846976, %r8
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600040
a:
	.zero	1600040
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpq	$0, n(%rip)
	movabsq	$1152921504606846976, %r8
	jle	.L2
	leaq	8+a(%rip), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	-8(%rbx), %rax
	addq	%rax, (%rbx)
	addq	$8, %rbx
	movq	n(%rip), %rax
	cmpq	%rbp, %rax
	jge	.L3
	cmpq	$1, %rax
	jle	.L6
	leaq	a(%rip), %rdx
	movabsq	$1152921504606846976, %r8
	movq	(%rdx,%rax,8), %rdi
	leaq	8(%rdx), %rcx
	leaq	(%rdx,%rax,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rax
	subq	(%rcx), %rax
	subq	(%rcx), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	cmpq	%rax, %r8
	cmovg	%rax, %r8
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	.L4
.L2:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movabsq	$1152921504606846976, %r8
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600040
a:
	.zero	1600040
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpq	$0, n(%rip)
	movabsq	$1152921504606846976, %r8
	jle	.L2
	leaq	8+a(%rip), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	-8(%rbx), %rax
	addq	%rax, (%rbx)
	addq	$8, %rbx
	movq	n(%rip), %rax
	cmpq	%rbp, %rax
	jge	.L3
	cmpq	$1, %rax
	jle	.L6
	leaq	a(%rip), %rdx
	movabsq	$1152921504606846976, %r8
	movq	(%rdx,%rax,8), %rdi
	leaq	8(%rdx), %rcx
	leaq	(%rdx,%rax,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rax
	subq	(%rcx), %rax
	subq	(%rcx), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	cmpq	%rax, %r8
	cmovg	%rax, %r8
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	.L4
.L2:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movabsq	$1152921504606846976, %r8
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600040
a:
	.zero	1600040
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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
#include <stdio.h>
#include <stdlib.h>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
typedef long long ll;

ll n;
ll a[2 * 100000 + 5];

int main()
{
	ll ans = (1ll << 60ll);

	scanf("%lld", &n);
	for (ll i = 1; i <= n; i++) {
		scanf("%lld", &a[i]);

		a[i] += a[i - 1];
	}

	for (ll i = 1; i < n; i++) {
		ans = min(ans, 
				llabs(a[n] - a[i] - a[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
#include <stdio.h>
#include <stdlib.h>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
typedef long long ll;

ll n;
ll a[2 * 100000 + 5];

int main()
{
	ll ans = (1ll << 60ll);

	scanf("%lld", &n);
	for (ll i = 1; i <= n; i++) {
		scanf("%lld", &a[i]);

		a[i] += a[i - 1];
	}

	for (ll i = 1; i < n; i++) {
		ans = min(ans, 
				llabs(a[n] - a[i] - a[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:

6
1 2 3 4 5 6

1

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

```c
#include <stdio.h>
#include <stdlib.h>
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
typedef long long ll;

ll n;
ll a[2 * 100000 + 5];

int main()
{
	ll ans = (1ll << 60ll);

	scanf("%lld", &n);
	for (ll i = 1; i <= n; i++) {
		scanf("%lld", &a[i]);

		a[i] += a[i - 1];
	}

	for (ll i = 1; i < n; i++) {
		ans = min(ans, 
				llabs(a[n] - a[i] - a[i]));
	}

	printf("%lld\n", ans);

	return 0;
}
```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpq	$0, n(%rip)
	movabsq	$1152921504606846976, %r8
	jle	.L2
	leaq	8+a(%rip), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	-8(%rbx), %rax
	addq	%rax, (%rbx)
	addq	$8, %rbx
	movq	n(%rip), %rax
	cmpq	%rbp, %rax
	jge	.L3
	cmpq	$1, %rax
	jle	.L6
	leaq	a(%rip), %rdx
	movabsq	$1152921504606846976, %r8
	movq	(%rdx,%rax,8), %rdi
	leaq	8(%rdx), %rcx
	leaq	(%rdx,%rax,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rax
	subq	(%rcx), %rax
	subq	(%rcx), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	cmpq	%rax, %r8
	cmovg	%rax, %r8
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	.L4
.L2:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movabsq	$1152921504606846976, %r8
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600040
a:
	.zero	1600040
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	xorl	%eax, %eax
	leaq	n(%rip), %rsi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	__isoc99_scanf@PLT
	cmpq	$0, n(%rip)
	movabsq	$1152921504606846976, %r8
	jle	.L2
	leaq	8+a(%rip), %rbx
	movl	$1, %ebp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$1, %rbp
	call	__isoc99_scanf@PLT
	movq	-8(%rbx), %rax
	addq	%rax, (%rbx)
	addq	$8, %rbx
	movq	n(%rip), %rax
	cmpq	%rbp, %rax
	jge	.L3
	cmpq	$1, %rax
	jle	.L6
	leaq	a(%rip), %rdx
	movabsq	$1152921504606846976, %r8
	movq	(%rdx,%rax,8), %rdi
	leaq	8(%rdx), %rcx
	leaq	(%rdx,%rax,8), %rsi
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%rdi, %rax
	subq	(%rcx), %rax
	subq	(%rcx), %rax
	movq	%rax, %rdx
	negq	%rdx
	cmovns	%rdx, %rax
	cmpq	%rax, %r8
	cmovg	%rax, %r8
	addq	$8, %rcx
	cmpq	%rcx, %rsi
	jne	.L4
.L2:
	movq	%r8, %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movabsq	$1152921504606846976, %r8
	jmp	.L2
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	a
	.bss
	.align 32
	.type	a, @object
	.size	a, 1600040
a:
	.zero	1600040
	.globl	n
	.align 8
	.type	n, @object
	.size	n, 8
n:
	.zero	8
	.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:
```