	.file	"extr_avl.c_avl_rotation.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	avl_rotation, @function
avl_rotation:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	not	r14d
	mov	r13d, 1
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	shr	r14d, 31
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	sar	r12d
	mov	ebp, edx
	sub	r13d, r14d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	QWORD PTR 24[rsp], rdi
	mov	rdi, rsi
	mov	DWORD PTR 8[rsp], r14d
	mov	DWORD PTR 4[rsp], r12d
	call	AVL_XPARENT@PLT
	movsx	rdx, ebp
	mov	rdi, r15
	sar	rdx, 63
	mov	rbx, rax
	mov	rax, QWORD PTR [r15]
	not	rdx
	and	edx, 8
	mov	rbp, QWORD PTR [rax+rdx]
	mov	QWORD PTR 16[rsp], rdx
	call	AVL_XCHILD@PLT
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], eax
	call	AVL_XBALANCE@PLT
	movsx	rcx, r13d
	mov	rdx, QWORD PTR 16[rsp]
	mov	r14d, eax
	mov	eax, r12d
	lea	r10, 0[0+rcx*8]
	add	r12d, r14d
	je	.L2
	mov	r12d, r14d
	mov	rcx, QWORD PTR [r15]
	mov	QWORD PTR 16[rsp], r10
	sub	r12d, eax
	mov	rax, r10
	add	rax, QWORD PTR 0[rbp]
	mov	rdi, QWORD PTR [rax]
	mov	QWORD PTR [rcx+rdx], rdi
	test	rdi, rdi
	je	.L3
	mov	rsi, r15
	mov	QWORD PTR 32[rsp], rdi
	call	AVL_SETPARENT@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 32[rsp]
	call	AVL_SETCHILD@PLT
	mov	r10, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 0[rbp]
	add	rax, r10
.L3:
	mov	QWORD PTR [rax], r15
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, r15
	sub	esi, r14d
	call	AVL_SETBALANCE@PLT
	mov	rdi, r15
	mov	esi, r13d
	call	AVL_SETCHILD@PLT
	mov	rdi, r15
	mov	rsi, rbp
	call	AVL_SETPARENT@PLT
	mov	esi, r12d
	mov	rdi, rbp
	call	AVL_SETBALANCE@PLT
	mov	r15d, DWORD PTR 12[rsp]
	mov	rdi, rbp
	mov	esi, r15d
	call	AVL_SETCHILD@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	AVL_SETPARENT@PLT
	test	rbx, rbx
	je	.L4
	mov	rdx, QWORD PTR [rbx]
	movsx	rax, r15d
	mov	QWORD PTR [rdx+rax*8], rbp
.L5:
	xor	eax, eax
	cmp	DWORD PTR 4[rsp], r14d
	sete	al
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, r10
	add	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR 16[rsp], r10
	mov	r12, QWORD PTR [rax]
	mov	rsi, QWORD PTR [r12]
	mov	r11, QWORD PTR [rsi+rdx]
	mov	rdi, QWORD PTR [rsi+rcx*8]
	mov	rsi, QWORD PTR [r15]
	mov	QWORD PTR [rsi+rdx], rdi
	test	rdi, rdi
	je	.L7
	mov	rsi, r15
	mov	QWORD PTR 56[rsp], rcx
	mov	QWORD PTR 48[rsp], rdx
	mov	QWORD PTR 40[rsp], r11
	mov	QWORD PTR 32[rsp], rdi
	call	AVL_SETPARENT@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 32[rsp]
	call	AVL_SETCHILD@PLT
	mov	r10, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 0[rbp]
	mov	rcx, QWORD PTR 56[rsp]
	mov	rdx, QWORD PTR 48[rsp]
	mov	r11, QWORD PTR 40[rsp]
	add	rax, r10
.L7:
	mov	QWORD PTR [rax], r11
	test	r11, r11
	je	.L8
	mov	rdi, r11
	mov	rsi, rbp
	mov	QWORD PTR 40[rsp], rcx
	mov	QWORD PTR 32[rsp], rdx
	mov	QWORD PTR 16[rsp], r11
	call	AVL_SETPARENT@PLT
	mov	r11, QWORD PTR 16[rsp]
	mov	esi, r13d
	mov	rdi, r11
	call	AVL_SETCHILD@PLT
	mov	rcx, QWORD PTR 40[rsp]
	mov	rdx, QWORD PTR 32[rsp]
.L8:
	mov	rdi, r12
	mov	QWORD PTR 32[rsp], rcx
	mov	QWORD PTR 16[rsp], rdx
	call	AVL_XBALANCE@PLT
	mov	rdx, QWORD PTR 16[rsp]
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	mov	r10d, eax
	mov	rax, QWORD PTR [r12]
	mov	DWORD PTR 16[rsp], r10d
	mov	QWORD PTR [rax+rdx], rbp
	xor	edx, edx
	cmp	r14d, r10d
	cmovne	esi, edx
	call	AVL_SETBALANCE@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	AVL_SETPARENT@PLT
	mov	esi, DWORD PTR 8[rsp]
	mov	rdi, rbp
	call	AVL_SETCHILD@PLT
	mov	rcx, QWORD PTR 32[rsp]
	mov	rax, QWORD PTR [r12]
	mov	rdi, r15
	mov	r10d, DWORD PTR 16[rsp]
	mov	edx, 0
	cmp	DWORD PTR 4[rsp], r10d
	cmovne	r14d, edx
	mov	QWORD PTR [rax+rcx*8], r15
	mov	esi, r14d
	call	AVL_SETBALANCE@PLT
	mov	rdi, r15
	mov	rsi, r12
	call	AVL_SETPARENT@PLT
	mov	rdi, r15
	mov	esi, r13d
	call	AVL_SETCHILD@PLT
	xor	esi, esi
	mov	rdi, r12
	call	AVL_SETBALANCE@PLT
	mov	rsi, rbx
	mov	rdi, r12
	call	AVL_SETPARENT@PLT
	mov	r15d, DWORD PTR 12[rsp]
	mov	rdi, r12
	mov	esi, r15d
	call	AVL_SETCHILD@PLT
	test	rbx, rbx
	je	.L11
	mov	rdx, QWORD PTR [rbx]
	movsx	rax, r15d
	mov	QWORD PTR [rdx+rax*8], r12
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR [rax], rbp
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 24[rsp]
	mov	QWORD PTR [rax], r12
	add	rsp, 72
	.cfi_def_cfa_offset 56
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	avl_rotation, .-avl_rotation
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_avl.c_avl_rotation.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	avl_rotation, %function
avl_rotation:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	str	r3, [sp, #12]
	mvn	r3, r2
	mov	r4, r2
	mov	r5, r1
	mov	r0, r1
	lsr	r3, r3, #31
	str	r3, [sp, #4]
	bl	AVL_XPARENT
	cmp	r4, #0
	movge	fp, #4
	movlt	fp, #0
	ldr	r3, [r5]
	mov	r8, r0
	mov	r0, r5
	ldr	r6, [r3, fp]
	bl	AVL_XCHILD
	mov	r3, r0
	mov	r0, r6
	str	r3, [sp, #8]
	bl	AVL_XBALANCE
	lsr	r10, r4, #31
	asr	r4, r4, #1
	mov	r7, r0
	cmn	r0, r4
	lsl	r0, r10, #2
	str	r0, [sp]
	beq	.L2
	ldr	r2, [r6]
	ldr	r1, [r5]
	ldr	r3, [r2, r10, lsl #2]
	sub	r9, r7, r4
	cmp	r3, #0
	add	r2, r2, r0
	str	r3, [r1, fp]
	beq	.L3
	mov	r1, r5
	mov	r0, r3
	str	r3, [sp, #16]
	bl	AVL_SETPARENT
	ldr	r3, [sp, #16]
	ldr	r1, [sp, #4]
	mov	r0, r3
	bl	AVL_SETCHILD
	ldr	r2, [r6]
	ldr	r0, [sp]
	add	r2, r2, r0
.L3:
	str	r5, [r2]
	sub	r1, r4, r7
	mov	r0, r5
	bl	AVL_SETBALANCE
	mov	r1, r10
	mov	r0, r5
	bl	AVL_SETCHILD
	mov	r1, r6
	mov	r0, r5
	bl	AVL_SETPARENT
	mov	r1, r9
	mov	r0, r6
	bl	AVL_SETBALANCE
	ldr	r5, [sp, #8]
	mov	r0, r6
	mov	r1, r5
	bl	AVL_SETCHILD
	mov	r1, r8
	mov	r0, r6
	bl	AVL_SETPARENT
	sub	r0, r4, r7
	clz	r0, r0
	cmp	r8, #0
	ldrne	r3, [r8]
	ldreq	r3, [sp, #12]
	lsr	r0, r0, #5
	strne	r6, [r3, r5, lsl #2]
	streq	r6, [r3]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, [r6]
	ldr	r2, [sp]
	ldr	r9, [r3, r10, lsl #2]
	add	r1, r3, r2
	ldr	r3, [r9]
	ldr	r0, [r5]
	ldr	r2, [r3, r10, lsl #2]
	ldr	r3, [r3, fp]
	cmp	r2, #0
	str	r2, [r0, fp]
	beq	.L7
	mov	r1, r5
	mov	r0, r2
	str	r3, [sp, #20]
	str	r2, [sp, #16]
	bl	AVL_SETPARENT
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #4]
	mov	r0, r2
	bl	AVL_SETCHILD
	ldr	r1, [r6]
	ldr	r2, [sp]
	ldr	r3, [sp, #20]
	add	r1, r1, r2
.L7:
	cmp	r3, #0
	str	r3, [r1]
	beq	.L8
	mov	r1, r6
	mov	r0, r3
	str	r3, [sp]
	bl	AVL_SETPARENT
	ldr	r3, [sp]
	mov	r1, r10
	mov	r0, r3
	bl	AVL_SETCHILD
.L8:
	mov	r0, r9
	bl	AVL_XBALANCE
	ldr	r2, [r9]
	cmp	r7, r0
	moveq	r1, r4
	movne	r1, #0
	str	r6, [r2, fp]
	str	r0, [sp]
	mov	r0, r6
	bl	AVL_SETBALANCE
	mov	r1, r9
	mov	r0, r6
	bl	AVL_SETPARENT
	ldr	r1, [sp, #4]
	mov	r0, r6
	bl	AVL_SETCHILD
	ldr	r3, [sp]
	ldr	r2, [r9]
	cmp	r4, r3
	moveq	r1, r7
	movne	r1, #0
	str	r5, [r2, r10, lsl #2]
	mov	r0, r5
	bl	AVL_SETBALANCE
	mov	r1, r9
	mov	r0, r5
	bl	AVL_SETPARENT
	mov	r1, r10
	mov	r0, r5
	bl	AVL_SETCHILD
	mov	r1, #0
	mov	r0, r9
	bl	AVL_SETBALANCE
	mov	r1, r8
	mov	r0, r9
	bl	AVL_SETPARENT
	ldr	r4, [sp, #8]
	mov	r0, r9
	mov	r1, r4
	bl	AVL_SETCHILD
	cmp	r8, #0
	movne	r0, #1
	moveq	r0, #1
	ldrne	r3, [r8]
	ldreq	r3, [sp, #12]
	strne	r9, [r3, r4, lsl #2]
	streq	r9, [r3]
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
	.size	avl_rotation, .-avl_rotation
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
