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 n[4];
  for (int i = 0; i < 4; i++) {
    scanf("%d", &n[i]);
  }
  int digit[10];
  for (int i = 0; i < 10; i++) {
    digit[i] = 0;
  }
  for (int i = 0; i < 4; i++) {
    digit[n[i]]++;
  }
  if (digit[1] == 1 && digit[9] == 1 && digit[7] == 1 && digit[4] == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	movslq	(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	$0, 48(%rsp)
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movl	$1, 16(%rsp,%rax,4)
	movslq	4(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	8(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$1, 20(%rsp)
	jne	.L3
	cmpl	$1, 52(%rsp)
	je	.L9
.L3:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	cmpl	$1, 44(%rsp)
	jne	.L3
	cmpl	$1, 32(%rsp)
	jne	.L3
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	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"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	movslq	(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	$0, 48(%rsp)
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movl	$1, 16(%rsp,%rax,4)
	movslq	4(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	8(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$1, 20(%rsp)
	jne	.L3
	cmpl	$1, 52(%rsp)
	je	.L9
.L3:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	cmpl	$1, 44(%rsp)
	jne	.L3
	cmpl	$1, 32(%rsp)
	jne	.L3
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	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"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	movslq	(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	$0, 48(%rsp)
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movl	$1, 16(%rsp,%rax,4)
	movslq	4(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	8(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$1, 20(%rsp)
	jne	.L3
	cmpl	$1, 52(%rsp)
	je	.L9
.L3:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	cmpl	$1, 44(%rsp)
	jne	.L3
	cmpl	$1, 32(%rsp)
	jne	.L3
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	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 n[4];
  for (int i = 0; i < 4; i++) {
    scanf("%d", &n[i]);
  }
  int digit[10];
  for (int i = 0; i < 10; i++) {
    digit[i] = 0;
  }
  for (int i = 0; i < 4; i++) {
    digit[n[i]]++;
  }
  if (digit[1] == 1 && digit[9] == 1 && digit[7] == 1 && digit[4] == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  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 n[4];
  for (int i = 0; i < 4; i++) {
    scanf("%d", &n[i]);
  }
  int digit[10];
  for (int i = 0; i < 10; i++) {
    digit[i] = 0;
  }
  for (int i = 0; i < 4; i++) {
    digit[n[i]]++;
  }
  if (digit[1] == 1 && digit[9] == 1 && digit[7] == 1 && digit[4] == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  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:

1 9 13 4
 1 2 3 1
 4 9 0 13
 0 7 9 4
 1 9 13 3
 1 3 3 1
 3 9 0 13
 1 12 9 4
 1 9 13 0
 1 2 3 2

NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO

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 n[4];
  for (int i = 0; i < 4; i++) {
    scanf("%d", &n[i]);
  }
  int digit[10];
  for (int i = 0; i < 10; i++) {
    digit[i] = 0;
  }
  for (int i = 0; i < 4; i++) {
    digit[n[i]]++;
  }
  if (digit[1] == 1 && digit[9] == 1 && digit[7] == 1 && digit[4] == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }

  return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%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	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	movslq	(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	$0, 48(%rsp)
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movl	$1, 16(%rsp,%rax,4)
	movslq	4(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	8(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$1, 20(%rsp)
	jne	.L3
	cmpl	$1, 52(%rsp)
	je	.L9
.L3:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	cmpl	$1, 44(%rsp)
	jne	.L3
	cmpl	$1, 32(%rsp)
	jne	.L3
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	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"
.LC1:
	.string	"YES"
.LC2:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$64, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	16(%rsp), %r12
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	movslq	(%rsp), %rax
	pxor	%xmm0, %xmm0
	movq	$0, 48(%rsp)
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movl	$1, 16(%rsp,%rax,4)
	movslq	4(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	8(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	movslq	12(%rsp), %rax
	addl	$1, 16(%rsp,%rax,4)
	cmpl	$1, 20(%rsp)
	jne	.L3
	cmpl	$1, 52(%rsp)
	je	.L9
.L3:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L4:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L10
	addq	$64, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	cmpl	$1, 44(%rsp)
	jne	.L3
	cmpl	$1, 32(%rsp)
	jne	.L3
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L4
.L10:
	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:
```