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>
#include<string.h>

struct node {
  int key;
  struct node *right;
  struct node *left;
  struct node *parent;
};

typedef struct node* Nodepointer;
Nodepointer nil, root;

Nodepointer find(Nodepointer u, int k){
  while( u != nil && k != u->key ){
    if( k < u->key ) u = u->left;
    else u = u->right;
  }
  return u;
}

void insert(int k){
  Nodepointer x, y, z;
  y = nil;
  x = root;

  z = (Nodepointer)malloc(sizeof(struct node));
  z->key = k;
  z->left = nil;
  z->right = nil;
  
  while( x != nil ){
    y = x;
    if( z->key < x->key ) x = x->left;
    else x = x->right;
  }
  z->parent = y;

  if( y == nil ) root = z;
  else if( z->key < y->key ) y->left = z;
  else y->right = z;
}

void inorder(Nodepointer u){
  if( u == nil ) return;
  inorder(u->left);
  printf(" %d", u->key);
  inorder(u->right);
}

void preorder(Nodepointer u){
  if( u == nil ) return;
  printf(" %d", u->key);
  preorder(u->left);
  preorder(u->right);
}

int main(){
  int n, i, x;
  char com[7];

  scanf("%d", &n);

  for( i = 0 ; i < n ; i++ ){
    scanf("%s",com);
    if( com[0] == 'f' ){
      scanf("%d", &x);
      Nodepointer t = find(root, x);
      if( t != nil ) printf("yes\n");
      else printf("no\n");
    }
    else if( strcmp("insert",com) == 0 ){
      scanf("%d", &x);
      insert(x);
    }
    else if( strcmp("print",com) == 0 ){
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    }
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nil
	.bss
	.align 8
	.type	nil, @object
	.size	nil, 8
nil:
	.zero	8
	.globl	root
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.text
	.globl	find
	.type	find, @function
find:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	jmp	.L2
.L5:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L3
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L2:
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L4
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
.L4:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.globl	insert
	.type	insert, @function
insert:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movq	nil(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	root(%rip), %rax
	movq	%rax, -24(%rbp)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	jmp	.L8
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L9
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -24(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -24(%rbp)
.L8:
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	jne	.L10
	movq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, 24(%rax)
	movq	nil(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	movq	%rax, root(%rip)
	jmp	.L14
.L11:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L13
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 16(%rax)
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	" %d"
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.LFB8:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L18
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	jmp	.L15
.L18:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inorder, .-inorder
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB9:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L22
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	preorder, .-preorder
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"yes"
.LC4:
	.string	"no"
.LC5:
	.string	"insert"
.LC6:
	.string	"print"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L24
.L29:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	cmpb	$102, %al
	jne	.L25
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	find
	movq	%rax, -24(%rbp)
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	je	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L25:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L28
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L27
.L28:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L27
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	inorder
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	preorder
	movl	$10, %edi
	call	putchar@PLT
.L27:
	addl	$1, -28(%rbp)
.L24:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L29
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	find
	.type	find, @function
find:
.LFB51:
	.cfi_startproc
	endbr64
	movq	nil(%rip), %rax
	cmpq	%rax, %rdi
	jne	.L2
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rdi), %rdx
	cmovg	16(%rdi), %rdx
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	je	.L1
.L2:
	cmpl	%esi, (%rdi)
	jne	.L5
	movq	%rdi, %rax
.L1:
	ret
.L8:
	ret
	.cfi_endproc
.LFE51:
	.size	find, .-find
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edi, %r12d
	movl	$32, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	nil(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	root(%rip), %rbx
	call	malloc@PLT
	movq	%rbp, %xmm0
	punpcklqdq	%xmm0, %xmm0
	movl	%r12d, (%rax)
	movups	%xmm0, 8(%rax)
	cmpq	%rbx, %rbp
	je	.L10
	.p2align 4,,10
	.p2align 3
.L15:
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	cmpl	%r12d, (%rbx)
	jle	.L11
.L26:
	cmpq	%rdx, %rbp
	je	.L25
	movq	%rdx, %rbx
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	cmpl	%r12d, (%rbx)
	jg	.L26
.L11:
	cmpq	%rcx, %rbp
	je	.L14
	movq	%rcx, %rbx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, 24(%rax)
	cmpq	%rbx, %rbp
	je	.L17
	movq	%rax, 16(%rbx)
	popq	%rbx
	.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
.L14:
	.cfi_restore_state
	movq	%rbx, 24(%rax)
	cmpq	%rbx, %rbp
	je	.L17
	movq	%rax, 8(%rbx)
	popq	%rbx
	.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
.L10:
	.cfi_restore_state
	movq	%rbp, 24(%rax)
.L17:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	movq	%rax, root(%rip)
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	insert, .-insert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
	.text
	.p2align 4
	.globl	inorder
	.type	inorder, @function
inorder:
.LFB53:
	.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	nil(%rip), %rax
	movq	%rdi, 16(%rsp)
	cmpq	%rax, %rdi
	je	.L27
	leaq	.LC0(%rip), %rbp
.L28:
	movq	16(%rsp), %rsi
	movq	16(%rsi), %rcx
	movq	%rcx, (%rsp)
	cmpq	%rax, %rcx
	je	.L32
.L29:
	movq	(%rsp), %rcx
	movq	16(%rcx), %rdx
	movq	%rdx, 8(%rsp)
	cmpq	%rax, %rdx
	je	.L34
.L31:
	movq	8(%rsp), %rdi
	movq	16(%rdi), %r15
	cmpq	%rax, %r15
	je	.L36
.L33:
	movq	16(%r15), %rbx
	cmpq	%rax, %rbx
	je	.L38
.L35:
	movq	16(%rbx), %r13
	cmpq	%rax, %r13
	je	.L40
.L37:
	movq	16(%r13), %r12
	cmpq	%rax, %r12
	je	.L42
.L39:
	movq	16(%r12), %r14
	cmpq	%rax, %r14
	je	.L44
.L41:
	movq	16(%r14), %r9
	cmpq	%rax, %r9
	je	.L45
.L43:
	movq	16(%r9), %rdi
	movq	%r9, 24(%rsp)
	call	inorder
	movq	24(%rsp), %r9
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%r9), %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	8(%r9), %r9
	cmpq	%r9, nil(%rip)
	jne	.L43
.L45:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r14), %r14
	movq	nil(%rip), %rax
	cmpq	%r14, %rax
	jne	.L41
.L44:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r12), %r12
	movq	nil(%rip), %rax
	cmpq	%r12, %rax
	jne	.L39
.L42:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r13), %r13
	movq	nil(%rip), %rax
	cmpq	%r13, %rax
	jne	.L37
.L40:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rbx), %rbx
	movq	nil(%rip), %rax
	cmpq	%rbx, %rax
	jne	.L35
.L38:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %r15
	movq	nil(%rip), %rax
	cmpq	%r15, %rax
	jne	.L33
.L36:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rcx
	movq	nil(%rip), %rax
	movq	%rcx, 8(%rsp)
	cmpq	%rcx, %rax
	jne	.L31
.L34:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rsi
	movq	nil(%rip), %rax
	movq	%rsi, (%rsp)
	cmpq	%rsi, %rax
	jne	.L29
.L32:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rcx
	movq	nil(%rip), %rax
	movq	%rcx, 16(%rsp)
	cmpq	%rcx, %rax
	jne	.L28
.L27:
	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
.LFE53:
	.size	inorder, .-inorder
	.p2align 4
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	nil(%rip), %rdi
	je	.L89
	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
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
.L58:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r12), %rax
	movq	nil(%rip), %r14
	movq	%rax, (%rsp)
	cmpq	%r14, %rax
	je	.L59
.L74:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	nil(%rip), %r14
	movq	%rax, 8(%rsp)
	cmpq	%r14, %rax
	je	.L60
.L73:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	nil(%rip), %r14
	movq	%rax, 16(%rsp)
	cmpq	%r14, %rax
	je	.L61
.L72:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rbx
	movq	nil(%rip), %r14
	cmpq	%r14, %rbx
	je	.L62
.L71:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	16(%rbx), %r15
	cmpq	%r15, nil(%rip)
	movq	%r15, %r14
	je	.L63
.L70:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r13
	movq	nil(%rip), %r14
	cmpq	%r14, %r13
	je	.L64
.L69:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r13), %rax
	movq	nil(%rip), %r14
	cmpq	%r14, %rax
	je	.L65
	movq	%rax, %r14
.L68:
	movl	(%r14), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	16(%r14), %r9
	cmpq	nil(%rip), %r9
	je	.L66
.L67:
	movl	(%r9), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r9, 24(%rsp)
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	16(%r9), %rdi
	call	preorder
	movq	24(%rsp), %r9
	movq	8(%r9), %r9
	cmpq	%r9, nil(%rip)
	jne	.L67
.L66:
	movq	8(%r14), %r14
	cmpq	%r14, %r9
	jne	.L68
.L65:
	movq	8(%r13), %r13
	cmpq	%r14, %r13
	jne	.L69
.L64:
	movq	8(%r15), %r15
	cmpq	%r14, %r15
	jne	.L70
.L63:
	movq	8(%rbx), %rbx
	cmpq	%r14, %rbx
	jne	.L71
.L62:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpq	%r14, %rax
	jne	.L72
.L61:
	movq	8(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 8(%rsp)
	cmpq	%r14, %rax
	jne	.L73
.L60:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%r14, %rax
	jne	.L74
.L59:
	movq	8(%r12), %r12
	cmpq	%r14, %r12
	jne	.L58
	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
.L89:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE54:
	.size	preorder, .-preorder
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"insert"
.LC4:
	.string	"print"
.LC5:
	.string	"yes"
.LC6:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	33(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jg	.L93
	jmp	.L114
	.p2align 4,,10
	.p2align 3
.L100:
	cmpl	$1852404336, 0(%rbp)
	je	.L134
.L107:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L114
.L93:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$102, 33(%rsp)
	je	.L135
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L100
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	$32, %edi
	movl	28(%rsp), %r15d
	movq	nil(%rip), %r8
	movq	root(%rip), %rdx
	movq	%r8, 8(%rsp)
	movq	%rdx, (%rsp)
	call	malloc@PLT
	movq	8(%rsp), %r8
	movq	(%rsp), %rdx
	movl	%r15d, (%rax)
	movq	%r8, %xmm0
	punpcklqdq	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	cmpq	%rdx, %r8
	je	.L101
	.p2align 4,,10
	.p2align 3
.L106:
	movq	8(%rdx), %rsi
	movq	16(%rdx), %rcx
	cmpl	(%rdx), %r15d
	jge	.L102
.L137:
	cmpq	%rcx, %r8
	je	.L136
	movq	%rcx, %rdx
	movq	8(%rdx), %rsi
	movq	16(%rdx), %rcx
	cmpl	(%rdx), %r15d
	jl	.L137
.L102:
	cmpq	%rsi, %r8
	je	.L105
	movq	%rsi, %rdx
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L134:
	cmpw	$116, 4(%rbp)
	jne	.L107
	movq	root(%rip), %r15
	cmpq	nil(%rip), %r15
	je	.L113
	.p2align 4,,10
	.p2align 3
.L110:
	movq	16(%r15), %rdi
	call	inorder
	movl	(%r15), %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%r15), %r15
	cmpq	%r15, nil(%rip)
	jne	.L110
.L113:
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %r15
	cmpq	nil(%rip), %r15
	je	.L111
.L112:
	movl	(%r15), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %rdi
	call	preorder
	movq	8(%r15), %r15
	cmpq	%r15, nil(%rip)
	jne	.L112
.L111:
	movl	$10, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%ebx, 24(%rsp)
	jg	.L93
	.p2align 4,,10
	.p2align 3
.L114:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$56, %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
.L136:
	.cfi_restore_state
	movq	%rdx, 24(%rax)
	cmpq	%rdx, %r8
	je	.L115
	movq	%rax, 16(%rdx)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%rdx, 24(%rax)
	cmpq	%rdx, %r8
	je	.L115
	movq	%rax, 8(%rdx)
	jmp	.L107
.L101:
	movq	%r8, 24(%rax)
.L115:
	movq	%rax, root(%rip)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L135:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %rax
	movq	nil(%rip), %rcx
	movl	28(%rsp), %esi
	cmpq	%rcx, %rax
	jne	.L95
	jmp	.L96
	.p2align 4,,10
	.p2align 3
.L98:
	movq	8(%rax), %rdx
	cmovl	16(%rax), %rdx
	movq	%rdx, %rax
	cmpq	%rcx, %rdx
	je	.L96
.L95:
	cmpl	(%rax), %esi
	jne	.L98
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L107
.L96:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L107
.L138:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.globl	nil
	.align 8
	.type	nil, @object
	.size	nil, 8
nil:
	.zero	8
	.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	find
	.type	find, @function
find:
.LFB51:
	.cfi_startproc
	endbr64
	movq	nil(%rip), %rax
	cmpq	%rax, %rdi
	jne	.L2
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rdi), %rdx
	cmovg	16(%rdi), %rdx
	movq	%rdx, %rdi
	cmpq	%rax, %rdx
	je	.L1
.L2:
	cmpl	%esi, (%rdi)
	jne	.L5
	movq	%rdi, %rax
.L1:
	ret
.L8:
	ret
	.cfi_endproc
.LFE51:
	.size	find, .-find
	.p2align 4
	.globl	insert
	.type	insert, @function
insert:
.LFB52:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	%edi, %r12d
	movl	$32, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	nil(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	root(%rip), %rbx
	call	malloc@PLT
	movq	%rbp, %xmm0
	punpcklqdq	%xmm0, %xmm0
	movl	%r12d, (%rax)
	movups	%xmm0, 8(%rax)
	cmpq	%rbx, %rbp
	je	.L10
	.p2align 4,,10
	.p2align 3
.L15:
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	cmpl	%r12d, (%rbx)
	jle	.L11
.L26:
	cmpq	%rdx, %rbp
	je	.L25
	movq	%rdx, %rbx
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	cmpl	%r12d, (%rbx)
	jg	.L26
.L11:
	cmpq	%rcx, %rbp
	je	.L14
	movq	%rcx, %rbx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L25:
	movq	%rbx, 24(%rax)
	cmpq	%rbx, %rbp
	je	.L17
	movq	%rax, 16(%rbx)
	popq	%rbx
	.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
.L14:
	.cfi_restore_state
	movq	%rbx, 24(%rax)
	cmpq	%rbx, %rbp
	je	.L17
	movq	%rax, 8(%rbx)
	popq	%rbx
	.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
.L10:
	.cfi_restore_state
	movq	%rbp, 24(%rax)
.L17:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	movq	%rax, root(%rip)
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE52:
	.size	insert, .-insert
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
	.text
	.p2align 4
	.globl	inorder
	.type	inorder, @function
inorder:
.LFB53:
	.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	nil(%rip), %rax
	movq	%rdi, 16(%rsp)
	cmpq	%rax, %rdi
	je	.L27
	leaq	.LC0(%rip), %rbp
.L28:
	movq	16(%rsp), %rsi
	movq	16(%rsi), %rcx
	movq	%rcx, (%rsp)
	cmpq	%rax, %rcx
	je	.L32
.L29:
	movq	(%rsp), %rcx
	movq	16(%rcx), %rdx
	movq	%rdx, 8(%rsp)
	cmpq	%rax, %rdx
	je	.L34
.L31:
	movq	8(%rsp), %rdi
	movq	16(%rdi), %r15
	cmpq	%rax, %r15
	je	.L36
.L33:
	movq	16(%r15), %rbx
	cmpq	%rax, %rbx
	je	.L38
.L35:
	movq	16(%rbx), %r13
	cmpq	%rax, %r13
	je	.L40
.L37:
	movq	16(%r13), %r12
	cmpq	%rax, %r12
	je	.L42
.L39:
	movq	16(%r12), %r14
	cmpq	%rax, %r14
	je	.L44
.L41:
	movq	16(%r14), %r9
	cmpq	%rax, %r9
	je	.L45
.L43:
	movq	16(%r9), %rdi
	movq	%r9, 24(%rsp)
	call	inorder
	movq	24(%rsp), %r9
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	movl	(%r9), %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	8(%r9), %r9
	cmpq	%r9, nil(%rip)
	jne	.L43
.L45:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r14), %r14
	movq	nil(%rip), %rax
	cmpq	%r14, %rax
	jne	.L41
.L44:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r12), %r12
	movq	nil(%rip), %rax
	cmpq	%r12, %rax
	jne	.L39
.L42:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r13), %r13
	movq	nil(%rip), %rax
	cmpq	%r13, %rax
	jne	.L37
.L40:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rbx), %rbx
	movq	nil(%rip), %rax
	cmpq	%rbx, %rax
	jne	.L35
.L38:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %r15
	movq	nil(%rip), %rax
	cmpq	%r15, %rax
	jne	.L33
.L36:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rcx
	movq	nil(%rip), %rax
	movq	%rcx, 8(%rsp)
	cmpq	%rcx, %rax
	jne	.L31
.L34:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rsi
	movq	nil(%rip), %rax
	movq	%rsi, (%rsp)
	cmpq	%rsi, %rax
	jne	.L29
.L32:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rcx
	movq	nil(%rip), %rax
	movq	%rcx, 16(%rsp)
	cmpq	%rcx, %rax
	jne	.L28
.L27:
	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
.LFE53:
	.size	inorder, .-inorder
	.p2align 4
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB54:
	.cfi_startproc
	endbr64
	cmpq	nil(%rip), %rdi
	je	.L89
	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
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
.L58:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r12), %rax
	movq	nil(%rip), %r14
	movq	%rax, (%rsp)
	cmpq	%r14, %rax
	je	.L59
.L74:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	nil(%rip), %r14
	movq	%rax, 8(%rsp)
	cmpq	%r14, %rax
	je	.L60
.L73:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	nil(%rip), %r14
	movq	%rax, 16(%rsp)
	cmpq	%r14, %rax
	je	.L61
.L72:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rbx
	movq	nil(%rip), %r14
	cmpq	%r14, %rbx
	je	.L62
.L71:
	movl	(%rbx), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	16(%rbx), %r15
	cmpq	%r15, nil(%rip)
	movq	%r15, %r14
	je	.L63
.L70:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r13
	movq	nil(%rip), %r14
	cmpq	%r14, %r13
	je	.L64
.L69:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r13), %rax
	movq	nil(%rip), %r14
	cmpq	%r14, %rax
	je	.L65
	movq	%rax, %r14
.L68:
	movl	(%r14), %edx
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	16(%r14), %r9
	cmpq	nil(%rip), %r9
	je	.L66
.L67:
	movl	(%r9), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movq	%r9, 24(%rsp)
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	16(%r9), %rdi
	call	preorder
	movq	24(%rsp), %r9
	movq	8(%r9), %r9
	cmpq	%r9, nil(%rip)
	jne	.L67
.L66:
	movq	8(%r14), %r14
	cmpq	%r14, %r9
	jne	.L68
.L65:
	movq	8(%r13), %r13
	cmpq	%r14, %r13
	jne	.L69
.L64:
	movq	8(%r15), %r15
	cmpq	%r14, %r15
	jne	.L70
.L63:
	movq	8(%rbx), %rbx
	cmpq	%r14, %rbx
	jne	.L71
.L62:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 16(%rsp)
	cmpq	%r14, %rax
	jne	.L72
.L61:
	movq	8(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 8(%rsp)
	cmpq	%r14, %rax
	jne	.L73
.L60:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	cmpq	%r14, %rax
	jne	.L74
.L59:
	movq	8(%r12), %r12
	cmpq	%r14, %r12
	jne	.L58
	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
.L89:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE54:
	.size	preorder, .-preorder
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"insert"
.LC4:
	.string	"print"
.LC5:
	.string	"yes"
.LC6:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB55:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC1(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC3(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rsi
	leaq	33(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	testl	%eax, %eax
	jg	.L93
	jmp	.L114
	.p2align 4,,10
	.p2align 3
.L100:
	cmpl	$1852404336, 0(%rbp)
	je	.L134
.L107:
	addl	$1, %ebx
	cmpl	%ebx, 24(%rsp)
	jle	.L114
.L93:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$102, 33(%rsp)
	je	.L135
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L100
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	$32, %edi
	movl	28(%rsp), %r15d
	movq	nil(%rip), %r8
	movq	root(%rip), %rdx
	movq	%r8, 8(%rsp)
	movq	%rdx, (%rsp)
	call	malloc@PLT
	movq	8(%rsp), %r8
	movq	(%rsp), %rdx
	movl	%r15d, (%rax)
	movq	%r8, %xmm0
	punpcklqdq	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	cmpq	%rdx, %r8
	je	.L101
	.p2align 4,,10
	.p2align 3
.L106:
	movq	8(%rdx), %rsi
	movq	16(%rdx), %rcx
	cmpl	(%rdx), %r15d
	jge	.L102
.L137:
	cmpq	%rcx, %r8
	je	.L136
	movq	%rcx, %rdx
	movq	8(%rdx), %rsi
	movq	16(%rdx), %rcx
	cmpl	(%rdx), %r15d
	jl	.L137
.L102:
	cmpq	%rsi, %r8
	je	.L105
	movq	%rsi, %rdx
	jmp	.L106
	.p2align 4,,10
	.p2align 3
.L134:
	cmpw	$116, 4(%rbp)
	jne	.L107
	movq	root(%rip), %r15
	cmpq	nil(%rip), %r15
	je	.L113
	.p2align 4,,10
	.p2align 3
.L110:
	movq	16(%r15), %rdi
	call	inorder
	movl	(%r15), %edx
	xorl	%eax, %eax
	movq	%r12, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	8(%r15), %r15
	cmpq	%r15, nil(%rip)
	jne	.L110
.L113:
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %r15
	cmpq	nil(%rip), %r15
	je	.L111
.L112:
	movl	(%r15), %edx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %rdi
	call	preorder
	movq	8(%r15), %r15
	cmpq	%r15, nil(%rip)
	jne	.L112
.L111:
	movl	$10, %edi
	addl	$1, %ebx
	call	putchar@PLT
	cmpl	%ebx, 24(%rsp)
	jg	.L93
	.p2align 4,,10
	.p2align 3
.L114:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L138
	addq	$56, %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
.L136:
	.cfi_restore_state
	movq	%rdx, 24(%rax)
	cmpq	%rdx, %r8
	je	.L115
	movq	%rax, 16(%rdx)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%rdx, 24(%rax)
	cmpq	%rdx, %r8
	je	.L115
	movq	%rax, 8(%rdx)
	jmp	.L107
.L101:
	movq	%r8, 24(%rax)
.L115:
	movq	%rax, root(%rip)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L135:
	leaq	28(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %rax
	movq	nil(%rip), %rcx
	movl	28(%rsp), %esi
	cmpq	%rcx, %rax
	jne	.L95
	jmp	.L96
	.p2align 4,,10
	.p2align 3
.L98:
	movq	8(%rax), %rdx
	cmovl	16(%rax), %rdx
	movq	%rdx, %rax
	cmpq	%rcx, %rdx
	je	.L96
.L95:
	cmpl	(%rax), %esi
	jne	.L98
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L107
.L96:
	leaq	.LC6(%rip), %rdi
	call	puts@PLT
	jmp	.L107
.L138:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE55:
	.size	main, .-main
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.globl	nil
	.align 8
	.type	nil, @object
	.size	nil, 8
nil:
	.zero	8
	.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>
#include<string.h>

struct node {
  int key;
  struct node *right;
  struct node *left;
  struct node *parent;
};

typedef struct node* Nodepointer;
Nodepointer nil, root;

Nodepointer find(Nodepointer u, int k){
  while( u != nil && k != u->key ){
    if( k < u->key ) u = u->left;
    else u = u->right;
  }
  return u;
}

void insert(int k){
  Nodepointer x, y, z;
  y = nil;
  x = root;

  z = (Nodepointer)malloc(sizeof(struct node));
  z->key = k;
  z->left = nil;
  z->right = nil;
  
  while( x != nil ){
    y = x;
    if( z->key < x->key ) x = x->left;
    else x = x->right;
  }
  z->parent = y;

  if( y == nil ) root = z;
  else if( z->key < y->key ) y->left = z;
  else y->right = z;
}

void inorder(Nodepointer u){
  if( u == nil ) return;
  inorder(u->left);
  printf(" %d", u->key);
  inorder(u->right);
}

void preorder(Nodepointer u){
  if( u == nil ) return;
  printf(" %d", u->key);
  preorder(u->left);
  preorder(u->right);
}

int main(){
  int n, i, x;
  char com[7];

  scanf("%d", &n);

  for( i = 0 ; i < n ; i++ ){
    scanf("%s",com);
    if( com[0] == 'f' ){
      scanf("%d", &x);
      Nodepointer t = find(root, x);
      if( t != nil ) printf("yes\n");
      else printf("no\n");
    }
    else if( strcmp("insert",com) == 0 ){
      scanf("%d", &x);
      insert(x);
    }
    else if( strcmp("print",com) == 0 ){
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    }
  }
  return 0;
}


10
insert 30
insert 88
insert 12
insert 1
insert 29
find 12
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 12
insert 2
insert 20
find 12
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 12
insert 1
insert 29
find 15
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 12
insert 1
insert 20
find 13
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 19
insert 1
insert 20
find 13
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 12
insert 0
insert 29
find 12
insert 17
insert 25
find 16
print
 10
insert 30
insert 88
insert 12
insert 2
insert 20
find 12
insert 1
insert 25
find 16
print
 10
insert 30
insert 88
insert 19
insert 1
insert 20
find 13
insert 17
insert 25
find 25
print
 10
insert 30
insert 88
insert 7
insert 0
insert 29
find 12
insert 17
insert 25
find 16
print
 10
insert 35
insert 88
insert 12
insert 2
insert 20
find 12
insert 17
insert 25
find 16
print

yes
no
 1 12 17 25 29 30 88
 30 12 1 29 17 25 88
 yes
no
 2 12 17 20 25 30 88
 30 12 2 20 17 25 88
 no
no
 1 12 17 25 29 30 88
 30 12 1 29 17 25 88
 no
no
 1 12 17 20 25 30 88
 30 12 1 20 17 25 88
 no
no
 1 17 19 20 25 30 88
 30 19 1 17 20 25 88
 yes
no
 0 12 17 25 29 30 88
 30 12 0 29 17 25 88
 yes
no
 1 2 12 20 25 30 88
 30 12 2 1 20 25 88
 no
yes
 1 17 19 20 25 30 88
 30 19 1 17 20 25 88
 no
no
 0 7 17 25 29 30 88
 30 7 0 29 17 25 88
 yes
no
 2 12 17 20 25 35 88
 35 12 2 20 17 25 88

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>
#include<string.h>

struct node {
  int key;
  struct node *right;
  struct node *left;
  struct node *parent;
};

typedef struct node* Nodepointer;
Nodepointer nil, root;

Nodepointer find(Nodepointer u, int k){
  while( u != nil && k != u->key ){
    if( k < u->key ) u = u->left;
    else u = u->right;
  }
  return u;
}

void insert(int k){
  Nodepointer x, y, z;
  y = nil;
  x = root;

  z = (Nodepointer)malloc(sizeof(struct node));
  z->key = k;
  z->left = nil;
  z->right = nil;
  
  while( x != nil ){
    y = x;
    if( z->key < x->key ) x = x->left;
    else x = x->right;
  }
  z->parent = y;

  if( y == nil ) root = z;
  else if( z->key < y->key ) y->left = z;
  else y->right = z;
}

void inorder(Nodepointer u){
  if( u == nil ) return;
  inorder(u->left);
  printf(" %d", u->key);
  inorder(u->right);
}

void preorder(Nodepointer u){
  if( u == nil ) return;
  printf(" %d", u->key);
  preorder(u->left);
  preorder(u->right);
}

int main(){
  int n, i, x;
  char com[7];

  scanf("%d", &n);

  for( i = 0 ; i < n ; i++ ){
    scanf("%s",com);
    if( com[0] == 'f' ){
      scanf("%d", &x);
      Nodepointer t = find(root, x);
      if( t != nil ) printf("yes\n");
      else printf("no\n");
    }
    else if( strcmp("insert",com) == 0 ){
      scanf("%d", &x);
      insert(x);
    }
    else if( strcmp("print",com) == 0 ){
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    }
  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	nil
	.bss
	.align 8
	.type	nil, @object
	.size	nil, 8
nil:
	.zero	8
	.globl	root
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.text
	.globl	find
	.type	find, @function
find:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	jmp	.L2
.L5:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L3
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L2:
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L4
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
.L4:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.globl	insert
	.type	insert, @function
insert:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movq	nil(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	root(%rip), %rax
	movq	%rax, -24(%rbp)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	jmp	.L8
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L9
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -24(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -24(%rbp)
.L8:
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	jne	.L10
	movq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, 24(%rax)
	movq	nil(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	movq	%rax, root(%rip)
	jmp	.L14
.L11:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L13
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 16(%rax)
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	" %d"
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.LFB8:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L18
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	jmp	.L15
.L18:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inorder, .-inorder
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB9:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L22
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	preorder, .-preorder
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"yes"
.LC4:
	.string	"no"
.LC5:
	.string	"insert"
.LC6:
	.string	"print"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L24
.L29:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	cmpb	$102, %al
	jne	.L25
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	find
	movq	%rax, -24(%rbp)
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	je	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L25:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L28
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L27
.L28:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L27
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	inorder
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	preorder
	movl	$10, %edi
	call	putchar@PLT
.L27:
	addl	$1, -28(%rbp)
.L24:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L29
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	nil
	.bss
	.align 8
	.type	nil, @object
	.size	nil, 8
nil:
	.zero	8
	.globl	root
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.text
	.globl	find
	.type	find, @function
find:
.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, -8(%rbp)
	movl	%esi, -12(%rbp)
	jmp	.L2
.L5:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L3
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	jmp	.L2
.L3:
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
.L2:
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L4
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L5
.L4:
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	find, .-find
	.globl	insert
	.type	insert, @function
insert:
.LFB7:
	.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
	movl	%edi, -36(%rbp)
	movq	nil(%rip), %rax
	movq	%rax, -16(%rbp)
	movq	root(%rip), %rax
	movq	%rax, -24(%rbp)
	movl	$32, %edi
	call	malloc@PLT
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movl	-36(%rbp), %edx
	movl	%edx, (%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	nil(%rip), %rdx
	movq	-8(%rbp), %rax
	movq	%rdx, 8(%rax)
	jmp	.L8
.L10:
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L9
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -24(%rbp)
	jmp	.L8
.L9:
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -24(%rbp)
.L8:
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	jne	.L10
	movq	-8(%rbp), %rax
	movq	-16(%rbp), %rdx
	movq	%rdx, 24(%rax)
	movq	nil(%rip), %rax
	cmpq	%rax, -16(%rbp)
	jne	.L11
	movq	-8(%rbp), %rax
	movq	%rax, root(%rip)
	jmp	.L14
.L11:
	movq	-8(%rbp), %rax
	movl	(%rax), %edx
	movq	-16(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	jge	.L13
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 16(%rax)
	jmp	.L14
.L13:
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	movq	%rdx, 8(%rax)
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	" %d"
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.LFB8:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L18
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	inorder
	jmp	.L15
.L18:
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	inorder, .-inorder
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB9:
	.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)
	movq	nil(%rip), %rax
	cmpq	%rax, -8(%rbp)
	je	.L22
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	preorder
	jmp	.L19
.L22:
	nop
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	preorder, .-preorder
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%s"
.LC3:
	.string	"yes"
.LC4:
	.string	"no"
.LC5:
	.string	"insert"
.LC6:
	.string	"print"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.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
	leaq	-36(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -28(%rbp)
	jmp	.L24
.L29:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	cmpb	$102, %al
	jne	.L25
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	find
	movq	%rax, -24(%rbp)
	movq	nil(%rip), %rax
	cmpq	%rax, -24(%rbp)
	je	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L25:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L28
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	movl	%eax, %edi
	call	insert
	jmp	.L27
.L28:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L27
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	inorder
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	preorder
	movl	$10, %edi
	call	putchar@PLT
.L27:
	addl	$1, -28(%rbp)
.L24:
	movl	-36(%rbp), %eax
	cmpl	%eax, -28(%rbp)
	jl	.L29
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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:
