	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_mmu_unmap                   ## -- Begin function hl_mmu_unmap
	.p2align	4, 0x90
_hl_mmu_unmap:                          ## @hl_mmu_unmap
	.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
	movl	%esi, %r12d
	movq	(%rdi), %rsi
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rsi)
	je	LBB0_9
## %bb.1:
	movl	%edx, %ecx
	movq	%rdi, %r15
	movq	_PAGE_SIZE_2MB@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%edx, %eax
	cltd
	idivl	%r13d
	testl	%edx, %edx
	je	LBB0_4
## %bb.2:
	movq	_PAGE_SIZE_4KB@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	testl	%edx, %edx
	je	LBB0_4
## %bb.3:
	movl	(%rsi), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_4:
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	__hl_mmu_unmap
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%r13d, %r12d
	decl	%ebx
	jne	LBB0_6
	jmp	LBB0_9
LBB0_7:
	movl	%eax, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE_2MB,4,2              ## @PAGE_SIZE_2MB
	.comm	_PAGE_SIZE_4KB,4,2              ## @PAGE_SIZE_4KB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"page size of %u is not 4KB nor 2MB aligned, can't unmap\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_mmu_unmap                   ; -- Begin function hl_mmu_unmap
	.p2align	2
_hl_mmu_unmap:                          ; @hl_mmu_unmap
	.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]
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _PAGE_SIZE_2MB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE_2MB@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x9]
	sdiv	w9, w2, w21
	msub	w9, w9, w21, w2
	cbz	w9, LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _PAGE_SIZE_4KB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE_4KB@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x9]
	sdiv	w9, w2, w21
	msub	w9, w9, w21, w2
	cbz	w9, LBB0_4
; %bb.3:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
	sdiv	w22, w2, w21
	cmp	w22, #1
	b.lt	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	__hl_mmu_unmap
	cbnz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w19, w19, w21
	subs	w22, w22, #1
	b.ne	LBB0_5
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE_2MB,4,2              ; @PAGE_SIZE_2MB
	.comm	_PAGE_SIZE_4KB,4,2              ; @PAGE_SIZE_4KB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"page size of %u is not 4KB nor 2MB aligned, can't unmap\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
