	.file	"22013733.c"
	.intel_syntax noprefix
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -16[rbp], 1
	jmp	.L2
.L3:
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Insert
	mov	QWORD PTR -8[rbp], rax
	add	DWORD PTR -16[rbp], 1
.L2:
	cmp	DWORD PTR -16[rbp], 15
	jle	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Preorder
	mov	edi, 10
	call	putchar@PLT
	mov	DWORD PTR -12[rbp], 15
	jmp	.L4
.L5:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	RemoveNode
	mov	QWORD PTR -8[rbp], rax
	sub	DWORD PTR -12[rbp], 1
.L4:
	cmp	DWORD PTR -12[rbp], 7
	jg	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Preorder
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	CreateNode
	.type	CreateNode, @function
CreateNode:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	CreateNode, .-CreateNode
	.section	.rodata
	.align 8
.LC0:
	.string	"Duplicate values are not allowed!"
	.text
	.globl	Insert
	.type	Insert, @function
Insert:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 8386093285582599492
	movabs	rdx, 8315181395361538149
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 8390045716234527008
	movabs	rdx, 7234319696884687136
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	WORD PTR -16[rbp], 33
	cmp	QWORD PTR -56[rbp], 0
	jne	.L10
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	CreateNode
	mov	QWORD PTR -56[rbp], rax
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L12
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -60[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Insert
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L13
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -60[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Insert
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L11
.L13:
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L19
.L11:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	CheckBalance
	cmp	eax, 1
	jle	.L15
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L15
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	RightRotate
	jmp	.L19
.L15:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	CheckBalance
	cmp	eax, -1
	jge	.L16
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L16
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	LeftRotate
	jmp	.L19
.L16:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	CheckBalance
	cmp	eax, 1
	jle	.L17
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L17
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	LeftRight
	jmp	.L19
.L17:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	CheckBalance
	cmp	eax, -1
	jge	.L18
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L18
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	RightLeft
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -56[rbp]
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Insert, .-Insert
	.globl	CheckBalance
	.type	CheckBalance, @function
CheckBalance:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	Height
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	Height
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	CheckBalance, .-CheckBalance
	.globl	Height
	.type	Height, @function
Height:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L24
	mov	eax, 0
	jmp	.L25
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	Height
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	Height
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jle	.L26
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 1
	jmp	.L25
.L26:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Height, .-Height
	.globl	LeftRotate
	.type	LeftRotate, @function
LeftRotate:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	LeftRotate, .-LeftRotate
	.globl	RightRotate
	.type	RightRotate, @function
RightRotate:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	RightRotate, .-RightRotate
	.globl	LeftRight
	.type	LeftRight, @function
LeftRight:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	LeftRotate
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	RightRotate
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	LeftRight, .-LeftRight
	.globl	RightLeft
	.type	RightLeft, @function
RightLeft:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	RightRotate
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	LeftRotate
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	RightLeft, .-RightLeft
	.section	.rodata
.LC1:
	.string	"The tree is empty!"
	.text
	.globl	RemoveNode
	.type	RemoveNode, @function
RemoveNode:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	cmp	QWORD PTR -40[rbp], 0
	jne	.L37
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	jmp	.L38
.L37:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L39
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -44[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	RemoveNode
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L40
.L39:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L41
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -44[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	RemoveNode
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L40
.L41:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L42
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L42
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -40[rbp], 0
	jmp	.L40
.L42:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L43
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L40
.L43:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L44
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L40
.L44:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	MinNode
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	esi, edx
	mov	rdi, rax
	call	RemoveNode
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx], rax
.L40:
	mov	rax, QWORD PTR -40[rbp]
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	RemoveNode, .-RemoveNode
	.globl	MinNode
	.type	MinNode, @function
MinNode:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L46
.L47:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L46:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L47
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	MinNode, .-MinNode
	.globl	MaxNode
	.type	MaxNode, @function
MaxNode:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L50
.L51:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L50:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L51
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	MaxNode, .-MaxNode
	.section	.rodata
	.align 8
.LC2:
	.string	"The value is not present in the Tree!"
	.text
	.globl	Search
	.type	Search, @function
Search:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 8461244959899871316
	movabs	rdx, 8390045716468801637
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	movabs	rax, 8389754702135455776
	movabs	rdx, 2334386829831072032
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	DWORD PTR -16[rbp], 1701147220
	mov	WORD PTR -12[rbp], 33
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jne	.L54
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L59
.L54:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L56
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L56
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -60[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Search
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L57
.L56:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L58
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L58
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -60[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	Search
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L57
.L58:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L59
.L57:
	mov	rax, QWORD PTR -56[rbp]
.L59:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L60
	call	__stack_chk_fail@PLT
.L60:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	Search, .-Search
	.section	.rodata
.LC3:
	.string	"%d "
	.text
	.globl	Preorder
	.type	Preorder, @function
Preorder:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L64
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	Preorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	Preorder
	jmp	.L61
.L64:
	nop
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	Preorder, .-Preorder
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"22013733.c"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	Insert
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #15
	ble	.L3
	ldr	r0, [fp, #-16]
	bl	Preorder
	mov	r0, #10
	bl	putchar
	mov	r3, #15
	str	r3, [fp, #-8]
	b	.L4
.L5:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	RemoveNode
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	bgt	.L5
	ldr	r0, [fp, #-16]
	bl	Preorder
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.align	2
	.global	CreateNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	CreateNode, %function
CreateNode:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	CreateNode, .-CreateNode
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Duplicate values are not allowed!\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	Insert, %function
Insert:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L21+4
	sub	ip, fp, #44
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	strh	r3, [ip]	@ movhi
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L10
	ldr	r0, [fp, #-52]
	bl	CreateNode
	str	r0, [fp, #-48]
	b	.L11
.L10:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bge	.L12
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	Insert
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #4]
	b	.L11
.L12:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	ble	.L13
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-52]
	mov	r0, r3
	bl	Insert
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r2, [r3, #8]
	b	.L11
.L13:
	ldr	r0, .L21+4
	bl	printf
	ldr	r3, [fp, #-48]
	b	.L19
.L11:
	ldr	r0, [fp, #-48]
	bl	CheckBalance
	mov	r3, r0
	cmp	r3, #1
	ble	.L15
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bge	.L15
	ldr	r0, [fp, #-48]
	bl	RightRotate
	mov	r3, r0
	b	.L19
.L15:
	ldr	r0, [fp, #-48]
	bl	CheckBalance
	mov	r3, r0
	cmn	r3, #1
	bge	.L16
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	ble	.L16
	ldr	r0, [fp, #-48]
	bl	LeftRotate
	mov	r3, r0
	b	.L19
.L16:
	ldr	r0, [fp, #-48]
	bl	CheckBalance
	mov	r3, r0
	cmp	r3, #1
	ble	.L17
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	ble	.L17
	ldr	r0, [fp, #-48]
	bl	LeftRight
	mov	r3, r0
	b	.L19
.L17:
	ldr	r0, [fp, #-48]
	bl	CheckBalance
	mov	r3, r0
	cmn	r3, #1
	bge	.L18
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bge	.L18
	ldr	r0, [fp, #-48]
	bl	RightLeft
	mov	r3, r0
	b	.L19
.L18:
	ldr	r3, [fp, #-48]
.L19:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC1
	.word	.LC0
	.size	Insert, .-Insert
	.align	2
	.global	CheckBalance
	.syntax unified
	.arm
	.fpu softvfp
	.type	CheckBalance, %function
CheckBalance:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	Height
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	Height
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	CheckBalance, .-CheckBalance
	.align	2
	.global	Height
	.syntax unified
	.arm
	.fpu softvfp
	.type	Height, %function
Height:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	b	.L27
.L26:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	Height
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	Height
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	ble	.L28
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	b	.L27
.L28:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
.L27:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Height, .-Height
	.align	2
	.global	LeftRotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	LeftRotate, %function
LeftRotate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	LeftRotate, .-LeftRotate
	.align	2
	.global	RightRotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	RightRotate, %function
RightRotate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	RightRotate, .-RightRotate
	.align	2
	.global	LeftRight
	.syntax unified
	.arm
	.fpu softvfp
	.type	LeftRight, %function
LeftRight:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	LeftRotate
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-8]
	bl	RightRotate
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	LeftRight, .-LeftRight
	.align	2
	.global	RightLeft
	.syntax unified
	.arm
	.fpu softvfp
	.type	RightLeft, %function
RightLeft:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	RightRotate
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-8]
	bl	LeftRotate
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	RightLeft, .-RightLeft
	.section	.rodata
	.align	2
.LC2:
	.ascii	"The tree is empty!\000"
	.text
	.align	2
	.global	RemoveNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	RemoveNode, %function
RemoveNode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L39
	ldr	r0, .L47
	bl	printf
	ldr	r3, [fp, #-24]
	b	.L40
.L39:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L41
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	RemoveNode
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	b	.L42
.L41:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L43
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	RemoveNode
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	b	.L42
.L43:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L44
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L44
	ldr	r0, [fp, #-24]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L42
.L44:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-8]
	bl	free
	b	.L42
.L45:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L46
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	free
	b	.L42
.L46:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	MinNode
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	RemoveNode
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
.L42:
	ldr	r3, [fp, #-24]
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC2
	.size	RemoveNode, .-RemoveNode
	.align	2
	.global	MinNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	MinNode, %function
MinNode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	b	.L50
.L51:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L50:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	MinNode, .-MinNode
	.align	2
	.global	MaxNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	MaxNode, %function
MaxNode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	b	.L54
.L55:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L55
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	MaxNode, .-MaxNode
	.section	.rodata
	.align	2
.LC3:
	.ascii	"The value is not present in the Tree!\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Search
	.syntax unified
	.arm
	.fpu softvfp
	.type	Search, %function
Search:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L65+4
	sub	ip, fp, #48
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	str	r0, [ip]
	add	ip, ip, #4
	strh	r1, [ip]	@ movhi
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	bne	.L58
	ldr	r3, [fp, #-56]
	b	.L63
.L58:
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	bge	.L60
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L60
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-60]
	mov	r0, r3
	bl	Search
	mov	r2, r0
	ldr	r3, [fp, #-56]
	str	r2, [r3, #4]
	b	.L61
.L60:
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	ble	.L62
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L62
	ldr	r3, [fp, #-56]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-60]
	mov	r0, r3
	bl	Search
	mov	r2, r0
	ldr	r3, [fp, #-56]
	str	r2, [r3, #8]
	b	.L61
.L62:
	ldr	r0, .L65+4
	bl	printf
	ldr	r3, [fp, #-56]
	b	.L63
.L61:
	ldr	r3, [fp, #-56]
.L63:
	ldr	r2, .L65
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L64
	bl	__stack_chk_fail
.L64:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC4
	.word	.LC3
	.size	Search, .-Search
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d \000"
	.text
	.align	2
	.global	Preorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	Preorder, %function
Preorder:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L70
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L71
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	Preorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	Preorder
	b	.L67
.L70:
	nop
.L67:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L72:
	.align	2
.L71:
	.word	.LC5
	.size	Preorder, .-Preorder
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
