	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function keg_alloc_slab
_keg_alloc_slab:                        ## @keg_alloc_slab
	.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	%r8d, %ebx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	testl	%edx, %edx
	setns	%al
	movq	_vm_ndomains@GOTPCREL(%rip), %rcx
	cmpl	%edx, (%rcx)
	setg	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	movslq	%edx, %rsi
	callq	_KASSERT
	movq	%r15, %rdi
	callq	_KEG_LOCK_ASSERT
	leaq	64(%r15), %rax
	xorl	%edi, %edi
	cmpq	%rax, (%r12)
	sete	%dil
	callq	_MPASS
	movq	56(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_KEG_UNLOCK
	movl	(%r15), %r8d
	movq	_UMA_ZONE_OFFPAGE@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	48(%r15), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	%r13d, %r12d
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_zone_alloc_item
	testq	%rax, %rax
	je	LBB0_29
## %bb.2:
	movl	(%r15), %r8d
	movq	%rax, %r14
	movl	%r12d, %edx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_4
LBB0_3:
	xorl	%r14d, %r14d
	movl	%r13d, %edx
LBB0_4:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	_UMA_ZONE_MALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	andl	%r8d, %ecx
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	orl	%ebx, %esi
	notl	%eax
	andl	%ebx, %eax
	testl	%ecx, %ecx
	cmovel	%esi, %eax
	movq	_UMA_ZONE_NODUMP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r8d
	je	LBB0_6
## %bb.5:
	movq	_M_NODUMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
LBB0_6:
	orl	%eax, %r8d
	movslq	4(%r15), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movslq	(%r13), %rbx
	imulq	%rax, %rbx
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	callq	*%r9
	testq	%rax, %rax
	je	LBB0_24
## %bb.7:
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_uma_total_inc
	movl	(%r15), %eax
	movq	_UMA_ZONE_OFFPAGE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.8:
	movslq	8(%r15), %rcx
	leaq	(%r12,%rcx,4), %r14
LBB0_9:
	movq	_UMA_ZONE_VTOSLAB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.10:
	cmpl	$0, 4(%r15)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rdi
	movslq	%ebx, %rbx
	imulq	%rbx, %rdi
	addq	%r12, %rdi
	movq	%r14, %rsi
	callq	_vsetslab
	incl	%ebx
	cmpl	4(%r15), %ebx
	jl	LBB0_12
LBB0_13:
	movq	%r15, 32(%r14)
	movq	%r12, 8(%r14)
	movl	12(%r15), %eax
	movl	%eax, (%r14)
	movl	-56(%rbp), %eax
	movl	%eax, 24(%r14)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movq	_SLAB_SETSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%r14), %rsi
	callq	_BIT_FILL
	movq	16(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.14:
	movl	12(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_26
## %bb.15:
	movq	8(%r14), %rdi
	movl	44(%r15), %esi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	*%rcx
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_19
## %bb.16:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	12(%r15), %eax
	cmpl	%eax, %ebx
	jge	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movslq	24(%r15), %rax
	movslq	%ebx, %rdi
	imulq	%rax, %rdi
	shlq	$2, %rdi
	addq	8(%r14), %rdi
	movl	44(%r15), %esi
	movl	%r13d, %edx
	callq	*16(%r15)
	testq	%rax, %rax
	je	LBB0_17
LBB0_19:
	movl	12(%r15), %eax
LBB0_20:
	cmpl	%eax, %ebx
	jne	LBB0_27
LBB0_21:
	movq	%r15, %rdi
	callq	_KEG_LOCK
	movq	_KTR_UMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	40(%r15), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	movq	%r15, %r8
	callq	_CTR3
	movq	_UMA_ZONE_HASH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_23
## %bb.22:
	leaq	36(%r15), %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_UMA_HASH_INSERT
LBB0_23:
	movl	4(%r15), %eax
	movl	12(%r15), %ecx
	addl	%eax, 28(%r15)
	addl	%ecx, 32(%r15)
	jmp	LBB0_29
LBB0_24:
	movq	_UMA_ZONE_OFFPAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_28
## %bb.25:
	movl	48(%r15), %edi
	movq	_SKIP_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_zone_free_item
	jmp	LBB0_28
LBB0_26:
	xorl	%ebx, %ebx
	cmpl	%eax, %ebx
	je	LBB0_21
LBB0_27:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_keg_free_slab
LBB0_28:
	xorl	%r14d, %r14d
LBB0_29:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vm_ndomains,4,2                ## @vm_ndomains
	.comm	_UMA_ZONE_OFFPAGE,4,2           ## @UMA_ZONE_OFFPAGE
	.comm	_UMA_ZONE_MALLOC,4,2            ## @UMA_ZONE_MALLOC
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_UMA_ZONE_NODUMP,4,2            ## @UMA_ZONE_NODUMP
	.comm	_M_NODUMP,4,2                   ## @M_NODUMP
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_SKIP_NONE,4,2                  ## @SKIP_NONE
	.comm	_UMA_ZONE_VTOSLAB,4,2           ## @UMA_ZONE_VTOSLAB
	.comm	_SLAB_SETSIZE,4,2               ## @SLAB_SETSIZE
	.comm	_KTR_UMA,4,2                    ## @KTR_UMA
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"keg_alloc_slab: allocated slab %p for %s(%p)"

	.comm	_UMA_ZONE_HASH,4,2              ## @UMA_ZONE_HASH
	.no_dead_strip	_keg_alloc_slab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function keg_alloc_slab
_keg_alloc_slab:                        ; @keg_alloc_slab
	.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
	mov	x24, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	cmp	w2, #0
Lloh0:
	adrp	x8, _vm_ndomains@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vm_ndomains@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ccmp	w8, w2, #4, ge
	cset	w0, gt
	sxtw	x1, w23
	bl	_KASSERT
	mov	x0, x19
	bl	_KEG_LOCK_ASSERT
	ldr	x8, [x22]
	add	x9, x19, #64
	cmp	x8, x9
	cset	w0, eq
	bl	_MPASS
	ldr	x27, [x19, #56]
	mov	x0, x19
	bl	_KEG_UNLOCK
	ldr	w8, [x19]
Lloh3:
	adrp	x25, _UMA_ZONE_OFFPAGE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _UMA_ZONE_OFFPAGE@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	w0, [x19, #48]
	mov	x1, #0
	mov	x2, x23
	mov	x3, x24
	bl	_zone_alloc_item
	mov	x20, x0
	cbz	x0, LBB0_25
; %bb.2:
	ldr	w8, [x19]
	b	LBB0_4
LBB0_3:
	mov	x20, #0
LBB0_4:
Lloh5:
	adrp	x9, _UMA_ZONE_MALLOC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UMA_ZONE_MALLOC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _M_ZERO@GOTPAGE
Lloh9:
	ldr	x10, [x10, _M_ZERO@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w11, w10, w24
	bic	w10, w24, w10
	tst	w9, w8
	csel	w9, w11, w10, eq
Lloh11:
	adrp	x10, _UMA_ZONE_NODUMP@GOTPAGE
Lloh12:
	ldr	x10, [x10, _UMA_ZONE_NODUMP@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _M_NODUMP@GOTPAGE
Lloh15:
	ldr	x11, [x11, _M_NODUMP@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w4, w8, w9
	ldrsw	x8, [x19, #4]
Lloh17:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh18:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	ldrsw	x9, [x26]
	mul	x24, x9, x8
	add	x3, sp, #12
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	blr	x27
	cbz	x0, LBB0_22
; %bb.5:
	mov	x22, x0
	mov	x0, x24
	bl	_uma_total_inc
	ldr	w8, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:
	ldrsw	x9, [x19, #8]
	add	x20, x22, x9, lsl #2
LBB0_7:
Lloh19:
	adrp	x9, _UMA_ZONE_VTOSLAB@GOTPAGE
Lloh20:
	ldr	x9, [x9, _UMA_ZONE_VTOSLAB@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	w24, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x26]
	sxtw	x9, w24
	madd	x0, x8, x9, x22
	mov	x1, x20
	bl	_vsetslab
	add	w24, w24, #1
	ldr	w8, [x19, #4]
	cmp	w24, w8
	b.lt	LBB0_10
LBB0_11:
	str	x19, [x20, #32]
	str	x22, [x20, #8]
	ldr	w8, [x19, #12]
	stp	w8, w23, [x20]
	ldr	w8, [sp, #12]
	str	w8, [x20, #24]
Lloh22:
	adrp	x8, _SLAB_SETSIZE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SLAB_SETSIZE@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	add	x1, x20, #20
	bl	_BIT_FILL
	ldr	x9, [x19, #16]
	cbz	x9, LBB0_19
; %bb.12:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.13:
	ldr	x0, [x20, #8]
	ldr	w1, [x19, #44]
	mov	x2, x21
	blr	x9
	mov	w23, #0
	cbz	x0, LBB0_17
LBB0_14:
	ldr	w8, [x19, #12]
	cmp	w23, w8
	b.eq	LBB0_19
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_keg_free_slab
	b	LBB0_24
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x20, #8]
	ldr	w10, [x19, #24]
	mul	w10, w10, w23
	add	x0, x9, w10, sxtw #2
	ldr	w1, [x19, #44]
	mov	x2, x21
	blr	x8
	cbnz	x0, LBB0_14
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	add	w23, w23, #1
	ldr	w8, [x19, #12]
	cmp	w23, w8
	b.lt	LBB0_16
; %bb.18:
	cmp	w23, w8
	b.ne	LBB0_15
LBB0_19:
	mov	x0, x19
	bl	_KEG_LOCK
Lloh25:
	adrp	x8, _KTR_UMA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _KTR_UMA@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	w3, [x19, #40]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x4, x19
	bl	_CTR3
	ldr	w8, [x19]
Lloh30:
	adrp	x9, _UMA_ZONE_HASH@GOTPAGE
Lloh31:
	ldr	x9, [x9, _UMA_ZONE_HASH@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
	add	x0, x19, #36
	mov	x1, x20
	mov	x2, x22
	bl	_UMA_HASH_INSERT
LBB0_21:
	ldr	w8, [x19, #4]
	ldp	w9, w10, [x19, #28]
	add	w8, w9, w8
	ldr	w9, [x19, #12]
	add	w9, w10, w9
	stp	w8, w9, [x19, #28]
	b	LBB0_25
LBB0_22:
	ldr	w8, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.23:
	ldr	w0, [x19, #48]
Lloh33:
	adrp	x8, _SKIP_NONE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SKIP_NONE@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
	mov	x1, x20
	mov	x2, #0
	bl	_zone_free_item
LBB0_24:
	mov	x20, #0
LBB0_25:
	mov	x0, x20
	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
LBB0_26:
	mov	w23, #0
	cmp	w23, w8
	b.eq	LBB0_19
	b	LBB0_15
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_vm_ndomains,4,2                ; @vm_ndomains
	.comm	_UMA_ZONE_OFFPAGE,4,2           ; @UMA_ZONE_OFFPAGE
	.comm	_UMA_ZONE_MALLOC,4,2            ; @UMA_ZONE_MALLOC
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_UMA_ZONE_NODUMP,4,2            ; @UMA_ZONE_NODUMP
	.comm	_M_NODUMP,4,2                   ; @M_NODUMP
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_SKIP_NONE,4,2                  ; @SKIP_NONE
	.comm	_UMA_ZONE_VTOSLAB,4,2           ; @UMA_ZONE_VTOSLAB
	.comm	_SLAB_SETSIZE,4,2               ; @SLAB_SETSIZE
	.comm	_KTR_UMA,4,2                    ; @KTR_UMA
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"keg_alloc_slab: allocated slab %p for %s(%p)"

	.comm	_UMA_ZONE_HASH,4,2              ; @UMA_ZONE_HASH
	.no_dead_strip	_keg_alloc_slab
.subsections_via_symbols
