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 argc, char const *argv[]) {
  int A[3];
  int B[3];
  int T[5];
  for (size_t i = 1; i < 5; i++) {T[i]=0;}
  for (size_t i = 0; i < 3; i++) {scanf("%d%d",&A[i],&B[i] );}
  for (size_t i = 0; i < 3; i++) {
    T[A[i]]++;T[B[i]]++;
  }
  int odd=0;
  for (size_t i = 1; i < 5; i++) {if (T[i]%2==1) {odd++;}}
  if (odd==2) {printf("YES");}else{printf("NO");}
  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
	subq	$112, %rsp
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -88(%rbp)
	jmp	.L2
.L3:
	movq	-88(%rbp), %rax
	movl	$0, -32(%rbp,%rax,4)
	addq	$1, -88(%rbp)
.L2:
	cmpq	$4, -88(%rbp)
	jbe	.L3
	movq	$0, -80(%rbp)
	jmp	.L4
.L5:
	leaq	-44(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-56(%rbp), %rcx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -80(%rbp)
.L4:
	cmpq	$2, -80(%rbp)
	jbe	.L5
	movq	$0, -72(%rbp)
	jmp	.L6
.L7:
	movq	-72(%rbp), %rax
	movl	-56(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movq	-72(%rbp), %rax
	movl	-44(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	addq	$1, -72(%rbp)
.L6:
	cmpq	$2, -72(%rbp)
	jbe	.L7
	movl	$0, -92(%rbp)
	movq	$1, -64(%rbp)
	jmp	.L8
.L10:
	movq	-64(%rbp), %rax
	movl	-32(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -92(%rbp)
.L9:
	addq	$1, -64(%rbp)
.L8:
	cmpq	$4, -64(%rbp)
	jbe	.L10
	cmpl	$2, -92(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$72, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rbp
	movups	%xmm0, 36(%rsp)
	leaq	8(%rsp), %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %rbx
	addq	$4, %rbp
	cmpq	%r13, %rbx
	jne	.L2
	movslq	8(%rsp), %rax
	movdqa	.LC1(%rip), %xmm1
	addl	$1, 32(%rsp,%rax,4)
	movslq	20(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	24(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	16(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movdqu	36(%rsp), %xmm0
	movdqa	%xmm0, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm2, %xmm0
	pand	%xmm1, %xmm0
	psubd	%xmm2, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	$2, %eax
	je	.L9
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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"
.LC2:
	.string	"YES"
.LC3:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pxor	%xmm0, %xmm0
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$72, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rbp
	movups	%xmm0, 36(%rsp)
	leaq	8(%rsp), %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbp, %rdx
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$4, %rbx
	addq	$4, %rbp
	cmpq	%r13, %rbx
	jne	.L2
	movslq	8(%rsp), %rax
	movdqa	.LC1(%rip), %xmm1
	addl	$1, 32(%rsp,%rax,4)
	movslq	20(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	24(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	16(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movslq	28(%rsp), %rax
	addl	$1, 32(%rsp,%rax,4)
	movdqu	36(%rsp), %xmm0
	movdqa	%xmm0, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm2, %xmm0
	pand	%xmm1, %xmm0
	psubd	%xmm2, %xmm0
	pcmpeqd	%xmm1, %xmm0
	pand	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpl	$2, %eax
	je	.L9
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$72, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L4
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 argc, char const *argv[]) {
  int A[3];
  int B[3];
  int T[5];
  for (size_t i = 1; i < 5; i++) {T[i]=0;}
  for (size_t i = 0; i < 3; i++) {scanf("%d%d",&A[i],&B[i] );}
  for (size_t i = 0; i < 3; i++) {
    T[A[i]]++;T[B[i]]++;
  }
  int odd=0;
  for (size_t i = 1; i < 5; i++) {if (T[i]%2==1) {odd++;}}
  if (odd==2) {printf("YES");}else{printf("NO");}
  return 0;
}

4 3
1 3
2 3
 1 1
3 2
4 3
 1 2
3 2
4 3
 1 2
2 2
4 3
 3 2
2 4
1 4
 1 1
3 2
4 1
 1 4
2 2
4 3
 3 2
3 4
1 4
 2 1
3 2
4 1
 4 2
1 3
3 3

NO YES YES NO YES NO YES YES YES NO
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 argc, char const *argv[]) {
  int A[3];
  int B[3];
  int T[5];
  for (size_t i = 1; i < 5; i++) {T[i]=0;}
  for (size_t i = 0; i < 3; i++) {scanf("%d%d",&A[i],&B[i] );}
  for (size_t i = 0; i < 3; i++) {
    T[A[i]]++;T[B[i]]++;
  }
  int odd=0;
  for (size_t i = 1; i < 5; i++) {if (T[i]%2==1) {odd++;}}
  if (odd==2) {printf("YES");}else{printf("NO");}
  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
	subq	$112, %rsp
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -88(%rbp)
	jmp	.L2
.L3:
	movq	-88(%rbp), %rax
	movl	$0, -32(%rbp,%rax,4)
	addq	$1, -88(%rbp)
.L2:
	cmpq	$4, -88(%rbp)
	jbe	.L3
	movq	$0, -80(%rbp)
	jmp	.L4
.L5:
	leaq	-44(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-56(%rbp), %rcx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -80(%rbp)
.L4:
	cmpq	$2, -80(%rbp)
	jbe	.L5
	movq	$0, -72(%rbp)
	jmp	.L6
.L7:
	movq	-72(%rbp), %rax
	movl	-56(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movq	-72(%rbp), %rax
	movl	-44(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	addq	$1, -72(%rbp)
.L6:
	cmpq	$2, -72(%rbp)
	jbe	.L7
	movl	$0, -92(%rbp)
	movq	$1, -64(%rbp)
	jmp	.L8
.L10:
	movq	-64(%rbp), %rax
	movl	-32(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -92(%rbp)
.L9:
	addq	$1, -64(%rbp)
.L8:
	cmpq	$4, -64(%rbp)
	jbe	.L10
	cmpl	$2, -92(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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
	subq	$112, %rsp
	movl	%edi, -100(%rbp)
	movq	%rsi, -112(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -88(%rbp)
	jmp	.L2
.L3:
	movq	-88(%rbp), %rax
	movl	$0, -32(%rbp,%rax,4)
	addq	$1, -88(%rbp)
.L2:
	cmpq	$4, -88(%rbp)
	jbe	.L3
	movq	$0, -80(%rbp)
	jmp	.L4
.L5:
	leaq	-44(%rbp), %rdx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rax, %rdx
	leaq	-56(%rbp), %rcx
	movq	-80(%rbp), %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addq	$1, -80(%rbp)
.L4:
	cmpq	$2, -80(%rbp)
	jbe	.L5
	movq	$0, -72(%rbp)
	jmp	.L6
.L7:
	movq	-72(%rbp), %rax
	movl	-56(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	movq	-72(%rbp), %rax
	movl	-44(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -32(%rbp,%rax,4)
	addq	$1, -72(%rbp)
.L6:
	cmpq	$2, -72(%rbp)
	jbe	.L7
	movl	$0, -92(%rbp)
	movq	$1, -64(%rbp)
	jmp	.L8
.L10:
	movq	-64(%rbp), %rax
	movl	-32(%rbp,%rax,4), %eax
	cltd
	shrl	$31, %edx
	addl	%edx, %eax
	andl	$1, %eax
	subl	%edx, %eax
	cmpl	$1, %eax
	jne	.L9
	addl	$1, -92(%rbp)
.L9:
	addq	$1, -64(%rbp)
.L8:
	cmpq	$4, -64(%rbp)
	jbe	.L10
	cmpl	$2, -92(%rbp)
	jne	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L12
.L11:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
