	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_pageout_worker
_vm_pageout_worker:                     ## @vm_pageout_worker
	.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
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_VM_DOMAIN
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_ticks@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.1:
	leaq	20(%rbx), %r14
	movq	%rbx, %r15
	addq	$16, %r15
	movl	$1, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	%r13d, %esi
	leaq	-44(%rbp), %rdx
	callq	_vm_pageout_scan_inactive
	movl	%eax, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_vm_pageout_active_target
	addl	-44(%rbp), %eax
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_vm_pageout_scan_active
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_vm_domain_pageout_lock
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_atomic_store_int
	movq	8(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_vm_paging_needed
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_vm_domain_pageout_unlock
	testl	%r12d, %r12d
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	movq	_VM_INACT_SCAN_RATE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pause
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_vm_domain_pageout_lockptr
	movl	%eax, %esi
	movq	_PVM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PDROP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	movq	_VM_INACT_SCAN_RATE@GOTPCREL(%rip), %rdi
	idivl	(%rdi)
	movq	%r14, %rdi
	movl	%ecx, %edx
	leaq	L_.str.2(%rip), %rcx
	movl	%eax, %r8d
	callq	_mtx_sleep
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_v_pdwakeups@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VM_CNT_INC
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_store_int
	movq	8(%rbx), %rsi
	movq	%r15, %rdi
	callq	_pidctrl_daemon
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r13d
	movq	8(%rbx), %r12
	xorl	%eax, %eax
	callq	_vm_pageout_lowmem
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rdi
	subq	%r12, %rdi
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r13d, %esi
	callq	_min
	subl	%eax, %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$0, -44(%rbp)
	jmp	LBB0_13
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"domain without segments"

	.comm	_ticks,4,2                      ## @ticks
	.comm	_TRUE,8,3                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"pwait"

	.comm	_hz,4,2                         ## @hz
	.comm	_VM_INACT_SCAN_RATE,4,2         ## @VM_INACT_SCAN_RATE
	.comm	_PDROP,4,2                      ## @PDROP
	.comm	_PVM,4,2                        ## @PVM
L_.str.2:                               ## @.str.2
	.asciz	"psleep"

	.comm	_v_pdwakeups,4,2                ## @v_pdwakeups
	.no_dead_strip	_vm_pageout_worker
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_pageout_worker
_vm_pageout_worker:                     ; @vm_pageout_worker
	.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
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_VM_DOMAIN
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #0
	cset	w0, ne
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh2:
	adrp	x8, _ticks@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ticks@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh5:
	adrp	x26, _TRUE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _TRUE@GOTPAGEOFF]
	ldr	x8, [x26]
	cbz	x8, LBB0_14
; %bb.1:
	add	x20, x19, #20
	add	x21, x19, #16
	mov	w24, #1
Lloh7:
	adrp	x28, _PVM@GOTPAGE
Lloh8:
	ldr	x28, [x28, _PVM@GOTPAGEOFF]
Lloh9:
	adrp	x23, _hz@GOTPAGE
Lloh10:
	ldr	x23, [x23, _hz@GOTPAGEOFF]
Lloh11:
	adrp	x27, _VM_INACT_SCAN_RATE@GOTPAGE
Lloh12:
	ldr	x27, [x27, _VM_INACT_SCAN_RATE@GOTPAGEOFF]
Lloh13:
	adrp	x22, l_.str.2@PAGE
Lloh14:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x25
	bl	_vm_pageout_scan_inactive
	mov	x24, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_vm_pageout_active_target
	ldr	w8, [sp, #12]
	add	w1, w8, w0
	mov	x0, x19
	bl	_vm_pageout_scan_active
	ldr	x8, [x26]
	cbz	x8, LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_vm_domain_pageout_lock
	mov	x0, x20
	mov	w1, #0
	bl	_atomic_store_int
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_vm_paging_needed
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_vm_domain_pageout_unlock
	cbnz	w24, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x27]
	sdiv	w1, w8, w9
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pause
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_vm_domain_pageout_lockptr
	mov	x1, x0
Lloh17:
	adrp	x8, _PDROP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PDROP@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w2, w9, w8
	ldr	w8, [x23]
	ldr	w9, [x27]
	sdiv	w4, w8, w9
	mov	x0, x20
	mov	x3, x22
	bl	_mtx_sleep
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x8, _v_pdwakeups@GOTPAGE
Lloh21:
	ldr	x8, [x8, _v_pdwakeups@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_VM_CNT_INC
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_atomic_store_int
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_pidctrl_daemon
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x25, x0
	ldr	x24, [x19, #8]
	bl	_vm_pageout_lowmem
	cbz	x0, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	subs	x0, x8, x24
	b.le	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w1, w25
	bl	_min
	sub	w25, w25, w0
	b	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [sp, #12]
	b	LBB0_3
LBB0_14:
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"domain without segments"

	.comm	_ticks,4,2                      ; @ticks
	.comm	_TRUE,8,3                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"pwait"

	.comm	_hz,4,2                         ; @hz
	.comm	_VM_INACT_SCAN_RATE,4,2         ; @VM_INACT_SCAN_RATE
	.comm	_PDROP,4,2                      ; @PDROP
	.comm	_PVM,4,2                        ; @PVM
l_.str.2:                               ; @.str.2
	.asciz	"psleep"

	.comm	_v_pdwakeups,4,2                ; @v_pdwakeups
	.no_dead_strip	_vm_pageout_worker
.subsections_via_symbols
