	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moea_pte_insert
_moea_pte_insert:                       ## @moea_pte_insert
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_moea_table_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movq	_moea_pteg_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdi
	movq	_PTE_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.3:
	testl	%eax, 4(%rdi)
	je	LBB0_4
## %bb.5:
	testl	%eax, 8(%rdi)
	je	LBB0_6
## %bb.7:
	testl	%eax, 12(%rdi)
	je	LBB0_8
## %bb.9:
	testl	%eax, 16(%rdi)
	je	LBB0_10
## %bb.11:
	testl	%eax, 20(%rdi)
	je	LBB0_12
## %bb.13:
	testl	%eax, 24(%rdi)
	je	LBB0_14
## %bb.15:
	testl	%eax, 28(%rdi)
	je	LBB0_16
## %bb.17:
	movq	_moea_pteg_mask@GOTPCREL(%rip), %r13
	movq	(%r13), %rdx
	xorq	%rbx, %rdx
	movq	(%rcx,%rdx,8), %rdi
	testl	%eax, (%rdi)
	je	LBB0_18
## %bb.20:
	testl	%eax, 4(%rdi)
	je	LBB0_21
## %bb.22:
	testl	%eax, 8(%rdi)
	je	LBB0_23
## %bb.24:
	testl	%eax, 12(%rdi)
	je	LBB0_25
## %bb.26:
	testl	%eax, 16(%rdi)
	je	LBB0_27
## %bb.28:
	testl	%eax, 20(%rdi)
	je	LBB0_29
## %bb.30:
	testl	%eax, 24(%rdi)
	je	LBB0_31
## %bb.32:
	testl	%eax, 28(%rdi)
	je	LBB0_33
## %bb.34:
	movq	%rbx, %rdi
	callq	_moea_pte_spillable_ident
	testq	%rax, %rax
	je	LBB0_36
## %bb.35:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_moea_pvo_pte_index
	movl	%eax, %ebx
LBB0_39:
	movq	_PTE_HID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_41:
	movq	(%r12), %rax
	movl	%ebx, %ecx
	sarl	$3, %ecx
	movslq	%ecx, %rcx
	movq	(%rax,%rcx,8), %rax
	andl	$7, %ebx
	leaq	(%rax,%rbx,4), %r12
	movl	(%rax,%rbx,4), %edx
	leaq	4(%r15), %r13
	movl	4(%r15), %esi
	cmpl	%esi, %edx
	je	LBB0_43
## %bb.42:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
LBB0_43:
	movl	(%r15), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_moea_pte_unset
	movq	%r15, %rdi
	callq	_PVO_PTEGIDX_CLR
	movq	_moea_pte_overflow@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%r12, %rdi
	jmp	LBB0_44
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
LBB0_4:
	addq	$4, %rdi
	movl	$1, %ebx
	jmp	LBB0_2
LBB0_6:
	addq	$8, %rdi
	movl	$2, %ebx
	jmp	LBB0_2
LBB0_8:
	addq	$12, %rdi
	movl	$3, %ebx
	jmp	LBB0_2
LBB0_10:
	addq	$16, %rdi
	movl	$4, %ebx
	jmp	LBB0_2
LBB0_12:
	addq	$20, %rdi
	movl	$5, %ebx
	jmp	LBB0_2
LBB0_14:
	addq	$24, %rdi
	movl	$6, %ebx
	jmp	LBB0_2
LBB0_16:
	addq	$28, %rdi
	movl	$7, %ebx
LBB0_2:
	movq	_PTE_HID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_44:
	movq	%r14, %rsi
	callq	_moea_pte_set
LBB0_45:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_21:
	addq	$4, %rdi
	movl	$1, %ebx
	jmp	LBB0_19
LBB0_23:
	addq	$8, %rdi
	movl	$2, %ebx
	jmp	LBB0_19
LBB0_25:
	addq	$12, %rdi
	movl	$3, %ebx
	jmp	LBB0_19
LBB0_27:
	addq	$16, %rdi
	movl	$4, %ebx
	jmp	LBB0_19
LBB0_29:
	addq	$20, %rdi
	movl	$5, %ebx
	jmp	LBB0_19
LBB0_31:
	addq	$24, %rdi
	movl	$6, %ebx
	jmp	LBB0_19
LBB0_33:
	addq	$28, %rdi
	movl	$7, %ebx
LBB0_19:
	movq	_PTE_HID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	jmp	LBB0_44
LBB0_36:
	movq	(%r13), %r13
	xorq	%r13, %rbx
	movq	%rbx, %rdi
	callq	_moea_pte_spillable_ident
	testq	%rax, %rax
	je	LBB0_37
## %bb.38:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_moea_pvo_pte_index
	movl	%eax, %ebx
	testq	%r13, %r13
	je	LBB0_39
## %bb.40:
	movq	_PTE_HID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	jmp	LBB0_41
LBB0_37:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
	movl	$-1, %ebx
	jmp	LBB0_45
	.cfi_endproc
                                        ## -- End function
	.comm	_moea_table_mutex,4,2           ## @moea_table_mutex
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_moea_pteg_table,8,3            ## @moea_pteg_table
	.comm	_PTE_VALID,4,2                  ## @PTE_VALID
	.comm	_PTE_HID,4,2                    ## @PTE_HID
	.comm	_moea_pteg_mask,8,3             ## @moea_pteg_mask
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"moea_pte_insert: overflow"

L_.str.1:                               ## @.str.1
	.asciz	"Victim PVO doesn't match PTE! PVO: %8x, PTE: %8x"

	.comm	_moea_pte_overflow,4,2          ## @moea_pte_overflow
	.no_dead_strip	_moea_pte_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moea_pte_insert
_moea_pte_insert:                       ; @moea_pte_insert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _moea_table_mutex@GOTPAGE
Lloh4:
	ldr	x0, [x0, _moea_table_mutex@GOTPAGEOFF]
	bl	_mtx_assert
Lloh5:
	adrp	x22, _moea_pteg_table@GOTPAGE
Lloh6:
	ldr	x22, [x22, _moea_pteg_table@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	x0, [x9, x20, lsl #3]
Lloh7:
	adrp	x8, _PTE_VALID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PTE_VALID@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w10, [x0]
	tst	w8, w10
	b.eq	LBB0_22
; %bb.1:
	mov	x10, x0
	ldr	w11, [x10, #4]!
	tst	w8, w11
	b.eq	LBB0_23
; %bb.2:
	mov	x10, x0
	ldr	w11, [x10, #8]!
	tst	w8, w11
	b.eq	LBB0_24
; %bb.3:
	mov	x10, x0
	ldr	w11, [x10, #12]!
	tst	w8, w11
	b.eq	LBB0_25
; %bb.4:
	mov	x10, x0
	ldr	w11, [x10, #16]!
	tst	w8, w11
	b.eq	LBB0_26
; %bb.5:
	mov	x10, x0
	ldr	w11, [x10, #20]!
	tst	w8, w11
	b.eq	LBB0_27
; %bb.6:
	mov	x10, x0
	ldr	w11, [x10, #24]!
	tst	w8, w11
	b.eq	LBB0_28
; %bb.7:
	ldr	w10, [x0, #28]!
	tst	w8, w10
	b.eq	LBB0_29
; %bb.8:
Lloh10:
	adrp	x23, _moea_pteg_mask@GOTPAGE
Lloh11:
	ldr	x23, [x23, _moea_pteg_mask@GOTPAGEOFF]
	ldr	x10, [x23]
	eor	x10, x10, x20
	ldr	x0, [x9, x10, lsl #3]
	ldr	w9, [x0]
	tst	w8, w9
	b.eq	LBB0_34
; %bb.9:
	mov	x9, x0
	ldr	w10, [x9, #4]!
	tst	w8, w10
	b.eq	LBB0_35
; %bb.10:
	mov	x9, x0
	ldr	w10, [x9, #8]!
	tst	w8, w10
	b.eq	LBB0_36
; %bb.11:
	mov	x9, x0
	ldr	w10, [x9, #12]!
	tst	w8, w10
	b.eq	LBB0_37
; %bb.12:
	mov	x9, x0
	ldr	w10, [x9, #16]!
	tst	w8, w10
	b.eq	LBB0_38
; %bb.13:
	mov	x9, x0
	ldr	w10, [x9, #20]!
	tst	w8, w10
	b.eq	LBB0_39
; %bb.14:
	mov	x9, x0
	ldr	w10, [x9, #24]!
	tst	w8, w10
	b.eq	LBB0_40
; %bb.15:
	ldr	w9, [x0, #28]!
	tst	w8, w9
	b.eq	LBB0_41
; %bb.16:
	mov	x0, x20
	bl	_moea_pte_spillable_ident
	cbz	x0, LBB0_43
; %bb.17:
	mov	x21, x0
	mov	x1, x20
	bl	_moea_pvo_pte_index
LBB0_18:
Lloh12:
	adrp	x8, _PTE_HID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PTE_HID@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
LBB0_19:
	str	w8, [x19]
	ldr	x8, [x22]
	asr	w9, w0, #3
	ldr	x8, [x8, w9, sxtw #3]
	and	w20, w0, #0x7
	add	x22, x8, w20, uxtw #2
	ldr	w8, [x22]
	mov	x23, x21
	ldr	w9, [x23, #4]!
	cmp	w8, w9
	b.eq	LBB0_21
; %bb.20:
	stp	x9, x8, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_21:
	ldr	w2, [x21]
	mov	x0, x22
	mov	x1, x23
	bl	_moea_pte_unset
	mov	x0, x21
	bl	_PVO_PTEGIDX_CLR
Lloh17:
	adrp	x8, _moea_pte_overflow@GOTPAGE
Lloh18:
	ldr	x8, [x8, _moea_pte_overflow@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x0, x22
	b	LBB0_32
LBB0_22:
	mov	w20, #0
	b	LBB0_30
LBB0_23:
	mov	w20, #1
	mov	x0, x10
	b	LBB0_30
LBB0_24:
	mov	w20, #2
	mov	x0, x10
	b	LBB0_30
LBB0_25:
	mov	w20, #3
	mov	x0, x10
	b	LBB0_30
LBB0_26:
	mov	w20, #4
	mov	x0, x10
	b	LBB0_30
LBB0_27:
	mov	w20, #5
	mov	x0, x10
	b	LBB0_30
LBB0_28:
	mov	w20, #6
	mov	x0, x10
	b	LBB0_30
LBB0_29:
	mov	w20, #7
LBB0_30:
Lloh19:
	adrp	x8, _PTE_HID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PTE_HID@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
LBB0_31:
	str	w8, [x19]
LBB0_32:
	mov	x1, x19
	bl	_moea_pte_set
LBB0_33:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_34:
	mov	w20, #0
	b	LBB0_42
LBB0_35:
	mov	w20, #1
	mov	x0, x9
	b	LBB0_42
LBB0_36:
	mov	w20, #2
	mov	x0, x9
	b	LBB0_42
LBB0_37:
	mov	w20, #3
	mov	x0, x9
	b	LBB0_42
LBB0_38:
	mov	w20, #4
	mov	x0, x9
	b	LBB0_42
LBB0_39:
	mov	w20, #5
	mov	x0, x9
	b	LBB0_42
LBB0_40:
	mov	w20, #6
	mov	x0, x9
	b	LBB0_42
LBB0_41:
	mov	w20, #7
LBB0_42:
Lloh22:
	adrp	x8, _PTE_HID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PTE_HID@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	b	LBB0_31
LBB0_43:
	ldr	x23, [x23]
	eor	x20, x23, x20
	mov	x0, x20
	bl	_moea_pte_spillable_ident
	cbz	x0, LBB0_46
; %bb.44:
	mov	x21, x0
	mov	x1, x20
	bl	_moea_pvo_pte_index
	cbz	x23, LBB0_18
; %bb.45:
Lloh25:
	adrp	x8, _PTE_HID@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PTE_HID@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	b	LBB0_19
LBB0_46:
Lloh28:
	adrp	x0, l_.str@PAGE
Lloh29:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
	mov	w20, #-1
	b	LBB0_33
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_moea_table_mutex,4,2           ; @moea_table_mutex
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_moea_pteg_table,8,3            ; @moea_pteg_table
	.comm	_PTE_VALID,4,2                  ; @PTE_VALID
	.comm	_PTE_HID,4,2                    ; @PTE_HID
	.comm	_moea_pteg_mask,8,3             ; @moea_pteg_mask
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"moea_pte_insert: overflow"

l_.str.1:                               ; @.str.1
	.asciz	"Victim PVO doesn't match PTE! PVO: %8x, PTE: %8x"

	.comm	_moea_pte_overflow,4,2          ; @moea_pte_overflow
	.no_dead_strip	_moea_pte_insert
.subsections_via_symbols
