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(void){
  int N,M;
  int a,b;
  int c[100010]={0};

  scanf("%d %d",&N,&M);
  int i;
  int flag = 1;
  for(i=0;i<M;i++){
    scanf("%d %d",&a,&b);
    c[a]++;
    c[b]++;
  }
  for(i=0;i<100010;i++){
    if(c[i]%2==1){
      flag = 0;
      break;
    }
  }

  if(flag){
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400048(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400068(%rbp), %rdx
	leaq	-400072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400052(%rbp)
	movl	$0, -400056(%rbp)
	jmp	.L2
.L3:
	leaq	-400060(%rbp), %rdx
	leaq	-400064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L3
	movl	$0, -400056(%rbp)
	jmp	.L4
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$0, -400052(%rbp)
	jmp	.L6
.L5:
	addl	$1, -400056(%rbp)
.L4:
	cmpl	$100009, -400056(%rbp)
	jle	.L7
.L6:
	cmpl	$0, -400052(%rbp)
	je	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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 %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2752, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400040, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	addl	$1, %ebp
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebp, 4(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdx
	leaq	400056(%rsp), %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	je	.L15
.L5:
	movl	(%rdx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L16
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	400056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400064, %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
.L15:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	-397312(%rsp), %r11
	.cfi_def_cfa 11, 397360
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2752, %rsp
	.cfi_def_cfa_offset 400112
	movl	$400040, %edx
	xorl	%esi, %esi
	leaq	.LC0(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 400056(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	movq	%rbx, %rdi
	call	memset@PLT
	leaq	4(%rsp), %rdx
	movq	%rsp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L2
	xorl	%ebp, %ebp
	leaq	12(%rsp), %r14
	leaq	8(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rdx
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	8(%rsp), %rax
	addl	$1, %ebp
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	%ebp, 4(%rsp)
	jg	.L3
.L2:
	movq	%rbx, %rdx
	leaq	400056(%rsp), %rsi
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	je	.L15
.L5:
	movl	(%rdx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%ecx, %eax
	andl	$1, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	jne	.L16
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L7:
	movq	400056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L17
	addq	$400064, %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
.L15:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L7
.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:

#include<stdio.h>

int main(void){
  int N,M;
  int a,b;
  int c[100010]={0};

  scanf("%d %d",&N,&M);
  int i;
  int flag = 1;
  for(i=0;i<M;i++){
    scanf("%d %d",&a,&b);
    c[a]++;
    c[b]++;
  }
  for(i=0;i<100010;i++){
    if(c[i]%2==1){
      flag = 0;
      break;
    }
  }

  if(flag){
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  return 0;
}

5 5
1 2
5 5
5 1
3 4
2 3
 5 1
1 1
6 5
5 2
3 4
2 3
 5 1
1 2
5 5
5 1
3 4
2 3
 5 1
1 2
6 5
5 1
3 4
2 3
 5 1
1 2
6 5
5 2
3 4
2 3
 5 1
1 1
6 6
5 2
3 4
2 3
 5 1
1 1
6 6
5 2
3 4
3 3
 10 1
1 1
6 6
5 2
3 4
3 3
 10 0
1 1
6 6
5 2
3 4
3 3
 10 0
1 1
11 6
5 2
3 4
3 3

NO
 YES
 NO
 NO
 NO
 YES
 YES
 YES
 YES
 YES

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(void){
  int N,M;
  int a,b;
  int c[100010]={0};

  scanf("%d %d",&N,&M);
  int i;
  int flag = 1;
  for(i=0;i<M;i++){
    scanf("%d %d",&a,&b);
    c[a]++;
    c[b]++;
  }
  for(i=0;i<100010;i++){
    if(c[i]%2==1){
      flag = 0;
      break;
    }
  }

  if(flag){
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400048(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400068(%rbp), %rdx
	leaq	-400072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400052(%rbp)
	movl	$0, -400056(%rbp)
	jmp	.L2
.L3:
	leaq	-400060(%rbp), %rdx
	leaq	-400064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L3
	movl	$0, -400056(%rbp)
	jmp	.L4
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$0, -400052(%rbp)
	jmp	.L6
.L5:
	addl	$1, -400056(%rbp)
.L4:
	cmpl	$100009, -400056(%rbp)
	jle	.L7
.L6:
	cmpl	$0, -400052(%rbp)
	je	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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 %d"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.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
	leaq	-397312(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2768, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-400048(%rbp), %rax
	movl	$400040, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-400068(%rbp), %rdx
	leaq	-400072(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -400052(%rbp)
	movl	$0, -400056(%rbp)
	jmp	.L2
.L3:
	leaq	-400060(%rbp), %rdx
	leaq	-400064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-400064(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	movl	-400060(%rbp), %eax
	movslq	%eax, %rdx
	movl	-400048(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -400048(%rbp,%rax,4)
	addl	$1, -400056(%rbp)
.L2:
	movl	-400068(%rbp), %eax
	cmpl	%eax, -400056(%rbp)
	jl	.L3
	movl	$0, -400056(%rbp)
	jmp	.L4
.L7:
	movl	-400056(%rbp), %eax
	cltq
	movl	-400048(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L5
	movl	$0, -400052(%rbp)
	jmp	.L6
.L5:
	addl	$1, -400056(%rbp)
.L4:
	cmpl	$100009, -400056(%rbp)
	jle	.L7
.L6:
	cmpl	$0, -400052(%rbp)
	je	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
