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 tree {
  int key;
  int priority;
  struct tree *left;
  struct tree *right;
};
struct tree *root = NULL;
int Search(struct tree *p, int key);
struct tree *Lrotation(struct tree *p);
struct tree *Rrotation(struct tree *p);
struct tree *Insert(struct tree **p, int key, int priority);
struct tree *Delete(struct tree **p, int key);
struct tree *delete(struct tree **p, int key);
void Dispm(struct tree *p);
void Dispp(struct tree *p);
int main(void)
{
  int i, count, key, priority;
  char command[7];
  scanf("%d", &count);
  for (i = 0; i < count; i++) {
    scanf("%*c%s", command);
    switch (command[0]) {
    case 'f':
      scanf("%d", &key);
      if (Search(root, key)) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
      break;
    case 'i':
      scanf("%d %d", &key, &priority);
      root = Insert(&root, key, priority);
      break;
    case 'd':
      scanf("%d", &key);
      Delete(&root, key);
      break;
    case 'p':
      Dispm(root);
      putchar('\n');
      Dispp(root);
      putchar('\n');
      break;
    }
  }
  return 0;
}
int Search(struct tree *p, int key)
{
  if (p == NULL) {
    return 0;
  } else if (p->key == key) {
    return 1;
  } else if (p->key > key) {
    return Search(p->left, key);
  } else {
    return Search(p->right, key);
  }
}
struct tree *Lrotation(struct tree *p)
{
  struct tree *q = p->right;
  p->right = q->left;
  q->left = p;
  return q;
}
struct tree *Rrotation(struct tree *p)
{
  struct tree *q = p->left;
  p->left = q->right;
  q->right = p;
  return q;
}
struct tree *Insert(struct tree **p, int key, int priority)
{
  if (*p == NULL) {
    *p = (struct tree*)malloc(sizeof(struct tree));
    (*p)->key = key;
    (*p)->priority = priority;
    (*p)->left = NULL;
    (*p)->right = NULL;
  } else if ((*p)->key > key) {
    (*p)->left = Insert(&(*p)->left, key, priority);
    if ((*p)->priority <  (*p)->left->priority) *p = Rrotation(*p);
  } else if ((*p)->key < key) {
    (*p)->right = Insert(&(*p)->right, key, priority);
    if ((*p)->priority <  (*p)->right->priority) *p = Lrotation(*p);
  }
  return *p;
}
struct tree *Delete(struct tree **p, int key)
{
  if ((*p) == NULL) return NULL;
  if ((*p)->key > key) (*p)->left = Delete(&(*p)->left, key);
  else if ((*p)->key < key) (*p)->right = Delete(&(*p)->right, key);
  else delete(p, key);
  return *p;
}
struct tree *delete(struct tree **p, int key)
{
  if ((*p)->left == NULL && (*p)->right == NULL) return *p = NULL;
  else if ((*p)->left == NULL) *p = Lrotation(*p);
  else if ((*p)->right == NULL) *p = Rrotation(*p);
  else {
    if ((*p)->left->priority > (*p)->right->priority) *p = Rrotation(*p);
    else *p = Lrotation(*p);
  }
  return Delete(p, key);
}
void Dispm(struct tree *p)
{
  if (p != NULL) {
    Dispm(p->left);
    printf(" %d", p->key);
    Dispm(p->right);
  }
}
void Dispp(struct tree *p)
{
  if (p != NULL) {
    printf(" %d", p->key);
    Dispp(p->left);
    Dispp(p->right);
  }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%*c%s"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
.LC4:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L9:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	movsbl	%al, %eax
	cmpl	$112, %eax
	je	.L3
	cmpl	$112, %eax
	jg	.L4
	cmpl	$105, %eax
	je	.L5
	cmpl	$105, %eax
	jg	.L4
	cmpl	$100, %eax
	je	.L6
	cmpl	$102, %eax
	jne	.L4
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	testl	%eax, %eax
	je	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Insert
	movq	%rax, root(%rip)
	jmp	.L4
.L6:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Delete
	jmp	.L4
.L3:
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispm
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispp
	movl	$10, %edi
	call	putchar@PLT
	nop
.L4:
	addl	$1, -20(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Search
	.type	Search, @function
Search:
.LFB7:
	.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)
	movl	%esi, -12(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L16
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	jmp	.L14
.L16:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Search, .-Search
	.globl	Lrotation
	.type	Lrotation, @function
Lrotation:
.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, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Lrotation, .-Lrotation
	.globl	Rrotation
	.type	Rrotation, @function
Rrotation:
.LFB9:
	.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)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Rrotation, .-Rrotation
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L22
	movl	$24, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-32(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 16(%rax)
	jmp	.L23
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 8(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L23
.L24:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 16(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
.L23:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Insert, .-Insert
	.globl	Delete
	.type	Delete, @function
Delete:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L29
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 8(%rbx)
	jmp	.L30
.L29:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L31
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 16(%rbx)
	jmp	.L30
.L31:
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	delete
.L30:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
.L28:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Delete, .-Delete
	.globl	delete
	.type	delete, @function
delete:
.LFB12:
	.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)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	$0, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L35
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L35:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L37
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L37:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L38
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L38:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
.L36:
	movl	-12(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Delete
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	delete, .-delete
	.section	.rodata
.LC5:
	.string	" %d"
	.text
	.globl	Dispm
	.type	Dispm, @function
Dispm:
.LFB13:
	.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	.L41
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
.L41:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	Dispm, .-Dispm
	.globl	Dispp
	.type	Dispp, @function
Dispp:
.LFB14:
	.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	.L44
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
.L44:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	Dispp, .-Dispp
	.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	Search
	.type	Search, @function
Search:
.LFB40:
	.cfi_startproc
	endbr64
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%esi, (%rdi)
	je	.L7
	movq	8(%rdi), %rax
	cmovle	16(%rdi), %rax
	movq	%rax, %rdi
.L9:
	testq	%rdi, %rdi
	jne	.L3
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	Search, .-Search
	.p2align 4
	.globl	Lrotation
	.type	Lrotation, @function
Lrotation:
.LFB41:
	.cfi_startproc
	endbr64
	movq	16(%rdi), %rax
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rdi)
	movq	%rdi, 8(%rax)
	ret
	.cfi_endproc
.LFE41:
	.size	Lrotation, .-Lrotation
	.p2align 4
	.globl	Rrotation
	.type	Rrotation, @function
Rrotation:
.LFB42:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movq	%rdi, 16(%rax)
	ret
	.cfi_endproc
.LFE42:
	.size	Rrotation, .-Rrotation
	.p2align 4
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	punpckldq	%xmm1, %xmm0
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	.L24
	cmpl	%esi, (%r12)
	jg	.L25
	jl	.L26
.L13:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L25:
	.cfi_restore_state
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L27
	cmpl	0(%rbp), %esi
	jl	.L28
	jg	.L29
.L18:
	movq	%rbp, 8(%r12)
	movq	(%rbx), %r12
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%r12)
	jge	.L13
	movq	16(%rax), %rdx
	movq	%rdx, 8(%r12)
	movq	%r12, 16(%rax)
	movq	%rax, %r12
	movq	%rax, (%rbx)
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L26:
	.cfi_restore_state
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L30
	cmpl	0(%rbp), %esi
	jl	.L31
	jg	.L32
.L21:
	movq	%rbp, 16(%r12)
	movq	(%rbx), %r12
	movq	16(%r12), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%r12)
	jge	.L13
	movq	8(%rax), %rdx
	movq	%rdx, 16(%r12)
	movq	%r12, 8(%rax)
	movq	%rax, %r12
	movq	%rax, (%rbx)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	8(%rbp), %rdi
	call	Insert
	movq	%rax, 8(%rbp)
	movq	8(%r12), %rbp
	movq	8(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L18
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rbp)
	movq	%rbp, 16(%rax)
	movq	%rax, %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L24:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, (%rbx)
	movq	%rax, %r12
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L29:
	.cfi_restore_state
	leaq	16(%rbp), %rdi
	call	Insert
	movq	%rax, 16(%rbp)
	movq	8(%r12), %rbp
	movq	16(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L18
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rbp)
	movq	%rbp, 8(%rax)
	movq	%rax, %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	8(%rbp), %rdi
	call	Insert
	movq	%rax, 8(%rbp)
	movq	16(%r12), %rbp
	movq	8(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L21
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rbp)
	movq	%rbp, 16(%rax)
	movq	%rax, %rbp
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, 8(%r12)
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	8(%r12), %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L32:
	leaq	16(%rbp), %rdi
	call	Insert
	movq	%rax, 16(%rbp)
	movq	16(%r12), %rbp
	movq	16(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L21
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rbp)
	movq	%rbp, 8(%rax)
	movq	%rax, %rbp
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L30:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, 16(%r12)
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	16(%r12), %rbp
	jmp	.L21
	.cfi_endproc
.LFE43:
	.size	Insert, .-Insert
	.p2align 4
	.globl	delete
	.type	delete, @function
delete:
.LFB45:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %rax
	movq	%rdi, %rbx
	movq	8(%rax), %rdx
	movq	16(%rax), %r12
	testq	%rdx, %rdx
	je	.L61
	testq	%r12, %r12
	je	.L60
	movl	4(%r12), %ecx
	cmpl	%ecx, 4(%rdx)
	jle	.L39
.L60:
	movq	16(%rdx), %rcx
	movq	%rdx, %r12
	movq	%rcx, 8(%rax)
	movq	%rax, 16(%rdx)
	movq	%r12, (%rbx)
	cmpl	(%r12), %esi
	jl	.L62
.L58:
	jle	.L45
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L46
	cmpl	0(%rbp), %esi
	jl	.L63
	jle	.L49
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L48:
	movq	16(%r12), %rbp
.L46:
	movq	%rbp, 16(%r12)
.L44:
	movq	(%rbx), %r12
.L33:
	movq	%r12, %rax
	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
.L61:
	.cfi_restore_state
	testq	%r12, %r12
	je	.L64
.L39:
	movq	8(%r12), %rdx
	movq	%rdx, 16(%rax)
	movq	%rax, 8(%r12)
	movq	%r12, (%rbx)
	cmpl	(%r12), %esi
	jge	.L58
.L62:
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L40
	cmpl	0(%rbp), %esi
	jl	.L65
	jle	.L43
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L42:
	movq	8(%r12), %rbp
.L40:
	movq	%rbp, 8(%r12)
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbx, %rdi
	call	delete
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L49:
	leaq	16(%r12), %rdi
	call	delete
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	8(%r12), %rdi
	call	delete
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L64:
	movq	$0, (%rdi)
	jmp	.L33
	.cfi_endproc
.LFE45:
	.size	delete, .-delete
	.p2align 4
	.globl	Delete
	.type	Delete, @function
Delete:
.LFB44:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	.L66
	movq	%rdi, %rbx
	cmpl	%esi, (%r12)
	jg	.L89
	jge	.L74
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L75
	cmpl	0(%rbp), %esi
	jl	.L90
	jle	.L78
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L77:
	movq	16(%r12), %rbp
.L75:
	movq	%rbp, 16(%r12)
	movq	(%rbx), %r12
.L66:
	movq	%r12, %rax
	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
.L74:
	.cfi_restore_state
	call	delete
.L73:
	movq	(%rbx), %r12
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L89:
	.cfi_restore_state
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L69
	cmpl	0(%rbp), %esi
	jl	.L91
	jle	.L72
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L71:
	movq	8(%r12), %rbp
.L69:
	movq	%rbp, 8(%r12)
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L90:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L91:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	16(%r12), %rdi
	call	delete
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L72:
	leaq	8(%r12), %rdi
	call	delete
	jmp	.L71
	.cfi_endproc
.LFE44:
	.size	Delete, .-Delete
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
	.text
	.p2align 4
	.globl	Dispm
	.type	Dispm, @function
Dispm:
.LFB46:
	.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	.L92
	leaq	.LC0(%rip), %rbp
.L110:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	je	.L94
.L109:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L95
.L108:
	movq	8(%rsp), %rax
	movq	8(%rax), %r15
	testq	%r15, %r15
	je	.L96
.L107:
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	.L97
.L106:
	movq	8(%rbx), %r13
	testq	%r13, %r13
	je	.L98
.L105:
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	.L99
.L104:
	movq	8(%r12), %r14
	testq	%r14, %r14
	je	.L100
.L103:
	movq	8(%r14), %r9
	testq	%r9, %r9
	je	.L101
.L102:
	movq	8(%r9), %rdi
	movq	%r9, 24(%rsp)
	call	Dispm
	movq	24(%rsp), %r9
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	(%r9), %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	16(%r9), %r9
	testq	%r9, %r9
	jne	.L102
.L101:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r14), %r14
	testq	%r14, %r14
	jne	.L103
.L100:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r12), %r12
	testq	%r12, %r12
	jne	.L104
.L99:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r13), %r13
	testq	%r13, %r13
	jne	.L105
.L98:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L106
.L97:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L107
.L96:
	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	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L108
.L95:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	jne	.L109
.L94:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L110
.L92:
	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
.LFE46:
	.size	Dispm, .-Dispm
	.p2align 4
	.globl	Dispp
	.type	Dispp, @function
Dispp:
.LFB47:
	.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	.L148
	leaq	.LC0(%rip), %rbp
.L166:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	je	.L150
.L165:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L151
.L164:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	.L152
.L163:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	.L153
.L162:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rbx), %r13
	testq	%r13, %r13
	je	.L154
.L161:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	.L155
.L160:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r12), %r14
	testq	%r14, %r14
	je	.L156
.L159:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r14), %r9
	testq	%r9, %r9
	je	.L157
.L158:
	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	8(%r9), %rdi
	call	Dispp
	movq	24(%rsp), %r9
	movq	16(%r9), %r9
	testq	%r9, %r9
	jne	.L158
.L157:
	movq	16(%r14), %r14
	testq	%r14, %r14
	jne	.L159
.L156:
	movq	16(%r12), %r12
	testq	%r12, %r12
	jne	.L160
.L155:
	movq	16(%r13), %r13
	testq	%r13, %r13
	jne	.L161
.L154:
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L162
.L153:
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L163
.L152:
	movq	8(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L164
.L151:
	movq	(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	jne	.L165
.L150:
	movq	16(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L166
.L148:
	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
.LFE47:
	.size	Dispp, .-Dispp
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%*c%s"
.LC3:
	.string	"%d %d"
.LC4:
	.string	"yes"
.LC5:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	.LC1(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L205
	xorl	%ebx, %ebx
	leaq	33(%rsp), %r13
	leaq	.LC2(%rip), %r12
	leaq	.LC0(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L246:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	33(%rsp), %eax
	cmpb	$105, %al
	je	.L206
	jg	.L207
	cmpb	$100, %al
	je	.L208
	cmpb	$102, %al
	jne	.L210
	leaq	24(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %rax
	movl	24(%rsp), %ecx
	testq	%rax, %rax
	jne	.L213
	jmp	.L212
	.p2align 4,,10
	.p2align 3
.L287:
	movq	8(%rax), %rdx
	cmovge	16(%rax), %rdx
	movq	%rdx, %rax
	testq	%rdx, %rdx
	je	.L212
.L213:
	cmpl	(%rax), %ecx
	jne	.L287
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L210:
	addl	$1, %ebx
	cmpl	%ebx, 20(%rsp)
	jg	.L246
.L205:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L288
	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
.L207:
	.cfi_restore_state
	cmpb	$112, %al
	jne	.L210
	movq	root(%rip), %r15
	testq	%r15, %r15
	je	.L242
.L243:
	movq	8(%r15), %rdi
	call	Dispm
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L243
.L242:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	root(%rip), %r15
	testq	%r15, %r15
	je	.L244
.L245:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %rdi
	call	Dispp
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L245
.L244:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L210
	.p2align 4,,10
	.p2align 3
.L206:
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	movl	24(%rsp), %esi
	leaq	root(%rip), %rdi
	call	Insert
	movq	%rax, root(%rip)
	jmp	.L210
	.p2align 4,,10
	.p2align 3
.L208:
	leaq	24(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %r15
	movl	24(%rsp), %esi
	testq	%r15, %r15
	je	.L210
	cmpl	(%r15), %esi
	jl	.L289
	jle	.L229
	movq	16(%r15), %rcx
	testq	%rcx, %rcx
	je	.L230
	cmpl	(%rcx), %esi
	jl	.L290
	jle	.L237
	movq	16(%rcx), %r8
	testq	%r8, %r8
	je	.L238
	cmpl	(%r8), %esi
	jl	.L291
	jg	.L292
	leaq	16(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L240:
	movq	16(%rcx), %r8
.L238:
	movq	%r8, 16(%rcx)
	jmp	.L236
	.p2align 4,,10
	.p2align 3
.L212:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L210
.L229:
	leaq	root(%rip), %rdi
	call	delete
	jmp	.L210
.L237:
	leaq	16(%r15), %rdi
	call	delete
.L236:
	movq	16(%r15), %rcx
.L230:
	movq	%rcx, 16(%r15)
	jmp	.L210
.L289:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	.L217
	cmpl	(%rcx), %esi
	jl	.L293
	jle	.L224
	movq	16(%rcx), %r8
	testq	%r8, %r8
	je	.L225
	cmpl	(%r8), %esi
	jl	.L294
	jg	.L295
	leaq	16(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L227:
	movq	16(%rcx), %r8
.L225:
	movq	%r8, 16(%rcx)
	jmp	.L223
.L224:
	leaq	8(%r15), %rdi
	call	delete
.L223:
	movq	8(%r15), %rcx
.L217:
	movq	%rcx, 8(%r15)
	jmp	.L210
.L290:
	movq	8(%rcx), %r8
	testq	%r8, %r8
	je	.L232
	cmpl	(%r8), %esi
	jl	.L296
	jg	.L297
	leaq	8(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L234:
	movq	8(%rcx), %r8
.L232:
	movq	%r8, 8(%rcx)
	jmp	.L236
.L293:
	movq	8(%rcx), %r8
	testq	%r8, %r8
	je	.L219
	cmpl	(%r8), %esi
	jl	.L298
	jg	.L299
	leaq	8(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L221:
	movq	8(%rcx), %r8
.L219:
	movq	%r8, 8(%rcx)
	jmp	.L223
.L297:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L234
.L295:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L227
.L292:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L240
.L299:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L221
.L291:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L240
.L298:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L221
.L296:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L234
.L294:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L227
.L288:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.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	Search
	.type	Search, @function
Search:
.LFB40:
	.cfi_startproc
	endbr64
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%esi, (%rdi)
	je	.L7
	movq	8(%rdi), %rax
	cmovle	16(%rdi), %rax
	movq	%rax, %rdi
.L9:
	testq	%rdi, %rdi
	jne	.L3
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE40:
	.size	Search, .-Search
	.p2align 4
	.globl	Lrotation
	.type	Lrotation, @function
Lrotation:
.LFB41:
	.cfi_startproc
	endbr64
	movq	16(%rdi), %rax
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rdi)
	movq	%rdi, 8(%rax)
	ret
	.cfi_endproc
.LFE41:
	.size	Lrotation, .-Lrotation
	.p2align 4
	.globl	Rrotation
	.type	Rrotation, @function
Rrotation:
.LFB42:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rdi)
	movq	%rdi, 16(%rax)
	ret
	.cfi_endproc
.LFE42:
	.size	Rrotation, .-Rrotation
	.p2align 4
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB43:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movd	%esi, %xmm0
	movd	%edx, %xmm1
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	punpckldq	%xmm1, %xmm0
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	.L24
	cmpl	%esi, (%r12)
	jg	.L25
	jl	.L26
.L13:
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L25:
	.cfi_restore_state
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L27
	cmpl	0(%rbp), %esi
	jl	.L28
	jg	.L29
.L18:
	movq	%rbp, 8(%r12)
	movq	(%rbx), %r12
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%r12)
	jge	.L13
	movq	16(%rax), %rdx
	movq	%rdx, 8(%r12)
	movq	%r12, 16(%rax)
	movq	%rax, %r12
	movq	%rax, (%rbx)
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L26:
	.cfi_restore_state
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L30
	cmpl	0(%rbp), %esi
	jl	.L31
	jg	.L32
.L21:
	movq	%rbp, 16(%r12)
	movq	(%rbx), %r12
	movq	16(%r12), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%r12)
	jge	.L13
	movq	8(%rax), %rdx
	movq	%rdx, 16(%r12)
	movq	%r12, 8(%rax)
	movq	%rax, %r12
	movq	%rax, (%rbx)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	8(%rbp), %rdi
	call	Insert
	movq	%rax, 8(%rbp)
	movq	8(%r12), %rbp
	movq	8(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L18
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rbp)
	movq	%rbp, 16(%rax)
	movq	%rax, %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L24:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, (%rbx)
	movq	%rax, %r12
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	movq	%r12, %rax
	popq	%rbx
	.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
.L29:
	.cfi_restore_state
	leaq	16(%rbp), %rdi
	call	Insert
	movq	%rax, 16(%rbp)
	movq	8(%r12), %rbp
	movq	16(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L18
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rbp)
	movq	%rbp, 8(%rax)
	movq	%rax, %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L31:
	leaq	8(%rbp), %rdi
	call	Insert
	movq	%rax, 8(%rbp)
	movq	16(%r12), %rbp
	movq	8(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L21
	movq	16(%rax), %rdx
	movq	%rdx, 8(%rbp)
	movq	%rbp, 16(%rax)
	movq	%rax, %rbp
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, 8(%r12)
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	8(%r12), %rbp
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L32:
	leaq	16(%rbp), %rdi
	call	Insert
	movq	%rax, 16(%rbp)
	movq	16(%r12), %rbp
	movq	16(%rbp), %rax
	movl	4(%rax), %ecx
	cmpl	%ecx, 4(%rbp)
	jge	.L21
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rbp)
	movq	%rbp, 8(%rax)
	movq	%rax, %rbp
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L30:
	movl	$24, %edi
	movq	%xmm0, 8(%rsp)
	call	malloc@PLT
	movq	8(%rsp), %xmm0
	movq	%rax, 16(%r12)
	movq	%xmm0, (%rax)
	pxor	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	16(%r12), %rbp
	jmp	.L21
	.cfi_endproc
.LFE43:
	.size	Insert, .-Insert
	.p2align 4
	.globl	delete
	.type	delete, @function
delete:
.LFB45:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %rax
	movq	%rdi, %rbx
	movq	8(%rax), %rdx
	movq	16(%rax), %r12
	testq	%rdx, %rdx
	je	.L61
	testq	%r12, %r12
	je	.L60
	movl	4(%r12), %ecx
	cmpl	%ecx, 4(%rdx)
	jle	.L39
.L60:
	movq	16(%rdx), %rcx
	movq	%rdx, %r12
	movq	%rcx, 8(%rax)
	movq	%rax, 16(%rdx)
	movq	%r12, (%rbx)
	cmpl	(%r12), %esi
	jl	.L62
.L58:
	jle	.L45
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L46
	cmpl	0(%rbp), %esi
	jl	.L63
	jle	.L49
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L48:
	movq	16(%r12), %rbp
.L46:
	movq	%rbp, 16(%r12)
.L44:
	movq	(%rbx), %r12
.L33:
	movq	%r12, %rax
	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
.L61:
	.cfi_restore_state
	testq	%r12, %r12
	je	.L64
.L39:
	movq	8(%r12), %rdx
	movq	%rdx, 16(%rax)
	movq	%rax, 8(%r12)
	movq	%r12, (%rbx)
	cmpl	(%r12), %esi
	jge	.L58
.L62:
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L40
	cmpl	0(%rbp), %esi
	jl	.L65
	jle	.L43
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L42:
	movq	8(%r12), %rbp
.L40:
	movq	%rbp, 8(%r12)
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L45:
	movq	%rbx, %rdi
	call	delete
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L63:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L65:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L49:
	leaq	16(%r12), %rdi
	call	delete
	jmp	.L48
	.p2align 4,,10
	.p2align 3
.L43:
	leaq	8(%r12), %rdi
	call	delete
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L64:
	movq	$0, (%rdi)
	jmp	.L33
	.cfi_endproc
.LFE45:
	.size	delete, .-delete
	.p2align 4
	.globl	Delete
	.type	Delete, @function
Delete:
.LFB44:
	.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
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	.L66
	movq	%rdi, %rbx
	cmpl	%esi, (%r12)
	jg	.L89
	jge	.L74
	movq	16(%r12), %rbp
	testq	%rbp, %rbp
	je	.L75
	cmpl	0(%rbp), %esi
	jl	.L90
	jle	.L78
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L77:
	movq	16(%r12), %rbp
.L75:
	movq	%rbp, 16(%r12)
	movq	(%rbx), %r12
.L66:
	movq	%r12, %rax
	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
.L74:
	.cfi_restore_state
	call	delete
.L73:
	movq	(%rbx), %r12
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	movq	%r12, %rax
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L89:
	.cfi_restore_state
	movq	8(%r12), %rbp
	testq	%rbp, %rbp
	je	.L69
	cmpl	0(%rbp), %esi
	jl	.L91
	jle	.L72
	leaq	16(%rbp), %rdi
	call	Delete
	movq	%rax, 16(%rbp)
.L71:
	movq	8(%r12), %rbp
.L69:
	movq	%rbp, 8(%r12)
	jmp	.L73
	.p2align 4,,10
	.p2align 3
.L90:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L91:
	leaq	8(%rbp), %rdi
	call	Delete
	movq	%rax, 8(%rbp)
	jmp	.L71
	.p2align 4,,10
	.p2align 3
.L78:
	leaq	16(%r12), %rdi
	call	delete
	jmp	.L77
	.p2align 4,,10
	.p2align 3
.L72:
	leaq	8(%r12), %rdi
	call	delete
	jmp	.L71
	.cfi_endproc
.LFE44:
	.size	Delete, .-Delete
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" %d"
	.text
	.p2align 4
	.globl	Dispm
	.type	Dispm, @function
Dispm:
.LFB46:
	.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	.L92
	leaq	.LC0(%rip), %rbp
.L110:
	movq	16(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	je	.L94
.L109:
	movq	(%rsp), %rax
	movq	8(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L95
.L108:
	movq	8(%rsp), %rax
	movq	8(%rax), %r15
	testq	%r15, %r15
	je	.L96
.L107:
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	.L97
.L106:
	movq	8(%rbx), %r13
	testq	%r13, %r13
	je	.L98
.L105:
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	.L99
.L104:
	movq	8(%r12), %r14
	testq	%r14, %r14
	je	.L100
.L103:
	movq	8(%r14), %r9
	testq	%r9, %r9
	je	.L101
.L102:
	movq	8(%r9), %rdi
	movq	%r9, 24(%rsp)
	call	Dispm
	movq	24(%rsp), %r9
	movq	%rbp, %rsi
	xorl	%eax, %eax
	movl	$1, %edi
	movl	(%r9), %edx
	call	__printf_chk@PLT
	movq	24(%rsp), %r9
	movq	16(%r9), %r9
	testq	%r9, %r9
	jne	.L102
.L101:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r14), %r14
	testq	%r14, %r14
	jne	.L103
.L100:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r12), %r12
	testq	%r12, %r12
	jne	.L104
.L99:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r13), %r13
	testq	%r13, %r13
	jne	.L105
.L98:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L106
.L97:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L107
.L96:
	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	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L108
.L95:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	jne	.L109
.L94:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L110
.L92:
	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
.LFE46:
	.size	Dispm, .-Dispm
	.p2align 4
	.globl	Dispp
	.type	Dispp, @function
Dispp:
.LFB47:
	.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	.L148
	leaq	.LC0(%rip), %rbp
.L166:
	movq	16(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	je	.L150
.L165:
	movq	(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	je	.L151
.L164:
	movq	8(%rsp), %rbx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	(%rbx), %edx
	call	__printf_chk@PLT
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	.L152
.L163:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	.L153
.L162:
	movl	(%rbx), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%rbx), %r13
	testq	%r13, %r13
	je	.L154
.L161:
	movl	0(%r13), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r13), %r12
	testq	%r12, %r12
	je	.L155
.L160:
	movl	(%r12), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r12), %r14
	testq	%r14, %r14
	je	.L156
.L159:
	movl	(%r14), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r14), %r9
	testq	%r9, %r9
	je	.L157
.L158:
	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	8(%r9), %rdi
	call	Dispp
	movq	24(%rsp), %r9
	movq	16(%r9), %r9
	testq	%r9, %r9
	jne	.L158
.L157:
	movq	16(%r14), %r14
	testq	%r14, %r14
	jne	.L159
.L156:
	movq	16(%r12), %r12
	testq	%r12, %r12
	jne	.L160
.L155:
	movq	16(%r13), %r13
	testq	%r13, %r13
	jne	.L161
.L154:
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	.L162
.L153:
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L163
.L152:
	movq	8(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 8(%rsp)
	testq	%rax, %rax
	jne	.L164
.L151:
	movq	(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, (%rsp)
	testq	%rax, %rax
	jne	.L165
.L150:
	movq	16(%rsp), %rax
	movq	16(%rax), %rax
	movq	%rax, 16(%rsp)
	testq	%rax, %rax
	jne	.L166
.L148:
	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
.LFE47:
	.size	Dispp, .-Dispp
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%*c%s"
.LC3:
	.string	"%d %d"
.LC4:
	.string	"yes"
.LC5:
	.string	"no"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB39:
	.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	.LC1(%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	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L205
	xorl	%ebx, %ebx
	leaq	33(%rsp), %r13
	leaq	.LC2(%rip), %r12
	leaq	.LC0(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L246:
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	33(%rsp), %eax
	cmpb	$105, %al
	je	.L206
	jg	.L207
	cmpb	$100, %al
	je	.L208
	cmpb	$102, %al
	jne	.L210
	leaq	24(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %rax
	movl	24(%rsp), %ecx
	testq	%rax, %rax
	jne	.L213
	jmp	.L212
	.p2align 4,,10
	.p2align 3
.L287:
	movq	8(%rax), %rdx
	cmovge	16(%rax), %rdx
	movq	%rdx, %rax
	testq	%rdx, %rdx
	je	.L212
.L213:
	cmpl	(%rax), %ecx
	jne	.L287
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	.p2align 4,,10
	.p2align 3
.L210:
	addl	$1, %ebx
	cmpl	%ebx, 20(%rsp)
	jg	.L246
.L205:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L288
	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
.L207:
	.cfi_restore_state
	cmpb	$112, %al
	jne	.L210
	movq	root(%rip), %r15
	testq	%r15, %r15
	je	.L242
.L243:
	movq	8(%r15), %rdi
	call	Dispm
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L243
.L242:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	movq	root(%rip), %r15
	testq	%r15, %r15
	je	.L244
.L245:
	movl	(%r15), %edx
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movq	8(%r15), %rdi
	call	Dispp
	movq	16(%r15), %r15
	testq	%r15, %r15
	jne	.L245
.L244:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L210
	.p2align 4,,10
	.p2align 3
.L206:
	leaq	28(%rsp), %rdx
	leaq	24(%rsp), %rsi
	xorl	%eax, %eax
	leaq	.LC3(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	28(%rsp), %edx
	movl	24(%rsp), %esi
	leaq	root(%rip), %rdi
	call	Insert
	movq	%rax, root(%rip)
	jmp	.L210
	.p2align 4,,10
	.p2align 3
.L208:
	leaq	24(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	root(%rip), %r15
	movl	24(%rsp), %esi
	testq	%r15, %r15
	je	.L210
	cmpl	(%r15), %esi
	jl	.L289
	jle	.L229
	movq	16(%r15), %rcx
	testq	%rcx, %rcx
	je	.L230
	cmpl	(%rcx), %esi
	jl	.L290
	jle	.L237
	movq	16(%rcx), %r8
	testq	%r8, %r8
	je	.L238
	cmpl	(%r8), %esi
	jl	.L291
	jg	.L292
	leaq	16(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L240:
	movq	16(%rcx), %r8
.L238:
	movq	%r8, 16(%rcx)
	jmp	.L236
	.p2align 4,,10
	.p2align 3
.L212:
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L210
.L229:
	leaq	root(%rip), %rdi
	call	delete
	jmp	.L210
.L237:
	leaq	16(%r15), %rdi
	call	delete
.L236:
	movq	16(%r15), %rcx
.L230:
	movq	%rcx, 16(%r15)
	jmp	.L210
.L289:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	je	.L217
	cmpl	(%rcx), %esi
	jl	.L293
	jle	.L224
	movq	16(%rcx), %r8
	testq	%r8, %r8
	je	.L225
	cmpl	(%r8), %esi
	jl	.L294
	jg	.L295
	leaq	16(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L227:
	movq	16(%rcx), %r8
.L225:
	movq	%r8, 16(%rcx)
	jmp	.L223
.L224:
	leaq	8(%r15), %rdi
	call	delete
.L223:
	movq	8(%r15), %rcx
.L217:
	movq	%rcx, 8(%r15)
	jmp	.L210
.L290:
	movq	8(%rcx), %r8
	testq	%r8, %r8
	je	.L232
	cmpl	(%r8), %esi
	jl	.L296
	jg	.L297
	leaq	8(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L234:
	movq	8(%rcx), %r8
.L232:
	movq	%r8, 8(%rcx)
	jmp	.L236
.L293:
	movq	8(%rcx), %r8
	testq	%r8, %r8
	je	.L219
	cmpl	(%r8), %esi
	jl	.L298
	jg	.L299
	leaq	8(%rcx), %rdi
	movq	%rcx, (%rsp)
	call	delete
	movq	(%rsp), %rcx
.L221:
	movq	8(%rcx), %r8
.L219:
	movq	%r8, 8(%rcx)
	jmp	.L223
.L297:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L234
.L295:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L227
.L292:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L240
.L299:
	leaq	16(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 16(%r8)
	jmp	.L221
.L291:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L240
.L298:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L221
.L296:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L234
.L294:
	leaq	8(%r8), %rdi
	movq	%rcx, 8(%rsp)
	movq	%r8, (%rsp)
	call	Delete
	movq	(%rsp), %r8
	movq	8(%rsp), %rcx
	movq	%rax, 8(%r8)
	jmp	.L227
.L288:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE39:
	.size	main, .-main
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.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>
struct tree {
  int key;
  int priority;
  struct tree *left;
  struct tree *right;
};
struct tree *root = NULL;
int Search(struct tree *p, int key);
struct tree *Lrotation(struct tree *p);
struct tree *Rrotation(struct tree *p);
struct tree *Insert(struct tree **p, int key, int priority);
struct tree *Delete(struct tree **p, int key);
struct tree *delete(struct tree **p, int key);
void Dispm(struct tree *p);
void Dispp(struct tree *p);
int main(void)
{
  int i, count, key, priority;
  char command[7];
  scanf("%d", &count);
  for (i = 0; i < count; i++) {
    scanf("%*c%s", command);
    switch (command[0]) {
    case 'f':
      scanf("%d", &key);
      if (Search(root, key)) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
      break;
    case 'i':
      scanf("%d %d", &key, &priority);
      root = Insert(&root, key, priority);
      break;
    case 'd':
      scanf("%d", &key);
      Delete(&root, key);
      break;
    case 'p':
      Dispm(root);
      putchar('\n');
      Dispp(root);
      putchar('\n');
      break;
    }
  }
  return 0;
}
int Search(struct tree *p, int key)
{
  if (p == NULL) {
    return 0;
  } else if (p->key == key) {
    return 1;
  } else if (p->key > key) {
    return Search(p->left, key);
  } else {
    return Search(p->right, key);
  }
}
struct tree *Lrotation(struct tree *p)
{
  struct tree *q = p->right;
  p->right = q->left;
  q->left = p;
  return q;
}
struct tree *Rrotation(struct tree *p)
{
  struct tree *q = p->left;
  p->left = q->right;
  q->right = p;
  return q;
}
struct tree *Insert(struct tree **p, int key, int priority)
{
  if (*p == NULL) {
    *p = (struct tree*)malloc(sizeof(struct tree));
    (*p)->key = key;
    (*p)->priority = priority;
    (*p)->left = NULL;
    (*p)->right = NULL;
  } else if ((*p)->key > key) {
    (*p)->left = Insert(&(*p)->left, key, priority);
    if ((*p)->priority <  (*p)->left->priority) *p = Rrotation(*p);
  } else if ((*p)->key < key) {
    (*p)->right = Insert(&(*p)->right, key, priority);
    if ((*p)->priority <  (*p)->right->priority) *p = Lrotation(*p);
  }
  return *p;
}
struct tree *Delete(struct tree **p, int key)
{
  if ((*p) == NULL) return NULL;
  if ((*p)->key > key) (*p)->left = Delete(&(*p)->left, key);
  else if ((*p)->key < key) (*p)->right = Delete(&(*p)->right, key);
  else delete(p, key);
  return *p;
}
struct tree *delete(struct tree **p, int key)
{
  if ((*p)->left == NULL && (*p)->right == NULL) return *p = NULL;
  else if ((*p)->left == NULL) *p = Lrotation(*p);
  else if ((*p)->right == NULL) *p = Rrotation(*p);
  else {
    if ((*p)->left->priority > (*p)->right->priority) *p = Rrotation(*p);
    else *p = Lrotation(*p);
  }
  return Delete(p, key);
}
void Dispm(struct tree *p)
{
  if (p != NULL) {
    Dispm(p->left);
    printf(" %d", p->key);
    Dispm(p->right);
  }
}
void Dispp(struct tree *p)
{
  if (p != NULL) {
    printf(" %d", p->key);
    Dispp(p->left);
    Dispp(p->right);
  }
}

16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 102 47
insert 21 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 99
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 86 47
insert 26 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 99
print
 16
insert 35 57
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 86 47
insert 26 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 148
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 86 47
insert 21 12
insert 7 10
insert 6 139
print
find 21
find 22
delete 35
delete 99
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 102 47
insert 21 12
insert 7 10
insert 6 90
print
find 30
find 22
delete 35
delete 99
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 141 47
insert 21 12
insert 7 10
insert 6 139
print
find 21
find 22
delete 35
delete 99
print
 16
insert 21 99
insert 3 80
insert 1 12
insert 14 25
insert 80 76
insert 42 3
insert 141 47
insert 21 6
insert 7 10
insert 6 139
print
find 21
find 22
delete 35
delete 99
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 86 47
insert 21 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 21
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 87 76
insert 42 3
insert 102 47
insert 21 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 99
print
 16
insert 35 99
insert 3 80
insert 1 53
insert 14 25
insert 80 76
insert 42 3
insert 58 47
insert 26 12
insert 7 10
insert 6 90
print
find 21
find 22
delete 35
delete 99
print

 1 3 6 7 14 21 35 42 80 102
 35 6 3 1 14 7 21 80 42 102
yes
no
 1 3 6 7 14 21 42 80 102
 6 3 1 80 14 7 21 42 102
  1 3 6 7 14 26 35 42 80 86
 35 6 3 1 14 7 26 80 42 86
no
no
 1 3 6 7 14 26 42 80 86
 6 3 1 80 14 7 26 42 86
  1 3 6 7 14 26 35 42 80 86
 6 3 1 80 35 14 7 26 42 86
no
no
 1 3 6 7 14 26 42 80 86
 6 3 1 80 14 7 26 42 86
  1 3 6 7 14 21 35 42 80 86
 6 3 1 35 14 7 21 80 42 86
yes
no
 1 3 6 7 14 21 42 80 86
 6 3 1 80 14 7 21 42 86
  1 3 6 7 14 21 35 42 80 102
 35 6 3 1 14 7 21 80 42 102
no
no
 1 3 6 7 14 21 42 80 102
 6 3 1 80 14 7 21 42 102
  1 3 6 7 14 21 35 42 80 141
 6 3 1 35 14 7 21 80 42 141
yes
no
 1 3 6 7 14 21 42 80 141
 6 3 1 80 14 7 21 42 141
  1 3 6 7 14 21 42 80 141
 6 3 1 21 14 7 80 42 141
yes
no
 1 3 6 7 14 21 42 80 141
 6 3 1 21 14 7 80 42 141
  1 3 6 7 14 21 35 42 80 86
 35 6 3 1 14 7 21 80 42 86
yes
no
 1 3 6 7 14 42 80 86
 6 3 1 80 14 7 42 86
  1 3 6 7 14 21 35 42 87 102
 35 6 3 1 14 7 21 87 42 102
yes
no
 1 3 6 7 14 21 42 87 102
 6 3 1 87 14 7 21 42 102
  1 3 6 7 14 26 35 42 58 80
 35 6 3 1 14 7 26 80 58 42
no
no
 1 3 6 7 14 26 42 58 80
 6 3 1 80 58 14 7 26 42

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 tree {
  int key;
  int priority;
  struct tree *left;
  struct tree *right;
};
struct tree *root = NULL;
int Search(struct tree *p, int key);
struct tree *Lrotation(struct tree *p);
struct tree *Rrotation(struct tree *p);
struct tree *Insert(struct tree **p, int key, int priority);
struct tree *Delete(struct tree **p, int key);
struct tree *delete(struct tree **p, int key);
void Dispm(struct tree *p);
void Dispp(struct tree *p);
int main(void)
{
  int i, count, key, priority;
  char command[7];
  scanf("%d", &count);
  for (i = 0; i < count; i++) {
    scanf("%*c%s", command);
    switch (command[0]) {
    case 'f':
      scanf("%d", &key);
      if (Search(root, key)) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
      break;
    case 'i':
      scanf("%d %d", &key, &priority);
      root = Insert(&root, key, priority);
      break;
    case 'd':
      scanf("%d", &key);
      Delete(&root, key);
      break;
    case 'p':
      Dispm(root);
      putchar('\n');
      Dispp(root);
      putchar('\n');
      break;
    }
  }
  return 0;
}
int Search(struct tree *p, int key)
{
  if (p == NULL) {
    return 0;
  } else if (p->key == key) {
    return 1;
  } else if (p->key > key) {
    return Search(p->left, key);
  } else {
    return Search(p->right, key);
  }
}
struct tree *Lrotation(struct tree *p)
{
  struct tree *q = p->right;
  p->right = q->left;
  q->left = p;
  return q;
}
struct tree *Rrotation(struct tree *p)
{
  struct tree *q = p->left;
  p->left = q->right;
  q->right = p;
  return q;
}
struct tree *Insert(struct tree **p, int key, int priority)
{
  if (*p == NULL) {
    *p = (struct tree*)malloc(sizeof(struct tree));
    (*p)->key = key;
    (*p)->priority = priority;
    (*p)->left = NULL;
    (*p)->right = NULL;
  } else if ((*p)->key > key) {
    (*p)->left = Insert(&(*p)->left, key, priority);
    if ((*p)->priority <  (*p)->left->priority) *p = Rrotation(*p);
  } else if ((*p)->key < key) {
    (*p)->right = Insert(&(*p)->right, key, priority);
    if ((*p)->priority <  (*p)->right->priority) *p = Lrotation(*p);
  }
  return *p;
}
struct tree *Delete(struct tree **p, int key)
{
  if ((*p) == NULL) return NULL;
  if ((*p)->key > key) (*p)->left = Delete(&(*p)->left, key);
  else if ((*p)->key < key) (*p)->right = Delete(&(*p)->right, key);
  else delete(p, key);
  return *p;
}
struct tree *delete(struct tree **p, int key)
{
  if ((*p)->left == NULL && (*p)->right == NULL) return *p = NULL;
  else if ((*p)->left == NULL) *p = Lrotation(*p);
  else if ((*p)->right == NULL) *p = Rrotation(*p);
  else {
    if ((*p)->left->priority > (*p)->right->priority) *p = Rrotation(*p);
    else *p = Lrotation(*p);
  }
  return Delete(p, key);
}
void Dispm(struct tree *p)
{
  if (p != NULL) {
    Dispm(p->left);
    printf(" %d", p->key);
    Dispm(p->right);
  }
}
void Dispp(struct tree *p)
{
  if (p != NULL) {
    printf(" %d", p->key);
    Dispp(p->left);
    Dispp(p->right);
  }
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%*c%s"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
.LC4:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L9:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	movsbl	%al, %eax
	cmpl	$112, %eax
	je	.L3
	cmpl	$112, %eax
	jg	.L4
	cmpl	$105, %eax
	je	.L5
	cmpl	$105, %eax
	jg	.L4
	cmpl	$100, %eax
	je	.L6
	cmpl	$102, %eax
	jne	.L4
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	testl	%eax, %eax
	je	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Insert
	movq	%rax, root(%rip)
	jmp	.L4
.L6:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Delete
	jmp	.L4
.L3:
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispm
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispp
	movl	$10, %edi
	call	putchar@PLT
	nop
.L4:
	addl	$1, -20(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Search
	.type	Search, @function
Search:
.LFB7:
	.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)
	movl	%esi, -12(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L16
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	jmp	.L14
.L16:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Search, .-Search
	.globl	Lrotation
	.type	Lrotation, @function
Lrotation:
.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, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Lrotation, .-Lrotation
	.globl	Rrotation
	.type	Rrotation, @function
Rrotation:
.LFB9:
	.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)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Rrotation, .-Rrotation
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L22
	movl	$24, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-32(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 16(%rax)
	jmp	.L23
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 8(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L23
.L24:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 16(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
.L23:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Insert, .-Insert
	.globl	Delete
	.type	Delete, @function
Delete:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L29
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 8(%rbx)
	jmp	.L30
.L29:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L31
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 16(%rbx)
	jmp	.L30
.L31:
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	delete
.L30:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
.L28:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Delete, .-Delete
	.globl	delete
	.type	delete, @function
delete:
.LFB12:
	.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)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	$0, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L35
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L35:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L37
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L37:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L38
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L38:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
.L36:
	movl	-12(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Delete
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	delete, .-delete
	.section	.rodata
.LC5:
	.string	" %d"
	.text
	.globl	Dispm
	.type	Dispm, @function
Dispm:
.LFB13:
	.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	.L41
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
.L41:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	Dispm, .-Dispm
	.globl	Dispp
	.type	Dispp, @function
Dispp:
.LFB14:
	.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	.L44
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
.L44:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	Dispp, .-Dispp
	.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	root
	.bss
	.align 8
	.type	root, @object
	.size	root, 8
root:
	.zero	8
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%*c%s"
.LC2:
	.string	"yes"
.LC3:
	.string	"no"
.LC4:
	.string	"%d %d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -20(%rbp)
	jmp	.L2
.L9:
	leaq	-15(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-15(%rbp), %eax
	movsbl	%al, %eax
	cmpl	$112, %eax
	je	.L3
	cmpl	$112, %eax
	jg	.L4
	cmpl	$105, %eax
	je	.L5
	cmpl	$105, %eax
	jg	.L4
	cmpl	$100, %eax
	je	.L6
	cmpl	$102, %eax
	jne	.L4
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %edx
	movq	root(%rip), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	testl	%eax, %eax
	je	.L7
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L7:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L4
.L5:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-24(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Insert
	movq	%rax, root(%rip)
	jmp	.L4
.L6:
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	leaq	root(%rip), %rax
	movq	%rax, %rdi
	call	Delete
	jmp	.L4
.L3:
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispm
	movl	$10, %edi
	call	putchar@PLT
	movq	root(%rip), %rax
	movq	%rax, %rdi
	call	Dispp
	movl	$10, %edi
	call	putchar@PLT
	nop
.L4:
	addl	$1, -20(%rbp)
.L2:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Search
	.type	Search, @function
Search:
.LFB7:
	.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)
	movl	%esi, -12(%rbp)
	cmpq	$0, -8(%rbp)
	jne	.L13
	movl	$0, %eax
	jmp	.L14
.L13:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jne	.L15
	movl	$1, %eax
	jmp	.L14
.L15:
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	cmpl	%eax, -12(%rbp)
	jge	.L16
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
	jmp	.L14
.L16:
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movl	-12(%rbp), %edx
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Search
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Search, .-Search
	.globl	Lrotation
	.type	Lrotation, @function
Lrotation:
.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, -24(%rbp)
	movq	-24(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Lrotation, .-Lrotation
	.globl	Rrotation
	.type	Rrotation, @function
Rrotation:
.LFB9:
	.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)
	movq	-24(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, 8(%rax)
	movq	-8(%rbp), %rax
	movq	-24(%rbp), %rdx
	movq	%rdx, 16(%rax)
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Rrotation, .-Rrotation
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L22
	movl	$24, %edi
	call	malloc@PLT
	movq	%rax, %rdx
	movq	-24(%rbp), %rax
	movq	%rdx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-28(%rbp), %edx
	movl	%edx, (%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	-32(%rbp), %edx
	movl	%edx, 4(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 8(%rax)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	$0, 16(%rax)
	jmp	.L23
.L22:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L24
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 8(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L23
.L24:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rcx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rcx, %rdi
	call	Insert
	movq	%rax, 16(%rbx)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edx
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jge	.L23
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-24(%rbp), %rdx
	movq	%rax, (%rdx)
.L23:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Insert, .-Insert
	.globl	Delete
	.type	Delete, @function
Delete:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jne	.L27
	movl	$0, %eax
	jmp	.L28
.L27:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jge	.L29
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	8(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 8(%rbx)
	jmp	.L30
.L29:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jle	.L31
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
	leaq	16(%rax), %rdx
	movq	-24(%rbp), %rax
	movq	(%rax), %rbx
	movl	-28(%rbp), %eax
	movl	%eax, %esi
	movq	%rdx, %rdi
	call	Delete
	movq	%rax, 16(%rbx)
	jmp	.L30
.L31:
	movl	-28(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	delete
.L30:
	movq	-24(%rbp), %rax
	movq	(%rax), %rax
.L28:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Delete, .-Delete
	.globl	delete
	.type	delete, @function
delete:
.LFB12:
	.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)
	movl	%esi, -12(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L33
	movq	-8(%rbp), %rax
	movq	$0, (%rax)
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	jmp	.L34
.L33:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	.L35
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L35:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	.L37
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L37:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edx
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %eax
	cmpl	%eax, %edx
	jle	.L38
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Rrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
	jmp	.L36
.L38:
	movq	-8(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	Lrotation
	movq	-8(%rbp), %rdx
	movq	%rax, (%rdx)
.L36:
	movl	-12(%rbp), %edx
	movq	-8(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Delete
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	delete, .-delete
	.section	.rodata
.LC5:
	.string	" %d"
	.text
	.globl	Dispm
	.type	Dispm, @function
Dispm:
.LFB13:
	.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	.L41
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispm
.L41:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	Dispm, .-Dispm
	.globl	Dispp
	.type	Dispp, @function
Dispp:
.LFB14:
	.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	.L44
	movq	-8(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movq	-8(%rbp), %rax
	movq	8(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
	movq	-8(%rbp), %rax
	movq	16(%rax), %rax
	movq	%rax, %rdi
	call	Dispp
.L44:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	Dispp, .-Dispp
	.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:
