Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s;n;e;w;i;main(q){char t[1000];for(gets(t);i<strlen(t);i++){q=t[i];if(q==78)n=1;if(q==83)s=1;if(q==69)e=1;if(q==87)w=1;}puts(abs(n-s)+abs(w-e)?"No":"Yes");}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movslq	i(%rip), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$83, %eax
	je	.L5
	cmpl	$69, %eax
	jne	.L16
	movl	$1, e(%rip)
.L4:
	leal	1(%rbx), %eax
	addq	$1, %rbx
	movl	%eax, i(%rip)
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	jbe	.L17
	movsbl	0(%rbp,%rbx), %eax
	cmpl	$78, %eax
	jne	.L3
	movl	$1, n(%rip)
	jmp	.L4
.L16:
	cmpl	$87, %eax
	jne	.L4
	movl	$1, w(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$1, s(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movl	n(%rip), %eax
	subl	s(%rip), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	w(%rip), %eax
	subl	e(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%eax, %edx
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	e
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"No"
.LC1:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movslq	i(%rip), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$83, %eax
	je	.L5
	cmpl	$69, %eax
	jne	.L16
	movl	$1, e(%rip)
.L4:
	leal	1(%rbx), %eax
	addq	$1, %rbx
	movl	%eax, i(%rip)
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	jbe	.L17
	movsbl	0(%rbp,%rbx), %eax
	cmpl	$78, %eax
	jne	.L3
	movl	$1, n(%rip)
	jmp	.L4
.L16:
	cmpl	$87, %eax
	jne	.L4
	movl	$1, w(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$1, s(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movl	n(%rip), %eax
	subl	s(%rip), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	w(%rip), %eax
	subl	e(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%eax, %edx
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	e
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"No"
.LC1:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movslq	i(%rip), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$83, %eax
	je	.L5
	cmpl	$69, %eax
	jne	.L16
	movl	$1, e(%rip)
.L4:
	leal	1(%rbx), %eax
	addq	$1, %rbx
	movl	%eax, i(%rip)
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	jbe	.L17
	movsbl	0(%rbp,%rbx), %eax
	cmpl	$78, %eax
	jne	.L3
	movl	$1, n(%rip)
	jmp	.L4
.L16:
	cmpl	$87, %eax
	jne	.L4
	movl	$1, w(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$1, s(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movl	n(%rip), %eax
	subl	s(%rip), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	w(%rip), %eax
	subl	e(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%eax, %edx
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	e
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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
s;n;e;w;i;main(q){char t[1000];for(gets(t);i<strlen(t);i++){q=t[i];if(q==78)n=1;if(q==83)s=1;if(q==69)e=1;if(q==87)w=1;}puts(abs(n-s)+abs(w-e)?"No":"Yes");}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s;n;e;w;i;main(q){char t[1000];for(gets(t);i<strlen(t);i++){q=t[i];if(q==78)n=1;if(q==83)s=1;if(q==69)e=1;if(q==87)w=1;}puts(abs(n-s)+abs(w-e)?"No":"Yes");}```

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:

SEWN
 NNDW
 ESWN
 NSNSNNSN
 WNES
 NEWS
 ENWS
 NWES
 WNEN
 SNEW

Yes
 No
 Yes
 Yes
 Yes
 Yes
 Yes
 Yes
 No
 Yes

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s;n;e;w;i;main(q){char t[1000];for(gets(t);i<strlen(t);i++){q=t[i];if(q==78)n=1;if(q==83)s=1;if(q==69)e=1;if(q==87)w=1;}puts(abs(n-s)+abs(w-e)?"No":"Yes");}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movslq	i(%rip), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$83, %eax
	je	.L5
	cmpl	$69, %eax
	jne	.L16
	movl	$1, e(%rip)
.L4:
	leal	1(%rbx), %eax
	addq	$1, %rbx
	movl	%eax, i(%rip)
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	jbe	.L17
	movsbl	0(%rbp,%rbx), %eax
	cmpl	$78, %eax
	jne	.L3
	movl	$1, n(%rip)
	jmp	.L4
.L16:
	cmpl	$87, %eax
	jne	.L4
	movl	$1, w(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$1, s(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movl	n(%rip), %eax
	subl	s(%rip), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	w(%rip), %eax
	subl	e(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%eax, %edx
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	e
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"No"
.LC1:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$1016, %rsp
	.cfi_def_cfa_offset 1040
	movq	%fs:40, %rax
	movq	%rax, 1000(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	movq	%rbp, %rdi
	call	gets@PLT
	movslq	i(%rip), %rbx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	$83, %eax
	je	.L5
	cmpl	$69, %eax
	jne	.L16
	movl	$1, e(%rip)
.L4:
	leal	1(%rbx), %eax
	addq	$1, %rbx
	movl	%eax, i(%rip)
.L2:
	movq	%rbp, %rdi
	call	strlen@PLT
	cmpq	%rbx, %rax
	jbe	.L17
	movsbl	0(%rbp,%rbx), %eax
	cmpl	$78, %eax
	jne	.L3
	movl	$1, n(%rip)
	jmp	.L4
.L16:
	cmpl	$87, %eax
	jne	.L4
	movl	$1, w(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movl	$1, s(%rip)
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	movl	n(%rip), %eax
	subl	s(%rip), %eax
	leaq	.LC0(%rip), %rdi
	movl	%eax, %edx
	negl	%edx
	cmovs	%eax, %edx
	movl	w(%rip), %eax
	subl	e(%rip), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovns	%ecx, %eax
	addl	%eax, %edx
	leaq	.LC1(%rip), %rax
	cmove	%rax, %rdi
	call	puts@PLT
	movq	1000(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$1016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	e
	.align 4
	.type	e, @object
	.size	e, 4
e:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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:
```