	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_collapse             ## -- Begin function vm_object_collapse
	.p2align	4, 0x90
_vm_object_collapse:                    ## @vm_object_collapse
	.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
	movq	%rdi, %r14
	callq	_VM_OBJECT_ASSERT_WLOCKED
	movq	_TRUE@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_28
## %bb.1:
	movq	_OBJT_DEFAULT@GOTPCREL(%rip), %r15
	movq	_OBJT_SWAP@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_refcount_release
	movq	%rbx, %rdi
	callq	_VM_OBJECT_WUNLOCK
	movq	_object_bypasses@GOTPCREL(%rip), %rax
	movq	_OBJT_DEFAULT@GOTPCREL(%rip), %r15
	movq	_TRUE@GOTPCREL(%rip), %r12
	movq	_OBJT_SWAP@GOTPCREL(%rip), %r13
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_counter_u64_add
	cmpq	$0, (%r12)
	je	LBB0_28
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_28
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_VM_OBJECT_WLOCK
	cmpq	$0, 64(%rbx)
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdx
	movq	(%r15), %rcx
	movq	(%r13), %rax
	cmpq	%rcx, %rdx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rax, %rdx
	jne	LBB0_14
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_OBJ_DEAD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_OBJ_NOSPLIT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%edx, %esi
	testl	%esi, 8(%rbx)
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 64(%r14)
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rsi
	cmpq	%rcx, %rsi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rax, %rsi
	jne	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%edx, 8(%r14)
	jne	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	60(%r14), %edi
	callq	_REFCOUNT_COUNT
	testq	%rax, %rax
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	60(%rbx), %edi
	callq	_REFCOUNT_COUNT
	testq	%rax, %rax
	jg	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, 12(%rbx)
	jne	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_vm_object_pip_add
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_vm_object_pip_add
	movq	_OBSC_COLLAPSE_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vm_object_collapse_scan
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r14), %rdi
	callq	_OFF_TO_IDX
	movq	(%r12), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_swap_pager_copy
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_shadow_list@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_LIST_REMOVE
	decl	40(%rbx)
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_VM_OBJECT_WLOCK
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_LIST_REMOVE
	movq	48(%rbx), %rdi
	addq	$44, %rdi
	movl	(%r15), %edx
	movq	%r14, %rsi
	callq	_LIST_INSERT_HEAD
	movq	48(%rbx), %rdi
	callq	_VM_OBJECT_WUNLOCK
	movq	48(%rbx), %rax
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rax
	cmpq	24(%r14), %rax
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_vm_object_scan_all_shadowed
	testl	%eax, %eax
	je	LBB0_14
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	12(%rbx), %r15
	movq	_shadow_list@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_LIST_REMOVE
	decl	40(%rbx)
	movq	48(%rbx), %r12
	movq	%r12, 48(%r14)
	testq	%r12, %r12
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_VM_OBJECT_WLOCK
	leaq	44(%r12), %rdi
	movl	(%r13), %edx
	movq	%r14, %rsi
	callq	_LIST_INSERT_HEAD
	incl	40(%r12)
	movq	%r12, %rdi
	callq	_vm_object_reference_locked
	movq	%r12, %rdi
	callq	_VM_OBJECT_WUNLOCK
	movq	32(%rbx), %rax
	addq	%rax, 32(%r14)
	jmp	LBB0_26
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_OBJT_DEFAULT@GOTPCREL(%rip), %r15
	movq	%rax, 48(%r14)
	movq	32(%rbx), %rax
	addq	%rax, 32(%r14)
	xorl	%edi, %edi
	cmpl	$1, 12(%rbx)
	sete	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	callq	_vm_object_pip_wakeup
	movq	_OBJT_DEAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$0, 12(%rbx)
	movq	%rbx, %rdi
	callq	_VM_OBJECT_WUNLOCK
	movq	%rbx, %rdi
	callq	_vm_object_destroy
	movq	%r14, %rdi
	callq	_vm_object_pip_wakeup
	movq	_object_collapses@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r14, %rdi
	callq	_vm_object_qcollapse
LBB0_14:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VM_OBJECT_WUNLOCK              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_OBJT_DEFAULT,8,3               ## @OBJT_DEFAULT
	.comm	_OBJT_SWAP,8,3                  ## @OBJT_SWAP
	.comm	_OBJ_DEAD,4,2                   ## @OBJ_DEAD
	.comm	_OBJ_NOSPLIT,4,2                ## @OBJ_NOSPLIT
	.comm	_OBSC_COLLAPSE_WAIT,4,2         ## @OBSC_COLLAPSE_WAIT
	.comm	_shadow_list,4,2                ## @shadow_list
	.comm	_OBJT_DEAD,8,3                  ## @OBJT_DEAD
	.comm	_object_collapses,4,2           ## @object_collapses
	.comm	_object_bypasses,4,2            ## @object_bypasses
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_collapse             ; -- Begin function vm_object_collapse
	.p2align	2
_vm_object_collapse:                    ; @vm_object_collapse
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_VM_OBJECT_ASSERT_WLOCKED
Lloh0:
	adrp	x23, _TRUE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TRUE@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_24
; %bb.1:
Lloh2:
	adrp	x24, _OBJT_DEFAULT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _OBJT_DEFAULT@GOTPAGEOFF]
Lloh4:
	adrp	x25, _OBJT_SWAP@GOTPAGE
Lloh5:
	ldr	x25, [x25, _OBJT_SWAP@GOTPAGEOFF]
Lloh6:
	adrp	x26, _OBJ_DEAD@GOTPAGE
Lloh7:
	ldr	x26, [x26, _OBJ_DEAD@GOTPAGEOFF]
Lloh8:
	adrp	x27, _OBJ_NOSPLIT@GOTPAGE
Lloh9:
	ldr	x27, [x27, _OBJ_NOSPLIT@GOTPAGEOFF]
Lloh10:
	adrp	x28, _shadow_list@GOTPAGE
Lloh11:
	ldr	x28, [x28, _shadow_list@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_refcount_release
	mov	x0, x20
	bl	_VM_OBJECT_WUNLOCK
Lloh12:
	adrp	x8, _object_bypasses@GOTPAGE
Lloh13:
	ldr	x8, [x8, _object_bypasses@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x8]
	mov	w1, #1
	bl	_counter_u64_add
	ldr	x8, [x23]
	cbz	x8, LBB0_24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x19, #48]
	cbz	x20, LBB0_24
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_VM_OBJECT_WLOCK
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_26
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x20]
	ldr	x8, [x24]
	ldr	x9, [x25]
	cmp	x10, x8
	ccmp	x10, x9, #4, ne
	b.ne	LBB0_26
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w11, [x20, #8]
	ldr	w10, [x26]
	ldr	w12, [x27]
	orr	w12, w12, w10
	tst	w12, w11
	b.ne	LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x11, [x19, #64]
	cbnz	x11, LBB0_26
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x11, [x19]
	cmp	x11, x8
	ccmp	x11, x9, #4, ne
	b.ne	LBB0_26
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #8]
	tst	w8, w10
	b.ne	LBB0_26
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #60]
	bl	_REFCOUNT_COUNT
	cmp	x0, #0
	b.gt	LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #60]
	bl	_REFCOUNT_COUNT
	cmp	x0, #1
	b.ge	LBB0_25
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x20
	ldr	w8, [x21, #12]!
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_vm_object_pip_add
	mov	x0, x20
	mov	w1, #1
	bl	_vm_object_pip_add
Lloh14:
	adrp	x8, _OBSC_COLLAPSE_WAIT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OBSC_COLLAPSE_WAIT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_vm_object_collapse_scan
	ldr	x8, [x20]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #32]
	bl	_OFF_TO_IDX
	mov	x2, x0
	ldr	x3, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_swap_pager_copy
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	w8, [x20, #40]
	sub	w8, w8, #1
	str	w8, [x20, #40]
	ldr	x0, [x20, #48]
	cbz	x0, LBB0_22
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	bl	_VM_OBJECT_WLOCK
	ldr	w1, [x28]
	mov	x0, x20
	bl	_LIST_REMOVE
	ldr	x8, [x20, #48]
	add	x0, x8, #44
	ldr	w2, [x28]
	mov	x1, x19
	bl	_LIST_INSERT_HEAD
	ldr	x0, [x20, #48]
	bl	_VM_OBJECT_WUNLOCK
	ldr	x8, [x20, #48]
	b	LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x9, [x19, #16]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_vm_object_scan_all_shadowed
	cbz	w0, LBB0_26
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x28]
	mov	x0, x19
	bl	_LIST_REMOVE
	ldr	w8, [x20, #40]
	sub	w8, w8, #1
	str	w8, [x20, #40]
	ldr	x22, [x20, #48]
	str	x22, [x19, #48]
	cbz	x22, LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_VM_OBJECT_WLOCK
	add	x0, x22, #44
	ldr	w2, [x28]
	mov	x1, x19
	bl	_LIST_INSERT_HEAD
	ldr	w8, [x22, #40]
	add	w8, w8, #1
	str	w8, [x22, #40]
	mov	x0, x22
	bl	_vm_object_reference_locked
	mov	x0, x22
	bl	_VM_OBJECT_WUNLOCK
	ldr	x8, [x20, #32]
	ldr	x9, [x19, #32]
	add	x8, x9, x8
	str	x8, [x19, #32]
	b	LBB0_2
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x8, #0
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [x19, #48]
	ldr	x8, [x20, #32]
	ldr	x9, [x19, #32]
	add	x8, x9, x8
	str	x8, [x19, #32]
	ldr	w8, [x20, #12]
	cmp	w8, #1
	cset	w0, eq
	mov	x1, x20
	bl	_KASSERT
	mov	x0, x20
	bl	_vm_object_pip_wakeup
Lloh17:
	adrp	x8, _OBJT_DEAD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OBJT_DEAD@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	x8, [x20]
	str	wzr, [x20, #12]
	mov	x0, x20
	bl	_VM_OBJECT_WUNLOCK
	mov	x0, x20
	bl	_vm_object_destroy
	mov	x0, x19
	bl	_vm_object_pip_wakeup
Lloh20:
	adrp	x8, _object_collapses@GOTPAGE
Lloh21:
	ldr	x8, [x8, _object_collapses@GOTPAGEOFF]
	b	LBB0_3
LBB0_24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	mov	x0, x19
	bl	_vm_object_qcollapse
LBB0_26:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_VM_OBJECT_WUNLOCK
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_OBJT_DEFAULT,8,3               ; @OBJT_DEFAULT
	.comm	_OBJT_SWAP,8,3                  ; @OBJT_SWAP
	.comm	_OBJ_DEAD,4,2                   ; @OBJ_DEAD
	.comm	_OBJ_NOSPLIT,4,2                ; @OBJ_NOSPLIT
	.comm	_OBSC_COLLAPSE_WAIT,4,2         ; @OBSC_COLLAPSE_WAIT
	.comm	_shadow_list,4,2                ; @shadow_list
	.comm	_OBJT_DEAD,8,3                  ; @OBJT_DEAD
	.comm	_object_collapses,4,2           ; @object_collapses
	.comm	_object_bypasses,4,2            ; @object_bypasses
.subsections_via_symbols
