	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_unwire               ## -- Begin function vm_object_unwire
	.p2align	4, 0x90
_vm_object_unwire:                      ## @vm_object_unwire
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_PAGE_MASK@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	movl	(%r15), %eax
	andl	%esi, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	xorl	%edi, %edi
	movl	(%r15), %eax
	movq	%rbx, %r15
	andl	%r14d, %eax
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	_OBJ_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_7
## %bb.1:
	movl	%r12d, %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r13
	movl	%r14d, %edi
	callq	_atop
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_VM_OBJECT_RLOCK
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_vm_page_find_least
	testq	%rbx, %rbx
	jle	LBB0_2
## %bb.3:
	movq	%rax, %r14
	movq	%rbx, %rax
	addq	%r13, %rax
	movl	$1, %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_27:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##       Child Loop BB0_21 Depth 3
	movq	%r14, %rbx
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	$1, %r12d
	movq	%r13, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edx
	callq	_vm_page_busy_sleep
	movq	%r15, %rdi
	callq	_VM_OBJECT_RLOCK
	movq	%r15, %rdi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_vm_page_find_least
	movq	%rax, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %r13
	jge	LBB0_5
LBB0_8:                                 ##   Parent Loop BB0_27 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_11 Depth 3
                                        ##       Child Loop BB0_21 Depth 3
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	cmpq	(%rbx), %r13
	jge	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %r14d
	movq	%r15, %rbx
	movq	%r13, %r15
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=3
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_vm_page_lookup
	incl	%r14d
	testq	%rax, %rax
	jne	LBB0_16
LBB0_11:                                ##   Parent Loop BB0_27 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	4(%rbx), %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r13
	movq	8(%rbx), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	leaq	L_.str.2(%rip), %rsi
	callq	_KASSERT
	movq	_OBJ_FICTITIOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=3
	addq	%r13, %r15
	cmpl	%r12d, %r14d
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=3
	incl	%r12d
	movq	%rbx, %rdi
	callq	_VM_OBJECT_RLOCK
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%rax, %r13
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	_listq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_TAILQ_NEXT
	movq	%rax, %r14
	movq	%rbx, %r13
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%r13, %rdi
	callq	_vm_page_trysbusy
	testq	%rax, %rax
	jne	LBB0_25
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=2
	testl	%r12d, %r12d
	jle	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_8 Depth=2
	incl	%r12d
	movq	%r15, %rdi
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=3
	decl	%r12d
	movq	%rbx, %rdi
	cmpl	$1, %r12d
	jle	LBB0_24
LBB0_21:                                ##   Parent Loop BB0_27 Depth=1
                                        ##     Parent Loop BB0_8 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%rdi), %rbx
	cmpq	%rdi, 8(%r13)
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=3
	callq	_VM_OBJECT_RUNLOCK
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_26:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	incq	%r13
	cmpq	%rax, %r13
	jl	LBB0_27
	jmp	LBB0_4
LBB0_25:                                ##   in Loop: Header=BB0_27 Depth=1
	movq	%r13, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_vm_page_unwire
	movq	%r13, %rdi
	callq	_vm_page_sunbusy
	jmp	LBB0_26
LBB0_2:
	movl	$1, %r12d
	jmp	LBB0_5
LBB0_4:
	testl	%r12d, %r12d
	jle	LBB0_7
LBB0_5:
	incl	%r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rbx
	movq	%r15, %rdi
	callq	_VM_OBJECT_RUNLOCK
	decl	%r12d
	movq	%rbx, %r15
	cmpl	$1, %r12d
	ja	LBB0_6
LBB0_7:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_object_unwire: offset is not page aligned"

L_.str.1:                               ## @.str.1
	.asciz	"vm_object_unwire: length is not a multiple of PAGE_SIZE"

	.comm	_OBJ_FICTITIOUS,4,2             ## @OBJ_FICTITIOUS
L_.str.2:                               ## @.str.2
	.asciz	"vm_object_unwire: missing page"

	.comm	_listq,4,2                      ## @listq
L_.str.3:                               ## @.str.3
	.asciz	"unwbo"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_object_unwire               ; -- Begin function vm_object_unwire
	.p2align	2
_vm_object_unwire:                      ; @vm_object_unwire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	str	w3, [sp, #4]                    ; 4-byte Folded Spill
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x20, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PAGE_MASK@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w1
	cset	w0, eq
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x20]
	tst	w8, w22
	cset	w0, eq
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	w8, [x19]
Lloh6:
	adrp	x28, _OBJ_FICTITIOUS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _OBJ_FICTITIOUS@GOTPAGEOFF]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_27
; %bb.1:
	mov	x0, x21
	bl	_OFF_TO_IDX
	mov	x21, x0
	mov	x0, x22
	bl	_atop
	mov	x22, x0
	mov	x0, x19
	bl	_VM_OBJECT_RLOCK
	mov	x0, x19
	mov	x1, x21
	bl	_vm_page_find_least
	cmp	x22, #1
	b.lt	LBB0_23
; %bb.2:
	mov	x25, x0
	add	x8, x22, x21
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	w23, #1
Lloh8:
	adrp	x22, l_.str.2@PAGE
Lloh9:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x24, x0
	cbnz	x24, LBB0_5
	b	LBB0_7
LBB0_3:
	mov	w23, #1
	mov	x0, x24
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #1
	bl	_vm_page_busy_sleep
	mov	x0, x19
	bl	_VM_OBJECT_RLOCK
	mov	x0, x19
	mov	x1, x21
	bl	_vm_page_find_least
	mov	x24, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x21, x8
	b.ge	LBB0_25
; %bb.4:
	cbz	x24, LBB0_7
LBB0_5:
	ldr	x8, [x24]
	cmp	x21, x8
	b.lt	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _listq@GOTPAGE
Lloh13:
	ldr	x8, [x8, _listq@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_TAILQ_NEXT
	mov	x25, x0
	b	LBB0_16
LBB0_7:
	mov	w20, #1
	mov	x25, x19
	mov	x26, x21
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x26, x27, x26
	mov	x0, x25
	mov	x1, x26
	bl	_vm_page_lookup
	add	w20, w20, #1
	cbnz	x0, LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25, #4]
	bl	_OFF_TO_IDX
	mov	x27, x0
	ldr	x25, [x25, #8]
	cmp	x25, #0
	cset	w0, ne
	mov	x1, x22
	bl	_KASSERT
	ldr	w8, [x25]
	ldr	w9, [x28]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w20, w23
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w23, w23, #1
	mov	x0, x25
	bl	_VM_OBJECT_RLOCK
	b	LBB0_8
LBB0_12:
	mov	x25, x24
LBB0_13:
	add	x21, x21, #1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x21, x8
	b.ge	LBB0_24
; %bb.14:
	mov	x24, x25
	cbnz	x24, LBB0_5
	b	LBB0_7
LBB0_15:
	mov	x25, x24
	mov	x24, x0
LBB0_16:
	mov	x0, x24
	bl	_vm_page_trysbusy
	cbnz	x0, LBB0_22
; %bb.17:
	cmp	w23, #1
	b.lt	LBB0_3
; %bb.18:
	add	w20, w23, #1
	mov	x0, x19
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	w20, w20, #1
	mov	x0, x23
	cmp	w20, #1
	b.le	LBB0_3
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x0, #8]
	ldr	x8, [x24, #8]
	cmp	x8, x0
	b.eq	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_VM_OBJECT_RUNLOCK
	b	LBB0_19
LBB0_22:
	mov	x0, x24
	ldr	w1, [sp, #4]                    ; 4-byte Folded Reload
	bl	_vm_page_unwire
	mov	x0, x24
	bl	_vm_page_sunbusy
	b	LBB0_13
LBB0_23:
	mov	w23, #1
	b	LBB0_25
LBB0_24:
	cmp	w23, #1
	b.lt	LBB0_27
LBB0_25:
	add	w20, w23, #1
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x21, [x19, #8]
	mov	x0, x19
	bl	_VM_OBJECT_RUNLOCK
	sub	w20, w20, #1
	mov	x19, x21
	cmp	w20, #1
	b.hi	LBB0_26
LBB0_27:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_object_unwire: offset is not page aligned"

l_.str.1:                               ; @.str.1
	.asciz	"vm_object_unwire: length is not a multiple of PAGE_SIZE"

	.comm	_OBJ_FICTITIOUS,4,2             ; @OBJ_FICTITIOUS
l_.str.2:                               ; @.str.2
	.asciz	"vm_object_unwire: missing page"

	.comm	_listq,4,2                      ; @listq
l_.str.3:                               ; @.str.3
	.asciz	"unwbo"

.subsections_via_symbols
