	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phyp_iommu_unmap               ## -- Begin function phyp_iommu_unmap
	.p2align	4, 0x90
_phyp_iommu_unmap:                      ## @phyp_iommu_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	testl	%edx, %edx
	jle	LBB0_7
## %bb.1:
	movq	%rcx, %r13
	movl	%edx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_H_STUFF_TCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	movl	4(%rax), %esi
	movl	%edx, %eax
	cltd
	idivl	(%r15)
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_phyp_hcall
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_vmem_xfree
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	shlq	$4, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14,%rbx), %edi
	callq	_trunc_page
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r14,%rbx), %ecx
	movl	%eax, %r12d
	movslq	%ecx, %rdi
	addq	8(%r14,%rbx), %rdi
	callq	_round_page
	movl	%eax, %edx
	movq	_papr_supports_stuff_tce@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%edx, %edx
	movq	_H_PUT_TCE@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r12, %rbx
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rax), %edi
	movq	%rax, %r12
	movq	(%r13), %rax
	movl	4(%rax), %esi
	leal	(%r14,%rbx), %edx
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	callq	_phyp_hcall
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r12, %rax
	addl	(%r15), %r14d
	cmpl	%edx, %r14d
	jl	LBB0_5
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_papr_supports_stuff_tce,8,3    ## @papr_supports_stuff_tce
	.comm	_H_STUFF_TCE,4,2                ## @H_STUFF_TCE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_H_PUT_TCE,4,2                  ## @H_PUT_TCE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_phyp_iommu_unmap               ; -- Begin function phyp_iommu_unmap
	.p2align	2
_phyp_iommu_unmap:                      ; @phyp_iommu_unmap
	.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
	cmp	w2, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x3
	mov	x20, x1
	mov	x23, #0
Lloh0:
	adrp	x25, _papr_supports_stuff_tce@GOTPAGE
Lloh1:
	ldr	x25, [x25, _papr_supports_stuff_tce@GOTPAGEOFF]
Lloh2:
	adrp	x26, _H_PUT_TCE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _H_PUT_TCE@GOTPAGEOFF]
	mov	w27, w2
Lloh4:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x8, _H_STUFF_TCE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H_STUFF_TCE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	ldr	w8, [x28]
	sdiv	w8, w22, w8
	str	x8, [sp]
	mov	x2, x21
	mov	w3, #0
	bl	_phyp_hcall
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x22
	bl	_vmem_xfree
	add	x23, x23, #1
	cmp	x23, x27
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x22, x20, x23, lsl #4
	ldr	w0, [x22]
	bl	_trunc_page
	mov	x21, x0
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
Lloh9:
	adrp	x10, _PAGE_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PAGE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	add	x0, x8, w9, sxtw
	bl	_round_page
	mov	x22, x0
	ldr	x8, [x25]
	cbnz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w22, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w24, #0
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x26]
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	add	w2, w24, w21
	mov	w3, #0
	bl	_phyp_hcall
	ldr	w8, [x28]
	add	w24, w8, w24
	cmp	w24, w22
	b.lt	LBB0_7
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_papr_supports_stuff_tce,8,3    ; @papr_supports_stuff_tce
	.comm	_H_STUFF_TCE,4,2                ; @H_STUFF_TCE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_H_PUT_TCE,4,2                  ; @H_PUT_TCE
.subsections_via_symbols
