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(void)
{
	
	int a1,a2,a3,a4;
	int b1,b2,b3,b4;
	while(scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)!=EOF){
 int co=0,co2=0;
 if(a1==b1)co++;
else if(a1==b2 || a1==b3 || a1==b4)co2++;
 if(a2==b2)co++;
else  if(a2==b1 || a2==b3 || a2==b4)co2++;
 if(a3==b3)co++;
 else  if(a3==b1 || a3==b2 || a3==b4)co2++;
 if(a4==b4)co++;
else  if(a4==b1 || a4==b2 || a4==b3)co2++;
 printf("%d %d\n",co,co2);
	}
return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
	.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	.LC1(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	60(%rsp), %rax
	leaq	72(%rsp), %rbp
	movq	%rbx, %r13
	movq	%rax, 8(%rsp)
	leaq	84(%rsp), %rax
	leaq	56(%rsp), %r14
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	%esi, %eax
	sete	%al
	cmpl	%edx, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L17
	cmpl	%edi, %esi
	jne	.L6
.L17:
	movl	%r9d, %ecx
.L6:
	movl	%r10d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	movq	%rbp, %r9
	movq	%r13, %r8
	movq	%r14, %rsi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r15, %rdi
	xorl	%eax, %eax
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	cmpl	$-1, %eax
	je	.L23
	movl	56(%rsp), %ecx
	movl	72(%rsp), %eax
	movl	76(%rsp), %edx
	movl	80(%rsp), %edi
	movl	84(%rsp), %r11d
	cmpl	%eax, %ecx
	je	.L10
	movl	$3, 4(%rsp)
	movl	$2, (%rsp)
	cmpl	%edx, %ecx
	je	.L12
	cmpl	%edi, %ecx
	je	.L12
	cmpl	%r11d, %ecx
	movl	$1, %ebx
	sete	%r12b
	sete	%r9b
	xorl	%r10d, %r10d
	movzbl	%r12b, %ecx
	movzbl	%r12b, %r8d
	movzbl	%r9b, %r9d
	movzbl	%r12b, %r12d
	addl	$3, %r9d
	addl	$2, %ecx
	addl	$1, %r8d
.L3:
	movl	60(%rsp), %esi
	cmpl	%edx, %esi
	je	.L14
.L25:
	cmpl	%esi, %eax
	je	.L4
	cmpl	%edi, %esi
	je	.L4
	cmpl	%r11d, %esi
	je	.L4
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
.L4:
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	je	.L15
.L26:
	cmpl	%esi, %eax
	je	.L5
	cmpl	%edx, %esi
	je	.L5
	cmpl	%r11d, %esi
	je	.L5
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	68(%rsp), %esi
	cmpl	%r11d, %esi
	jne	.L24
	movl	%ebx, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movl	60(%rsp), %esi
	movl	$4, %r9d
	movl	$3, %ecx
	movl	$1, %ebx
	movl	$2, %r8d
	movl	$1, %r12d
	xorl	%r10d, %r10d
	cmpl	%edx, %esi
	jne	.L25
.L14:
	movl	4(%rsp), %esi
	movl	%ebx, %r10d
	movl	(%rsp), %ebx
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
	movl	%esi, (%rsp)
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	jne	.L26
.L15:
	movl	%ecx, %r9d
	movl	%ebx, %r10d
	movl	%r8d, %ecx
	movl	(%rsp), %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$4, 4(%rsp)
	movl	$3, %r9d
	movl	$2, %ecx
	movl	$2, %ebx
	movl	$3, (%rsp)
	movl	$1, %r8d
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$104, %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
.L27:
	.cfi_restore_state
	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 %d\n"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
	.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	.LC1(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	60(%rsp), %rax
	leaq	72(%rsp), %rbp
	movq	%rbx, %r13
	movq	%rax, 8(%rsp)
	leaq	84(%rsp), %rax
	leaq	56(%rsp), %r14
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	%esi, %eax
	sete	%al
	cmpl	%edx, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L17
	cmpl	%edi, %esi
	jne	.L6
.L17:
	movl	%r9d, %ecx
.L6:
	movl	%r10d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	movq	%rbp, %r9
	movq	%r13, %r8
	movq	%r14, %rsi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r15, %rdi
	xorl	%eax, %eax
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	cmpl	$-1, %eax
	je	.L23
	movl	56(%rsp), %ecx
	movl	72(%rsp), %eax
	movl	76(%rsp), %edx
	movl	80(%rsp), %edi
	movl	84(%rsp), %r11d
	cmpl	%eax, %ecx
	je	.L10
	movl	$3, 4(%rsp)
	movl	$2, (%rsp)
	cmpl	%edx, %ecx
	je	.L12
	cmpl	%edi, %ecx
	je	.L12
	cmpl	%r11d, %ecx
	movl	$1, %ebx
	sete	%r12b
	sete	%r9b
	xorl	%r10d, %r10d
	movzbl	%r12b, %ecx
	movzbl	%r12b, %r8d
	movzbl	%r9b, %r9d
	movzbl	%r12b, %r12d
	addl	$3, %r9d
	addl	$2, %ecx
	addl	$1, %r8d
.L3:
	movl	60(%rsp), %esi
	cmpl	%edx, %esi
	je	.L14
.L25:
	cmpl	%esi, %eax
	je	.L4
	cmpl	%edi, %esi
	je	.L4
	cmpl	%r11d, %esi
	je	.L4
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
.L4:
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	je	.L15
.L26:
	cmpl	%esi, %eax
	je	.L5
	cmpl	%edx, %esi
	je	.L5
	cmpl	%r11d, %esi
	je	.L5
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	68(%rsp), %esi
	cmpl	%r11d, %esi
	jne	.L24
	movl	%ebx, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movl	60(%rsp), %esi
	movl	$4, %r9d
	movl	$3, %ecx
	movl	$1, %ebx
	movl	$2, %r8d
	movl	$1, %r12d
	xorl	%r10d, %r10d
	cmpl	%edx, %esi
	jne	.L25
.L14:
	movl	4(%rsp), %esi
	movl	%ebx, %r10d
	movl	(%rsp), %ebx
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
	movl	%esi, (%rsp)
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	jne	.L26
.L15:
	movl	%ecx, %r9d
	movl	%ebx, %r10d
	movl	%r8d, %ecx
	movl	(%rsp), %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$4, 4(%rsp)
	movl	$3, %r9d
	movl	$2, %ecx
	movl	$2, %ebx
	movl	$3, (%rsp)
	movl	$1, %r8d
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$104, %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
.L27:
	.cfi_restore_state
	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 %d\n"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
	.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	.LC1(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	60(%rsp), %rax
	leaq	72(%rsp), %rbp
	movq	%rbx, %r13
	movq	%rax, 8(%rsp)
	leaq	84(%rsp), %rax
	leaq	56(%rsp), %r14
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	%esi, %eax
	sete	%al
	cmpl	%edx, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L17
	cmpl	%edi, %esi
	jne	.L6
.L17:
	movl	%r9d, %ecx
.L6:
	movl	%r10d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	movq	%rbp, %r9
	movq	%r13, %r8
	movq	%r14, %rsi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r15, %rdi
	xorl	%eax, %eax
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	cmpl	$-1, %eax
	je	.L23
	movl	56(%rsp), %ecx
	movl	72(%rsp), %eax
	movl	76(%rsp), %edx
	movl	80(%rsp), %edi
	movl	84(%rsp), %r11d
	cmpl	%eax, %ecx
	je	.L10
	movl	$3, 4(%rsp)
	movl	$2, (%rsp)
	cmpl	%edx, %ecx
	je	.L12
	cmpl	%edi, %ecx
	je	.L12
	cmpl	%r11d, %ecx
	movl	$1, %ebx
	sete	%r12b
	sete	%r9b
	xorl	%r10d, %r10d
	movzbl	%r12b, %ecx
	movzbl	%r12b, %r8d
	movzbl	%r9b, %r9d
	movzbl	%r12b, %r12d
	addl	$3, %r9d
	addl	$2, %ecx
	addl	$1, %r8d
.L3:
	movl	60(%rsp), %esi
	cmpl	%edx, %esi
	je	.L14
.L25:
	cmpl	%esi, %eax
	je	.L4
	cmpl	%edi, %esi
	je	.L4
	cmpl	%r11d, %esi
	je	.L4
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
.L4:
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	je	.L15
.L26:
	cmpl	%esi, %eax
	je	.L5
	cmpl	%edx, %esi
	je	.L5
	cmpl	%r11d, %esi
	je	.L5
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	68(%rsp), %esi
	cmpl	%r11d, %esi
	jne	.L24
	movl	%ebx, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movl	60(%rsp), %esi
	movl	$4, %r9d
	movl	$3, %ecx
	movl	$1, %ebx
	movl	$2, %r8d
	movl	$1, %r12d
	xorl	%r10d, %r10d
	cmpl	%edx, %esi
	jne	.L25
.L14:
	movl	4(%rsp), %esi
	movl	%ebx, %r10d
	movl	(%rsp), %ebx
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
	movl	%esi, (%rsp)
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	jne	.L26
.L15:
	movl	%ecx, %r9d
	movl	%ebx, %r10d
	movl	%r8d, %ecx
	movl	(%rsp), %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$4, 4(%rsp)
	movl	$3, %r9d
	movl	$2, %ecx
	movl	$2, %ebx
	movl	$3, (%rsp)
	movl	$1, %r8d
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$104, %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
.L27:
	.cfi_restore_state
	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(void)
{
	
	int a1,a2,a3,a4;
	int b1,b2,b3,b4;
	while(scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)!=EOF){
 int co=0,co2=0;
 if(a1==b1)co++;
else if(a1==b2 || a1==b3 || a1==b4)co2++;
 if(a2==b2)co++;
else  if(a2==b1 || a2==b3 || a2==b4)co2++;
 if(a3==b3)co++;
 else  if(a3==b1 || a3==b2 || a3==b4)co2++;
 if(a4==b4)co++;
else  if(a4==b1 || a4==b2 || a4==b3)co2++;
 printf("%d %d\n",co,co2);
	}
return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>
int main(void)
{
	
	int a1,a2,a3,a4;
	int b1,b2,b3,b4;
	while(scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)!=EOF){
 int co=0,co2=0;
 if(a1==b1)co++;
else if(a1==b2 || a1==b3 || a1==b4)co2++;
 if(a2==b2)co++;
else  if(a2==b1 || a2==b3 || a2==b4)co2++;
 if(a3==b3)co++;
 else  if(a3==b1 || a3==b2 || a3==b4)co2++;
 if(a4==b4)co++;
else  if(a4==b1 || a4==b2 || a4==b3)co2++;
 printf("%d %d\n",co,co2);
	}
return 0;
}```

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:

9 1 8 2
4 1 5 9
4 6 8 2
4 6 3 0
 9 1 8 2
6 1 5 9
4 6 8 2
2 6 3 0
 9 1 8 2
4 1 5 9
2 6 8 2
4 6 3 0
 9 1 8 2
6 2 5 9
4 6 8 2
4 6 3 0
 9 1 8 2
6 2 5 9
4 6 8 2
4 9 3 0
 9 1 8 2
6 1 2 9
4 6 13 2
2 6 3 1
 9 1 8 2
6 1 5 9
8 6 13 2
2 7 3 1
 9 1 8 2
6 0 5 9
4 6 5 2
4 6 3 0
 9 1 8 2
6 2 8 9
4 6 8 2
4 9 3 1
 9 1 8 2
6 1 5 3
8 6 13 2
2 7 3 1

1 1
2 0
 1 1
1 1
 1 1
1 0
 0 2
2 0
 0 2
1 0
 1 2
1 1
 1 1
0 1
 0 1
2 0
 1 2
1 0
 1 0
0 1

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(void)
{
	
	int a1,a2,a3,a4;
	int b1,b2,b3,b4;
	while(scanf("%d %d %d %d %d %d %d %d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4)!=EOF){
 int co=0,co2=0;
 if(a1==b1)co++;
else if(a1==b2 || a1==b3 || a1==b4)co2++;
 if(a2==b2)co++;
else  if(a2==b1 || a2==b3 || a2==b4)co2++;
 if(a3==b3)co++;
 else  if(a3==b1 || a3==b2 || a3==b4)co2++;
 if(a4==b4)co++;
else  if(a4==b1 || a4==b2 || a4==b3)co2++;
 printf("%d %d\n",co,co2);
	}
return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
	.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	.LC1(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	60(%rsp), %rax
	leaq	72(%rsp), %rbp
	movq	%rbx, %r13
	movq	%rax, 8(%rsp)
	leaq	84(%rsp), %rax
	leaq	56(%rsp), %r14
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	%esi, %eax
	sete	%al
	cmpl	%edx, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L17
	cmpl	%edi, %esi
	jne	.L6
.L17:
	movl	%r9d, %ecx
.L6:
	movl	%r10d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	movq	%rbp, %r9
	movq	%r13, %r8
	movq	%r14, %rsi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r15, %rdi
	xorl	%eax, %eax
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	cmpl	$-1, %eax
	je	.L23
	movl	56(%rsp), %ecx
	movl	72(%rsp), %eax
	movl	76(%rsp), %edx
	movl	80(%rsp), %edi
	movl	84(%rsp), %r11d
	cmpl	%eax, %ecx
	je	.L10
	movl	$3, 4(%rsp)
	movl	$2, (%rsp)
	cmpl	%edx, %ecx
	je	.L12
	cmpl	%edi, %ecx
	je	.L12
	cmpl	%r11d, %ecx
	movl	$1, %ebx
	sete	%r12b
	sete	%r9b
	xorl	%r10d, %r10d
	movzbl	%r12b, %ecx
	movzbl	%r12b, %r8d
	movzbl	%r9b, %r9d
	movzbl	%r12b, %r12d
	addl	$3, %r9d
	addl	$2, %ecx
	addl	$1, %r8d
.L3:
	movl	60(%rsp), %esi
	cmpl	%edx, %esi
	je	.L14
.L25:
	cmpl	%esi, %eax
	je	.L4
	cmpl	%edi, %esi
	je	.L4
	cmpl	%r11d, %esi
	je	.L4
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
.L4:
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	je	.L15
.L26:
	cmpl	%esi, %eax
	je	.L5
	cmpl	%edx, %esi
	je	.L5
	cmpl	%r11d, %esi
	je	.L5
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	68(%rsp), %esi
	cmpl	%r11d, %esi
	jne	.L24
	movl	%ebx, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movl	60(%rsp), %esi
	movl	$4, %r9d
	movl	$3, %ecx
	movl	$1, %ebx
	movl	$2, %r8d
	movl	$1, %r12d
	xorl	%r10d, %r10d
	cmpl	%edx, %esi
	jne	.L25
.L14:
	movl	4(%rsp), %esi
	movl	%ebx, %r10d
	movl	(%rsp), %ebx
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
	movl	%esi, (%rsp)
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	jne	.L26
.L15:
	movl	%ecx, %r9d
	movl	%ebx, %r10d
	movl	%r8d, %ecx
	movl	(%rsp), %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$4, 4(%rsp)
	movl	$3, %r9d
	movl	$2, %ecx
	movl	$2, %ebx
	movl	$3, (%rsp)
	movl	$1, %r8d
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$104, %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
.L27:
	.cfi_restore_state
	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 %d\n"
.LC1:
	.string	"%d %d %d %d %d %d %d %d"
	.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	.LC1(%rip), %r15
	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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	64(%rsp), %rax
	leaq	68(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	60(%rsp), %rax
	leaq	72(%rsp), %rbp
	movq	%rbx, %r13
	movq	%rax, 8(%rsp)
	leaq	84(%rsp), %rax
	leaq	56(%rsp), %r14
	movq	%rax, 40(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 32(%rsp)
	leaq	76(%rsp), %rax
	movq	%rax, 24(%rsp)
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L24:
	cmpl	%esi, %eax
	sete	%al
	cmpl	%edx, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L17
	cmpl	%edi, %esi
	jne	.L6
.L17:
	movl	%r9d, %ecx
.L6:
	movl	%r10d, %edx
	leaq	.LC0(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L2:
	subq	$8, %rsp
	.cfi_def_cfa_offset 168
	movq	%rbp, %r9
	movq	%r13, %r8
	movq	%r14, %rsi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	%r15, %rdi
	xorl	%eax, %eax
	pushq	48(%rsp)
	.cfi_def_cfa_offset 184
	pushq	48(%rsp)
	.cfi_def_cfa_offset 192
	movq	48(%rsp), %rcx
	movq	40(%rsp), %rdx
	call	__isoc99_scanf@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 160
	cmpl	$-1, %eax
	je	.L23
	movl	56(%rsp), %ecx
	movl	72(%rsp), %eax
	movl	76(%rsp), %edx
	movl	80(%rsp), %edi
	movl	84(%rsp), %r11d
	cmpl	%eax, %ecx
	je	.L10
	movl	$3, 4(%rsp)
	movl	$2, (%rsp)
	cmpl	%edx, %ecx
	je	.L12
	cmpl	%edi, %ecx
	je	.L12
	cmpl	%r11d, %ecx
	movl	$1, %ebx
	sete	%r12b
	sete	%r9b
	xorl	%r10d, %r10d
	movzbl	%r12b, %ecx
	movzbl	%r12b, %r8d
	movzbl	%r9b, %r9d
	movzbl	%r12b, %r12d
	addl	$3, %r9d
	addl	$2, %ecx
	addl	$1, %r8d
.L3:
	movl	60(%rsp), %esi
	cmpl	%edx, %esi
	je	.L14
.L25:
	cmpl	%esi, %eax
	je	.L4
	cmpl	%edi, %esi
	je	.L4
	cmpl	%r11d, %esi
	je	.L4
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
.L4:
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	je	.L15
.L26:
	cmpl	%esi, %eax
	je	.L5
	cmpl	%edx, %esi
	je	.L5
	cmpl	%r11d, %esi
	je	.L5
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	.p2align 4,,10
	.p2align 3
.L5:
	movl	68(%rsp), %esi
	cmpl	%r11d, %esi
	jne	.L24
	movl	%ebx, %r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L12:
	movl	60(%rsp), %esi
	movl	$4, %r9d
	movl	$3, %ecx
	movl	$1, %ebx
	movl	$2, %r8d
	movl	$1, %r12d
	xorl	%r10d, %r10d
	cmpl	%edx, %esi
	jne	.L25
.L14:
	movl	4(%rsp), %esi
	movl	%ebx, %r10d
	movl	(%rsp), %ebx
	movl	%ecx, %r9d
	movl	%r8d, %ecx
	movl	%r12d, %r8d
	movl	%esi, (%rsp)
	movl	64(%rsp), %esi
	cmpl	%edi, %esi
	jne	.L26
.L15:
	movl	%ecx, %r9d
	movl	%ebx, %r10d
	movl	%r8d, %ecx
	movl	(%rsp), %ebx
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	movl	$4, 4(%rsp)
	movl	$3, %r9d
	movl	$2, %ecx
	movl	$2, %ebx
	movl	$3, (%rsp)
	movl	$1, %r8d
	xorl	%r12d, %r12d
	movl	$1, %r10d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$104, %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
.L27:
	.cfi_restore_state
	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:
```