	.file	"335537.c"
	.intel_syntax noprefix
	.text
	.globl	R_Rotate
	.type	R_Rotate, @function
R_Rotate:
.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 -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rdx]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	R_Rotate, .-R_Rotate
	.globl	L_Rotate
	.type	L_Rotate, @function
L_Rotate:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rdx]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	L_Rotate, .-L_Rotate
	.globl	LeftBalance
	.type	LeftBalance, @function
LeftBalance:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L4
	cmp	eax, 1
	jne	.L10
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	R_Rotate
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	je	.L6
	cmp	eax, 1
	jg	.L7
	cmp	eax, -1
	je	.L8
	test	eax, eax
	je	.L9
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], -1
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	jmp	.L7
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 4[rax], edx
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 1
	nop
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 8
	mov	rdi, rax
	call	L_Rotate
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	R_Rotate
	nop
.L5:
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	LeftBalance, .-LeftBalance
	.globl	RightBalance
	.type	RightBalance, @function
RightBalance:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L12
	cmp	eax, 1
	je	.L13
	jmp	.L19
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	L_Rotate
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	je	.L15
	cmp	eax, 1
	jg	.L16
	cmp	eax, -1
	je	.L17
	test	eax, eax
	je	.L18
	jmp	.L16
.L17:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 1
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	jmp	.L16
.L18:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rdx]
	mov	DWORD PTR 4[rax], edx
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], -1
	nop
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	add	rax, 16
	mov	rdi, rax
	call	R_Rotate
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	L_Rotate
	nop
.L14:
.L19:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	RightBalance, .-RightBalance
	.globl	InsertAVL
	.type	InsertAVL, @function
InsertAVL:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L21
	mov	edi, 24
	call	malloc@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 16[rax], 0
	mov	rdx, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rdx]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L22
.L21:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	mov	eax, 0
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L25
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rcx, 8[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	InsertAVL
	test	eax, eax
	jne	.L26
	mov	eax, 0
	jmp	.L24
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L35
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	je	.L28
	cmp	eax, 1
	jg	.L22
	cmp	eax, -1
	je	.L29
	test	eax, eax
	je	.L30
	jmp	.L22
.L28:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	LeftBalance
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L22
.L30:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L22
.L29:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L22
.L25:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rcx, 16[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	mov	rdi, rcx
	call	InsertAVL
	test	eax, eax
	jne	.L31
	mov	eax, 0
	jmp	.L24
.L31:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L36
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 1
	je	.L32
	cmp	eax, 1
	jg	.L22
	cmp	eax, -1
	je	.L33
	test	eax, eax
	je	.L34
	jmp	.L22
.L33:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	RightBalance
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L22
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], -1
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L22
.L32:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L22
.L35:
	nop
	jmp	.L22
.L36:
	nop
.L22:
	mov	eax, 1
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	InsertAVL, .-InsertAVL
	.globl	SearchBST
	.type	SearchBST, @function
SearchBST:
.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 -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	QWORD PTR -24[rbp], rdx
	mov	QWORD PTR -32[rbp], rcx
	cmp	QWORD PTR -8[rbp], 0
	jne	.L38
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, 0
	jmp	.L39
.L38:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jne	.L40
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, 1
	jmp	.L39
.L40:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L41
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	rdi, rax
	call	SearchBST
	jmp	.L39
.L41:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	esi, DWORD PTR -12[rbp]
	mov	rdi, rax
	call	SearchBST
.L39:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	SearchBST, .-SearchBST
	.section	.rodata
.LC0:
	.string	"\345\271\263\350\241\241\344\272\214\345\217\211\346\240\221 !"
	.align 8
.LC1:
	.string	"\346\217\222\345\205\245%d,\346\230\257\345\220\246\345\242\236\345\212\240\346\240\221\347\232\204\351\253\230\345\272\246(%d)[YES->1 / NO->0]\n"
	.align 8
.LC2:
	.string	"\345\260\206\346\225\260\347\273\204a\346\217\222\345\205\245\345\210\260\345\271\263\350\241\241\344\272\214\345\217\211\346\240\221\345\220\216,\346\234\200\347\273\210\345\275\242\346\210\220\351\253\230\345\272\246\344\270\272%d\347\232\204\345\271\263\350\241\241\344\272\214\345\217\211\346\240\221\n"
	.align 8
.LC3:
	.string	"\346\237\245\346\211\276%d\346\230\257\345\220\246\346\210\220\345\212\237:%d (1->YES/0->NO)\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -48[rbp], 3
	mov	DWORD PTR -44[rbp], 2
	mov	DWORD PTR -40[rbp], 1
	mov	DWORD PTR -36[rbp], 4
	mov	DWORD PTR -32[rbp], 5
	mov	DWORD PTR -28[rbp], 6
	mov	DWORD PTR -24[rbp], 7
	mov	DWORD PTR -20[rbp], 10
	mov	DWORD PTR -16[rbp], 9
	mov	DWORD PTR -12[rbp], 8
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -72[rbp], 0
	jmp	.L43
.L44:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	ecx, DWORD PTR -48[rbp+rax*4]
	lea	rdx, -80[rbp]
	lea	rax, -64[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	InsertAVL
	mov	eax, DWORD PTR -80[rbp]
	add	DWORD PTR -76[rbp], eax
	mov	edx, DWORD PTR -80[rbp]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -72[rbp], 1
.L43:
	cmp	DWORD PTR -72[rbp], 9
	jle	.L44
	mov	eax, DWORD PTR -76[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -64[rbp]
	lea	rdx, -56[rbp]
	mov	rcx, rdx
	mov	edx, 0
	mov	esi, 10
	mov	rdi, rax
	call	SearchBST
	mov	DWORD PTR -68[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edx, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"335537.c"
	.text
	.align	2
	.global	R_Rotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	R_Rotate, %function
R_Rotate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #12]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	R_Rotate, .-R_Rotate
	.align	2
	.global	L_Rotate
	.syntax unified
	.arm
	.fpu softvfp
	.type	L_Rotate, %function
L_Rotate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	L_Rotate, .-L_Rotate
	.align	2
	.global	LeftBalance
	.syntax unified
	.arm
	.fpu softvfp
	.type	LeftBalance, %function
LeftBalance:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L4
	cmp	r3, #1
	bne	.L10
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-16]
	bl	R_Rotate
	b	.L5
.L4:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	beq	.L6
	cmp	r3, #1
	bgt	.L7
	cmn	r3, #1
	beq	.L8
	cmp	r3, #0
	beq	.L9
	b	.L7
.L6:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mvn	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L7
.L9:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	b	.L7
.L8:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r2, #1
	str	r2, [r3, #4]
	nop
.L7:
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #8
	mov	r0, r3
	bl	L_Rotate
	ldr	r0, [fp, #-16]
	bl	R_Rotate
	nop
.L5:
.L10:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	LeftBalance, .-LeftBalance
	.align	2
	.global	RightBalance
	.syntax unified
	.arm
	.fpu softvfp
	.type	RightBalance, %function
RightBalance:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L12
	cmp	r3, #1
	beq	.L13
	b	.L19
.L12:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-16]
	bl	L_Rotate
	b	.L14
.L13:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	beq	.L15
	cmp	r3, #1
	bgt	.L16
	cmn	r3, #1
	beq	.L17
	cmp	r3, #0
	beq	.L18
	b	.L16
.L17:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	b	.L16
.L18:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r2, [r2, #4]
	str	r2, [r3, #4]
	b	.L16
.L15:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	mvn	r2, #0
	str	r2, [r3, #4]
	nop
.L16:
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r3, r3, #12
	mov	r0, r3
	bl	R_Rotate
	ldr	r0, [fp, #-16]
	bl	L_Rotate
	nop
.L14:
.L19:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	RightBalance, .-RightBalance
	.align	2
	.global	InsertAVL
	.syntax unified
	.arm
	.fpu softvfp
	.type	InsertAVL, %function
InsertAVL:
	@ 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, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	ldr	r3, [r3, #12]
	str	r3, [r2, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3]
	b	.L22
.L21:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L23
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	b	.L24
.L23:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L25
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r3, #8
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	InsertAVL
	mov	r3, r0
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
	b	.L24
.L26:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L35
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	beq	.L28
	cmp	r3, #1
	bgt	.L22
	cmn	r3, #1
	beq	.L29
	cmp	r3, #0
	beq	.L30
	b	.L22
.L28:
	ldr	r0, [fp, #-8]
	bl	LeftBalance
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	b	.L22
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, #1
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3]
	b	.L22
.L29:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	b	.L22
.L25:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r3, r3, #12
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	InsertAVL
	mov	r3, r0
	cmp	r3, #0
	bne	.L31
	mov	r3, #0
	b	.L24
.L31:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #1
	beq	.L32
	cmp	r3, #1
	bgt	.L22
	cmn	r3, #1
	beq	.L33
	cmp	r3, #0
	beq	.L34
	b	.L22
.L33:
	ldr	r0, [fp, #-8]
	bl	RightBalance
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	b	.L22
.L34:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mvn	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	str	r2, [r3]
	b	.L22
.L32:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3]
	b	.L22
.L35:
	nop
	b	.L22
.L36:
	nop
.L22:
	mov	r3, #1
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	InsertAVL, .-InsertAVL
	.align	2
	.global	SearchBST
	.syntax unified
	.arm
	.fpu softvfp
	.type	SearchBST, %function
SearchBST:
	@ 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]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L38
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	mov	r3, #0
	b	.L39
.L38:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bne	.L40
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	mov	r3, #1
	b	.L39
.L40:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L41
	ldr	r3, [fp, #-8]
	ldr	r0, [r3, #8]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	bl	SearchBST
	mov	r3, r0
	b	.L39
.L41:
	ldr	r3, [fp, #-8]
	ldr	r0, [r3, #12]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-8]
	ldr	r1, [fp, #-12]
	bl	SearchBST
	mov	r3, r0
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	SearchBST, .-SearchBST
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\345\271\263\350\241\241\344\272\214\345\217\211\346"
	.ascii	"\240\221 !\000"
	.align	2
.LC2:
	.ascii	"\346\217\222\345\205\245%d,\346\230\257\345\220\246"
	.ascii	"\345\242\236\345\212\240\346\240\221\347\232\204\351"
	.ascii	"\253\230\345\272\246(%d)[YES->1 / NO->0]\012\000"
	.align	2
.LC3:
	.ascii	"\345\260\206\346\225\260\347\273\204a\346\217\222\345"
	.ascii	"\205\245\345\210\260\345\271\263\350\241\241\344\272"
	.ascii	"\214\345\217\211\346\240\221\345\220\216,\346\234\200"
	.ascii	"\347\273\210\345\275\242\346\210\220\351\253\230\345"
	.ascii	"\272\246\344\270\272%d\347\232\204\345\271\263\350\241"
	.ascii	"\241\344\272\214\345\217\211\346\240\221\012\000"
	.align	2
.LC4:
	.ascii	"\346\237\245\346\211\276%d\346\230\257\345\220\246\346"
	.ascii	"\210\220\345\212\237:%d (1->YES/0->NO)\012\000"
	.align	2
.LC0:
	.word	3
	.word	2
	.word	1
	.word	4
	.word	5
	.word	6
	.word	7
	.word	10
	.word	9
	.word	8
	.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 = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L47
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L47+4
	bl	puts
	ldr	r3, .L47+8
	sub	ip, fp, #48
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1}
	stm	ip, {r0, r1}
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L43
.L44:
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-44]
	sub	r2, fp, #68
	sub	r3, fp, #72
	mov	r0, r3
	bl	InsertAVL
	ldr	r3, [fp, #-68]
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-44]
	ldr	r2, [fp, #-68]
	mov	r1, r3
	ldr	r0, .L47+12
	bl	printf
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L43:
	ldr	r3, [fp, #-56]
	cmp	r3, #9
	ble	.L44
	ldr	r1, [fp, #-60]
	ldr	r0, .L47+16
	bl	printf
	ldr	r0, [fp, #-72]
	sub	r3, fp, #64
	mov	r2, #0
	mov	r1, #10
	bl	SearchBST
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-64]
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L47+20
	bl	printf
	mov	r3, #0
	ldr	r2, .L47
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L46
	bl	__stack_chk_fail
.L46:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L48:
	.align	2
.L47:
	.word	.LC5
	.word	.LC1
	.word	.LC0
	.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
