	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmu_booke_change_attr
_mmu_booke_change_attr:                 ## @mmu_booke_change_attr
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r15
	movl	%edi, %ebx
	movq	%rsi, %rdi
	callq	_trunc_page
	movq	_VM_MAXUSER_ADDRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_15
## %bb.1:
	movq	_tlb1_map_base@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setge	%dl
	movq	_VM_MIN_KERNEL_ADDRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setl	%cl
	testb	%cl, %dl
	jne	LBB0_15
## %bb.2:
	movq	_VM_MAX_KERNEL_ADDRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_15
## %bb.3:
	movq	%rax, %r12
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rax, %r13
	movq	_TLB1_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:
	leaq	-88(%rbp), %r15
	movq	_MAS1_VALID@GOTPCREL(%rip), %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r14d
	movq	_TLB1_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	jge	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_tlb1_read_entry
	movl	(%rbx), %eax
	testl	%eax, -88(%rbp)
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax
	cmpq	%rax, %r13
	jl	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	-72(%rbp), %rax
	cmpq	%rax, %r13
	jge	LBB0_9
## %bb.8:
	movq	_TLB1_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %r13
	cmpl	%eax, %r14d
	jge	LBB0_11
## %bb.16:
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	jle	LBB0_29
## %bb.17:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r13d
	movq	%r12, %r15
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	leaq	-88(%rbp), %rdi
	movl	%r13d, %esi
	callq	_tlb1_read_entry
	cmpq	-80(%rbp), %r15
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_15
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%rdx, %rcx
	subq	%r15, %rcx
	movq	-72(%rbp), %rax
	cmpq	%rax, %rcx
	jl	LBB0_15
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	addq	%rax, %r15
	incl	%r13d
	cmpq	%rdx, %r15
	jl	LBB0_18
## %bb.21:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	leaq	-88(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_tlb1_read_entry
	movq	_MAS2_WIMGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, -64(%rbp)
	movl	-60(%rbp), %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_tlb_calc_wimg
	orl	%eax, -64(%rbp)
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_tlb1_write_entry
	addq	-72(%rbp), %r12
	incl	%r14d
	cmpq	%r13, %r12
	jl	LBB0_22
	jmp	LBB0_29
LBB0_11:
	testq	%rcx, %rcx
	jle	LBB0_27
## %bb.12:
	movq	_kernel_pmap@GOTPCREL(%rip), %r14
	movq	%r12, %rbx
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movl	%r15d, %edi
	movq	%rbx, %rdx
	callq	_pte_find
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %rdi
	callq	_PTE_ISVALID
	testl	%eax, %eax
	je	LBB0_15
## %bb.23:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	cmpq	%r13, %rbx
	jl	LBB0_13
## %bb.24:
	movq	_tlbivax_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_lock_spin
	xorl	%eax, %eax
	callq	_tlb_miss_lock
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	movq	%r14, %rdx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	jle	LBB0_28
## %bb.25:
	movq	%r13, %rcx
	movl	%r15d, %r13d
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%r13d, %edi
	movq	%r12, %rdx
	movq	%rcx, %r15
	callq	_pte_find
	movq	%rax, %rbx
	movq	_PTE_MAS2_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PTE_MAS2_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	notl	%eax
	andl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_PTE_PA
	movl	%eax, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_tlb_calc_wimg
	movq	_PTE_MAS2_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	orl	%eax, (%rbx)
	movq	%r12, %rdi
	callq	_tlb0_flush_entry
	movq	%r15, %rcx
	movq	_kernel_pmap@GOTPCREL(%rip), %rdx
	addq	(%r14), %r12
	cmpq	%r15, %r12
	jl	LBB0_26
	jmp	LBB0_28
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_tlbivax_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_lock_spin
	xorl	%eax, %eax
	callq	_tlb_miss_lock
LBB0_28:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_tlb_miss_unlock
	movq	_tlbivax_mutex@GOTPCREL(%rip), %rdi
	callq	_mtx_unlock_spin
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_MAXUSER_ADDRESS,8,3         ## @VM_MAXUSER_ADDRESS
	.comm	_tlb1_map_base,8,3              ## @tlb1_map_base
	.comm	_VM_MIN_KERNEL_ADDRESS,8,3      ## @VM_MIN_KERNEL_ADDRESS
	.comm	_VM_MAX_KERNEL_ADDRESS,8,3      ## @VM_MAX_KERNEL_ADDRESS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TLB1_ENTRIES,4,2               ## @TLB1_ENTRIES
	.comm	_MAS1_VALID,4,2                 ## @MAS1_VALID
	.comm	_MAS2_WIMGE_MASK,4,2            ## @MAS2_WIMGE_MASK
	.comm	_kernel_pmap,4,2                ## @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_tlbivax_mutex,4,2              ## @tlbivax_mutex
	.comm	_PTE_MAS2_MASK,4,2              ## @PTE_MAS2_MASK
	.comm	_PTE_MAS2_SHIFT,4,2             ## @PTE_MAS2_SHIFT
	.comm	_DMAP_BASE_ADDRESS,8,3          ## @DMAP_BASE_ADDRESS
	.comm	_DMAP_MAX_ADDRESS,8,3           ## @DMAP_MAX_ADDRESS
	.no_dead_strip	_mmu_booke_change_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmu_booke_change_attr
_mmu_booke_change_attr:                 ; @mmu_booke_change_attr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x3
	mov	x22, x2
	mov	x21, x0
	mov	x0, x1
	bl	_trunc_page
Lloh0:
	adrp	x8, _VM_MAXUSER_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_MAXUSER_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_2
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _tlb1_map_base@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tlb1_map_base@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _VM_MIN_KERNEL_ADDRESS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VM_MIN_KERNEL_ADDRESS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x0, x9
	ccmp	x0, x8, #8, lt
Lloh9:
	adrp	x8, _VM_MAX_KERNEL_ADDRESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VM_MAX_KERNEL_ADDRESS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ccmp	x0, x8, #0, lt
	b.le	LBB0_4
LBB0_2:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_4:
Lloh15:
	adrp	x24, _TLB1_ENTRIES@GOTPAGE
Lloh16:
	ldr	x24, [x24, _TLB1_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.5:
	mov	w23, #0
Lloh17:
	adrp	x25, _MAS1_VALID@GOTPAGE
Lloh18:
	ldr	x25, [x25, _MAS1_VALID@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	mov	x1, x23
	bl	_tlb1_read_entry
	ldr	w8, [sp]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #8]
	cmp	x20, x8
	b.lt	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [sp, #16]
	add	x8, x9, x8
	cmp	x20, x8
	b.ge	LBB0_6
; %bb.10:
	ldr	w8, [x24]
	b	LBB0_12
LBB0_11:
	mov	w23, #0
LBB0_12:
	add	x24, x20, x22
	cmp	w23, w8
	b.ge	LBB0_20
; %bb.13:
	cmp	x22, #1
	b.lt	LBB0_30
; %bb.14:
	mov	x21, x23
	mov	x22, x20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	mov	x1, x21
	bl	_tlb1_read_entry
	ldr	x8, [sp, #8]
	cmp	x22, x8
	b.ne	LBB0_2
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [sp, #16]
	sub	x9, x24, x22
	cmp	x9, x8
	b.lt	LBB0_2
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w21, w21, #1
	add	x22, x8, x22
	cmp	x22, x24
	b.lt	LBB0_15
; %bb.18:
Lloh19:
	adrp	x21, _MAS2_WIMGE_MASK@GOTPAGE
Lloh20:
	ldr	x21, [x21, _MAS2_WIMGE_MASK@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	mov	x1, x23
	bl	_tlb1_read_entry
	ldr	w8, [x21]
	ldp	w9, w0, [sp, #24]
	bic	w8, w9, w8
	str	w8, [sp, #24]
	mov	x1, x19
	bl	_tlb_calc_wimg
	ldr	w8, [sp, #24]
	orr	w8, w8, w0
	str	w8, [sp, #24]
	mov	x0, sp
	mov	x1, x23
	bl	_tlb1_write_entry
	mov	w0, #0
	ldr	x8, [sp, #16]
	add	w23, w23, #1
	add	x20, x8, x20
	cmp	x20, x24
	b.lt	LBB0_19
	b	LBB0_3
LBB0_20:
	cmp	x22, #1
	b.lt	LBB0_28
; %bb.21:
Lloh21:
	adrp	x25, _kernel_pmap@GOTPAGE
Lloh22:
	ldr	x25, [x25, _kernel_pmap@GOTPAGEOFF]
Lloh23:
	adrp	x26, _PAGE_SIZE@GOTPAGE
Lloh24:
	ldr	x26, [x26, _PAGE_SIZE@GOTPAGEOFF]
	mov	x23, x20
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	mov	x2, x23
	bl	_pte_find
	cbz	x0, LBB0_2
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	bl	_PTE_ISVALID
	cbz	w0, LBB0_2
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x26]
	add	x23, x8, x23
	cmp	x23, x24
	b.lt	LBB0_22
; %bb.25:
Lloh25:
	adrp	x0, _tlbivax_mutex@GOTPAGE
Lloh26:
	ldr	x0, [x0, _tlbivax_mutex@GOTPAGEOFF]
	bl	_mtx_lock_spin
	bl	_tlb_miss_lock
	cmp	x22, #1
	b.lt	LBB0_29
; %bb.26:
Lloh27:
	adrp	x23, _PTE_MAS2_MASK@GOTPAGE
Lloh28:
	ldr	x23, [x23, _PTE_MAS2_MASK@GOTPAGEOFF]
Lloh29:
	adrp	x27, _PTE_MAS2_SHIFT@GOTPAGE
Lloh30:
	ldr	x27, [x27, _PTE_MAS2_SHIFT@GOTPAGEOFF]
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	mov	x0, x21
	mov	x2, x20
	bl	_pte_find
	mov	x22, x0
	ldr	w8, [x23]
	ldr	w9, [x27]
	lsl	w8, w8, w9
	ldr	w9, [x0]
	bic	w8, w9, w8
	str	w8, [x0]
	bl	_PTE_PA
	mov	x1, x19
	bl	_tlb_calc_wimg
	ldr	w8, [x27]
	lsl	w8, w0, w8
	ldr	w9, [x22]
	orr	w8, w9, w8
	str	w8, [x22]
	mov	x0, x20
	bl	_tlb0_flush_entry
	ldr	x8, [x26]
	add	x20, x8, x20
	cmp	x20, x24
	b.lt	LBB0_27
	b	LBB0_29
LBB0_28:
Lloh31:
	adrp	x0, _tlbivax_mutex@GOTPAGE
Lloh32:
	ldr	x0, [x0, _tlbivax_mutex@GOTPAGEOFF]
	bl	_mtx_lock_spin
	bl	_tlb_miss_lock
LBB0_29:
	bl	_tlb_miss_unlock
Lloh33:
	adrp	x0, _tlbivax_mutex@GOTPAGE
Lloh34:
	ldr	x0, [x0, _tlbivax_mutex@GOTPAGEOFF]
	bl	_mtx_unlock_spin
LBB0_30:
	mov	w0, #0
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_MAXUSER_ADDRESS,8,3         ; @VM_MAXUSER_ADDRESS
	.comm	_tlb1_map_base,8,3              ; @tlb1_map_base
	.comm	_VM_MIN_KERNEL_ADDRESS,8,3      ; @VM_MIN_KERNEL_ADDRESS
	.comm	_VM_MAX_KERNEL_ADDRESS,8,3      ; @VM_MAX_KERNEL_ADDRESS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TLB1_ENTRIES,4,2               ; @TLB1_ENTRIES
	.comm	_MAS1_VALID,4,2                 ; @MAS1_VALID
	.comm	_MAS2_WIMGE_MASK,4,2            ; @MAS2_WIMGE_MASK
	.comm	_kernel_pmap,4,2                ; @kernel_pmap
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_tlbivax_mutex,4,2              ; @tlbivax_mutex
	.comm	_PTE_MAS2_MASK,4,2              ; @PTE_MAS2_MASK
	.comm	_PTE_MAS2_SHIFT,4,2             ; @PTE_MAS2_SHIFT
	.comm	_DMAP_BASE_ADDRESS,8,3          ; @DMAP_BASE_ADDRESS
	.comm	_DMAP_MAX_ADDRESS,8,3           ; @DMAP_MAX_ADDRESS
	.no_dead_strip	_mmu_booke_change_attr
.subsections_via_symbols
