	.file	"extr_vm_object.c_vm_object_coalesce.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	vm_object_coalesce
	.type	vm_object_coalesce, @function
vm_object_coalesce:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L23
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, r8d
	call	VM_OBJECT_WLOCK@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR OBJT_DEFAULT[rip]
	je	.L4
	cmp	rax, QWORD PTR OBJT_SWAP[rip]
	jne	.L21
.L4:
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR OBJ_NOSPLIT[rip], eax
	jne	.L21
	mov	rdi, rbp
	call	vm_object_collapse@PLT
	cmp	QWORD PTR 40[rbp], 0
	je	.L7
.L21:
	mov	rdi, rbp
	call	VM_OBJECT_WUNLOCK@PLT
	mov	eax, DWORD PTR FALSE[rip]
.L1:
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L23:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	mov	eax, DWORD PTR TRUE[rip]
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	edi, r12d
	sar	r13, cl
	sar	r14, cl
	call	OFF_TO_IDX@PLT
	add	r13, rax
	cmp	DWORD PTR 12[rbp], 1
	jle	.L8
	cmp	QWORD PTR 16[rbp], r13
	je	.L8
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR OBJ_ONEMAPPING[rip], eax
	je	.L21
.L8:
	mov	r12, QWORD PTR 32[rbp]
	test	r12, r12
	je	.L9
	test	ebx, ebx
	je	.L24
.L10:
	mov	rdi, r14
	call	ptoa@PLT
	add	QWORD PTR 24[rbp], rax
.L9:
	mov	rax, QWORD PTR 16[rbp]
	lea	rbx, [r14+r13]
	cmp	rax, r13
	jg	.L25
.L11:
	cmp	rbx, rax
	jle	.L13
	mov	QWORD PTR 16[rbp], rbx
.L13:
	mov	rdi, rbp
	call	VM_OBJECT_WUNLOCK@PLT
	mov	eax, DWORD PTR TRUE[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, r14
	call	ptoa@PLT
	mov	rsi, r12
	mov	rdi, rax
	call	swap_reserve_by_cred@PLT
	test	eax, eax
	jne	.L10
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L25:
	xor	ecx, ecx
	mov	rdx, rbx
	mov	rsi, r13
	mov	rdi, rbp
	call	vm_object_page_remove@PLT
	mov	rax, QWORD PTR OBJT_SWAP[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L12
.L20:
	mov	rax, QWORD PTR 16[rbp]
	jmp	.L11
.L12:
	mov	rdx, r14
	mov	rsi, r13
	mov	rdi, rbp
	call	swap_pager_freespace@PLT
	jmp	.L20
	.cfi_endproc
.LFE0:
	.size	vm_object_coalesce, .-vm_object_coalesce
	.comm	TRUE,4,4
	.comm	PAGE_SHIFT,8,8
	.comm	OBJ_ONEMAPPING,4,4
	.comm	OBJ_NOSPLIT,4,4
	.comm	OBJT_SWAP,8,8
	.comm	OBJT_DEFAULT,8,8
	.comm	FALSE,4,4
	.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_object.c_vm_object_coalesce.c"
	.text
	.align	2
	.global	vm_object_coalesce
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_object_coalesce, %function
vm_object_coalesce:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r0, #0
	beq	.L19
	mov	r6, r2
	mov	r5, r3
	mov	r7, r1
	bl	VM_OBJECT_WLOCK
	ldr	r2, .L23
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, .L23+4
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L20
.L4:
	ldr	r3, .L23+8
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L20
	mov	r0, r4
	bl	vm_object_collapse
	ldr	r3, [r4, #24]
	cmp	r3, #0
	beq	.L7
.L20:
	mov	r0, r4
	bl	VM_OBJECT_WUNLOCK
	ldr	r3, .L23+12
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r3, .L23+16
	mov	r0, r7
	ldr	r3, [r3]
	asr	r6, r6, r3
	asr	r5, r5, r3
	bl	OFF_TO_IDX
	ldr	r3, [r4, #8]
	add	r6, r0, r6
	cmp	r3, #1
	ble	.L8
	ldr	r3, [r4, #12]
	cmp	r3, r6
	beq	.L8
	ldr	r3, .L23+20
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L20
.L8:
	ldr	r3, [r4, #20]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [sp, #24]
	cmp	r3, #0
	bne	.L10
	mov	r0, r5
	bl	ptoa
	ldr	r1, [r4, #20]
	bl	swap_reserve_by_cred
	cmp	r0, #0
	beq	.L20
.L10:
	mov	r0, r5
	bl	ptoa
	ldr	r3, [r4, #16]
	add	r3, r3, r0
	str	r3, [r4, #16]
.L9:
	ldr	r3, [r4, #12]
	add	r7, r5, r6
	cmp	r3, r6
	bgt	.L22
.L11:
	cmp	r7, r3
	mov	r0, r4
	strgt	r7, [r4, #12]
	bl	VM_OBJECT_WUNLOCK
.L19:
	ldr	r3, .L23+24
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	mov	r3, #0
	mov	r2, r7
	mov	r1, r6
	mov	r0, r4
	bl	vm_object_page_remove
	ldr	r3, .L23+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L12
.L18:
	ldr	r3, [r4, #12]
	b	.L11
.L12:
	mov	r2, r5
	mov	r1, r6
	mov	r0, r4
	bl	swap_pager_freespace
	b	.L18
.L24:
	.align	2
.L23:
	.word	OBJT_DEFAULT
	.word	OBJT_SWAP
	.word	OBJ_NOSPLIT
	.word	FALSE
	.word	PAGE_SHIFT
	.word	OBJ_ONEMAPPING
	.word	TRUE
	.size	vm_object_coalesce, .-vm_object_coalesce
	.comm	TRUE,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	OBJ_ONEMAPPING,4,4
	.comm	OBJ_NOSPLIT,4,4
	.comm	OBJT_SWAP,4,4
	.comm	OBJT_DEFAULT,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
