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>

int main(void) {
	int N, L;
	int nakagawasyouko = 0, suzukisawa = 999999999;
	int i;
	if (scanf("%d%d", &N, &L) != 2) return 1;
	for (i = 1; i <= N; i++) {
		int azi = L + i - 1;
		if (abs(azi) < abs(suzukisawa)) suzukisawa = azi;
		nakagawasyouko += azi;
	}
	printf("%d\n", nakagawasyouko - suzukisawa);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	movl	$999999999, -20(%rbp)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L7
.L2:
	movl	$1, -16(%rbp)
	jmp	.L4
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$2, %r8d
	jne	.L1
	movl	(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	4(%rsp), %eax
	movl	$999999999, %ecx
	xorl	%edx, %edx
	addl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	movl	%ecx, %esi
	negl	%edi
	cmovs	%eax, %edi
	negl	%esi
	cmovs	%ecx, %esi
	cmpl	%esi, %edi
	cmovl	%eax, %ecx
	addl	%eax, %edx
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L5
.L3:
	subl	%ecx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$999999999, %ecx
	xorl	%edx, %edx
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movl	%eax, %r8d
	movl	$1, %eax
	cmpl	$2, %r8d
	jne	.L1
	movl	(%rsp), %r8d
	testl	%r8d, %r8d
	jle	.L8
	movl	4(%rsp), %eax
	movl	$999999999, %ecx
	xorl	%edx, %edx
	addl	%eax, %r8d
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %edi
	movl	%ecx, %esi
	negl	%edi
	cmovs	%eax, %edi
	negl	%esi
	cmovs	%ecx, %esi
	cmpl	%esi, %edi
	cmovl	%eax, %ecx
	addl	%eax, %edx
	addl	$1, %eax
	cmpl	%eax, %r8d
	jne	.L5
.L3:
	subl	%ecx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L1:
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L14
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movl	$999999999, %ecx
	xorl	%edx, %edx
	jmp	.L3
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.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>

int main(void) {
	int N, L;
	int nakagawasyouko = 0, suzukisawa = 999999999;
	int i;
	if (scanf("%d%d", &N, &L) != 2) return 1;
	for (i = 1; i <= N; i++) {
		int azi = L + i - 1;
		if (abs(azi) < abs(suzukisawa)) suzukisawa = azi;
		nakagawasyouko += azi;
	}
	printf("%d\n", nakagawasyouko - suzukisawa);
	return 0;
}

5 4
 13 -50
 3 -2
 5 7
 16 -50
 5 -2
 5 9
 23 -50
 4 -2
 8 9

26
 -534
 -3
 38
 -645
 0
 46
 -869
 -2
 91

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>

int main(void) {
	int N, L;
	int nakagawasyouko = 0, suzukisawa = 999999999;
	int i;
	if (scanf("%d%d", &N, &L) != 2) return 1;
	for (i = 1; i <= N; i++) {
		int azi = L + i - 1;
		if (abs(azi) < abs(suzukisawa)) suzukisawa = azi;
		nakagawasyouko += azi;
	}
	printf("%d\n", nakagawasyouko - suzukisawa);
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	movl	$999999999, -20(%rbp)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L7
.L2:
	movl	$1, -16(%rbp)
	jmp	.L4
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -24(%rbp)
	movl	$999999999, -20(%rbp)
	leaq	-28(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L7
.L2:
	movl	$1, -16(%rbp)
	jmp	.L4
.L6:
	movl	-28(%rbp), %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	subl	$1, %eax
	movl	%eax, -12(%rbp)
	movl	-12(%rbp), %eax
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	-20(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	cmpl	%eax, %edx
	jge	.L5
	movl	-12(%rbp), %eax
	movl	%eax, -20(%rbp)
.L5:
	movl	-12(%rbp), %eax
	addl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
.L4:
	movl	-32(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jle	.L6
	movl	-24(%rbp), %eax
	subl	-20(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L7:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
