	.file	"159977.c"
	.intel_syntax noprefix
	.text
	.globl	newnode
	.type	newnode, @function
newnode:
.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	DWORD PTR -20[rbp], edi
	mov	edi, 32
	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]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	newnode, .-newnode
	.globl	searchnode
	.type	searchnode, @function
searchnode:
.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
	je	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L5
.L4:
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jle	.L7
	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	searchnode
	jmp	.L3
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L8
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	searchnode
	jmp	.L3
.L8:
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	searchnode, .-searchnode
	.globl	successor
	.type	successor, @function
successor:
.LFB8:
	.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
.L11:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L12
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	jmp	.L13
.L10:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L14
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
.L14:
	cmp	QWORD PTR -8[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	QWORD PTR -32[rbp], rax
	je	.L16
.L15:
	mov	rax, QWORD PTR -8[rbp]
.L13:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	successor, .-successor
	.globl	predecessor
	.type	predecessor, @function
predecessor:
.LFB9:
	.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	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
.L19:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L20
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	jmp	.L21
.L18:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L22
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
.L22:
	cmp	QWORD PTR -8[rbp], 0
	je	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	QWORD PTR -32[rbp], rax
	je	.L24
.L23:
	mov	rax, QWORD PTR -8[rbp]
.L21:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	predecessor, .-predecessor
	.section	.rodata
.LC0:
	.string	"%d inserted\n"
	.text
	.globl	insert
	.type	insert, @function
insert:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	cmp	QWORD PTR -32[rbp], 0
	jne	.L26
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	newnode
	jmp	.L27
.L26:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jge	.L28
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 24[rax], rdx
	jmp	.L29
.L28:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -36[rbp], eax
	jle	.L29
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 24[rax], rdx
.L29:
	mov	rax, QWORD PTR -32[rbp]
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	insert, .-insert
	.section	.rodata
.LC1:
	.string	"%d\n"
	.text
	.globl	min_bst
	.type	min_bst, @function
min_bst:
.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	QWORD PTR -32[rbp], rsi
	cmp	QWORD PTR -32[rbp], 0
	jne	.L31
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L30
.L31:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L33
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L33:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L34
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	min_bst, .-min_bst
	.globl	max_bst
	.type	max_bst, @function
max_bst:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	cmp	QWORD PTR -32[rbp], 0
	jne	.L36
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L35
.L36:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L38:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L39
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	max_bst, .-max_bst
	.globl	search
	.type	search, @function
search:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	cmp	QWORD PTR -16[rbp], 0
	jne	.L41
	mov	eax, 0
	jmp	.L42
.L41:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L43
	mov	eax, 1
	jmp	.L42
.L43:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L44
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	search
	jmp	.L42
.L44:
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	search
.L42:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	search, .-search
	.section	.rodata
.LC2:
	.string	"%d "
	.text
	.globl	preorder_traversal
	.type	preorder_traversal, @function
preorder_traversal:
.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	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -16[rbp], 0
	je	.L48
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	preorder_traversal
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	preorder_traversal
	jmp	.L45
.L48:
	nop
.L45:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	preorder_traversal, .-preorder_traversal
	.globl	inorder_traversal
	.type	inorder_traversal, @function
inorder_traversal:
.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
	mov	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -16[rbp], 0
	je	.L52
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inorder_traversal
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inorder_traversal
	jmp	.L49
.L52:
	nop
.L49:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	inorder_traversal, .-inorder_traversal
	.globl	postorder_traversal
	.type	postorder_traversal, @function
postorder_traversal:
.LFB16:
	.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	QWORD PTR -16[rbp], rsi
	cmp	QWORD PTR -16[rbp], 0
	je	.L56
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	postorder_traversal
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	postorder_traversal
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L53
.L56:
	nop
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	postorder_traversal, .-postorder_traversal
	.section	.rodata
.LC3:
	.string	"r"
	.align 8
.LC4:
	.string	"Could not read input from input file"
.LC5:
	.string	"w"
.LC6:
	.string	"bst.txt"
	.align 8
.LC7:
	.string	"Could not write to the output file"
.LC8:
	.string	"insert"
.LC9:
	.string	"%s"
.LC10:
	.string	"preorder"
.LC11:
	.string	"postorder"
.LC12:
	.string	"inorder"
.LC13:
	.string	"search"
.LC14:
	.string	"%d not found\n"
.LC15:
	.string	"%d found\n"
.LC16:
	.string	"minimum"
.LC17:
	.string	"maximum"
.LC18:
	.string	"successor"
.LC19:
	.string	"%d does not exist\n"
.LC20:
	.string	"predecessor"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	DWORD PTR -100[rbp], 0
	cmp	QWORD PTR -80[rbp], 0
	jne	.L58
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L59
.L58:
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L60
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L61
.L60:
	mov	QWORD PTR -88[rbp], 0
	jmp	.L62
.L79:
	lea	rax, -32[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L63
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	jne	.L64
	add	DWORD PTR -100[rbp], 1
	mov	edx, DWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -88[rbp], rax
	jmp	.L63
.L64:
	mov	edx, DWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	insert
.L63:
	lea	rax, -32[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L65
	cmp	QWORD PTR -88[rbp], 0
	jne	.L66
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L65
.L66:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	preorder_traversal
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L65:
	lea	rax, -32[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
	cmp	QWORD PTR -88[rbp], 0
	jne	.L68
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L67
.L68:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	postorder_traversal
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L67:
	lea	rax, -32[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L69
	cmp	QWORD PTR -88[rbp], 0
	jne	.L70
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L69
.L70:
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	inorder_traversal
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
.L69:
	lea	rax, -32[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L71
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -96[rbp], eax
	cmp	QWORD PTR -88[rbp], 0
	jne	.L72
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L72:
	mov	edx, DWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	search
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	jne	.L73
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L71
.L73:
	cmp	DWORD PTR -92[rbp], 1
	jne	.L71
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L71:
	lea	rax, -32[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L74
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	min_bst
.L74:
	lea	rax, -32[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L75
	mov	rdx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	max_bst
.L75:
	lea	rax, -32[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L76
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -96[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	search
	cmp	eax, 1
	jne	.L77
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	searchnode
	mov	QWORD PTR -56[rbp], rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	successor
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L76
.L77:
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L76:
	lea	rax, -32[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L62
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -96[rbp], eax
	mov	edx, DWORD PTR -96[rbp]
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	search
	cmp	eax, 1
	jne	.L78
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	searchnode
	mov	QWORD PTR -40[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -88[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	predecessor
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L62
.L78:
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L62:
	lea	rdx, -32[rbp]
	mov	rax, QWORD PTR -80[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, -1
	jne	.L79
.L61:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L59:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L81
	call	__stack_chk_fail@PLT
.L81:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.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	"159977.c"
	.text
	.align	2
	.global	newnode
	.syntax unified
	.arm
	.fpu softvfp
	.type	newnode, %function
newnode:
	@ 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, #16
	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	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	newnode, .-newnode
	.align	2
	.global	searchnode
	.syntax unified
	.arm
	.fpu softvfp
	.type	searchnode, %function
searchnode:
	@ 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
	beq	.L4
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L5
.L4:
	ldr	r3, [fp, #-8]
	b	.L3
.L5:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	ble	.L7
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	searchnode
	mov	r3, r0
	b	.L3
.L7:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L8
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	searchnode
	mov	r3, r0
	b	.L3
.L8:
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	searchnode, .-searchnode
	.align	2
	.global	successor
	.syntax unified
	.arm
	.fpu softvfp
	.type	successor, %function
successor:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	b	.L11
.L12:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
.L11:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	b	.L13
.L10:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	b	.L14
.L16:
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	beq	.L16
.L15:
	ldr	r3, [fp, #-8]
.L13:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	successor, .-successor
	.align	2
	.global	predecessor
	.syntax unified
	.arm
	.fpu softvfp
	.type	predecessor, %function
predecessor:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
.L19:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	b	.L21
.L18:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L22:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	beq	.L24
.L23:
	ldr	r3, [fp, #-8]
.L21:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	predecessor, .-predecessor
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d inserted\012\000"
	.text
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ 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, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L26
	ldr	r2, [fp, #-24]
	ldr	r1, .L30
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r0, [fp, #-24]
	bl	newnode
	mov	r3, r0
	b	.L27
.L26:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L28
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	insert
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	b	.L29
.L28:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	ble	.L29
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	insert
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
.L29:
	ldr	r3, [fp, #-20]
.L27:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC0
	.size	insert, .-insert
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d\012\000"
	.text
	.align	2
	.global	min_bst
	.syntax unified
	.arm
	.fpu softvfp
	.type	min_bst, %function
min_bst:
	@ 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, #-20]
	cmp	r3, #0
	bne	.L33
	ldr	r1, [fp, #-16]
	mov	r0, #10
	bl	fputc
	b	.L32
.L33:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	b	.L35
.L36:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L35:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L36
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L37
	ldr	r0, [fp, #-16]
	bl	fprintf
	nop
.L32:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC1
	.size	min_bst, .-min_bst
	.align	2
	.global	max_bst
	.syntax unified
	.arm
	.fpu softvfp
	.type	max_bst, %function
max_bst:
	@ 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, #-20]
	cmp	r3, #0
	bne	.L40
	ldr	r1, [fp, #-16]
	mov	r0, #10
	bl	fputc
	b	.L39
.L40:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	b	.L42
.L43:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L42:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L43
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L44
	ldr	r0, [fp, #-16]
	bl	fprintf
	nop
.L39:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC1
	.size	max_bst, .-max_bst
	.align	2
	.global	search
	.syntax unified
	.arm
	.fpu softvfp
	.type	search, %function
search:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L47
	mov	r3, #0
	b	.L48
.L47:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L49
	mov	r3, #1
	b	.L48
.L49:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L50
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	search
	mov	r3, r0
	b	.L48
.L50:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	search
	mov	r3, r0
.L48:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	search, .-search
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%d \000"
	.text
	.align	2
	.global	preorder_traversal
	.syntax unified
	.arm
	.fpu softvfp
	.type	preorder_traversal, %function
preorder_traversal:
	@ 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, #-12]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L55
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	preorder_traversal
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	preorder_traversal
	b	.L51
.L54:
	nop
.L51:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC2
	.size	preorder_traversal, .-preorder_traversal
	.align	2
	.global	inorder_traversal
	.syntax unified
	.arm
	.fpu softvfp
	.type	inorder_traversal, %function
inorder_traversal:
	@ 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, #-12]
	cmp	r3, #0
	beq	.L60
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	inorder_traversal
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L61
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	inorder_traversal
	b	.L57
.L60:
	nop
.L57:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC2
	.size	inorder_traversal, .-inorder_traversal
	.align	2
	.global	postorder_traversal
	.syntax unified
	.arm
	.fpu softvfp
	.type	postorder_traversal, %function
postorder_traversal:
	@ 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, #-12]
	cmp	r3, #0
	beq	.L66
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	postorder_traversal
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	postorder_traversal
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L67
	ldr	r0, [fp, #-8]
	bl	fprintf
	b	.L63
.L66:
	nop
.L63:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L68:
	.align	2
.L67:
	.word	.LC2
	.size	postorder_traversal, .-postorder_traversal
	.section	.rodata
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"Could not read input from input file\000"
	.align	2
.LC5:
	.ascii	"w\000"
	.align	2
.LC6:
	.ascii	"bst.txt\000"
	.align	2
.LC7:
	.ascii	"Could not write to the output file\000"
	.align	2
.LC8:
	.ascii	"insert\000"
	.align	2
.LC9:
	.ascii	"%s\000"
	.align	2
.LC10:
	.ascii	"preorder\000"
	.align	2
.LC11:
	.ascii	"postorder\000"
	.align	2
.LC12:
	.ascii	"inorder\000"
	.align	2
.LC13:
	.ascii	"search\000"
	.align	2
.LC14:
	.ascii	"%d not found\012\000"
	.align	2
.LC15:
	.ascii	"%d found\012\000"
	.align	2
.LC16:
	.ascii	"minimum\000"
	.align	2
.LC17:
	.ascii	"maximum\000"
	.align	2
.LC18:
	.ascii	"successor\000"
	.align	2
.LC19:
	.ascii	"%d does not exist\012\000"
	.align	2
.LC20:
	.ascii	"predecessor\000"
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L94
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L94+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L70
	ldr	r0, .L94+8
	bl	puts
	b	.L71
.L70:
	ldr	r1, .L94+12
	ldr	r0, .L94+16
	bl	fopen
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L72
	ldr	r0, .L94+20
	bl	puts
	b	.L73
.L72:
	mov	r3, #0
	str	r3, [fp, #-64]
	b	.L74
.L91:
	sub	r3, fp, #28
	ldr	r1, .L94+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L94+28
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
	sub	r3, fp, #28
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L76
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	insert
	str	r0, [fp, #-64]
	b	.L75
.L76:
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	insert
.L75:
	sub	r3, fp, #28
	ldr	r1, .L94+32
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L77
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L78
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
	b	.L77
.L78:
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	preorder_traversal
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
.L77:
	sub	r3, fp, #28
	ldr	r1, .L94+36
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L80
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
	b	.L79
.L80:
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	postorder_traversal
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
.L79:
	sub	r3, fp, #28
	ldr	r1, .L94+40
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L81
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L82
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
	b	.L81
.L82:
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	inorder_traversal
	ldr	r1, [fp, #-56]
	mov	r0, #10
	bl	fputc
.L81:
	sub	r3, fp, #28
	ldr	r1, .L94+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L83
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L94+28
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
	sub	r3, fp, #28
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bne	.L84
	ldr	r2, [fp, #-52]
	ldr	r1, .L94+48
	ldr	r0, [fp, #-56]
	bl	fprintf
	b	.L83
.L84:
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	search
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L85
	ldr	r2, [fp, #-52]
	ldr	r1, .L94+48
	ldr	r0, [fp, #-56]
	bl	fprintf
	b	.L83
.L85:
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bne	.L83
	ldr	r2, [fp, #-52]
	ldr	r1, .L94+52
	ldr	r0, [fp, #-56]
	bl	fprintf
.L83:
	sub	r3, fp, #28
	ldr	r1, .L94+56
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L86
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	min_bst
.L86:
	sub	r3, fp, #28
	ldr	r1, .L94+60
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L87
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	max_bst
.L87:
	sub	r3, fp, #28
	ldr	r1, .L94+64
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L88
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L94+28
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
	sub	r3, fp, #28
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	search
	mov	r3, r0
	cmp	r3, #1
	bne	.L89
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-64]
	bl	searchnode
	str	r0, [fp, #-40]
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-64]
	bl	successor
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L94+68
	ldr	r0, [fp, #-56]
	bl	fprintf
	b	.L88
.L89:
	ldr	r2, [fp, #-52]
	ldr	r1, .L94+72
	ldr	r0, [fp, #-56]
	bl	fprintf
.L88:
	sub	r3, fp, #28
	ldr	r1, .L94+76
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L74
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L94+28
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
	sub	r3, fp, #28
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-52]
	ldr	r2, [fp, #-52]
	ldr	r1, [fp, #-64]
	ldr	r0, [fp, #-56]
	bl	search
	mov	r3, r0
	cmp	r3, #1
	bne	.L90
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	ldr	r1, [fp, #-52]
	ldr	r0, [fp, #-64]
	bl	searchnode
	str	r0, [fp, #-32]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-64]
	bl	predecessor
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L94+68
	ldr	r0, [fp, #-56]
	bl	fprintf
	b	.L74
.L90:
	ldr	r2, [fp, #-52]
	ldr	r1, .L94+72
	ldr	r0, [fp, #-56]
	bl	fprintf
.L74:
	sub	r3, fp, #28
	mov	r2, r3
	ldr	r1, .L94+28
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L91
.L73:
	ldr	r0, [fp, #-60]
	bl	fclose
	ldr	r0, [fp, #-56]
	bl	fclose
.L71:
	mov	r3, #0
	ldr	r2, .L94
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L93
	bl	__stack_chk_fail
.L93:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L95:
	.align	2
.L94:
	.word	.LC21
	.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	.LC1
	.word	.LC19
	.word	.LC20
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
