	.file	"extr_lprops.c_adjust_lpt_heap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adjust_lpt_heap, @function
adjust_lpt_heap:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rdi, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	mov	esi, r8d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, ecx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	get_heap_comp_val@PLT
	mov	r15d, eax
	test	ebx, ebx
	jne	.L2
	mov	r8d, 1
.L6:
	cmp	DWORD PTR [r12], r8d
	jle	.L1
	mov	rsi, QWORD PTR 8[r12]
.L4:
	movsx	rax, r8d
	mov	DWORD PTR 4[rsp], r8d
	mov	rdi, QWORD PTR [rsi+rax*8]
	mov	esi, r14d
	lea	rbp, 0[0+rax*8]
	call	get_heap_comp_val@PLT
	mov	r8d, DWORD PTR 4[rsp]
	lea	r9d, 2[rbx+rbx]
	cmp	r15d, eax
	mov	edx, eax
	jl	.L17
	cmp	DWORD PTR [r12], r9d
	jle	.L1
	mov	rdx, QWORD PTR 8[r12]
	movsx	rax, r9d
	mov	esi, r14d
	mov	DWORD PTR 4[rsp], r9d
	lea	rbp, 0[0+rax*8]
	mov	rdi, QWORD PTR [rdx+rax*8]
	call	get_heap_comp_val@PLT
	mov	r9d, DWORD PTR 4[rsp]
	cmp	r15d, eax
	jl	.L18
.L1:
	add	rsp, 24
	.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
.L17:
	.cfi_restore_state
	mov	eax, DWORD PTR [r12]
	mov	rsi, QWORD PTR 8[r12]
	cmp	eax, r9d
	jg	.L19
.L8:
	add	rbp, rsi
	mov	rdx, QWORD PTR 0[rbp]
	mov	DWORD PTR [rdx], ebx
	mov	QWORD PTR [rsi+rbx*8], rdx
	movsx	rbx, r8d
	mov	QWORD PTR 0[rbp], r13
	mov	DWORD PTR 0[r13], r8d
.L10:
	lea	r8d, 1[rbx+rbx]
	cmp	r8d, eax
	jl	.L4
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rsi, QWORD PTR 8[r12]
	add	rbp, rsi
	mov	rax, QWORD PTR 0[rbp]
	mov	DWORD PTR [rax], ebx
	mov	QWORD PTR [rsi+rbx*8], rax
	mov	eax, DWORD PTR [r12]
	movsx	rbx, r9d
	mov	QWORD PTR 0[rbp], r13
	mov	DWORD PTR 0[r13], r9d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L2:
	lea	eax, -1[rbx]
	mov	esi, r14d
	mov	ebp, eax
	shr	ebp, 31
	add	ebp, eax
	mov	rax, QWORD PTR 8[r12]
	sar	ebp
	movsx	rdx, ebp
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	get_heap_comp_val@PLT
	cmp	r15d, eax
	jg	.L5
	lea	r8d, 1[rbx+rbx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L20:
	lea	eax, -1[rbp]
	movsx	rbx, ebp
	mov	edx, eax
	shr	edx, 31
	add	edx, eax
	sar	edx
	movsx	rax, edx
	mov	DWORD PTR 4[rsp], edx
	mov	rdi, QWORD PTR [rsi+rax*8]
	mov	esi, r14d
	call	get_heap_comp_val@PLT
	cmp	r15d, eax
	jle	.L1
	mov	edx, DWORD PTR 4[rsp]
	mov	ebp, edx
.L5:
	mov	rsi, QWORD PTR 8[r12]
	movsx	rax, ebp
	lea	rax, [rsi+rax*8]
	mov	rdx, QWORD PTR [rax]
	mov	DWORD PTR [rdx], ebx
	mov	QWORD PTR [rsi+rbx*8], rdx
	mov	QWORD PTR [rax], r13
	mov	DWORD PTR 0[r13], ebp
	test	ebp, ebp
	jne	.L20
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, QWORD PTR 8[rsi+rbp]
	mov	esi, r14d
	mov	DWORD PTR 8[rsp], r9d
	mov	DWORD PTR 4[rsp], edx
	mov	DWORD PTR 12[rsp], r8d
	call	get_heap_comp_val@PLT
	mov	edx, DWORD PTR 4[rsp]
	mov	rsi, QWORD PTR 8[r12]
	mov	r9d, DWORD PTR 8[rsp]
	cmp	edx, eax
	jl	.L9
	mov	eax, DWORD PTR [r12]
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	movsx	rbp, r9d
	mov	eax, DWORD PTR [r12]
	mov	r8d, r9d
	sal	rbp, 3
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	adjust_lpt_heap, .-adjust_lpt_heap
	.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_lprops.c_adjust_lpt_heap.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_lpt_heap, %function
adjust_lpt_heap:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #12
	ldr	r10, [sp, #48]
	mov	r4, r3
	mov	r5, r1
	mov	r0, r2
	mov	r1, r10
	mov	r6, r2
	bl	get_heap_comp_val
	cmp	r4, #0
	mov	r8, r0
	bne	.L2
	mov	fp, r4
	mov	r7, #1
.L6:
	ldr	r3, [r5]
	cmp	r3, r7
	ble	.L1
	ldr	r1, [r5, #4]
.L4:
	ldr	r0, [r1, r7, lsl #2]
	mov	r1, r10
	bl	get_heap_comp_val
	add	r3, r4, #1
	lsl	r2, r3, #1
	cmp	r8, r0
	str	r2, [sp]
	mov	r9, r0
	lsl	r2, r7, #2
	blt	.L17
	ldr	r1, [r5]
	lsl	r2, r3, #1
	cmp	r1, r2
	ble	.L1
	ldr	r0, [r5, #4]
	mov	r1, r10
	ldr	r0, [r0, r3, lsl #3]
	str	r3, [sp, #4]
	bl	get_heap_comp_val
	cmp	r8, r0
	ldr	r3, [sp, #4]
	blt	.L18
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	ldr	r3, [sp]
	ldm	r5, {r0, r1}
	cmp	r0, r3
	bgt	.L19
.L8:
	ldr	r3, [r1, r2]
	str	r4, [r3]
	str	r3, [r1, r4, lsl #2]
	mov	r4, r7
	str	r6, [r1, r2]
	str	r7, [r6]
.L10:
	lsl	fp, r4, #1
	add	r7, fp, #1
	cmp	r7, r0
	blt	.L4
	b	.L1
.L18:
	ldm	r5, {r0, r1}
	ldr	ip, [r1, r3, lsl #3]
	str	r4, [ip]
	str	ip, [r1, r4, lsl #2]
	str	r6, [r1, r3, lsl #3]
	ldr	r3, [sp]
	mov	r4, r3
	str	r3, [r6]
	b	.L10
.L2:
	sub	r7, r4, #1
	ldr	r3, [r5, #4]
	add	r7, r7, r7, lsr #31
	asr	r7, r7, #1
	ldr	r0, [r3, r7, lsl #2]
	mov	r1, r10
	bl	get_heap_comp_val
	cmp	r8, r0
	lslle	fp, r4, #1
	addle	r7, fp, #1
	ble	.L6
	b	.L5
.L20:
	mov	r1, r10
	ldr	r0, [r3, r9, lsl #2]
	bl	get_heap_comp_val
	cmp	r8, r0
	mov	r4, r7
	ble	.L1
	mov	r7, r9
.L5:
	sub	r3, r7, #1
	add	r3, r3, r3, lsr #31
	asr	r9, r3, #1
	ldr	r3, [r5, #4]
	cmp	r7, #0
	ldr	r2, [r3, r7, lsl #2]
	str	r4, [r2]
	str	r2, [r3, r4, lsl #2]
	str	r6, [r3, r7, lsl #2]
	str	r7, [r6]
	bne	.L20
	b	.L1
.L19:
	add	fp, fp, #2
	ldr	r0, [r1, fp, lsl #2]
	mov	r1, r10
	str	r2, [sp]
	bl	get_heap_comp_val
	lsl	r3, fp, #2
	cmp	r9, r0
	movlt	r7, fp
	ldmge	r5, {r0, r1}
	ldmlt	r5, {r0, r1}
	movlt	r2, r3
	ldrge	r2, [sp]
	b	.L8
	.size	adjust_lpt_heap, .-adjust_lpt_heap
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
