	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dram_default_mapping_fini
_dram_default_mapping_fini:             ## @dram_default_mapping_fini
	.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
	movq	16(%rdi), %rax
	cmpl	$0, 4(%rax)
	je	LBB0_12
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_12
## %bb.2:
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	_HL_KERNEL_ASID_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
LBB0_12:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movslq	8(%rax), %r14
	movl	12(%rax), %esi
	movl	%r14d, %edi
	callq	_do_div
	movq	_PTE_ENTRIES_IN_HOP@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_do_div
	movq	%rbx, %rdi
	callq	_get_hop0_addr
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rcx
	movl	4(%rcx,%r14,4), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	testq	%r14, %r14
	jle	LBB0_11
## %bb.4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	(%rcx,%r14,4), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	(%r15), %eax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	movq	_PTE_ENTRIES_IN_HOP@GOTPCREL(%rip), %rdx
	movq	_HL_PTE_SIZE@GOTPCREL(%rip), %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%rdx, %r13
	callq	_clear_pte
	movq	8(%rbx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %esi
	movq	%rbx, %rdi
	callq	_put_pte
	movq	%r13, %rdx
	addl	(%r14), %r15d
	incl	%r12d
	movl	(%r13), %eax
	cmpl	%eax, %r12d
	jl	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	cmpq	-88(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	jmp	LBB0_5
LBB0_9:
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %r15d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	_HL_PTE_SIZE@GOTPCREL(%rip), %r13
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_clear_pte
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_put_pte
	addl	(%r13), %r15d
	decl	%r14d
	jne	LBB0_10
LBB0_11:
	movq	%rbx, %rdi
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_clear_pte
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_put_pte
	movq	%rbx, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_clear_pte
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_flush                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HL_KERNEL_ASID_ID,8,3          ## @HL_KERNEL_ASID_ID
	.comm	_PTE_ENTRIES_IN_HOP,4,2         ## @PTE_ENTRIES_IN_HOP
	.comm	_HL_PTE_SIZE,8,3                ## @HL_PTE_SIZE
	.no_dead_strip	_dram_default_mapping_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dram_default_mapping_fini
_dram_default_mapping_fini:             ; @dram_default_mapping_fini
	.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
	ldr	x8, [x0, #16]
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_3
; %bb.1:
	ldr	w9, [x8]
	cbz	w9, LBB0_3
; %bb.2:
	mov	x19, x0
	ldr	x9, [x0]
Lloh0:
	adrp	x10, _HL_KERNEL_ASID_ID@GOTPAGE
Lloh1:
	ldr	x10, [x10, _HL_KERNEL_ASID_ID@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
LBB0_3:
	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_4:
	ldp	w20, w1, [x8, #8]
                                        ; kill: def $w20 killed $w20 def $x20
	sxtw	x20, w20
	mov	x0, x20
	bl	_do_div
Lloh3:
	adrp	x25, _PTE_ENTRIES_IN_HOP@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PTE_ENTRIES_IN_HOP@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x20
	bl	_do_div
	mov	x0, x19
	bl	_get_hop0_addr
	mov	x21, x0
	ldr	x9, [x19, #8]
	add	w8, w20, #1
	ldr	w22, [x9, w8, sxtw #2]
	cmp	w20, #1
	b.lt	LBB0_12
; %bb.5:
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	mov	x27, #0
	and	x28, x20, #0xffffffff
	ldr	w23, [x9, x20, lsl #2]
	ldr	w8, [x25]
Lloh5:
	adrp	x26, _HL_PTE_SIZE@GOTPAGE
Lloh6:
	ldr	x26, [x26, _HL_PTE_SIZE@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
LBB0_6:
	mov	w21, #0
	ldr	w24, [x9, x27, lsl #2]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_clear_pte
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x27, lsl #2]
	mov	x0, x19
	bl	_put_pte
	ldr	w8, [x26]
	add	w24, w24, w8
	add	w21, w21, #1
	ldr	w8, [x25]
	cmp	w21, w8
	b.lt	LBB0_7
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x27, x27, #1
	cmp	x27, x28
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19, #8]
	cmp	w8, #1
	b.ge	LBB0_6
	b	LBB0_8
LBB0_10:
	mov	x24, x23
	ldr	w21, [sp, #12]                  ; 4-byte Folded Reload
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_clear_pte
	mov	x0, x19
	mov	x1, x23
	bl	_put_pte
	ldr	w8, [x26]
	add	w24, w24, w8
	subs	w20, w20, #1
	b.ne	LBB0_11
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	bl	_clear_pte
	mov	x0, x19
	mov	x1, x22
	bl	_put_pte
	mov	x0, x19
	mov	x1, x21
	bl	_clear_pte
	ldr	x0, [x19, #8]
	bl	_kfree
	mov	x0, x19
	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
	b	_flush
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_HL_KERNEL_ASID_ID,8,3          ; @HL_KERNEL_ASID_ID
	.comm	_PTE_ENTRIES_IN_HOP,4,2         ; @PTE_ENTRIES_IN_HOP
	.comm	_HL_PTE_SIZE,8,3                ; @HL_PTE_SIZE
	.no_dead_strip	_dram_default_mapping_fini
.subsections_via_symbols
