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<stdlib.h>

struct node{
	char *word;
	int frequency;
	struct node *left;
	struct node *right;
};

int Word_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}
void Copy_Str(char *from, char *to){
	while(*to++ = *from++)
		;
}
int Comp_Strs(char *str1, char *str2){
	for(; *str1 == *str2; str1++, str2++)
		if(*str1 == '\0')
			return 0;
	return *str1 - *str2;
}
struct node *Create_bTree(struct node *root, char *str, int *count_words){
	int distance;
	if(root == NULL){
		(*count_words)++;
		root = (struct node *) malloc(sizeof(struct node));
		root->word = (char *) malloc(sizeof(char) * (Word_Length(str)+1));
		Copy_Str(str, root->word);
		root->frequency = 1;
		root->right = root->left = NULL;
	}
	else if((distance = Comp_Strs(root->word, str)) == 0){
		root->frequency++;
	}
	else if(distance > 0){
		root->right = Create_bTree(root->right, str, count_words);
	}
	else{
		root->left = Create_bTree(root->left, str, count_words);
	}
	return root;
}
void Free_bTree(struct node *root){
	if(root != NULL){
		Free_bTree(root->left);
		free(root->word);
		free(root);
		Free_bTree(root->right);
	}
}
int main(){
	int n_words, count_words = 0;
	scanf("%d", &n_words);
	char str_temp[11];
	struct node *root;
	root = NULL;
	for(int str_i = 0; str_i < n_words; str_i++){
		scanf("%s", str_temp);
		root = Create_bTree(root, str_temp, &count_words);
	}
	printf("%d", count_words);
	Free_bTree(root);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Word_Length
	.type	Word_Length, @function
Word_Length:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Word_Length, .-Word_Length
	.globl	Copy_Str
	.type	Copy_Str, @function
Copy_Str:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	nop
.L6:
	movq	-8(%rbp), %rdx
	leaq	1(%rdx), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, -16(%rbp)
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Copy_Str, .-Copy_Str
	.globl	Comp_Strs
	.type	Comp_Strs, @function
Comp_Strs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	jmp	.L8
.L11:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	movl	$0, %eax
	jmp	.L10
.L9:
	addq	$1, -8(%rbp)
	addq	$1, -16(%rbp)
.L8:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Comp_Strs, .-Comp_Strs
	.globl	Create_bTree
	.type	Create_bTree, @function
Create_bTree:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L13
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Word_Length
	addl	$1, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Copy_Str
	movq	-24(%rbp), %rax
	movl	$1, 8(%rax)
	movq	-24(%rbp), %rax
	movq	$0, 16(%rax)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 24(%rax)
	jmp	.L14
.L13:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Comp_Strs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L15
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	jmp	.L14
.L15:
	cmpl	$0, -4(%rbp)
	jle	.L16
	movq	-24(%rbp), %rax
	movq	24(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 24(%rdx)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 16(%rdx)
.L14:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Create_bTree, .-Create_bTree
	.globl	Free_bTree
	.type	Free_bTree, @function
Free_bTree:
.LFB10:
	.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
	movq	%rdi, -8(%rbp)
	cmpq	$0, -8(%rbp)
	je	.L20
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	24(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Free_bTree, .-Free_bTree
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L22
.L23:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rdx
	leaq	-19(%rbp), %rcx
	movq	-32(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	Word_Length
	.type	Word_Length, @function
Word_Length:
.LFB39:
	.cfi_startproc
	endbr64
	cmpb	$0, (%rdi)
	leaq	1(%rdi), %rax
	je	.L4
	movl	$1, %edx
	subl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rdx,%rax), %r8d
	addq	$1, %rax
	cmpb	$0, -1(%rax)
	jne	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Word_Length, .-Word_Length
	.p2align 4
	.globl	Copy_Str
	.type	Copy_Str, @function
Copy_Str:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movzbl	(%rdi,%rax), %edx
	movb	%dl, (%rsi,%rax)
	addq	$1, %rax
	testb	%dl, %dl
	jne	.L8
	ret
	.cfi_endproc
.LFE40:
	.size	Copy_Str, .-Copy_Str
	.p2align 4
	.globl	Comp_Strs
	.type	Comp_Strs, @function
Comp_Strs:
.LFB41:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %edx
	movsbl	(%rsi), %ecx
	cmpb	%dl, %cl
	jne	.L11
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movzbl	(%rdi,%rax), %edx
	addq	$1, %rax
	movsbl	-1(%rsi,%rax), %ecx
	cmpb	%cl, %dl
	jne	.L11
.L13:
	testb	%dl, %dl
	jne	.L16
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	%dl, %eax
	subl	%ecx, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	Comp_Strs, .-Comp_Strs
	.p2align 4
	.globl	Create_bTree
	.type	Create_bTree, @function
Create_bTree:
.LFB42:
	.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
	movq	%rsi, %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	testq	%rdi, %rdi
	je	.L36
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	movsbl	(%rsi), %esi
	movsbl	(%rdi), %ecx
	cmpb	%sil, %cl
	jne	.L23
	movl	$1, %eax
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L37:
	movsbl	(%rdi,%rax), %ecx
	addq	$1, %rax
	movsbl	-1(%rbp,%rax), %esi
	cmpb	%sil, %cl
	jne	.L23
.L25:
	testb	%cl, %cl
	jne	.L37
.L24:
	addl	$1, 8(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	subl	%esi, %ecx
	testl	%ecx, %ecx
	je	.L24
	jle	.L27
	movq	24(%r12), %rdi
	movq	%rbp, %rsi
	call	Create_bTree
	movq	%rax, 24(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	addl	$1, (%rdx)
	movl	$32, %edi
	call	malloc@PLT
	cmpb	$0, 0(%rbp)
	movq	%rax, %r12
	leaq	1(%rbp), %rax
	je	.L28
	movl	$1, %ecx
	subl	%eax, %ecx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, -1(%rax)
	jne	.L20
	addl	$1, %edx
	movslq	%edx, %rdi
.L19:
	call	malloc@PLT
	xorl	%edx, %edx
	movq	%rax, (%r12)
	.p2align 4,,10
	.p2align 3
.L21:
	movzbl	0(%rbp,%rdx), %ecx
	movb	%cl, (%rax,%rdx)
	addq	$1, %rdx
	testb	%cl, %cl
	jne	.L21
	movl	$1, 8(%r12)
	pxor	%xmm0, %xmm0
	movq	%r12, %rax
	movups	%xmm0, 16(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movq	16(%r12), %rdi
	movq	%rbp, %rsi
	call	Create_bTree
	movq	%rax, 16(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	movl	$1, %edi
	jmp	.L19
	.cfi_endproc
.LFE42:
	.size	Create_bTree, .-Create_bTree
	.p2align 4
	.globl	Free_bTree
	.type	Free_bTree, @function
Free_bTree:
.LFB43:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%rdi, 16(%rsp)
	testq	%rdi, %rdi
	je	.L38
.L56:
	movq	16(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L40
.L55:
	movq	8(%rsp), %rax
	movq	16(%rax), %r14
	testq	%r14, %r14
	je	.L41
.L54:
	movq	16(%r14), %r15
	testq	%r15, %r15
	je	.L42
.L53:
	movq	16(%r15), %rbx
	testq	%rbx, %rbx
	je	.L43
.L52:
	movq	16(%rbx), %rbp
	testq	%rbp, %rbp
	je	.L44
.L51:
	movq	16(%rbp), %r12
	testq	%r12, %r12
	je	.L45
.L50:
	movq	16(%r12), %r13
	testq	%r13, %r13
	je	.L46
.L49:
	movq	16(%r13), %rcx
	testq	%rcx, %rcx
	je	.L47
.L48:
	movq	16(%rcx), %rdi
	movq	%rcx, 24(%rsp)
	call	Free_bTree
	movq	24(%rsp), %rcx
	movq	(%rcx), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	24(%rsp), %rcx
	movq	24(%rcx), %rcx
	testq	%rcx, %rcx
	jne	.L48
.L47:
	movq	0(%r13), %rdi
	call	free@PLT
	movq	%r13, %rdi
	call	free@PLT
	movq	24(%r13), %r13
	testq	%r13, %r13
	jne	.L49
.L46:
	movq	(%r12), %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	24(%r12), %r12
	testq	%r12, %r12
	jne	.L50
.L45:
	movq	0(%rbp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rbp), %rbp
	testq	%rbp, %rbp
	jne	.L51
.L44:
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L52
.L43:
	movq	(%r15), %rdi
	call	free@PLT
	movq	%r15, %rdi
	call	free@PLT
	movq	24(%r15), %r15
	testq	%r15, %r15
	jne	.L53
.L42:
	movq	(%r14), %rdi
	call	free@PLT
	movq	%r14, %rdi
	call	free@PLT
	movq	24(%r14), %r14
	testq	%r14, %r14
	jne	.L54
.L41:
	movq	8(%rsp), %rbx
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L55
.L40:
	movq	16(%rsp), %rbx
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L56
.L38:
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE43:
	.size	Free_bTree, .-Free_bTree
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB44:
	.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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, 8(%rsp)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L98
	xorl	%r15d, %r15d
	leaq	13(%rsp), %rbx
	leaq	8(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L96:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	movq	%r12, %rdx
	movq	%rbx, %rsi
	call	Create_bTree
	movq	%rax, %rbp
	cmpl	%r15d, 4(%rsp)
	jg	.L96
.L95:
	movl	8(%rsp), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r14, %rsi
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	Free_bTree
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L101
	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
.L98:
	.cfi_restore_state
	xorl	%ebp, %ebp
	jmp	.L95
.L101:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE44:
	.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
	.file	"temp.c"
	.text
	.p2align 4
	.globl	Word_Length
	.type	Word_Length, @function
Word_Length:
.LFB39:
	.cfi_startproc
	endbr64
	cmpb	$0, (%rdi)
	leaq	1(%rdi), %rax
	je	.L4
	movl	$1, %edx
	subl	%eax, %edx
	.p2align 4,,10
	.p2align 3
.L3:
	leal	(%rdx,%rax), %r8d
	addq	$1, %rax
	cmpb	$0, -1(%rax)
	jne	.L3
	movl	%r8d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	xorl	%r8d, %r8d
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE39:
	.size	Word_Length, .-Word_Length
	.p2align 4
	.globl	Copy_Str
	.type	Copy_Str, @function
Copy_Str:
.LFB40:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L8:
	movzbl	(%rdi,%rax), %edx
	movb	%dl, (%rsi,%rax)
	addq	$1, %rax
	testb	%dl, %dl
	jne	.L8
	ret
	.cfi_endproc
.LFE40:
	.size	Copy_Str, .-Copy_Str
	.p2align 4
	.globl	Comp_Strs
	.type	Comp_Strs, @function
Comp_Strs:
.LFB41:
	.cfi_startproc
	endbr64
	movzbl	(%rdi), %edx
	movsbl	(%rsi), %ecx
	cmpb	%dl, %cl
	jne	.L11
	movl	$1, %eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movzbl	(%rdi,%rax), %edx
	addq	$1, %rax
	movsbl	-1(%rsi,%rax), %ecx
	cmpb	%cl, %dl
	jne	.L11
.L13:
	testb	%dl, %dl
	jne	.L16
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	movsbl	%dl, %eax
	subl	%ecx, %eax
	ret
	.cfi_endproc
.LFE41:
	.size	Comp_Strs, .-Comp_Strs
	.p2align 4
	.globl	Create_bTree
	.type	Create_bTree, @function
Create_bTree:
.LFB42:
	.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
	movq	%rsi, %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	testq	%rdi, %rdi
	je	.L36
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	movsbl	(%rsi), %esi
	movsbl	(%rdi), %ecx
	cmpb	%sil, %cl
	jne	.L23
	movl	$1, %eax
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L37:
	movsbl	(%rdi,%rax), %ecx
	addq	$1, %rax
	movsbl	-1(%rbp,%rax), %esi
	cmpb	%sil, %cl
	jne	.L23
.L25:
	testb	%cl, %cl
	jne	.L37
.L24:
	addl	$1, 8(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore_state
	subl	%esi, %ecx
	testl	%ecx, %ecx
	je	.L24
	jle	.L27
	movq	24(%r12), %rdi
	movq	%rbp, %rsi
	call	Create_bTree
	movq	%rax, 24(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	addl	$1, (%rdx)
	movl	$32, %edi
	call	malloc@PLT
	cmpb	$0, 0(%rbp)
	movq	%rax, %r12
	leaq	1(%rbp), %rax
	je	.L28
	movl	$1, %ecx
	subl	%eax, %ecx
	.p2align 4,,10
	.p2align 3
.L20:
	leal	(%rcx,%rax), %edx
	addq	$1, %rax
	cmpb	$0, -1(%rax)
	jne	.L20
	addl	$1, %edx
	movslq	%edx, %rdi
.L19:
	call	malloc@PLT
	xorl	%edx, %edx
	movq	%rax, (%r12)
	.p2align 4,,10
	.p2align 3
.L21:
	movzbl	0(%rbp,%rdx), %ecx
	movb	%cl, (%rax,%rdx)
	addq	$1, %rdx
	testb	%cl, %cl
	jne	.L21
	movl	$1, 8(%r12)
	pxor	%xmm0, %xmm0
	movq	%r12, %rax
	movups	%xmm0, 16(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	.cfi_restore_state
	movq	16(%r12), %rdi
	movq	%rbp, %rsi
	call	Create_bTree
	movq	%rax, 16(%r12)
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L28:
	.cfi_restore_state
	movl	$1, %edi
	jmp	.L19
	.cfi_endproc
.LFE42:
	.size	Create_bTree, .-Create_bTree
	.p2align 4
	.globl	Free_bTree
	.type	Free_bTree, @function
Free_bTree:
.LFB43:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%rdi, 16(%rsp)
	testq	%rdi, %rdi
	je	.L38
.L56:
	movq	16(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L40
.L55:
	movq	8(%rsp), %rax
	movq	16(%rax), %r14
	testq	%r14, %r14
	je	.L41
.L54:
	movq	16(%r14), %r15
	testq	%r15, %r15
	je	.L42
.L53:
	movq	16(%r15), %rbx
	testq	%rbx, %rbx
	je	.L43
.L52:
	movq	16(%rbx), %rbp
	testq	%rbp, %rbp
	je	.L44
.L51:
	movq	16(%rbp), %r12
	testq	%r12, %r12
	je	.L45
.L50:
	movq	16(%r12), %r13
	testq	%r13, %r13
	je	.L46
.L49:
	movq	16(%r13), %rcx
	testq	%rcx, %rcx
	je	.L47
.L48:
	movq	16(%rcx), %rdi
	movq	%rcx, 24(%rsp)
	call	Free_bTree
	movq	24(%rsp), %rcx
	movq	(%rcx), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	24(%rsp), %rcx
	movq	24(%rcx), %rcx
	testq	%rcx, %rcx
	jne	.L48
.L47:
	movq	0(%r13), %rdi
	call	free@PLT
	movq	%r13, %rdi
	call	free@PLT
	movq	24(%r13), %r13
	testq	%r13, %r13
	jne	.L49
.L46:
	movq	(%r12), %rdi
	call	free@PLT
	movq	%r12, %rdi
	call	free@PLT
	movq	24(%r12), %r12
	testq	%r12, %r12
	jne	.L50
.L45:
	movq	0(%rbp), %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	24(%rbp), %rbp
	testq	%rbp, %rbp
	jne	.L51
.L44:
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L52
.L43:
	movq	(%r15), %rdi
	call	free@PLT
	movq	%r15, %rdi
	call	free@PLT
	movq	24(%r15), %r15
	testq	%r15, %r15
	jne	.L53
.L42:
	movq	(%r14), %rdi
	call	free@PLT
	movq	%r14, %rdi
	call	free@PLT
	movq	24(%r14), %r14
	testq	%r14, %r14
	jne	.L54
.L41:
	movq	8(%rsp), %rbx
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L55
.L40:
	movq	16(%rsp), %rbx
	movq	(%rbx), %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	24(%rbx), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L56
.L38:
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	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
	.cfi_endproc
.LFE43:
	.size	Free_bTree, .-Free_bTree
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB44:
	.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
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	movl	$0, 8(%rsp)
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L98
	xorl	%r15d, %r15d
	leaq	13(%rsp), %rbx
	leaq	8(%rsp), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L96:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	movq	%r12, %rdx
	movq	%rbx, %rsi
	call	Create_bTree
	movq	%rax, %rbp
	cmpl	%r15d, 4(%rsp)
	jg	.L96
.L95:
	movl	8(%rsp), %edx
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r14, %rsi
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	Free_bTree
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L101
	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
.L98:
	.cfi_restore_state
	xorl	%ebp, %ebp
	jmp	.L95
.L101:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE44:
	.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:

#include<stdio.h>
#include<stdlib.h>

struct node{
	char *word;
	int frequency;
	struct node *left;
	struct node *right;
};

int Word_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}
void Copy_Str(char *from, char *to){
	while(*to++ = *from++)
		;
}
int Comp_Strs(char *str1, char *str2){
	for(; *str1 == *str2; str1++, str2++)
		if(*str1 == '\0')
			return 0;
	return *str1 - *str2;
}
struct node *Create_bTree(struct node *root, char *str, int *count_words){
	int distance;
	if(root == NULL){
		(*count_words)++;
		root = (struct node *) malloc(sizeof(struct node));
		root->word = (char *) malloc(sizeof(char) * (Word_Length(str)+1));
		Copy_Str(str, root->word);
		root->frequency = 1;
		root->right = root->left = NULL;
	}
	else if((distance = Comp_Strs(root->word, str)) == 0){
		root->frequency++;
	}
	else if(distance > 0){
		root->right = Create_bTree(root->right, str, count_words);
	}
	else{
		root->left = Create_bTree(root->left, str, count_words);
	}
	return root;
}
void Free_bTree(struct node *root){
	if(root != NULL){
		Free_bTree(root->left);
		free(root->word);
		free(root);
		Free_bTree(root->right);
	}
}
int main(){
	int n_words, count_words = 0;
	scanf("%d", &n_words);
	char str_temp[11];
	struct node *root;
	root = NULL;
	for(int str_i = 0; str_i < n_words; str_i++){
		scanf("%s", str_temp);
		root = Create_bTree(root, str_temp, &count_words);
	}
	printf("%d", count_words);
	Free_bTree(root);
	return 0;
}
4
a`aa
a
aaa
aa
 3
bpple
orange
apple
 5
grape
grape
graoe
grape
grape
 5
egapr
grape
graoe
gr`pe
epaqg
 4
a`ab
a
aaa
aa
 3
bpple
egnaro
apple
 5
grape
grape
graoe
grape
eparg
 4
b`aa
a
aaa
aa
 3
bpple
egnaro
appld
 5
grape
grape
graoe
grape
epaqg

4 3 2 5 4 3 3 4 3 3
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<stdlib.h>

struct node{
	char *word;
	int frequency;
	struct node *left;
	struct node *right;
};

int Word_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}
void Copy_Str(char *from, char *to){
	while(*to++ = *from++)
		;
}
int Comp_Strs(char *str1, char *str2){
	for(; *str1 == *str2; str1++, str2++)
		if(*str1 == '\0')
			return 0;
	return *str1 - *str2;
}
struct node *Create_bTree(struct node *root, char *str, int *count_words){
	int distance;
	if(root == NULL){
		(*count_words)++;
		root = (struct node *) malloc(sizeof(struct node));
		root->word = (char *) malloc(sizeof(char) * (Word_Length(str)+1));
		Copy_Str(str, root->word);
		root->frequency = 1;
		root->right = root->left = NULL;
	}
	else if((distance = Comp_Strs(root->word, str)) == 0){
		root->frequency++;
	}
	else if(distance > 0){
		root->right = Create_bTree(root->right, str, count_words);
	}
	else{
		root->left = Create_bTree(root->left, str, count_words);
	}
	return root;
}
void Free_bTree(struct node *root){
	if(root != NULL){
		Free_bTree(root->left);
		free(root->word);
		free(root);
		Free_bTree(root->right);
	}
}
int main(){
	int n_words, count_words = 0;
	scanf("%d", &n_words);
	char str_temp[11];
	struct node *root;
	root = NULL;
	for(int str_i = 0; str_i < n_words; str_i++){
		scanf("%s", str_temp);
		root = Create_bTree(root, str_temp, &count_words);
	}
	printf("%d", count_words);
	Free_bTree(root);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	Word_Length
	.type	Word_Length, @function
Word_Length:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Word_Length, .-Word_Length
	.globl	Copy_Str
	.type	Copy_Str, @function
Copy_Str:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	nop
.L6:
	movq	-8(%rbp), %rdx
	leaq	1(%rdx), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, -16(%rbp)
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Copy_Str, .-Copy_Str
	.globl	Comp_Strs
	.type	Comp_Strs, @function
Comp_Strs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	jmp	.L8
.L11:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	movl	$0, %eax
	jmp	.L10
.L9:
	addq	$1, -8(%rbp)
	addq	$1, -16(%rbp)
.L8:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Comp_Strs, .-Comp_Strs
	.globl	Create_bTree
	.type	Create_bTree, @function
Create_bTree:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L13
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Word_Length
	addl	$1, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Copy_Str
	movq	-24(%rbp), %rax
	movl	$1, 8(%rax)
	movq	-24(%rbp), %rax
	movq	$0, 16(%rax)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 24(%rax)
	jmp	.L14
.L13:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Comp_Strs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L15
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	jmp	.L14
.L15:
	cmpl	$0, -4(%rbp)
	jle	.L16
	movq	-24(%rbp), %rax
	movq	24(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 24(%rdx)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 16(%rdx)
.L14:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Create_bTree, .-Create_bTree
	.globl	Free_bTree
	.type	Free_bTree, @function
Free_bTree:
.LFB10:
	.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
	movq	%rdi, -8(%rbp)
	cmpq	$0, -8(%rbp)
	je	.L20
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	24(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Free_bTree, .-Free_bTree
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L22
.L23:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rdx
	leaq	-19(%rbp), %rcx
	movq	-32(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	Word_Length
	.type	Word_Length, @function
Word_Length:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L3:
	addl	$1, -4(%rbp)
.L2:
	movq	-24(%rbp), %rax
	leaq	1(%rax), %rdx
	movq	%rdx, -24(%rbp)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movl	-4(%rbp), %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Word_Length, .-Word_Length
	.globl	Copy_Str
	.type	Copy_Str, @function
Copy_Str:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	nop
.L6:
	movq	-8(%rbp), %rdx
	leaq	1(%rdx), %rax
	movq	%rax, -8(%rbp)
	movq	-16(%rbp), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, -16(%rbp)
	movzbl	(%rdx), %edx
	movb	%dl, (%rax)
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L6
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Copy_Str, .-Copy_Str
	.globl	Comp_Strs
	.type	Comp_Strs, @function
Comp_Strs:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	jmp	.L8
.L11:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L9
	movl	$0, %eax
	jmp	.L10
.L9:
	addq	$1, -8(%rbp)
	addq	$1, -16(%rbp)
.L8:
	movq	-8(%rbp), %rax
	movzbl	(%rax), %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L11
	movq	-8(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %edx
	movq	-16(%rbp), %rax
	movzbl	(%rax), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Comp_Strs, .-Comp_Strs
	.globl	Create_bTree
	.type	Create_bTree, @function
Create_bTree:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movq	%rdx, -40(%rbp)
	cmpq	$0, -24(%rbp)
	jne	.L13
	movq	-40(%rbp), %rax
	movl	(%rax), %eax
	leal	1(%rax), %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Word_Length
	addl	$1, %eax
	cltq
	movq	%rax, %rdi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rdx
	movq	-32(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Copy_Str
	movq	-24(%rbp), %rax
	movl	$1, 8(%rax)
	movq	-24(%rbp), %rax
	movq	$0, 16(%rax)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 24(%rax)
	jmp	.L14
.L13:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	Comp_Strs
	movl	%eax, -4(%rbp)
	cmpl	$0, -4(%rbp)
	jne	.L15
	movq	-24(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movq	-24(%rbp), %rax
	movl	%edx, 8(%rax)
	jmp	.L14
.L15:
	cmpl	$0, -4(%rbp)
	jle	.L16
	movq	-24(%rbp), %rax
	movq	24(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 24(%rdx)
	jmp	.L14
.L16:
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	-40(%rbp), %rdx
	movq	-32(%rbp), %rcx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	-24(%rbp), %rdx
	movq	%rax, 16(%rdx)
.L14:
	movq	-24(%rbp), %rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Create_bTree, .-Create_bTree
	.globl	Free_bTree
	.type	Free_bTree, @function
Free_bTree:
.LFB10:
	.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
	movq	%rdi, -8(%rbp)
	cmpq	$0, -8(%rbp)
	je	.L20
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	%rax, %rdi
	call	free@PLT
	movq	-8(%rbp), %rax
	movq	24(%rax), %rax
	movq	%rax, %rdi
	call	Free_bTree
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Free_bTree, .-Free_bTree
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -40(%rbp)
	leaq	-44(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -32(%rbp)
	movl	$0, -36(%rbp)
	jmp	.L22
.L23:
	leaq	-19(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-40(%rbp), %rdx
	leaq	-19(%rbp), %rcx
	movq	-32(%rbp), %rax
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Create_bTree
	movq	%rax, -32(%rbp)
	addl	$1, -36(%rbp)
.L22:
	movl	-44(%rbp), %eax
	cmpl	%eax, -36(%rbp)
	jl	.L23
	movl	-40(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-32(%rbp), %rax
	movq	%rax, %rdi
	call	Free_bTree
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
