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() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[i]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

     if(M[0] == 1 && M[1] == 9 && M[2] == 7 && M[3] == 4) {
        printf("YES");
     } else {
        printf("NO");
     }

     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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rsp, %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	movl	$0, -4(%rbp)
	cmpq	%r13, %rbx
	jne	.L2
	movl	(%rsp), %eax
	cmpl	$1, %eax
	je	.L20
	cmpl	$9, %eax
	je	.L21
	cmpl	$7, %eax
	je	.L22
	cmpl	$4, %eax
	sete	%dl
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
.L3:
	movl	4(%rsp), %eax
	cmpl	$1, %eax
	je	.L23
	cmpl	$9, %eax
	je	.L24
	cmpl	$7, %eax
	je	.L25
	cmpl	$4, %eax
	movl	$1, %eax
	cmove	%eax, %edx
.L4:
	movl	8(%rsp), %eax
	cmpl	$1, %eax
	je	.L26
	cmpl	$9, %eax
	je	.L27
	cmpl	$7, %eax
	je	.L28
	cmpl	$4, %eax
	je	.L50
.L5:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L29
	cmpl	$9, %eax
	je	.L30
.L18:
	cmpl	$7, %eax
	je	.L8
	cmpl	$4, %eax
	je	.L9
.L7:
	testb	%dl, %dl
	jne	.L9
.L10:
	testb	%dil, %dil
	jne	.L17
.L11:
	testb	%sil, %sil
	je	.L12
	movl	$9, 20(%rsp)
.L12:
	testb	%cl, %cl
	je	.L13
	movl	$1, 16(%rsp)
.L14:
	cmpl	$9, 20(%rsp)
	je	.L51
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$56, %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
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	movl	$1, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L8:
	testb	%dl, %dl
	jne	.L53
.L17:
	movl	$7, 24(%rsp)
	jmp	.L11
.L53:
	movl	%edx, %edi
.L9:
	movl	$4, 28(%rsp)
	jmp	.L10
.L20:
	xorl	%edx, %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %ecx
	jmp	.L3
.L26:
	movl	$1, %ecx
	jmp	.L5
.L23:
	movl	$1, %ecx
	jmp	.L4
.L29:
	movl	$1, %ecx
	jmp	.L7
.L27:
	movl	$1, %esi
	jmp	.L5
.L24:
	movl	$1, %esi
	jmp	.L4
.L30:
	movl	$1, %esi
	jmp	.L7
.L50:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$9, %eax
	je	.L33
	movl	$1, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, 16(%rsp)
	jne	.L15
	jmp	.L14
.L51:
	cmpl	$7, 24(%rsp)
	jne	.L15
	cmpl	$4, 28(%rsp)
	jne	.L15
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L28:
	movl	$1, %edi
	jmp	.L5
.L25:
	movl	$1, %edi
	jmp	.L4
.L22:
	xorl	%edx, %edx
	movl	$1, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L33:
	movl	$1, %esi
	jmp	.L9
.L32:
	movl	$1, %ecx
	jmp	.L9
.L52:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rsp, %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	movl	$0, -4(%rbp)
	cmpq	%r13, %rbx
	jne	.L2
	movl	(%rsp), %eax
	cmpl	$1, %eax
	je	.L20
	cmpl	$9, %eax
	je	.L21
	cmpl	$7, %eax
	je	.L22
	cmpl	$4, %eax
	sete	%dl
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
.L3:
	movl	4(%rsp), %eax
	cmpl	$1, %eax
	je	.L23
	cmpl	$9, %eax
	je	.L24
	cmpl	$7, %eax
	je	.L25
	cmpl	$4, %eax
	movl	$1, %eax
	cmove	%eax, %edx
.L4:
	movl	8(%rsp), %eax
	cmpl	$1, %eax
	je	.L26
	cmpl	$9, %eax
	je	.L27
	cmpl	$7, %eax
	je	.L28
	cmpl	$4, %eax
	je	.L50
.L5:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L29
	cmpl	$9, %eax
	je	.L30
.L18:
	cmpl	$7, %eax
	je	.L8
	cmpl	$4, %eax
	je	.L9
.L7:
	testb	%dl, %dl
	jne	.L9
.L10:
	testb	%dil, %dil
	jne	.L17
.L11:
	testb	%sil, %sil
	je	.L12
	movl	$9, 20(%rsp)
.L12:
	testb	%cl, %cl
	je	.L13
	movl	$1, 16(%rsp)
.L14:
	cmpl	$9, 20(%rsp)
	je	.L51
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$56, %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
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	movl	$1, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L8:
	testb	%dl, %dl
	jne	.L53
.L17:
	movl	$7, 24(%rsp)
	jmp	.L11
.L53:
	movl	%edx, %edi
.L9:
	movl	$4, 28(%rsp)
	jmp	.L10
.L20:
	xorl	%edx, %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %ecx
	jmp	.L3
.L26:
	movl	$1, %ecx
	jmp	.L5
.L23:
	movl	$1, %ecx
	jmp	.L4
.L29:
	movl	$1, %ecx
	jmp	.L7
.L27:
	movl	$1, %esi
	jmp	.L5
.L24:
	movl	$1, %esi
	jmp	.L4
.L30:
	movl	$1, %esi
	jmp	.L7
.L50:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$9, %eax
	je	.L33
	movl	$1, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, 16(%rsp)
	jne	.L15
	jmp	.L14
.L51:
	cmpl	$7, 24(%rsp)
	jne	.L15
	cmpl	$4, 28(%rsp)
	jne	.L15
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L28:
	movl	$1, %edi
	jmp	.L5
.L25:
	movl	$1, %edi
	jmp	.L4
.L22:
	xorl	%edx, %edx
	movl	$1, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L33:
	movl	$1, %esi
	jmp	.L9
.L32:
	movl	$1, %ecx
	jmp	.L9
.L52:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rsp, %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	movl	$0, -4(%rbp)
	cmpq	%r13, %rbx
	jne	.L2
	movl	(%rsp), %eax
	cmpl	$1, %eax
	je	.L20
	cmpl	$9, %eax
	je	.L21
	cmpl	$7, %eax
	je	.L22
	cmpl	$4, %eax
	sete	%dl
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
.L3:
	movl	4(%rsp), %eax
	cmpl	$1, %eax
	je	.L23
	cmpl	$9, %eax
	je	.L24
	cmpl	$7, %eax
	je	.L25
	cmpl	$4, %eax
	movl	$1, %eax
	cmove	%eax, %edx
.L4:
	movl	8(%rsp), %eax
	cmpl	$1, %eax
	je	.L26
	cmpl	$9, %eax
	je	.L27
	cmpl	$7, %eax
	je	.L28
	cmpl	$4, %eax
	je	.L50
.L5:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L29
	cmpl	$9, %eax
	je	.L30
.L18:
	cmpl	$7, %eax
	je	.L8
	cmpl	$4, %eax
	je	.L9
.L7:
	testb	%dl, %dl
	jne	.L9
.L10:
	testb	%dil, %dil
	jne	.L17
.L11:
	testb	%sil, %sil
	je	.L12
	movl	$9, 20(%rsp)
.L12:
	testb	%cl, %cl
	je	.L13
	movl	$1, 16(%rsp)
.L14:
	cmpl	$9, 20(%rsp)
	je	.L51
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$56, %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
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	movl	$1, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L8:
	testb	%dl, %dl
	jne	.L53
.L17:
	movl	$7, 24(%rsp)
	jmp	.L11
.L53:
	movl	%edx, %edi
.L9:
	movl	$4, 28(%rsp)
	jmp	.L10
.L20:
	xorl	%edx, %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %ecx
	jmp	.L3
.L26:
	movl	$1, %ecx
	jmp	.L5
.L23:
	movl	$1, %ecx
	jmp	.L4
.L29:
	movl	$1, %ecx
	jmp	.L7
.L27:
	movl	$1, %esi
	jmp	.L5
.L24:
	movl	$1, %esi
	jmp	.L4
.L30:
	movl	$1, %esi
	jmp	.L7
.L50:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$9, %eax
	je	.L33
	movl	$1, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, 16(%rsp)
	jne	.L15
	jmp	.L14
.L51:
	cmpl	$7, 24(%rsp)
	jne	.L15
	cmpl	$4, 28(%rsp)
	jne	.L15
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L28:
	movl	$1, %edi
	jmp	.L5
.L25:
	movl	$1, %edi
	jmp	.L4
.L22:
	xorl	%edx, %edx
	movl	$1, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L33:
	movl	$1, %esi
	jmp	.L9
.L32:
	movl	$1, %ecx
	jmp	.L9
.L52:
	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() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[i]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

     if(M[0] == 1 && M[1] == 9 && M[2] == 7 && M[3] == 4) {
        printf("YES");
     } else {
        printf("NO");
     }

     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() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[i]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

     if(M[0] == 1 && M[1] == 9 && M[2] == 7 && M[3] == 4) {
        printf("YES");
     } else {
        printf("NO");
     }

     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() {

     int N[4], M[4];
     int i;

     for(i = 0; i < 4; ++i) {
          scanf("%d", &N[i]);
          M[i] = 0;
     }

     for(i = 0; i < 4; ++i) {
          if(N[i] == 1) {
             M[0] = 1;
          }
          else if(N[i] == 9) {
             M[1] = 9;
          }
          else if(N[i] == 7) {
             M[2] = 7;
          }
          else if(N[i] == 4) {
             M[3] = 4;
          }
     }

     if(M[0] == 1 && M[1] == 9 && M[2] == 7 && M[3] == 4) {
        printf("YES");
     } else {
        printf("NO");
     }

     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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rsp, %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	movl	$0, -4(%rbp)
	cmpq	%r13, %rbx
	jne	.L2
	movl	(%rsp), %eax
	cmpl	$1, %eax
	je	.L20
	cmpl	$9, %eax
	je	.L21
	cmpl	$7, %eax
	je	.L22
	cmpl	$4, %eax
	sete	%dl
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
.L3:
	movl	4(%rsp), %eax
	cmpl	$1, %eax
	je	.L23
	cmpl	$9, %eax
	je	.L24
	cmpl	$7, %eax
	je	.L25
	cmpl	$4, %eax
	movl	$1, %eax
	cmove	%eax, %edx
.L4:
	movl	8(%rsp), %eax
	cmpl	$1, %eax
	je	.L26
	cmpl	$9, %eax
	je	.L27
	cmpl	$7, %eax
	je	.L28
	cmpl	$4, %eax
	je	.L50
.L5:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L29
	cmpl	$9, %eax
	je	.L30
.L18:
	cmpl	$7, %eax
	je	.L8
	cmpl	$4, %eax
	je	.L9
.L7:
	testb	%dl, %dl
	jne	.L9
.L10:
	testb	%dil, %dil
	jne	.L17
.L11:
	testb	%sil, %sil
	je	.L12
	movl	$9, 20(%rsp)
.L12:
	testb	%cl, %cl
	je	.L13
	movl	$1, 16(%rsp)
.L14:
	cmpl	$9, 20(%rsp)
	je	.L51
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$56, %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
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	movl	$1, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L8:
	testb	%dl, %dl
	jne	.L53
.L17:
	movl	$7, 24(%rsp)
	jmp	.L11
.L53:
	movl	%edx, %edi
.L9:
	movl	$4, 28(%rsp)
	jmp	.L10
.L20:
	xorl	%edx, %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %ecx
	jmp	.L3
.L26:
	movl	$1, %ecx
	jmp	.L5
.L23:
	movl	$1, %ecx
	jmp	.L4
.L29:
	movl	$1, %ecx
	jmp	.L7
.L27:
	movl	$1, %esi
	jmp	.L5
.L24:
	movl	$1, %esi
	jmp	.L4
.L30:
	movl	$1, %esi
	jmp	.L7
.L50:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$9, %eax
	je	.L33
	movl	$1, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, 16(%rsp)
	jne	.L15
	jmp	.L14
.L51:
	cmpl	$7, 24(%rsp)
	jne	.L15
	cmpl	$4, 28(%rsp)
	jne	.L15
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L28:
	movl	$1, %edi
	jmp	.L5
.L25:
	movl	$1, %edi
	jmp	.L4
.L22:
	xorl	%edx, %edx
	movl	$1, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L33:
	movl	$1, %esi
	jmp	.L9
.L32:
	movl	$1, %ecx
	jmp	.L9
.L52:
	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	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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	$56, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbp
	movq	%rsp, %rbx
	movq	%rbp, %r13
.L2:
	movq	%rbx, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	addq	$4, %rbp
	movl	$0, -4(%rbp)
	cmpq	%r13, %rbx
	jne	.L2
	movl	(%rsp), %eax
	cmpl	$1, %eax
	je	.L20
	cmpl	$9, %eax
	je	.L21
	cmpl	$7, %eax
	je	.L22
	cmpl	$4, %eax
	sete	%dl
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
.L3:
	movl	4(%rsp), %eax
	cmpl	$1, %eax
	je	.L23
	cmpl	$9, %eax
	je	.L24
	cmpl	$7, %eax
	je	.L25
	cmpl	$4, %eax
	movl	$1, %eax
	cmove	%eax, %edx
.L4:
	movl	8(%rsp), %eax
	cmpl	$1, %eax
	je	.L26
	cmpl	$9, %eax
	je	.L27
	cmpl	$7, %eax
	je	.L28
	cmpl	$4, %eax
	je	.L50
.L5:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L29
	cmpl	$9, %eax
	je	.L30
.L18:
	cmpl	$7, %eax
	je	.L8
	cmpl	$4, %eax
	je	.L9
.L7:
	testb	%dl, %dl
	jne	.L9
.L10:
	testb	%dil, %dil
	jne	.L17
.L11:
	testb	%sil, %sil
	je	.L12
	movl	$9, 20(%rsp)
.L12:
	testb	%cl, %cl
	je	.L13
	movl	$1, 16(%rsp)
.L14:
	cmpl	$9, 20(%rsp)
	je	.L51
.L15:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L16:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L52
	addq	$56, %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
.L21:
	.cfi_restore_state
	xorl	%edx, %edx
	xorl	%edi, %edi
	movl	$1, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L8:
	testb	%dl, %dl
	jne	.L53
.L17:
	movl	$7, 24(%rsp)
	jmp	.L11
.L53:
	movl	%edx, %edi
.L9:
	movl	$4, 28(%rsp)
	jmp	.L10
.L20:
	xorl	%edx, %edx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$1, %ecx
	jmp	.L3
.L26:
	movl	$1, %ecx
	jmp	.L5
.L23:
	movl	$1, %ecx
	jmp	.L4
.L29:
	movl	$1, %ecx
	jmp	.L7
.L27:
	movl	$1, %esi
	jmp	.L5
.L24:
	movl	$1, %esi
	jmp	.L4
.L30:
	movl	$1, %esi
	jmp	.L7
.L50:
	movl	12(%rsp), %eax
	cmpl	$1, %eax
	je	.L32
	cmpl	$9, %eax
	je	.L33
	movl	$1, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L13:
	cmpl	$1, 16(%rsp)
	jne	.L15
	jmp	.L14
.L51:
	cmpl	$7, 24(%rsp)
	jne	.L15
	cmpl	$4, 28(%rsp)
	jne	.L15
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L16
.L28:
	movl	$1, %edi
	jmp	.L5
.L25:
	movl	$1, %edi
	jmp	.L4
.L22:
	xorl	%edx, %edx
	movl	$1, %edi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	jmp	.L3
.L33:
	movl	$1, %esi
	jmp	.L9
.L32:
	movl	$1, %ecx
	jmp	.L9
.L52:
	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:
```