	.file	"extr_vm_shared_region_pager.c_shared_region_pager_deallocate_internal.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	shared_region_pager_deallocate_internal
	.type	shared_region_pager_deallocate_internal, @function
shared_region_pager_deallocate_internal:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	test	rsi, rsi
	je	.L12
.L2:
	mov	eax, DWORD PTR shared_region_pager_count[rip]
	sub	eax, DWORD PTR shared_region_pager_count_mapped[rip]
	cmp	DWORD PTR shared_region_pager_cache_limit[rip], eax
	mov	rbx, QWORD PTR FALSE[rip]
	jge	.L4
	mov	rbx, QWORD PTR TRUE[rip]
.L4:
	mov	eax, DWORD PTR 0[rbp]
	sub	eax, 1
	mov	DWORD PTR 0[rbp], eax
	cmp	eax, 1
	je	.L13
	lea	rdi, shared_region_pager_lock[rip]
	test	eax, eax
	je	.L14
	call	lck_mtx_unlock@PLT
.L6:
	test	rbx, rbx
	jne	.L15
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	call	lck_mtx_unlock@PLT
	mov	rdi, QWORD PTR 8[rbp]
	cmp	rdi, QWORD PTR MEMORY_OBJECT_CONTROL_NULL[rip]
	je	.L8
	call	memory_object_control_deallocate@PLT
	mov	rax, QWORD PTR MEMORY_OBJECT_CONTROL_NULL[rip]
	mov	QWORD PTR 8[rbp], rax
.L8:
	mov	esi, 16
	mov	rdi, rbp
	call	kfree@PLT
	test	rbx, rbx
	je	.L1
.L15:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	shared_region_pager_trim@PLT
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rdi, shared_region_pager_lock[rip]
	call	lck_mtx_lock@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, rbp
	call	shared_region_pager_dequeue@PLT
	lea	rdi, shared_region_pager_lock[rip]
	call	lck_mtx_unlock@PLT
	mov	rdi, rbp
	call	shared_region_pager_terminate_internal@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	shared_region_pager_deallocate_internal, .-shared_region_pager_deallocate_internal
	.comm	shared_region_pager_lock,4,4
	.comm	shared_region_pager_count_mapped,4,4
	.comm	shared_region_pager_count,4,4
	.comm	shared_region_pager_cache_limit,4,4
	.comm	TRUE,8,8
	.comm	SHARED_REGION_PAGER_NULL,8,8
	.comm	MEMORY_OBJECT_CONTROL_NULL,8,8
	.comm	FALSE,8,8
	.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_vm_shared_region_pager.c_shared_region_pager_deallocate_internal.c"
	.text
	.align	2
	.global	shared_region_pager_deallocate_internal
	.syntax unified
	.arm
	.fpu softvfp
	.type	shared_region_pager_deallocate_internal, %function
shared_region_pager_deallocate_internal:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	beq	.L12
.L2:
	ldr	r3, .L16
	ldr	r1, .L16+4
	ldr	r2, .L16+8
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	sub	r3, r3, r1
	cmp	r2, r3
	ldrlt	r3, .L16+12
	ldrge	r3, .L16+16
	ldr	r5, [r3]
	ldr	r3, [r4]
	sub	r3, r3, #1
	cmp	r3, #1
	str	r3, [r4]
	beq	.L13
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L16+20
	bl	lck_mtx_unlock
	cmp	r5, #0
	popeq	{r4, r5, r6, pc}
.L15:
	pop	{r4, r5, r6, lr}
	b	shared_region_pager_trim
.L14:
	ldr	r6, .L16+24
	ldr	r0, .L16+20
	bl	lck_mtx_unlock
	ldr	r3, [r6]
	ldr	r0, [r4, #4]
	cmp	r0, r3
	beq	.L8
	bl	memory_object_control_deallocate
	ldr	r3, [r6]
	str	r3, [r4, #4]
.L8:
	mov	r0, r4
	mov	r1, #8
	bl	kfree
	cmp	r5, #0
	popeq	{r4, r5, r6, pc}
	b	.L15
.L12:
	ldr	r0, .L16+20
	bl	lck_mtx_lock
	b	.L2
.L13:
	mov	r0, r4
	bl	shared_region_pager_dequeue
	ldr	r0, .L16+20
	bl	lck_mtx_unlock
	mov	r0, r4
	bl	shared_region_pager_terminate_internal
	cmp	r5, #0
	popeq	{r4, r5, r6, pc}
	b	.L15
.L17:
	.align	2
.L16:
	.word	shared_region_pager_count
	.word	shared_region_pager_count_mapped
	.word	shared_region_pager_cache_limit
	.word	TRUE
	.word	FALSE
	.word	shared_region_pager_lock
	.word	MEMORY_OBJECT_CONTROL_NULL
	.size	shared_region_pager_deallocate_internal, .-shared_region_pager_deallocate_internal
	.comm	shared_region_pager_lock,4,4
	.comm	shared_region_pager_count_mapped,4,4
	.comm	shared_region_pager_count,4,4
	.comm	shared_region_pager_cache_limit,4,4
	.comm	TRUE,4,4
	.comm	SHARED_REGION_PAGER_NULL,4,4
	.comm	MEMORY_OBJECT_CONTROL_NULL,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
