	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_user_slb_spill          ## -- Begin function handle_user_slb_spill
	.p2align	4, 0x90
_handle_user_slb_spill:                 ## @handle_user_slb_spill
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_ADDR_SR_SHFT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	callq	_PMAP_LOCK
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_user_va_to_slb_entry
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.7:
	movq	8(%rbx), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, (%rsi,%rdx,8)
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_8
	jmp	LBB0_10
LBB0_1:
	movl	$-1, %eax
	jmp	LBB0_12
LBB0_6:
	movl	%r15d, %ecx
	shrq	%cl, %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_allocate_user_vsid
	jmp	LBB0_11
LBB0_4:
	xorl	%edx, %edx
LBB0_5:
	cmpl	%ecx, %edx
	jne	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_slb_insert_user
LBB0_11:
	movq	%rbx, %rdi
	callq	_PMAP_UNLOCK
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADDR_SR_SHFT,8,3               ## @ADDR_SR_SHFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_handle_user_slb_spill          ; -- Begin function handle_user_slb_spill
	.p2align	2
_handle_user_slb_spill:                 ; @handle_user_slb_spill
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ADDR_SR_SHFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADDR_SR_SHFT@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	bl	_PMAP_LOCK
	mov	x0, x19
	mov	x1, x20
	bl	_user_va_to_slb_entry
	cbz	x0, LBB0_7
; %bb.2:
	mov	x1, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x9, #0
	ldr	x10, [x19, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cmp	x11, x1
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_4
	b	LBB0_10
LBB0_6:
	mov	w0, #-1
	b	LBB0_12
LBB0_7:
	lsr	x1, x20, x21
	mov	x0, x19
	mov	w2, #0
	bl	_allocate_user_vsid
	b	LBB0_11
LBB0_8:
	mov	w9, #0
LBB0_9:
	cmp	w9, w8
	b.ne	LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_slb_insert_user
LBB0_11:
	mov	x0, x19
	bl	_PMAP_UNLOCK
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ADDR_SR_SHFT,8,3               ; @ADDR_SR_SHFT
.subsections_via_symbols
