	.file	"92851.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"cls"
.LC1:
	.string	"1. Insert node"
.LC2:
	.string	"2. Traverse in pre-order"
.LC3:
	.string	"3. Traverse in in-order"
.LC4:
	.string	"4. Traverse in post-order"
.LC5:
	.string	"5. Delete node"
.LC6:
	.string	"6. Search node"
.LC7:
	.string	"7. Find maximum"
.LC8:
	.string	"8. Find minimum"
.LC9:
	.string	"9. Exit"
.LC10:
	.string	"Enter your choice: "
.LC11:
	.string	"%d"
.LC12:
	.string	"Enter node to add: "
.LC13:
	.string	"Tree is empty.\n"
.LC14:
	.string	"Nodes in pre-order:"
.LC15:
	.string	"\b\b.\n"
.LC16:
	.string	"Nodes in in-order:"
.LC17:
	.string	"Nodes in post-order:"
.LC18:
	.string	"Enter node to delete: "
.LC19:
	.string	"Enter node to search: "
.LC20:
	.string	"Minimum = %d\n\n"
	.align 8
.LC21:
	.string	"Tree deleted. Program terminated.\n"
.LC22:
	.string	"Wrong choice.\n"
.LC23:
	.string	"pause"
	.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -24[rbp], 0
.L28:
	lea	rdi, .LC0[rip]
	call	system@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 9
	ja	.L2
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L4[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L4[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L2-.L4
	.long	.L12-.L4
	.long	.L11-.L4
	.long	.L10-.L4
	.long	.L9-.L4
	.long	.L8-.L4
	.long	.L7-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
.L12:
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert_node
	mov	QWORD PTR -24[rbp], rax
	jmp	.L13
.L11:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L14
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L14:
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	pre_order
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L13
.L10:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L16
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L16:
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	in_order
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L13
.L9:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L18
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L18:
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	post_order
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L13
.L8:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L20
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L20:
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	delete_node
	mov	QWORD PTR -24[rbp], rax
	jmp	.L13
.L7:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L22
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L22:
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search
	jmp	.L13
.L6:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L24
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	find_max
	mov	QWORD PTR -24[rbp], rax
	jmp	.L13
.L5:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L26
	lea	rdi, .LC13[rip]
	call	puts@PLT
	jmp	.L13
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	find_min
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L13
.L3:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	delete_tree
	lea	rdi, .LC21[rip]
	call	puts@PLT
	jmp	.L13
.L2:
	lea	rdi, .LC22[rip]
	call	puts@PLT
	nop
.L13:
	lea	rdi, .LC23[rip]
	call	system@PLT
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, 9
	jne	.L28
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC24:
	.string	"\nNode added.\n"
.LC25:
	.string	"\nNode already exist.\n"
	.text
	.globl	insert_node
	.type	insert_node, @function
insert_node:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L32
	mov	esi, 24
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L33
.L32:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L34
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L33
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L35
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L33
.L35:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L33
	lea	rdi, .LC25[rip]
	call	puts@PLT
.L33:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	insert_node, .-insert_node
	.section	.rodata
.LC26:
	.string	"%d, "
	.text
	.globl	pre_order
	.type	pre_order, @function
pre_order:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L39
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	pre_order
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	pre_order
.L39:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pre_order, .-pre_order
	.globl	in_order
	.type	in_order, @function
in_order:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L42
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	in_order
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	in_order
.L42:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	in_order, .-in_order
	.globl	post_order
	.type	post_order, @function
post_order:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L45
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	post_order
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	post_order
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
.L45:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	post_order, .-post_order
	.section	.rodata
.LC27:
	.string	"\nNode not found.\n"
.LC28:
	.string	"\nNode deleted.\n"
	.text
	.globl	delete_node
	.type	delete_node, @function
delete_node:
.LFB11:
	.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	DWORD PTR -28[rbp], esi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L47
	lea	rdi, .LC27[rip]
	call	puts@PLT
	jmp	.L48
.L47:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -28[rbp], eax
	jge	.L49
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	delete_node
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rdx], rax
	jmp	.L48
.L49:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L50
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	delete_node
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L48
.L50:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L51
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L51
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	find_min
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	esi, edx
	mov	rdi, rax
	call	delete_node
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L48
.L51:
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L52
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L53
.L52:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L53
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -24[rbp], rax
.L53:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC28[rip]
	call	puts@PLT
.L48:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	delete_node, .-delete_node
	.section	.rodata
.LC29:
	.string	"\n%d not found.\n\n"
.LC30:
	.string	"\n%d found.\n\n"
	.text
	.globl	search
	.type	search, @function
search:
.LFB12:
	.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
	mov	DWORD PTR -12[rbp], esi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L56
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L60
.L56:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L58
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L60
.L58:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L59
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search
	jmp	.L60
.L59:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L60
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	search
.L60:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	search, .-search
	.section	.rodata
.LC31:
	.string	"Maximum = %d\n\n"
	.text
	.globl	find_max
	.type	find_max, @function
find_max:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L62
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L63
.L62:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	find_max
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
.L63:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	find_max, .-find_max
	.globl	find_min
	.type	find_min, @function
find_min:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L66
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L67
.L66:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	find_min
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	find_min, .-find_min
	.globl	delete_tree
	.type	delete_tree, @function
delete_tree:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	je	.L70
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	delete_tree
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	delete_tree
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L70:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	delete_tree, .-delete_tree
	.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	"92851.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"cls\000"
	.align	2
.LC1:
	.ascii	"1. Insert node\000"
	.align	2
.LC2:
	.ascii	"2. Traverse in pre-order\000"
	.align	2
.LC3:
	.ascii	"3. Traverse in in-order\000"
	.align	2
.LC4:
	.ascii	"4. Traverse in post-order\000"
	.align	2
.LC5:
	.ascii	"5. Delete node\000"
	.align	2
.LC6:
	.ascii	"6. Search node\000"
	.align	2
.LC7:
	.ascii	"7. Find maximum\000"
	.align	2
.LC8:
	.ascii	"8. Find minimum\000"
	.align	2
.LC9:
	.ascii	"9. Exit\000"
	.align	2
.LC10:
	.ascii	"Enter your choice: \000"
	.align	2
.LC11:
	.ascii	"%d\000"
	.align	2
.LC12:
	.ascii	"Enter node to add: \000"
	.align	2
.LC13:
	.ascii	"Tree is empty.\012\000"
	.align	2
.LC14:
	.ascii	"Nodes in pre-order:\000"
	.align	2
.LC15:
	.ascii	"\010\010.\012\000"
	.align	2
.LC16:
	.ascii	"Nodes in in-order:\000"
	.align	2
.LC17:
	.ascii	"Nodes in post-order:\000"
	.align	2
.LC18:
	.ascii	"Enter node to delete: \000"
	.align	2
.LC19:
	.ascii	"Enter node to search: \000"
	.align	2
.LC20:
	.ascii	"Minimum = %d\012\012\000"
	.align	2
.LC21:
	.ascii	"Tree deleted. Program terminated.\012\000"
	.align	2
.LC22:
	.ascii	"Wrong choice.\012\000"
	.align	2
.LC23:
	.ascii	"pause\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
.L28:
	ldr	r0, .L31+4
	bl	system
	ldr	r0, .L31+8
	bl	puts
	ldr	r0, .L31+12
	bl	puts
	ldr	r0, .L31+16
	bl	puts
	ldr	r0, .L31+20
	bl	puts
	ldr	r0, .L31+24
	bl	puts
	ldr	r0, .L31+28
	bl	puts
	ldr	r0, .L31+32
	bl	puts
	ldr	r0, .L31+36
	bl	puts
	ldr	r0, .L31+40
	bl	puts
	ldr	r0, .L31+44
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L31+48
	bl	__isoc99_scanf
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	cmp	r3, #8
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L5
	.word	.L3
.L12:
	ldr	r0, .L31+52
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L31+48
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	insert_node
	str	r0, [fp, #-16]
	b	.L13
.L11:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L14
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L14:
	ldr	r0, .L31+60
	bl	puts
	ldr	r0, [fp, #-16]
	bl	pre_order
	ldr	r0, .L31+64
	bl	puts
	b	.L13
.L10:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L16:
	ldr	r0, .L31+68
	bl	puts
	ldr	r0, [fp, #-16]
	bl	in_order
	ldr	r0, .L31+64
	bl	puts
	b	.L13
.L9:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L18:
	ldr	r0, .L31+72
	bl	puts
	ldr	r0, [fp, #-16]
	bl	post_order
	ldr	r0, .L31+64
	bl	puts
	b	.L13
.L8:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L20
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L20:
	ldr	r0, .L31+76
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L31+48
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	delete_node
	str	r0, [fp, #-16]
	b	.L13
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L22
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L22:
	ldr	r0, .L31+80
	bl	printf
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L31+48
	bl	__isoc99_scanf
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	search
	b	.L13
.L6:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L24:
	ldr	r0, [fp, #-16]
	bl	find_max
	str	r0, [fp, #-16]
	b	.L13
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L26
	ldr	r0, .L31+56
	bl	puts
	b	.L13
.L26:
	ldr	r0, [fp, #-16]
	bl	find_min
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L31+84
	bl	printf
	b	.L13
.L3:
	ldr	r0, [fp, #-16]
	bl	delete_tree
	ldr	r0, .L31+88
	bl	puts
	b	.L13
.L2:
	ldr	r0, .L31+92
	bl	puts
	nop
.L13:
	ldr	r0, .L31+96
	bl	system
	ldr	r3, [fp, #-20]
	cmp	r3, #9
	bne	.L28
	mov	r3, #0
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC24
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.size	main, .-main
	.section	.rodata
	.align	2
.LC25:
	.ascii	"\012Node added.\012\000"
	.align	2
.LC26:
	.ascii	"\012Node already exist.\012\000"
	.text
	.align	2
	.global	insert_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert_node, %function
insert_node:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L34
	mov	r1, #12
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r0, .L39
	bl	puts
	b	.L35
.L34:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L36
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	insert_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L35
.L36:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L37
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	insert_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	b	.L35
.L37:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L35
	ldr	r0, .L39+4
	bl	puts
.L35:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC25
	.word	.LC26
	.size	insert_node, .-insert_node
	.section	.rodata
	.align	2
.LC27:
	.ascii	"%d, \000"
	.text
	.align	2
	.global	pre_order
	.syntax unified
	.arm
	.fpu softvfp
	.type	pre_order, %function
pre_order:
	@ 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	.L43
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L44
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	pre_order
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	pre_order
.L43:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC27
	.size	pre_order, .-pre_order
	.align	2
	.global	in_order
	.syntax unified
	.arm
	.fpu softvfp
	.type	in_order, %function
in_order:
	@ 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	.L48
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	in_order
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L49
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	in_order
.L48:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC27
	.size	in_order, .-in_order
	.align	2
	.global	post_order
	.syntax unified
	.arm
	.fpu softvfp
	.type	post_order, %function
post_order:
	@ 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	.L53
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	post_order
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	post_order
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L54
	bl	printf
.L53:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC27
	.size	post_order, .-post_order
	.section	.rodata
	.align	2
.LC28:
	.ascii	"\012Node not found.\012\000"
	.align	2
.LC29:
	.ascii	"\012Node deleted.\012\000"
	.text
	.align	2
	.global	delete_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_node, %function
delete_node:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L57
	ldr	r0, .L65
	bl	puts
	b	.L58
.L57:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bge	.L59
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	delete_node
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	b	.L58
.L59:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	ble	.L60
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	delete_node
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	b	.L58
.L60:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L61
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L61
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	find_min
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r1, r3
	mov	r0, r2
	bl	delete_node
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #8]
	b	.L58
.L61:
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L62
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	b	.L63
.L62:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L63
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L63:
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r0, .L65+4
	bl	puts
.L58:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC28
	.word	.LC29
	.size	delete_node, .-delete_node
	.section	.rodata
	.align	2
.LC30:
	.ascii	"\012%d not found.\012\012\000"
	.align	2
.LC31:
	.ascii	"\012%d found.\012\012\000"
	.text
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L68
	ldr	r1, [fp, #-12]
	ldr	r0, .L73
	bl	printf
	b	.L72
.L68:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L70
	ldr	r1, [fp, #-12]
	ldr	r0, .L73+4
	bl	printf
	b	.L72
.L70:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L71
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	search
	b	.L72
.L71:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L72
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	search
.L72:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	.LC30
	.word	.LC31
	.size	search, .-search
	.section	.rodata
	.align	2
.LC32:
	.ascii	"Maximum = %d\012\012\000"
	.text
	.align	2
	.global	find_max
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_max, %function
find_max:
	@ 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]
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L79
	bl	printf
	b	.L77
.L76:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	find_max
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
.L77:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC32
	.size	find_max, .-find_max
	.align	2
	.global	find_min
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_min, %function
find_min:
	@ 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]
	cmp	r3, #0
	bne	.L82
	ldr	r3, [fp, #-8]
	b	.L83
.L82:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	find_min
	mov	r3, r0
.L83:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	find_min, .-find_min
	.align	2
	.global	delete_tree
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_tree, %function
delete_tree:
	@ 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	.L86
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	delete_tree
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	delete_tree
	ldr	r0, [fp, #-8]
	bl	free
.L86:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	delete_tree, .-delete_tree
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
