	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmem_back                      ## -- Begin function kmem_back
	.p2align	4, 0x90
_kmem_back:                             ## @kmem_back
	.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	$24, %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, %r12d
	movl	%esi, %ebx
	movl	%edi, %ecx
	movq	_kernel_object@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, (%rax)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	testl	%r12d, %r12d
	jle	LBB0_1
## %bb.2:
	addl	%ebx, %r12d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	_vm_ndomains@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movl	%r12d, %r13d
	cmpl	$2, %esi
	jl	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_KVA_QUANTUM_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r15d, %eax
	sarl	%cl, %eax
	cltd
	idivl	%esi
	movl	%edx, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %edi
	callq	_VM_DOMAIN_EMPTY
	incl	%r14d
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r15), %edi
	movq	_KVA_QUANTUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roundup2
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, %r13d
	cmovll	%r12d, %r13d
	cmpl	%r12d, %eax
	cmovgl	%r12d, %r13d
	decl	%r14d
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %ecx
	subl	%r15d, %ecx
	movl	%r14d, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	callq	_kmem_back_domain
	movl	%eax, %ebx
	movq	_KERN_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %r15d
	cmpl	%r12d, %r13d
	jl	LBB0_4
	jmp	LBB0_10
LBB0_1:
                                        ## implicit-def: $ebx
	jmp	LBB0_10
LBB0_9:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	subl	%esi, %r15d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %edx
	callq	_kmem_unback
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kernel_object,4,2              ## @kernel_object
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kmem_back: only supports kernel object."

	.comm	_vm_ndomains,4,2                ## @vm_ndomains
	.comm	_KVA_QUANTUM_SHIFT,4,2          ## @KVA_QUANTUM_SHIFT
	.comm	_KVA_QUANTUM,4,2                ## @KVA_QUANTUM
	.comm	_KERN_SUCCESS,4,2               ## @KERN_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kmem_back                      ; -- Begin function kmem_back
	.p2align	2
_kmem_back:                             ; @kmem_back
	.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	x21, x3
	mov	x22, x2
	mov	x25, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _kernel_object@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kernel_object@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	cmp	w22, #1
	b.lt	LBB0_9
; %bb.1:
Lloh5:
	adrp	x24, _vm_ndomains@GOTPAGE
Lloh6:
	ldr	x24, [x24, _vm_ndomains@GOTPAGEOFF]
	add	w26, w22, w25
Lloh7:
	adrp	x27, _KVA_QUANTUM@GOTPAGE
Lloh8:
	ldr	x27, [x27, _KVA_QUANTUM@GOTPAGEOFF]
	mov	x19, x25
Lloh9:
	adrp	x28, _KERN_SUCCESS@GOTPAGE
Lloh10:
	ldr	x28, [x28, _KERN_SUCCESS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	ldr	w8, [x24]
	cmp	w8, #2
	b.lt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh11:
	adrp	x9, _KVA_QUANTUM_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _KVA_QUANTUM_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w9, w19, w9
	sdiv	w10, w9, w8
	msub	w23, w10, w8, w9
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_VM_DOMAIN_EMPTY
	add	w23, w23, #1
	cbnz	x0, LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w0, w19, #1
	ldr	w1, [x27]
	bl	_roundup2
	cmp	w0, w25
	ccmp	w0, w26, #0, ge
	csel	w22, w26, w0, gt
	sub	w0, w23, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	mov	x22, x26
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w3, w22, w19
	mov	x1, x20
	mov	x2, x19
	mov	x4, x21
	bl	_kmem_back_domain
	mov	x23, x0
	ldr	w8, [x28]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x19, x22
	cmp	w22, w26
	b.lt	LBB0_2
	b	LBB0_11
LBB0_9:
                                        ; implicit-def: $w23
	b	LBB0_11
LBB0_10:
	sub	w2, w19, w25
	mov	x0, x20
	mov	x1, x25
	bl	_kmem_unback
LBB0_11:
	mov	x0, x23
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_kernel_object,4,2              ; @kernel_object
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kmem_back: only supports kernel object."

	.comm	_vm_ndomains,4,2                ; @vm_ndomains
	.comm	_KVA_QUANTUM_SHIFT,4,2          ; @KVA_QUANTUM_SHIFT
	.comm	_KVA_QUANTUM,4,2                ; @KVA_QUANTUM
	.comm	_KERN_SUCCESS,4,2               ; @KERN_SUCCESS
.subsections_via_symbols
