	.file	"3262131.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	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
.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	.L20
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L20
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L17
.L20:
	cmp	DWORD PTR -20[rbp], -1
	jge	.L21
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L21
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L17
.L21:
	cmp	DWORD PTR -20[rbp], 1
	jle	.L22
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jle	.L22
	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
.L22:
	cmp	DWORD PTR -20[rbp], -1
	jge	.L23
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -44[rbp], eax
	jge	.L23
	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
.L23:
	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	preOrder
	.type	preOrder, @function
preOrder:
.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	.L26
	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
.L26:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	preOrder, .-preOrder
	.globl	minValueNode
	.type	minValueNode, @function
minValueNode:
.LFB14:
	.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	.L28
.L29:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L28:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L29
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	minValueNode, .-minValueNode
	.globl	deleteNode
	.type	deleteNode, @function
deleteNode:
.LFB15:
	.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	.L32
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L33
.L32:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jge	.L34
	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	.L35
.L34:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -60[rbp], eax
	jle	.L36
	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	.L35
.L36:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L37
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	jne	.L38
.L37:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L39
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	jmp	.L40
.L39:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
.L40:
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L41
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -56[rbp], 0
	jmp	.L42
.L41:
	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
.L42:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L35
.L38:
	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
.L35:
	cmp	QWORD PTR -56[rbp], 0
	jne	.L43
	mov	rax, QWORD PTR -56[rbp]
	jmp	.L33
.L43:
	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	.L44
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	js	.L44
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	rightRotate
	jmp	.L33
.L44:
	cmp	DWORD PTR -36[rbp], 1
	jle	.L45
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jns	.L45
	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	.L33
.L45:
	cmp	DWORD PTR -36[rbp], -1
	jge	.L46
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jg	.L46
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	leftRotate
	jmp	.L33
.L46:
	cmp	DWORD PTR -36[rbp], -1
	jge	.L47
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	getBalance
	test	eax, eax
	jle	.L47
	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	.L33
.L47:
	mov	rax, QWORD PTR -56[rbp]
.L33:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	deleteNode, .-deleteNode
	.section	.rodata
	.align 8
.LC1:
	.string	"Pre order traversal of the constructed AVL tree is "
	.text
	.globl	main
	.type	main, @function
main:
.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], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 30
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 40
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 50
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 25
	mov	rdi, rax
	call	insert
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	preOrder
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 10
	mov	rdi, rax
	call	deleteNode
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	preOrder
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.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	"3262131.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, #8]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	insert
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
.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	.L20
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L20
	ldr	r0, [fp, #-24]
	bl	rightRotate
	mov	r3, r0
	b	.L17
.L20:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L21
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L21
	ldr	r0, [fp, #-24]
	bl	leftRotate
	mov	r3, r0
	b	.L17
.L21:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L22
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	ble	.L22
	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
.L22:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L23
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bge	.L23
	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
.L23:
	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	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	.L26
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L27
	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
.L26:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.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	.L30
.L31:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L31
	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	.L34
	ldr	r3, [fp, #-32]
	b	.L35
.L34:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	bge	.L36
	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	.L37
.L36:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	ble	.L38
	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	.L37
.L38:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L40
.L39:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L41
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	b	.L42
.L41:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
.L42:
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L43
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L44
.L43:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	mov	ip, r2
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
.L44:
	ldr	r0, [fp, #-24]
	bl	free
	b	.L37
.L40:
	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]
.L37:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L45
	ldr	r3, [fp, #-32]
	b	.L35
.L45:
	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	.L46
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	blt	.L46
	ldr	r0, [fp, #-32]
	bl	rightRotate
	mov	r3, r0
	b	.L35
.L46:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L47
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	bge	.L47
	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	.L35
.L47:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L48
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	bgt	.L48
	ldr	r0, [fp, #-32]
	bl	leftRotate
	mov	r3, r0
	b	.L35
.L48:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bge	.L49
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	getBalance
	mov	r3, r0
	cmp	r3, #0
	ble	.L49
	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	.L35
.L49:
	ldr	r3, [fp, #-32]
.L35:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	deleteNode, .-deleteNode
	.section	.rodata
	.align	2
.LC1:
	.ascii	"Pre order traversal of the constructed AVL tree is "
	.ascii	"\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r1, #10
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	mov	r1, #20
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	mov	r1, #30
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	mov	r1, #40
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	mov	r1, #50
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	mov	r1, #25
	ldr	r0, [fp, #-8]
	bl	insert
	str	r0, [fp, #-8]
	ldr	r0, .L52
	bl	puts
	ldr	r0, [fp, #-8]
	bl	preOrder
	mov	r0, #10
	bl	putchar
	mov	r1, #10
	ldr	r0, [fp, #-8]
	bl	deleteNode
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	preOrder
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L53:
	.align	2
.L52:
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
