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>

int main(){
  int N,S=0;
  scanf("%d",&N);
  int V[30],C[30];
  for(int i=1;i<=N;i++)
    scanf("%d",V+i);
  for(int i=1;i<=N;i++){
    scanf("%d",C+i);
    C[i]=V[i]-C[i];
    if(C[i]>0) S+=C[i];
  }
  printf("%d\n",S);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -268(%rbp)
	leaq	-272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -264(%rbp)
	jmp	.L2
.L3:
	movl	-264(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -264(%rbp)
.L2:
	movl	-272(%rbp), %eax
	cmpl	%eax, -264(%rbp)
	jle	.L3
	movl	$1, -260(%rbp)
	jmp	.L4
.L6:
	movl	-260(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-260(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-260(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -268(%rbp)
.L5:
	addl	$1, -260(%rbp)
.L4:
	movl	-272(%rbp), %eax
	cmpl	%eax, -260(%rbp)
	jle	.L6
	movl	-268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
.LFE0:
	.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"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	movl	$1, %ebx
	subq	$272, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 264(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jge	.L4
	testl	%eax, %eax
	jle	.L5
	movl	$1, %ebx
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	leaq	144(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%r13,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	subl	0(%r13,%rbx,4), %eax
	testl	%eax, %eax
	leal	(%r12,%rax), %edx
	movl	%eax, 0(%r13,%rbx,4)
	cmovg	%edx, %r12d
	addq	$1, %rbx
	cmpl	%ebx, 12(%rsp)
	jge	.L7
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	264(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$272, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L3
.L15:
	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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rbp, %rdi
	movl	$1, %ebx
	subq	$272, %rsp
	.cfi_def_cfa_offset 320
	movq	%fs:40, %rax
	movq	%rax, 264(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	20(%rsp), %r12
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %r12
	cmpl	%ebx, %eax
	jge	.L4
	testl	%eax, %eax
	jle	.L5
	movl	$1, %ebx
	xorl	%r12d, %r12d
	leaq	16(%rsp), %r14
	leaq	144(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L7:
	leaq	0(%r13,%rbx,4), %rsi
	xorl	%eax, %eax
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	(%r14,%rbx,4), %eax
	subl	0(%r13,%rbx,4), %eax
	testl	%eax, %eax
	leal	(%r12,%rax), %edx
	movl	%eax, 0(%r13,%rbx,4)
	cmovg	%edx, %r12d
	addq	$1, %rbx
	cmpl	%ebx, 12(%rsp)
	jge	.L7
.L3:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	264(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	addq	$272, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	xorl	%r12d, %r12d
	jmp	.L3
.L15:
	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:

#include <stdio.h>

int main(){
  int N,S=0;
  scanf("%d",&N);
  int V[30],C[30];
  for(int i=1;i<=N;i++)
    scanf("%d",V+i);
  for(int i=1;i<=N;i++){
    scanf("%d",C+i);
    C[i]=V[i]-C[i];
    if(C[i]>0) S+=C[i];
  }
  printf("%d\n",S);
  return 0;
}
4
13 21 6 19
11 30 6 10
 3
10 2 5
6 5 4
 1
1
45
 4
13 21 6 19
0 30 6 10
 3
10 2 5
12 5 4
 4
13 21 11 19
0 30 6 10
 4
13 21 11 19
-1 30 6 10
 3
10 1 5
12 5 1
 4
13 21 11 26
-1 30 6 10
 4
13 21 11 26
-1 30 11 10

11
 5
 0
 22
 1
 27
 28
 4
 35
 30

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>

int main(){
  int N,S=0;
  scanf("%d",&N);
  int V[30],C[30];
  for(int i=1;i<=N;i++)
    scanf("%d",V+i);
  for(int i=1;i<=N;i++){
    scanf("%d",C+i);
    C[i]=V[i]-C[i];
    if(C[i]>0) S+=C[i];
  }
  printf("%d\n",S);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -268(%rbp)
	leaq	-272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -264(%rbp)
	jmp	.L2
.L3:
	movl	-264(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -264(%rbp)
.L2:
	movl	-272(%rbp), %eax
	cmpl	%eax, -264(%rbp)
	jle	.L3
	movl	$1, -260(%rbp)
	jmp	.L4
.L6:
	movl	-260(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-260(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-260(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -268(%rbp)
.L5:
	addl	$1, -260(%rbp)
.L4:
	movl	-272(%rbp), %eax
	cmpl	%eax, -260(%rbp)
	jle	.L6
	movl	-268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
.LFE0:
	.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"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -268(%rbp)
	leaq	-272(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -264(%rbp)
	jmp	.L2
.L3:
	movl	-264(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-256(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -264(%rbp)
.L2:
	movl	-272(%rbp), %eax
	cmpl	%eax, -264(%rbp)
	jle	.L3
	movl	$1, -260(%rbp)
	jmp	.L4
.L6:
	movl	-260(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-128(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-260(%rbp), %eax
	cltq
	movl	-256(%rbp,%rax,4), %edx
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	subl	%eax, %edx
	movl	-260(%rbp), %eax
	cltq
	movl	%edx, -128(%rbp,%rax,4)
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jle	.L5
	movl	-260(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	addl	%eax, -268(%rbp)
.L5:
	addl	$1, -260(%rbp)
.L4:
	movl	-272(%rbp), %eax
	cmpl	%eax, -260(%rbp)
	jle	.L6
	movl	-268(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	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
.LFE0:
	.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:
