	.file	"330764.c"
	.intel_syntax noprefix
	.text
	.globl	height
	.type	height, @function
height:
.LFB6:
	.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
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 24[rax]
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	height, .-height
	.globl	max
	.type	max, @function
max:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	DWORD PTR -8[rbp], eax
	cmovge	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.globl	newNode
	.type	newNode, @function
newNode:
.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, 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	DWORD PTR 24[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	newNode, .-newNode
	.globl	rightRotate
	.type	rightRotate, @function
rightRotate:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -32[rbp], rdi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	rightRotate, .-rightRotate
	.globl	leftRotate
	.type	leftRotate, @function
leftRotate:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -32[rbp], rdi
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	leftRotate, .-leftRotate
	.globl	getBalance
	.type	getBalance, @function
getBalance:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 8
	.cfi_offset 3, -24
	mov	QWORD PTR -16[rbp], rdi
	cmp	QWORD PTR -16[rbp], 0
	jne	.L13
	mov	eax, 0
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
.L14:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	getBalance, .-getBalance
	.globl	insert
	.type	insert, @function
insert:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	cmp	QWORD PTR -40[rbp], 0
	jne	.L16
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	newNode
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L18
	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	insert
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L19
.L18:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L20
	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	insert
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -40[rbp]
	jmp	.L17
.L19:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	getBalance
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 1
	jle	.L21
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L21
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L17
.L21:
	cmp	DWORD PTR -20[rbp], -1
	jge	.L22
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L22
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L17
.L22:
	cmp	DWORD PTR -20[rbp], 1
	jle	.L23
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L23
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	leftRotate
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L17
.L23:
	cmp	DWORD PTR -20[rbp], -1
	jge	.L24
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L24
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	rightRotate
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L17
.L24:
	mov	rax, QWORD PTR -40[rbp]
.L17:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	insert, .-insert
	.section	.rodata
.LC0:
	.string	"%d "
	.text
	.globl	inorder
	.type	inorder, @function
inorder:
.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
	cmp	QWORD PTR -8[rbp], 0
	je	.L28
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	inorder
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	inorder
	nop
.L28:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	inorder, .-inorder
	.globl	postorder
	.type	postorder, @function
postorder:
.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
	cmp	QWORD PTR -8[rbp], 0
	je	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	postorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	postorder
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	postorder, .-postorder
	.globl	preorder
	.type	preorder, @function
preorder:
.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	.L36
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[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
	nop
.L36:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	preorder, .-preorder
	.globl	minValueNode
	.type	minValueNode, @function
minValueNode:
.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L38:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L39
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	minValueNode, .-minValueNode
	.globl	deleteNode
	.type	deleteNode, @function
deleteNode:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	cmp	QWORD PTR -56[rbp], 0
	jne	.L42
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L43
.L42:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L44
	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	deleteNode
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rdx], rax
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L46
	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	deleteNode
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rdx], rax
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L47
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L48
.L47:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L49
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	jmp	.L50
.L49:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
.L50:
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L51
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	jmp	.L52
.L51:
	mov	rcx, QWORD PTR -56[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rsi]
	mov	rdx, QWORD PTR 8[rsi]
	mov	QWORD PTR [rcx], rax
	mov	QWORD PTR 8[rcx], rdx
	mov	rax, QWORD PTR 16[rsi]
	mov	rdx, QWORD PTR 24[rsi]
	mov	QWORD PTR 16[rcx], rax
	mov	QWORD PTR 24[rcx], rdx
.L52:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L45
.L48:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	minValueNode
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	esi, edx
	mov	rdi, rax
	call	deleteNode
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rdx], rax
.L45:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L53
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L43
.L53:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	height
	mov	esi, ebx
	mov	edi, eax
	call	max
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	getBalance
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 1
	jle	.L54
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	js	.L54
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L43
.L54:
	cmp	DWORD PTR -36[rbp], 1
	jle	.L55
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jns	.L55
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	leftRotate
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L43
.L55:
	cmp	DWORD PTR -36[rbp], -1
	jge	.L56
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jg	.L56
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L43
.L56:
	cmp	DWORD PTR -36[rbp], -1
	jge	.L57
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jle	.L57
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	rightRotate
	mov	rdx, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L43
.L57:
	mov	rax, QWORD PTR -56[rbp]
.L43:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	deleteNode, .-deleteNode
	.section	.rodata
	.align 8
.LC1:
	.string	"-----\n1)Insert\n2)Delete\n3)Inorder\n4)Postorder\n5)Preorder\n6)Exit\nChoose : "
.LC2:
	.string	"%d"
.LC3:
	.string	"Enter value to be inserted "
.LC4:
	.string	"Enter value to be deleted "
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
.L66:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 5
	ja	.L59
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L61[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L61[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L61:
	.long	.L59-.L61
	.long	.L65-.L61
	.long	.L64-.L61
	.long	.L63-.L61
	.long	.L62-.L61
	.long	.L60-.L61
	.text
.L65:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -16[rbp], rax
	jmp	.L59
.L64:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	deleteNode
	mov	QWORD PTR -16[rbp], rax
	jmp	.L59
.L63:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	inorder
	mov	edi, 10
	call	putchar@PLT
	jmp	.L59
.L62:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	postorder
	mov	edi, 10
	call	putchar@PLT
	jmp	.L59
.L60:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	preorder
	mov	edi, 10
	call	putchar@PLT
	nop
.L59:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 6
	jne	.L66
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.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	"330764.c"
	.text
	.align	2
	.global	height
	.syntax unified
	.arm
	.fpu softvfp
	.type	height, %function
height:
	@ 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]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	height, .-height
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.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, #1
	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	rightRotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	rightRotate, %function
rightRotate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	rightRotate, .-rightRotate
	.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
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	leftRotate, .-leftRotate
	.align	2
	.global	getBalance
	.syntax unified
	.arm
	.fpu softvfp
	.type	getBalance, %function
getBalance:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L13
	mov	r3, #0
	b	.L14
.L13:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	sub	r3, r4, r3
.L14:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	getBalance, .-getBalance
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L16
	ldr	r0, [fp, #-28]
	bl	newNode
	mov	r3, r0
	b	.L17
.L16:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L18
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	b	.L19
.L18:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L20
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	b	.L19
.L20:
	ldr	r3, [fp, #-24]
	b	.L17
.L19:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r0, [fp, #-24]
	bl	getBalance
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L21
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L21
	ldr	r0, [fp, #-24]
	bl	rightRotate
	mov	r3, r0
	b	.L17
.L21:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L22
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L22
	ldr	r0, [fp, #-24]
	bl	leftRotate
	mov	r3, r0
	b	.L17
.L22:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L23
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L23
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	leftRotate
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-24]
	bl	rightRotate
	mov	r3, r0
	b	.L17
.L23:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L24
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L24
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	rightRotate
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-24]
	bl	leftRotate
	mov	r3, r0
	b	.L17
.L24:
	ldr	r3, [fp, #-24]
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	insert, .-insert
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d \000"
	.text
	.align	2
	.global	inorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	inorder, %function
inorder:
	@ 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	.L28
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	inorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	inorder
	nop
.L28:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC0
	.size	inorder, .-inorder
	.align	2
	.global	postorder
	.syntax unified
	.arm
	.fpu softvfp
	.type	postorder, %function
postorder:
	@ 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	.L34
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	postorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	postorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L35
	bl	printf
	nop
.L34:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC0
	.size	postorder, .-postorder
	.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	.L40
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L41
	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
	nop
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC0
	.size	preorder, .-preorder
	.align	2
	.global	minValueNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	minValueNode, %function
minValueNode:
	@ 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]
	str	r3, [fp, #-8]
	b	.L44
.L45:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L44:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	minValueNode, .-minValueNode
	.align	2
	.global	deleteNode
	.syntax unified
	.arm
	.fpu softvfp
	.type	deleteNode, %function
deleteNode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-32]
	b	.L49
.L48:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bge	.L50
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	deleteNode
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #4]
	b	.L51
.L50:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L52
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	deleteNode
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	b	.L51
.L52:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L54
.L53:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L55
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	b	.L56
.L55:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
.L56:
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L57
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L58
.L57:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	mov	ip, r2
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
.L58:
	ldr	r0, [fp, #-24]
	bl	free
	b	.L51
.L54:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	minValueNode
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	deleteNode
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
.L51:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L59
	ldr	r3, [fp, #-32]
	b	.L49
.L59:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	height
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	max
	mov	r3, r0
	add	r2, r3, #1
	ldr	r3, [fp, #-32]
	str	r2, [r3, #12]
	ldr	r0, [fp, #-32]
	bl	getBalance
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L60
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	blt	.L60
	ldr	r0, [fp, #-32]
	bl	rightRotate
	mov	r3, r0
	b	.L49
.L60:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L61
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	bge	.L61
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	leftRotate
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-32]
	bl	rightRotate
	mov	r3, r0
	b	.L49
.L61:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L62
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	bgt	.L62
	ldr	r0, [fp, #-32]
	bl	leftRotate
	mov	r3, r0
	b	.L49
.L62:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L63
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	ble	.L63
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	rightRotate
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-32]
	bl	leftRotate
	mov	r3, r0
	b	.L49
.L63:
	ldr	r3, [fp, #-32]
.L49:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	deleteNode, .-deleteNode
	.section	.rodata
	.align	2
.LC1:
	.ascii	"-----\0121)Insert\0122)Delete\0123)Inorder\0124)Pos"
	.ascii	"torder\0125)Preorder\0126)Exit\012Choose : \000"
	.align	2
.LC2:
	.ascii	"%d\000"
	.align	2
.LC3:
	.ascii	"Enter value to be inserted \000"
	.align	2
.LC4:
	.ascii	"Enter value to be deleted \000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L74
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
.L72:
	ldr	r0, .L74+4
	bl	printf
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L74+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L65
.L67:
	.word	.L71
	.word	.L70
	.word	.L69
	.word	.L68
	.word	.L66
.L71:
	ldr	r0, .L74+12
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L74+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	insert
	str	r0, [fp, #-12]
	b	.L65
.L70:
	ldr	r0, .L74+16
	bl	printf
	sub	r3, fp, #20
	mov	r1, r3
	ldr	r0, .L74+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-20]
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	deleteNode
	str	r0, [fp, #-12]
	b	.L65
.L69:
	ldr	r0, [fp, #-12]
	bl	inorder
	mov	r0, #10
	bl	putchar
	b	.L65
.L68:
	ldr	r0, [fp, #-12]
	bl	postorder
	mov	r0, #10
	bl	putchar
	b	.L65
.L66:
	ldr	r0, [fp, #-12]
	bl	preorder
	mov	r0, #10
	bl	putchar
	nop
.L65:
	ldr	r3, [fp, #-16]
	cmp	r3, #6
	bne	.L72
	nop
	ldr	r3, .L74
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L73
	bl	__stack_chk_fail
.L73:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC5
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
