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>

int main() {
	int n, i, x;
	long long int m, y, a;
	scanf("%d", &n);
	m = 0;
	x = 0;
	y = 0;
	for (i = 0; i < n; i++) {
		scanf("%lld", &a);
		if (a < 0) {
			x++;
			a = -a;
		}
		if (i == 0 || y > a) y = a;
		m += a;
	}
	if (x % 2 == 1) m -= y * 2;
	printf("%lld", m);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	testq	%rax, %rax
	jns	.L3
	negq	%rax
	addl	$1, %r13d
	movq	%rax, 16(%rsp)
.L3:
	testl	%ebx, %ebx
	je	.L4
	cmpq	%rbp, %rax
	jge	.L5
.L4:
	movq	16(%rsp), %rbp
.L5:
	addq	%rax, %r12
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L6
	addq	%rbp, %rbp
	movq	%r12, %rax
	subq	%rbp, %rax
	andl	$1, %r13d
	cmovne	%rax, %r12
.L2:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	testq	%rax, %rax
	jns	.L3
	negq	%rax
	addl	$1, %r13d
	movq	%rax, 16(%rsp)
.L3:
	testl	%ebx, %ebx
	je	.L4
	cmpq	%rbp, %rax
	jge	.L5
.L4:
	movq	16(%rsp), %rbp
.L5:
	addq	%rax, %r12
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L6
	addq	%rbp, %rbp
	movq	%r12, %rax
	subq	%rbp, %rax
	andl	$1, %r13d
	cmovne	%rax, %r12
.L2:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	testq	%rax, %rax
	jns	.L3
	negq	%rax
	addl	$1, %r13d
	movq	%rax, 16(%rsp)
.L3:
	testl	%ebx, %ebx
	je	.L4
	cmpq	%rbp, %rax
	jge	.L5
.L4:
	movq	16(%rsp), %rbp
.L5:
	addq	%rax, %r12
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L6
	addq	%rbp, %rbp
	movq	%r12, %rax
	subq	%rbp, %rax
	andl	$1, %r13d
	cmovne	%rax, %r12
.L2:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```
```c
#include <stdio.h>

int main() {
	int n, i, x;
	long long int m, y, a;
	scanf("%d", &n);
	m = 0;
	x = 0;
	y = 0;
	for (i = 0; i < n; i++) {
		scanf("%lld", &a);
		if (a < 0) {
			x++;
			a = -a;
		}
		if (i == 0 || y > a) y = a;
		m += a;
	}
	if (x % 2 == 1) m -= y * 2;
	printf("%lld", m);
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main() {
	int n, i, x;
	long long int m, y, a;
	scanf("%d", &n);
	m = 0;
	x = 0;
	y = 0;
	for (i = 0; i < n; i++) {
		scanf("%lld", &a);
		if (a < 0) {
			x++;
			a = -a;
		}
		if (i == 0 || y > a) y = a;
		m += a;
	}
	if (x % 2 == 1) m -= y * 2;
	printf("%lld", m);
}```

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:

11
-1000000000 1000000000 -364513171 1000000000 -1000000000 0 1000000000 -1000000000 1000000000 -1000000000 1000000000
 5
10 -4 -8 -11 5
 3
-10 5 0
 11
-1000000000 1000000000 -364513171 1000000000 -1000000000 0 1000000000 -1000000000 1000000000 -1000000000 1000000100
 5
10 -4 -4 -11 5
 3
-14 5 0
 11
-1000000000 1000000000 -364513171 1000000000 -1000000000 0 1000000000 -1000000000 1000000100 -1000000000 1000000100
 5
10 -4 -4 -14 5
 3
-14 5 1
 11
-1000000000 1000000000 -364513171 1000000000 -1382285407 0 1000000000 -1000000000 1000000000 -1000000000 1000000100

9364513171 30 15 9364513271 26 19 9364513371 29 18 9746798678
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>

int main() {
	int n, i, x;
	long long int m, y, a;
	scanf("%d", &n);
	m = 0;
	x = 0;
	y = 0;
	for (i = 0; i < n; i++) {
		scanf("%lld", &a);
		if (a < 0) {
			x++;
			a = -a;
		}
		if (i == 0 || y > a) y = a;
		m += a;
	}
	if (x % 2 == 1) m -= y * 2;
	printf("%lld", m);
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	testq	%rax, %rax
	jns	.L3
	negq	%rax
	addl	$1, %r13d
	movq	%rax, 16(%rsp)
.L3:
	testl	%ebx, %ebx
	je	.L4
	cmpq	%rbp, %rax
	jge	.L5
.L4:
	movq	16(%rsp), %rbp
.L5:
	addq	%rax, %r12
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L6
	addq	%rbp, %rbp
	movq	%r12, %rax
	subq	%rbp, %rax
	andl	$1, %r13d
	cmovne	%rax, %r12
.L2:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L8
	xorl	%ebp, %ebp
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	16(%rsp), %r14
	leaq	.LC1(%rip), %r15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	16(%rsp), %rax
	testq	%rax, %rax
	jns	.L3
	negq	%rax
	addl	$1, %r13d
	movq	%rax, 16(%rsp)
.L3:
	testl	%ebx, %ebx
	je	.L4
	cmpq	%rbp, %rax
	jge	.L5
.L4:
	movq	16(%rsp), %rbp
.L5:
	addq	%rax, %r12
	addl	$1, %ebx
	cmpl	%ebx, 12(%rsp)
	jg	.L6
	addq	%rbp, %rbp
	movq	%r12, %rax
	subq	%rbp, %rax
	andl	$1, %r13d
	cmovne	%rax, %r12
.L2:
	xorl	%eax, %eax
	movq	%r12, %rdx
	movq	%r15, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$40, %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
.L8:
	.cfi_restore_state
	xorl	%r12d, %r12d
	leaq	.LC1(%rip), %r15
	jmp	.L2
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:
```