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>
#include<string.h>
#include<math.h>
char S[105];
int res,n;
 
int dfs(int p,int q)
{
	if(S[p+(S[p]=='n'?5:4)]==0)
	{
		n=q;
		return (S[p]=='n'?0:90*n);
	}
	return dfs(p+(S[p]=='n'?5:4),q*2)+(S[p]=='n'?-1:1)*90*q;
}
 
int main()
{
	for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)))
	{
		res=dfs(0,1);
		for(;n>1&&!(res%2);res/=2,n/=2);
		printf("%d",res);
		if(n>1)printf("/%d",n);
		puts("");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 105
S:
	.zero	105
	.globl	res
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L2
	movl	$5, %edx
	jmp	.L3
.L2:
	movl	$4, %edx
.L3:
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-8(%rbp), %eax
	movl	%eax, n(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	je	.L5
	movl	n(%rip), %eax
	imull	$90, %eax, %eax
	jmp	.L7
.L5:
	movl	$0, %eax
	jmp	.L7
.L4:
	movl	-8(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	$110, %al
	jne	.L8
	movl	$5, %ecx
	jmp	.L9
.L8:
	movl	$4, %ecx
.L9:
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L10
	movl	$-90, %eax
	jmp	.L11
.L10:
	movl	$90, %eax
.L11:
	imull	-8(%rbp), %eax
	addl	%ecx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"/%d"
.LC2:
	.string	""
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L13
.L18:
	movl	$1, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, res(%rip)
	jmp	.L14
.L16:
	movl	res(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, res(%rip)
	movl	n(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, n(%rip)
.L14:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L15
	movl	res(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
.L15:
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$105, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
.L13:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	movzbl	S(%rip), %eax
	cmpb	$35, %al
	jne	.L18
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	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
	leaq	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movzbl	0(%rbp,%r14), %eax
	cmpb	$110, %al
	je	.L40
	addl	$4, %edi
	movslq	%edi, %r12
	movzbl	0(%rbp,%r12), %edx
	testb	%dl, %dl
	jne	.L16
	movl	%ebx, n(%rip)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	imull	$90, %ebx, %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
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	addl	$5, %edi
	movslq	%edi, %r12
	movzbl	0(%rbp,%r12), %edx
	testb	%dl, %dl
	je	.L15
.L16:
	leal	(%rbx,%rbx), %r13d
	cmpb	$110, %dl
	je	.L41
	addl	$4, %edi
	movslq	%edi, %rcx
	movzbl	0(%rbp,%rcx), %edx
	testb	%dl, %dl
	jne	.L28
	movl	%r13d, n(%rip)
	imull	$180, %ebx, %edx
.L26:
	cmpb	$110, %al
	movl	$90, %ecx
	movl	$-90, %eax
	cmovne	%ecx, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	imull	%ebx, %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
	addl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	leal	0(,%rbx,4), %r15d
	cmpb	$110, %dl
	je	.L42
	addl	$4, %edi
	movslq	%edi, %rdx
	movzbl	0(%rbp,%rdx), %esi
	testb	%sil, %sil
	jne	.L24
	movl	%r15d, n(%rip)
	imull	$360, %ebx, %ecx
.L22:
	cmpb	$110, 0(%rbp,%r12)
	movl	$-90, %edx
	movl	$90, %esi
	cmovne	%esi, %edx
	imull	%r13d, %edx
	addl	%ecx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%ebx, n(%rip)
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	addl	$5, %edi
	movslq	%edi, %rdx
	movzbl	0(%rbp,%rdx), %esi
	testb	%sil, %sil
	jne	.L24
	movl	%r15d, n(%rip)
	xorl	%ecx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L24:
	leal	0(,%rbx,8), %r8d
	cmpb	$110, %sil
	je	.L43
	addl	$4, %edi
	movslq	%edi, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L20
	movl	%r8d, n(%rip)
	imull	$720, %ebx, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ebx, %esi
	movq	%rcx, 24(%rsp)
	sall	$4, %esi
	movq	%rdx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	call	dfs
	movq	16(%rsp), %rdx
	movl	$90, %esi
	movl	12(%rsp), %r8d
	movq	24(%rsp), %rcx
	cmpb	$110, 0(%rbp,%rdx)
	movl	$-90, %edx
	cmovne	%esi, %edx
	imull	%r8d, %edx
	addl	%eax, %edx
	movzbl	0(%rbp,%r14), %eax
.L18:
	cmpb	$110, 0(%rbp,%rcx)
	movl	$90, %esi
	movl	$-90, %ecx
	cmovne	%esi, %ecx
	imull	%r15d, %ecx
	addl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$5, %edi
	movslq	%edi, %rcx
	movzbl	0(%rbp,%rcx), %edx
	testb	%dl, %dl
	jne	.L28
	movl	%r13d, n(%rip)
	xorl	%edx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	addl	$5, %edi
	movslq	%edi, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L20
	movl	%r8d, n(%rip)
	xorl	%edx, %edx
	jmp	.L18
	.cfi_endproc
.LFE35:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"/%d"
.LC2:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	gets@PLT
	movzbl	0(%rbp), %eax
	cmpb	$35, %al
	je	.L120
	cmpb	$110, %al
	je	.L121
	movzbl	4+S(%rip), %edx
	testb	%dl, %dl
	je	.L99
	movl	$8, %r9d
	movl	$9, %ecx
	movl	$4, %r10d
	cmpb	$110, %dl
	je	.L122
.L112:
	movslq	%r9d, %rdx
	movzbl	0(%rbp,%rdx), %edx
	testb	%dl, %dl
	jne	.L96
	movl	$2, n(%rip)
	cmpb	$110, %al
	je	.L97
	movl	$2, %eax
	movl	$180, %edx
	movl	$90, %ecx
.L66:
	addl	%ecx, %edx
	movl	%edx, res(%rip)
	cmpl	$1, %eax
	jle	.L68
	movl	%edx, %esi
.L94:
	xorl	%ecx, %ecx
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%edx, %ecx
	sarl	%eax
	shrl	$31, %ecx
	addl	%ecx, %edx
	movl	$1, %ecx
	sarl	%edx
	cmpl	$1, %eax
	je	.L123
	movl	%eax, %r13d
.L69:
	testb	$1, %dl
	je	.L70
	testb	%cl, %cl
	je	.L110
	movl	%r13d, n(%rip)
	movl	%edx, res(%rip)
.L68:
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	n(%rip), %edx
	cmpl	$1, %edx
	jle	.L71
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L71:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	$13, %ecx
	xorl	%eax, %eax
	movq	%rbp, %rdi
	rep stosq
	movb	$0, (%rdi)
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L123:
	movl	$1, n(%rip)
	movl	%edx, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L121:
	movzbl	5+S(%rip), %edx
	testb	%dl, %dl
	je	.L101
	movl	$9, %r9d
	movl	$10, %ecx
	movl	$5, %r10d
	cmpb	$110, %dl
	jne	.L112
.L122:
	movslq	%ecx, %rdx
	movslq	%ecx, %r9
	movzbl	0(%rbp,%rdx), %edx
	testb	%dl, %dl
	jne	.L96
	movl	$2, n(%rip)
	cmpb	$110, %al
	je	.L93
	movl	$90, %esi
	movl	$90, %edx
	movl	$2, %eax
	movl	$90, res(%rip)
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L99:
	movl	$1, n(%rip)
	movl	$90, %edx
	movl	$90, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L96:
	cmpb	$110, %dl
	je	.L124
	leal	4(%r9), %eax
	movslq	%eax, %r11
	movzbl	0(%rbp,%r11), %edx
	testb	%dl, %dl
	jne	.L91
	movl	$4, n(%rip)
	movl	$360, %ecx
.L89:
	cmpb	$110, 0(%rbp,%r10)
	movl	$180, %eax
	movl	$-180, %edx
	movl	$90, %esi
	cmovne	%eax, %edx
	movl	n(%rip), %eax
	addl	%ecx, %edx
	cmpb	$110, 0(%rbp)
	movl	$-90, %ecx
	cmovne	%esi, %ecx
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L101:
	movl	$1, n(%rip)
	xorl	%edx, %edx
	movl	$0, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L110:
	movl	%esi, %edx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L120:
	addq	$24, %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
.L124:
	.cfi_restore_state
	leal	5(%r9), %eax
	movslq	%eax, %r11
	movzbl	0(%rbp,%r11), %edx
	testb	%dl, %dl
	je	.L92
.L91:
	cmpb	$110, %dl
	je	.L125
	addl	$4, %eax
	movslq	%eax, %r14
	movzbl	0(%rbp,%r14), %edx
	testb	%dl, %dl
	jne	.L87
	movl	$8, n(%rip)
	movl	$720, %edx
.L85:
	movl	$90, %ecx
	cmpb	$110, 0(%rbp,%r9)
	movl	$-90, %eax
	cmovne	%ecx, %eax
	leal	(%rdx,%rax,4), %ecx
	jmp	.L89
.L92:
	movl	$4, n(%rip)
	xorl	%ecx, %ecx
	jmp	.L89
.L125:
	addl	$5, %eax
	movslq	%eax, %r14
	movzbl	0(%rbp,%r14), %edx
	testb	%dl, %dl
	je	.L86
.L87:
	cmpb	$110, %dl
	je	.L126
	addl	$4, %eax
	movslq	%eax, %r15
	movzbl	0(%rbp,%r15), %edx
	testb	%dl, %dl
	jne	.L83
	movl	$16, n(%rip)
	movl	$1440, %eax
.L81:
	cmpb	$110, 0(%rbp,%r11)
	movl	$-90, %edx
	movl	$90, %ecx
	cmovne	%ecx, %edx
	leal	(%rax,%rdx,8), %edx
	jmp	.L85
.L93:
	movl	$-90, %esi
	movl	$-90, %edx
	movl	$2, %eax
	movl	$-90, res(%rip)
	jmp	.L94
.L83:
	cmpb	$110, %dl
	je	.L127
	addl	$4, %eax
	movslq	%eax, %rdx
	movzbl	0(%rbp,%rdx), %ecx
	testb	%cl, %cl
	jne	.L79
	movl	$32, n(%rip)
	movl	$2880, %edx
.L77:
	cmpb	$110, 0(%rbp,%r14)
	movl	$-90, %eax
	movl	$90, %ecx
	cmovne	%ecx, %eax
	sall	$4, %eax
	addl	%edx, %eax
	jmp	.L81
.L97:
	movl	$90, %edx
	movl	$2, %eax
	movl	$90, res(%rip)
	movl	%edx, %esi
	jmp	.L94
.L86:
	movl	$8, n(%rip)
	xorl	%edx, %edx
	jmp	.L85
.L127:
	addl	$5, %eax
	movslq	%eax, %rdx
	movzbl	0(%rbp,%rdx), %ecx
	testb	%cl, %cl
	jne	.L79
	movl	$32, n(%rip)
	xorl	%edx, %edx
	jmp	.L77
.L79:
	cmpb	$110, %cl
	je	.L128
	leal	4(%rax), %edi
	movslq	%edi, %rcx
	cmpb	$0, 0(%rbp,%rcx)
	jne	.L75
	movl	$64, n(%rip)
	movl	$5760, %eax
	jmp	.L73
.L75:
	movl	$128, %esi
	movq	%rdx, 8(%rsp)
	call	dfs
	movq	8(%rsp), %rdx
	movl	%eax, %r8d
	movl	$-90, %eax
	cmpb	$110, 0(%rbp,%rdx)
	movl	$90, %edx
	cmovne	%edx, %eax
	sall	$6, %eax
	addl	%r8d, %eax
.L73:
	cmpb	$110, 0(%rbp,%r15)
	movl	$-90, %edx
	movl	$90, %ecx
	cmovne	%ecx, %edx
	sall	$5, %edx
	addl	%eax, %edx
	jmp	.L77
.L126:
	addl	$5, %eax
	movslq	%eax, %r15
	movzbl	0(%rbp,%r15), %edx
	testb	%dl, %dl
	jne	.L83
	movl	$16, n(%rip)
	xorl	%eax, %eax
	jmp	.L81
.L128:
	leal	5(%rax), %edi
	movslq	%edi, %rcx
	cmpb	$0, 0(%rbp,%rcx)
	jne	.L75
	movl	$64, n(%rip)
	xorl	%eax, %eax
	jmp	.L73
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	res
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 105
S:
	.zero	105
	.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
	.p2align 4
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movslq	%edi, %r14
	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
	leaq	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%esi, %ebx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movzbl	0(%rbp,%r14), %eax
	cmpb	$110, %al
	je	.L40
	addl	$4, %edi
	movslq	%edi, %r12
	movzbl	0(%rbp,%r12), %edx
	testb	%dl, %dl
	jne	.L16
	movl	%ebx, n(%rip)
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	imull	$90, %ebx, %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
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	addl	$5, %edi
	movslq	%edi, %r12
	movzbl	0(%rbp,%r12), %edx
	testb	%dl, %dl
	je	.L15
.L16:
	leal	(%rbx,%rbx), %r13d
	cmpb	$110, %dl
	je	.L41
	addl	$4, %edi
	movslq	%edi, %rcx
	movzbl	0(%rbp,%rcx), %edx
	testb	%dl, %dl
	jne	.L28
	movl	%r13d, n(%rip)
	imull	$180, %ebx, %edx
.L26:
	cmpb	$110, %al
	movl	$90, %ecx
	movl	$-90, %eax
	cmovne	%ecx, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	imull	%ebx, %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
	addl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	leal	0(,%rbx,4), %r15d
	cmpb	$110, %dl
	je	.L42
	addl	$4, %edi
	movslq	%edi, %rdx
	movzbl	0(%rbp,%rdx), %esi
	testb	%sil, %sil
	jne	.L24
	movl	%r15d, n(%rip)
	imull	$360, %ebx, %ecx
.L22:
	cmpb	$110, 0(%rbp,%r12)
	movl	$-90, %edx
	movl	$90, %esi
	cmovne	%esi, %edx
	imull	%r13d, %edx
	addl	%ecx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L15:
	movl	%ebx, n(%rip)
	addq	$40, %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
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	addl	$5, %edi
	movslq	%edi, %rdx
	movzbl	0(%rbp,%rdx), %esi
	testb	%sil, %sil
	jne	.L24
	movl	%r15d, n(%rip)
	xorl	%ecx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L24:
	leal	0(,%rbx,8), %r8d
	cmpb	$110, %sil
	je	.L43
	addl	$4, %edi
	movslq	%edi, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L20
	movl	%r8d, n(%rip)
	imull	$720, %ebx, %edx
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L20:
	movl	%ebx, %esi
	movq	%rcx, 24(%rsp)
	sall	$4, %esi
	movq	%rdx, 16(%rsp)
	movl	%r8d, 12(%rsp)
	call	dfs
	movq	16(%rsp), %rdx
	movl	$90, %esi
	movl	12(%rsp), %r8d
	movq	24(%rsp), %rcx
	cmpb	$110, 0(%rbp,%rdx)
	movl	$-90, %edx
	cmovne	%esi, %edx
	imull	%r8d, %edx
	addl	%eax, %edx
	movzbl	0(%rbp,%r14), %eax
.L18:
	cmpb	$110, 0(%rbp,%rcx)
	movl	$90, %esi
	movl	$-90, %ecx
	cmovne	%esi, %ecx
	imull	%r15d, %ecx
	addl	%edx, %ecx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$5, %edi
	movslq	%edi, %rcx
	movzbl	0(%rbp,%rcx), %edx
	testb	%dl, %dl
	jne	.L28
	movl	%r13d, n(%rip)
	xorl	%edx, %edx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L43:
	addl	$5, %edi
	movslq	%edi, %rsi
	cmpb	$0, 0(%rbp,%rsi)
	jne	.L20
	movl	%r8d, n(%rip)
	xorl	%edx, %edx
	jmp	.L18
	.cfi_endproc
.LFE35:
	.size	dfs, .-dfs
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"/%d"
.LC2:
	.string	""
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	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
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	S(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	gets@PLT
	movzbl	0(%rbp), %eax
	cmpb	$35, %al
	je	.L120
	cmpb	$110, %al
	je	.L121
	movzbl	4+S(%rip), %edx
	testb	%dl, %dl
	je	.L99
	movl	$8, %r9d
	movl	$9, %ecx
	movl	$4, %r10d
	cmpb	$110, %dl
	je	.L122
.L112:
	movslq	%r9d, %rdx
	movzbl	0(%rbp,%rdx), %edx
	testb	%dl, %dl
	jne	.L96
	movl	$2, n(%rip)
	cmpb	$110, %al
	je	.L97
	movl	$2, %eax
	movl	$180, %edx
	movl	$90, %ecx
.L66:
	addl	%ecx, %edx
	movl	%edx, res(%rip)
	cmpl	$1, %eax
	jle	.L68
	movl	%edx, %esi
.L94:
	xorl	%ecx, %ecx
	jmp	.L69
	.p2align 4,,10
	.p2align 3
.L70:
	movl	%edx, %ecx
	sarl	%eax
	shrl	$31, %ecx
	addl	%ecx, %edx
	movl	$1, %ecx
	sarl	%edx
	cmpl	$1, %eax
	je	.L123
	movl	%eax, %r13d
.L69:
	testb	$1, %dl
	je	.L70
	testb	%cl, %cl
	je	.L110
	movl	%r13d, n(%rip)
	movl	%edx, res(%rip)
.L68:
	movq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	n(%rip), %edx
	cmpl	$1, %edx
	jle	.L71
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L71:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	movl	$13, %ecx
	xorl	%eax, %eax
	movq	%rbp, %rdi
	rep stosq
	movb	$0, (%rdi)
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L123:
	movl	$1, n(%rip)
	movl	%edx, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L121:
	movzbl	5+S(%rip), %edx
	testb	%dl, %dl
	je	.L101
	movl	$9, %r9d
	movl	$10, %ecx
	movl	$5, %r10d
	cmpb	$110, %dl
	jne	.L112
.L122:
	movslq	%ecx, %rdx
	movslq	%ecx, %r9
	movzbl	0(%rbp,%rdx), %edx
	testb	%dl, %dl
	jne	.L96
	movl	$2, n(%rip)
	cmpb	$110, %al
	je	.L93
	movl	$90, %esi
	movl	$90, %edx
	movl	$2, %eax
	movl	$90, res(%rip)
	jmp	.L94
	.p2align 4,,10
	.p2align 3
.L99:
	movl	$1, n(%rip)
	movl	$90, %edx
	movl	$90, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L96:
	cmpb	$110, %dl
	je	.L124
	leal	4(%r9), %eax
	movslq	%eax, %r11
	movzbl	0(%rbp,%r11), %edx
	testb	%dl, %dl
	jne	.L91
	movl	$4, n(%rip)
	movl	$360, %ecx
.L89:
	cmpb	$110, 0(%rbp,%r10)
	movl	$180, %eax
	movl	$-180, %edx
	movl	$90, %esi
	cmovne	%eax, %edx
	movl	n(%rip), %eax
	addl	%ecx, %edx
	cmpb	$110, 0(%rbp)
	movl	$-90, %ecx
	cmovne	%esi, %ecx
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L101:
	movl	$1, n(%rip)
	xorl	%edx, %edx
	movl	$0, res(%rip)
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L110:
	movl	%esi, %edx
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L120:
	addq	$24, %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
.L124:
	.cfi_restore_state
	leal	5(%r9), %eax
	movslq	%eax, %r11
	movzbl	0(%rbp,%r11), %edx
	testb	%dl, %dl
	je	.L92
.L91:
	cmpb	$110, %dl
	je	.L125
	addl	$4, %eax
	movslq	%eax, %r14
	movzbl	0(%rbp,%r14), %edx
	testb	%dl, %dl
	jne	.L87
	movl	$8, n(%rip)
	movl	$720, %edx
.L85:
	movl	$90, %ecx
	cmpb	$110, 0(%rbp,%r9)
	movl	$-90, %eax
	cmovne	%ecx, %eax
	leal	(%rdx,%rax,4), %ecx
	jmp	.L89
.L92:
	movl	$4, n(%rip)
	xorl	%ecx, %ecx
	jmp	.L89
.L125:
	addl	$5, %eax
	movslq	%eax, %r14
	movzbl	0(%rbp,%r14), %edx
	testb	%dl, %dl
	je	.L86
.L87:
	cmpb	$110, %dl
	je	.L126
	addl	$4, %eax
	movslq	%eax, %r15
	movzbl	0(%rbp,%r15), %edx
	testb	%dl, %dl
	jne	.L83
	movl	$16, n(%rip)
	movl	$1440, %eax
.L81:
	cmpb	$110, 0(%rbp,%r11)
	movl	$-90, %edx
	movl	$90, %ecx
	cmovne	%ecx, %edx
	leal	(%rax,%rdx,8), %edx
	jmp	.L85
.L93:
	movl	$-90, %esi
	movl	$-90, %edx
	movl	$2, %eax
	movl	$-90, res(%rip)
	jmp	.L94
.L83:
	cmpb	$110, %dl
	je	.L127
	addl	$4, %eax
	movslq	%eax, %rdx
	movzbl	0(%rbp,%rdx), %ecx
	testb	%cl, %cl
	jne	.L79
	movl	$32, n(%rip)
	movl	$2880, %edx
.L77:
	cmpb	$110, 0(%rbp,%r14)
	movl	$-90, %eax
	movl	$90, %ecx
	cmovne	%ecx, %eax
	sall	$4, %eax
	addl	%edx, %eax
	jmp	.L81
.L97:
	movl	$90, %edx
	movl	$2, %eax
	movl	$90, res(%rip)
	movl	%edx, %esi
	jmp	.L94
.L86:
	movl	$8, n(%rip)
	xorl	%edx, %edx
	jmp	.L85
.L127:
	addl	$5, %eax
	movslq	%eax, %rdx
	movzbl	0(%rbp,%rdx), %ecx
	testb	%cl, %cl
	jne	.L79
	movl	$32, n(%rip)
	xorl	%edx, %edx
	jmp	.L77
.L79:
	cmpb	$110, %cl
	je	.L128
	leal	4(%rax), %edi
	movslq	%edi, %rcx
	cmpb	$0, 0(%rbp,%rcx)
	jne	.L75
	movl	$64, n(%rip)
	movl	$5760, %eax
	jmp	.L73
.L75:
	movl	$128, %esi
	movq	%rdx, 8(%rsp)
	call	dfs
	movq	8(%rsp), %rdx
	movl	%eax, %r8d
	movl	$-90, %eax
	cmpb	$110, 0(%rbp,%rdx)
	movl	$90, %edx
	cmovne	%edx, %eax
	sall	$6, %eax
	addl	%r8d, %eax
.L73:
	cmpb	$110, 0(%rbp,%r15)
	movl	$-90, %edx
	movl	$90, %ecx
	cmovne	%ecx, %edx
	sall	$5, %edx
	addl	%eax, %edx
	jmp	.L77
.L126:
	addl	$5, %eax
	movslq	%eax, %r15
	movzbl	0(%rbp,%r15), %edx
	testb	%dl, %dl
	jne	.L83
	movl	$16, n(%rip)
	xorl	%eax, %eax
	jmp	.L81
.L128:
	leal	5(%rax), %edi
	movslq	%edi, %rcx
	cmpb	$0, 0(%rbp,%rcx)
	jne	.L75
	movl	$64, n(%rip)
	xorl	%eax, %eax
	jmp	.L73
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	res
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.zero	4
	.globl	S
	.align 32
	.type	S, @object
	.size	S, 105
S:
	.zero	105
	.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>
#include<string.h>
#include<math.h>
char S[105];
int res,n;
 
int dfs(int p,int q)
{
	if(S[p+(S[p]=='n'?5:4)]==0)
	{
		n=q;
		return (S[p]=='n'?0:90*n);
	}
	return dfs(p+(S[p]=='n'?5:4),q*2)+(S[p]=='n'?-1:1)*90*q;
}
 
int main()
{
	for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)))
	{
		res=dfs(0,1);
		for(;n>1&&!(res%2);res/=2,n/=2);
		printf("%d",res);
		if(n>1)printf("/%d",n);
		puts("");
	}
	return 0;
}
north
west
northwest
northnorthwest
westwestwestnorth
#
 north
west
northwest
northnorthwest
westwestwestnorth
#

0
90
45
45/2
315/4
 0
90
45
45/2
315/4

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>
#include<string.h>
#include<math.h>
char S[105];
int res,n;
 
int dfs(int p,int q)
{
	if(S[p+(S[p]=='n'?5:4)]==0)
	{
		n=q;
		return (S[p]=='n'?0:90*n);
	}
	return dfs(p+(S[p]=='n'?5:4),q*2)+(S[p]=='n'?-1:1)*90*q;
}
 
int main()
{
	for(;gets(S),S[0]!='#';memset(S,0,sizeof(S)))
	{
		res=dfs(0,1);
		for(;n>1&&!(res%2);res/=2,n/=2);
		printf("%d",res);
		if(n>1)printf("/%d",n);
		puts("");
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 105
S:
	.zero	105
	.globl	res
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L2
	movl	$5, %edx
	jmp	.L3
.L2:
	movl	$4, %edx
.L3:
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-8(%rbp), %eax
	movl	%eax, n(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	je	.L5
	movl	n(%rip), %eax
	imull	$90, %eax, %eax
	jmp	.L7
.L5:
	movl	$0, %eax
	jmp	.L7
.L4:
	movl	-8(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	$110, %al
	jne	.L8
	movl	$5, %ecx
	jmp	.L9
.L8:
	movl	$4, %ecx
.L9:
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L10
	movl	$-90, %eax
	jmp	.L11
.L10:
	movl	$90, %eax
.L11:
	imull	-8(%rbp), %eax
	addl	%ecx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"/%d"
.LC2:
	.string	""
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L13
.L18:
	movl	$1, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, res(%rip)
	jmp	.L14
.L16:
	movl	res(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, res(%rip)
	movl	n(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, n(%rip)
.L14:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L15
	movl	res(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
.L15:
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$105, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
.L13:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	movzbl	S(%rip), %eax
	cmpb	$35, %al
	jne	.L18
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	S
	.bss
	.align 32
	.type	S, @object
	.size	S, 105
S:
	.zero	105
	.globl	res
	.align 4
	.type	res, @object
	.size	res, 4
res:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	dfs
	.type	dfs, @function
dfs:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L2
	movl	$5, %edx
	jmp	.L3
.L2:
	movl	$4, %edx
.L3:
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L4
	movl	-8(%rbp), %eax
	movl	%eax, n(%rip)
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	je	.L5
	movl	n(%rip), %eax
	imull	$90, %eax, %eax
	jmp	.L7
.L5:
	movl	$0, %eax
	jmp	.L7
.L4:
	movl	-8(%rbp), %eax
	leal	(%rax,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	$110, %al
	jne	.L8
	movl	$5, %ecx
	jmp	.L9
.L8:
	movl	$4, %ecx
.L9:
	movl	-4(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	dfs
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	S(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	cmpb	$110, %al
	jne	.L10
	movl	$-90, %eax
	jmp	.L11
.L10:
	movl	$90, %eax
.L11:
	imull	-8(%rbp), %eax
	addl	%ecx, %eax
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	dfs, .-dfs
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"/%d"
.LC2:
	.string	""
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	jmp	.L13
.L18:
	movl	$1, %esi
	movl	$0, %edi
	call	dfs
	movl	%eax, res(%rip)
	jmp	.L14
.L16:
	movl	res(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, res(%rip)
	movl	n(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, n(%rip)
.L14:
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L15
	movl	res(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	je	.L16
.L15:
	movl	res(%rip), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	n(%rip), %eax
	cmpl	$1, %eax
	jle	.L17
	movl	n(%rip), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L17:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$105, %edx
	movl	$0, %esi
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
.L13:
	leaq	S(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	gets@PLT
	movzbl	S(%rip), %eax
	cmpb	$35, %al
	jne	.L18
	movl	$0, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
