	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cache_drain_safe_cpu
_cache_drain_safe_cpu:                  ## @cache_drain_safe_cpu
	.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	_UMA_ZFLAG_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r14
	callq	_ZONE_LOCK
	xorl	%eax, %eax
	callq	_critical_enter
	movq	_UMA_ZONE_NUMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.3:
	callq	_PCPU_GET
	movslq	%eax, %rsi
	jmp	LBB0_4
LBB0_2:
	xorl	%esi, %esi
LBB0_4:
	movq	16(%r14), %r13
	movq	_curcpu@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %r15
	movq	16(%r13,%r15,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.6:
	leaq	16(,%r15,8), %rax
	addq	%r13, %rax
	cmpq	$0, (%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rsi, %r12
	leaq	(,%rsi,4), %rsi
	addq	8(%r14), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	movq	%rax, %rbx
	callq	_zone_put_bucket
	movq	%rbx, %rax
	movq	%r12, %rsi
	xorl	%ebx, %ebx
LBB0_8:
	movq	$0, (%rax)
	jmp	LBB0_9
LBB0_5:
	xorl	%ebx, %ebx
LBB0_9:
	movq	8(%r13,%r15,8), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.11:
	leaq	8(,%r15,8), %rax
	addq	%r13, %rax
	cmpq	$0, (%r12)
	je	LBB0_13
## %bb.12:
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	movq	%rax, %r12
	callq	_zone_put_bucket
	movq	%r12, %rax
	xorl	%r12d, %r12d
LBB0_13:
	movq	$0, (%rax)
	jmp	LBB0_14
LBB0_10:
	xorl	%r12d, %r12d
LBB0_14:
	movq	(%r13,%r15,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	$0, (%r13,%r15,8)
	xorl	%eax, %eax
	callq	_critical_exit
	movq	%r14, %rdi
	callq	_ZONE_UNLOCK
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_bucket_free
LBB0_16:
	testq	%r12, %r12
	je	LBB0_18
## %bb.17:
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_bucket_free
LBB0_18:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.20:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_bucket_drain
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bucket_free                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UMA_ZFLAG_INTERNAL,4,2         ## @UMA_ZFLAG_INTERNAL
	.comm	_UMA_ZONE_NUMA,4,2              ## @UMA_ZONE_NUMA
	.comm	_curcpu,8,3                     ## @curcpu
	.no_dead_strip	_cache_drain_safe_cpu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cache_drain_safe_cpu
_cache_drain_safe_cpu:                  ; @cache_drain_safe_cpu
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _UMA_ZFLAG_INTERNAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _UMA_ZFLAG_INTERNAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	bl	_ZONE_LOCK
	bl	_critical_enter
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _UMA_ZONE_NUMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _UMA_ZONE_NUMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_PCPU_GET
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x24, w0
	b	LBB0_5
LBB0_4:
	mov	x24, #0
LBB0_5:
Lloh6:
	adrp	x8, _curcpu@GOTPAGE
Lloh7:
	ldr	x8, [x8, _curcpu@GOTPAGEOFF]
	ldr	x23, [x19, #16]
Lloh8:
	ldr	x22, [x8]
	mov	w8, #24
	madd	x21, x22, x8, x23
	ldr	x20, [x21, #16]!
	cbz	x20, LBB0_9
; %bb.6:
	ldr	x8, [x20]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	add	x1, x8, x24, lsl #2
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_zone_put_bucket
	mov	x20, #0
LBB0_8:
	str	xzr, [x21]
LBB0_9:
	mov	w8, #24
	madd	x25, x22, x8, x23
	ldr	x21, [x25, #8]!
	cbz	x21, LBB0_13
; %bb.10:
	ldr	x8, [x21]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	x8, [x19, #8]
	add	x1, x8, x24, lsl #2
	mov	x0, x19
	mov	x2, x21
	mov	w3, #0
	bl	_zone_put_bucket
	mov	x21, #0
LBB0_12:
	str	xzr, [x25]
LBB0_13:
	mov	w8, #24
	mul	x8, x22, x8
	ldr	x22, [x23, x8]
	str	xzr, [x23, x8]
	bl	_critical_exit
	mov	x0, x19
	bl	_ZONE_UNLOCK
	cbz	x20, LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	bl	_bucket_free
LBB0_15:
	cbz	x21, LBB0_17
; %bb.16:
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_bucket_free
LBB0_17:
	cbz	x22, LBB0_1
; %bb.18:
	mov	x0, x19
	mov	x1, x22
	bl	_bucket_drain
	mov	x0, x19
	mov	x1, x22
	mov	x2, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_bucket_free
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_UMA_ZFLAG_INTERNAL,4,2         ; @UMA_ZFLAG_INTERNAL
	.comm	_UMA_ZONE_NUMA,4,2              ; @UMA_ZONE_NUMA
	.comm	_curcpu,8,3                     ; @curcpu
	.no_dead_strip	_cache_drain_safe_cpu
.subsections_via_symbols
