	.file	"495982.c"
	.intel_syntax noprefix
	.text
	.globl	get_node
	.type	get_node, @function
get_node:
.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	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edi, 120
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 104[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 112[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_node, .-get_node
	.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	height
	.type	height, @function
height:
.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	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	jne	.L6
	mov	eax, 0
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	height
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	max
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	height, .-height
	.globl	balance_factor
	.type	balance_factor, @function
balance_factor:
.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	cmp	QWORD PTR -40[rbp], 0
	je	.L9
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	height
	mov	ebx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	height
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L8
.L9:
.L8:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	balance_factor, .-balance_factor
	.globl	rr_rotation
	.type	rr_rotation, @function
rr_rotation:
.LFB10:
	.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
	cmp	QWORD PTR -24[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 104[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 112[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 104[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L11
.L12:
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	rr_rotation, .-rr_rotation
	.globl	ll_rotation
	.type	ll_rotation, @function
ll_rotation:
.LFB11:
	.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
	cmp	QWORD PTR -24[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 112[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 104[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 112[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L14
.L15:
.L14:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	ll_rotation, .-ll_rotation
	.globl	lr_rotation
	.type	lr_rotation, @function
lr_rotation:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	rr_rotation
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 104[rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ll_rotation
	jmp	.L17
.L18:
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	lr_rotation, .-lr_rotation
	.globl	rl_rotation
	.type	rl_rotation, @function
rl_rotation:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L21
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	ll_rotation
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 112[rdx], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	rr_rotation
	jmp	.L20
.L21:
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	rl_rotation, .-rl_rotation
	.globl	balance
	.type	balance, @function
balance:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	cmp	QWORD PTR -24[rbp], 0
	je	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	balance_factor
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 1
	jle	.L25
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	balance_factor
	test	eax, eax
	jle	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	ll_rotation
	mov	QWORD PTR -24[rbp], rax
	jmp	.L25
.L26:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	lr_rotation
	mov	QWORD PTR -24[rbp], rax
.L25:
	cmp	DWORD PTR -4[rbp], -1
	jge	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	balance_factor
	test	eax, eax
	jle	.L27
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	rl_rotation
	mov	QWORD PTR -24[rbp], rax
	jmp	.L24
.L27:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	rr_rotation
	mov	QWORD PTR -24[rbp], rax
.L24:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	balance, .-balance
	.globl	add_node
	.type	add_node, @function
add_node:
.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, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	cmp	QWORD PTR -8[rbp], 0
	jne	.L30
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	get_node
	jmp	.L31
.L30:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jge	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 104[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	balance
	mov	QWORD PTR -8[rbp], rax
.L32:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L33
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 112[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	balance
	mov	QWORD PTR -8[rbp], rax
.L33:
	mov	rax, QWORD PTR -8[rbp]
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	add_node, .-add_node
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	create_bst
	.type	create_bst, @function
create_bst:
.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, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -120[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L35
.L36:
	lea	rax, -116[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -116[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -112[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	add_node
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR [rdx], rax
	mov	eax, DWORD PTR -120[rbp]
	sub	eax, 1
	mov	DWORD PTR -120[rbp], eax
.L35:
	mov	eax, DWORD PTR -120[rbp]
	test	eax, eax
	jne	.L36
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	create_bst, .-create_bst
	.section	.rodata
.LC1:
	.string	"%d "
	.text
	.globl	preorder
	.type	preorder, @function
preorder:
.LFB17:
	.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	.L41
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 104[rax]
	mov	rdi, rax
	call	preorder
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 112[rax]
	mov	rdi, rax
	call	preorder
	jmp	.L38
.L41:
	nop
.L38:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	preorder, .-preorder
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -16[rbp]
	mov	rdi, rax
	call	create_bst
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	preorder
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	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	"495982.c"
	.text
	.align	2
	.global	get_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_node, %function
get_node:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #112
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #104]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #108]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	get_node, .-get_node
	.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	height
	.syntax unified
	.arm
	.fpu softvfp
	.type	height, %function
height:
	@ 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]
	cmp	r3, #0
	bne	.L6
	mov	r3, #0
	b	.L7
.L6:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	height
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	max
	mov	r3, r0
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	height, .-height
	.align	2
	.global	balance_factor
	.syntax unified
	.arm
	.fpu softvfp
	.type	balance_factor, %function
balance_factor:
	@ 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]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	height
	mov	r4, r0
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	height
	mov	r3, r0
	sub	r3, r4, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	b	.L8
.L9:
.L8:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	balance_factor, .-balance_factor
	.align	2
	.global	rr_rotation
	.syntax unified
	.arm
	.fpu softvfp
	.type	rr_rotation, %function
rr_rotation:
	@ 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]
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #104]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #108]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #104]
	ldr	r3, [fp, #-8]
	b	.L11
.L12:
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	rr_rotation, .-rr_rotation
	.align	2
	.global	ll_rotation
	.syntax unified
	.arm
	.fpu softvfp
	.type	ll_rotation, %function
ll_rotation:
	@ 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]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #108]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #104]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #108]
	ldr	r3, [fp, #-8]
	b	.L14
.L15:
.L14:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ll_rotation, .-ll_rotation
	.align	2
	.global	lr_rotation
	.syntax unified
	.arm
	.fpu softvfp
	.type	lr_rotation, %function
lr_rotation:
	@ 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]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	rr_rotation
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #104]
	ldr	r0, [fp, #-16]
	bl	ll_rotation
	mov	r3, r0
	b	.L17
.L18:
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	lr_rotation, .-lr_rotation
	.align	2
	.global	rl_rotation
	.syntax unified
	.arm
	.fpu softvfp
	.type	rl_rotation, %function
rl_rotation:
	@ 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]
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	ll_rotation
	mov	r2, r0
	ldr	r3, [fp, #-16]
	str	r2, [r3, #108]
	ldr	r0, [fp, #-16]
	bl	rr_rotation
	mov	r3, r0
	b	.L20
.L21:
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	rl_rotation, .-rl_rotation
	.align	2
	.global	balance
	.syntax unified
	.arm
	.fpu softvfp
	.type	balance, %function
balance:
	@ 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]
	cmp	r3, #0
	beq	.L24
	ldr	r0, [fp, #-16]
	bl	balance_factor
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L25
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	balance_factor
	mov	r3, r0
	cmp	r3, #0
	ble	.L26
	ldr	r0, [fp, #-16]
	bl	ll_rotation
	str	r0, [fp, #-16]
	b	.L25
.L26:
	ldr	r0, [fp, #-16]
	bl	lr_rotation
	str	r0, [fp, #-16]
.L25:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bge	.L24
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	balance_factor
	mov	r3, r0
	cmp	r3, #0
	ble	.L27
	ldr	r0, [fp, #-16]
	bl	rl_rotation
	str	r0, [fp, #-16]
	b	.L24
.L27:
	ldr	r0, [fp, #-16]
	bl	rr_rotation
	str	r0, [fp, #-16]
.L24:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	balance, .-balance
	.align	2
	.global	add_node
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_node, %function
add_node:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	get_node
	mov	r3, r0
	b	.L31
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L32
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #104]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #104]
	ldr	r0, [fp, #-8]
	bl	balance
	str	r0, [fp, #-8]
.L32:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L33
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #108]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #108]
	ldr	r0, [fp, #-8]
	bl	balance
	str	r0, [fp, #-8]
.L33:
	ldr	r3, [fp, #-8]
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	add_node, .-add_node
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_bst
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_bst, %function
create_bst:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L38+4
	bl	__isoc99_scanf
	b	.L35
.L36:
	sub	r3, fp, #112
	mov	r1, r3
	ldr	r0, .L38+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-120]
	ldr	r3, [r3]
	ldr	r2, [fp, #-112]
	sub	r1, fp, #108
	mov	r0, r3
	bl	add_node
	mov	r2, r0
	ldr	r3, [fp, #-120]
	str	r2, [r3]
	ldr	r3, [fp, #-116]
	sub	r3, r3, #1
	str	r3, [fp, #-116]
.L35:
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	bne	.L36
	nop
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L37
	bl	__stack_chk_fail
.L37:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	.LC1
	.word	.LC0
	.size	create_bst, .-create_bst
	.section	.rodata
	.align	2
.LC2:
	.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	.L43
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L44
	bl	printf
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #104]
	mov	r0, r3
	bl	preorder
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #108]
	mov	r0, r3
	bl	preorder
	b	.L40
.L43:
	nop
.L40:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC2
	.size	preorder, .-preorder
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.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
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #12
	mov	r0, r3
	bl	create_bst
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	preorder
	nop
	ldr	r3, .L48
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
