	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_coalesce             ## -- Begin function vm_object_coalesce
	.p2align	4, 0x90
_vm_object_coalesce:                    ## @vm_object_coalesce
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%r8d, %r12d
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_VM_OBJECT_WLOCK
	movq	(%rbx), %rax
	movq	_OBJT_DEFAULT@GOTPCREL(%rip), %rcx
	movq	_OBJT_SWAP@GOTPCREL(%rip), %rdx
	movq	_FALSE@GOTPCREL(%rip), %r14
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	cmpq	(%rdx), %rax
	jne	LBB0_18
LBB0_4:
	movq	_OBJ_NOSPLIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	jne	LBB0_18
## %bb.5:
	movq	%rbx, %rdi
	callq	_vm_object_collapse
	cmpq	$0, 40(%rbx)
	jne	LBB0_18
## %bb.6:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %r13
	sarq	%cl, -48(%rbp)                  ## 8-byte Folded Spill
	movl	%r15d, %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r15
	addq	%r13, %r15
	cmpl	$2, 12(%rbx)
	jl	LBB0_9
## %bb.7:
	cmpq	%r15, 16(%rbx)
	je	LBB0_9
## %bb.8:
	movq	_OBJ_ONEMAPPING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_18
LBB0_9:
	cmpq	$0, 32(%rbx)
	je	LBB0_13
## %bb.10:
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ptoa
	movq	32(%rbx), %rsi
	movq	%rax, %rdi
	callq	_swap_reserve_by_cred
	testl	%eax, %eax
	je	LBB0_18
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ptoa
	addq	%rax, 24(%rbx)
LBB0_13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r15,%r14), %r12
	cmpq	16(%rbx), %r15
	jge	LBB0_16
## %bb.14:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_vm_object_page_remove
	movq	(%rbx), %rax
	movq	_OBJT_SWAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_swap_pager_freespace
LBB0_16:
	movq	_TRUE@GOTPCREL(%rip), %r14
	cmpq	16(%rbx), %r12
	jle	LBB0_18
## %bb.17:
	movq	%r12, 16(%rbx)
LBB0_18:
	movq	%rbx, %rdi
	callq	_VM_OBJECT_WUNLOCK
	jmp	LBB0_19
LBB0_1:
	movq	_TRUE@GOTPCREL(%rip), %r14
LBB0_19:
	movl	(%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_OBJT_DEFAULT,8,3               ## @OBJT_DEFAULT
	.comm	_OBJT_SWAP,8,3                  ## @OBJT_SWAP
	.comm	_OBJ_NOSPLIT,4,2                ## @OBJ_NOSPLIT
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_OBJ_ONEMAPPING,4,2             ## @OBJ_ONEMAPPING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_coalesce             ; -- Begin function vm_object_coalesce
	.p2align	2
_vm_object_coalesce:                    ; @vm_object_coalesce
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
	bl	_VM_OBJECT_WLOCK
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _OBJT_DEFAULT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OBJT_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x24, _OBJT_SWAP@GOTPAGE
Lloh4:
	ldr	x24, [x24, _OBJT_SWAP@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _OBJ_NOSPLIT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OBJ_NOSPLIT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_vm_object_collapse
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_8
LBB0_4:
Lloh8:
	adrp	x20, _FALSE@GOTPAGE
Lloh9:
	ldr	x20, [x20, _FALSE@GOTPAGEOFF]
LBB0_5:
	mov	x0, x19
	bl	_VM_OBJECT_WUNLOCK
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x20, _TRUE@GOTPAGE
Lloh11:
	ldr	x20, [x20, _TRUE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh12:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	x25, [x8]
	asr	x23, x23, x25
	mov	x0, x20
	bl	_OFF_TO_IDX
	add	x20, x0, x23
	ldr	w8, [x19, #12]
	cmp	w8, #2
	b.lt	LBB0_11
; %bb.9:
	ldr	x8, [x19, #16]
	cmp	x8, x20
	b.eq	LBB0_11
; %bb.10:
	ldr	w8, [x19, #8]
Lloh15:
	adrp	x9, _OBJ_ONEMAPPING@GOTPAGE
Lloh16:
	ldr	x9, [x9, _OBJ_ONEMAPPING@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_11:
	asr	x22, x22, x25
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_15
; %bb.12:
	cbnz	w21, LBB0_14
; %bb.13:
	mov	x0, x22
	bl	_ptoa
	ldr	x1, [x19, #32]
	bl	_swap_reserve_by_cred
	cbz	w0, LBB0_4
LBB0_14:
	mov	x0, x22
	bl	_ptoa
	ldr	x8, [x19, #24]
	add	x8, x8, x0
	str	x8, [x19, #24]
LBB0_15:
	ldr	x8, [x19, #16]
	add	x21, x20, x22
	cmp	x20, x8
	b.ge	LBB0_18
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	w3, #0
	bl	_vm_object_page_remove
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_swap_pager_freespace
LBB0_18:
	ldr	x8, [x19, #16]
	cmp	x21, x8
	b.le	LBB0_20
; %bb.19:
	str	x21, [x19, #16]
LBB0_20:
Lloh18:
	adrp	x20, _TRUE@GOTPAGE
Lloh19:
	ldr	x20, [x20, _TRUE@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_OBJT_DEFAULT,8,3               ; @OBJT_DEFAULT
	.comm	_OBJT_SWAP,8,3                  ; @OBJT_SWAP
	.comm	_OBJ_NOSPLIT,4,2                ; @OBJ_NOSPLIT
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_OBJ_ONEMAPPING,4,2             ; @OBJ_ONEMAPPING
.subsections_via_symbols
